diff --git a/package.json b/package.json index 666d731e1..799401c08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "23.42.01", + "version": "23.48.01", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -53,4 +53,4 @@ "vite": "^4.3.5", "vitest": "^0.31.1" } -} +} \ No newline at end of file diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 540c37d01..e8a9e4c17 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -122,9 +122,24 @@ watch(formUrl, async () => { {{ t('globals.changesToSave') }} - - - +
+ + + + + +
@@ -156,3 +171,12 @@ watch(formUrl, async () => { color="primary" /> + 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/VnRow.vue b/src/components/ui/VnRow.vue new file mode 100644 index 000000000..c3c951528 --- /dev/null +++ b/src/components/ui/VnRow.vue @@ -0,0 +1,12 @@ + + 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/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue index ddf669dd0..94e447e13 100644 --- a/src/pages/Claim/Card/ClaimBasicData.vue +++ b/src/pages/Claim/Card/ClaimBasicData.vue @@ -6,6 +6,7 @@ import { useI18n } from 'vue-i18n'; import { useSession } from 'src/composables/useSession'; import FetchData from 'components/FetchData.vue'; import FormModel from 'components/FormModel.vue'; +import VnRow from 'components/ui/VnRow.vue'; const route = useRoute(); const { t } = useI18n(); @@ -90,138 +91,119 @@ const statesFilter = { auto-load /> - -
- - - - - -
+ + + - - diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue index ffd3c3476..08c661f0b 100644 --- a/src/pages/Customer/Card/CustomerBasicData.vue +++ b/src/pages/Customer/Card/CustomerBasicData.vue @@ -6,6 +6,7 @@ import { useI18n } from 'vue-i18n'; import { useSession } from 'src/composables/useSession'; import FetchData from 'components/FetchData.vue'; import FormModel from 'components/FormModel.vue'; +import VnRow from 'components/ui/VnRow.vue'; const route = useRoute(); const { t } = useI18n(); @@ -58,121 +59,109 @@ const filterOptions = { @on-fetch="(data) => (businessTypes = data)" auto-load /> -
- - - - - -
- - + + + + diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue index 25c9dfb1c..641ffee0c 100644 --- a/src/pages/Ticket/Card/TicketDescriptor.vue +++ b/src/pages/Ticket/Card/TicketDescriptor.vue @@ -8,6 +8,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue'; import TicketDescriptorMenu from './TicketDescriptorMenu.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; +import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; const $props = defineProps({ id: { diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue index f55229bcf..95f6a94d9 100644 --- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue +++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue @@ -87,7 +87,7 @@ function showSmsDialog(template, customData) { componentProps: { phone: phone, template: template, - locale: client.user.lang, + locale: client?.user?.lang ?? 'default_locale', data: data, promise: sendSms, }, 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'); + }); +});