chore(FE-41): refactor nonstock type

This commit is contained in:
ValdiANS
2025-10-08 14:58:54 +07:00
parent 0e49e29002
commit 143d640a1e
+13 -8
View File
@@ -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;
name: string;
uom_id: number;
uom: BaseUom;
suppliers: BaseSupplier[];
flags: flags[];
};
export type Nonstock = BaseMetadata & BaseNonstock;
export type CreateNonstockPayload = {
name: string;
uom_id: number;
supplier_ids: number[];
flags: flags[];
};
export type UpdateNonstockPayload = CreateNonstockPayload;
export type NonstockResponse = BaseApiResponse<Nonstock>;
export type NonstocksResponse = BaseApiResponse<Nonstock[]>;
export type DeleteNonstockResponse = BaseApiResponse;