mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
refactor(FE-335): Rename expedition HPP types and update usages
This commit is contained in:
@@ -5,24 +5,20 @@ import { ColumnDef } from '@tanstack/react-table';
|
||||
import Table from '@/components/Table';
|
||||
import Card from '@/components/Card';
|
||||
import { formatCurrency } from '@/lib/helper';
|
||||
import {
|
||||
BaseClosingCostOfRevenueExpedition,
|
||||
BaseCostOfRevenueExpedition,
|
||||
} from '@/types/api/closing';
|
||||
import { BaseHppExpedition, BaseExpeditionCost } from '@/types/api/closing';
|
||||
|
||||
interface CostOfRevenueExpeditionReportTableProps {
|
||||
type?: 'detail';
|
||||
initialValues?: BaseClosingCostOfRevenueExpedition;
|
||||
initialValues?: BaseHppExpedition;
|
||||
}
|
||||
|
||||
const CostOfRevenueExpeditionReportTable = ({
|
||||
type = 'detail',
|
||||
initialValues,
|
||||
}: CostOfRevenueExpeditionReportTableProps) => {
|
||||
const costOfRevenueExpeditionData: BaseCostOfRevenueExpedition[] =
|
||||
useMemo(() => {
|
||||
return initialValues?.expedition_costs || [];
|
||||
}, [initialValues]);
|
||||
const costOfRevenueExpeditionData: BaseExpeditionCost[] = useMemo(() => {
|
||||
return initialValues?.expedition_costs || [];
|
||||
}, [initialValues]);
|
||||
|
||||
const totals = useMemo(() => {
|
||||
const totalHpp = initialValues?.total_hpp_amount || 0;
|
||||
@@ -32,7 +28,7 @@ const CostOfRevenueExpeditionReportTable = ({
|
||||
};
|
||||
}, [initialValues]);
|
||||
|
||||
const costOfRevenueExpeditionColumns: ColumnDef<BaseCostOfRevenueExpedition>[] =
|
||||
const costOfRevenueExpeditionColumns: ColumnDef<BaseExpeditionCost>[] =
|
||||
useMemo(
|
||||
() => [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user