From e199c355e4353c78ae4091e1e5c99736fc88e74c Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 28 Oct 2024 13:28:46 +0700 Subject: [PATCH] refactor: add payment store skeleton --- src/stores/{invoice => payment}/index.ts | 23 ++++++++++++++++++++++- src/stores/{invoice => payment}/types.ts | 0 2 files changed, 22 insertions(+), 1 deletion(-) rename src/stores/{invoice => payment}/index.ts (77%) rename src/stores/{invoice => payment}/types.ts (100%) diff --git a/src/stores/invoice/index.ts b/src/stores/payment/index.ts similarity index 77% rename from src/stores/invoice/index.ts rename to src/stores/payment/index.ts index 49c723c5..b34c4490 100644 --- a/src/stores/invoice/index.ts +++ b/src/stores/payment/index.ts @@ -4,7 +4,28 @@ import { api } from 'src/boot/axios'; import { PaginationResult } from 'src/types'; import { Invoice, InvoicePayload } from './types'; -export const useInvoice = defineStore('workflow-store', () => { +export const usePayment = defineStore('payment-store', () => { + const data = ref<{}[]>([]); + const page = ref(1); + const pageMax = ref(1); + const pageSize = ref(30); + + async function getPayment() {} + + async function getPaymentList() {} + + return { + data, + page, + pageSize, + pageMax, + + getPayment, + getPaymentList, + }; +}); + +export const useInvoice = defineStore('invoice-store', () => { const data = ref([]); const page = ref(1); const pageMax = ref(1); diff --git a/src/stores/invoice/types.ts b/src/stores/payment/types.ts similarity index 100% rename from src/stores/invoice/types.ts rename to src/stores/payment/types.ts