Merge branch 'hot-fix/closing-finance-kandang' into 'development'

[FIX/FE] Hotfix Closing Finance Kandang

See merge request mbugroup/lti-web-client!195
This commit is contained in:
Rivaldi A N S
2026-01-16 15:02:10 +00:00
6 changed files with 18 additions and 29 deletions
-2
View File
@@ -24,8 +24,6 @@ const FinanceDetailPage = () => {
);
}
console.log(finance);
// if (!finance || isResponseError(finance)) {
// router.replace('/404');
// return;
@@ -44,7 +44,7 @@ const ClosingFinanceTable = ({
return [customItems, ...purchases, totalBudgeting, ...overheads];
}
return [];
}, []);
}, [finance]);
const profitLossTableData: ProfitLossItem[] = useMemo(() => {
if (isResponseSuccess(finance)) {
@@ -78,7 +78,7 @@ const ClosingFinanceTable = ({
return [...incomes, ...purchases, grossProfit, ...overheads, subtotal];
}
return [];
}, []);
}, [finance]);
return (
<div className='flex flex-col gap-4'>
@@ -112,7 +112,6 @@ const ClosingFinanceTable = ({
</div>
</div>
</Card>
{JSON.stringify(finance)}
<Card
title='HPP Purchases'
variant='bordered'
@@ -118,8 +118,6 @@ const DashboardProduction = () => {
} as DashboardFilterType,
validationSchema: getDashboardFilterSchema(analysisMode),
onSubmit: (values) => {
console.log(values);
handleApplyFilter({
start_date: values.startDate || '',
end_date: values.endDate || '',
@@ -139,8 +137,6 @@ const DashboardProduction = () => {
};
const handleApplyFilter = (values: DashboardFilter) => {
console.log(values);
// Build query params object, only include non-empty values
const params: Record<string, string> = {};
@@ -156,7 +152,6 @@ const DashboardProduction = () => {
if (values.comparison_type) params.comparison_type = values.comparison_type;
setEndpointUrl(`/dashboards?${new URLSearchParams(params).toString()}`);
console.log(endpointUrl);
filterModal.closeModal();
refreshDashboardProductionData();
};
@@ -557,15 +557,12 @@ const ProjectFlockForm = ({
};
const onDeleteBudgetRowHandler = (nonstock_id: number, index?: number) => {
console.log(`nonstock_id: ${nonstock_id}, index: ${index}`);
if (!nonstock_id) {
const updatedBudgets = formik.values.project_budgets
.map((budget, i) => {
if (i == index) {
console.log(`buget: ${null}, index: ${index}, i: ${i}`);
return null;
} else {
console.log(`buget: ${budget}, index: ${index}, i: ${i}`);
return budget;
}
})
@@ -168,7 +168,7 @@ const DailyMarketingsTable = ({
];
useEffect(() => {
console.log({ sorting });
// console.log({ sorting });
if (sorting.length === 1) {
onFilterByChange(sorting[0].id);
@@ -601,15 +601,15 @@ export function DailyChecklistContent() {
) => {
const taskId = taskIdsByPhaseActivityId[activityId];
console.log('[CHECKBOX] Click detected:', {
activityId,
employeeId,
checked,
taskId,
hasTaskId: !!taskId,
checklistStatus,
isEditable,
});
// console.log('[CHECKBOX] Click detected:', {
// activityId,
// employeeId,
// checked,
// taskId,
// hasTaskId: !!taskId,
// checklistStatus,
// isEditable,
// });
if (!taskId) {
console.error('[CHECKBOX] No taskId found for activityId:', activityId);
@@ -638,10 +638,10 @@ export function DailyChecklistContent() {
},
},
};
console.log(
'[CHECKBOX] State updated optimistically:',
updated[taskId]?.[employeeId]
);
// console.log(
// '[CHECKBOX] State updated optimistically:',
// updated[taskId]?.[employeeId]
// );
return updated;
});
@@ -653,7 +653,7 @@ export function DailyChecklistContent() {
note: assignments[taskId]?.[employeeId]?.note || null,
};
console.log('[CHECKBOX] Saving to database:', payload);
// console.log('[CHECKBOX] Saving to database:', payload);
const checkOrUncheckAssignmentRes =
await DailyChecklistApi.checkOrUncheckAssignment(payload);
@@ -679,7 +679,7 @@ export function DailyChecklistContent() {
return;
}
console.log('[CHECKBOX] Saved successfully');
// console.log('[CHECKBOX] Saved successfully');
};
const handleNoteChange = async (