feat(reference-auto) : display referenceAuto in piece views + formula config in ModelTypeForm

- Piece interface: add referenceAuto field
- piece/[id].vue: read-only display with auto badge
- pieces/[id]/edit.vue: disabled input when referenceAuto is set
- pieces-catalog.vue: new column "Réf. auto"
- PieceItem.vue: badge + detail line for referenceAuto
- ModelTypeForm.vue: formula + required fields config for PIECE category
- modelTypes.ts: add referenceFormula/requiredFieldsForReference to types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-26 20:33:33 +01:00
parent a7415964a7
commit a339e722a6
7 changed files with 112 additions and 2 deletions

View File

@@ -28,6 +28,8 @@ export interface ComponentModelTypePayload extends BaseModelTypePayload {
export interface PieceModelTypePayload extends BaseModelTypePayload {
category: 'PIECE';
structure?: PieceModelStructure | null;
referenceFormula?: string | null;
requiredFieldsForReference?: string[] | null;
}
export interface ProductModelTypePayload extends BaseModelTypePayload {
@@ -46,6 +48,8 @@ export interface ModelType extends BaseModelTypePayload {
updatedAt: string;
category: ModelCategory;
structure: ModelTypeStructure;
referenceFormula?: string | null;
requiredFieldsForReference?: string[] | null;
}
export interface ModelTypeListParams {