deploy v-1

This commit is contained in:
HAM!DREZA
2024-07-03 21:25:34 +03:30
parent 2b399d3bb1
commit ad7a4b839d
49 changed files with 1636 additions and 953 deletions
+27 -6
View File
@@ -10,6 +10,32 @@ export const useDiscountStore = defineStore('discounts', {
total: 0
}),
actions: {
async add(form) {
this.fetching = true
const { status, data } = await axios.post('/admins/discount', form)
this.fetching = false
return data
},
async history() {
this.fetching = true
const { status, data } = await axios.get('/admins/discountHistory')
this.fetching = false
return data
},
async index() {
this.items = [];
this.fetching = true
@@ -18,12 +44,7 @@ export const useDiscountStore = defineStore('discounts', {
return this.items = data
},
async add(form) {
this.fetching = true
const { status, data } = await axios.post('/admins/discount', form)
this.fetching = false
return data
},
async getDiscount(id) {
this.items = [];
this.fetching = true