mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +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,
|
||||
UpdateProductPayload,
|
||||
} from '@/types/api/master-data/product';
|
||||
import {
|
||||
CreateSupplierPayload,
|
||||
Supplier,
|
||||
UpdateSupplierPayload,
|
||||
} from '@/types/api/master-data/supplier';
|
||||
|
||||
export const UomApi = new BaseApiService<
|
||||
Uom,
|
||||
@@ -76,3 +81,9 @@ export const ProductApi = new BaseApiService<
|
||||
CreateProductPayload,
|
||||
UpdateProductPayload
|
||||
>('/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