forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 4074-useAcls
This commit is contained in:
commit
bef9b05b45
|
@ -1,12 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
import WorkerChangePasswordForm from 'src/pages/Worker/Card/WorkerChangePasswordForm.vue';
|
import WorkerChangePasswordForm from 'src/pages/Worker/Card/WorkerChangePasswordForm.vue';
|
||||||
import useCardDescription from 'src/composables/useCardDescription';
|
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import VnImg from 'src/components/ui/VnImg.vue';
|
import VnImg from 'src/components/ui/VnImg.vue';
|
||||||
|
@ -39,18 +38,6 @@ const entityId = computed(() => {
|
||||||
const worker = ref();
|
const worker = ref();
|
||||||
const workerExcluded = ref(false);
|
const workerExcluded = ref(false);
|
||||||
|
|
||||||
const sip = ref(null);
|
|
||||||
watch(
|
|
||||||
() => [worker.value?.sip?.extension, state.get('extension')],
|
|
||||||
([newWorkerSip, newStateExtension], [oldWorkerSip, oldStateExtension]) => {
|
|
||||||
if (newStateExtension !== oldStateExtension || sip.value === oldStateExtension) {
|
|
||||||
sip.value = newStateExtension;
|
|
||||||
} else if (newWorkerSip !== oldWorkerSip && sip.value !== newStateExtension) {
|
|
||||||
sip.value = newWorkerSip;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const getIsExcluded = async () => {
|
const getIsExcluded = async () => {
|
||||||
try {
|
try {
|
||||||
const { data } = await axios.get(
|
const { data } = await axios.get(
|
||||||
|
@ -176,10 +163,10 @@ const refetch = async () => await cardDescriptorRef.value.getData();
|
||||||
<VnLinkPhone :phone-number="entity.phone" />
|
<VnLinkPhone :phone-number="entity.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="sip">
|
<VnLv :value="worker?.sip?.extension">
|
||||||
<template #label>
|
<template #label>
|
||||||
{{ t('worker.summary.sipExtension') }}
|
{{ t('worker.summary.sipExtension') }}
|
||||||
<VnLinkPhone v-if="sip" :phone-number="sip" />
|
<VnLinkPhone :phone-number="worker?.sip?.extension" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue