diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 4e3e241b8..778f6bfb9 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -7,6 +7,7 @@ import { useStateStore } from 'stores/useStateStore'; import { useQuasar } from 'quasar'; import PinnedModules from './PinnedModules.vue'; import UserPanel from 'components/UserPanel.vue'; +import VnBreadcrumbs from './common/VnBreadcrumbs.vue'; const { t } = useI18n(); const session = useSession(); @@ -57,10 +58,7 @@ const pinnedModulesRef = ref(); - - {{ appName }} - - + @@ -112,6 +110,7 @@ const pinnedModulesRef = ref();
+ diff --git a/src/components/common/VnBreadcrumbs.vue b/src/components/common/VnBreadcrumbs.vue new file mode 100644 index 000000000..792671e21 --- /dev/null +++ b/src/components/common/VnBreadcrumbs.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index af6999b5b..693d6fce2 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -105,7 +105,11 @@ async function search() { class="cursor-pointer" /> - + {{ props.info }} diff --git a/src/composables/useCamelCase.js b/src/composables/useCamelCase.js new file mode 100644 index 000000000..5285b022a --- /dev/null +++ b/src/composables/useCamelCase.js @@ -0,0 +1,3 @@ +export function useCamelCase(value) { + return value.replace(/[-_](.)/g, (_, char) => char.toUpperCase()); +} diff --git a/src/composables/useFirstUpper.js b/src/composables/useFirstUpper.js new file mode 100644 index 000000000..36378c05f --- /dev/null +++ b/src/composables/useFirstUpper.js @@ -0,0 +1,3 @@ +export function useFirstUpper(str) { + return str && str.charAt(0).toUpperCase() + str.substr(1); +} diff --git a/src/pages/Wagon/Card/WagonCard.vue b/src/pages/Wagon/Card/WagonCard.vue new file mode 100644 index 000000000..18ec121e3 --- /dev/null +++ b/src/pages/Wagon/Card/WagonCard.vue @@ -0,0 +1,29 @@ + + + + +es: + Search customer: Buscar cliente + You can search by customer id or name: Puedes buscar por id o nombre del cliente + diff --git a/src/router/modules/route.js b/src/router/modules/route.js index a3550885c..acda898de 100644 --- a/src/router/modules/route.js +++ b/src/router/modules/route.js @@ -21,13 +21,13 @@ export default { redirect: { name: 'CmrList' }, children: [ { - path: 'cmr/list', + path: 'cmr', name: 'CmrList', meta: { title: 'cmrsList', icon: 'fact_check', }, - component: () => import('src/pages/Route/Cmr/CmrList.vue') + component: () => import('src/pages/Route/Cmr/CmrList.vue'), }, ], }, diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js index 02513d5a8..3fb808778 100644 --- a/src/router/modules/wagon.js +++ b/src/router/modules/wagon.js @@ -27,7 +27,7 @@ export default { title: 'wagonsList', icon: 'vn:trolley', }, - component: () => import('src/pages/Wagon/WagonList.vue') + component: () => import('src/pages/Wagon/WagonList.vue'), }, { path: 'create', @@ -36,7 +36,7 @@ export default { title: 'wagonCreate', icon: 'create', }, - component: () => import('src/pages/Wagon/WagonCreate.vue') + component: () => import('src/pages/Wagon/WagonCreate.vue'), }, { path: ':id/edit', @@ -45,7 +45,7 @@ export default { title: 'wagonEdit', icon: 'edit', }, - component: () => import('src/pages/Wagon/WagonCreate.vue') + component: () => import('src/pages/Wagon/WagonCreate.vue'), }, ], }, @@ -62,7 +62,7 @@ export default { title: 'typesList', icon: 'view_list', }, - component: () => import('src/pages/Wagon/Type/WagonTypeList.vue') + component: () => import('src/pages/Wagon/Type/WagonTypeList.vue'), }, { path: 'create', @@ -71,7 +71,7 @@ export default { title: 'typeCreate', icon: 'create', }, - component: () => import('src/pages/Wagon/Type/WagonTypeCreate.vue') + component: () => import('src/pages/Wagon/Type/WagonTypeCreate.vue'), }, { path: ':id/edit', @@ -80,9 +80,9 @@ export default { title: 'typeEdit', icon: 'edit', }, - component: () => import('src/pages/Wagon/Type/WagonTypeCreate.vue') + component: () => import('src/pages/Wagon/Type/WagonTypeCreate.vue'), }, ], - } + }, ], }; diff --git a/test/cypress/integration/vnBreadcrumbs.spec.js b/test/cypress/integration/vnBreadcrumbs.spec.js new file mode 100644 index 000000000..3c839c1c7 --- /dev/null +++ b/test/cypress/integration/vnBreadcrumbs.spec.js @@ -0,0 +1,21 @@ +/// +describe('VnBreadcrumbs', () => { + const firstCard = '.q-infinite-scroll > :nth-child(1)'; + const lastBreadcrumb = '.q-breadcrumbs--last > .q-breadcrumbs__el'; + beforeEach(() => { + cy.login('developer'); + cy.visit('/'); + }); + + it('should not be breadcrumbs', () => { + cy.get('.q-breadcrumbs').should('not.exist'); + }); + + it('should get the correct breadcrumbs', () => { + cy.visit('#/customer/list'); + cy.get('.q-breadcrumbs__el').should('have.length', 2); + + cy.get(firstCard).click(); + cy.get(`${lastBreadcrumb} > .q-icon`).should('have.text', 'launch'); + }); +});