mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Refactor code formatting for consistency and readability
This commit is contained in:
@@ -49,8 +49,7 @@ const ClosingDetailPage = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const isLoading =
|
||||
isLoadingClosing || isLoadingProject || isLoadingKandang;
|
||||
const isLoading = isLoadingClosing || isLoadingProject || isLoadingKandang;
|
||||
|
||||
return (
|
||||
<div className='w-full p-4 flex flex-row justify-center'>
|
||||
|
||||
@@ -9,9 +9,7 @@ import ClosingGeneralInformationTable from '@/components/pages/closing/table/Clo
|
||||
import SapronakClosingTab from '@/components/pages/closing/tab/SapronakClosingTab';
|
||||
import ProductionDataClosingTab from '@/components/pages/closing/tab/ProductionDataClosingTab';
|
||||
|
||||
import {
|
||||
ClosingGeneralInformation,
|
||||
} from '@/types/api/closing';
|
||||
import { ClosingGeneralInformation } from '@/types/api/closing';
|
||||
import SapronakCalculationClosingTab from '@/components/pages/closing/tab/SapronakCalculationClosingTab';
|
||||
import OverheadClosingTab from '@/components/pages/closing/tab/OverheadClosingTab';
|
||||
import FinanceClosingTab from '@/components/pages/closing/tab/FinanceClosingTab';
|
||||
|
||||
@@ -4,14 +4,10 @@ interface SalesClosingTabProps {
|
||||
projectFlockId: number;
|
||||
}
|
||||
|
||||
const SalesClosingTab = ({
|
||||
projectFlockId,
|
||||
}: SalesClosingTabProps) => {
|
||||
const SalesClosingTab = ({ projectFlockId }: SalesClosingTabProps) => {
|
||||
return (
|
||||
<div className='flex flex-col gap-4'>
|
||||
{projectFlockId && (
|
||||
<SalesClosingTable projectFlockId={projectFlockId} />
|
||||
)}
|
||||
{projectFlockId && <SalesClosingTable projectFlockId={projectFlockId} />}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -22,9 +22,7 @@ interface SalesClosingTableProps {
|
||||
projectFlockId: number;
|
||||
}
|
||||
|
||||
const SalesClosingTable = ({
|
||||
projectFlockId,
|
||||
}: SalesClosingTableProps) => {
|
||||
const SalesClosingTable = ({ projectFlockId }: SalesClosingTableProps) => {
|
||||
const searchParams = useSearchParams();
|
||||
const kandangId = searchParams.get('kandangId');
|
||||
|
||||
@@ -34,10 +32,7 @@ const SalesClosingTable = ({
|
||||
: `/closing/sales/${projectFlockId}`,
|
||||
() =>
|
||||
kandangId
|
||||
? ClosingApi.getPenjualanByKandang(
|
||||
projectFlockId,
|
||||
Number(kandangId)
|
||||
)
|
||||
? ClosingApi.getPenjualanByKandang(projectFlockId, Number(kandangId))
|
||||
: ClosingApi.getPenjualan(projectFlockId)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user