mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-174,175): update approve method to allow custom notes in RecordingForm
This commit is contained in:
@@ -911,8 +911,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
setIsApproveLoading(true);
|
||||
|
||||
const approveResponse = await RecordingApi.approve(
|
||||
initialValues?.id as number,
|
||||
'Approved via Form'
|
||||
initialValues?.id as number
|
||||
);
|
||||
|
||||
if (isResponseSuccess(approveResponse)) {
|
||||
|
||||
@@ -35,7 +35,7 @@ export class RecordingService extends BaseApiService<
|
||||
|
||||
async approve(
|
||||
idOrIds: number | number[],
|
||||
notes: string = 'Approved via Form'
|
||||
notes?: string
|
||||
): Promise<BaseApiResponse<Recording[]> | undefined> {
|
||||
const approvable_ids = Array.isArray(idOrIds) ? idOrIds : [idOrIds];
|
||||
return await this.customRequest<BaseApiResponse<Recording[]>>('approvals', {
|
||||
|
||||
Reference in New Issue
Block a user