fix: minor bugs

This commit is contained in:
Javier Segarra 2025-03-12 15:34:20 +01:00
parent 32fde59fba
commit 311c361f11
4 changed files with 14 additions and 15 deletions

View File

@ -776,7 +776,7 @@ const rowCtrlClickFunction = computed(() => {
:data-col-field="col?.name"
>
<div
class="no-padding no-margin peter"
class="no-padding no-margin"
style="
overflow: hidden;
text-overflow: ellipsis;

View File

@ -10,6 +10,10 @@ import { useClipboard } from 'src/composables/useClipboard';
import VnMoreOptions from './VnMoreOptions.vue';
const $props = defineProps({
id: {
type: Number,
default: null,
},
url: {
type: String,
default: '',
@ -67,7 +71,8 @@ onBeforeMount(async () => {
});
// It enables to load data only once if the module is the same as the dataKey
if (!isSameDataKey.value || !route.params.id) await getData();
if (!isSameDataKey.value || !route.params.id || $props.id !== route.params.id)
await getData();
watch(
() => [$props.url, $props.filter],
async () => {

View File

@ -44,6 +44,7 @@ function ticketFilter(ticket) {
@on-fetch="(data) => ([problems] = data)"
/>
<CardDescriptor
:id="entityId"
:url="`Tickets/${entityId}`"
:filter="filter"
data-key="Ticket"

View File

@ -5,7 +5,7 @@ import { computed, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import axios from 'axios';
import FetchData from 'src/components/FetchData.vue';
import { toDate, toHour } from 'src/filters';
import { toDate } from 'src/filters';
import useNotify from 'src/composables/useNotify.js';
import ZoneDescriptorProxy from 'pages/Zone/Card/ZoneDescriptorProxy.vue';
import { useRoute } from 'vue-router';
@ -22,14 +22,6 @@ const $props = defineProps({
},
});
watch(
() => $props.filter,
(v) => {
filterLack.value.where = v;
tableRef.value.reload(filterLack);
},
);
const filterLack = ref({
include: [
{
@ -90,6 +82,7 @@ const columns = computed(() => [
},
{
name: 'alertLevelCode',
field: 'alertLevelCode',
label: t('negative.detail.state'),
columnFilter: {
name: 'alertLevelCode',
@ -171,7 +164,7 @@ function onBuysFetched(data) {
<FetchData
ref="fetchItemLack"
:url="`Tickets/itemLack`"
:params="{ id: entityId }"
:params="{ itemFk: entityId, warehouseFk: $props.filter.warehouseFk }"
@on-fetch="(data) => (itemLack = data[0])"
auto-load
/>
@ -305,9 +298,9 @@ function onBuysFetched(data) {
</span>
</template>
<template #column-ticketFk="{ row }">
<span class="q-pa-sm link">
{{ row.id }}
<TicketDescriptorProxy :id="row.id" />
<span class="link" @click.stop>
{{ row.ticketFk }}
<TicketDescriptorProxy :id="row.ticketFk" />
</span>
</template>
<template #column-alertLevelCode="props">