Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into 8638-entryUpgradesForInvoiceInFixes
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
commit
c9bd7d1a47
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, toRefs, computed, watch, onMounted, useAttrs } from 'vue';
|
import { ref, toRefs, computed, watch, onMounted, useAttrs, nextTick } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import { useRequired } from 'src/composables/useRequired';
|
import { useRequired } from 'src/composables/useRequired';
|
||||||
|
@ -247,6 +247,7 @@ async function fetchFilter(val) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function filterHandler(val, update) {
|
async function filterHandler(val, update) {
|
||||||
|
if (isLoading.value) return update();
|
||||||
if (!val && lastVal.value === val) {
|
if (!val && lastVal.value === val) {
|
||||||
lastVal.value = val;
|
lastVal.value = val;
|
||||||
return update();
|
return update();
|
||||||
|
@ -294,6 +295,7 @@ async function onScroll({ to, direction, from, index }) {
|
||||||
await arrayData.loadMore();
|
await arrayData.loadMore();
|
||||||
setOptions(arrayData.store.data);
|
setOptions(arrayData.store.data);
|
||||||
vnSelectRef.value.scrollTo(lastIndex);
|
vnSelectRef.value.scrollTo(lastIndex);
|
||||||
|
await nextTick();
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,10 @@ const $props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: 'md-width',
|
default: 'md-width',
|
||||||
},
|
},
|
||||||
|
toModule: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const state = useState();
|
const state = useState();
|
||||||
|
@ -129,6 +133,9 @@ const emit = defineEmits(['onFetch']);
|
||||||
|
|
||||||
const iconModule = computed(() => {
|
const iconModule = computed(() => {
|
||||||
moduleName.value = getName();
|
moduleName.value = getName();
|
||||||
|
if ($props.toModule) {
|
||||||
|
return router.getRoutes().find((r) => r.name === $props.toModule.name).meta.icon;
|
||||||
|
}
|
||||||
if (isSameModuleName) {
|
if (isSameModuleName) {
|
||||||
return router.options.routes[1].children.find((r) => r.name === moduleName.value)
|
return router.options.routes[1].children.find((r) => r.name === moduleName.value)
|
||||||
?.meta?.icon;
|
?.meta?.icon;
|
||||||
|
@ -139,9 +146,10 @@ const iconModule = computed(() => {
|
||||||
|
|
||||||
const toModule = computed(() => {
|
const toModule = computed(() => {
|
||||||
moduleName.value = getName();
|
moduleName.value = getName();
|
||||||
|
if ($props.toModule) return $props.toModule;
|
||||||
if (isSameModuleName) {
|
if (isSameModuleName) {
|
||||||
return router.options.routes[1].children.find((r) => r.name === moduleName.value)
|
return router.options.routes[1].children.find((r) => r.name === moduleName.value)
|
||||||
?.children[0]?.redirect;
|
?.redirect;
|
||||||
} else {
|
} else {
|
||||||
return route.matched[1].path.split('/').length > 2
|
return route.matched[1].path.split('/').length > 2
|
||||||
? route.matched[1].redirect
|
? route.matched[1].redirect
|
||||||
|
|
|
@ -893,6 +893,8 @@ components:
|
||||||
VnLv:
|
VnLv:
|
||||||
copyText: '{copyValue} has been copied to the clipboard'
|
copyText: '{copyValue} has been copied to the clipboard'
|
||||||
iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789'
|
iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789'
|
||||||
|
VnNotes:
|
||||||
|
clientWithoutPhone: 'The following clients do not have a phone number and the message will not be sent to them: {clientWithoutPhone}'
|
||||||
weekdays:
|
weekdays:
|
||||||
sun: Sunday
|
sun: Sunday
|
||||||
mon: Monday
|
mon: Monday
|
||||||
|
|
|
@ -977,6 +977,8 @@ components:
|
||||||
VnLv:
|
VnLv:
|
||||||
copyText: '{copyValue} se ha copiado al portapepeles'
|
copyText: '{copyValue} se ha copiado al portapepeles'
|
||||||
iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789'
|
iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789'
|
||||||
|
VnNotes:
|
||||||
|
clientWithoutPhone: 'Estos clientes no tienen asociado número de télefono y el sms no les será enviado: {clientWithoutPhone}'
|
||||||
weekdays:
|
weekdays:
|
||||||
sun: Domingo
|
sun: Domingo
|
||||||
mon: Lunes
|
mon: Lunes
|
||||||
|
|
|
@ -53,6 +53,7 @@ const removeAlias = () => {
|
||||||
:url="`MailAliases/${entityId}`"
|
:url="`MailAliases/${entityId}`"
|
||||||
data-key="Alias"
|
data-key="Alias"
|
||||||
title="alias"
|
title="alias"
|
||||||
|
:to-module="{ name: 'AccountAlias' }"
|
||||||
>
|
>
|
||||||
<template #menu>
|
<template #menu>
|
||||||
<QItem v-ripple clickable @click="removeAlias()">
|
<QItem v-ripple clickable @click="removeAlias()">
|
||||||
|
|
|
@ -37,6 +37,7 @@ const removeRole = async () => {
|
||||||
:filter="{ where: { id: entityId } }"
|
:filter="{ where: { id: entityId } }"
|
||||||
data-key="Role"
|
data-key="Role"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
|
:to-module="{ name: 'AccountRoles' }"
|
||||||
>
|
>
|
||||||
<template #menu>
|
<template #menu>
|
||||||
<QItem v-ripple clickable @click="removeRole()">
|
<QItem v-ripple clickable @click="removeRole()">
|
||||||
|
|
|
@ -30,6 +30,7 @@ const entityId = computed(() => {
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
title="code"
|
title="code"
|
||||||
data-key="ItemType"
|
data-key="ItemType"
|
||||||
|
:to-module="{ name: 'ItemTypeList' }"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="$t('itemType.shared.code')" :value="entity.code" />
|
<VnLv :label="$t('itemType.shared.code')" :value="entity.code" />
|
||||||
|
|
|
@ -26,6 +26,7 @@ const card = computed(() => store.data);
|
||||||
:url="`Agencies/${entityId}`"
|
:url="`Agencies/${entityId}`"
|
||||||
:title="card?.name"
|
:title="card?.name"
|
||||||
:subtitle="props.id"
|
:subtitle="props.id"
|
||||||
|
:to-module="{ name: 'RouteAgency' }"
|
||||||
>
|
>
|
||||||
<template #body="{ entity: agency }">
|
<template #body="{ entity: agency }">
|
||||||
<VnLv :label="t('globals.name')" :value="agency.name" />
|
<VnLv :label="t('globals.name')" :value="agency.name" />
|
||||||
|
|
|
@ -35,6 +35,7 @@ const entityId = computed(() => {
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
data-key="Roadmap"
|
data-key="Roadmap"
|
||||||
:summary="summary"
|
:summary="summary"
|
||||||
|
:to-module="{ name: 'RouteRoadmap' }"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
||||||
|
|
|
@ -199,12 +199,22 @@ const confirmRemove = (ticket) => {
|
||||||
const openSmsDialog = async () => {
|
const openSmsDialog = async () => {
|
||||||
const clientsId = [];
|
const clientsId = [];
|
||||||
const clientsPhone = [];
|
const clientsPhone = [];
|
||||||
|
const clientWithoutPhone = [];
|
||||||
for (let ticket of selectedRows.value) {
|
for (let ticket of selectedRows.value) {
|
||||||
clientsId.push(ticket?.clientFk);
|
clientsId.push(ticket?.clientFk);
|
||||||
const { data: client } = await axios.get(`Clients/${ticket?.clientFk}`);
|
const { data: client } = await axios.get(`Clients/${ticket?.clientFk}`);
|
||||||
|
if (!client.phone) {
|
||||||
|
clientWithoutPhone.push(ticket?.clientFk);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
clientsPhone.push(client.phone);
|
clientsPhone.push(client.phone);
|
||||||
}
|
}
|
||||||
|
if (clientWithoutPhone.length) {
|
||||||
|
quasar.notify({
|
||||||
|
type: 'warning',
|
||||||
|
message: t('components.VnNotes.clientWithoutPhone', { clientWithoutPhone }),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: SendSmsDialog,
|
component: SendSmsDialog,
|
||||||
|
|
|
@ -24,6 +24,7 @@ const entityId = computed(() => props.id || route.params.id);
|
||||||
:url="`Vehicles/${entityId}`"
|
:url="`Vehicles/${entityId}`"
|
||||||
data-key="Vehicle"
|
data-key="Vehicle"
|
||||||
title="numberPlate"
|
title="numberPlate"
|
||||||
|
:to-module="{ name: 'RouteVehicle' }"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<QItem
|
<QItem
|
||||||
|
|
|
@ -21,7 +21,7 @@ const entityId = computed(() => props.id || route.params.id);
|
||||||
:url="`Parkings/${entityId}`"
|
:url="`Parkings/${entityId}`"
|
||||||
title="code"
|
title="code"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:to-module="{ name: 'ParkingList' }"
|
:to-module="{ name: 'ParkingMain' }"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="$t('globals.code')" :value="entity.code" />
|
<VnLv :label="$t('globals.code')" :value="entity.code" />
|
||||||
|
|
|
@ -16,6 +16,7 @@ const $props = defineProps({
|
||||||
v-if="$props.id"
|
v-if="$props.id"
|
||||||
:id="$props.id"
|
:id="$props.id"
|
||||||
:summary="DepartmentSummary"
|
:summary="DepartmentSummary"
|
||||||
|
data-key="DepartmentDescriptorProxy"
|
||||||
/>
|
/>
|
||||||
</QPopupProxy>
|
</QPopupProxy>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -271,12 +271,14 @@ export default {
|
||||||
path: 'department',
|
path: 'department',
|
||||||
name: 'Department',
|
name: 'Department',
|
||||||
redirect: { name: 'WorkerDepartment' },
|
redirect: { name: 'WorkerDepartment' },
|
||||||
component: () => import('src/pages/Worker/WorkerDepartment.vue'),
|
meta: { title: 'department', icon: 'vn:greuge' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Worker/WorkerDepartment.vue'),
|
||||||
|
meta: { title: 'department', icon: 'vn:greuge' },
|
||||||
name: 'WorkerDepartment',
|
name: 'WorkerDepartment',
|
||||||
path: 'list',
|
path: 'list',
|
||||||
meta: { title: 'department', icon: 'vn:greuge' },
|
|
||||||
},
|
},
|
||||||
departmentCard,
|
departmentCard,
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue