fix docker deployment

This commit is contained in:
Alberto-Audrix committed 2026-09-11 14:48:18 +07:00
1 parent ded52d1ece
commit fb0f996776
17 files changed
+49 -18

No files matched your search

+6
View File
@@ -32,6 +32,12 @@ function phasesFor(totalDays: number): Phase[] {
const statusConfig = {
active: { label: 'Active', bg: 'bg-red-100', text: 'text-red-800', icon: 'fa-running' },
pending_close: {
label: 'Pending Close',
bg: 'bg-amber-100',
text: 'text-amber-800',
icon: 'fa-hourglass-half',
},
closed: {
label: 'Completed',
bg: 'bg-green-100',
@@ -138,7 +138,9 @@ describe('UserManagementPage', () => {
it('resets password', async () => {
render(<UserManagementPage />);
await screen.findByText('gm1');
fireEvent.click(screen.getAllByRole('button', { name: /Reset password/i })[0]);
const resetBtn = screen.getAllByRole('button', { name: /Reset password/i })[0];
expect(resetBtn).toBeTruthy();
fireEvent.click(resetBtn!);
fireEvent.change(screen.getByPlaceholderText(/Password baru/i), {
target: { value: 'reset-me' },
});
+3 -1
View File
@@ -116,7 +116,9 @@ const DataManagementPage: React.FC<{ onSettings: () => void }> = ({ onSettings }
const kpiByDate = new Map(kpis.map((k) => [k.date, k]));
const lastCycleDay = Math.max(0, (selectedCycle.total_days || 1) - 1);
const endDay = cycleDayForDate(selectedCycle.start_date, selectedCycle.end_date);
const endDay = selectedCycle.end_date
? cycleDayForDate(selectedCycle.start_date, selectedCycle.end_date)
: lastCycleDay;
const calendarDay = cycleDayForDate(selectedCycle.start_date, todayIso());
const maxDay = Math.min(calendarDay, lastCycleDay, endDay);
const today = todayIso();
@@ -65,7 +65,9 @@ const ReportPreviewOverlay: React.FC<Props> = ({ open, reportType, onClose }) =>
const endCycleDay = selectedCycle
? Math.min(
selectedCycle.total_days,
cycleDayForDate(selectedCycle.start_date, selectedCycle.end_date)
selectedCycle.end_date
? cycleDayForDate(selectedCycle.start_date, selectedCycle.end_date)
: Math.max(0, (selectedCycle.total_days || 1) - 1)
)
: 0;
const effectiveUpToDay = isEndCycle ? endCycleDay : draftDay;