From 5b3e59bbb4fc8fd11a644a5a33ec907581209912 Mon Sep 17 00:00:00 2001 From: Jeppe Bundgaard Date: Mon, 16 Mar 2026 13:43:08 +0100 Subject: [PATCH] Introduce scope filtering and machine type integration for Self-Serve module: - Add scope label computation for tasks, questions, and conditions based on department, lane, product, and machine type. - Introduce filters for machine type, lane, and department in Self-Serve pagination. - Replace `EditableTableColumn` with scoped rendering for improved flexibility. - Extend API and schema to support machine type integration in department redistribution. - Optimize UI for task, question, and condition management with machine type-aware workflows. --- openapi.yaml | 130 +++++++++++++++++- .../tables/SelfServeConditionsTable.vue | 97 +++++++------ .../tables/SelfServeQuestionsTable.vue | 84 +++++------ .../department/tables/SelfServeTasksTable.vue | 130 ++++++++---------- .../SelfServeConditionsPagination.vue | 97 +++++++------ .../SelfServeQuestionsPagination.vue | 60 ++++---- .../SelfServeTasksPagination.vue | 104 +++++++------- .../modules/wash-lanes/DepartmentWashLane.vue | 47 ++++--- 8 files changed, 446 insertions(+), 303 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 49772f82..43b8637c 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5721,6 +5721,33 @@ paths: '403': { $ref: '#/components/responses/Forbidden' } '500': { $ref: '#/components/responses/InternalServerError' } + /superuser/invoicing/period/distribution/v2/booked-department-75: + get: + tags: + - Invoices + summary: Get booked e-conomic department 75 redistribution + operationId: getInvoicingPeriodDistributionV2BookedDepartment75 + parameters: + - name: dateFrom + in: query + required: true + schema: { type: string, format: date } + - name: dateTo + in: query + required: true + schema: { type: string, format: date } + responses: + '200': + description: Actual booked e-conomic department 75 net amounts redistributed to internal departments + content: + application/json: + schema: + $ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Response' + '400': { $ref: '#/components/responses/BadRequest' } + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '500': { $ref: '#/components/responses/InternalServerError' } + /superuser/customers/pricing-history: get: tags: @@ -11207,6 +11234,105 @@ components: InvoicingDistributionV2CustomerPricesResponse: $ref: '#/components/schemas/InvoicingDistributionV2CategoryResponse' + InvoicingDistributionV2BookedDepartment75Group: + type: object + properties: + month: + type: string + example: '2026-01' + source_category: + type: string + enum: [fixed_pricing, wash_subscriptions, unclassified] + invoice_ids: + type: array + items: + type: integer + booked_net_amount: + type: number + department_distribution: + $ref: '#/components/schemas/EconomicV2DepartmentDistribution' + undistributed_net_amount: + type: number + required: + - month + - source_category + - invoice_ids + - booked_net_amount + - department_distribution + - undistributed_net_amount + + InvoicingDistributionV2BookedDepartment75Meta: + type: object + properties: + booked_net_amount: + type: number + distributed_net_amount: + type: number + undistributed_net_amount: + type: number + department_distribution: + $ref: '#/components/schemas/EconomicV2DepartmentDistribution' + booked_groups: + type: array + items: + $ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Group' + required: + - booked_net_amount + - distributed_net_amount + - undistributed_net_amount + - department_distribution + - booked_groups + + InvoicingDistributionV2BookedDepartment75Customer: + allOf: + - $ref: '#/components/schemas/InvoicingDistributionV2Customer' + - type: object + properties: + meta: + type: object + properties: + booked_department_75: + $ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Meta' + required: + - booked_department_75 + + InvoicingDistributionV2BookedDepartment75CollectiveResults: + type: object + properties: + booked_net_amount: + type: number + distributed_net_amount: + type: number + undistributed_net_amount: + type: number + department_distribution: + $ref: '#/components/schemas/EconomicV2DepartmentDistribution' + department_distribution_parsed: + type: object + additionalProperties: + type: number + required: + - booked_net_amount + - distributed_net_amount + - undistributed_net_amount + - department_distribution + - department_distribution_parsed + + InvoicingDistributionV2BookedDepartment75Response: + type: object + properties: + customers: + type: array + items: + $ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Customer' + collective_results: + $ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75CollectiveResults' + warnings: + type: array + items: + type: string + required: [customers, collective_results, warnings] + InvoicingDistributionV2AllResponse: type: object properties: @@ -11216,7 +11342,9 @@ components: $ref: '#/components/schemas/InvoicingDistributionV2WashSubscriptionsResponse' customer_prices: $ref: '#/components/schemas/InvoicingDistributionV2CustomerPricesResponse' - required: [fixed_pricing, wash_subscriptions, customer_prices] + booked_department_75: + $ref: '#/components/schemas/InvoicingDistributionV2BookedDepartment75Response' + required: [fixed_pricing, wash_subscriptions, customer_prices, booked_department_75] PricingHistoryVersionEntry: type: object diff --git a/src/components/displays/department/tables/SelfServeConditionsTable.vue b/src/components/displays/department/tables/SelfServeConditionsTable.vue index 096f01a8..2c757595 100644 --- a/src/components/displays/department/tables/SelfServeConditionsTable.vue +++ b/src/components/displays/department/tables/SelfServeConditionsTable.vue @@ -1,12 +1,11 @@