Skip to content

fix(labels): correct entity label to use entity data instead of stale waypoint/order fallbacks - #280

Merged
roncodes merged 1 commit into
fleetbase:dev-v0.6.59from
janni1288:fix/entity-label-stale-fallbacks
Aug 2, 2026
Merged

roncodes merged 1 commit into
fleetbase:dev-v0.6.59from
janni1288:fix/entity-label-stale-fallbacks

Conversation

@janni1288

Copy link
Copy Markdown
Contributor

What

Fixes the entity label template ('entity-label.php'), which was copy-pasted from 'waypoint-label.php' and still referenced '$waypoint'/'$order', variables that are never passed to 'Entity::label()'.

Why

Related to #182 - while investigating single-entity label generation, found that the existing 'type=entity' label endpoint renders a broken title ("Waypoint Label" instead of the correct label) and contains dead/unreachable fallback code ('$order->trackingNumber') that would throw if '$trackingNumber' were never empty.

Changes

  • Title now correctly reflects the entity instead of a waypoint
  • QR code and barcode fallbacks use '$entity->qr_code' / '$entity->barcode' instead of the undefined '$order'
  • Tracking number fallback uses '$entity->public_id'

Testing

  • Verified locally by rendering 'Entity::label()' via Tinker - title now shows correctly
  • Existing test 'LabelIdPdfRenderingTest' still passes

Related to #182

@roncodes
roncodes changed the base branch from main to dev-v0.6.59 August 2, 2026 06:08
@roncodes
roncodes merged commit f4abf89 into fleetbase:dev-v0.6.59 Aug 2, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants