feat: implement bulk approval for SO DO

This commit is contained in:
ValdiANS
2026-04-22 00:10:22 +07:00
parent e43a25307f
commit 50e0ccd9e4
2 changed files with 287 additions and 51 deletions
+23
View File
@@ -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
*/