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,166 +200,129 @@ 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
class="q-ml-sm"
padding="xs"
flat
color="primary"
round
icon="cloud_download"
@click.stop="downloadFile(invoiceIn.dmsFk)"
> >
<QTooltip> <template #icon>
{{ t('components.smartCard.downloadFile') }} <VnIcon name="open_in_new" color="primary" />
</QTooltip> </template>
</QBtn> <template #btn>
</QCardSection> <VnBtn
<VnLv class="q-ml-sm"
:label="t('invoiceIn.summary.supplier')" padding="xs"
:value="invoiceIn.supplier.name" flat
/> color="primary"
<VnLv round
:label="t('invoiceIn.summary.supplierRef')" icon="cloud_download"
:value="invoiceIn.supplierRef" :promise="() => downloadFile(invoiceIn.dmsFk)"
/> >
<VnLv <template #tooltip>
:label="t('invoiceIn.summary.currency')" {{ t('components.smartCard.downloadFile') }}
:value="invoiceIn.currency.code" </template>
/> </VnBtn>
<VnLv </template>
:label="t('invoiceIn.summary.docNumber')" </VnCardSection>
:value="`${invoiceIn.serial}/${invoiceIn.serialNumber}`" </template>
/> <template #body>
</QCard> <div class="card-section">
<QCard class="vn-one"> <div class="vn-one card">
<QCardSection class="q-pa-none"> <VnLv
<a class="header" :href="`#/invoice-in/${entityId}/basic-data`"> :label="t('invoiceIn.summary.supplier')"
{{ t('invoiceIn.pageTitles.basicData') }} :value="invoiceIn.supplier.name"
<QIcon name="open_in_new" color="primary" /> />
</a> <VnLv
<QBtn :label="t('invoiceIn.summary.supplierRef')"
class="q-ml-sm" :value="invoiceIn.supplierRef"
padding="xs" />
flat <VnLv
color="primary" :label="t('invoiceIn.summary.currency')"
round :value="invoiceIn.currency.code"
icon="cloud_download" />
@click.stop="downloadFile(invoiceIn.dmsFk)" <VnLv
> :label="t('invoiceIn.summary.docNumber')"
<QTooltip> :value="`${invoiceIn.serial}/${invoiceIn.serialNumber}`"
{{ t('components.smartCard.downloadFile') }} />
</QTooltip> </div>
</QBtn> <div class="card vn-two">
</QCardSection> <VnLv
<VnLv :label="t('invoiceIn.summary.issued')"
:label="t('invoiceIn.summary.issued')" :value="toDate(invoiceIn.issued)"
:value="toDate(invoiceIn.issued)" />
/> <VnLv
<VnLv :label="t('invoiceIn.summary.operated')"
:label="t('invoiceIn.summary.operated')" :value="toDate(invoiceIn.operated)"
:value="toDate(invoiceIn.operated)" />
/> <VnLv
<VnLv :label="t('invoiceIn.summary.bookEntried')"
:label="t('invoiceIn.summary.bookEntried')" :value="toDate(invoiceIn.bookEntried)"
:value="toDate(invoiceIn.bookEntried)" />
/> <VnLv
<VnLv :label="t('invoiceIn.summary.bookedDate')"
:label="t('invoiceIn.summary.bookedDate')" :value="toDate(invoiceIn.booked)"
:value="toDate(invoiceIn.booked)" />
/> </div>
</QCard> <div class="card vn-three">
<QCard class="vn-one"> <div class="q-px-sm">
<QCardSection class="q-pa-none"> <VnLv
<a class="header" :href="`#/invoice-in/${entityId}/basic-data`"> :label="t('invoiceIn.summary.taxableBase')"
{{ t('invoiceIn.pageTitles.basicData') }} :value="toCurrency(invoiceIn.totals.totalTaxableBase)"
<QIcon name="open_in_new" color="primary" /> />
</a> <VnLv
<QBtn label="Total"
class="q-ml-sm" :value="toCurrency(invoiceIn.totals.totalVat)"
padding="xs" />
flat <VnLv :label="t('invoiceIn.summary.dueTotal')">
color="primary" <template #value>
round <VnChip
icon="cloud_download" dense
@click.stop="downloadFile(invoiceIn.dmsFk)" class="q-pa-xs"
> :color="
<QTooltip> amountsNotMatch
{{ t('components.smartCard.downloadFile') }} ? 'negative'
</QTooltip> : 'transparent'
</QBtn> "
</QCardSection> :title="
<QCardSection class="q-pa-none"> amountsNotMatch
<div class="bordered q-px-sm q-mx-auto"> ? t('invoiceIn.summary.noMatch')
<VnLv : t('invoiceIn.summary.dueTotal')
:label="t('invoiceIn.summary.taxableBase')" "
:value="toCurrency(invoiceIn.totals.totalTaxableBase)" >
/> <template #body>
<VnLv {{
label="Total" toCurrency(
:value="toCurrency(invoiceIn.totals.totalVat)" invoiceIn.totals.totalDueDay
/> )
<VnLv :label="t('invoiceIn.summary.dueTotal')"> }}
<template #value> </template>
<QChip </VnChip>
dense </template>
class="q-pa-xs" </VnLv>
:color="amountsNotMatch ? 'negative' : 'transparent'" </div>
:title=" </div>
amountsNotMatch <div class="card vn-four q-mb-md">
? t('invoiceIn.summary.noMatch') <VnLv
: t('invoiceIn.summary.dueTotal') :label="t('invoiceIn.summary.sage')"
" :value="invoiceIn.sageWithholding.withholding"
> />
{{ toCurrency(invoiceIn.totals.totalDueDay) }} <VnLv
</QChip> :label="t('invoiceIn.summary.vat')"
</template> :value="invoiceIn.expenseDeductible?.name"
</VnLv> />
<VnLv
:label="t('invoiceIn.summary.company')"
:value="invoiceIn.company.code"
/>
<VnLv
:label="t('invoiceIn.summary.booked')"
:value="invoiceIn.isBooked"
/>
</div>
</div> </div>
</QCardSection> </template>
</QCard> </VnCard>
<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
:label="t('invoiceIn.summary.sage')"
:value="invoiceIn.sageWithholding.withholding"
/>
<VnLv
:label="t('invoiceIn.summary.vat')"
:value="invoiceIn.expenseDeductible?.name"
/>
<VnLv
:label="t('invoiceIn.summary.company')"
:value="invoiceIn.company.code"
/>
<VnLv
:label="t('invoiceIn.summary.booked')"
:value="invoiceIn.isBooked"
/>
</QCard>
<!--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);
} }