mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 22:05:45 +00:00
refactor: update CreateExpensePayload, UpdateExpensePayload, and CreateExpenseRealizationPayload types
This commit is contained in:
Vendored
+14
-20
@@ -18,7 +18,7 @@ export type BaseExpense = {
|
||||
id: number;
|
||||
path: string;
|
||||
}[];
|
||||
expense_date: string;
|
||||
transaction_date: string;
|
||||
realization_date?: string;
|
||||
grand_total: number;
|
||||
location: BaseLocation;
|
||||
@@ -29,28 +29,23 @@ export type BaseExpense = {
|
||||
name: string;
|
||||
pengajuans?: {
|
||||
id: number;
|
||||
expense_id: number;
|
||||
kandang_id: number;
|
||||
nonstock_id: number;
|
||||
qty: number;
|
||||
unit_price: number;
|
||||
total_price: number;
|
||||
price: number;
|
||||
note?: string;
|
||||
nonstock: Pick<BaseNonstock, 'id' | 'name' | 'flags'>;
|
||||
project_flock_kandang: {
|
||||
id: number;
|
||||
kandang_id: number;
|
||||
};
|
||||
created_at: string;
|
||||
}[];
|
||||
realisasi?: {
|
||||
id: number;
|
||||
expense_nonstock_id: number;
|
||||
qty: number;
|
||||
unit_price: number;
|
||||
total_price: number;
|
||||
date: string;
|
||||
price: number;
|
||||
note?: string;
|
||||
nonstock: Pick<BaseNonstock, 'id' | 'name' | 'flags'>;
|
||||
project_flock_kandang: {
|
||||
id: number;
|
||||
kandang_id: number;
|
||||
};
|
||||
created_at: string;
|
||||
}[];
|
||||
}[];
|
||||
total_pengajuan: number;
|
||||
@@ -65,12 +60,12 @@ export type CreateExpensePayload = {
|
||||
transaction_date: string;
|
||||
supplier_id: number;
|
||||
documents: File[];
|
||||
cost_per_kandangs: {
|
||||
expense_nonstocks: {
|
||||
kandang_id: number;
|
||||
cost_items: {
|
||||
nonstock_id: number;
|
||||
quantity: number;
|
||||
total_cost: number;
|
||||
price: number;
|
||||
notes: string;
|
||||
}[];
|
||||
}[];
|
||||
@@ -81,12 +76,12 @@ export type UpdateExpensePayload = {
|
||||
transaction_date: string;
|
||||
supplier_id: number;
|
||||
documents: File[];
|
||||
cost_per_kandang: {
|
||||
expense_nonstocks: {
|
||||
kandang_id: number;
|
||||
cost_items: {
|
||||
nonstock_id: number;
|
||||
quantity: number;
|
||||
total_cost: number;
|
||||
price: number;
|
||||
notes: string;
|
||||
}[];
|
||||
}[];
|
||||
@@ -98,8 +93,7 @@ export type CreateExpenseRealizationPayload = {
|
||||
realizations: {
|
||||
expense_nonstock_id: number;
|
||||
qty: number;
|
||||
unit_price: number;
|
||||
total_price: number;
|
||||
price: number;
|
||||
notes: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user