mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 23:35:45 +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 { 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 = {
|
export type BaseExpense = {
|
||||||
id: number;
|
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 Expense = BaseMetadata & BaseExpense;
|
||||||
|
|
||||||
export type CreateExpensePayload = {
|
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;
|
export type UpdateExpensePayload = CreateExpensePayload;
|
||||||
|
|||||||
Reference in New Issue
Block a user