forked from verdnatura/salix-front
Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
This commit is contained in:
commit
13f8937f12
|
@ -27,7 +27,6 @@ const workerFilter = {
|
|||
},
|
||||
{ relation: 'sip', scope: { fields: ['extension', 'secret'] } },
|
||||
{ relation: 'department', scope: { include: { relation: 'department' } } },
|
||||
{ relation: 'client', scope: { fields: ['phone'] } },
|
||||
],
|
||||
};
|
||||
const workersFilter = {
|
||||
|
@ -87,11 +86,13 @@ const maritalStatus = [
|
|||
:label="t('Mobile extension')"
|
||||
clearable
|
||||
/>
|
||||
<<<<<<< HEAD
|
||||
<VnInput
|
||||
v-model="data.client.phone"
|
||||
:label="t('Personal phone')"
|
||||
clearable
|
||||
/>
|
||||
======= >>>>>>> 095e62ebac4b6b88bc431f7c87455a0bb0989e80
|
||||
</VnRow>
|
||||
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
|
@ -163,7 +164,6 @@ es:
|
|||
Last name: Apellidos
|
||||
Business phone: Teléfono de empresa
|
||||
Mobile extension: Extensión móvil
|
||||
Personal phone: Teléfono personal
|
||||
Boss: Jefe
|
||||
Marital status: Estado civil
|
||||
Married: Casado/a
|
||||
|
|
|
@ -31,9 +31,29 @@ const entityId = computed(() => {
|
|||
});
|
||||
|
||||
const worker = ref();
|
||||
const filter = computed(() => {
|
||||
return { where: { id: entityId.value } };
|
||||
});
|
||||
const filter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['email', 'name', 'nickname'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'department',
|
||||
scope: {
|
||||
include: [
|
||||
{
|
||||
relation: 'department',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'sip',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const sip = ref(null);
|
||||
|
||||
|
@ -62,7 +82,7 @@ const setData = (entity) => {
|
|||
<CardDescriptor
|
||||
module="Worker"
|
||||
data-key="workerData"
|
||||
url="Workers/summary"
|
||||
:url="`Workers/${entityId}`"
|
||||
:filter="filter"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
|
|
|
@ -27,18 +27,46 @@ onMounted(async () => {
|
|||
workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
|
||||
});
|
||||
|
||||
const filter = computed(() => {
|
||||
return { where: { id: entityId.value } };
|
||||
});
|
||||
const filter = {
|
||||
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>
|
||||
|
||||
<template>
|
||||
<CardSummary
|
||||
data-key="workerData"
|
||||
ref="summary"
|
||||
:url="`Workers/summary`"
|
||||
:filter="filter"
|
||||
>
|
||||
<CardSummary ref="summary" :url="`Workers/${entityId}`" :filter="filter">
|
||||
<template #header="{ entity }">
|
||||
<div>{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}</div>
|
||||
</template>
|
||||
|
@ -75,6 +103,12 @@ const filter = computed(() => {
|
|||
<VnLinkPhone :phone-number="worker.phone" />
|
||||
</template>
|
||||
</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" />
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
|
|
Loading…
Reference in New Issue