feat: enhance rejectRequest function to include cancellation reason and update types
This commit is contained in:
parent
f850511173
commit
366e2f5da8
2 changed files with 7 additions and 1 deletions
|
|
@ -294,9 +294,13 @@ export const useRequestList = defineStore('request-list', () => {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function rejectRequest(requestDataId: string) {
|
async function rejectRequest(
|
||||||
|
requestDataId: string,
|
||||||
|
body: { reason: string },
|
||||||
|
) {
|
||||||
const res = await api.post(
|
const res = await api.post(
|
||||||
`/request-data/${requestDataId}/reject-request-cancel`,
|
`/request-data/${requestDataId}/reject-request-cancel`,
|
||||||
|
body,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (res.status < 400) return true;
|
if (res.status < 400) return true;
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ export type RequestData = {
|
||||||
|
|
||||||
customerRequestCancel?: boolean;
|
customerRequestCancel?: boolean;
|
||||||
customerRequestCancelReason?: string;
|
customerRequestCancelReason?: string;
|
||||||
|
rejectRequestCancel?: boolean;
|
||||||
|
rejectRequestCancelReason?: string;
|
||||||
|
|
||||||
quotation: QuotationFull & {
|
quotation: QuotationFull & {
|
||||||
debitNoteQuotationId: string;
|
debitNoteQuotationId: string;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue