0
0
Fork 0

Add order confirmation

This commit is contained in:
Kevin Martinez 2023-12-27 07:52:47 -04:00
parent b22fcddcd3
commit e3fd9bf54b
1 changed files with 23 additions and 3 deletions

View File

@ -50,6 +50,14 @@ async function remove(item) {
}); });
refresh(); refresh();
} }
async function confirmOrder() {
await axios.post(`Orders/${route.params.id}/confirm`);
quasar.notify({
message: t('globals.confirm'),
type: 'positive',
});
}
</script> </script>
<template> <template>
@ -137,12 +145,12 @@ async function remove(item) {
</template> </template>
<template #list-items> <template #list-items>
<div class="q-mb-sm"> <div class="q-mb-sm">
<span class="text-uppercase"> <span class="text-uppercase subname">
{{ row.item.subName }} {{ row.item.subName }}
</span> </span>
<fetched-tags :item="row.item" :max-length="5" /> <fetched-tags :item="row.item" :max-length="5" />
</div> </div>
<VnLv :label="t('item')" :value="row.item.id" /> <VnLv :label="t('item')" :value="String(row.item.id)" />
<VnLv <VnLv
:label="t('warehouse')" :label="t('warehouse')"
:value="row.warehouse.name" :value="row.warehouse.name"
@ -151,7 +159,7 @@ async function remove(item) {
:label="t('shipped')" :label="t('shipped')"
:value="toDate(row.shipped)" :value="toDate(row.shipped)"
/> />
<VnLv :label="t('quantity')" :value="row.quantity" /> <VnLv :label="t('quantity')" :value="String(row.quantity)" />
<VnLv <VnLv
:label="t('price')" :label="t('price')"
:value="toCurrency(row.price)" :value="toCurrency(row.price)"
@ -174,6 +182,12 @@ async function remove(item) {
</template> </template>
</VnPaginate> </VnPaginate>
</div> </div>
<QPageSticky :offset="[20, 20]">
<QBtn fab icon="check" color="primary" @click="confirmOrder()" />
<QTooltip>
{{ t('confirm') }}
</QTooltip>
</QPageSticky>
</QPage> </QPage>
</template> </template>
<style lang="scss"> <style lang="scss">
@ -220,6 +234,10 @@ async function remove(item) {
border-radius: 50%; border-radius: 50%;
} }
} }
.subname {
color: var(--vn-label);
}
</style> </style>
<i18n> <i18n>
en: en:
@ -236,6 +254,7 @@ en:
remove: Remove remove: Remove
confirmDeletion: Confirm deletion, confirmDeletion: Confirm deletion,
confirmDeletionMessage: Are you sure you want to delete this item? confirmDeletionMessage: Are you sure you want to delete this item?
confirm: Confirm
es: es:
summary: Resumen summary: Resumen
subtotal: Subtotal subtotal: Subtotal
@ -250,4 +269,5 @@ es:
remove: Eliminar remove: Eliminar
confirmDeletion: Confirmar eliminación, confirmDeletion: Confirmar eliminación,
confirmDeletionMessage: Seguro que quieres eliminar este artículo? confirmDeletionMessage: Seguro que quieres eliminar este artículo?
confirm: Confirmar
</i18n> </i18n>