Skip to content

feat(ui): persist job assignment state and scope Complete Maintenance to assigned jobs - #68

Merged
licette32 merged 1 commit into
mainfrom
feat/assigned-jobs-scoped-dropdown
Aug 24, 2026
Merged

licette32 merged 1 commit into
mainfrom
feat/assigned-jobs-scoped-dropdown

Conversation

@licette32

Copy link
Copy Markdown
Owner

Summary

Makes job assignment a visible, persistent session state. Available Jobs rows can now be assigned/released individually, and the Complete Maintenance dropdown only shows jobs the technician has actually taken — instead of every open job in the system.

Changes

  • Row action is now a toggle: "Asignarme" ↔ "Liberar" (techTakeJob / techRelease), replacing the old one-shot select.
  • Assigned rows get a tinted background and a "🔧 Trabajando aquí" badge next to the status pill.
  • Supports multiple simultaneous assignments — technicians can take more than one job and switch between them.
  • Complete Maintenance dropdown now lists only assigned jobs, with a hint ("Asignáte un trabajo desde la tabla") when none are assigned.
  • Assignments are pruned automatically on refresh when a job completes and drops off the available list.
  • Assigning from the table still pre-selects the job, switches to the direct tab, and scrolls to the Complete Maintenance card (behavior kept from feat(ui): split TechnicianDashboard into direct and hand-off tabs (#55) #65's follow-up).

Testing

  • Manual: assigned and released jobs, confirmed badge/background update and dropdown scoping in both directions.
  • Manual: assigned multiple jobs, switched between them in the dropdown without losing other assignments.
  • Manual: completed an assigned job, confirmed it's pruned from assignedJobIds on the next refresh.
  • Automated: tsc --noEmit green.

Notes

  • Session-only state — no on-chain or Supabase persistence, as scoped.
  • Hand-off flow and "Completar y Cobrar" behavior unchanged.

Closes #66

… to assigned jobs

Assignment is now visible session state instead of an invisible
selection: rows marked via 'Asignarme'/'Take job' get a cyan tint plus a
'Working on this' badge, the action toggles to 'Liberar'/'Release', and
multiple jobs can be held at once.

The Complete Maintenance dropdown previously listed every open job,
diluting the table's selection step; it now lists only assigned jobs
with a hint when none are held. Auto-select keeps pointing at a held job
(preserving the autoSelectedJob guard that protects the deferred
evidence upload), and assignments are pruned on jobs refresh when a job
disappears (e.g. after completion).
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
medovant-protocol Ready Ready Preview Aug 24, 2026 1:05am

@licette32
licette32 merged commit 39fb991 into main Aug 24, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — fc50e75e Deployed Aug 24, 2026 by vercel[bot]
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.

Persist job assignment state: mark jobs "in progress" and scope Complete Maintenance list to them

1 participant