Merge branch '8910-TicketFilter_fix_order' of https://gitea.verdnatura.es/verdnatura/salix-front into 8910-TicketFilter_fix_order
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
41f064d2ab
|
@ -83,7 +83,7 @@ const isLoading = ref(false);
|
||||||
const hasChanges = ref(false);
|
const hasChanges = ref(false);
|
||||||
const originalData = ref();
|
const originalData = ref();
|
||||||
const vnPaginateRef = ref();
|
const vnPaginateRef = ref();
|
||||||
const formData = ref([]);
|
const formData = ref();
|
||||||
const saveButtonRef = ref(null);
|
const saveButtonRef = ref(null);
|
||||||
const watchChanges = ref();
|
const watchChanges = ref();
|
||||||
const formUrl = computed(() => $props.url);
|
const formUrl = computed(() => $props.url);
|
||||||
|
@ -298,6 +298,10 @@ watch(formUrl, async () => {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
<SkeletonTable
|
||||||
|
v-if="!formData && ($attrs['auto-load'] === '' || $attrs['auto-load'])"
|
||||||
|
:columns="$attrs.columns?.length"
|
||||||
|
/>
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
:url="url"
|
:url="url"
|
||||||
:limit="limit"
|
:limit="limit"
|
||||||
|
@ -316,10 +320,6 @@ watch(formUrl, async () => {
|
||||||
></slot>
|
></slot>
|
||||||
</template>
|
</template>
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
<SkeletonTable
|
|
||||||
v-if="!formData && $attrs.autoLoad"
|
|
||||||
:columns="$attrs.columns?.length"
|
|
||||||
/>
|
|
||||||
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubToolbar">
|
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubToolbar">
|
||||||
<QBtnGroup push style="column-gap: 10px">
|
<QBtnGroup push style="column-gap: 10px">
|
||||||
<slot name="moreBeforeActions" />
|
<slot name="moreBeforeActions" />
|
||||||
|
|
|
@ -183,7 +183,7 @@ const arrayData = useArrayData(arrayDataKey, {
|
||||||
searchUrl: false,
|
searchUrl: false,
|
||||||
mapKey: $attrs['map-key'],
|
mapKey: $attrs['map-key'],
|
||||||
});
|
});
|
||||||
|
const someIsLoading = computed(() => isLoading.value || arrayData.isLoading);
|
||||||
function findKeyInOptions() {
|
function findKeyInOptions() {
|
||||||
if (!$props.options) return;
|
if (!$props.options) return;
|
||||||
return filter($props.modelValue, $props.options)?.length;
|
return filter($props.modelValue, $props.options)?.length;
|
||||||
|
@ -366,7 +366,8 @@ function getCaption(opt) {
|
||||||
virtual-scroll-slice-size="options.length"
|
virtual-scroll-slice-size="options.length"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:input-debounce="useURL ? '300' : '0'"
|
:input-debounce="useURL ? '300' : '0'"
|
||||||
:loading="isLoading"
|
:loading="someIsLoading"
|
||||||
|
:disable="someIsLoading"
|
||||||
@virtual-scroll="onScroll"
|
@virtual-scroll="onScroll"
|
||||||
@keydown="handleKeyDown"
|
@keydown="handleKeyDown"
|
||||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
|
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
|
||||||
|
|
|
@ -89,7 +89,6 @@ const insertTag = (rows) => {
|
||||||
:default-remove="false"
|
:default-remove="false"
|
||||||
:user-filter="{
|
:user-filter="{
|
||||||
fields: ['id', 'itemFk', 'tagFk', 'value', 'priority'],
|
fields: ['id', 'itemFk', 'tagFk', 'value', 'priority'],
|
||||||
where: { itemFk: route.params.id },
|
|
||||||
include: {
|
include: {
|
||||||
relation: 'tag',
|
relation: 'tag',
|
||||||
scope: {
|
scope: {
|
||||||
|
@ -97,6 +96,7 @@ const insertTag = (rows) => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
|
:filter="{ where: { itemFk: route.params.id } }"
|
||||||
order="priority"
|
order="priority"
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="onItemTagsFetched"
|
@on-fetch="onItemTagsFetched"
|
||||||
|
|
|
@ -11,25 +11,18 @@ export function cloneItem() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const cloneItem = async (entityId) => {
|
const cloneItem = async (entityId) => {
|
||||||
const { id } = entityId;
|
const { id } = entityId;
|
||||||
try {
|
|
||||||
const { data } = await axios.post(`Items/${id ?? entityId}/clone`);
|
const { data } = await axios.post(`Items/${id ?? entityId}/clone`);
|
||||||
router.push({ name: 'ItemTags', params: { id: data.id } });
|
router.push({ name: 'ItemTags', params: { id: data.id } });
|
||||||
} catch (err) {
|
|
||||||
console.error('Error cloning item');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const openCloneDialog = async (entityId) => {
|
const openCloneDialog = async (entityId) => {
|
||||||
quasar
|
quasar.dialog({
|
||||||
.dialog({
|
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: t('item.descriptor.clone.title'),
|
title: t('item.descriptor.clone.title'),
|
||||||
message: t('item.descriptor.clone.subTitle'),
|
message: t('item.descriptor.clone.subTitle'),
|
||||||
|
promise: () => cloneItem(entityId),
|
||||||
},
|
},
|
||||||
})
|
|
||||||
.onOk(async () => {
|
|
||||||
await cloneItem(entityId);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return { openCloneDialog };
|
return { openCloneDialog };
|
||||||
|
|
|
@ -11,10 +11,10 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||||
import VnAccountNumber from 'src/components/common/VnAccountNumber.vue';
|
import VnAccountNumber from 'src/components/common/VnAccountNumber.vue';
|
||||||
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
|
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
|
||||||
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const arrayData = useArrayData('Supplier');
|
||||||
const sageTaxTypesOptions = ref([]);
|
const sageTaxTypesOptions = ref([]);
|
||||||
const sageWithholdingsOptions = ref([]);
|
const sageWithholdingsOptions = ref([]);
|
||||||
const sageTransactionTypesOptions = ref([]);
|
const sageTransactionTypesOptions = ref([]);
|
||||||
|
@ -89,6 +89,7 @@ function handleLocation(data, location) {
|
||||||
}"
|
}"
|
||||||
auto-load
|
auto-load
|
||||||
:clear-store-on-unmount="false"
|
:clear-store-on-unmount="false"
|
||||||
|
@on-data-saved="arrayData.fetch({})"
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
|
Loading…
Reference in New Issue