refactor(FE): Include selected record date in next-day API

This commit is contained in:
rstubryan
2026-01-24 11:17:13 +07:00
parent 6636648813
commit 8c73a8f61a
@@ -554,8 +554,8 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
const nextDayRecordingUrl = useMemo(() => {
if (!projectFlockKandangLookup) return null;
const projectFlockKandangId = projectFlockKandangLookup.id;
return `${RecordingApi.basePath}/next-day?project_flock_kandang_id=${projectFlockKandangId}`;
}, [projectFlockKandangLookup]);
return `${RecordingApi.basePath}/next-day?project_flock_kandang_id=${projectFlockKandangId}&record_date=${selectedRecordDate}`;
}, [projectFlockKandangLookup, selectedRecordDate]);
const { data: nextDayRecordingData } = useSWR(
nextDayRecordingUrl,