forked from verdnatura/salix-front
corrections
This commit is contained in:
parent
7ee8dbf2d6
commit
e35c11d714
|
@ -3,7 +3,6 @@ import toDate from './toDate';
|
||||||
import toCurrency from './toCurrency';
|
import toCurrency from './toCurrency';
|
||||||
import toPercentage from './toPercentage';
|
import toPercentage from './toPercentage';
|
||||||
import dashIfEmpty from './dashIfEmpty';
|
import dashIfEmpty from './dashIfEmpty';
|
||||||
import zeroFill from './zeroFill';
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
toLowerCase,
|
toLowerCase,
|
||||||
|
@ -11,5 +10,4 @@ export {
|
||||||
toCurrency,
|
toCurrency,
|
||||||
toPercentage,
|
toPercentage,
|
||||||
dashIfEmpty,
|
dashIfEmpty,
|
||||||
zeroFill
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
export default function (value, pad) {
|
|
||||||
const valueStr = String(value);
|
|
||||||
return valueStr.padStart(pad, '0');
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@ import { onMounted, ref, computed, onUpdated } from 'vue';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { dashIfEmpty, toDate, toCurrency, zeroFill } from 'src/filters';
|
import { dashIfEmpty, toDate, toCurrency } from 'src/filters';
|
||||||
import SkeletonSummary from 'components/ui/SkeletonSummary.vue';
|
import SkeletonSummary from 'components/ui/SkeletonSummary.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';
|
||||||
|
@ -33,7 +33,6 @@ async function fetch() {
|
||||||
const { data } = await axios.get(`Tickets/${entityId.value}/summary`);
|
const { data } = await axios.get(`Tickets/${entityId.value}/summary`);
|
||||||
if (data) {
|
if (data) {
|
||||||
ticket.value = data;
|
ticket.value = data;
|
||||||
console.log(ticket.value);
|
|
||||||
salesLines.value = data.sales;
|
salesLines.value = data.sales;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +91,8 @@ async function changeState(value) {
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
side
|
side
|
||||||
top
|
top
|
||||||
color="dark"
|
color="orange-11"
|
||||||
|
text-color="black"
|
||||||
:label="t('ticket.summary.changeState')"
|
:label="t('ticket.summary.changeState')"
|
||||||
:disable="!isEditable()"
|
:disable="!isEditable()"
|
||||||
>
|
>
|
||||||
|
@ -248,11 +248,17 @@ async function changeState(value) {
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-pa-md" v-if="salesLines.length > 0">
|
<div class="row q-pa-md" v-if="salesLines.length > 0">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
<q-list>
|
||||||
<q-item-label header class="text-h6">
|
<q-item-label header class="text-h6">
|
||||||
{{ t('ticket.summary.saleLines') }}
|
{{ t('ticket.summary.saleLines') }}
|
||||||
<q-tooltip>{{ t('ticket.summary.goTo') }}</q-tooltip>
|
<router-link
|
||||||
|
:to="{ name: 'TicketBasicData', params: { id: entityId } }"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<q-icon name="open_in_new" />
|
||||||
|
</router-link>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-table :rows="ticket.sales">
|
<q-table :rows="ticket.sales" flat>
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width></q-th>
|
<q-th auto-width></q-th>
|
||||||
|
@ -301,12 +307,23 @@ async function changeState(value) {
|
||||||
{{ props.row.claimBeginning.claimFk }}</q-tooltip
|
{{ props.row.claimBeginning.claimFk }}</q-tooltip
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-icon name="warning" v-show="props.row.visible < 0" size="xs" color="primary">
|
<q-icon
|
||||||
|
name="warning"
|
||||||
|
v-show="props.row.visible < 0"
|
||||||
|
size="xs"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
<q-tooltip
|
<q-tooltip
|
||||||
>{{ t('ticket.summary.visible') }}: {{ props.row.visible }}</q-tooltip
|
>{{ t('ticket.summary.visible') }}:
|
||||||
|
{{ props.row.visible }}</q-tooltip
|
||||||
>
|
>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
<q-icon name="vn:reserva" v-show="props.row.reserved" size="xs" color="primary">
|
<q-icon
|
||||||
|
name="vn:reserva"
|
||||||
|
v-show="props.row.reserved"
|
||||||
|
size="xs"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
<q-tooltip>{{ t('ticket.summary.reserved') }}</q-tooltip>
|
<q-tooltip>{{ t('ticket.summary.reserved') }}</q-tooltip>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
@ -326,7 +343,7 @@ async function changeState(value) {
|
||||||
<q-tooltip>{{ t('ticket.summary.hasComponentLack') }}</q-tooltip>
|
<q-tooltip>{{ t('ticket.summary.hasComponentLack') }}</q-tooltip>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td class="link">{{ zeroFill(props.row.itemFk, 6) }}</q-td>
|
<q-td class="link">{{ props.row.itemFk }}</q-td>
|
||||||
<q-td>{{ props.row.visible }}</q-td>
|
<q-td>{{ props.row.visible }}</q-td>
|
||||||
<q-td>{{ props.row.available }}</q-td>
|
<q-td>{{ props.row.available }}</q-td>
|
||||||
<q-td>{{ props.row.quantity }}</q-td>
|
<q-td>{{ props.row.quantity }}</q-td>
|
||||||
|
@ -354,15 +371,17 @@ async function changeState(value) {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</q-table>
|
||||||
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-pa-md" v-if="ticket.packagings.length > 0 || ticket.services.length > 0">
|
<div class="row q-pa-md" v-if="ticket.packagings.length > 0 || ticket.services.length > 0">
|
||||||
<div class="col" v-if="ticket.packagings.length > 0">
|
<div class="col" v-if="ticket.packagings.length > 0">
|
||||||
|
<q-list>
|
||||||
<q-item-label header class="text-h6">
|
<q-item-label header class="text-h6">
|
||||||
{{ t('ticket.summary.packages') }}
|
{{ t('ticket.summary.packages') }}
|
||||||
<q-tooltip>{{ t('ticket.summary.goTo') }}</q-tooltip>
|
<q-icon name="open_in_new" />
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-table :rows="ticket.packagings">
|
<q-table :rows="ticket.packagings" flat>
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width>{{ t('ticket.summary.created') }}</q-th>
|
<q-th auto-width>{{ t('ticket.summary.created') }}</q-th>
|
||||||
|
@ -378,13 +397,15 @@ async function changeState(value) {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</q-table>
|
||||||
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
<div class="col" v-if="ticket.services.length > 0">
|
<div class="col" v-if="ticket.services.length > 0">
|
||||||
|
<q-list>
|
||||||
<q-item-label header class="text-h6">
|
<q-item-label header class="text-h6">
|
||||||
{{ t('ticket.summary.services') }}
|
{{ t('ticket.summary.services') }}
|
||||||
<q-tooltip>{{ t('ticket.summary.goTo') }}</q-tooltip>
|
<q-icon name="open_in_new" />
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-table :rows="ticket.services">
|
<q-table :rows="ticket.services" flat>
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width>{{ t('ticket.summary.quantity') }}</q-th>
|
<q-th auto-width>{{ t('ticket.summary.quantity') }}</q-th>
|
||||||
|
@ -404,15 +425,17 @@ async function changeState(value) {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</q-table>
|
||||||
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-pa-md" v-if="ticket.requests.length > 0">
|
<div class="row q-pa-md" v-if="ticket.requests.length > 0">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
<q-list>
|
||||||
<q-item-label header class="text-h6">
|
<q-item-label header class="text-h6">
|
||||||
{{ t('ticket.summary.request') }}
|
{{ t('ticket.summary.request') }}
|
||||||
<q-tooltip>{{ t('ticket.summary.goTo') }}</q-tooltip>
|
<q-icon name="open_in_new" />
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-table :rows="ticket.requests">
|
<q-table :rows="ticket.requests" flat>
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width>{{ t('ticket.summary.description') }}</q-th>
|
<q-th auto-width>{{ t('ticket.summary.description') }}</q-th>
|
||||||
|
@ -434,13 +457,12 @@ async function changeState(value) {
|
||||||
<q-td>{{ props.row.quantity }}</q-td>
|
<q-td>{{ props.row.quantity }}</q-td>
|
||||||
<q-td>{{ toCurrency(props.row.price) }}</q-td>
|
<q-td>{{ toCurrency(props.row.price) }}</q-td>
|
||||||
<q-td v-if="!props.row.sale">-</q-td>
|
<q-td v-if="!props.row.sale">-</q-td>
|
||||||
<q-td v-if="props.row.sale" class="link">{{
|
<q-td v-if="props.row.sale" class="link">{{ props.row.sale.itemFk }}</q-td>
|
||||||
zeroFill(props.row.sale.itemFk, 6)
|
|
||||||
}}</q-td>
|
|
||||||
<q-td><q-checkbox v-model="props.row.isOk" :disable="true" /></q-td>
|
<q-td><q-checkbox v-model="props.row.isOk" :disable="true" /></q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</q-table>
|
||||||
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -455,9 +477,21 @@ async function changeState(value) {
|
||||||
|
|
||||||
.q-card {
|
.q-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-width: 1200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary {
|
.summary {
|
||||||
|
.q-list {
|
||||||
|
.q-item__label--header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.fetched-tags {
|
.fetched-tags {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
@ -494,26 +528,6 @@ async function changeState(value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-h6 {
|
|
||||||
margin-bottom: $spacing-md;
|
|
||||||
text-transform: uppercase;
|
|
||||||
line-height: 1;
|
|
||||||
padding: 7px 0;
|
|
||||||
padding-bottom: 5px;
|
|
||||||
border-bottom: 2px solid $primary;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-h6:after {
|
|
||||||
font-family: 'Material Icons';
|
|
||||||
content: 'open_in_new';
|
|
||||||
position: absolute;
|
|
||||||
right: 5px;
|
|
||||||
text-transform: none;
|
|
||||||
color: $primary;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -532,4 +546,8 @@ async function changeState(value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-dialog .summary {
|
||||||
|
max-width: 1200px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import Paginate from 'components/Paginate.vue';
|
import Paginate from 'components/Paginate.vue';
|
||||||
import { toDate, toCurrency } from 'src/filters/index';
|
import { toDate, toCurrency } from 'src/filters/index';
|
||||||
// import TicketSummary from './Card/TicketSummary.vue';
|
import TicketSummary from './Card/TicketSummary.vue';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -55,7 +55,7 @@ const preview = ref({
|
||||||
function showPreview(id) {
|
function showPreview(id) {
|
||||||
preview.value.shown = true;
|
preview.value.shown = true;
|
||||||
preview.value.data = {
|
preview.value.data = {
|
||||||
customerId: id,
|
ticketId: id,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -108,42 +108,19 @@ function showPreview(id) {
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-separator vertical />
|
<q-separator vertical />
|
||||||
<q-card-actions vertical class="justify-between">
|
<q-card-actions vertical class="justify-between">
|
||||||
<!-- <q-btn color="grey-7" round flat icon="more_vert">
|
|
||||||
<q-tooltip>{{ t('customer.list.moreOptions') }}</q-tooltip>
|
|
||||||
<q-menu cover auto-close>
|
|
||||||
<q-list>
|
|
||||||
<q-item clickable>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-icon name="add" />
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>Add a note</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item clickable>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-icon name="history" />
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>Display customer history</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-menu>
|
|
||||||
</q-btn> -->
|
|
||||||
|
|
||||||
<q-btn flat round color="orange" icon="arrow_circle_right" @click="navigate(row.id)">
|
<q-btn flat round color="orange" icon="arrow_circle_right" @click="navigate(row.id)">
|
||||||
<q-tooltip>{{ t('components.smartCard.openCard') }}</q-tooltip>
|
<q-tooltip>{{ t('components.smartCard.openCard') }}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn flat round color="grey-7" icon="preview" @click="showPreview(row.id)">
|
<q-btn flat round color="grey-7" icon="preview" @click="showPreview(row.id)">
|
||||||
<q-tooltip>{{ t('components.smartCard.openSummary') }}</q-tooltip>
|
<q-tooltip>{{ t('components.smartCard.openSummary') }}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<!-- <q-btn flat round color="grey-7" icon="vn:ticket">
|
|
||||||
<q-tooltip>{{ t('customer.list.customerOrders') }}</q-tooltip>
|
|
||||||
</q-btn> -->
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
</paginate>
|
</paginate>
|
||||||
</q-page>
|
</q-page>
|
||||||
<!-- <q-dialog v-model="preview.shown">
|
<q-dialog v-model="preview.shown">
|
||||||
<customer-summary :customer-id="preview.data.customerId" />
|
<ticket-summary :id="preview.data.ticketId" />
|
||||||
</q-dialog> -->
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue