diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 9059605ca..3598f96a5 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -202,7 +202,7 @@ function formatValue(value) { function sanitizer(params) { for (const [key, value] of Object.entries(params)) { - if (typeof value == 'object') { + if (value && typeof value === 'object') { const param = Object.values(value)[0]; if (typeof param == 'string') params[key] = param.replaceAll('%', ''); } diff --git a/src/css/app.scss b/src/css/app.scss index c233b14f0..357c9ecdb 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -103,10 +103,6 @@ select:-webkit-autofill { border-radius: 8px; } -.card-width { - width: 770px; -} - .vn-card-list { width: 100%; max-width: 60em; @@ -268,3 +264,10 @@ input::-webkit-inner-spin-button { max-width: 400px; } } +.edit-photo-btn { + position: absolute; + right: 12px; + bottom: 12px; + z-index: 1; + cursor: pointer; +} diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index aa7e83fb3..67dadf16d 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -690,6 +690,7 @@ invoiceOut: chooseValidClient: Choose a valid client chooseValidCompany: Choose a valid company chooseValidPrinter: Choose a valid printer + chooseValidSerialType: Choose a serial type fillDates: Invoice date and the max date should be filled invoiceDateLessThanMaxDate: Invoice date can not be less than max date invoiceWithFutureDate: Exists an invoice with a future date diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 100bf54ad..f1461cda1 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -696,6 +696,7 @@ invoiceOut: chooseValidClient: Selecciona un cliente válido chooseValidCompany: Selecciona una empresa válida chooseValidPrinter: Selecciona una impresora válida + chooseValidSerialType: Selecciona una tipo de serie válida fillDates: La fecha de la factura y la fecha máxima deben estar completas invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima invoiceWithFutureDate: Existe una factura con una fecha futura diff --git a/src/pages/Claim/locale/es.yml b/src/pages/Claim/locale/es.yml index 90bef8e66..052416aa7 100644 --- a/src/pages/Claim/locale/es.yml +++ b/src/pages/Claim/locale/es.yml @@ -42,7 +42,7 @@ claim: pickup: Recoger null: No agency: Agencia - delivery: Entrega + delivery: Reparto fileDescription: 'ID de reclamación {claimId} del cliente {clientName} con ID {clientId}' noData: 'No hay imágenes/videos, haz clic aquí o arrastra y suelta el archivo' dragDrop: Arrastra y suelta aquí diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue index e524faa24..4c02ccf84 100644 --- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue @@ -222,7 +222,7 @@ const showTransferInvoiceForm = async () => { {{ t('Generate PDF invoice') }} - {{ t('Refund...') }} + {{ t('Refund') }} @@ -250,7 +250,7 @@ es: Delete invoice: Eliminar factura Book invoice: Asentar factura Generate PDF invoice: Generar PDF factura - Refund...: Abono + Refund: Abono As PDF: como PDF As CSV: como CSV Send PDF: Enviar PDF diff --git a/src/pages/InvoiceOut/InvoiceOutGlobal.vue b/src/pages/InvoiceOut/InvoiceOutGlobal.vue index eecc61bc2..5f2eb3c02 100644 --- a/src/pages/InvoiceOut/InvoiceOutGlobal.vue +++ b/src/pages/InvoiceOut/InvoiceOutGlobal.vue @@ -94,11 +94,13 @@ const selectCustomerId = (id) => { }; const statusText = computed(() => { - return status.value === 'invoicing' - ? `${t(`status.${status.value}`)} ${ - addresses.value[getAddressNumber.value]?.clientId - }` - : t(`status.${status.value}`); + const baseStatus = t(`status.${status.value}`); + const clientId = + status.value === 'invoicing' + ? addresses.value[getAddressNumber.value]?.clientId || '' + : ''; + + return clientId ? `${baseStatus} ${clientId}`.trim() : baseStatus; }); onMounted(() => (stateStore.rightDrawer = true)); diff --git a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue index 23c63ee6a..2070ef09c 100644 --- a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue +++ b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue @@ -20,21 +20,25 @@ const { initialDataLoading, formInitialData, invoicing, status } = const { makeInvoice, setStatusValue } = invoiceOutGlobalStore; const clientsToInvoice = ref('all'); - const companiesOptions = ref([]); - const printersOptions = ref([]); +const serialTypesOptions = ref([]); -const clientsOptions = ref([]); +const handleInvoiceOutSerialsFetch = (data) => { + serialTypesOptions.value = Array.from( + new Set(data.map((item) => item.type).filter((type) => type)) + ); +}; const formData = ref({}); const optionsInitialData = computed(() => { - return ( - companiesOptions.value.length > 0 && - printersOptions.value.length > 0 && - clientsOptions.value.length > 0 - ); + const optionsArrays = [ + companiesOptions.value, + printersOptions.value, + serialTypesOptions.value, + ]; + return optionsArrays.every((arr) => arr.length > 0); }); const getStatus = computed({ @@ -59,8 +63,11 @@ onMounted(async () => { auto-load /> - - + { v-if="clientsToInvoice === 'one'" :label="t('client')" v-model="formData.clientId" - :options="clientsOptions" + url="Clients" option-value="id" option-label="name" hide-selected @@ -95,6 +102,17 @@ onMounted(async () => { outlined rounded /> + diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 822f6bb33..b08e12b3e 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -198,7 +198,7 @@ watchEffect(selectedRows); :url="`${MODEL}/filter`" :create="{ urlCreate: 'InvoiceOuts/createManualInvoice', - title: t('Create Manual Invoice'), + title: t('Create manual invoice'), onDataSaved: ({ id }) => tableRef.redirect(id), formInitialData: { active: true, @@ -275,10 +275,12 @@ en: fileAllowed: Successful download of CSV file youCanSearchByInvoiceReference: You can search by invoice reference createInvoice: Make invoice + Create manual invoice: 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 + Create manual invoice: Crear factura manual diff --git a/src/pages/Item/Card/ItemDescriptorImage.vue b/src/pages/Item/Card/ItemDescriptorImage.vue index d923dd28f..d83f534b8 100644 --- a/src/pages/Item/Card/ItemDescriptorImage.vue +++ b/src/pages/Item/Card/ItemDescriptorImage.vue @@ -138,14 +138,6 @@ en: