mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +00:00
feat(FE-43): add Supplier API and data types for supplier management
This commit is contained in:
@@ -34,6 +34,11 @@ import {
|
|||||||
Product,
|
Product,
|
||||||
UpdateProductPayload,
|
UpdateProductPayload,
|
||||||
} from '@/types/api/master-data/product';
|
} from '@/types/api/master-data/product';
|
||||||
|
import {
|
||||||
|
CreateSupplierPayload,
|
||||||
|
Supplier,
|
||||||
|
UpdateSupplierPayload,
|
||||||
|
} from '@/types/api/master-data/supplier';
|
||||||
|
|
||||||
export const UomApi = new BaseApiService<
|
export const UomApi = new BaseApiService<
|
||||||
Uom,
|
Uom,
|
||||||
@@ -76,3 +81,9 @@ export const ProductApi = new BaseApiService<
|
|||||||
CreateProductPayload,
|
CreateProductPayload,
|
||||||
UpdateProductPayload
|
UpdateProductPayload
|
||||||
>('/master-data/products');
|
>('/master-data/products');
|
||||||
|
|
||||||
|
export const SupplierApi = new BaseApiService<
|
||||||
|
Supplier,
|
||||||
|
CreateSupplierPayload,
|
||||||
|
UpdateSupplierPayload
|
||||||
|
>('/master-data/suppliers');
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
import { BaseMetadata } from '@/types/api/api-general';
|
||||||
|
|
||||||
|
export type BaseSupplier = {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
alias: string;
|
||||||
|
category: string;
|
||||||
|
pic: string;
|
||||||
|
type: string;
|
||||||
|
phone: string;
|
||||||
|
email: string;
|
||||||
|
address: string;
|
||||||
|
account_number: string;
|
||||||
|
balance: number;
|
||||||
|
due_date: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Supplier = BaseMetadata & BaseSupplier;
|
||||||
|
|
||||||
|
export type CreateSupplierPayload = {
|
||||||
|
name: string;
|
||||||
|
alias: string;
|
||||||
|
category: string;
|
||||||
|
pic: string;
|
||||||
|
type: string;
|
||||||
|
phone: string;
|
||||||
|
email: string;
|
||||||
|
address: string;
|
||||||
|
account_number: string;
|
||||||
|
balance: number;
|
||||||
|
due_date: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdateSupplierPayload = CreateSupplierPayload;
|
||||||
Reference in New Issue
Block a user