feat: accept debit note store
This commit is contained in:
parent
44aed63677
commit
c64676b34c
1 changed files with 8 additions and 0 deletions
|
|
@ -61,6 +61,12 @@ export async function deleteDebitNote(id: string) {
|
|||
return null;
|
||||
}
|
||||
|
||||
export async function acceptDebitNote(id: string) {
|
||||
const res = await api.post<Data>(`/${ENDPOINT}/${id}/accept`);
|
||||
if (res.status < 400) return res.data;
|
||||
return null;
|
||||
}
|
||||
|
||||
export const useDebitNote = defineStore('debit-note-store', () => {
|
||||
const data = ref<Data[]>([]);
|
||||
const page = ref<number>(1);
|
||||
|
|
@ -87,6 +93,8 @@ export const useDebitNote = defineStore('debit-note-store', () => {
|
|||
updateDebitNote,
|
||||
deleteDebitNote,
|
||||
|
||||
action: { acceptDebitNote },
|
||||
|
||||
...manageAttachment(api, ENDPOINT),
|
||||
...manageFile<'slip'>(api, ENDPOINT),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue