feat: allow to restore all products at once

This commit is contained in:
Vlad Stan 2023-07-13 14:44:39 +03:00
parent 65b19845d1
commit d0b2ec1250
3 changed files with 9 additions and 1 deletions

View file

@ -191,6 +191,8 @@
There are no products to be restored.
</div>
<div class="row q-mt-lg">
<q-btn @click="restoreAllPendingProducts" v-close-popup flat color="green"
>Restore All</q-btn>
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Close</q-btn>
</div>
</q-card>

View file

@ -318,6 +318,12 @@ async function stallDetails(path) {
pendingProduct.pending = true
await this.showNewProductDialog(pendingProduct)
},
restoreAllPendingProducts: async function () {
for (const p of this.pendingProducts){
p.pending = false
await this.updateProduct(p)
}
},
customerSelectedForOrder: function (customerPubkey) {
this.$emit('customer-selected-for-order', customerPubkey)
}

View file

@ -219,7 +219,7 @@ async def api_republish_merchant(
@nostrmarket_ext.put("/api/v1/merchant/{merchant_id}/toggle")
async def api_republish_merchant(
async def api_toggle_merchant(
merchant_id: str,
wallet: WalletTypeInfo = Depends(require_admin_key),
) -> Merchant: