Jobs Page

ops job ui

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:

  1. Header — page title “Jobs”, time-range preset (last_7_days, last_24_hours, today, custom), From/To datetime-local inputs, Auto-Refresh toggle, manual Refresh button, “last updated” indicator.
  2. 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.
  3. 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.
  4. Jobs Overview table — the single unified table (see below).
  5. 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:

ColumnSourceSortableNotes
(compare checkbox)local UI statenoSelects the job group for the comparison route
(expand chevron)noToggles per-station detail
Jobbatch_numberyes (asc default)Routes to /oee/job-history/:batchNumber (the focus page); header includes a searchable filter
Productproduct_name / product_codeyesHeader includes a searchable filter
Statusactive shift state / run statusyesActive means at least one operator is currently clocked in on the job
Last stationlatest station from shift activity / station visityesHeader includes a searchable filter
Dwell hrstotal_duration_minutesyesSummed station-visit dwell time
Labor hrssummed operator shift durationyesPerson-hours from shift activity
Standard hrssummed standard hoursyesEarned standard hours across job activity
Std varianceStandard hrs - Labor hrsyesPositive values are ahead of standard; negative values are behind
On-job effectivenessStandard hrs / Labor hrsyesEmpty when no labor hours exist
Last shift activitylatest shift timestampyesPrimary default ordering signal
Column pickerlocal UI statenoLets 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.

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_jobs SQL function for the job quick-search; get_site_batch_history for the table data; get_batches_by_name for the expand lazy-load
  • Models: BatchHistoryItem (one row per station visit), BatchHistoryGroup (one row per batch_number, computed via groupBatchesByName)

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.