From 4e957ed8a7ef2c09d4e3af99922c510088055f63 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 29 Oct 2024 17:23:45 +0100 Subject: [PATCH] feat: refs #7346 style radioButton --- src/components/common/VnRadio.vue | 9 +- src/components/ui/VnRow.vue | 8 +- src/pages/InvoiceOut/InvoiceOutList.vue | 248 ++++++++++-------------- 3 files changed, 117 insertions(+), 148 deletions(-) diff --git a/src/components/common/VnRadio.vue b/src/components/common/VnRadio.vue index 4eeb9dbe9..69b1501a2 100644 --- a/src/components/common/VnRadio.vue +++ b/src/components/common/VnRadio.vue @@ -2,5 +2,12 @@ const model = defineModel({ type: Boolean, required: true }); diff --git a/src/components/ui/VnRow.vue b/src/components/ui/VnRow.vue index 16bcfab7d..b57489a98 100644 --- a/src/components/ui/VnRow.vue +++ b/src/components/ui/VnRow.vue @@ -1,8 +1,5 @@ - @@ -21,6 +18,9 @@ defineProps({ wrap: { type: Boolean, default: false } }); &:not(.wrap) { flex-direction: column; } + &[fixed] { + flex-direction: row; + } } } diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 9fb2fc5f5..205f67cd4 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -15,6 +15,9 @@ import { QBtn } from 'quasar'; import axios from 'axios'; import RightMenu from 'src/components/common/RightMenu.vue'; 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'; const { t } = useI18n(); const stateStore = useStateStore(); @@ -39,13 +42,9 @@ const columns = computed(() => [ align: 'center', name: 'id', label: t('invoiceOutList.tableVisibleColumns.id'), - chip: { - condition: () => true, - }, + chip: { condition: () => true }, isId: true, - columnFilter: { - name: 'search', - }, + columnFilter: { name: 'search' }, }, { align: 'left', @@ -53,14 +52,8 @@ const columns = computed(() => [ label: t('invoiceOutList.tableVisibleColumns.ref'), isTitle: true, component: 'select', - attrs: { - url: MODEL, - optionLabel: 'ref', - optionValue: 'id', - }, - columnField: { - component: null, - }, + attrs: { url: MODEL, optionLabel: 'ref', optionValue: 'id' }, + columnField: { component: null }, }, { align: 'left', @@ -68,9 +61,7 @@ const columns = computed(() => [ label: t('invoiceOutList.tableVisibleColumns.issued'), component: 'date', format: (row) => toDate(row.issued), - columnField: { - component: null, - }, + columnField: { component: null }, }, { align: 'left', @@ -78,13 +69,8 @@ const columns = computed(() => [ label: t('invoiceOutModule.customer'), cardVisible: true, component: 'select', - attrs: { - url: 'Clients', - fields: ['id', 'name'], - }, - columnField: { - component: null, - }, + attrs: { url: 'Clients', fields: ['id', 'name'] }, + columnField: { component: null }, }, { align: 'left', @@ -92,14 +78,8 @@ const columns = computed(() => [ label: t('invoiceOutModule.company'), cardVisible: true, component: 'select', - attrs: { - url: 'Companies', - optionLabel: 'code', - optionValue: 'id', - }, - columnField: { - component: null, - }, + attrs: { url: 'Companies', optionLabel: 'code', optionValue: 'id' }, + columnField: { component: null }, }, { align: 'left', @@ -113,9 +93,7 @@ const columns = computed(() => [ name: 'created', label: t('invoiceOutList.tableVisibleColumns.created'), component: 'date', - columnField: { - component: null, - }, + columnField: { component: null }, format: (row) => toDate(row.created), }, { @@ -123,9 +101,7 @@ const columns = computed(() => [ name: 'dued', label: t('invoiceOutList.tableVisibleColumns.dueDate'), component: 'date', - columnField: { - component: null, - }, + columnField: { component: null }, format: (row) => toDate(row.dued), }, { @@ -216,9 +192,7 @@ watchEffect(selectedRows); urlCreate: 'InvoiceOuts/createManualInvoice', title: t('createManualInvoice'), onDataSaved: ({ id }) => tableRef.redirect(id), - formInitialData: { - active: true, - }, + formInitialData: { active: true }, }" :right-search="false" v-model:selected="selectedRows" @@ -232,92 +206,84 @@ watchEffect(selectedRows); }" > - - en: - searchInvoice: Search issued invoice - fileDenied: Browser denied file download... - fileAllowed: Successful download of CSV file - youCanSearchByInvoiceReference: You can search by invoice reference - createInvoice: Make invoice - createManualInvoice: Create manual invoice - - es: - searchInvoice: Buscar factura emitida - fileDenied: El navegador denegó la descarga de archivos... - fileAllowed: Descarga exitosa de archivo CSV - youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura - createInvoice: Crear factura - createManualInvoice: Crear factura manual - +