diff --git a/src/components/ui/FetchedTags.vue b/src/components/ui/FetchedTags.vue new file mode 100644 index 000000000..364713cbc --- /dev/null +++ b/src/components/ui/FetchedTags.vue @@ -0,0 +1,54 @@ + + + + diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss index 37f693da6..33e59074f 100644 --- a/src/css/quasar.variables.scss +++ b/src/css/quasar.variables.scss @@ -22,3 +22,9 @@ $positive: #21ba45; $negative: #c10015; $info: #31ccec; $warning: #f2c037; + +$color-spacer-light: rgba(255, 255, 255, .12); +$color-spacer:rgba(255, 255, 255, .3); +$border-thin-light: 1px solid $color-spacer-light; + +$spacing-md: 16px; diff --git a/src/filters/dashIfEmpty.js b/src/filters/dashIfEmpty.js new file mode 100644 index 000000000..4d959ea2c --- /dev/null +++ b/src/filters/dashIfEmpty.js @@ -0,0 +1,4 @@ +export default function (value) { + if (value == null || value === '') return '-'; + return value; +} diff --git a/src/filters/index.js b/src/filters/index.js index 70b0edc82..5fa3bd9c3 100644 --- a/src/filters/index.js +++ b/src/filters/index.js @@ -3,6 +3,7 @@ import toDate from './toDate'; import toCurrency from './toCurrency'; import toPercentage from './toPercentage'; import toLowerCamel from './toLowerCamel'; +import dashIfEmpty from './dashIfEmpty'; export { toLowerCase, @@ -10,4 +11,5 @@ export { toDate, toCurrency, toPercentage, + dashIfEmpty, }; diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 31da55081..119d7362d 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -187,6 +187,49 @@ export default { selectVideo: 'Select video:', notFound: 'No videos available', }, + summary: { + state: 'State', + salesPerson: 'Sales person', + agency: 'Agency', + zone: 'Zone', + warehouse: 'Warehouse', + route: 'Route', + invoice: 'Invoice', + shipped: 'Shipped', + landed: 'Landed', + packages: 'Packages', + consigneePhone: 'Consignee phone', + consigneeMobile: 'Consignee mobile', + clientPhone: 'Client phone', + clientMobile: 'Client mobile', + consignee: 'Consignee', + subtotal: 'Subtotal', + vat: 'VAT', + total: 'Total', + saleLines: 'Line items', + item: 'Item', + visible: 'Visible', + available: 'Available', + quantity: 'Quantity', + description: 'Description', + price: 'Price', + discount: 'Discount', + amount: 'Amount', + packing: 'Packing', + hasComponentLack: 'Component lack', + itemShortage: 'Not visible', + claim: 'Claim', + reserved: 'Reserved', + created: 'Created', + package: 'Package', + taxClass: 'Tax class', + services: 'Services', + changeState: 'Change state', + requester: 'Requester', + atender: 'Atender', + request: 'Request', + goTo: 'Go to' + } }, claim: { pageTitles: { @@ -251,6 +294,50 @@ export default { returnOfMaterial: 'Return of material authorization (RMA)', }, }, + invoiceOut: { + pageTitles: { + invoiceOuts: 'InvoiceOuts', + list: 'List', + createInvoiceOut: 'Create invoice out', + summary: 'Summary', + basicData: 'Basic Data' + }, + list: { + ref: 'Reference', + issued: 'Issued', + amount: 'Amount', + client: 'Client', + created: 'Created', + company: 'Company', + dued: 'Due date' + }, + card: { + issued: 'Issued', + amount: 'Amount', + client: 'Client', + company: 'Company', + customerCard: 'Customer card', + ticketList: 'Ticket List' + }, + summary: { + issued: 'Issued', + created: 'Created', + dued: 'Due', + booked: 'Booked', + company: 'Company', + taxBreakdown: 'Tax breakdown', + type: 'Type', + taxableBase: 'Taxable base', + rate: 'Rate', + fee: 'Fee', + tickets: 'Tickets', + ticketId: 'Ticket id', + nickname: 'Alias', + shipped: 'Shipped', + totalWithVat: 'Amount', + + } + }, components: { topbar: {}, userPanel: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index ce613b32a..89b52e237 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -186,6 +186,49 @@ export default { selectVideo: 'Seleccionar vídeo:', notFound: 'No hay vídeos disponibles', }, + summary: { + state: 'Estado', + salesPerson: 'Comercial', + agency: 'Agencia', + zone: 'Zona', + warehouse: 'Almacén', + route: 'Ruta', + invoice: 'Factura', + shipped: 'Enviado', + landed: 'Entregado', + packages: 'Bultos', + consigneePhone: 'Tel. consignatario', + consigneeMobile: 'Móv. consignatario', + clientPhone: 'Tel. cliente', + clientMobile: 'Móv. cliente', + consignee: 'Consignatario', + subtotal: 'Subtotal', + vat: 'IVA', + total: 'Total', + saleLines: 'Líneas del pedido', + item: 'Artículo', + visible: 'Visible', + available: 'Disponible', + quantity: 'Cantidad', + description: 'Descripción', + price: 'Precio', + discount: 'Descuento', + amount: 'Importe', + packing: 'Encajado', + hasComponentLack: 'Faltan componentes', + itemShortage: 'No visible', + claim: 'Reclamación', + reserved: 'Reservado', + created: 'Fecha creación', + package: 'Embalaje', + taxClass: 'Tipo IVA', + services: 'Servicios', + changeState: 'Cambiar estado', + requester: 'Solicitante', + atender: 'Comprador', + request: 'Petición de compra', + goTo: 'Ir a' + } }, claim: { pageTitles: { @@ -250,6 +293,50 @@ export default { returnOfMaterial: 'Autorización de retorno de materiales (RMA)', }, }, + invoiceOut: { + pageTitles: { + invoiceOuts: 'Fact. emitidas', + list: 'Listado', + createInvoiceOut: 'Crear fact. emitida', + summary: 'Resumen', + basicData: 'Datos básicos' + }, + list: { + ref: 'Referencia', + issued: 'Fecha emisión', + amount: 'Importe', + client: 'Cliente', + created: 'Fecha creación', + company: 'Empresa', + dued: 'Fecha vencimineto' + }, + card: { + issued: 'Fecha emisión', + amount: 'Importe', + client: 'Cliente', + company: 'Empresa', + customerCard: 'Ficha del cliente', + ticketList: 'Listado de tickets' + }, + summary: { + issued: 'Fecha', + created: 'Fecha creación', + dued: 'Vencimiento', + booked: 'Contabilizada', + company: 'Empresa', + taxBreakdown: 'Desglose impositivo', + type: 'Tipo', + taxableBase: 'Base imp.', + rate: 'Tarifa', + fee: 'Cuota', + tickets: 'Tickets', + ticketId: 'Id ticket', + nickname: 'Alias', + shipped: 'F. envío', + totalWithVat: 'Importe', + + } + }, components: { topbar: {}, userPanel: { diff --git a/src/pages/Claim/Card/ClaimSummaryDialog.vue b/src/pages/Claim/Card/ClaimSummaryDialog.vue index e0b4d22c1..4364f28ab 100644 --- a/src/pages/Claim/Card/ClaimSummaryDialog.vue +++ b/src/pages/Claim/Card/ClaimSummaryDialog.vue @@ -19,3 +19,11 @@ const { dialogRef, onDialogHide } = useDialogPluginComponent(); + + diff --git a/src/pages/Customer/Card/CustomerSummaryDialog.vue b/src/pages/Customer/Card/CustomerSummaryDialog.vue index 84ecaf084..d40d99d1b 100644 --- a/src/pages/Customer/Card/CustomerSummaryDialog.vue +++ b/src/pages/Customer/Card/CustomerSummaryDialog.vue @@ -19,3 +19,11 @@ const { dialogRef, onDialogHide } = useDialogPluginComponent(); + + diff --git a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue new file mode 100644 index 000000000..00e603d20 --- /dev/null +++ b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue @@ -0,0 +1,18 @@ + + diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue new file mode 100644 index 000000000..d26801582 --- /dev/null +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue @@ -0,0 +1,103 @@ + + + diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorPopover.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorPopover.vue new file mode 100644 index 000000000..30d27669d --- /dev/null +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorPopover.vue @@ -0,0 +1,15 @@ + + diff --git a/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue b/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue new file mode 100644 index 000000000..27bb5439c --- /dev/null +++ b/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/src/pages/InvoiceOut/Card/InvoiceOutSummaryDialog.vue b/src/pages/InvoiceOut/Card/InvoiceOutSummaryDialog.vue new file mode 100644 index 000000000..0e5b3127a --- /dev/null +++ b/src/pages/InvoiceOut/Card/InvoiceOutSummaryDialog.vue @@ -0,0 +1,21 @@ + + + diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue new file mode 100644 index 000000000..f5eebd2a3 --- /dev/null +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -0,0 +1,83 @@ + + + diff --git a/src/pages/InvoiceOut/InvoiceOutMain.vue b/src/pages/InvoiceOut/InvoiceOutMain.vue new file mode 100644 index 000000000..099e82879 --- /dev/null +++ b/src/pages/InvoiceOut/InvoiceOutMain.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index e69de29bb..f2cdb4c7a 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -0,0 +1,553 @@ + + + + diff --git a/src/pages/Ticket/Card/TicketSummaryDialog.vue b/src/pages/Ticket/Card/TicketSummaryDialog.vue new file mode 100644 index 000000000..40b88a96d --- /dev/null +++ b/src/pages/Ticket/Card/TicketSummaryDialog.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index 330c17bbf..212a4f359 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -1,12 +1,13 @@ @@ -108,42 +107,16 @@ function showPreview(id) { - - {{ t('components.smartCard.openCard') }} - + {{ t('components.smartCard.openSummary') }} - - diff --git a/src/router/index.js b/src/router/index.js index 5ab014d73..8fe77f2c9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -5,6 +5,7 @@ import { i18n } from 'src/boot/i18n'; import { useState } from 'src/composables/useState'; import { useSession } from 'src/composables/useSession'; import { useRole } from 'src/composables/useRole'; +import { toLowerCamel } from 'src/filters'; const state = useState(); const session = useSession(); @@ -24,8 +25,8 @@ export default route(function (/* { store, ssrContext } */) { const createHistory = process.env.SERVER ? createMemoryHistory : process.env.VUE_ROUTER_MODE === 'history' - ? createWebHistory - : createWebHashHistory; + ? createWebHistory + : createWebHashHistory; const Router = createRouter({ scrollBehavior: () => ({ left: 0, top: 0 }), @@ -45,26 +46,14 @@ export default route(function (/* { store, ssrContext } */) { } if (isLoggedIn()) { - // try { const stateRoles = state.getRoles().value; if (stateRoles.length === 0) { await role.fetch(); } - // } catch (error) { - // Notify.create({ - // message: t('errors.statusUnauthorized'), - // type: 'negative', - // }); - - // session.destroy(); - // return next({ path: '/login' }); - // } - const matches = to.matched; - const hasRequiredRoles = matches.every(route => { + const hasRequiredRoles = matches.every((route) => { const meta = route.meta; - if (meta && meta.roles) - return role.hasAny(meta.roles) + if (meta && meta.roles) return role.hasAny(meta.roles); return true; }); @@ -84,7 +73,7 @@ export default route(function (/* { store, ssrContext } */) { if (matches && matches.length > 1) { const module = matches[1]; const moduleTitle = module.meta && module.meta.title; - moduleName = module.name.toLowerCase(); + moduleName = toLowerCamel(module.name); if (moduleTitle) { title = t(`${moduleName}.pageTitles.${moduleTitle}`); } diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 14f496365..dcb3fa5c2 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -1,9 +1,11 @@ import Customer from './customer'; import Ticket from './ticket'; import Claim from './claim'; +import InvoiceOut from './invoiceOut'; export default [ Customer, Ticket, - Claim + Claim, + InvoiceOut ] diff --git a/src/router/modules/invoiceOut.js b/src/router/modules/invoiceOut.js new file mode 100644 index 000000000..a9236b713 --- /dev/null +++ b/src/router/modules/invoiceOut.js @@ -0,0 +1,50 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/invoiceOut', + name: 'InvoiceOut', + meta: { + title: 'invoiceOuts', + icon: 'vn:invoice-out' + }, + component: RouterView, + redirect: { name: 'InvoiceOutMain' }, + menus: { + main: ['InvoiceOutList'] + }, + children: [ + { + path: '', + name: 'InvoiceOutMain', + component: () => import('src/pages/InvoiceOut/InvoiceOutMain.vue'), + redirect: { name: 'InvoiceOutList' }, + children: [ + { + path: 'list', + name: 'InvoiceOutList', + meta: { + title: 'list', + icon: 'view_list', + }, + component: () => import('src/pages/InvoiceOut/InvoiceOutList.vue'), + } + ] + }, + { + name: 'InvoiceOutCard', + path: ':id', + component: () => import('src/pages/InvoiceOut/Card/InvoiceOutCard.vue'), + redirect: { name: 'InvoiceOutSummary' }, + children: [ + { + name: 'InvoiceOutSummary', + path: 'summary', + meta: { + title: 'summary' + }, + component: () => import('src/pages/InvoiceOut/Card/InvoiceOutSummary.vue'), + } + ] + }, + ] +}; diff --git a/src/router/routes.js b/src/router/routes.js index a7261379f..8fc355e64 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,6 +1,7 @@ import customer from './modules/customer'; import ticket from './modules/ticket'; import claim from './modules/claim'; +import invoiceOut from './modules/invoiceOut'; const routes = [ { @@ -25,6 +26,7 @@ const routes = [ customer, ticket, claim, + invoiceOut, { path: '/:pathMatch(.*)*', name: 'NotFound', @@ -34,4 +36,4 @@ const routes = [ } ]; -export default routes; \ No newline at end of file +export default routes; diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index b4a640b79..6d1a74326 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -6,7 +6,7 @@ import { useRole } from 'src/composables/useRole'; import routes from 'src/router/modules'; export const useNavigationStore = defineStore('navigationStore', () => { - const modules = ['customer', 'claim', 'ticket']; + const modules = ['customer', 'claim', 'ticket', 'invoiceOut']; const pinnedModules = ref([]); const role = useRole();