feat: add product catalogue and product-aware UI
- introduce product catalogue pages, management view entries and shared product composables\n- wire product selection into component/piece flows and machine skeleton requirements\n- display linked product metadata and documents across machine, component and piece views\n- generalize model type tooling to handle PRODUCT category
This commit is contained in:
@@ -3,11 +3,16 @@ import type { FetchOptions } from 'ofetch';
|
||||
import type {
|
||||
ComponentModelStructure,
|
||||
PieceModelStructure,
|
||||
ProductModelStructure,
|
||||
} from '~/shared/types/inventory';
|
||||
|
||||
export type ModelCategory = 'COMPONENT' | 'PIECE';
|
||||
export type ModelCategory = 'COMPONENT' | 'PIECE' | 'PRODUCT';
|
||||
|
||||
export type ModelTypeStructure = ComponentModelStructure | PieceModelStructure | null;
|
||||
export type ModelTypeStructure =
|
||||
| ComponentModelStructure
|
||||
| PieceModelStructure
|
||||
| ProductModelStructure
|
||||
| null;
|
||||
|
||||
export interface BaseModelTypePayload {
|
||||
name: string;
|
||||
@@ -26,7 +31,15 @@ export interface PieceModelTypePayload extends BaseModelTypePayload {
|
||||
structure?: PieceModelStructure | null;
|
||||
}
|
||||
|
||||
export type ModelTypePayload = ComponentModelTypePayload | PieceModelTypePayload;
|
||||
export interface ProductModelTypePayload extends BaseModelTypePayload {
|
||||
category: 'PRODUCT';
|
||||
structure?: ProductModelStructure | null;
|
||||
}
|
||||
|
||||
export type ModelTypePayload =
|
||||
| ComponentModelTypePayload
|
||||
| PieceModelTypePayload
|
||||
| ProductModelTypePayload;
|
||||
|
||||
export interface ModelType extends BaseModelTypePayload {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user