forked from verdnatura/salix-front
Merge branch 'dev' into 7500_ChangeEntryDms
This commit is contained in:
commit
5f546a47bf
|
@ -1,12 +1,11 @@
|
|||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||
import WorkerChangePasswordForm from 'src/pages/Worker/Card/WorkerChangePasswordForm.vue';
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import axios from 'axios';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
|
@ -39,18 +38,6 @@ const entityId = computed(() => {
|
|||
const worker = ref();
|
||||
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 () => {
|
||||
try {
|
||||
const { data } = await axios.get(
|
||||
|
@ -176,10 +163,10 @@ const refetch = async () => await cardDescriptorRef.value.getData();
|
|||
<VnLinkPhone :phone-number="entity.phone" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :value="sip">
|
||||
<VnLv :value="worker?.sip?.extension">
|
||||
<template #label>
|
||||
{{ t('worker.summary.sipExtension') }}
|
||||
<VnLinkPhone v-if="sip" :phone-number="sip" />
|
||||
<VnLinkPhone :phone-number="worker?.sip?.extension" />
|
||||
</template>
|
||||
</VnLv>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue