feat: create stall
This commit is contained in:
parent
e9b7494bb6
commit
aa10f639b5
2 changed files with 22 additions and 3 deletions
|
|
@ -35,7 +35,6 @@ async function stallList(path) {
|
|||
})
|
||||
},
|
||||
createStall: async function (stall) {
|
||||
console.log('### createStall', stall)
|
||||
try {
|
||||
const {data} = await LNbits.api.request(
|
||||
'POST',
|
||||
|
|
@ -43,6 +42,11 @@ async function stallList(path) {
|
|||
this.adminkey,
|
||||
stall
|
||||
)
|
||||
this.stallDialog.show = false
|
||||
this.$q.notify({
|
||||
type: 'positive',
|
||||
message: 'Stall created!'
|
||||
})
|
||||
} catch (error) {
|
||||
LNbits.utils.notifyApiError(error)
|
||||
}
|
||||
|
|
@ -74,6 +78,17 @@ async function stallList(path) {
|
|||
} catch (error) {
|
||||
LNbits.utils.notifyApiError(error)
|
||||
}
|
||||
},
|
||||
openCreateStallDialog: async function () {
|
||||
await this.getCurrencies()
|
||||
await this.getZones()
|
||||
this.stallDialog.data = {
|
||||
name: '',
|
||||
wallet: null,
|
||||
currency: 'sat',
|
||||
shippingZones: []
|
||||
}
|
||||
this.stallDialog.show = true
|
||||
}
|
||||
},
|
||||
created: async function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue