mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
chore(FE-41): refactor nonstock type
This commit is contained in:
+13
-8
@@ -1,18 +1,23 @@
|
|||||||
import { BaseApiResponse } from '@/types/api/api-general';
|
import { BaseApiResponse, BaseMetadata, flags } from '@/types/api/api-general';
|
||||||
|
import { BaseUom } from '@/types/api/master-data/uom';
|
||||||
|
import { BaseSupplier } from '@/types/api/master-data/supplier';
|
||||||
|
|
||||||
export type Nonstock = {
|
export type BaseNonstock = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
uom_id: number;
|
||||||
|
uom: BaseUom;
|
||||||
|
suppliers: BaseSupplier[];
|
||||||
|
flags: flags[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type Nonstock = BaseMetadata & BaseNonstock;
|
||||||
|
|
||||||
export type CreateNonstockPayload = {
|
export type CreateNonstockPayload = {
|
||||||
name: string;
|
name: string;
|
||||||
|
uom_id: number;
|
||||||
|
supplier_ids: number[];
|
||||||
|
flags: flags[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateNonstockPayload = CreateNonstockPayload;
|
export type UpdateNonstockPayload = CreateNonstockPayload;
|
||||||
|
|
||||||
export type NonstockResponse = BaseApiResponse<Nonstock>;
|
|
||||||
|
|
||||||
export type NonstocksResponse = BaseApiResponse<Nonstock[]>;
|
|
||||||
|
|
||||||
export type DeleteNonstockResponse = BaseApiResponse;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user