diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 58b4146bf..79efed670 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -1,6 +1,6 @@ + + + + + es: + primaryKey: Clave primaria + defaultLang(en): Idioma por defecto(Eng) + secondLang: Idioma secundario + table: Tabla + lang: Idioma + en: + primaryKey: Primary key + defaultLang(en): Default language(Eng) + secondLang: Second language + table: Table + lang: Language + diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 998009514..0eb7cd76c 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -17,6 +17,7 @@ import Agency from './agency'; import Zone from './zone'; import Account from './account'; import Monitor from './monitor'; +import TranslationsVn from './translationsVn.js'; export default [ Item, @@ -38,4 +39,5 @@ export default [ Zone, Account, Monitor, + TranslationsVn, ]; diff --git a/src/router/modules/translationsVn.js b/src/router/modules/translationsVn.js new file mode 100644 index 000000000..cbc01c1aa --- /dev/null +++ b/src/router/modules/translationsVn.js @@ -0,0 +1,16 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/translations', + name: 'Translations', + meta: { + title: 'translations', + icon: 'history_edu', + moduleName: 'Translations', + }, + component: RouterView, + menus: { + main: [], + card: [], + }, +}; diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index e9fb0c4f1..f2d2b00de 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -6,7 +6,14 @@ const workerCard = { component: () => import('src/pages/Worker/Card/WorkerCard.vue'), redirect: { name: 'WorkerSummary' }, meta: { - menu: [ + title: 'workers', + icon: 'vn:worker', + moduleName: 'Worker', + keyBinding: 'w', + }, + menus: { + main: ['WorkerList', 'WorkerDepartment', 'TranslationsVn'], + card: [ 'WorkerBasicData', 'WorkerNotes', 'WorkerPda', @@ -226,7 +233,7 @@ export default { icon: 'vn:worker', moduleName: 'Worker', keyBinding: 'w', - menu: ['WorkerList', 'WorkerDepartment'], + menu: ['WorkerList', 'WorkerDepartment', 'TranslationsVn'], }, component: RouterView, redirect: { name: 'WorkerMain' }, @@ -268,6 +275,15 @@ export default { departmentCard, ], }, + { + path: 'translations', + name: 'TranslationsVn', + meta: { + title: 'translations', + icon: 'history_edu', + }, + component: () => import('src/pages/Worker/TranslationsVn.vue'), + }, ], }, ], diff --git a/src/router/routes.js b/src/router/routes.js index ddda2aa63..42456d018 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -15,7 +15,7 @@ import entry from 'src/router/modules/entry'; import roadmap from 'src/router/modules/roadmap'; import agency from 'src/router/modules/agency'; import zone from 'src/router/modules/zone'; -import account from './modules/account'; +import account from 'src/router/modules/account'; import monitor from 'src/router/modules/monitor'; const routes = [ diff --git a/test/cypress/integration/worker/translationsVn.spec.js b/test/cypress/integration/worker/translationsVn.spec.js new file mode 100644 index 000000000..aa70311bd --- /dev/null +++ b/test/cypress/integration/worker/translationsVn.spec.js @@ -0,0 +1,17 @@ +describe('Translations', () => { + const tableType = 'itemTypeI18n'; + const translationSelect = '[data-cy="Table_select"]'; + const firstRow = '.q-virtual-scroll__content > :nth-child(1) > :nth-child(4)'; + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('buyer'); + cy.visit(`/#/worker/translations`); + }); + + it('should load translations and modify', () => { + cy.get('[data-cy="Table_select"]').click(); + cy.selectOption(translationSelect, tableType); + cy.get(firstRow).type('test'); + cy.saveCard(); + }); +});