forked from verdnatura/salix-front
fix: refs #7346 traslations
This commit is contained in:
parent
79ce2ad79e
commit
c0ddc2c5b4
|
@ -235,7 +235,7 @@ function splitColumns(columns) {
|
||||||
if (col.create) splittedColumns.value.create.push(col);
|
if (col.create) splittedColumns.value.create.push(col);
|
||||||
if (col.cardVisible) splittedColumns.value.cardVisible.push(col);
|
if (col.cardVisible) splittedColumns.value.cardVisible.push(col);
|
||||||
if ($props.isEditable && col.disable == null) col.disable = false;
|
if ($props.isEditable && col.disable == null) col.disable = false;
|
||||||
if ($props.useModel && col.columnFilter)
|
if ($props.useModel && col.columnFilter !== false)
|
||||||
col.columnFilter = { inWhere: true, ...col.columnFilter };
|
col.columnFilter = { inWhere: true, ...col.columnFilter };
|
||||||
splittedColumns.value.columns.push(col);
|
splittedColumns.value.columns.push(col);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
||||||
import VnRow from 'src/components/ui/VnRow.vue';
|
import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
import VnRadio from 'src/components/common/VnRadio.vue';
|
import VnRadio from 'src/components/common/VnRadio.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -48,7 +49,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
label: t('invoiceId'),
|
label: t('invoiceOutList.tableVisibleColumns.id'),
|
||||||
chip: { condition: () => true },
|
chip: { condition: () => true },
|
||||||
isId: true,
|
isId: true,
|
||||||
columnFilter: { name: 'search' },
|
columnFilter: { name: 'search' },
|
||||||
|
@ -56,7 +57,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'ref',
|
name: 'ref',
|
||||||
label: t('invoiceOut.list.ref'),
|
label: t('globals.reference'),
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: { url: MODEL, optionLabel: 'ref', optionValue: 'id' },
|
attrs: { url: MODEL, optionLabel: 'ref', optionValue: 'id' },
|
||||||
|
@ -65,7 +66,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'issued',
|
name: 'issued',
|
||||||
label: t('invoiceOut.list.issued'),
|
label: t('invoiceOut.summary.issued'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
format: (row) => toDate(row.issued),
|
format: (row) => toDate(row.issued),
|
||||||
columnField: { component: null },
|
columnField: { component: null },
|
||||||
|
@ -73,7 +74,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'clientFk',
|
name: 'clientFk',
|
||||||
label: t('invoiceOut.list.client'),
|
label: t('globals.client'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: { url: 'Clients', fields: ['id', 'name'] },
|
attrs: { url: 'Clients', fields: ['id', 'name'] },
|
||||||
|
@ -82,7 +83,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'companyCode',
|
name: 'companyCode',
|
||||||
label: t('invoiceOut.list.company'),
|
label: t('globals.company'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: { url: 'Companies', optionLabel: 'code', optionValue: 'id' },
|
attrs: { url: 'Companies', optionLabel: 'code', optionValue: 'id' },
|
||||||
|
@ -91,14 +92,14 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'amount',
|
name: 'amount',
|
||||||
label: t('invoiceOut.list.amount'),
|
label: t('globals.amount'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
format: (row) => toCurrency(row.amount),
|
format: (row) => toCurrency(row.amount),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'created',
|
name: 'created',
|
||||||
label: t('invoiceOut.list.created'),
|
label: t('globals.created'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
columnField: { component: null },
|
columnField: { component: null },
|
||||||
format: (row) => toDate(row.created),
|
format: (row) => toDate(row.created),
|
||||||
|
@ -106,7 +107,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'dued',
|
name: 'dued',
|
||||||
label: t('invoiceOut.list.dued'),
|
label: t('invoiceOut.summary.dued'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
columnField: { component: null },
|
columnField: { component: null },
|
||||||
format: (row) => toDate(row.dued),
|
format: (row) => toDate(row.dued),
|
||||||
|
@ -116,13 +117,14 @@ const columns = computed(() => [
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('viewSummary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
|
isPrimary: true,
|
||||||
action: (row) => viewSummary(row.id, InvoiceOutSummary),
|
action: (row) => viewSummary(row.id, InvoiceOutSummary),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('downloadPdf'),
|
title: t('globals.downloadPdf'),
|
||||||
icon: 'vn:ticket',
|
icon: 'cloud_download',
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
action: (row) => openPdf(row.id),
|
action: (row) => openPdf(row.id),
|
||||||
},
|
},
|
||||||
|
@ -171,7 +173,7 @@ watchEffect(selectedRows);
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar
|
<VnSearchbar
|
||||||
:info="t('youCanSearchByInvoiceReference')"
|
:info="t('youCanSearchByInvoiceReference')"
|
||||||
:label="t('searchInvoice')"
|
:label="t('Search invoice')"
|
||||||
data-key="invoiceOut"
|
data-key="invoiceOut"
|
||||||
/>
|
/>
|
||||||
<RightMenu>
|
<RightMenu>
|
||||||
|
@ -212,6 +214,12 @@ watchEffect(selectedRows);
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
<template #column-clientFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.clientSocialName }}
|
||||||
|
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<div class="row q-col-gutter-xs">
|
<div class="row q-col-gutter-xs">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
@ -220,13 +228,13 @@ watchEffect(selectedRows);
|
||||||
<VnRadio
|
<VnRadio
|
||||||
v-model="selectedOption"
|
v-model="selectedOption"
|
||||||
val="ticket"
|
val="ticket"
|
||||||
label="Ticket"
|
:label="t('globals.ticket')"
|
||||||
class="q-my-none q-mr-md"
|
class="q-my-none q-mr-md"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:disable="selectedOption !== 'ticket'"
|
:disable="selectedOption !== 'ticket'"
|
||||||
v-model="data.ticketFk"
|
v-model="data.ticketFk"
|
||||||
label="Ticket ID"
|
:label="t('globals.ticket')"
|
||||||
style="flex: 1"
|
style="flex: 1"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
@ -234,13 +242,13 @@ watchEffect(selectedRows);
|
||||||
<VnRadio
|
<VnRadio
|
||||||
v-model="selectedOption"
|
v-model="selectedOption"
|
||||||
val="cliente"
|
val="cliente"
|
||||||
label="Cliente"
|
:label="t('globals.client')"
|
||||||
class="q-my-none q-mr-md"
|
class="q-my-none q-mr-md"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:disable="selectedOption !== 'cliente'"
|
:disable="selectedOption !== 'cliente'"
|
||||||
v-model="data.clientFk"
|
v-model="data.clientFk"
|
||||||
label="Cliente"
|
:label="t('globals.client')"
|
||||||
url="Clients"
|
url="Clients"
|
||||||
:options="customerOptions"
|
:options="customerOptions"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -267,17 +275,14 @@ watchEffect(selectedRows);
|
||||||
<VnRadio
|
<VnRadio
|
||||||
v-model="selectedOption"
|
v-model="selectedOption"
|
||||||
val="consignatario"
|
val="consignatario"
|
||||||
label="Consignatario"
|
:label="t('ticket.summary.consignee')"
|
||||||
class="q-my-none q-mr-md"
|
class="q-my-none q-mr-md"
|
||||||
/>
|
/>
|
||||||
<div
|
<div class="row q-col-gutter-xs q-ml-none">
|
||||||
:disable="selectedOption !== 'consignatario'"
|
|
||||||
class="row q-col-gutter-xs q-ml-none"
|
|
||||||
>
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="data.clientFk"
|
v-model="data.clientFk"
|
||||||
label="Cliente"
|
:label="t('globals.client')"
|
||||||
url="Clients"
|
url="Clients"
|
||||||
:options="customerOptions"
|
:options="customerOptions"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -303,7 +308,7 @@ watchEffect(selectedRows);
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="data.addressFk"
|
v-model="data.addressFk"
|
||||||
label="Consignatario"
|
:label="t('ticket.summary.consignee')"
|
||||||
:options="addressOptions"
|
:options="addressOptions"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -324,9 +329,7 @@ watchEffect(selectedRows);
|
||||||
{{
|
{{
|
||||||
`${
|
`${
|
||||||
!scope.opt?.isActive
|
!scope.opt?.isActive
|
||||||
? t(
|
? t('inactive')
|
||||||
'basicData.inactive'
|
|
||||||
)
|
|
||||||
: ''
|
: ''
|
||||||
} `
|
} `
|
||||||
}}
|
}}
|
||||||
|
@ -367,7 +370,7 @@ watchEffect(selectedRows);
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="InvoiceOutSerials"
|
url="InvoiceOutSerials"
|
||||||
v-model="data.serial"
|
v-model="data.serial"
|
||||||
:label="t('invoiceSerial')"
|
:label="t('invoiceIn.serial')"
|
||||||
:options="invoiceOutSerialsOptions"
|
:options="invoiceOutSerialsOptions"
|
||||||
option-label="description"
|
option-label="description"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
|
@ -385,18 +388,24 @@ watchEffect(selectedRows);
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
</VnSelect>
|
||||||
<VnInputDate :label="t('dueDate')" v-model="data.maxShipped" />
|
<VnInputDate
|
||||||
|
:label="t('invoiceOut.summary.dued')"
|
||||||
|
v-model="data.maxShipped"
|
||||||
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-col-gutter-xs">
|
<VnRow class="row q-col-gutter-xs">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="TaxAreas"
|
url="TaxAreas"
|
||||||
v-model="data.taxArea"
|
v-model="data.taxArea"
|
||||||
:label="t('taxArea')"
|
:label="t('invoiceOutList.tableVisibleColumns.taxArea')"
|
||||||
:options="taxAreasOptions"
|
:options="taxAreasOptions"
|
||||||
option-label="code"
|
option-label="code"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
/>
|
/>
|
||||||
<VnInput v-model="data.reference" :label="t('reference')" />
|
<VnInput
|
||||||
|
v-model="data.reference"
|
||||||
|
:label="t('globals.reference')"
|
||||||
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -407,43 +416,29 @@ watchEffect(selectedRows);
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
#formModel .vn-row {
|
#formModel .vn-row {
|
||||||
min-height: 45px;
|
min-height: 45px;
|
||||||
}
|
|
||||||
#formModel .vn-row .q-radio {
|
.q-radio {
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
flex: 0.3;
|
flex: 0.3;
|
||||||
}
|
}
|
||||||
#formModel .vn-row > .q-input,
|
|
||||||
#formModel .vn-row > .q-select {
|
> .q-input,
|
||||||
|
> .q-select {
|
||||||
flex: 0.75;
|
flex: 0.75;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
invoiceId: Invoice ID
|
invoiceId: Invoice ID
|
||||||
viewSummary: View Summary
|
|
||||||
downloadPdf: Download PDF
|
|
||||||
youCanSearchByInvoiceReference: You can search by invoice reference
|
youCanSearchByInvoiceReference: You can search by invoice reference
|
||||||
searchInvoice: Search Invoice
|
|
||||||
createManualInvoice: Create Manual Invoice
|
createManualInvoice: Create Manual Invoice
|
||||||
invoiceSerial: Invoice Serial
|
inactive: (Inactive)
|
||||||
taxArea: Tax Area
|
|
||||||
dueDate: Due Date
|
|
||||||
reference: Reference
|
|
||||||
basicData:
|
|
||||||
inactive: Inactive
|
|
||||||
|
|
||||||
es:
|
es:
|
||||||
invoiceId: ID de factura
|
invoiceId: ID de factura
|
||||||
viewSummary: Ver resumen
|
|
||||||
downloadPdf: Descargar PDF
|
|
||||||
youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura
|
youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura
|
||||||
searchInvoice: Buscar factura
|
|
||||||
createManualInvoice: Crear factura manual
|
createManualInvoice: Crear factura manual
|
||||||
invoiceSerial: Serie de factura
|
inactive: (Inactivo)
|
||||||
taxArea: Área fiscal
|
|
||||||
dueDate: Fecha de vencimiento
|
|
||||||
reference: Referencia
|
|
||||||
basicData:
|
|
||||||
inactive: Inactivo
|
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
Loading…
Reference in New Issue