fix: refs #7346 traslations
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javi Gallego 2024-11-14 10:47:14 +01:00
parent 79ce2ad79e
commit c0ddc2c5b4
2 changed files with 52 additions and 57 deletions

View File

@ -235,7 +235,7 @@ function splitColumns(columns) {
if (col.create) splittedColumns.value.create.push(col);
if (col.cardVisible) splittedColumns.value.cardVisible.push(col);
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 };
splittedColumns.value.columns.push(col);
}

View File

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