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;
|
||||
}
|
||||
|
||||
async function rejectRequest(requestDataId: string) {
|
||||
async function rejectRequest(
|
||||
requestDataId: string,
|
||||
body: { reason: string },
|
||||
) {
|
||||
const res = await api.post(
|
||||
`/request-data/${requestDataId}/reject-request-cancel`,
|
||||
body,
|
||||
);
|
||||
|
||||
if (res.status < 400) return true;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ export type RequestData = {
|
|||
|
||||
customerRequestCancel?: boolean;
|
||||
customerRequestCancelReason?: string;
|
||||
rejectRequestCancel?: boolean;
|
||||
rejectRequestCancelReason?: string;
|
||||
|
||||
quotation: QuotationFull & {
|
||||
debitNoteQuotationId: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue