mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
feat(FE-149): adjust BaseTransferToLaying and CreateTransferToLayingPayload structure based on the API
This commit is contained in:
+67
-13
@@ -1,34 +1,88 @@
|
|||||||
import { BaseApiResponse, BaseMetadata, flags } from '@/types/api/api-general';
|
import {
|
||||||
import { Kandang } from '@/types/api/master-data/kandang';
|
BaseApiResponse,
|
||||||
|
BaseMetadata,
|
||||||
|
CreatedUser,
|
||||||
|
flags,
|
||||||
|
} from '@/types/api/api-general';
|
||||||
|
import { BaseKandang, Kandang } from '@/types/api/master-data/kandang';
|
||||||
|
import { WarehouseType } from '@/types/api/master-data/warehouse';
|
||||||
|
|
||||||
export type BaseTransferToLaying = {
|
export type BaseTransferToLaying = {
|
||||||
id: number;
|
id: number;
|
||||||
|
transfer_number: string;
|
||||||
transfer_date: string;
|
transfer_date: string;
|
||||||
flock_source: {
|
notes: string;
|
||||||
|
from_project_flock: {
|
||||||
|
id: number;
|
||||||
|
flock_name: string;
|
||||||
|
category: 'GROWING' | 'LAYING';
|
||||||
|
};
|
||||||
|
to_project_flock: {
|
||||||
|
id: number;
|
||||||
|
flock_name: string;
|
||||||
|
category: 'GROWING' | 'LAYING';
|
||||||
|
};
|
||||||
|
pending_usage_qty: number | null;
|
||||||
|
usage_qty: number | null;
|
||||||
|
|
||||||
|
sources: {
|
||||||
|
source_project_flock_kandang: {
|
||||||
|
id: number;
|
||||||
|
kandang: Omit<BaseKandang, 'status' | 'location' | 'pic'>;
|
||||||
|
};
|
||||||
|
qty: number;
|
||||||
|
product_warehouse: {
|
||||||
|
product: {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
};
|
};
|
||||||
flock_destination: {
|
warehouse: {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
type: WarehouseType;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
quantity: number;
|
|
||||||
kandangs: {
|
|
||||||
kandang: Kandang;
|
|
||||||
quantity: number;
|
|
||||||
}[];
|
}[];
|
||||||
reason: string;
|
|
||||||
|
targets: {
|
||||||
|
target_project_flock_kandang: {
|
||||||
|
id: number;
|
||||||
|
kandang: Omit<BaseKandang, 'status' | 'location' | 'pic'>;
|
||||||
|
};
|
||||||
|
qty: number;
|
||||||
|
product_warehouse: {
|
||||||
|
product: {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
warehouse: {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
type: WarehouseType;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}[];
|
||||||
|
|
||||||
|
created_by: number;
|
||||||
|
created_user: CreatedUser;
|
||||||
|
created_at: string;
|
||||||
|
|
||||||
|
approval: BaseApproval;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TransferToLaying = BaseMetadata & BaseTransferToLaying;
|
export type TransferToLaying = BaseMetadata & BaseTransferToLaying;
|
||||||
|
|
||||||
export type CreateTransferToLayingPayload = {
|
export type CreateTransferToLayingPayload = {
|
||||||
transfer_date: string;
|
transfer_date: string;
|
||||||
flock_source_id: number;
|
source_project_flock_id: number;
|
||||||
flock_destination_id: number;
|
target_project_flock_id: number;
|
||||||
totalQuantity: number;
|
totalQuantity: number;
|
||||||
kandangs: {
|
source_kandangs: {
|
||||||
kandang_id: number;
|
project_flock_kandang_id: number;
|
||||||
|
quantity: number;
|
||||||
|
}[];
|
||||||
|
target_kandangs: {
|
||||||
|
project_flock_kandang_id: number;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
}[];
|
}[];
|
||||||
reason: string;
|
reason: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user