mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +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);
|
setIsApproveLoading(true);
|
||||||
|
|
||||||
const approveResponse = await RecordingApi.approve(
|
const approveResponse = await RecordingApi.approve(
|
||||||
initialValues?.id as number,
|
initialValues?.id as number
|
||||||
'Approved via Form'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isResponseSuccess(approveResponse)) {
|
if (isResponseSuccess(approveResponse)) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export class RecordingService extends BaseApiService<
|
|||||||
|
|
||||||
async approve(
|
async approve(
|
||||||
idOrIds: number | number[],
|
idOrIds: number | number[],
|
||||||
notes: string = 'Approved via Form'
|
notes?: string
|
||||||
): Promise<BaseApiResponse<Recording[]> | undefined> {
|
): Promise<BaseApiResponse<Recording[]> | undefined> {
|
||||||
const approvable_ids = Array.isArray(idOrIds) ? idOrIds : [idOrIds];
|
const approvable_ids = Array.isArray(idOrIds) ? idOrIds : [idOrIds];
|
||||||
return await this.customRequest<BaseApiResponse<Recording[]>>('approvals', {
|
return await this.customRequest<BaseApiResponse<Recording[]>>('approvals', {
|
||||||
|
|||||||
Reference in New Issue
Block a user