mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
chore(FE-199): adjust Expense type
This commit is contained in:
Vendored
+39
-2
@@ -1,14 +1,51 @@
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
import { Location } from '@/types/api/master-data/location';
|
||||
import { Kandang } from '@/types/api/master-data/kandang';
|
||||
import { Supplier } from '@/types/api/master-data/supplier';
|
||||
import { Nonstock } from '@/types/api/master-data/nonstock';
|
||||
|
||||
export type BaseExpense = {
|
||||
id: number;
|
||||
name: string;
|
||||
location: Location;
|
||||
transaction_date: string;
|
||||
realization_date?: string;
|
||||
kandangs: Kandang[];
|
||||
vendor: Supplier;
|
||||
request_documents: {
|
||||
name: string;
|
||||
url: string;
|
||||
}[];
|
||||
kandang_expenses: {
|
||||
kandang: Kandang;
|
||||
expenses: {
|
||||
nonstock: Nonstock;
|
||||
total_quantity: number;
|
||||
total_expense: number;
|
||||
notes?: string;
|
||||
}[];
|
||||
}[];
|
||||
nominal: number;
|
||||
paid?: number;
|
||||
remaining_cost?: number;
|
||||
};
|
||||
|
||||
export type Expense = BaseMetadata & BaseExpense;
|
||||
|
||||
export type CreateExpensePayload = {
|
||||
name: string;
|
||||
locationId: number;
|
||||
transaction_date: string;
|
||||
kandangIds: number[];
|
||||
vendorId: number;
|
||||
request_documents: File[];
|
||||
kandang_expenses: {
|
||||
kandangId: number;
|
||||
expenses: {
|
||||
nonstockId: number;
|
||||
total_quantity: number;
|
||||
total_expense: number;
|
||||
notes?: string;
|
||||
}[];
|
||||
}[];
|
||||
};
|
||||
|
||||
export type UpdateExpensePayload = CreateExpensePayload;
|
||||
|
||||
Reference in New Issue
Block a user