feat: refs #6643 create VnUserLink
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-01-10 11:21:02 +01:00
parent 7b8ad3720e
commit 2555d2b2d1
19 changed files with 118 additions and 121 deletions

View File

@ -12,8 +12,8 @@ import { useValidator } from 'src/composables/useValidator';
import VnAvatar from '../ui/VnAvatar.vue'; import VnAvatar from '../ui/VnAvatar.vue';
import VnJsonValue from '../common/VnJsonValue.vue'; import VnJsonValue from '../common/VnJsonValue.vue';
import FetchData from '../FetchData.vue'; import FetchData from '../FetchData.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import VnSelectFilter from './VnSelectFilter.vue'; import VnSelectFilter from './VnSelectFilter.vue';
import VnUserLink from '../ui/VnUserLink.vue';
const stateStore = useStateStore(); const stateStore = useStateStore();
const validationsStore = useValidator(); const validationsStore = useValidator();
@ -421,15 +421,15 @@ setLogTree();
> >
<div class="timeline"> <div class="timeline">
<div class="user-avatar"> <div class="user-avatar">
<VnUserLink v-if="userLog.user.image" :worker-id="userLog.user.id">
<template #link>
<VnAvatar <VnAvatar
class="cursor-pointer" :class="{ 'cursor-pointer': userLog.user.id }"
:worker="userLog.user.id" :worker-id="userLog.user.id"
:title="userLog.user.nickname" :title="userLog.user.nickname"
/> />
<WorkerDescriptorProxy </template>
v-if="userLog.user.image" </VnUserLink>
:id="userLog.user.id"
/>
</div> </div>
<div class="arrow bg-panel" v-if="byRecord"></div> <div class="arrow bg-panel" v-if="byRecord"></div>
<div class="line"></div> <div class="line"></div>
@ -704,7 +704,7 @@ setLogTree();
class="q-pa-xs row items-center" class="q-pa-xs row items-center"
> >
<QItemSection class="col-3 items-center"> <QItemSection class="col-3 items-center">
<VnAvatar :worker="opt.id" /> <VnAvatar :worker-id="opt.id" />
</QItemSection> </QItemSection>
<QItemSection class="col-9 justify-center"> <QItemSection class="col-9 justify-center">
<span>{{ opt.name }}</span> <span>{{ opt.name }}</span>

View File

@ -1,10 +1,9 @@
<script setup> <script setup>
import { useSession } from 'src/composables/useSession'; import { useSession } from 'src/composables/useSession';
import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue';
const $props = defineProps({ const $props = defineProps({
worker: { type: Number, required: true }, workerId: { type: Number, required: true },
description: { type: String, default: null }, description: { type: String, default: null },
clickable: { type: Boolean, default: false },
}); });
const session = useSession(); const session = useSession();
const token = session.getToken(); const token = session.getToken();
@ -13,7 +12,7 @@ const token = session.getToken();
<div class="avatar-picture column items-center"> <div class="avatar-picture column items-center">
<QAvatar color="orange"> <QAvatar color="orange">
<QImg <QImg
:src="`/api/Images/user/160x160/${$props.worker}/download?access_token=${token}`" :src="`/api/Images/user/160x160/${$props.workerId}/download?access_token=${token}`"
spinner-color="white" spinner-color="white"
/> />
</QAvatar> </QAvatar>
@ -24,6 +23,5 @@ const token = session.getToken();
</p> </p>
</slot> </slot>
</div> </div>
<WorkerDescriptorProxy :v-if="$props.clickable" :id="$props.worker" />
</div> </div>
</template> </template>

View File

@ -1,11 +1,11 @@
<script setup> <script setup>
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import VnAvatar from 'src/components/ui/VnAvatar.vue'; import VnAvatar from 'src/components/ui/VnAvatar.vue';
import { toDateHour } from 'src/filters'; import { toDateHour } from 'src/filters';
import { ref } from 'vue'; import { ref } from 'vue';
import axios from 'axios'; import axios from 'axios';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import VnPaginate from './VnPaginate.vue'; import VnPaginate from './VnPaginate.vue';
import VnUserLink from '../ui/VnUserLink.vue';
const $props = defineProps({ const $props = defineProps({
id: { type: String, required: true }, id: { type: String, required: true },
@ -42,13 +42,14 @@ async function insert() {
<QCard class="q-pa-md q-mb-md" v-for="(note, index) in rows" :key="index"> <QCard class="q-pa-md q-mb-md" v-for="(note, index) in rows" :key="index">
<QCardSection horizontal> <QCardSection horizontal>
<slot name="picture"> <slot name="picture">
<VnAvatar :worker="note.workerFk" /> <VnAvatar :descriptor="false" :worker-id="note.workerFk" />
</slot> </slot>
<QItem class="full-width justify-between items-start"> <QItem class="full-width justify-between items-start">
<span class="link"> <VnUserLink
{{ `${note.worker.firstName} ${note.worker.lastName}` }} :name="`${note.worker.firstName} ${note.worker.lastName}`"
<WorkerDescriptorProxy :id="note.worker.id" /> :worker-id="note.worker.id"
</span> />
<slot name="actions"> <slot name="actions">
{{ toDateHour(note.created) }} {{ toDateHour(note.created) }}
</slot> </slot>

View File

@ -3,6 +3,7 @@ import { onBeforeMount } from 'vue';
import { date } from 'quasar'; import { date } from 'quasar';
import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue';
import VnAvatar from '../ui/VnAvatar.vue'; import VnAvatar from '../ui/VnAvatar.vue';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
const $props = defineProps({ const $props = defineProps({
url: { type: String, default: null }, url: { type: String, default: null },
@ -63,12 +64,15 @@ function formatNumber(number) {
> >
<QItem> <QItem>
<QItemSection side top> <QItemSection side top>
<VnUserLink :worker-id="row.sms?.senderFk">
<template #link>
<VnAvatar <VnAvatar
:worker-id="row.sms?.senderFk"
class="cursor-pointer" class="cursor-pointer"
:worker="row.sms.senderFk" :title="row.sms?.sender?.name"
:title="row.sms.sender.name"
:clickable="true"
/> />
</template>
</VnUserLink>
</QItemSection> </QItemSection>
<QSeparator /> <QSeparator />
<QItemSection> <QItemSection>

View File

@ -0,0 +1,21 @@
<script setup>
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import { useI18n } from 'vue-i18n';
const $props = defineProps({
name: { type: String, default: null },
workerId: { type: Number, default: null },
defaultName: { type: Boolean, default: false },
});
const { t } = useI18n();
</script>
<template>
<slot name="link">
<span :class="{ link: $props.workerId }">
{{ $props.defaultName ? $props.name ?? t('globals.system') : $props.name }}
</span>
</slot>
<WorkerDescriptorProxy v-if="$props.workerId" :id="$props.workerId" />
</template>
<style scoped></style>

View File

@ -63,6 +63,7 @@ export default {
selectRows: 'Select all { numberRows } row(s)', selectRows: 'Select all { numberRows } row(s)',
allRows: 'All { numberRows } row(s)', allRows: 'All { numberRows } row(s)',
markAll: 'Mark all', markAll: 'Mark all',
system: 'System',
}, },
errors: { errors: {
statusUnauthorized: 'Access denied', statusUnauthorized: 'Access denied',

View File

@ -62,6 +62,7 @@ export default {
selectRows: 'Seleccionar las { numberRows } filas(s)', selectRows: 'Seleccionar las { numberRows } filas(s)',
allRows: 'Todo { numberRows } filas(s)', allRows: 'Todo { numberRows } filas(s)',
markAll: 'Marcar todo', markAll: 'Marcar todo',
system: 'Sistema',
}, },
errors: { errors: {
statusUnauthorized: 'Acceso denegado', statusUnauthorized: 'Acceso denegado',

View File

@ -4,14 +4,12 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { toDate } from 'src/filters'; import { toDate } from 'src/filters';
import { useState } from 'src/composables/useState'; import { useState } from 'src/composables/useState';
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue'; import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue'; import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
import CardDescriptor from 'components/ui/CardDescriptor.vue'; import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription'; import useCardDescription from 'src/composables/useCardDescription';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
const $props = defineProps({ const $props = defineProps({
id: { id: {
@ -118,18 +116,18 @@ const setData = (entity) => {
:value="entity.worker.user.name" :value="entity.worker.user.name"
> >
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ entity.worker.user.name }} :name="entity.worker.user.name"
<WorkerDescriptorProxy :id="entity.worker.user.id" /> :worker-id="entity.worker.id"
</span> />
</template> </template>
</VnLv> </VnLv>
<VnLv :label="t('claim.card.commercial')"> <VnLv :label="t('claim.card.commercial')">
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ entity.client?.salesPersonUser?.name }} :name="entity.client?.salesPersonUser?.name"
<WorkerDescriptorProxy :id="entity.client?.salesPersonFk" /> :worker-id="entity.client?.salesPersonFk"
</span> />
</template> </template>
</VnLv> </VnLv>
<VnLv <VnLv

View File

@ -7,9 +7,9 @@ import CardSummary from 'components/ui/CardSummary.vue';
import FetchData from 'components/FetchData.vue'; import FetchData from 'components/FetchData.vue';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import { useSession } from 'src/composables/useSession'; import { useSession } from 'src/composables/useSession';
import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue'; import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -196,18 +196,18 @@ function openDialog(dmsId) {
</VnLv> </VnLv>
<VnLv :label="t('claim.summary.assignedTo')"> <VnLv :label="t('claim.summary.assignedTo')">
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ claim.worker.user.nickname }} :name="claim.worker?.user?.nickname"
<WorkerDescriptorProxy :id="claim.workerFk" /> :worker-id="claim.workerFk"
</span> />
</template> </template>
</VnLv> </VnLv>
<VnLv :label="t('claim.summary.attendedBy')"> <VnLv :label="t('claim.summary.attendedBy')">
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ claim.client.salesPersonUser.name }} :name="claim.client?.salesPersonUser?.name"
<WorkerDescriptorProxy :id="claim.client.salesPersonFk" /> :worker-id="claim.client?.salesPersonFk"
</span> />
</template> </template>
</VnLv> </VnLv>
</QCard> </QCard>
@ -313,20 +313,6 @@ function openDialog(dmsId) {
/> />
</div> </div>
</QCard> </QCard>
<!-- <QCardSection class="q-pa-md" v-if="observations.length > 0">
<h6>{{ t('claim.summary.notes') }}</h6>
<div class="note-list" v-for="note in observations" :key="note.id">
<div class="note-caption">
<span
>{{ note.worker.firstName }} {{ note.worker.lastName }}
</span>
<span>{{ toDate(note.created) }}</span>
</div>
<div class="note-text">
<span>{{ note.text }}</span>
</div>
</div>
</QCardSection> -->
<QDialog <QDialog
v-model="multimediaDialog" v-model="multimediaDialog"
transition-show="slide-up" transition-show="slide-up"

View File

@ -11,7 +11,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import CardList from 'src/components/ui/CardList.vue'; import CardList from 'src/components/ui/CardList.vue';
import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue'; import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue';
const stateStore = useStateStore(); const stateStore = useStateStore();
const router = useRouter(); const router = useRouter();
@ -98,10 +98,10 @@ function viewSummary(id) {
</VnLv> </VnLv>
<VnLv :label="t('claim.list.assignedTo')" @click.stop> <VnLv :label="t('claim.list.assignedTo')" @click.stop>
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ row.workerName }} :name="row.workerName"
<WorkerDescriptorProxy :id="row.workerFk" /> :worker-id="row.workerFk"
</span> />
</template> </template>
</VnLv> </VnLv>
<VnLv <VnLv

View File

@ -4,9 +4,9 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { toCurrency } from 'src/filters'; import { toCurrency } from 'src/filters';
import CardDescriptor from 'components/ui/CardDescriptor.vue'; import CardDescriptor from 'components/ui/CardDescriptor.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription'; import useCardDescription from 'src/composables/useCardDescription';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
const $props = defineProps({ const $props = defineProps({
id: { id: {
@ -44,10 +44,10 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
<template #body="{ entity }"> <template #body="{ entity }">
<VnLv v-if="entity.salesPersonUser" :label="t('customer.card.salesPerson')"> <VnLv v-if="entity.salesPersonUser" :label="t('customer.card.salesPerson')">
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ entity.salesPersonUser.name }} :name="entity.salesPersonUser?.name"
<WorkerDescriptorProxy :id="entity.salesPersonFk" /> :worker-id="entity.salesPersonFk"
</span> />
</template> </template>
</VnLv> </VnLv>
<VnLv :label="t('customer.card.credit')" :value="toCurrency(entity.credit)" /> <VnLv :label="t('customer.card.credit')" :value="toCurrency(entity.credit)" />

View File

@ -7,6 +7,7 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import { onMounted, watch } from 'vue'; import { onMounted, watch } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const stateStore = useStateStore(); const stateStore = useStateStore();
const { t } = useI18n(); const { t } = useI18n();
@ -74,11 +75,7 @@ onMounted(async () => {
</QDrawer> </QDrawer>
<QPageContainer> <QPageContainer>
<QPage> <QPage>
<QToolbar class="bg-vn-dark justify-end"> <VnSubToolbar />
<div id="st-data"></div>
<QSpace />
<div id="st-actions"></div>
</QToolbar>
<div class="q-pa-md"><RouterView></RouterView></div> <div class="q-pa-md"><RouterView></RouterView></div>
</QPage> </QPage>
</QPageContainer> </QPageContainer>

View File

@ -2,12 +2,12 @@
import { onMounted, ref, reactive } from 'vue'; import { onMounted, ref, reactive } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import invoiceOutService from 'src/services/invoiceOut.service'; import invoiceOutService from 'src/services/invoiceOut.service';
import { toCurrency } from 'src/filters'; import { toCurrency } from 'src/filters';
import { QCheckbox, QBtn } from 'quasar'; import { QCheckbox, QBtn } from 'quasar';
import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js'; import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js';
import VnInputDate from 'components/common/VnInputDate.vue'; import VnInputDate from 'components/common/VnInputDate.vue';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
const invoiceOutGlobalStore = useInvoiceOutGlobalStore(); const invoiceOutGlobalStore = useInvoiceOutGlobalStore();
@ -345,9 +345,9 @@ onMounted(() => refresh());
v-if="props.col.name === 'clientId'" v-if="props.col.name === 'clientId'"
:id="selectedCustomerId" :id="selectedCustomerId"
/> />
<WorkerDescriptorProxy <VnUserLink
v-if="props.col.name === 'comercial'" v-if="props.col.name === 'comercial'"
:id="selectedWorkerId" :worker-id="selectedWorkerId"
/> />
</component> </component>
</QTd> </QTd>

View File

@ -5,8 +5,8 @@ import { useI18n } from 'vue-i18n';
import CardDescriptor from 'components/ui/CardDescriptor.vue'; import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'components/ui/VnLv.vue'; import VnLv from 'components/ui/VnLv.vue';
import useCardDescription from 'composables/useCardDescription'; import useCardDescription from 'composables/useCardDescription';
import WorkerDescriptorProxy from "pages/Worker/Card/WorkerDescriptorProxy.vue"; import ShelvingDescriptorMenu from 'pages/Shelving/Card/ShelvingDescriptorMenu.vue';
import ShelvingDescriptorMenu from "pages/Shelving/Card/ShelvingDescriptorMenu.vue"; import VnUserLink from 'src/components/ui/VnUserLink.vue';
const $props = defineProps({ const $props = defineProps({
id: { id: {
@ -57,14 +57,14 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
<VnLv :label="t('shelving.summary.parking')" :value="entity.parking?.code" /> <VnLv :label="t('shelving.summary.parking')" :value="entity.parking?.code" />
<VnLv v-if="entity.worker" :label="t('shelving.summary.worker')"> <VnLv v-if="entity.worker" :label="t('shelving.summary.worker')">
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ entity.worker?.user?.nickname }} :name="entity.worker?.user?.nickname"
<WorkerDescriptorProxy :id="entity.worker?.id" /> :worker-id="entity.worker?.id"
</span> />
</template> </template>
</VnLv> </VnLv>
</template> </template>
<template #menu="{entity}"> <template #menu="{ entity }">
<ShelvingDescriptorMenu :shelving="entity" /> <ShelvingDescriptorMenu :shelving="entity" />
</template> </template>
</CardDescriptor> </CardDescriptor>

View File

@ -3,11 +3,11 @@ import { onMounted, ref, computed, onUpdated } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue'; import CardSummary from 'components/ui/CardSummary.vue';
import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import { useRole } from 'src/composables/useRole'; import { useRole } from 'src/composables/useRole';
import { dashIfEmpty } from 'src/filters'; import { dashIfEmpty } from 'src/filters';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
onUpdated(() => summaryRef.value.fetch()); onUpdated(() => summaryRef.value.fetch());
@ -71,13 +71,10 @@ const isAdministrative = computed(() => {
<VnLv label="Alias" :value="supplier.nickname" /> <VnLv label="Alias" :value="supplier.nickname" />
<VnLv :label="t('supplier.summary.responsible')"> <VnLv :label="t('supplier.summary.responsible')">
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ dashIfEmpty(supplier.worker?.user?.nickname) }} :name="dashIfEmpty(supplier.worker?.user?.nickname)"
<WorkerDescriptorProxy :worker-id="supplier.worker?.user?.id"
v-if="supplier.worker?.user?.id"
:id="supplier.worker?.user?.id"
/> />
</span>
</template> </template>
</VnLv> </VnLv>
<VnLv :label="t('supplier.summary.notes')" class="q-mb-xs"> <VnLv :label="t('supplier.summary.notes')" class="q-mb-xs">

View File

@ -8,7 +8,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
import TicketDescriptorMenu from './TicketDescriptorMenu.vue'; import TicketDescriptorMenu from './TicketDescriptorMenu.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription'; import useCardDescription from 'src/composables/useCardDescription';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue';
const $props = defineProps({ const $props = defineProps({
id: { id: {
@ -106,13 +106,10 @@ const setData = (entity) =>
</VnLv> </VnLv>
<VnLv :label="t('ticket.summary.salesPerson')"> <VnLv :label="t('ticket.summary.salesPerson')">
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ entity.client.salesPersonUser.name }} :name="entity.client.salesPersonUser?.name"
<WorkerDescriptorProxy :worker-id="entity.client.salesPersonFk"
:id="entity.client.salesPersonFk"
v-if="entity.client.salesPersonFk"
/> />
</span>
</template> </template>
</VnLv> </VnLv>
<VnLv :label="t('ticket.card.warehouse')" :value="entity.warehouse?.name" /> <VnLv :label="t('ticket.card.warehouse')" :value="entity.warehouse?.name" />

View File

@ -8,10 +8,10 @@ import CardSummary from 'components/ui/CardSummary.vue';
import FetchData from 'components/FetchData.vue'; import FetchData from 'components/FetchData.vue';
import FetchedTags from 'components/ui/FetchedTags.vue'; import FetchedTags from 'components/ui/FetchedTags.vue';
import InvoiceOutDescriptorProxy from 'pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue'; import InvoiceOutDescriptorProxy from 'pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.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 { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
onUpdated(() => summaryRef.value.fetch()); onUpdated(() => summaryRef.value.fetch());
@ -160,13 +160,10 @@ async function changeState(value) {
</VnLv> </VnLv>
<VnLv :label="t('ticket.summary.salesPerson')"> <VnLv :label="t('ticket.summary.salesPerson')">
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ ticket.client?.salesPersonUser?.name }} :name="ticket.client?.salesPersonUser?.name"
<WorkerDescriptorProxy :worker-id="ticket.client?.salesPersonFk"
:id="ticket.client.salesPersonFk"
v-if="ticket.client.salesPersonFk"
/> />
</span>
</template> </template>
</VnLv> </VnLv>
<VnLv <VnLv

View File

@ -2,12 +2,12 @@
import { ref, onMounted, computed } from 'vue'; import { ref, onMounted, computed } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue'; import { dashIfEmpty } from 'src/filters';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import WorkerDescriptorProxy from './WorkerDescriptorProxy.vue';
import { dashIfEmpty } from 'src/filters';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import CardSummary from 'components/ui/CardSummary.vue';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -83,13 +83,11 @@ const filter = {
<VnLv :label="t('worker.list.email')" :value="worker.user.email" /> <VnLv :label="t('worker.list.email')" :value="worker.user.email" />
<VnLv :label="t('worker.summary.boss')" link> <VnLv :label="t('worker.summary.boss')" link>
<template #value> <template #value>
<span class="link"> <VnUserLink
{{ dashIfEmpty(worker.boss?.name) }}
<WorkerDescriptorProxy
:id="worker.bossFk"
v-if="worker.boss" v-if="worker.boss"
:name="dashIfEmpty(worker.boss?.name)"
:worker-id="worker.bossFk"
/> />
</span>
</template> </template>
</VnLv> </VnLv>
<VnLv :value="worker.mobileExtension"> <VnLv :value="worker.mobileExtension">

View File

@ -36,6 +36,7 @@ export const useStateStore = defineStore('stateStore', () => {
} }
function isSubToolbarShown() { function isSubToolbarShown() {
console.log('ye', subToolbar.value);
return subToolbar.value; return subToolbar.value;
} }