mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
fix: schema update for bulk approve
This commit is contained in:
@@ -2,7 +2,9 @@ import { isResponseError } from '@/lib/api-helper';
|
||||
import { BaseApiService } from '@/services/api/base';
|
||||
import { httpClient, httpClientFetcher } from '@/services/http/client';
|
||||
import { BaseApiResponse } from '@/types/api/api-general';
|
||||
import axios from 'axios';
|
||||
import {
|
||||
BulkApproveMarketingPayload,
|
||||
Marketing,
|
||||
CreateSalesOrderPayload,
|
||||
UpdateSalesOrderPayload,
|
||||
@@ -73,6 +75,26 @@ export class SalesOrderService extends BaseApiService<
|
||||
}
|
||||
}
|
||||
|
||||
async bulkApproveToStatus(
|
||||
payload: BulkApproveMarketingPayload
|
||||
): Promise<BaseApiResponse<Marketing | Marketing[]> | undefined> {
|
||||
try {
|
||||
return await httpClient<BaseApiResponse<Marketing | Marketing[]>>(
|
||||
'/marketing/approvals/bulk',
|
||||
{
|
||||
method: 'POST',
|
||||
body: payload,
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
if (axios.isAxiosError<BaseApiResponse<Marketing | Marketing[]>>(error)) {
|
||||
return error.response?.data;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delivery
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user