diff --git a/src/components/common/TableVisibleColumns.vue b/src/components/common/TableVisibleColumns.vue new file mode 100644 index 000000000..94e3bfbc7 --- /dev/null +++ b/src/components/common/TableVisibleColumns.vue @@ -0,0 +1,140 @@ + + + setUserConfigViewData(data)" + auto-load + /> + + + + + {{ t('Check the columns you want to see') }} + + {{ t('Visible columns') }} + + + + + {{ + t('globals.save') + }} + + + + + + diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 8d8e4c670..65e8c4cf2 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -207,6 +207,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: { @@ -770,6 +816,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 16b1e4125..ed658c87c 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -206,6 +206,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: { @@ -770,6 +815,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/ExtendedList/CustomerExtendedList.vue b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue index be3463867..a60b79caf 100644 --- a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue @@ -1,16 +1,18 @@ - + - + + + @@ -149,11 +521,11 @@ const selectCustomerId = (id) => { { v-bind="tableColumnComponents[col.name].props(props)" @click="tableColumnComponents[col.name].event(props)" > - {{ col.value }} - + {{ dashIfEmpty(col.value) }} + + @@ -189,13 +568,3 @@ const selectCustomerId = (id) => { padding: 6px 6px 6px 6px; } - - -es: - Identifier: Identificador - Social name: Razón social - Salesperson: Comercial - Phone: Teléfono - City: Población - Email: Email - diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue b/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue index 7e3639522..a7c51d714 100644 --- a/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue @@ -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 index dbed3141d..a4d26a78a 100644 --- a/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue @@ -1,22 +1,40 @@ @@ -32,25 +50,75 @@ const workers = ref(); @on-fetch="(data) => (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(`params.${tag.label}`) }}: + {{ t(`customer.extendedList.tableVisibleColumns.${tag.label}`) }}: + {{ formatFn(tag.value) }} - - + + + + + + + - + + + + + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -128,11 +565,12 @@ const workers = ref(); +<<<<<<< HEAD:src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue es: Identifier: Identificador +======= + +es: +>>>>>>> dev:src/pages/Customer/CustomerExtendedListFilter.vue Social name: Razón social - Salesperson: Comercial - Phone: Teléfono - City: Población - Email: Email 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/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/TravelList.vue b/src/pages/Travel/TravelList.vue index 56d529a7b..889f096aa 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -31,6 +31,10 @@ const redirectToCreateView = (queryParams) => { router.push({ name: 'TravelCreate', query: { travelData: queryParams } }); }; +const redirectCreateEntryView = (travelData) => { + router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } }); +}; + const viewSummary = (id) => { quasar.dialog({ component: TravelSummaryDialog, @@ -103,7 +107,7 @@ onMounted(async () => { /> import('src/pages/Supplier/Card/SupplierSummary.vue'), }, + { + path: 'basic-data', + name: 'SupplierBasicData', + meta: { + title: 'basicData', + icon: 'vn:settings', + }, + component: () => + import('src/pages/Supplier/Card/SupplierBasicData.vue'), + }, + { + path: 'fiscal-data', + name: 'SupplierFiscalData', + meta: { + title: 'fiscalData', + icon: 'vn:dfiscales', + }, + component: () => + import('src/pages/Supplier/Card/SupplierFiscalData.vue'), + }, + { + path: 'billing-data', + name: 'SupplierBillingData', + meta: { + title: 'billingData', + icon: 'vn:payment', + }, + component: () => + import('src/pages/Supplier/Card/SupplierBillingData.vue'), + }, + { + path: 'log', + name: 'SupplierLog', + meta: { + title: 'log', + icon: 'vn:History', + }, + component: () => import('src/pages/Supplier/Card/SupplierLog.vue'), + }, + { + path: 'account', + name: 'SupplierAccounts', + meta: { + title: 'accounts', + icon: 'vn:account', + }, + component: () => + import('src/pages/Supplier/Card/SupplierAccounts.vue'), + }, + { + path: 'contact', + name: 'SupplierContacts', + meta: { + title: 'contacts', + icon: 'contact_phone', + }, + component: () => + import('src/pages/Supplier/Card/SupplierContacts.vue'), + }, + { + path: 'address', + name: 'SupplierAddresses', + meta: { + title: 'addresses', + icon: 'vn:delivery', + }, + component: () => + import('src/pages/Supplier/Card/SupplierAddresses.vue'), + }, + { + path: 'consumption', + name: 'SupplierConsumption', + meta: { + title: 'consumption', + icon: 'show_chart', + }, + component: () => + import('src/pages/Supplier/Card/SupplierConsumption.vue'), + }, + { + path: 'agency-term', + name: 'SupplierAgencyTerm', + meta: { + title: 'agencyTerm', + icon: 'vn:agency-term', + }, + component: () => + import('src/pages/Supplier/Card/SupplierAgencyTerm.vue'), + }, ], }, ], diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js new file mode 100644 index 000000000..6a1cd6173 --- /dev/null +++ b/src/router/modules/entry.js @@ -0,0 +1,61 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/entry', + name: 'Entry', + meta: { + title: 'entries', + icon: 'vn:entry', + }, + component: RouterView, + redirect: { name: 'EntryMain' }, + menus: { + main: ['EntryList'], + card: [], + }, + children: [ + { + path: '', + name: 'EntryMain', + component: () => import('src/pages/Entry/EntryMain.vue'), + redirect: { name: 'EntryList' }, + children: [ + { + path: 'list', + name: 'EntryList', + meta: { + title: 'list', + icon: 'view_list', + }, + component: () => import('src/pages/Entry/EntryList.vue'), + }, + { + path: 'create', + name: 'EntryCreate', + meta: { + title: 'create', + }, + component: () => import('src/pages/Entry/EntryCreate.vue'), + }, + ], + }, + // { + // name: 'EntryCard', + // path: ':id', + // component: () => import('src/pages/Entry/Card/EntryCard.vue'), + // redirect: { name: 'EntrySummary' }, + // children: [ + // { + // name: 'EntrySummary', + // path: 'summary', + // meta: { + // title: 'summary', + // icon: 'launch', + // }, + // component: () => + // import('src/pages/Entry/Card/EntrySummary.vue'), + // }, + // ], + // }, + ], +}; diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 68d1d8146..cc5034959 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -11,6 +11,7 @@ import Supplier from './Supplier'; import Travel from './travel'; import Order from './order'; import Department from './department'; +import Entry from './entry'; export default [ Customer, @@ -26,4 +27,5 @@ export default [ Order, invoiceIn, Department, + Entry, ]; diff --git a/src/router/routes.js b/src/router/routes.js index 32f5aaef6..6a2fa6a97 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -11,6 +11,7 @@ import travel from './modules/travel'; import department from './modules/department'; import shelving from 'src/router/modules/shelving'; import order from 'src/router/modules/order'; +import entry from 'src/router/modules/entry'; const routes = [ { @@ -63,6 +64,7 @@ const routes = [ supplier, travel, department, + entry, { path: '/:catchAll(.*)*', name: 'NotFound', diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index 63dce6162..6964c9401 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -19,6 +19,7 @@ export const useNavigationStore = defineStore('navigationStore', () => { 'supplier', 'travel', 'invoiceIn', + 'entry', ]; const pinnedModules = ref([]); const role = useRole();