mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 11:59:35 +01:00
feat(production): Batch bei Produktionsstart automatisch erstellen (#73)
- BatchNumber in allen ProductionOrder-Endpoints via BatchRepository auflösen - BatchCreationFailed Error-Variante statt generischem ValidationFailure - bestBeforeDate-Berechnung als Recipe.calculateBestBeforeDate() in die Domain verschoben
This commit is contained in:
parent
26adf21162
commit
600d0f9f06
20 changed files with 356 additions and 397 deletions
|
|
@ -115,7 +115,6 @@ export type {
|
|||
ReserveStockRequest,
|
||||
StockMovementDTO,
|
||||
RecordStockMovementRequest,
|
||||
StartProductionOrderRequest,
|
||||
CountryDTO,
|
||||
} from '@effigenix/types';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/** Production Orders resource – Production BC. */
|
||||
|
||||
import type { AxiosInstance } from 'axios';
|
||||
import type { ProductionOrderDTO, CreateProductionOrderRequest, StartProductionOrderRequest, RescheduleProductionOrderRequest } from '@effigenix/types';
|
||||
import type { ProductionOrderDTO, CreateProductionOrderRequest, RescheduleProductionOrderRequest } from '@effigenix/types';
|
||||
|
||||
export type Priority = 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT';
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ export interface ProductionOrderFilter {
|
|||
dateTo?: string;
|
||||
}
|
||||
|
||||
export type { ProductionOrderDTO, CreateProductionOrderRequest, StartProductionOrderRequest, RescheduleProductionOrderRequest };
|
||||
export type { ProductionOrderDTO, CreateProductionOrderRequest, RescheduleProductionOrderRequest };
|
||||
|
||||
const BASE = '/api/production/production-orders';
|
||||
|
||||
|
|
@ -58,8 +58,8 @@ export function createProductionOrdersResource(client: AxiosInstance) {
|
|||
return res.data;
|
||||
},
|
||||
|
||||
async start(id: string, request: StartProductionOrderRequest): Promise<ProductionOrderDTO> {
|
||||
const res = await client.post<ProductionOrderDTO>(`${BASE}/${id}/start`, request);
|
||||
async start(id: string): Promise<ProductionOrderDTO> {
|
||||
const res = await client.post<ProductionOrderDTO>(`${BASE}/${id}/start`);
|
||||
return res.data;
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue