updating cycle close request feature to get approval from national dashboard instead auto from system

This commit is contained in:
Alberto-Audrix committed 2026-09-09 14:18:39 +07:00
1 parent 3a868cf1db
commit e4dbfd0252
31 files changed
+1322 -182

No files matched your search

@@ -11,7 +11,7 @@ import {
feedUseTotals,
} from '../../utils/reportTotals.ts';
import {
cycleDayForDate,
cycleLastDayIndex,
formatDateId,
formatDateRange,
formatNumber,
@@ -63,10 +63,7 @@ const ReportPreviewOverlay: React.FC<Props> = ({ open, reportType, onClose }) =>
const latestDay = selectedCycle ? Math.max(0, selectedCycle.current_day) : 0;
const endCycleDay = selectedCycle
? Math.min(
selectedCycle.total_days,
cycleDayForDate(selectedCycle.start_date, selectedCycle.end_date)
)
? Math.min(selectedCycle.total_days, cycleLastDayIndex(selectedCycle))
: 0;
const effectiveUpToDay = isEndCycle ? endCycleDay : draftDay;