diff --git a/src/components/CreateDepartmentChild.vue b/src/components/CreateDepartmentChild.vue new file mode 100644 index 000000000..8f5b4b874 --- /dev/null +++ b/src/components/CreateDepartmentChild.vue @@ -0,0 +1,100 @@ + + + + + + + + + {{ t('New department') }} + + + + + + + + + + + + + + + + +es: + Name: Nombre + New department: Nuevo departamento + diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 62993ef24..e683ce735 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -58,7 +58,7 @@ const $props = defineProps({ mapper: { type: Function, default: null, - } + }, }); const emit = defineEmits(['onFetch', 'onDataSaved']); @@ -129,7 +129,7 @@ async function save() { isLoading.value = true; try { - const body = $props.mapper ? $props.mapper(formData.value) : formData.value + const body = $props.mapper ? $props.mapper(formData.value) : formData.value; if ($props.urlCreate) { await axios.post($props.urlCreate, body); notify('globals.dataCreated', 'positive'); @@ -179,11 +179,14 @@ watch(formUrl, async () => { }); - + {{ t('globals.changesToSave') }} - + +import { useI18n } from 'vue-i18n'; +import { ref, computed } from 'vue'; + +import FetchData from 'components/FetchData.vue'; + +import { useState } from 'src/composables/useState'; +import axios from 'axios'; + +const $props = defineProps({ + allColumns: { + type: Array, + default: () => [], + }, + tableCode: { + type: String, + default: '', + }, + labelsTraductionsPath: { + type: String, + default: '', + }, +}); + +const emit = defineEmits(['onConfigSaved']); + +const state = useState(); +const { t } = useI18n(); +const popupProxyRef = ref(null); +const user = state.getUser(); +const initialUserConfigViewData = ref(null); +const userConfigFilter = { + where: { + tableCode: $props.tableCode, + userFk: user.id, + }, +}; + +const formattedCols = ref([]); + +const areAllChecksMarked = computed(() => { + return formattedCols.value.every((col) => col.active); +}); + +const setUserConfigViewData = (data) => { + initialUserConfigViewData.value = data; + if (data.length === 0) return; + formattedCols.value = $props.allColumns.map((col) => { + // Importante: El name de las columnas de la tabla debe conincidir con el name de las variables que devuelve la view config + const obj = { + name: col, + active: data[0].configuration[col], + }; + return obj; + }); + emitSavedConfig(); +}; + +const toggleMarkAll = (val) => { + formattedCols.value.forEach((col) => (col.active = val)); +}; + +const saveConfig = async () => { + try { + const data = { + id: initialUserConfigViewData.value[0].id, + userFk: 9, + tableCode: $props.tableCode, + configuration: {}, + }; + + formattedCols.value.forEach((col) => { + data.configuration[col.name] = col.active; + }); + + await axios.patch('UserConfigViews', data); + emitSavedConfig(); + popupProxyRef.value.hide(); + } catch (err) { + console.error('Error saving user view config'); + } +}; +const emitSavedConfig = () => { + const filteredCols = formattedCols.value.filter((col) => col.active); + const mappedCols = filteredCols.map((col) => col.name); + emit('onConfigSaved', mappedCols); +}; + + + setUserConfigViewData(data)" + auto-load + /> + + + + + {{ t('Check the columns you want to see') }} + + {{ t('Visible columns') }} + + + + + {{ + t('globals.save') + }} + + + + + + diff --git a/src/components/ui/VnTree.vue b/src/components/ui/VnTree.vue new file mode 100644 index 000000000..23faf770f --- /dev/null +++ b/src/components/ui/VnTree.vue @@ -0,0 +1,158 @@ + + + + + + + + + {{ prop.node.name }} + + + + + {{ t('Remove') }} + + + + + {{ t('Create') }} + + + + + + + + + + + + + + es: + Departments: Departamentos + Remove: Quitar + Create: Crear + Are you sure you want to delete it?: ¿Seguro que quieres eliminarlo? + Delete department: Eliminar departamento + diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index b1efa1457..0aa0ff89e 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -111,6 +111,8 @@ export default { list: 'List', webPayments: 'Web Payments', extendedList: 'Extended list', + notifications: 'Notifications', + defaulter: 'Defaulter', createCustomer: 'Create customer', summary: 'Summary', basicData: 'Basic Data', @@ -204,6 +206,52 @@ export default { salesPerson: 'Sales person', contactChannel: 'Contact channel', }, + extendedList: { + tableVisibleColumns: { + id: 'Identifier', + name: 'Name', + fi: 'Tax number', + salesPersonFk: 'Salesperson', + credit: 'Credit', + creditInsurance: 'Credit insurance', + phone: 'Phone', + mobile: 'Mobile', + street: 'Street', + countryFk: 'Country', + provinceFk: 'Province', + city: 'City', + postcode: 'Postcode', + email: 'Email', + created: 'Created', + businessTypeFk: 'Business type', + payMethodFk: 'Billing data', + sageTaxTypeFk: 'Sage tax type', + sageTransactionTypeFk: 'Sage tr. type', + isActive: 'Active', + isVies: 'Vies', + isTaxDataChecked: 'Verified data', + isEqualizated: 'Is equalizated', + isFreezed: 'Freezed', + hasToInvoice: 'Invoice', + hasToInvoiceByAddress: 'Invoice by address', + isToBeMailed: 'Mailing', + hasLcr: 'Received LCR', + hasCoreVnl: 'VNL core received', + hasSepaVnl: 'VNL B2B received', + }, + }, + }, + entry: { + pageTitles: { + entries: 'Entries', + list: 'List', + createEntry: 'New entry', + summary: 'Summary', + create: 'Create', + }, + list: { + newEntry: 'New entry', + }, }, ticket: { pageTitles: { @@ -556,6 +604,7 @@ export default { summary: 'Summary', basicData: 'Basic Data', catalog: 'Catalog', + volume: 'Volume', }, field: { salesPersonFk: 'Sales Person', @@ -603,6 +652,25 @@ export default { amount: 'Amount', }, }, + department: { + pageTitles: { + basicData: 'Basic data', + department: 'Department', + summary: 'Summary', + }, + name: 'Name', + code: 'Code', + chat: 'Chat', + bossDepartment: 'Boss Department', + email: 'Email', + selfConsumptionCustomer: 'Self-consumption customer', + telework: 'Telework', + notifyOnErrors: 'Notify on errors', + worksInProduction: 'Works in production', + hasToRefill: 'Fill in days without physical check-ins', + hasToSendMail: 'Send check-ins by email', + departmentRemoved: 'Department removed', + }, worker: { pageTitles: { workers: 'Workers', @@ -611,6 +679,7 @@ export default { summary: 'Summary', notifications: 'Notifications', workerCreate: 'New worker', + department: 'Department', }, list: { name: 'Name', @@ -746,6 +815,15 @@ export default { list: 'List', create: 'Create', summary: 'Summary', + basicData: 'Basic data', + fiscalData: 'Fiscal data', + billingData: 'Billing data', + log: 'Log', + accounts: 'Accounts', + contacts: 'Contacts', + addresses: 'Addresses', + consumption: 'Consumption', + agencyTerm: 'Agency agreement', }, list: { payMethod: 'Pay method', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 701cb3274..67f5a15ee 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -111,6 +111,8 @@ export default { list: 'Listado', webPayments: 'Pagos Web', extendedList: 'Listado extendido', + notifications: 'Notificaciones', + defaulter: 'Morosos', createCustomer: 'Crear cliente', basicData: 'Datos básicos', summary: 'Resumen', @@ -203,6 +205,51 @@ export default { salesPerson: 'Comercial', contactChannel: 'Canal de contacto', }, + extendedList: { + tableVisibleColumns: { + id: 'Identificador', + name: 'Nombre', + fi: 'NIF / CIF', + salesPersonFk: 'Comercial', + credit: 'Crédito', + creditInsurance: 'Crédito asegurado', + phone: 'Teléfono', + mobile: 'Móvil', + street: 'Dirección fiscal', + countryFk: 'País', + provinceFk: 'Provincia', + city: 'Población', + postcode: 'Código postal', + email: 'Email', + created: 'Fecha creación', + businessTypeFk: 'Tipo de negocio', + payMethodFk: 'Forma de pago', + sageTaxTypeFk: 'Tipo de impuesto Sage', + sageTransactionTypeFk: 'Tipo tr. sage', + isActive: 'Activo', + isVies: 'Vies', + isTaxDataChecked: 'Datos comprobados', + isEqualizated: 'Recargo de equivalencias', + isFreezed: 'Congelado', + hasToInvoice: 'Factura', + hasToInvoiceByAddress: 'Factura por consigna', + isToBeMailed: 'Env. emails', + hasLcr: 'Recibido LCR', + hasCoreVnl: 'Recibido core VNL', + hasSepaVnl: 'Recibido B2B VNL', + }, + }, + }, + entry: { + pageTitles: { + entries: 'Entradas', + list: 'Listado', + summary: 'Resumen', + create: 'Crear', + }, + list: { + newEntry: 'Nueva entrada', + }, }, ticket: { pageTitles: { @@ -465,6 +512,7 @@ export default { summary: 'Resumen', basicData: 'Datos básicos', catalog: 'Catálogo', + volume: 'Volumen', }, field: { salesPersonFk: 'Comercial', @@ -603,6 +651,25 @@ export default { country: 'País', }, }, + department: { + pageTitles: { + basicData: 'Basic data', + department: 'Departamentos', + summary: 'Resumen', + }, + name: 'Nombre', + code: 'Código', + chat: 'Chat', + bossDepartment: 'Jefe de departamento', + email: 'Email', + selfConsumptionCustomer: 'Cliente autoconsumo', + telework: 'Teletrabaja', + notifyOnErrors: 'Notificar errores', + worksInProduction: 'Pertenece a producción', + hasToRefill: 'Completar días sin registros físicos', + hasToSendMail: 'Enviar fichadas por mail', + departmentRemoved: 'Departamento eliminado', + }, worker: { pageTitles: { workers: 'Trabajadores', @@ -611,6 +678,7 @@ export default { summary: 'Resumen', notifications: 'Notificaciones', workerCreate: 'Nuevo trabajador', + department: 'Departamentos', }, list: { name: 'Nombre', @@ -746,6 +814,15 @@ export default { list: 'Listado', create: 'Crear', summary: 'Resumen', + basicData: 'Datos básicos', + fiscalData: 'Datos fiscales', + billingData: 'Forma de pago', + log: 'Historial', + accounts: 'Cuentas', + contacts: 'Contactos', + addresses: 'Direcciones', + consumption: 'Consumo', + agencyTerm: 'Acuerdo agencia', }, list: { payMethod: 'Método de pago', diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue new file mode 100644 index 000000000..476c612d6 --- /dev/null +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + {{ `${rows.length} ${t('route.cmr.list.results')}` }} + + + + + + + {{ props.value }} + + + + + + + + + + + + + + +es: + Client: Cliente + Is worker: Es trabajador + Salesperson: Comercial + Country: País + P. Method: F. Pago + Balance D.: Saldo V. + Author: Autor + Last observation: Última observación + L. O. Date: Fecha Ú. O. + Credit I.: Crédito A. + From: Desde + diff --git a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue new file mode 100644 index 000000000..43ceb1bac --- /dev/null +++ b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue @@ -0,0 +1,238 @@ + + + + (clients = data)" auto-load url="Clients" /> + (salespersons = data)" + auto-load + url="Workers/activeWithInheritedRole" + /> + (countries = data)" auto-load url="Countries" /> + (authors = data)" + auto-load + url="Workers/activeWithInheritedRole" + /> + + + + + {{ t(`params.${tag.label}`) }}: + {{ formatFn(tag.value) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +en: + params: + clientFk: Client + salesPersonFk: Salesperson + countryFk: Country + paymentMethod: P. Method + balance: Balance D. + workerFk: Author + date: L. O. Date + credit: Credit I. + defaulterSinced: From +es: + params: + clientFk: Cliente + salesPersonFk: Comercial + countryFk: País + paymentMethod: F. Pago + balance: Saldo V. + workerFk: Autor + date: Fecha Ú. O. + credit: Crédito A. + defaulterSinced: Desde + Client: Cliente + Salesperson: Comercial + Country: País + P. Method: F. Pago + Balance D.: Saldo V. + Author: Autor + L. O. Date: Fecha Ú. O. + Credit I.: Crédito A. + From: Desde + diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue new file mode 100644 index 000000000..a1aa47791 --- /dev/null +++ b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue @@ -0,0 +1,570 @@ + + + + + + + + + + + + + + + + + + + + + + + + {{ dashIfEmpty(col.value) }} + + + + + + + + + + + diff --git a/src/pages/Customer/CustomerExtendedListActions.vue b/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue similarity index 57% rename from src/pages/Customer/CustomerExtendedListActions.vue rename to src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue index 1fec71ffe..a7c51d714 100644 --- a/src/pages/Customer/CustomerExtendedListActions.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue @@ -4,7 +4,7 @@ import { useRouter } from 'vue-router'; import { useQuasar } from 'quasar'; -import CustomerSummaryDialog from './Card/CustomerSummaryDialog.vue'; +import CustomerSummaryDialog from '../Card/CustomerSummaryDialog.vue'; const { t } = useI18n(); const quasar = useQuasar(); @@ -39,22 +39,29 @@ const viewSummary = () => { - - - {{ t('Client ticket list') }} - - - - - {{ t('Preview') }} - - + + + + {{ t('Client ticket list') }} + + + + + {{ t('Preview') }} + + + diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue new file mode 100644 index 000000000..a4d26a78a --- /dev/null +++ b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue @@ -0,0 +1,576 @@ + + + + (clients = data)" + auto-load + /> + (workers = data)" + auto-load + /> + (workers = data)" + auto-load + /> + (countriesOptions = data)" + auto-load + /> + (provincesOptions = data)" + auto-load + url="Provinces" + /> + (paymethodsOptions = data)" + auto-load + /> + (businessTypesOptions = data)" + auto-load + /> + (sageTaxTypesOptions = data)" + /> + (sageTransactionTypesOptions = data)" + /> + + + + {{ t(`customer.extendedList.tableVisibleColumns.${tag.label}`) }}: + + {{ formatFn(tag.value) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<<<<<<< HEAD:src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue +es: + Identifier: Identificador +======= + +es: +>>>>>>> dev:src/pages/Customer/CustomerExtendedListFilter.vue + Social name: Razón social + diff --git a/src/pages/Customer/CustomerExtendedList.vue b/src/pages/Customer/Notifications/CustomerNotifications.vue similarity index 59% rename from src/pages/Customer/CustomerExtendedList.vue rename to src/pages/Customer/Notifications/CustomerNotifications.vue index be3463867..e8d779cb5 100644 --- a/src/pages/Customer/CustomerExtendedList.vue +++ b/src/pages/Customer/Notifications/CustomerNotifications.vue @@ -1,26 +1,23 @@ (clients = data)" auto-load + url="Clients" /> - (workers = data)" - auto-load - /> + (cities = data)" auto-load url="Towns" /> @@ -39,79 +34,78 @@ const workers = ref(); {{ formatFn(tag.value) }} + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -132,22 +126,19 @@ en: params: identifier: Identifier socialName: Social name - salesPerson: Salesperson - phone: Phone city: City + phone: Phone email: Email es: params: identifier: Identificador socialName: Razón social - salesPerson: Comercial - phone: Teléfono city: Población + phone: Teléfono email: Email Identifier: Identificador Social name: Razón social - Salesperson: Comercial - Phone: Teléfono City: Población + Phone: Teléfono Email: Email diff --git a/src/pages/Customer/CustomerPayments.vue b/src/pages/Customer/Payments/CustomerPayments.vue similarity index 99% rename from src/pages/Customer/CustomerPayments.vue rename to src/pages/Customer/Payments/CustomerPayments.vue index 24e5efa39..b4a907665 100644 --- a/src/pages/Customer/CustomerPayments.vue +++ b/src/pages/Customer/Payments/CustomerPayments.vue @@ -7,7 +7,7 @@ import { useStateStore } from 'stores/useStateStore'; import { useArrayData } from 'composables/useArrayData'; import VnPaginate from 'components/ui/VnPaginate.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; -import CustomerDescriptorProxy from './Card/CustomerDescriptorProxy.vue'; +import CustomerDescriptorProxy from '../Card/CustomerDescriptorProxy.vue'; import { toDate, toCurrency } from 'filters/index'; import CustomerPaymentsFilter from './CustomerPaymentsFilter.vue'; diff --git a/src/pages/Customer/CustomerPaymentsFilter.vue b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue similarity index 100% rename from src/pages/Customer/CustomerPaymentsFilter.vue rename to src/pages/Customer/Payments/CustomerPaymentsFilter.vue diff --git a/src/pages/Department/Card/DepartmentBasicData.vue b/src/pages/Department/Card/DepartmentBasicData.vue new file mode 100644 index 000000000..3b30a97e6 --- /dev/null +++ b/src/pages/Department/Card/DepartmentBasicData.vue @@ -0,0 +1,135 @@ + + + (workersOptions = data)" + auto-load + /> + (clientsOptions = data)" auto-load /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Department/Card/DepartmentCard.vue b/src/pages/Department/Card/DepartmentCard.vue new file mode 100644 index 000000000..885b5e5f1 --- /dev/null +++ b/src/pages/Department/Card/DepartmentCard.vue @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Department/Card/DepartmentDescriptor.vue b/src/pages/Department/Card/DepartmentDescriptor.vue new file mode 100644 index 000000000..1f7e6dcbb --- /dev/null +++ b/src/pages/Department/Card/DepartmentDescriptor.vue @@ -0,0 +1,129 @@ + + + { + department = data; + setData(data); + } + " + > + + + {{ t('Delete') }} + + + + + + + + + + + + {{ t('Department workers') }} + + + + + + + + es: + Department workers: Trabajadores del departamento + diff --git a/src/pages/Department/Card/DepartmentSummary.vue b/src/pages/Department/Card/DepartmentSummary.vue new file mode 100644 index 000000000..40bb4c83d --- /dev/null +++ b/src/pages/Department/Card/DepartmentSummary.vue @@ -0,0 +1,107 @@ + + + + + + {{ entity.name }} + + + + + {{ t('Basic data') }} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Entry/Card/EntryCard.vue b/src/pages/Entry/Card/EntryCard.vue new file mode 100644 index 000000000..5aa50fc94 --- /dev/null +++ b/src/pages/Entry/Card/EntryCard.vue @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/Entry/EntryCreate.vue b/src/pages/Entry/EntryCreate.vue new file mode 100644 index 000000000..30b54cb38 --- /dev/null +++ b/src/pages/Entry/EntryCreate.vue @@ -0,0 +1,135 @@ + + + + (suppliersOptions = data)" + auto-load + /> + (travelsOptionsOptions = data)" + auto-load + /> + (companiesOptions = data)" + auto-load + /> + + + + + + + + + + + + + + + + + {{ scope.opt?.nickname }} + + #{{ scope.opt?.id }} + + + + + + + + + + + + {{ scope.opt?.agencyModeName }} - + {{ scope.opt?.warehouseInName }} ({{ + toDate(scope.opt?.shipped) + }}) → {{ scope.opt?.warehouseOutName }} ({{ + toDate(scope.opt?.landed) + }}) + + + + + + + + + + + + + + + es: + Supplier *: Proveedor * + Travel *: Envío * + Company *: Empresa * + diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue new file mode 100644 index 000000000..1baa9e019 --- /dev/null +++ b/src/pages/Entry/EntryList.vue @@ -0,0 +1,22 @@ + + + + + + + + {{ t('entry.list.newEntry') }} + + + + diff --git a/src/pages/Entry/EntryMain.vue b/src/pages/Entry/EntryMain.vue new file mode 100644 index 000000000..66ce78f23 --- /dev/null +++ b/src/pages/Entry/EntryMain.vue @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/src/pages/InvoiceOut/InvoiceOutGlobal.vue b/src/pages/InvoiceOut/InvoiceOutGlobal.vue index 7284ca04e..ea1978702 100644 --- a/src/pages/InvoiceOut/InvoiceOutGlobal.vue +++ b/src/pages/InvoiceOut/InvoiceOutGlobal.vue @@ -175,7 +175,7 @@ onUnmounted(() => { .col-content { border-radius: 4px; - padding: 6px 6px 6px 6px; + padding: 6px; } diff --git a/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue b/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue index 3595a650d..15010c66d 100644 --- a/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue +++ b/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue @@ -255,7 +255,7 @@ const selectWorkerId = (id) => { diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index 46de63abd..814aa49c6 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -67,24 +67,19 @@ function exprBuilder(param, value) { return { [param]: value }; } } + +const setCategoryList = (data) => { + categoryList.value = (data || []) + .filter((category) => category.display) + .map((category) => ({ + ...category, + icon: `vn:${(category.icon || '').split('-')[1]}`, + })); +}; - { - categoryList = (data || []) - .filter((category) => category.display) - .map((category) => ({ - ...category, - icon: `vn:${(category.icon || '').split('-')[1]}`, - })); - } - " - /> + { - + diff --git a/src/pages/Order/Card/OrderSearchbar.vue b/src/pages/Order/Card/OrderSearchbar.vue index 4d354603b..a768768a5 100644 --- a/src/pages/Order/Card/OrderSearchbar.vue +++ b/src/pages/Order/Card/OrderSearchbar.vue @@ -9,17 +9,14 @@ const { t } = useI18n(); -en: - search-order: Search order - search-order-info: You can search orders by reference es: - Search shelving: Buscar orden - You can search by shelving reference: Puedes buscar por referencia de la orden + Search order: Buscar orden + You can search orders by reference: Puedes buscar por referencia de la orden diff --git a/src/pages/Order/Card/OrderSummary.vue b/src/pages/Order/Card/OrderSummary.vue index 464ab3dfc..0efffa3fa 100644 --- a/src/pages/Order/Card/OrderSummary.vue +++ b/src/pages/Order/Card/OrderSummary.vue @@ -110,15 +110,11 @@ const detailsColumns = ref([ :label="t('order.summary.createdFrom')" :value="entity?.sourceApp" /> - - - - {{ - `${entity?.address?.street} - ${entity?.address?.city} (${entity?.address?.province?.name})` - }} - - - + @@ -203,11 +199,18 @@ const detailsColumns = ref([ - + + + +en: + summary: Summary + total: Total + boxes: Boxes + item: Item + subName: Subname + quantity: Quantity + volume: m³ per quantity +es: + summary: Resumen + total: Total + boxes: Cajas + item: Artículo + subName: Subname + quantity: Cantidad + volume: m³ por cantidad + diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue new file mode 100644 index 000000000..2b7059ea3 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierAccounts.vue @@ -0,0 +1 @@ +Supplier accounts diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue new file mode 100644 index 000000000..dd82abe78 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierAddresses.vue @@ -0,0 +1 @@ +Supplier addresses diff --git a/src/pages/Supplier/Card/SupplierAgencyTerm.vue b/src/pages/Supplier/Card/SupplierAgencyTerm.vue new file mode 100644 index 000000000..2a0c341cf --- /dev/null +++ b/src/pages/Supplier/Card/SupplierAgencyTerm.vue @@ -0,0 +1 @@ +Supplier agency term diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue new file mode 100644 index 000000000..582da48f3 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierBasicData.vue @@ -0,0 +1 @@ +Supplier basic data diff --git a/src/pages/Supplier/Card/SupplierBillingData.vue b/src/pages/Supplier/Card/SupplierBillingData.vue new file mode 100644 index 000000000..849737fa7 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierBillingData.vue @@ -0,0 +1 @@ +Supplier billing data diff --git a/src/pages/Supplier/Card/SupplierCard.vue b/src/pages/Supplier/Card/SupplierCard.vue index cf94c9e8d..04115cc3d 100644 --- a/src/pages/Supplier/Card/SupplierCard.vue +++ b/src/pages/Supplier/Card/SupplierCard.vue @@ -2,6 +2,8 @@ import { useI18n } from 'vue-i18n'; import { useStateStore } from 'stores/useStateStore'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; +import LeftMenu from 'components/LeftMenu.vue'; +import SupplierDescriptor from './SupplierDescriptor.vue'; const stateStore = useStateStore(); const { t } = useI18n(); @@ -18,7 +20,9 @@ const { t } = useI18n(); - + + + diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue new file mode 100644 index 000000000..df1dead17 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierConsumption.vue @@ -0,0 +1 @@ +Supplier consumption diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue new file mode 100644 index 000000000..ca58d4ab7 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierContacts.vue @@ -0,0 +1 @@ +Supplier contacts diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue new file mode 100644 index 000000000..dd018ac60 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierFiscalData.vue @@ -0,0 +1 @@ +Supplier fiscal data diff --git a/src/pages/Supplier/Card/SupplierLog.vue b/src/pages/Supplier/Card/SupplierLog.vue new file mode 100644 index 000000000..2733e958d --- /dev/null +++ b/src/pages/Supplier/Card/SupplierLog.vue @@ -0,0 +1 @@ +Supplier log diff --git a/src/pages/Supplier/SupplierCreate.vue b/src/pages/Supplier/SupplierCreate.vue index 3317225d5..d6cfaeb42 100644 --- a/src/pages/Supplier/SupplierCreate.vue +++ b/src/pages/Supplier/SupplierCreate.vue @@ -51,13 +51,3 @@ const newSupplierForm = reactive({ - - diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue index ad4659b11..c8a62ec00 100644 --- a/src/pages/Travel/Card/TravelSummary.vue +++ b/src/pages/Travel/Card/TravelSummary.vue @@ -2,15 +2,17 @@ import { onMounted, ref, computed, onUpdated } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; + +import { QCheckbox, QIcon } from 'quasar'; import CardSummary from 'components/ui/CardSummary.vue'; import VnLv from 'src/components/ui/VnLv.vue'; -import { getUrl } from 'src/composables/getUrl'; -import { toDate } from 'src/filters'; -import travelService from 'src/services/travel.service'; -import { QCheckbox, QIcon } from 'quasar'; -import { toCurrency } from 'filters/index'; import VnRow from 'components/ui/VnRow.vue'; +import travelService from 'src/services/travel.service'; +import { toDate, toCurrency } from 'src/filters'; +import { getUrl } from 'src/composables/getUrl'; +import axios from 'axios'; + onUpdated(() => summaryRef.value.fetch()); const route = useRoute(); @@ -40,9 +42,17 @@ const cloneTravel = () => { redirectToCreateView(stringifiedTravelData); }; +const cloneTravelWithEntries = () => { + try { + axios.post(`Travels/${$props.id}/cloneWithEntries`); + } catch (err) { + console.err('Error cloning travel with entries'); + } +}; + const headerMenuOptions = [ { name: t('travel.summary.cloneShipping'), action: cloneTravel }, - { name: t('travel.summary.CloneTravelAndEntries'), action: null }, + { name: t('travel.summary.CloneTravelAndEntries'), action: cloneTravelWithEntries }, { name: t('travel.summary.AddEntry'), action: null }, ]; diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue index 245cbc9de..f3cf557c6 100644 --- a/src/pages/Travel/ExtraCommunity.vue +++ b/src/pages/Travel/ExtraCommunity.vue @@ -395,7 +395,7 @@ onMounted(async () => {
@@ -203,11 +199,18 @@ const detailsColumns = ref([ - + + + +en: + summary: Summary + total: Total + boxes: Boxes + item: Item + subName: Subname + quantity: Quantity + volume: m³ per quantity +es: + summary: Resumen + total: Total + boxes: Cajas + item: Artículo + subName: Subname + quantity: Cantidad + volume: m³ por cantidad + diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue new file mode 100644 index 000000000..2b7059ea3 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierAccounts.vue @@ -0,0 +1 @@ +Supplier accounts diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue new file mode 100644 index 000000000..dd82abe78 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierAddresses.vue @@ -0,0 +1 @@ +Supplier addresses diff --git a/src/pages/Supplier/Card/SupplierAgencyTerm.vue b/src/pages/Supplier/Card/SupplierAgencyTerm.vue new file mode 100644 index 000000000..2a0c341cf --- /dev/null +++ b/src/pages/Supplier/Card/SupplierAgencyTerm.vue @@ -0,0 +1 @@ +Supplier agency term diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue new file mode 100644 index 000000000..582da48f3 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierBasicData.vue @@ -0,0 +1 @@ +Supplier basic data diff --git a/src/pages/Supplier/Card/SupplierBillingData.vue b/src/pages/Supplier/Card/SupplierBillingData.vue new file mode 100644 index 000000000..849737fa7 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierBillingData.vue @@ -0,0 +1 @@ +Supplier billing data diff --git a/src/pages/Supplier/Card/SupplierCard.vue b/src/pages/Supplier/Card/SupplierCard.vue index cf94c9e8d..04115cc3d 100644 --- a/src/pages/Supplier/Card/SupplierCard.vue +++ b/src/pages/Supplier/Card/SupplierCard.vue @@ -2,6 +2,8 @@ import { useI18n } from 'vue-i18n'; import { useStateStore } from 'stores/useStateStore'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; +import LeftMenu from 'components/LeftMenu.vue'; +import SupplierDescriptor from './SupplierDescriptor.vue'; const stateStore = useStateStore(); const { t } = useI18n(); @@ -18,7 +20,9 @@ const { t } = useI18n(); - + + + diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue new file mode 100644 index 000000000..df1dead17 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierConsumption.vue @@ -0,0 +1 @@ +Supplier consumption diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue new file mode 100644 index 000000000..ca58d4ab7 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierContacts.vue @@ -0,0 +1 @@ +Supplier contacts diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue new file mode 100644 index 000000000..dd018ac60 --- /dev/null +++ b/src/pages/Supplier/Card/SupplierFiscalData.vue @@ -0,0 +1 @@ +Supplier fiscal data diff --git a/src/pages/Supplier/Card/SupplierLog.vue b/src/pages/Supplier/Card/SupplierLog.vue new file mode 100644 index 000000000..2733e958d --- /dev/null +++ b/src/pages/Supplier/Card/SupplierLog.vue @@ -0,0 +1 @@ +Supplier log diff --git a/src/pages/Supplier/SupplierCreate.vue b/src/pages/Supplier/SupplierCreate.vue index 3317225d5..d6cfaeb42 100644 --- a/src/pages/Supplier/SupplierCreate.vue +++ b/src/pages/Supplier/SupplierCreate.vue @@ -51,13 +51,3 @@ const newSupplierForm = reactive({ - - diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue index ad4659b11..c8a62ec00 100644 --- a/src/pages/Travel/Card/TravelSummary.vue +++ b/src/pages/Travel/Card/TravelSummary.vue @@ -2,15 +2,17 @@ import { onMounted, ref, computed, onUpdated } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; + +import { QCheckbox, QIcon } from 'quasar'; import CardSummary from 'components/ui/CardSummary.vue'; import VnLv from 'src/components/ui/VnLv.vue'; -import { getUrl } from 'src/composables/getUrl'; -import { toDate } from 'src/filters'; -import travelService from 'src/services/travel.service'; -import { QCheckbox, QIcon } from 'quasar'; -import { toCurrency } from 'filters/index'; import VnRow from 'components/ui/VnRow.vue'; +import travelService from 'src/services/travel.service'; +import { toDate, toCurrency } from 'src/filters'; +import { getUrl } from 'src/composables/getUrl'; +import axios from 'axios'; + onUpdated(() => summaryRef.value.fetch()); const route = useRoute(); @@ -40,9 +42,17 @@ const cloneTravel = () => { redirectToCreateView(stringifiedTravelData); }; +const cloneTravelWithEntries = () => { + try { + axios.post(`Travels/${$props.id}/cloneWithEntries`); + } catch (err) { + console.err('Error cloning travel with entries'); + } +}; + const headerMenuOptions = [ { name: t('travel.summary.cloneShipping'), action: cloneTravel }, - { name: t('travel.summary.CloneTravelAndEntries'), action: null }, + { name: t('travel.summary.CloneTravelAndEntries'), action: cloneTravelWithEntries }, { name: t('travel.summary.AddEntry'), action: null }, ]; diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue index 245cbc9de..f3cf557c6 100644 --- a/src/pages/Travel/ExtraCommunity.vue +++ b/src/pages/Travel/ExtraCommunity.vue @@ -395,7 +395,7 @@ onMounted(async () => {