fix: monitorClients and monitorOrders descriptors
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Javier Segarra 2025-03-27 10:37:26 +01:00
parent 90a49a8513
commit d45990c4a1
2 changed files with 20 additions and 15 deletions

View File

@ -1,13 +1,14 @@
<script setup>
import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import DepartmentDescriptorProxy from '../Worker/Department/Card/DepartmentDescriptorProxy.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import { toDateFormat } from 'src/filters/date.js';
import VnTable from 'src/components/VnTable/VnTable.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue';
import VnRow from 'src/components/ui/VnRow.vue';
import { dateRange } from 'src/filters';
import useOpenURL from 'src/composables/useOpenURL';
const { t } = useI18n();
const dates = dateRange(Date.vnNew());
@ -124,12 +125,16 @@ const openTab = (id) => useOpenURL(`#/customer/${id}/summary`);
</VnRow>
</template>
<template #column-departmentFk="{ row }">
<span class="link" :title="row.department" v-text="row.department" />
<WorkerDescriptorProxy :id="row.departmentFk" dense />
<span @click.stop.prevent class="link" :title="row.department">
{{ row.department }}
<DepartmentDescriptorProxy :id="row.departmentFk" dense
/></span>
</template>
<template #column-clientFk="{ row }">
<span class="link" :title="row.clientName" v-text="row.clientName" />
<CustomerDescriptorProxy :id="row.clientFk" />
<span @click.stop.prevent class="link" :title="row.clientName">
{{ row.clientName }}
<CustomerDescriptorProxy :id="row.clientFk" dense
/></span>
</template>
</VnTable>
</template>

View File

@ -9,6 +9,7 @@ import { toDateFormat, toDateTimeFormat } from 'src/filters/date.js';
import { toCurrency } from 'src/filters';
import { useVnConfirm } from 'composables/useVnConfirm';
import axios from 'axios';
import useOpenURL from 'src/composables/useOpenURL';
const { t } = useI18n();
const { openConfirmationModal } = useVnConfirm();
@ -108,8 +109,7 @@ const removeOrders = async () => {
await table.value.reload();
};
const openTab = (id) =>
window.open(`#/order/${id}/summary`, '_blank', 'noopener, noreferrer');
const openTab = (id) => useOpenURL(`#/order/${id}/summary`);
</script>
<template>
<VnTable
@ -178,16 +178,16 @@ const openTab = (id) =>
</template>
<template #column-clientFk="{ row }">
<QTd @click.stop>
<span class="link" v-text="row.clientName" :title="row.clientName" />
<CustomerDescriptorProxy :id="row.clientFk" />
</QTd>
<span class="link" @click.stop :title="row.clientName">
{{ row.clientName }}
<CustomerDescriptorProxy :id="row.clientFk" dense
/></span>
</template>
<template #column-departmentFk="{ row }">
<QTd @click.stop>
<span class="link" v-text="row.departmentName" />
<DepartmentDescriptorProxy :id="row.departmentFk" dense />
</QTd>
<span class="link" @click.stop :title="row.departmentName">
{{ row.departmentName }}
<DepartmentDescriptorProxy :id="row.departmentFk" dense
/></span>
</template>
</VnTable>
</template>