refactor: stats missing and new tab

This commit is contained in:
Thanaphon Frappet 2025-02-19 17:03:15 +07:00
parent 453252c4be
commit 448d9156f9
6 changed files with 55 additions and 54 deletions

View file

@ -26,7 +26,7 @@ export async function getDebitNoteList(params?: {
page?: number;
pageSize?: number;
query?: string;
deebitNoteStatus?: Status;
status?: Status;
includeRegisteredBranch?: boolean;
}) {
const res = await api.get<PaginationResult<Data>>(`/${ENDPOINT}`, {
@ -66,12 +66,11 @@ export const useDebitNote = defineStore('debit-note-store', () => {
const page = ref<number>(1);
const pageMax = ref<number>(1);
const pageSize = ref<number>(30);
const stats = ref<Record<Status, number>>({
[Status.Pending]: 0,
[Status.Expire]: 0,
[Status.Payment]: 0,
[Status.Receipt]: 0,
[Status.Succeed]: 0,
const stats = ref<Record<string, number>>({
['issued']: 0,
['paymentPending']: 0,
['paymentSuccess']: 0,
['processComplete']: 0,
});
return {

View file

@ -86,9 +86,9 @@ export type DebitNote = {
};
export enum DebitNoteStatus {
Pending = 'Pending',
Expire = 'Expire',
Payment = 'Payment',
Receipt = 'Receipt',
Succeed = 'Succeed',
Issued = 'Issued',
Expired = 'Expired',
PaymentPending = 'PaymentPending',
PaymentSuccess = 'PaymentSuccess',
ProcessComplete = 'ProcessComplete',
}