mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 06:45:46 +00:00
refactor(FE-363): Rename SupplierWithItems type for clarity
This commit is contained in:
@@ -15,7 +15,7 @@ import Table from '@/components/Table';
|
|||||||
import { ColumnDef } from '@tanstack/react-table';
|
import { ColumnDef } from '@tanstack/react-table';
|
||||||
import { formatCurrency, formatDate } from '@/lib/helper';
|
import { formatCurrency, formatDate } from '@/lib/helper';
|
||||||
import {
|
import {
|
||||||
SupplierWithItems,
|
LogisticPurchasePerSupplier,
|
||||||
LogisticPurchasePerSupplierItems,
|
LogisticPurchasePerSupplierItems,
|
||||||
} from '@/types/api/report/logistic-stock';
|
} from '@/types/api/report/logistic-stock';
|
||||||
import { isResponseSuccess } from '@/lib/api-helper';
|
import { isResponseSuccess } from '@/lib/api-helper';
|
||||||
@@ -149,8 +149,8 @@ const PurchasesPerSupplierTab = () => {
|
|||||||
LogisticService.getAllFetcher
|
LogisticService.getAllFetcher
|
||||||
);
|
);
|
||||||
|
|
||||||
const data: SupplierWithItems[] = isResponseSuccess(response)
|
const data: LogisticPurchasePerSupplier[] = isResponseSuccess(response)
|
||||||
? (response?.data as unknown as SupplierWithItems[])
|
? (response?.data as unknown as LogisticPurchasePerSupplier[])
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const getTableColumns = (
|
const getTableColumns = (
|
||||||
|
|||||||
+2
-2
@@ -20,12 +20,12 @@ export type LogisticPurchasePerSupplierItems = {
|
|||||||
travel_number: string;
|
travel_number: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type SupplierWithItems = {
|
export type LogisticPurchasePerSupplier = {
|
||||||
id: number;
|
id: number;
|
||||||
supplier: Supplier;
|
supplier: Supplier;
|
||||||
items: LogisticPurchasePerSupplierItems[];
|
items: LogisticPurchasePerSupplierItems[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LogisticPurchasePerSupplierReport = BaseMetadata & {
|
export type LogisticPurchasePerSupplierReport = BaseMetadata & {
|
||||||
data: SupplierWithItems[];
|
data: LogisticPurchasePerSupplier[];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user