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