mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 13:55:45 +00:00
Merge branch 'development' of gitlab.com:mbugroup/lti-web-client into feat/FE/US-339/TASK-361-362-363-slicing-purchase-and-integrate-purchase-report-page
This commit is contained in:
+6
-42
@@ -9,8 +9,7 @@ export type ProductionMetrics = {
|
||||
cum_intake: number;
|
||||
fcr_value: number;
|
||||
total_chick_qty: number;
|
||||
daily_depletion_rate?: number;
|
||||
cum_depletion?: number;
|
||||
cum_depletion: number;
|
||||
};
|
||||
|
||||
export type BaseRecording = {
|
||||
@@ -18,42 +17,33 @@ export type BaseRecording = {
|
||||
project_flock_kandang_id: number;
|
||||
record_datetime: string;
|
||||
day: number;
|
||||
created_by: User;
|
||||
project_flock_category?: 'GROWING' | 'LAYING';
|
||||
} & ProductionMetrics;
|
||||
|
||||
export type RecordingBW = {
|
||||
id: number;
|
||||
recording_id: number;
|
||||
avg_weight: number;
|
||||
qty: number;
|
||||
total_weight: number;
|
||||
};
|
||||
|
||||
export type RecordingDepletion = {
|
||||
id: number;
|
||||
recording_id: number;
|
||||
product_warehouse_id: number;
|
||||
qty: number;
|
||||
product_warehouse: ProductWarehouse;
|
||||
};
|
||||
|
||||
export type RecordingStock = {
|
||||
id: number;
|
||||
recording_id: number;
|
||||
product_warehouse_id: number;
|
||||
usage_amount?: number;
|
||||
usage_qty: number;
|
||||
qty: number;
|
||||
pending_qty: number;
|
||||
product_warehouse: ProductWarehouse;
|
||||
};
|
||||
|
||||
export type RecordingEgg = {
|
||||
id: number;
|
||||
recording_id: number;
|
||||
product_warehouse_id: number;
|
||||
qty: number;
|
||||
created_by: User;
|
||||
weight: number;
|
||||
product_warehouse: ProductWarehouse;
|
||||
gradings?: {
|
||||
grade: string;
|
||||
@@ -71,19 +61,12 @@ export type GradingEgg = {
|
||||
|
||||
export type Recording = BaseMetadata &
|
||||
BaseRecording & {
|
||||
project_flock_category?: 'GROWING' | 'LAYING';
|
||||
approval?: BaseApproval;
|
||||
egg_grading_status?: string | null;
|
||||
egg_grading_pending_qty?: number | null;
|
||||
egg_grading_completed_qty?: number | null;
|
||||
created_user: User;
|
||||
body_weights?: RecordingBW[];
|
||||
depletions?: RecordingDepletion[];
|
||||
stocks?: RecordingStock[];
|
||||
eggs?: RecordingEgg[];
|
||||
recording_bws?: RecordingBW[];
|
||||
recording_depletions?: RecordingDepletion[];
|
||||
recording_stocks?: RecordingStock[];
|
||||
recording_eggs?: RecordingEgg[];
|
||||
grading_eggs?: GradingEgg[];
|
||||
};
|
||||
|
||||
@@ -108,27 +91,10 @@ export type CreateGrowingRecordingPayload = {
|
||||
}[];
|
||||
};
|
||||
|
||||
export type CreateGradingPayload = {
|
||||
eggs_grading: {
|
||||
recording_egg_id: number;
|
||||
grade: string;
|
||||
qty: number;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type UpdateGradingPayload = CreateGradingPayload;
|
||||
|
||||
export type CreateGradingRecordingPayload = {
|
||||
eggs_grading: {
|
||||
recording_egg_id: number;
|
||||
grade: string;
|
||||
qty: number;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type CreateEggPayload = {
|
||||
product_warehouse_id: number;
|
||||
qty: number;
|
||||
weight: number;
|
||||
};
|
||||
|
||||
export type CreateLayingRecordingPayload = CreateGrowingRecordingPayload & {
|
||||
@@ -137,11 +103,9 @@ export type CreateLayingRecordingPayload = CreateGrowingRecordingPayload & {
|
||||
|
||||
export type CreateRecordingPayload =
|
||||
| CreateGrowingRecordingPayload
|
||||
| CreateLayingRecordingPayload
|
||||
| CreateGradingRecordingPayload;
|
||||
| CreateLayingRecordingPayload;
|
||||
|
||||
export type UpdateGrowingRecordingPayload = CreateGrowingRecordingPayload;
|
||||
export type UpdateLayingRecordingPayload = CreateLayingRecordingPayload;
|
||||
export type UpdateGradingRecordingPayload = CreateGradingRecordingPayload;
|
||||
|
||||
export type UpdateRecordingPayload = CreateRecordingPayload;
|
||||
|
||||
Vendored
+9
-10
@@ -42,7 +42,6 @@ export type PurchaseItem = {
|
||||
expedition_vendor_name?: string | null;
|
||||
received_qty?: number | null;
|
||||
transport_per_item?: number | null;
|
||||
transport_total?: number | null;
|
||||
};
|
||||
|
||||
export type BasePurchase = {
|
||||
@@ -52,9 +51,8 @@ export type BasePurchase = {
|
||||
po_document_path?: string | null;
|
||||
po_date: string;
|
||||
supplier: Supplier;
|
||||
credit_term: number;
|
||||
credit_term?: number;
|
||||
due_date: string;
|
||||
grand_total: number;
|
||||
notes?: string | null;
|
||||
deleted_at?: string | null;
|
||||
created_by: number;
|
||||
@@ -62,7 +60,7 @@ export type BasePurchase = {
|
||||
location?: Location;
|
||||
warehouse?: Warehouse;
|
||||
items?: PurchaseItem[];
|
||||
approval?: BaseApproval;
|
||||
latest_approval?: BaseApproval;
|
||||
};
|
||||
|
||||
export type Purchase = BaseMetadata & BasePurchase;
|
||||
@@ -71,7 +69,7 @@ export type CreatePurchaseRequestPayload = {
|
||||
supplier_id: number;
|
||||
credit_term: number;
|
||||
notes?: string | null;
|
||||
items: {
|
||||
items?: {
|
||||
warehouse_id: number;
|
||||
product_id: number;
|
||||
qty: number;
|
||||
@@ -81,7 +79,7 @@ export type CreatePurchaseRequestPayload = {
|
||||
export type CreateStaffApprovalRequestPayload = {
|
||||
action: 'APPROVED' | 'REJECTED';
|
||||
notes?: string | null;
|
||||
items: {
|
||||
items?: {
|
||||
purchase_item_id: number;
|
||||
qty: number;
|
||||
price: number;
|
||||
@@ -92,7 +90,7 @@ export type CreateStaffApprovalRequestPayload = {
|
||||
export type UpdateStaffApprovalRequestPayload = {
|
||||
action: 'APPROVED' | 'REJECTED';
|
||||
notes?: string | null;
|
||||
items: Array<{
|
||||
items?: Array<{
|
||||
purchase_item_id?: number;
|
||||
product_id?: number;
|
||||
warehouse_id?: number;
|
||||
@@ -103,12 +101,14 @@ export type UpdateStaffApprovalRequestPayload = {
|
||||
};
|
||||
|
||||
export type CreateManagerApprovalRequestPayload = {
|
||||
action: 'APPROVED' | 'REJECTED';
|
||||
notes?: string | null;
|
||||
};
|
||||
|
||||
export type CreateAcceptApprovalRequestPayload = {
|
||||
notes?: string;
|
||||
items: {
|
||||
action: 'APPROVED' | 'REJECTED';
|
||||
notes?: string | null;
|
||||
items?: {
|
||||
purchase_item_id: number;
|
||||
received_date: string;
|
||||
travel_number: string;
|
||||
@@ -117,7 +117,6 @@ export type CreateAcceptApprovalRequestPayload = {
|
||||
expedition_vendor_id: number;
|
||||
received_qty: number;
|
||||
transport_per_item: number;
|
||||
transport_total: number;
|
||||
}[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user