forked from verdnatura/salix-front
fix: refs #6630 resolve conficts
This commit is contained in:
commit
0eb7d0f1b0
|
@ -1,10 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar, Dark } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const { availableLocales, locale, fallbackLocale } = useI18n();
|
const { availableLocales, locale, fallbackLocale } = useI18n();
|
||||||
|
Dark.set(true);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
let userLang = window.navigator.language;
|
let userLang = window.navigator.language;
|
||||||
|
|
|
@ -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();
|
||||||
|
@ -422,16 +422,15 @@ setLogTree();
|
||||||
>
|
>
|
||||||
<div class="timeline">
|
<div class="timeline">
|
||||||
<div class="user-avatar">
|
<div class="user-avatar">
|
||||||
<VnAvatar
|
<VnUserLink v-if="userLog.user.image" :worker-id="userLog.user.id">
|
||||||
class="cursor-pointer"
|
<template #link>
|
||||||
:worker="userLog.user.id"
|
<VnAvatar
|
||||||
:title="userLog.user.nickname"
|
:class="{ 'cursor-pointer': userLog.user.id }"
|
||||||
size="lg"
|
:worker-id="userLog.user.id"
|
||||||
/>
|
:title="userLog.user.nickname"
|
||||||
<WorkerDescriptorProxy
|
/>
|
||||||
v-if="userLog.user.image"
|
</template>
|
||||||
:id="userLog.user.id"
|
</VnUserLink>
|
||||||
/>
|
|
||||||
</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>
|
||||||
|
@ -706,7 +705,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>
|
||||||
|
|
|
@ -1,11 +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 },
|
|
||||||
size: { type: String, default: 'xl' },
|
|
||||||
});
|
});
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
const token = session.getToken();
|
const token = session.getToken();
|
||||||
|
@ -14,7 +12,7 @@ const token = session.getToken();
|
||||||
<div class="avatar-picture column items-center">
|
<div class="avatar-picture column items-center">
|
||||||
<QAvatar color="orange" :size="$props.size">
|
<QAvatar color="orange" :size="$props.size">
|
||||||
<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>
|
||||||
|
@ -25,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>
|
||||||
|
|
|
@ -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 },
|
||||||
|
@ -28,7 +28,7 @@ async function insert() {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="column items-center">
|
<div class="column items-center full-height">
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
:data-key="$props.url"
|
:data-key="$props.url"
|
||||||
:url="$props.url"
|
:url="$props.url"
|
||||||
|
@ -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>
|
||||||
|
@ -115,6 +116,10 @@ async function insert() {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.q-card {
|
.q-card {
|
||||||
max-width: 80em;
|
max-width: 80em;
|
||||||
|
|
||||||
|
&__section {
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.q-dialog .q-card {
|
.q-dialog .q-card {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
|
|
|
@ -168,7 +168,12 @@ async function onLoad(...params) {
|
||||||
</QCard>
|
</QCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<QInfiniteScroll v-if="store.data" @load="onLoad" :offset="offset" class="full-width">
|
<QInfiniteScroll
|
||||||
|
v-if="store.data"
|
||||||
|
@load="onLoad"
|
||||||
|
:offset="offset"
|
||||||
|
class="full-width full-height overflow-auto"
|
||||||
|
>
|
||||||
<slot name="body" :rows="store.data"></slot>
|
<slot name="body" :rows="store.data"></slot>
|
||||||
<div v-if="isLoading" class="info-row q-pa-md text-center">
|
<div v-if="isLoading" class="info-row q-pa-md text-center">
|
||||||
<QSpinner color="orange" size="md" />
|
<QSpinner color="orange" size="md" />
|
||||||
|
|
|
@ -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>
|
||||||
<VnAvatar
|
<VnUserLink :worker-id="row.sms?.senderFk">
|
||||||
class="cursor-pointer"
|
<template #link>
|
||||||
:worker="row.sms.senderFk"
|
<VnAvatar
|
||||||
:title="row.sms.sender.name"
|
:worker-id="row.sms?.senderFk"
|
||||||
:clickable="true"
|
class="cursor-pointer"
|
||||||
/>
|
:title="row.sms?.sender?.name"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</VnUserLink>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
|
|
|
@ -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>
|
|
@ -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',
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import Navbar from 'src/components/NavBar.vue';
|
import Navbar from 'src/components/NavBar.vue';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ const userLocale = computed({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const darkMode = computed({
|
const darkMode = computed({
|
||||||
get() {
|
get() {
|
||||||
return Dark.isActive;
|
return Dark.isActive;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -8,6 +8,10 @@ const state = useState();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const id = route.params.id;
|
const id = route.params.id;
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
addNote: { type: Boolean, default: true },
|
||||||
|
});
|
||||||
|
|
||||||
const claimFilter = {
|
const claimFilter = {
|
||||||
where: { claimFk: id },
|
where: { claimFk: id },
|
||||||
fields: ['created', 'workerFk', 'text'],
|
fields: ['created', 'workerFk', 'text'],
|
||||||
|
@ -27,7 +31,7 @@ const body = {
|
||||||
<template>
|
<template>
|
||||||
<div class="column items-center">
|
<div class="column items-center">
|
||||||
<VnNotes
|
<VnNotes
|
||||||
:add-note="true"
|
:add-note="$props.addNote"
|
||||||
:id="id"
|
:id="id"
|
||||||
url="claimObservations"
|
url="claimObservations"
|
||||||
:filter="claimFilter"
|
:filter="claimFilter"
|
||||||
|
|
|
@ -7,8 +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 VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -195,30 +196,30 @@ 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>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-max claimVnNotes">
|
||||||
<a class="header" :href="claimUrl + 'note/index'">
|
<a class="header" :href="`#/claim/${entityId}/notes`">
|
||||||
{{ t('claim.summary.notes') }}
|
{{ t('claim.summary.notes') }}
|
||||||
<QIcon name="open_in_new" color="primary" />
|
<QIcon name="open_in_new" color="primary" />
|
||||||
</a>
|
</a>
|
||||||
<!-- Use VnNotes and maybe VirtualScroll-->
|
<ClaimNotes :add-note="false" style="height: 350px" order="created ASC" />
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-max" v-if="salesClaimed.length > 0">
|
<QCard class="vn-max" v-if="salesClaimed.length > 0">
|
||||||
<a class="header" :href="claimUrl + 'note/index'">
|
<a class="header" :href="`#/claim/${entityId}/lines`">
|
||||||
{{ t('claim.summary.details') }}
|
{{ t('claim.summary.details') }}
|
||||||
<QIcon name="open_in_new" color="primary" />
|
<QIcon name="open_in_new" color="primary" />
|
||||||
</a>
|
</a>
|
||||||
|
@ -312,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"
|
||||||
|
@ -368,6 +355,13 @@ function openDialog(dmsId) {
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
</template>
|
</template>
|
||||||
|
<style lang="scss">
|
||||||
|
.claimVnNotes {
|
||||||
|
.q-card {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.q-dialog__inner--minimized > div {
|
.q-dialog__inner--minimized > div {
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)" />
|
||||||
|
|
|
@ -123,8 +123,7 @@ function stateColor(row) {
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
<QPage class="column items-center q-pa-md customer-payments">
|
<QPage class="column items-center q-pa-md customer-payments">
|
||||||
<div class="card-list">
|
<div class="card-list">
|
||||||
<QToolbar class="q-pa-none">
|
<QToolbar class="q-pa-none justify-end">
|
||||||
<QToolbarTitle>{{ t('Web Payments') }}</QToolbarTitle>
|
|
||||||
<QBtn
|
<QBtn
|
||||||
@click="arrayData.refresh()"
|
@click="arrayData.refresh()"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
|
@ -133,7 +132,7 @@ function stateColor(row) {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
></QBtn>
|
/>
|
||||||
<QBtn @click="grid = !grid" icon="list" color="primary" round dense>
|
<QBtn @click="grid = !grid" icon="list" color="primary" round dense>
|
||||||
<QTooltip>{{ t('Change view') }}</QTooltip>
|
<QTooltip>{{ t('Change view') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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" />
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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) }}
|
v-if="worker.boss"
|
||||||
<WorkerDescriptorProxy
|
:name="dashIfEmpty(worker.boss?.name)"
|
||||||
:id="worker.bossFk"
|
:worker-id="worker.bossFk"
|
||||||
v-if="worker.boss"
|
/>
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="worker.mobileExtension">
|
<VnLv :value="worker.mobileExtension">
|
||||||
|
|
|
@ -138,23 +138,20 @@ Cypress.Commands.add('validateRow', (rowSelector, expectedValues) => {
|
||||||
|
|
||||||
Cypress.Commands.add('removeRow', (rowIndex) => {
|
Cypress.Commands.add('removeRow', (rowIndex) => {
|
||||||
let rowsBefore;
|
let rowsBefore;
|
||||||
let rowsAfter;
|
cy.get('tbody > tr:visible')
|
||||||
|
|
||||||
cy.get('tr')
|
|
||||||
.its('length')
|
.its('length')
|
||||||
.then((length) => {
|
.then((length) => {
|
||||||
rowsBefore = length;
|
|
||||||
cy.get('.q-checkbox').eq(rowIndex).click();
|
cy.get('.q-checkbox').eq(rowIndex).click();
|
||||||
cy.removeCard();
|
cy.removeCard();
|
||||||
cy.get('.q-dialog button').eq(2).click();
|
cy.get('.q-dialog button').eq(2).click();
|
||||||
|
rowsBefore = length;
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.get('tr')
|
// Check the existence of tbody before performing the second assertion.
|
||||||
.its('length')
|
cy.get('tbody').then(($tbody) => {
|
||||||
.then((length) => {
|
if ($tbody.length > 0)
|
||||||
rowsAfter = length;
|
cy.get('tbody > tr:visible').should('have.length', rowsBefore - 1);
|
||||||
expect(rowsBefore).to.eq(rowsAfter + 1);
|
});
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Cypress.Commands.add('openListSummary', (row) => {
|
Cypress.Commands.add('openListSummary', (row) => {
|
||||||
|
|
Loading…
Reference in New Issue