mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 23:05:46 +00:00
refactor(FE-345): Rename CostOfRevenueExpedition to HppExpedition
This commit is contained in:
@@ -55,7 +55,7 @@ const ClosingDetailPage = () => {
|
|||||||
id={Number(closingId)}
|
id={Number(closingId)}
|
||||||
initialValue={closing.data}
|
initialValue={closing.data}
|
||||||
salesData={isResponseSuccess(salesData) ? salesData.data : undefined}
|
salesData={isResponseSuccess(salesData) ? salesData.data : undefined}
|
||||||
costOfRevenueExpeditionData={
|
hppExpeditionData={
|
||||||
isResponseSuccess(hppEkspedisiData)
|
isResponseSuccess(hppEkspedisiData)
|
||||||
? hppEkspedisiData.data
|
? hppEkspedisiData.data
|
||||||
: undefined
|
: undefined
|
||||||
|
|||||||
@@ -10,26 +10,26 @@ import ClosingGeneralInformationTable from '@/components/pages/closing/ClosingGe
|
|||||||
import {
|
import {
|
||||||
ClosingGeneralInformation,
|
ClosingGeneralInformation,
|
||||||
BaseClosingSales,
|
BaseClosingSales,
|
||||||
BaseClosingCostOfRevenueExpedition,
|
ClosingHppExpedition,
|
||||||
} from '@/types/api/closing';
|
} from '@/types/api/closing';
|
||||||
import ClosingSapronakTabContent from './ClosingSapronakTabContent';
|
import ClosingSapronakTabContent from './ClosingSapronakTabContent';
|
||||||
import ClosingSapronakCalculationTabContent from '@/components/pages/closing/ClosingSapronakCalculationTabContent';
|
import ClosingSapronakCalculationTabContent from '@/components/pages/closing/ClosingSapronakCalculationTabContent';
|
||||||
import ClosingOverheadTabContent from '@/components/pages/closing/ClosingOverheadTabContent';
|
import ClosingOverheadTabContent from '@/components/pages/closing/ClosingOverheadTabContent';
|
||||||
import SalesReportTable from './sale/SalesReportTable';
|
import SalesReportTable from './sale/SalesReportTable';
|
||||||
import CostOfRevenueExpeditionReportTable from './hpp-ekspedisi/CostOfRevenueExpeditionReportTable';
|
import HppExpeditionReportTable from './hpp-ekspedisi/HppExpeditionReportTable';
|
||||||
|
|
||||||
interface ClosingDetailProps {
|
interface ClosingDetailProps {
|
||||||
id: number;
|
id: number;
|
||||||
initialValue?: ClosingGeneralInformation;
|
initialValue?: ClosingGeneralInformation;
|
||||||
salesData?: BaseClosingSales;
|
salesData?: BaseClosingSales;
|
||||||
costOfRevenueExpeditionData?: BaseClosingCostOfRevenueExpedition;
|
hppExpeditionData?: ClosingHppExpedition;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ClosingDetail: React.FC<ClosingDetailProps> = ({
|
const ClosingDetail: React.FC<ClosingDetailProps> = ({
|
||||||
id,
|
id,
|
||||||
initialValue,
|
initialValue,
|
||||||
salesData,
|
salesData,
|
||||||
costOfRevenueExpeditionData,
|
hppExpeditionData,
|
||||||
}) => {
|
}) => {
|
||||||
const [activeTab, setActiveTab] = useState<string>('sapronak');
|
const [activeTab, setActiveTab] = useState<string>('sapronak');
|
||||||
|
|
||||||
@@ -58,11 +58,7 @@ const ClosingDetail: React.FC<ClosingDetailProps> = ({
|
|||||||
{
|
{
|
||||||
id: 'hppEkspedisi',
|
id: 'hppEkspedisi',
|
||||||
label: 'HPP Ekspedisi',
|
label: 'HPP Ekspedisi',
|
||||||
content: (
|
content: <HppExpeditionReportTable initialValues={hppExpeditionData} />,
|
||||||
<CostOfRevenueExpeditionReportTable
|
|
||||||
initialValues={costOfRevenueExpeditionData}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'dataProduksi',
|
id: 'dataProduksi',
|
||||||
|
|||||||
+4
-4
@@ -7,15 +7,15 @@ import Card from '@/components/Card';
|
|||||||
import { formatCurrency } from '@/lib/helper';
|
import { formatCurrency } from '@/lib/helper';
|
||||||
import { BaseHppExpedition, BaseExpeditionCost } from '@/types/api/closing';
|
import { BaseHppExpedition, BaseExpeditionCost } from '@/types/api/closing';
|
||||||
|
|
||||||
interface CostOfRevenueExpeditionReportTableProps {
|
interface HppExpeditionReportTableProps {
|
||||||
type?: 'detail';
|
type?: 'detail';
|
||||||
initialValues?: BaseHppExpedition;
|
initialValues?: BaseHppExpedition;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CostOfRevenueExpeditionReportTable = ({
|
const HppExpeditionReportTable = ({
|
||||||
type = 'detail',
|
type = 'detail',
|
||||||
initialValues,
|
initialValues,
|
||||||
}: CostOfRevenueExpeditionReportTableProps) => {
|
}: HppExpeditionReportTableProps) => {
|
||||||
const costOfRevenueExpeditionData: BaseExpeditionCost[] = useMemo(() => {
|
const costOfRevenueExpeditionData: BaseExpeditionCost[] = useMemo(() => {
|
||||||
return initialValues?.expedition_costs || [];
|
return initialValues?.expedition_costs || [];
|
||||||
}, [initialValues]);
|
}, [initialValues]);
|
||||||
@@ -107,4 +107,4 @@ const CostOfRevenueExpeditionReportTable = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CostOfRevenueExpeditionReportTable;
|
export default HppExpeditionReportTable;
|
||||||
Reference in New Issue
Block a user