forked from verdnatura/salix-front
Merge branch 'test' into fix_Customer_1
This commit is contained in:
commit
2fc3868a25
|
@ -27,7 +27,6 @@ const workerFilter = {
|
||||||
},
|
},
|
||||||
{ relation: 'sip', scope: { fields: ['extension', 'secret'] } },
|
{ relation: 'sip', scope: { fields: ['extension', 'secret'] } },
|
||||||
{ relation: 'department', scope: { include: { relation: 'department' } } },
|
{ relation: 'department', scope: { include: { relation: 'department' } } },
|
||||||
{ relation: 'client', scope: { fields: ['phone'] } },
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const workersFilter = {
|
const workersFilter = {
|
||||||
|
@ -87,11 +86,6 @@ const maritalStatus = [
|
||||||
:label="t('Mobile extension')"
|
:label="t('Mobile extension')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
<VnInput
|
|
||||||
v-model="data.client.phone"
|
|
||||||
:label="t('Personal phone')"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
@ -163,7 +157,6 @@ es:
|
||||||
Last name: Apellidos
|
Last name: Apellidos
|
||||||
Business phone: Teléfono de empresa
|
Business phone: Teléfono de empresa
|
||||||
Mobile extension: Extensión móvil
|
Mobile extension: Extensión móvil
|
||||||
Personal phone: Teléfono personal
|
|
||||||
Boss: Jefe
|
Boss: Jefe
|
||||||
Marital status: Estado civil
|
Marital status: Estado civil
|
||||||
Married: Casado/a
|
Married: Casado/a
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import WorkerDescriptor from './WorkerDescriptor.vue';
|
import WorkerDescriptor from './WorkerDescriptor.vue';
|
||||||
|
|
||||||
const filter = { where: {} };
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCard
|
||||||
data-key="Worker"
|
data-key="Worker"
|
||||||
custom-url="Workers/Summary"
|
base-url="Workers"
|
||||||
:descriptor="WorkerDescriptor"
|
:descriptor="WorkerDescriptor"
|
||||||
:filter="filter"
|
|
||||||
searchbar-data-key="WorkerList"
|
searchbar-data-key="WorkerList"
|
||||||
searchbar-url="Workers/filter"
|
searchbar-url="Workers/filter"
|
||||||
searchbar-label="Search worker"
|
searchbar-label="Search worker"
|
||||||
|
|
|
@ -31,9 +31,29 @@ const entityId = computed(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const worker = ref();
|
const worker = ref();
|
||||||
const filter = computed(() => {
|
const filter = {
|
||||||
return { where: { id: entityId.value } };
|
include: [
|
||||||
});
|
{
|
||||||
|
relation: 'user',
|
||||||
|
scope: {
|
||||||
|
fields: ['email', 'name', 'nickname'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'department',
|
||||||
|
scope: {
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'department',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'sip',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
const sip = ref(null);
|
const sip = ref(null);
|
||||||
|
|
||||||
|
@ -62,7 +82,7 @@ const setData = (entity) => {
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
module="Worker"
|
module="Worker"
|
||||||
data-key="workerData"
|
data-key="workerData"
|
||||||
url="Workers/summary"
|
:url="`Workers/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:title="data.title"
|
:title="data.title"
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
|
|
|
@ -27,18 +27,46 @@ onMounted(async () => {
|
||||||
workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
|
workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = computed(() => {
|
const filter = {
|
||||||
return { where: { id: entityId.value } };
|
include: [
|
||||||
});
|
{
|
||||||
|
relation: 'user',
|
||||||
|
scope: {
|
||||||
|
fields: ['email', 'name', 'nickname', 'roleFk'],
|
||||||
|
include: {
|
||||||
|
relation: 'role',
|
||||||
|
scope: {
|
||||||
|
fields: ['name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'department',
|
||||||
|
scope: {
|
||||||
|
include: {
|
||||||
|
relation: 'department',
|
||||||
|
scope: {
|
||||||
|
fields: ['name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'boss',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'client',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'sip',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardSummary
|
<CardSummary ref="summary" :url="`Workers/${entityId}`" :filter="filter">
|
||||||
data-key="workerData"
|
|
||||||
ref="summary"
|
|
||||||
:url="`Workers/summary`"
|
|
||||||
:filter="filter"
|
|
||||||
>
|
|
||||||
<template #header="{ entity }">
|
<template #header="{ entity }">
|
||||||
<div>{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}</div>
|
<div>{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -75,6 +103,12 @@ const filter = computed(() => {
|
||||||
<VnLinkPhone :phone-number="worker.phone" />
|
<VnLinkPhone :phone-number="worker.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
<VnLv :value="worker.client?.phone">
|
||||||
|
<template #label>
|
||||||
|
{{ t('worker.summary.personalPhone') }}
|
||||||
|
<VnLinkPhone :phone-number="worker.client?.phone" />
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
|
|
Loading…
Reference in New Issue