mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +00:00
feat: implement bulk approval for SO DO
This commit is contained in:
@@ -104,6 +104,29 @@ class MarketingExportService extends BaseApiService<
|
||||
super(basePath);
|
||||
}
|
||||
|
||||
async bulkApprovals(
|
||||
ids: number[],
|
||||
status: 'SALES_ORDER' | 'DELIVERY_ORDER',
|
||||
date: string, // YYYY-MM-DD
|
||||
notes: string
|
||||
): Promise<BaseApiResponse<Marketing[] | Marketing> | undefined> {
|
||||
try {
|
||||
const path = `${this.basePath}/approvals/bulk`;
|
||||
|
||||
return await httpClient<BaseApiResponse<Marketing[] | Marketing>>(path, {
|
||||
method: 'POST',
|
||||
body: {
|
||||
approvable_ids: ids,
|
||||
status: status,
|
||||
date: date,
|
||||
notes: notes,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export to Excel
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user