mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
chore: remove unnecessary code
This commit is contained in:
@@ -190,8 +190,6 @@ const DailyMarketingsTable = ({
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
// console.log({ sorting });
|
||||
|
||||
if (sorting.length === 1) {
|
||||
onFilterByChange(sorting[0].id);
|
||||
onSortByChange(sorting[0].desc ? 'desc' : 'asc');
|
||||
|
||||
@@ -658,16 +658,6 @@ export function DailyChecklistContent() {
|
||||
) => {
|
||||
const taskId = taskIdsByPhaseActivityId[activityId];
|
||||
|
||||
// console.log('[CHECKBOX] Click detected:', {
|
||||
// activityId,
|
||||
// employeeId,
|
||||
// checked,
|
||||
// taskId,
|
||||
// hasTaskId: !!taskId,
|
||||
// checklistStatus,
|
||||
// isChecklistStatusDraft,
|
||||
// });
|
||||
|
||||
if (!taskId) {
|
||||
console.error('[CHECKBOX] No taskId found for activityId:', activityId);
|
||||
console.error('[CHECKBOX] Available taskIds:', taskIdsByPhaseActivityId);
|
||||
@@ -695,10 +685,7 @@ export function DailyChecklistContent() {
|
||||
},
|
||||
},
|
||||
};
|
||||
// console.log(
|
||||
// '[CHECKBOX] State updated optimistically:',
|
||||
// updated[taskId]?.[employeeId]
|
||||
// );
|
||||
|
||||
return updated;
|
||||
});
|
||||
|
||||
@@ -710,8 +697,6 @@ export function DailyChecklistContent() {
|
||||
note: assignments[taskId]?.[employeeId]?.note || null,
|
||||
};
|
||||
|
||||
// console.log('[CHECKBOX] Saving to database:', payload);
|
||||
|
||||
const checkOrUncheckAssignmentRes =
|
||||
await DailyChecklistApi.checkOrUncheckAssignment(payload);
|
||||
|
||||
@@ -735,8 +720,6 @@ export function DailyChecklistContent() {
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log('[CHECKBOX] Saved successfully');
|
||||
};
|
||||
|
||||
const handleNoteChange = async (
|
||||
@@ -1247,8 +1230,6 @@ export function DailyChecklistContent() {
|
||||
})
|
||||
);
|
||||
|
||||
console.log(activities);
|
||||
|
||||
activities.forEach((activity, index) => {
|
||||
const taskId =
|
||||
taskIdsByPhaseActivityId[activity.id];
|
||||
|
||||
+3
-5
@@ -17,7 +17,7 @@ import {
|
||||
DialogFooter,
|
||||
} from '@/figma-make/components/base/dialog';
|
||||
import { toast } from 'sonner';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { notFound, useRouter, useSearchParams } from 'next/navigation';
|
||||
import { DailyChecklistApi } from '@/services/api/daily-checklist/daily-checklist';
|
||||
import { isResponseError } from '@/lib/api-helper';
|
||||
import Link from 'next/link';
|
||||
@@ -140,6 +140,8 @@ export function DetailDailyChecklistContent() {
|
||||
useEffect(() => {
|
||||
if (checklistId) {
|
||||
fetchChecklistDetail();
|
||||
} else {
|
||||
router.push('/404');
|
||||
}
|
||||
}, [checklistId]);
|
||||
|
||||
@@ -802,10 +804,6 @@ export function DetailDailyChecklistContent() {
|
||||
? 'pl-12'
|
||||
: 'pl-8';
|
||||
|
||||
console.log({
|
||||
activity,
|
||||
});
|
||||
|
||||
rows.push(
|
||||
<tr
|
||||
key={`activity-${activity.id}-${index}`}
|
||||
|
||||
Reference in New Issue
Block a user