fix: Right menu double icon

This commit is contained in:
Javier Segarra 2024-07-08 14:59:12 +02:00
parent fe530aa1c6
commit 286fbc5aba
2 changed files with 27 additions and 25 deletions

View File

@ -107,7 +107,7 @@ const onClientChange = async (clientId) => {
} }
}; };
async function onDataSaved(id) { async function onDataSaved({ id }) {
await router.push({ path: `/order/${id}/catalog` }); await router.push({ path: `/order/${id}/catalog` });
} }
</script> </script>
@ -117,7 +117,7 @@ async function onDataSaved(id) {
<div class="q-pa-md"> <div class="q-pa-md">
<FormModel <FormModel
:url="`Orders/${route.params.id}`" :url="`Orders/${route.params.id}`"
@on-data-saved="(row) => onDataSaved(row.id)" @on-data-saved="onDataSaved"
:model="ORDER_MODEL" :model="ORDER_MODEL"
:mapper="orderMapper" :mapper="orderMapper"
:filter="orderFilter" :filter="orderFilter"

View File

@ -12,7 +12,9 @@ import FetchData from 'src/components/FetchData.vue';
import VnImg from 'src/components/ui/VnImg.vue'; import VnImg from 'src/components/ui/VnImg.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import FetchedTags from 'src/components/ui/FetchedTags.vue'; import FetchedTags from 'src/components/ui/FetchedTags.vue';
import { useStateStore } from 'stores/useStateStore';
const stateStore = useStateStore();
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
const quasar = useQuasar(); const quasar = useQuasar();
@ -215,33 +217,33 @@ const columns = computed(() => [
@on-fetch="(data) => (orderSummary.vat = data)" @on-fetch="(data) => (orderSummary.vat = data)"
auto-load auto-load
/> />
<QPage :key="componentKey" class="column items-center q-pa-md"> <QDrawer side="right" :width="270" v-model="stateStore.rightDrawer">
<QCard class="order-lines-summary q-pa-lg">
<p class="header text-right block">
{{ t('summary') }}
</p>
<VnLv
v-if="orderSummary.vat && orderSummary.total"
:label="t('subtotal') + ': '"
:value="toCurrency(orderSummary.total - orderSummary.vat)"
/>
<VnLv
v-if="orderSummary.vat"
:label="t('VAT') + ': '"
:value="toCurrency(orderSummary?.vat)"
/>
<VnLv
v-if="orderSummary.total"
:label="t('total') + ': '"
:value="toCurrency(orderSummary?.total)"
/>
</QCard>
</QDrawer>
<QPage :key="componentKey" class="column items-center">
<div class="order-list full-width"> <div class="order-list full-width">
<div v-if="!orderSummary.total" class="no-result"> <div v-if="!orderSummary.total" class="no-result">
{{ t('globals.noResults') }} {{ t('globals.noResults') }}
</div> </div>
<QDrawer side="right" :width="270" show-if-above>
<QCard class="order-lines-summary q-pa-lg">
<p class="header text-right block">
{{ t('summary') }}
</p>
<VnLv
v-if="orderSummary.vat && orderSummary.total"
:label="t('subtotal') + ': '"
:value="toCurrency(orderSummary.total - orderSummary.vat)"
/>
<VnLv
v-if="orderSummary.vat"
:label="t('VAT') + ': '"
:value="toCurrency(orderSummary?.vat)"
/>
<VnLv
v-if="orderSummary.total"
:label="t('total') + ': '"
:value="toCurrency(orderSummary?.total)"
/>
</QCard>
</QDrawer>
<VnTable <VnTable
ref="tableLinesRef" ref="tableLinesRef"
data-key="OrderLines" data-key="OrderLines"