Jobs Page
The Jobs page at /oee/job-history is the OEE module’s primary view of completed and in-flight jobs at a site. It is a single unified screen: one searchable, filterable, sortable table of jobs grouped by batch_number, with supporting timelines below.
Layout
Top to bottom:
- Header — page title “Jobs”, time-range preset (
last_7_days,last_24_hours,today,custom), From/Todatetime-localinputs, Auto-Refresh toggle, manual Refresh button, “last updated” indicator. - Header filters — the page header includes the job quick-search chip filter. The Jobs Overview table also has funnel filters in its Job, Product, Status, and Last station column headers.
- Window-override notice — shown when a selected job has runs outside the current time window. Auto-widens the range to cover the selection and displays a Reset range button to restore the original window.
- Jobs Overview table — the single unified table (see below).
- Three timelines — Job Activity Timeline (Gantt), Floor Activity Timeline (per-station swimlanes), Operator Activity Timeline (per-operator labor lanes). Each renders as a card below the Jobs Overview table.
Jobs Overview Table
One row per batch_number (group-primary). Columns:
| Column | Source | Sortable | Notes |
|---|---|---|---|
| (compare checkbox) | local UI state | no | Selects the job group for the comparison route |
| (expand chevron) | — | no | Toggles per-station detail |
| Job | batch_number | yes (asc default) | Routes to /oee/job-history/:batchNumber (the focus page); header includes a searchable filter |
| Product | product_name / product_code | yes | Header includes a searchable filter |
| Status | active shift state / run status | yes | Active means at least one operator is currently clocked in on the job |
| Last station | latest station from shift activity / station visit | yes | Header includes a searchable filter |
| Dwell hrs | total_duration_minutes | yes | Summed station-visit dwell time |
| Labor hrs | summed operator shift duration | yes | Person-hours from shift activity |
| Standard hrs | summed standard hours | yes | Earned standard hours across job activity |
| Std variance | Standard hrs - Labor hrs | yes | Positive values are ahead of standard; negative values are behind |
| On-job effectiveness | Standard hrs / Labor hrs | yes | Empty when no labor hours exist |
| Last shift activity | latest shift timestamp | yes | Primary default ordering signal |
| Column picker | local UI state | no | Lets users show or hide optional columns |
Sort cycle — clicking a sortable header cycles asc → desc → cleared (back to default batch_number asc). Text columns (Job Name, Work Order) default asc on first click; numeric columns default desc.
Expand — clicking a group row reveals per-station runs underneath, lazy-loaded via getBatchesByName. Each run row shows station, product, status, dwell, labor, standard hours, standard variance, effectiveness, and last activity.
Column filters — Job, Product, Status, and Last station header funnels are checkbox filters. Options are checked by default, Select all clears the filter back to the default, and Clear all explicitly unchecks every option. Searchable filters narrow the option list while keeping checked state visible. Product, Job, and Last station option lists shrink as other column filters reduce the table.
Filter funnel — the time window, job chips, and column filters compose left-to-right:
allBatches (≤1000 in window)
→ job-chip filter (selected batch_numbers)
→ Product filter (selected products)
→ Status filter (selected statuses)
→ Last station filter (selected stations)
→ group by batch_number
→ sort
→ paginate
Row click opens the ViewEvent modal for the underlying batch event. Job Number link routes to /oee/job-history/:batchNumber (the batch focus page).
Job comparison
The Jobs Overview supports group-level comparison. Each grouped job row has a compare checkbox, and the header checkbox selects or clears only the currently visible grouped jobs after the job chips, column filters, sorting, and pagination have been applied. The selected count appears above the table. The Compare action stays disabled until two or more job groups are selected.
Compare opens /oee/job-history/compare?jobs=<job numbers>. The query string carries the selected batch_number values, so the view can be reopened for the same site context. The comparison is job-first: each row uses the same columns as Jobs Overview: Job, Product, Status, Last station, Dwell hrs, Labor hrs, Standard hrs, Std variance, On-job effectiveness, and Last activity.
Expanding a comparison row reveals the station runs for that job. Expanding a station run reveals operator labor entries for that run, including the operator label, station, duration, and clock-in/clock-out window. This keeps the group/run hierarchy visible while explaining why one job is ahead, behind, or spending time differently from another job.
Below the comparison table, the page reuses the same timeline components as Job History and the job focus page: Job Timeline, Floor Activity by Station, and Operator Activity. These timelines are scoped to the compared jobs, so users can compare the same station-run and labor context visually without leaving the shareable comparison URL.
Timelines below the table
Three Angular components, each reading the same filtered batch set:
- Job Activity Timeline (
app-batch-gantt-timeline) — Gantt-style view of job activity over time. Bars span each run’s start_ts → end_ts. Click opens the ViewEvent modal. - Floor Activity Timeline (
app-batch-station-timeline) — per-station swimlanes showing which jobs ran where, when. Station rows follow the configured station order from Stations, with name order as the fallback for stations without a configured order. - Operator Activity Timeline (
app-technician-history-timeline) — per-operator labor lanes. Clicking an activity opens the edit-shift modal for that time entry. Active entries open with an empty Clock Out field; the operator can leave it blank to keep the entry active, enter an end timestamp before clocking out, or press Clock Out with the field blank to close at the current time rounded to the nearest 15-minute mark.
The Floor Activity Timeline keeps normal station rows compact. Dense overlap rows show an expand control but stay closed by default. Dense collapsed rows use one lane, while shallow two-lane overlaps can use two lanes when that shows the overlap cleanly. When expanded, the row shows the station job count, a muted density strip where darker cells mean more concurrent jobs, data-driven overlap lanes capped for readability, and cluster chips for continuous heavy-overlap periods. Clicking a cluster chip opens a scrollable details panel for that cluster. The panel lists every job in the selected cluster and job numbers link to their job detail pages. Hovering a details row brings the matching job bar forward in its lane. Collapsed and expanded rows preserve hover details on job bars.
Archiving a job from the ViewEvent modal opened by a Jobs timeline reloads the Jobs table and timeline data when the modal closes, so archived station visits drop out without a manual browser refresh.
The technician timeline pulls getPeopleHistory and getSiteTechnicians from the ops service alongside the batch fetch.
Deep-link compatibility
The main URL is /oee/job-history (not /oee/jobs) so saved bookmarks from before the page rename keep working. The job comparison URL is /oee/job-history/compare?jobs=<job numbers>. The legacy ?tab=labor query-param is intercepted in ngOnInit and redirected to /oee/operators, where operator analytics live.
Codebase
- Component:
frontend/src/app/features/oee-dashboard/components/batch-history-page/ - Route:
frontend/src/app/features/oee-dashboard/oee-dashboard-routing.module.ts - Backend:
search_site_jobsSQL function for the job quick-search;get_site_batch_historyfor the table data;get_batches_by_namefor the expand lazy-load - Models:
BatchHistoryItem(one row per station visit),BatchHistoryGroup(one row perbatch_number, computed viagroupBatchesByName)
History
This page was previously called “Job History” and split into History and Board sub-tabs. PR #3318 unified the two tabs into one group-primary table, renamed the page to “Jobs” in user-visible chrome, kept the route URL for backward compatibility, moved Status / Station filters from <th> popups into the filter bar, and added sortable headers to the grouped table. The Earned Hours Tracker code that was never rendered was removed in the same PR.