mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
refactor(FE): Send selected record date to next-day API
This commit is contained in:
@@ -562,7 +562,10 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
nextDayRecordingUrl
|
||||
? () => {
|
||||
const projectFlockKandangId = projectFlockKandangLookup!.id;
|
||||
return RecordingApi.nextDayRecording(projectFlockKandangId);
|
||||
return RecordingApi.nextDayRecording(
|
||||
projectFlockKandangId,
|
||||
selectedRecordDate
|
||||
);
|
||||
}
|
||||
: null
|
||||
);
|
||||
|
||||
@@ -74,7 +74,8 @@ export class RecordingService extends BaseApiService<
|
||||
}
|
||||
|
||||
async nextDayRecording(
|
||||
projectFlockId: number
|
||||
projectFlockId: number,
|
||||
recordDate?: string
|
||||
): Promise<BaseApiResponse<NextDayRecording> | undefined> {
|
||||
return await this.customRequest<BaseApiResponse<NextDayRecording>>(
|
||||
`next-day`,
|
||||
@@ -82,6 +83,7 @@ export class RecordingService extends BaseApiService<
|
||||
method: 'GET',
|
||||
params: {
|
||||
project_flock_kandang_id: projectFlockId,
|
||||
record_date: recordDate,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user