mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
fix: show 'Umum' activity and fix select all phase bug
This commit is contained in:
@@ -51,7 +51,7 @@ const CATEGORIES = [
|
|||||||
{ value: 'produksi_close', label: 'Produksi Close' },
|
{ value: 'produksi_close', label: 'Produksi Close' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const TIME_TYPE_ORDER = ['umum', 'pagi', 'siang', 'sore', 'malam'];
|
const TIME_TYPE_ORDER = ['Umum', 'Pagi', 'Siang', 'Sore', 'Malam'];
|
||||||
const TIME_TYPE_LABELS: { [key: string]: string } = {
|
const TIME_TYPE_LABELS: { [key: string]: string } = {
|
||||||
Umum: 'Umum',
|
Umum: 'Umum',
|
||||||
Pagi: 'Pagi',
|
Pagi: 'Pagi',
|
||||||
@@ -777,7 +777,7 @@ export function DailyChecklistContent() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
toast.success('Draft tersimpan otomatis');
|
toast.success('Draft tersimpan!');
|
||||||
};
|
};
|
||||||
|
|
||||||
// Filter functions
|
// Filter functions
|
||||||
@@ -825,7 +825,7 @@ export function DailyChecklistContent() {
|
|||||||
|
|
||||||
// Group activities by time_type within this phase
|
// Group activities by time_type within this phase
|
||||||
phaseActivities.forEach((activity) => {
|
phaseActivities.forEach((activity) => {
|
||||||
const timeType = activity.time_type || 'umum';
|
const timeType = activity.time_type || 'Umum';
|
||||||
|
|
||||||
if (!grouped[phase.id].timeGroups[timeType]) {
|
if (!grouped[phase.id].timeGroups[timeType]) {
|
||||||
grouped[phase.id].timeGroups[timeType] = [];
|
grouped[phase.id].timeGroups[timeType] = [];
|
||||||
@@ -1084,6 +1084,7 @@ export function DailyChecklistContent() {
|
|||||||
(phaseId) => {
|
(phaseId) => {
|
||||||
const phaseData = groupActivitiesByPhase()[phaseId];
|
const phaseData = groupActivitiesByPhase()[phaseId];
|
||||||
const { phase, timeGroups } = phaseData;
|
const { phase, timeGroups } = phaseData;
|
||||||
|
|
||||||
const timeTypes = Object.keys(timeGroups).sort(
|
const timeTypes = Object.keys(timeGroups).sort(
|
||||||
(a, b) =>
|
(a, b) =>
|
||||||
TIME_TYPE_ORDER.indexOf(a) -
|
TIME_TYPE_ORDER.indexOf(a) -
|
||||||
@@ -1440,7 +1441,9 @@ export function DailyChecklistContent() {
|
|||||||
if (isAllPhasesSelected) {
|
if (isAllPhasesSelected) {
|
||||||
setTempSelectedPhaseIds([]);
|
setTempSelectedPhaseIds([]);
|
||||||
} else {
|
} else {
|
||||||
setTempSelectedPhaseIds(availablePhases.map((p) => p.id));
|
setTempSelectedPhaseIds(
|
||||||
|
availablePhases.map((p) => String(p.id))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
className='checkbox-clean'
|
className='checkbox-clean'
|
||||||
|
|||||||
Reference in New Issue
Block a user