Every piece of data shown on the SteelWorks dashboard — both the Issue Summary table and the Affected Lots table — is scoped by a week and production-line selection. The three filter controls at the top of the page determine which rows are queried, aggregated, and displayed. Adjusting any control immediately re-queries the service and re-renders both tables.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kishnahai0806/SteelWorks/llms.txt
Use this file to discover all available pages before exploring further.
Week selector
service.get_available_weeks(), which reads the calendar_weeks table ordered by start_date. Each option is an ISO week label string in the format YYYY-Www (e.g. 2026-W03). The widget maps each visible label back to an internal calendar_week_id integer before the selection is passed downstream. The first week in chronological order is selected by default (index=0).
Production lines multiselect
service.get_available_lines(), which queries only rows where is_active = TRUE, ordered by line_name. All active lines are selected by default — users can deselect individual lines to narrow the scope. As with the week selector, displayed names are resolved to production_line_id integers before being passed to the service.
Group by line checkbox
line_name column so issue counts are broken down per line. The checkbox value is forwarded directly to service.get_issue_summary() as the group_by_line parameter. It has no effect on the Affected Lots table, which always includes line_name.
IssueFilterSelection
After the widgets render, the three user inputs are consolidated into a single frozen dataclass before being handed to any service method:The internal integer primary key for the selected production week, resolved from the week label chosen in the selectbox.
A list of
production_line_id integers corresponding to the lines chosen in the multiselect. The list is normalized — deduplicated and sorted — inside service.normalize_line_ids() before any repository query is executed, ensuring deterministic SQL parameterization regardless of selection order.Line ID normalization
Before theproduction_line_ids list is passed to the repository the service always normalizes it:
IN :line_ids SQL clause is always built from a stable, sorted list.
If no production lines are selected, both
service.get_issue_summary() and service.get_affected_lots() return an empty list immediately — no database query is issued. The tables will display the “no results” info message instead.Example selection
2026-W03 (calendar_week_id=1) and filters to Line 1 (production_line_id=1) and Line 4 (production_line_id=3).