diff --git a/.vscode/settings.json b/.vscode/settings.json index 5026b7d3b..8f601aa77 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,5 +14,5 @@ "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "cSpell.words": ["axios"] + "cSpell.words": ["axios", "composables"] } diff --git a/src/boot/axios.js b/src/boot/axios.js index 4fd83ddea..fa8a08003 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -55,10 +55,10 @@ const onResponseError = (error) => { } if (session.isLoggedIn() && response?.status === 401) { - session.destroy(); + session.destroy(false); const hash = window.location.hash; const url = hash.slice(1); - Router.push({ path: url }); + Router.push(`/login?redirect=${url}`); } else if (!session.isLoggedIn()) { return Promise.reject(error); } diff --git a/src/components/CreateManualInvoiceForm.vue b/src/components/CreateManualInvoiceForm.vue index 92399c20c..1aa95011f 100644 --- a/src/components/CreateManualInvoiceForm.vue +++ b/src/components/CreateManualInvoiceForm.vue @@ -46,22 +46,6 @@ const onDataSaved = async (formData, requestResponse) => { @on-fetch="(data) => (taxAreasOptions = data)" auto-load /> - - { option-value="id" v-model="data.ticketFk" @update:model-value="data.clientFk = null" + url="Tickets" + :where="{ refFk: null }" + :fields="['id', 'nickname']" + :filter-options="{ order: 'shipped DESC' }" > diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue index aeccdb2d6..da4687d32 100644 --- a/src/components/VnTable/VnColumn.vue +++ b/src/components/VnTable/VnColumn.vue @@ -5,8 +5,10 @@ import { dashIfEmpty } from 'src/filters'; /* basic input */ import VnSelect from 'components/common/VnSelect.vue'; +import VnSelectCache from 'components/common/VnSelectCache.vue'; import VnInput from 'components/common/VnInput.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; +import VnInputTime from 'components/common/VnInputTime.vue'; import VnComponent from 'components/common/VnComponent.vue'; const model = defineModel(undefined, { required: true }); @@ -41,6 +43,17 @@ const $props = defineProps({ }, }); +const defaultSelect = { + attrs: { + row: $props.row, + disable: !$props.isEditable, + class: 'fit', + }, + forceAttrs: { + label: $props.showLabel && $props.column.label, + }, +}; + const defaultComponents = { input: { component: markRaw(VnInput), @@ -74,6 +87,15 @@ const defaultComponents = { label: $props.showLabel && $props.column.label, }, }, + time: { + component: markRaw(VnInputTime), + attrs: { + disable: !$props.isEditable, + }, + forceAttrs: { + label: $props.showLabel && $props.column.label, + }, + }, checkbox: { component: markRaw(QCheckbox), attrs: (prop) => { @@ -94,14 +116,12 @@ const defaultComponents = { }, }, select: { + component: markRaw(VnSelectCache), + ...defaultSelect, + }, + rawSelect: { component: markRaw(VnSelect), - attrs: { - disable: !$props.isEditable, - class: 'fit', - }, - forceAttrs: { - label: $props.showLabel && $props.column.label, - }, + ...defaultSelect, }, icon: { component: markRaw(QIcon), diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index b3386899f..15e1cc947 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -40,7 +40,7 @@ const enterEvent = { const defaultAttrs = { filled: !$props.showTitle, - class: 'q-px-sm q-pb-xs q-pt-none fit', + class: 'q-px-xs q-pb-xs q-pt-none fit', dense: true, }; @@ -101,7 +101,7 @@ const components = { component: markRaw(VnSelect), event: updateEvent, attrs: { - class: 'q-px-md q-pb-xs q-pt-none fit', + class: 'q-px-sm q-pb-xs q-pt-none fit', dense: true, filled: !$props.showTitle, }, @@ -139,14 +139,11 @@ const showFilter = computed(