mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +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
|
nextDayRecordingUrl
|
||||||
? () => {
|
? () => {
|
||||||
const projectFlockKandangId = projectFlockKandangLookup!.id;
|
const projectFlockKandangId = projectFlockKandangLookup!.id;
|
||||||
return RecordingApi.nextDayRecording(projectFlockKandangId);
|
return RecordingApi.nextDayRecording(
|
||||||
|
projectFlockKandangId,
|
||||||
|
selectedRecordDate
|
||||||
|
);
|
||||||
}
|
}
|
||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -74,7 +74,8 @@ export class RecordingService extends BaseApiService<
|
|||||||
}
|
}
|
||||||
|
|
||||||
async nextDayRecording(
|
async nextDayRecording(
|
||||||
projectFlockId: number
|
projectFlockId: number,
|
||||||
|
recordDate?: string
|
||||||
): Promise<BaseApiResponse<NextDayRecording> | undefined> {
|
): Promise<BaseApiResponse<NextDayRecording> | undefined> {
|
||||||
return await this.customRequest<BaseApiResponse<NextDayRecording>>(
|
return await this.customRequest<BaseApiResponse<NextDayRecording>>(
|
||||||
`next-day`,
|
`next-day`,
|
||||||
@@ -82,6 +83,7 @@ export class RecordingService extends BaseApiService<
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
project_flock_kandang_id: projectFlockId,
|
project_flock_kandang_id: projectFlockId,
|
||||||
|
record_date: recordDate,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user