mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +00:00
feat(FE): add master data production standard, slicing form and index table
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { CreatedUser } from '@/types/api/api-general';
|
||||
|
||||
export interface ProductionStandard {
|
||||
id: number;
|
||||
name: string;
|
||||
project_category: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
created_user: CreatedUser;
|
||||
details: StandardDetails[];
|
||||
}
|
||||
|
||||
export interface StandardDetails {
|
||||
week: number;
|
||||
standard_growth_details: StandardGrowthDetails;
|
||||
production_standard_details: ProductionStandardDetails;
|
||||
}
|
||||
|
||||
export interface ProductionStandardDetails {
|
||||
target_hen_day_production: number;
|
||||
target_hen_house_production: number;
|
||||
target_egg_weight: number;
|
||||
target_egg_mass: number;
|
||||
}
|
||||
|
||||
export interface StandardGrowthDetails {
|
||||
target_mean_bw: number;
|
||||
max_depletion: number;
|
||||
min_uniformity: number;
|
||||
max_cv: number;
|
||||
week: number;
|
||||
feed_intake: number;
|
||||
}
|
||||
Vendored
+27
@@ -1,3 +1,5 @@
|
||||
import type { ProductionStandardRepeaterFormSchemaValues } from '@/components/pages/master-data/production-standard/form/ProductionStandardForm.schema';
|
||||
|
||||
type MainUiSlice = {
|
||||
mainDrawerOpen: boolean;
|
||||
setMainDrawerOpen: (open: boolean) => void;
|
||||
@@ -13,3 +15,28 @@ type DrawerUISlice = {
|
||||
};
|
||||
|
||||
export type UIStore = MainUiSlice & DrawerUISlice;
|
||||
|
||||
type ProductionStandardFormSlice = {
|
||||
formData: {
|
||||
name: string;
|
||||
project_category: string;
|
||||
details: ProductionStandardRepeaterFormSchemaValues[];
|
||||
} | null;
|
||||
editMode: boolean;
|
||||
editIndex: number | null;
|
||||
setFormData: (data: {
|
||||
name: string;
|
||||
project_category: string;
|
||||
details: ProductionStandardRepeaterFormSchemaValues[];
|
||||
}) => void;
|
||||
setEditMode: (mode: boolean, index: number | null) => void;
|
||||
addDetail: (detail: ProductionStandardRepeaterFormSchemaValues) => void;
|
||||
updateDetail: (
|
||||
index: number,
|
||||
detail: ProductionStandardRepeaterFormSchemaValues
|
||||
) => void;
|
||||
deleteDetail: (index: number) => void;
|
||||
clearCache: () => void;
|
||||
};
|
||||
|
||||
export type FormStore = ProductionStandardFormSlice;
|
||||
|
||||
Reference in New Issue
Block a user