feat: add production navigation permissions and produced items page

- Created a new migration to add navigation items and permissions for the production section.
- Implemented the Produced Items page with filtering options for date range, templates, warehouses, and status.
- Integrated API calls to fetch produced items, templates, and warehouses.
- Added UI components for displaying produced items in a table format with relevant details.
This commit is contained in:
2026-08-21 11:57:07 +05:30
parent 8835ba9500
commit 99b669395e
14 changed files with 8113 additions and 3 deletions
@@ -18,6 +18,7 @@ import {
CancelRunResult,
CompleteStageRequest,
CreateRunRequest,
ProducedListResponse,
ProductionRunGraph,
ProductionRunStatus,
ProductionRunSummary,
@@ -43,11 +44,24 @@ export interface ListRunsParams {
sort?: string
}
export interface ListProducedParams {
from?: string
to?: string
templateId?: number
warehouseId?: number
status?: ProductionRunStatus
}
export const productionRunsApi = {
list(params: ListRunsParams = {}): Promise<PagedResponse<ProductionRunSummary>> {
return apiRequest<PagedResponse<ProductionRunSummary>>(`/production-runs${buildQuery(params)}`)
},
/** Produced-items report (FR-MFG-13): flat rows + a summary total, no pagination. */
listProduced(params: ListProducedParams = {}): Promise<ProducedListResponse> {
return apiRequest<ProducedListResponse>(`/production-runs/produced${buildQuery(params)}`)
},
get(runId: number): Promise<ApiResult<ProductionRunGraph>> {
return apiRequestWithETag<ProductionRunGraph>(`/production-runs/${runId}`)
},