refs #6416 feat: remove almost all quasar refs

This commit is contained in:
Javier Segarra 2023-11-08 04:09:05 +01:00
parent 5f3c39f747
commit dfc727e813
1 changed files with 144 additions and 158 deletions

View File

@ -11,7 +11,10 @@ import VnLv from 'src/components/ui/VnLv.vue';
import VnTable from 'src/components/ui/VnTable.vue'; import VnTable from 'src/components/ui/VnTable.vue';
import VnCardSection from 'src/components/ui/VnCardSection.vue'; import VnCardSection from 'src/components/ui/VnCardSection.vue';
import VnCard from 'src/components/ui/VnCard.vue'; import VnCard from 'src/components/ui/VnCard.vue';
import VnIcon from 'src/components/ui/VnIcon.vue';
import VnBtn from 'src/components/ui/VnBtn.vue';
import in18n from '../in18n'; import in18n from '../in18n';
import VnChip from 'src/components/ui/VnChip.vue';
onMounted(async () => { onMounted(async () => {
salixUrl.value = await getUrl(''); salixUrl.value = await getUrl('');
@ -197,26 +200,35 @@ function setData(entity) {
</template> </template>
<template #body="{ entity: invoiceIn }"> <template #body="{ entity: invoiceIn }">
<!--Basic Data--> <!--Basic Data-->
<QCard class="vn-one"> <VnCard class="vn-max">
<QCardSection class="q-pa-none"> <template #header>
<a class="header" :href="`#/invoice-in/${entityId}/basic-data`"> <VnCardSection
{{ t('invoiceIn.pageTitles.basicData') }} :title="'invoiceIn.pageTitles.basicData'"
<QIcon name="open_in_new" color="primary" /> :href="`#/invoice-in/${entityId}/basic-data`"
</a> >
<QBtn <template #icon>
<VnIcon name="open_in_new" color="primary" />
</template>
<template #btn>
<VnBtn
class="q-ml-sm" class="q-ml-sm"
padding="xs" padding="xs"
flat flat
color="primary" color="primary"
round round
icon="cloud_download" icon="cloud_download"
@click.stop="downloadFile(invoiceIn.dmsFk)" :promise="() => downloadFile(invoiceIn.dmsFk)"
> >
<QTooltip> <template #tooltip>
{{ t('components.smartCard.downloadFile') }} {{ t('components.smartCard.downloadFile') }}
</QTooltip> </template>
</QBtn> </VnBtn>
</QCardSection> </template>
</VnCardSection>
</template>
<template #body>
<div class="card-section">
<div class="vn-one card">
<VnLv <VnLv
:label="t('invoiceIn.summary.supplier')" :label="t('invoiceIn.summary.supplier')"
:value="invoiceIn.supplier.name" :value="invoiceIn.supplier.name"
@ -233,27 +245,8 @@ function setData(entity) {
:label="t('invoiceIn.summary.docNumber')" :label="t('invoiceIn.summary.docNumber')"
:value="`${invoiceIn.serial}/${invoiceIn.serialNumber}`" :value="`${invoiceIn.serial}/${invoiceIn.serialNumber}`"
/> />
</QCard> </div>
<QCard class="vn-one"> <div class="card vn-two">
<QCardSection class="q-pa-none">
<a class="header" :href="`#/invoice-in/${entityId}/basic-data`">
{{ t('invoiceIn.pageTitles.basicData') }}
<QIcon name="open_in_new" color="primary" />
</a>
<QBtn
class="q-ml-sm"
padding="xs"
flat
color="primary"
round
icon="cloud_download"
@click.stop="downloadFile(invoiceIn.dmsFk)"
>
<QTooltip>
{{ t('components.smartCard.downloadFile') }}
</QTooltip>
</QBtn>
</QCardSection>
<VnLv <VnLv
:label="t('invoiceIn.summary.issued')" :label="t('invoiceIn.summary.issued')"
:value="toDate(invoiceIn.issued)" :value="toDate(invoiceIn.issued)"
@ -270,29 +263,9 @@ function setData(entity) {
:label="t('invoiceIn.summary.bookedDate')" :label="t('invoiceIn.summary.bookedDate')"
:value="toDate(invoiceIn.booked)" :value="toDate(invoiceIn.booked)"
/> />
</QCard> </div>
<QCard class="vn-one"> <div class="card vn-three">
<QCardSection class="q-pa-none"> <div class="q-px-sm">
<a class="header" :href="`#/invoice-in/${entityId}/basic-data`">
{{ t('invoiceIn.pageTitles.basicData') }}
<QIcon name="open_in_new" color="primary" />
</a>
<QBtn
class="q-ml-sm"
padding="xs"
flat
color="primary"
round
icon="cloud_download"
@click.stop="downloadFile(invoiceIn.dmsFk)"
>
<QTooltip>
{{ t('components.smartCard.downloadFile') }}
</QTooltip>
</QBtn>
</QCardSection>
<QCardSection class="q-pa-none">
<div class="bordered q-px-sm q-mx-auto">
<VnLv <VnLv
:label="t('invoiceIn.summary.taxableBase')" :label="t('invoiceIn.summary.taxableBase')"
:value="toCurrency(invoiceIn.totals.totalTaxableBase)" :value="toCurrency(invoiceIn.totals.totalTaxableBase)"
@ -303,43 +276,33 @@ function setData(entity) {
/> />
<VnLv :label="t('invoiceIn.summary.dueTotal')"> <VnLv :label="t('invoiceIn.summary.dueTotal')">
<template #value> <template #value>
<QChip <VnChip
dense dense
class="q-pa-xs" class="q-pa-xs"
:color="amountsNotMatch ? 'negative' : 'transparent'" :color="
amountsNotMatch
? 'negative'
: 'transparent'
"
:title=" :title="
amountsNotMatch amountsNotMatch
? t('invoiceIn.summary.noMatch') ? t('invoiceIn.summary.noMatch')
: t('invoiceIn.summary.dueTotal') : t('invoiceIn.summary.dueTotal')
" "
> >
{{ toCurrency(invoiceIn.totals.totalDueDay) }} <template #body>
</QChip> {{
toCurrency(
invoiceIn.totals.totalDueDay
)
}}
</template>
</VnChip>
</template> </template>
</VnLv> </VnLv>
</div> </div>
</QCardSection> </div>
</QCard> <div class="card vn-four q-mb-md">
<QCard class="q-mb-md">
<QCardSection class="q-pa-none">
<a class="header" :href="`#/invoice-in/${entityId}/basic-data`">
{{ t('invoiceIn.pageTitles.basicData') }}
<QIcon name="open_in_new" color="primary" />
</a>
<QBtn
class="q-ml-sm"
padding="xs"
flat
color="primary"
round
icon="cloud_download"
@click.stop="downloadFile(invoiceIn.dmsFk)"
>
<QTooltip>
{{ t('components.smartCard.downloadFile') }}
</QTooltip>
</QBtn>
</QCardSection>
<VnLv <VnLv
:label="t('invoiceIn.summary.sage')" :label="t('invoiceIn.summary.sage')"
:value="invoiceIn.sageWithholding.withholding" :value="invoiceIn.sageWithholding.withholding"
@ -356,7 +319,10 @@ function setData(entity) {
:label="t('invoiceIn.summary.booked')" :label="t('invoiceIn.summary.booked')"
:value="invoiceIn.isBooked" :value="invoiceIn.isBooked"
/> />
</QCard> </div>
</div>
</template>
</VnCard>
<!--Vat--> <!--Vat-->
<VnCard v-if="invoiceIn.invoiceInTax.length" class="vn-three"> <VnCard v-if="invoiceIn.invoiceInTax.length" class="vn-three">
<template #header> <template #header>
@ -423,6 +389,26 @@ function setData(entity) {
</CardSummary> </CardSummary>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.q-card {
.vn-max {
background-color: unset;
}
.card-section {
display: flex;
flex-wrap: wrap;
row-gap: 10px;
column-gap: 10px;
.card {
flex: 1 1 30%;
width: 100%;
background-color: var(--vn-gray);
padding: 15px;
font-size: 16px;
min-width: 275px;
border-radius: 4px;
}
}
}
.bg { .bg {
background-color: var(--vn-light-gray); background-color: var(--vn-light-gray);
} }