mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +00:00
feat(FE): US#278 slicing UI from and client side validation
This commit is contained in:
+11
@@ -4,6 +4,7 @@ import { Flock } from '@/types/api/master-data/flock';
|
||||
import { Kandang } from '@/types/api/master-data/kandang';
|
||||
import { Location } from '@/types/api/master-data/location';
|
||||
import { BaseApproval, BaseMetadata } from '@/types/api/api-general';
|
||||
import { Nonstock } from '@/types/api/master-data/nonstock';
|
||||
|
||||
export type BaseProjectFlock = {
|
||||
id: number;
|
||||
@@ -30,6 +31,15 @@ export type PeriodFlock = {
|
||||
next_period: number;
|
||||
};
|
||||
|
||||
export type ProjectFlockBudget = {
|
||||
id?: number;
|
||||
project_flock_id?: number;
|
||||
nonstock_id: number;
|
||||
nonstock?: Nonstock;
|
||||
qty: number;
|
||||
price: number;
|
||||
};
|
||||
|
||||
export type ProjectFlock = BaseMetadata & BaseProjectFlock;
|
||||
|
||||
export type CreateProjectFlockPayload = {
|
||||
@@ -39,6 +49,7 @@ export type CreateProjectFlockPayload = {
|
||||
fcr_id: number;
|
||||
location_id: number;
|
||||
kandang_ids: number[];
|
||||
project_budgets?: ProjectFlockBudget[];
|
||||
};
|
||||
|
||||
export type UpdateProjectFlockPayload = CreateProjectFlockPayload;
|
||||
|
||||
Vendored
+1
-10
@@ -3,13 +3,4 @@ type MainUiSlice = {
|
||||
setMainDrawerOpen: (open: boolean) => void;
|
||||
};
|
||||
|
||||
type DrawerUiSlice = {
|
||||
triggerValidate: boolean;
|
||||
toggleValidate: () => void;
|
||||
subscribeValidate: (callback: () => void) => void;
|
||||
isValid: boolean;
|
||||
setIsValid: (v: boolean) => void;
|
||||
subscribeIsValid: (callback: (isValid: boolean) => void) => () => void;
|
||||
};
|
||||
|
||||
export type UIStore = MainUiSlice & DrawerUiSlice;
|
||||
export type UIStore = MainUiSlice;
|
||||
|
||||
Reference in New Issue
Block a user