mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
refactor(FE): Include selected record date in next-day API
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user