Skip to content

feat(drivers): add card view layout for Drivers Management - #299

Merged
roncodes merged 9 commits into
fleetbase:dev-v0.6.61from
janni1288:feat/drivers-card-view
Aug 31, 2026
Merged

feat(drivers): add card view layout for Drivers Management#299
roncodes merged 9 commits into
fleetbase:dev-v0.6.61from
janni1288:feat/drivers-card-view

Conversation

@janni1288

Copy link
Copy Markdown
Contributor

Summary

Adds a "Card View" layout to Drivers Management, mirroring the existing Vehicles Management implementation. Users can now toggle between table and card views, with the preference persisted via appCache.

Changes

  • Add Driver::Card component (addon/components/driver/card.{hbs,js}), modeled directly on Vehicle::Card. Displays avatar (via avatar-url helper with driver image fallback), name, phone, status badge (color-mapped the same way as cell/driver-identity), assigned vehicle, and lost modified timestamp. View/edit/delete actions wired to the driverActions service.
  • Update ManagementDriversIndexController to persist the layout preference (fleetops:drivers:layout) via appCache, and add a table/grid toggle to the action buttons, mirroring the Vehicles controller.
  • Update the drivers index template to conditionally render Layout::Ressource::Tabular (table) or Layout::Resource::CardsGrid + Driver::Card (grid), matching the Vehicles index template structure.

Commits

  1. feat(driver): add driver card component
  2. feat(drivers): persist card/table layout preference
  3. feat(drivers): add card view layout toggle to drivers index

Testing

  • Card view renders avatar, name, phone, status, assigned vehicle, and last modified correctly
  • View/Edit/Delete actions work from the card
  • Toggle between table and grid view works
  • Layout preference persists across page reload
  • Filter and pagination state preserved when switching views

Reference

Mirrors the existing card view implementation in Vehicles Management (Vehicle::Card, Layout::Resource::CardsGrid).

Closes #178

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4e0fc5f) to head (4d83063).
⚠️ Report is 36 commits behind head on dev-v0.6.61.

Additional details and impacted files
@@               Coverage Diff                @@
##             dev-v0.6.61      #299    +/-   ##
================================================
  Coverage         100.00%   100.00%            
- Complexity          9815      9899    +84     
================================================
  Files                523       526     +3     
  Lines              37888     38163   +275     
================================================
+ Hits               37888     38163   +275     
Flag Coverage Δ
backend 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Inlining the layout switch into the actionButtons getter put `this.layout =`
inside a computed property, which ember/no-side-effects rejects — four errors,
and lint:js took the Ember CI build down. Put the assignment back behind the
`changeLayout` action the getter had replaced, now persisting the choice to
appCache, and let both menu items call it.

Also strip the trailing whitespace and restore the final newlines that prettier
flagged in card.js and this file.
@roncodes roncodes mentioned this pull request Aug 23, 2026
@roncodes
roncodes changed the base branch from main to dev-v0.6.61 August 23, 2026 03:48
A local symlink into a sibling checkout slipped into the previous commit and
broke `pnpm install` in CI with ENOTDIR. .gitignore's `/node_modules/` has a
trailing slash, so it matches the directory but not a symlink of that name.
@roncodes

Copy link
Copy Markdown
Member

Implemented the requested driver card follow-up in commit 4d83063:

  • added the missing app re-export for Driver::Card
  • replaced the handwritten footer status pill with the shared Badge component
  • made the driver photo full-bleed, full width/height, object-cover, and explicitly non-rounded
  • moved the online indicator into the header at the top right of the driver name
  • added a focused Driver::Card integration test covering these presentation contracts

Validation completed:

  • Prettier check passed
  • ESLint passed
  • Ember template lint passed
  • git diff --check passed

The focused Ember test build was also attempted. It progressed through compilation with the repositories existing ember-intl warnings but then stalled before producing browser assertion results, so I stopped the hung local runner and am not claiming that test as passed.

@roncodes
roncodes merged commit 068be38 into fleetbase:dev-v0.6.61 Aug 31, 2026
6 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.

[GFI] Add Card View for Drivers Management

2 participants