diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index e8083dec2..493f094ce 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -22,6 +22,10 @@ const $props = defineProps({ type: String, default: '', }, + optionFilter: { + type: String, + default: null, + }, url: { type: String, default: '', @@ -59,7 +63,7 @@ const $props = defineProps({ const { t } = useI18n(); const requiredFieldRule = (val) => val ?? t('globals.fieldRequired'); -const { optionLabel, optionValue, options, modelValue } = toRefs($props); +const { optionLabel, optionValue, optionFilter, options, modelValue } = toRefs($props); const myOptions = ref([]); const myOptionsOriginal = ref([]); const vnSelectRef = ref(); @@ -109,9 +113,9 @@ async function fetchFilter(val) { const { fields, sortBy, limit } = $props; let key = optionLabel.value; - if (new RegExp(/\d/g).test(val)) key = optionValue.value; + if (new RegExp(/\d/g).test(val)) key = optionFilter.value ?? optionValue.value; - const where = { [key]: { like: `%${val}%` } }; + const where = { ...{ [key]: { like: `%${val}%` } }, ...$props.where }; return dataRef.value.fetch({ fields, where, order: sortBy, limit }); } diff --git a/src/components/ui/QCalendarMonthWrapper.vue b/src/components/ui/QCalendarMonthWrapper.vue index 24255ea1a..3ecea89c2 100644 --- a/src/components/ui/QCalendarMonthWrapper.vue +++ b/src/components/ui/QCalendarMonthWrapper.vue @@ -108,7 +108,7 @@ const containerClasses = computed(() => { font-size: 13px; &:hover { - background-color: var(--vn-accent-color); + background-color: var(--vn-label-color); cursor: pointer; } } diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 326ddff5d..e2465f5ba 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -130,7 +130,8 @@ export function useArrayData(key, userOptions) { store.filter = {}; if (params) store.userParams = Object.assign({}, params); - await fetch({ append: false }); + const response = await fetch({ append: false }); + return response; } async function addFilter({ filter, params }) { diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index af501240b..f55669619 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -13,6 +13,7 @@ import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; import { getUrl } from 'src/composables/getUrl'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; +import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; const route = useRoute(); const router = useRouter(); @@ -262,9 +263,12 @@ async function changeState(value) { :url="ticketUrl + 'sale'" :text="t('ticket.summary.saleLines')" /> - + +