My Shifts Add Time Flow
ops job time-tracking my-shifts
This note captures the current design direction for the unified Add Time flow on /my-shifts.
The main change is that Join Job and Add Shift / Add Time are being consolidated into a single modal. The modal is station-first and can create either:
- activity time
- one job entry
- multiple completed job entries
Goals
- Use one modal instead of separate Join Job and Add Shift flows
- Let operators choose the station they are working at
- Let operators search and select one or many jobs
- Avoid opening separate Start Job or Complete Job modals from My Shifts
- Reuse the same backend batch-creation path as Start Job
Unified Add Time Modal
flowchart TB A["/my-shifts"] --> B["Open Add Time modal"] B --> C{"Activity or Job?"} C -- Activity --> D["Select activity badge"] D --> E["Select start date/time"] E --> F["Select end date/time"] F --> G["Create completed time entry"] G --> Z["Reload My Shifts"] C -- Job --> H["Select station"] H --> I["Select start date/time"] I --> J["Optional end date/time"] J --> K["Search Jobs"] K --> L["Choose One Job or Multiple Jobs"] L -- One Job --> M["Select one job"] L -- Multiple Jobs --> N["Select multiple jobs with checkboxes Optional reorder selected jobs"] M --> O{"Did user include an end date/time?"} N --> O O -- No --> P["Create active/open entry flow"] P --> P1{"Matching batch already exists at selected station?"} P1 -- Yes --> P2["Reuse batch"] P1 -- No --> P3["Create batch silently at selected station using same backend path as Start Batch"] P2 --> P4["Create active labor entry"] P3 --> P4 P4 --> Z O -- Yes --> Q["Create completed entry flow"] Q --> R{"One Job or Multiple Jobs?"} R -- One Job --> S["Use full entered duration for that job"] R -- Multiple Jobs --> T["Split total duration evenly across selected jobs Build back-to-back time slices in selected order"] S --> U["For each resulting job slice"] T --> U U --> V{"Matching batch already exists at selected station?"} V -- Yes --> W["Reuse batch"] V -- No --> X["Create batch silently at selected station using same backend path as Start Batch"] W --> Y["Create completed labor entry for that slice"] X --> Y Y --> Z
Active Job Entries
If the user provides a start time only:
- the system treats this as starting active work
- it first checks whether a matching job instance already exists at the selected station
- if not, it silently creates one using the same backend creation path as Start Job
- then it creates the operator’s active labor entry
Matching batch rule
A matching batch at the selected station should mean:
- same organization
- same site
- same station / equipment
- same batch number / RMA
- not aborted
Completed Job Entries
If the user provides both start and end:
- the system treats this as historical completed work
One Jobgets the full durationMultiple Jobssplits the duration evenly into contiguous slices
End-time flow
flowchart TB A["User includes an end date/time"] --> B{"One Job or Multiple Jobs?"} B -- One Job --> C["Use full entered duration for that job"] B -- Multiple Jobs --> D["Split total duration evenly across selected jobs Build back-to-back time slices in selected order"] C --> E["For each resulting job slice"] D --> E E --> F{"Matching batch already exists at selected station?"} F -- Yes --> G["Reuse batch"] F -- No --> H["Create batch silently at selected station using same backend path as Start Batch with slice start time"] G --> I["Create completed labor entry for that slice"] H --> I I --> J{"Was the batch auto-created for this slice?"} J -- Yes --> K["Complete that batch silently using slice end time"] J -- No --> L["Do not auto-complete existing batch"] K --> M["Continue until all slices are created"] L --> M M --> N["Reload My Shifts"]
Why silent batch creation matters
When a user logs time at a station for a job that does not yet have a station instance there, the Add Time flow should not force them through a second modal. Instead, it should:
- create the station instance through the same backend path as Start Job
- create the labor entry
- if this is historical completed work, complete the synthetic station instance too
That keeps My Shifts consistent with the underlying batch / machine event model without making the operator bounce between modals.
Multi-Job mode
Multiple Jobs is meant for users who already know they are logging completed work across several jobs.
Rules:
- end time is required
- at least 2 jobs should be selected
- total duration is rounded to whole minutes
- duration is distributed in selected order
This keeps the user’s intent clear:
One Jobis the normal mode for starting live workMultiple Jobsis the mode for recording historical completed work
Recommended UX shape
The modal should stay as one working surface instead of a wizard:
- top-level tabs:
JobActivity
- inside
Job:- station selector
- start date / time
- end date / time
- available jobs list
- mode toggle:
One JobMultiple Jobs
- selected jobs ordering panel in multi-job mode