diff --git a/README.md b/README.md index d280e29ce..8eff99137 100644 --- a/README.md +++ b/README.md @@ -49,3 +49,9 @@ pnpm run test:e2e:summary ```bash quasar build ``` + +### Serve the app for production + +```bash +quasar build quasar serve dist/spa --host 0.0.0.0 --proxy=./proxy-serve.js +``` diff --git a/src/components/common/VnDmsInput.vue b/src/components/common/VnDmsInput.vue index 25d625d5d..5a3ef351b 100644 --- a/src/components/common/VnDmsInput.vue +++ b/src/components/common/VnDmsInput.vue @@ -15,7 +15,7 @@ const editDownloadDisabled = ref(false); const $props = defineProps({ defaultDmsCode: { type: String, - default: 'InvoiceIn', + default: 'invoiceIn', }, disable: { type: Boolean, diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 6eda03891..32a8db16f 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -152,6 +152,10 @@ const value = computed({ }, }); +const computedSortBy = computed(() => { + return $props.sortBy || $props.optionLabel + ' ASC'; +}); + watch(options, (newValue) => { setOptions(newValue); }); @@ -186,7 +190,7 @@ function findKeyInOptions() { } function setOptions(data) { - data = dataByOrder(data, $props.sortBy); + data = dataByOrder(data, computedSortBy.value); myOptions.value = JSON.parse(JSON.stringify(data)); myOptionsOriginal.value = JSON.parse(JSON.stringify(data)); emit('update:options', data); @@ -216,7 +220,8 @@ function filter(val, options) { async function fetchFilter(val) { if (!$props.url) return; - const { fields, include, sortBy, limit } = $props; + const { fields, include, limit } = $props; + const sortBy = computedSortBy.value; const key = optionFilterValue.value ?? (new RegExp(/\d/g).test(val) diff --git a/src/pages/Entry/Card/EntryBuys.vue b/src/pages/Entry/Card/EntryBuys.vue index a93b0801b..dedc9fc85 100644 --- a/src/pages/Entry/Card/EntryBuys.vue +++ b/src/pages/Entry/Card/EntryBuys.vue @@ -648,7 +648,7 @@ onMounted(() => { :url="`Entries/${entityId}/getBuyList`" search-url="EntryBuys" save-url="Buys/crud" - :filter="filter" + :filter="editableMode ? filter : {}" :disable-option="{ card: true }" v-model:selected="selectedRows" @on-fetch="() => footerFetchDataRef.fetch()" diff --git a/src/pages/Entry/Card/EntryDescriptor.vue b/src/pages/Entry/Card/EntryDescriptor.vue index 202f94997..2f9cfe0ff 100644 --- a/src/pages/Entry/Card/EntryDescriptor.vue +++ b/src/pages/Entry/Card/EntryDescriptor.vue @@ -147,7 +147,7 @@ async function deleteEntry() {