mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +00:00
Merge branch 'development' into feat/FE/US-163/TASK-188-193-198-slicing-expense-request-form
This commit is contained in:
Vendored
-12
@@ -12,15 +12,3 @@ export type CreateFlockPayload = {
|
||||
};
|
||||
|
||||
export type UpdateFlockPayload = CreateFlockPayload;
|
||||
|
||||
// ---------------------------------------
|
||||
// TODO: adjust this later after Transfer to Laying API done
|
||||
import { BaseKandang } from '@/types/api/master-data/kandang';
|
||||
|
||||
export type FlockWithKandangs = BaseFlock & {
|
||||
totalQuantity: number;
|
||||
kandangs: {
|
||||
kandang: BaseKandang;
|
||||
quantity: number;
|
||||
}[];
|
||||
};
|
||||
|
||||
+1
@@ -8,6 +8,7 @@ export type BaseKandang = {
|
||||
status: string;
|
||||
location: BaseLocation;
|
||||
pic: BaseUser;
|
||||
capacity: number;
|
||||
};
|
||||
|
||||
export type Kandang = BaseMetadata & BaseKandang;
|
||||
|
||||
+14
-1
@@ -8,6 +8,7 @@ import { BaseApproval, BaseMetadata } from '@/types/api/api-general';
|
||||
export type BaseProjectFlock = {
|
||||
id: number;
|
||||
name: string;
|
||||
flock_name: string;
|
||||
status: string;
|
||||
flock: Flock;
|
||||
flock_id: number;
|
||||
@@ -20,7 +21,9 @@ export type BaseProjectFlock = {
|
||||
location_id: number;
|
||||
period: number;
|
||||
kandang_ids: number[];
|
||||
kandangs: Kandang[];
|
||||
kandangs: (Kandang & {
|
||||
project_flock_kandang_id: number;
|
||||
})[];
|
||||
approval: BaseApproval;
|
||||
};
|
||||
|
||||
@@ -47,3 +50,13 @@ export type ProjectFlockApprovalPayload = {
|
||||
action: 'APPROVED' | 'REJECTED';
|
||||
approvable_ids: number[];
|
||||
};
|
||||
|
||||
export type ProjectFlockAvailableQuantity = {
|
||||
project_flock_id: number;
|
||||
flock_name: string;
|
||||
category: 'LAYING' | 'GROWING';
|
||||
kandangs: {
|
||||
project_flock_kandang_id: number;
|
||||
available_qty: number;
|
||||
}[];
|
||||
};
|
||||
|
||||
+69
-15
@@ -1,34 +1,88 @@
|
||||
import { BaseApiResponse, BaseMetadata, flags } from '@/types/api/api-general';
|
||||
import { Kandang } from '@/types/api/master-data/kandang';
|
||||
import {
|
||||
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 = {
|
||||
id: number;
|
||||
transfer_number: string;
|
||||
transfer_date: string;
|
||||
flock_source: {
|
||||
notes: string;
|
||||
from_project_flock: {
|
||||
id: number;
|
||||
name: string;
|
||||
flock_name: string;
|
||||
category: 'GROWING' | 'LAYING';
|
||||
};
|
||||
flock_destination: {
|
||||
to_project_flock: {
|
||||
id: number;
|
||||
name: string;
|
||||
flock_name: string;
|
||||
category: 'GROWING' | 'LAYING';
|
||||
};
|
||||
quantity: number;
|
||||
kandangs: {
|
||||
kandang: Kandang;
|
||||
quantity: number;
|
||||
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;
|
||||
name: string;
|
||||
};
|
||||
warehouse: {
|
||||
id: number;
|
||||
name: string;
|
||||
type: WarehouseType;
|
||||
};
|
||||
};
|
||||
}[];
|
||||
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 CreateTransferToLayingPayload = {
|
||||
transfer_date: string;
|
||||
flock_source_id: number;
|
||||
flock_destination_id: number;
|
||||
source_project_flock_id: number;
|
||||
target_project_flock_id: number;
|
||||
totalQuantity: number;
|
||||
kandangs: {
|
||||
kandang_id: number;
|
||||
source_kandangs: {
|
||||
project_flock_kandang_id: number;
|
||||
quantity: number;
|
||||
}[];
|
||||
target_kandangs: {
|
||||
project_flock_kandang_id: number;
|
||||
quantity: number;
|
||||
}[];
|
||||
reason: string;
|
||||
|
||||
Reference in New Issue
Block a user