Merge branch 'fix/FE/US-163-164/api-integration-adjustment-in-expense-request-and-realization' into 'development'

[FIX/FE][US#163-164] API Integration Adjustment in Expense Request and Realization

See merge request mbugroup/lti-web-client!78
This commit is contained in:
Adnan Zahir
2025-12-10 11:32:21 +07:00
12 changed files with 110 additions and 120 deletions
+14 -20
View File
@@ -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;
}[];
};