diff --git a/src/pages/Order/Card/OrderDescriptor.vue b/src/pages/Order/Card/OrderDescriptor.vue index 8d2b5309e..a035971b0 100644 --- a/src/pages/Order/Card/OrderDescriptor.vue +++ b/src/pages/Order/Card/OrderDescriptor.vue @@ -82,7 +82,6 @@ function ticketFilter(order) { ref="getTotalRef" :url="`Orders/${entityId}/getTotal`" @on-fetch="(response) => (total = response)" - auto-load /> -import { useRoute } from 'vue-router'; +import { useRoute, useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { ref, computed, watch } from 'vue'; import { useQuasar } from 'quasar'; -import { useRouter } from 'vue-router'; +import axios from 'axios'; +import { useStateStore } from 'stores/useStateStore'; +import { useArrayData } from 'composables/useArrayData'; +import { toCurrency, toDate } from 'src/filters'; import VnConfirm from 'components/ui/VnConfirm.vue'; -import { toCurrency, toDate } from 'src/filters'; -import axios from 'axios'; import VnTable from 'src/components/VnTable/VnTable.vue'; import FetchData from 'src/components/FetchData.vue'; import VnImg from 'src/components/ui/VnImg.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import FetchedTags from 'src/components/ui/FetchedTags.vue'; -import { useStateStore } from 'stores/useStateStore'; const router = useRouter(); const stateStore = useStateStore(); const route = useRoute(); const { t } = useI18n(); const quasar = useQuasar(); +const descriptorData = useArrayData('orderData'); const componentKey = ref(0); const tableLinesRef = ref(); const order = ref(); @@ -27,6 +28,8 @@ const orderSummary = ref({ total: null, vat: null, }); +const getTotalRef = ref(); +const getVATRef = ref(); const lineFilter = ref({ include: [ @@ -195,6 +198,9 @@ async function remove(item) { type: 'positive', }); tableLinesRef.value.reload(); + descriptorData.fetch({}); + getTotalRef.value.fetch(); + getVATRef.value.fetch(); } async function confirmOrder() { @@ -203,6 +209,12 @@ async function confirmOrder() { message: t('globals.confirm'), type: 'positive', }); + router.push({ + name: 'TicketList', + query: { + table: JSON.stringify({ clientFk: descriptorData.store.data.clientFk }), + }, + }); } watch( @@ -223,90 +235,80 @@ watch( auto-load /> - +

{{ t('summary') }}

- - + +
- -
-
- {{ t('globals.noResults') }} -
- - - - - - -
- - - - {{ t('confirm') }} - - -
+ + + + + + + + + + + {{ t('confirm') }} + +