diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue
index d66bd2608..1ada15a33 100644
--- a/src/pages/Worker/Card/WorkerCard.vue
+++ b/src/pages/Worker/Card/WorkerCard.vue
@@ -1,21 +1,7 @@
-
+
diff --git a/src/pages/Worker/WorkerCreate.vue b/src/pages/Worker/WorkerCreate.vue
deleted file mode 100644
index a4c6c2a06..000000000
--- a/src/pages/Worker/WorkerCreate.vue
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
- (companiesOptions = data)"
- auto-load
- />
- (payMethodsOptions = data)"
- auto-load
- />
- (bankEntitiesOptions = data)"
- auto-load
- />
-
-
-
-
-
-
-
- $router.push({ path: `/worker/${id}` })"
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- handleLocation(data, location)"
- :disable="formData.isFreelance"
- >
-
-
-
-
-
-
- !val && delete formData.payMethodFk"
- />
-
-
-
- {{ t('components.iban_tooltip') }}
-
-
-
-
-
- bankEntitiesOptions.push(data)"
- />
-
-
-
-
- {{ scope.opt.bic }}
- {{ scope.opt.name }}
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/Worker/WorkerDepartment.vue b/src/pages/Worker/WorkerDepartment.vue
index fe4c23051..67731a6cb 100644
--- a/src/pages/Worker/WorkerDepartment.vue
+++ b/src/pages/Worker/WorkerDepartment.vue
@@ -1,11 +1,16 @@
-
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Worker/WorkerDepartmentTree.vue b/src/pages/Worker/WorkerDepartmentTree.vue
index f349b449d..9abf4e312 100644
--- a/src/pages/Worker/WorkerDepartmentTree.vue
+++ b/src/pages/Worker/WorkerDepartmentTree.vue
@@ -111,18 +111,16 @@ function handleEvent(type, event, node) {
switch (type) {
case 'path':
state.set('TreeState', lastId);
- node.id && router.push({ path: `/department/department/${node.id}/summary` });
+ node.id && router.push({ path: `/worker/department/${node.id}/summary` });
break;
case 'tab':
state.set('TreeState', lastId);
- node.id &&
- window.open(`#/department/department/${node.id}/summary`, '_blank');
+ node.id && window.open(`#/worker/department/${node.id}/summary`, '_blank');
break;
default:
- node.id &&
- router.push({ path: `#/department/department/${node.id}/summary` });
+ node.id && router.push({ path: `#/worker/department/${node.id}/summary` });
break;
}
}
diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue
index c2ddfcd20..48393a8c7 100644
--- a/src/pages/Worker/WorkerList.vue
+++ b/src/pages/Worker/WorkerList.vue
@@ -2,7 +2,6 @@
import { onBeforeMount, computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
-import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import VnTable from 'src/components/VnTable/VnTable.vue';
import WorkerSummary from './Card/WorkerSummary.vue';
import VnRow from 'src/components/ui/VnRow.vue';
@@ -14,12 +13,11 @@ import VnLocation from 'src/components/common/VnLocation.vue';
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
import FetchData from 'src/components/FetchData.vue';
-import RightMenu from 'src/components/common/RightMenu.vue';
import WorkerFilter from './WorkerFilter.vue';
import { useState } from 'src/composables/useState';
import axios from 'axios';
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
-
+import VnSection from 'src/components/common/VnSection.vue';
const { t } = useI18n();
const tableRef = ref();
const { viewSummary } = useSummaryDialog();
@@ -31,6 +29,7 @@ const postcodesOptions = ref([]);
const user = useState().getUser();
const defaultPayMethod = ref();
const bankEntitiesRef = ref();
+const dataKey = 'WorkerList';
const columns = computed(() => [
{
align: 'left',
@@ -170,11 +169,6 @@ async function autofillBic(worker) {
}
-
(companiesOptions = data)"
@@ -191,173 +185,202 @@ async function autofillBic(worker) {
@on-fetch="(data) => (bankEntitiesOptions = data)"
auto-load
/>
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- handleLocation(data, location)"
- :disable="data.isFreelance"
- >
-
-
-
-
-
-
- !val && delete data.payMethodFk"
- />
-
-
-
- {{ t('components.iban_tooltip') }}
-
-
-
-
-
-
-
- handleNewBankEntity(data, resp)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ handleLocation(data, location)
+ "
+ :disable="data.isFreelance"
+ >
+
+
+
+
+
+
+ !val && delete data.payMethodFk
"
/>
-
-
-
-
- {{ scope.opt.bic }}
- {{ scope.opt.name }}
-
-
-
-
-
-
+
+
+
+ {{
+ t('components.iban_tooltip')
+ }}
+
+
+
+
+
+
+
+ handleNewBankEntity(data, resp)
+ "
+ />
+
+
+
+
+ {{ scope.opt.bic }}
+ {{ scope.opt.name }}
+
+
+
+
+
+
+
+
-
+
diff --git a/src/pages/Worker/locale/en.yml b/src/pages/Worker/locale/en.yml
index 8276977fd..1d47a0c1d 100644
--- a/src/pages/Worker/locale/en.yml
+++ b/src/pages/Worker/locale/en.yml
@@ -1,3 +1,6 @@
+workerSearch:
+ search: Search worker
+ searchInfo: Search worker by id or name
passwordRequirements: 'The password must have at least { length } length characters, {nAlpha} alphabetic characters, {nUpper} capital letters, {nDigits} digits and {nPunct} symbols (Ex: $%&.)\n'
tableColumns:
id: ID
diff --git a/src/pages/Worker/locale/es.yml b/src/pages/Worker/locale/es.yml
index 9c7618bc3..e4bb724e0 100644
--- a/src/pages/Worker/locale/es.yml
+++ b/src/pages/Worker/locale/es.yml
@@ -1,5 +1,6 @@
-Search worker: Buscar trabajador
-You can search by worker id or name: Puedes buscar por id o nombre del trabajador
+workerSearch:
+ search: Buscar trabajador
+ searchInfo: Buscar trabajador por id o nombre
Locker: Taquilla
Internal: Interno
External: Externo
diff --git a/src/router/modules/department.js b/src/router/modules/department.js
deleted file mode 100644
index 9aab40534..000000000
--- a/src/router/modules/department.js
+++ /dev/null
@@ -1,47 +0,0 @@
-import { RouterView } from 'vue-router';
-
-export default {
- path: '/department',
- name: 'Department',
- meta: {
- title: 'department',
- icon: 'vn:greuge',
- moduleName: 'Department',
- },
- component: RouterView,
- redirect: { name: 'WorkerDepartment' },
- menus: {
- main: [],
- card: ['DepartmentBasicData'],
- },
- children: [
- {
- name: 'DepartmentCard',
- path: 'department/:id',
- component: () => import('src/pages/Department/Card/DepartmentCard.vue'),
- redirect: { name: 'DepartmentSummary' },
- children: [
- {
- name: 'DepartmentSummary',
- path: 'summary',
- meta: {
- title: 'summary',
- icon: 'launch',
- },
- component: () =>
- import('src/pages/Department/Card/DepartmentSummary.vue'),
- },
- {
- name: 'DepartmentBasicData',
- path: 'basic-data',
- meta: {
- title: 'basicData',
- icon: 'vn:settings',
- },
- component: () =>
- import('src/pages/Department/Card/DepartmentBasicData.vue'),
- },
- ],
- },
- ],
-};
diff --git a/src/router/modules/index.js b/src/router/modules/index.js
index f28fed1c2..a22d5399c 100644
--- a/src/router/modules/index.js
+++ b/src/router/modules/index.js
@@ -11,7 +11,6 @@ import Route from './route';
import Supplier from './supplier';
import Travel from './travel';
import Order from './order';
-import Department from './department';
import Entry from './entry';
import roadmap from './roadmap';
import Parking from './parking';
@@ -35,7 +34,6 @@ export default [
Travel,
Order,
invoiceIn,
- Department,
Entry,
roadmap,
Parking,
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index c732664ec..e9fb0c4f1 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -1,19 +1,12 @@
import { RouterView } from 'vue-router';
-export default {
- path: '/worker',
- name: 'Worker',
+const workerCard = {
+ name: 'WorkerCard',
+ path: ':id',
+ component: () => import('src/pages/Worker/Card/WorkerCard.vue'),
+ redirect: { name: 'WorkerSummary' },
meta: {
- title: 'workers',
- icon: 'vn:worker',
- moduleName: 'Worker',
- keyBinding: 'w',
- },
- component: RouterView,
- redirect: { name: 'WorkerMain' },
- menus: {
- main: ['WorkerList', 'WorkerDepartment'],
- card: [
+ menu: [
'WorkerBasicData',
'WorkerNotes',
'WorkerPda',
@@ -33,207 +26,247 @@ export default {
},
children: [
{
- path: '',
- name: 'WorkerMain',
- component: () => import('src/components/common/VnModule.vue'),
- redirect: { name: 'WorkerList' },
+ name: 'WorkerSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerSummary.vue'),
+ },
+ {
+ path: 'basic-data',
+ name: 'WorkerBasicData',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ acls: [
+ {
+ model: 'Worker',
+ props: 'updateAttributes',
+ accessType: 'WRITE',
+ },
+ ],
+ },
+ component: () => import('src/pages/Worker/Card/WorkerBasicData.vue'),
+ },
+ {
+ path: 'notes',
+ name: 'NotesCard',
+ redirect: { name: 'WorkerNotes' },
children: [
{
- path: 'list',
- name: 'WorkerList',
+ path: '',
+ name: 'WorkerNotes',
meta: {
- title: 'list',
- icon: 'view_list',
+ title: 'notes',
+ icon: 'vn:notes',
},
- component: () => import('src/pages/Worker/WorkerList.vue'),
- },
- {
- path: 'department',
- name: 'WorkerDepartment',
- meta: {
- title: 'department',
- icon: 'vn:greuge',
- },
- component: () => import('src/pages/Worker/WorkerDepartment.vue'),
- },
- {
- path: 'create',
- name: 'WorkerCreate',
- meta: {
- title: 'workerCreate',
- icon: 'add',
- },
- component: () => import('src/pages/Worker/WorkerCreate.vue'),
+ component: () => import('src/pages/Worker/Card/WorkerNotes.vue'),
},
],
},
{
- name: 'WorkerCard',
- path: ':id',
- component: () => import('src/pages/Worker/Card/WorkerCard.vue'),
- redirect: { name: 'WorkerSummary' },
+ name: 'WorkerTimeControl',
+ path: 'time-control',
+ meta: {
+ title: 'timeControl',
+ icon: 'access_time',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerTimeControl.vue'),
+ },
+ {
+ name: 'WorkerCalendar',
+ path: 'calendar',
+ meta: {
+ title: 'calendar',
+ icon: 'calendar_today',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerCalendar.vue'),
+ },
+ {
+ name: 'WorkerPda',
+ path: 'pda',
+ meta: {
+ title: 'pda',
+ icon: 'phone_android',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
+ },
+ {
+ name: 'WorkerNotificationsManager',
+ path: 'notifications',
+ meta: {
+ title: 'notifications',
+ icon: 'notifications',
+ },
+ component: () =>
+ import('src/pages/Worker/Card/WorkerNotificationsManager.vue'),
+ },
+ {
+ path: 'pbx',
+ name: 'WorkerPBX',
+ meta: {
+ title: 'pbx',
+ icon: 'vn:pbx',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerPBX.vue'),
+ },
+ {
+ name: 'WorkerDms',
+ path: 'dms',
+ meta: {
+ title: 'dms',
+ icon: 'cloud_upload',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerDms.vue'),
+ },
+ {
+ name: 'WorkerLog',
+ path: 'log',
+ meta: {
+ title: 'log',
+ icon: 'vn:History',
+ acls: [{ model: 'WorkerLog', props: 'find', accessType: 'READ' }],
+ },
+ component: () => import('src/pages/Worker/Card/WorkerLog.vue'),
+ },
+ {
+ name: 'WorkerLocker',
+ path: 'locker',
+ meta: {
+ title: 'locker',
+ icon: 'lock',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerLocker.vue'),
+ },
+ {
+ name: 'WorkerBalance',
+ path: 'balance',
+ meta: {
+ title: 'balance',
+ icon: 'balance',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerBalance.vue'),
+ },
+ {
+ name: 'WorkerFormation',
+ path: 'formation',
+ meta: {
+ title: 'formation',
+ icon: 'clinical_notes',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerFormation.vue'),
+ },
+ {
+ name: 'WorkerMedical',
+ path: 'medical',
+ meta: {
+ title: 'medical',
+ icon: 'medical_information',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerMedical.vue'),
+ },
+ {
+ name: 'WorkerPit',
+ path: 'pit',
+ meta: {
+ title: 'pit',
+ icon: 'lock',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerPit.vue'),
+ },
+ {
+ name: 'WorkerOperator',
+ path: 'operator',
+ meta: {
+ title: 'operator',
+ icon: 'person',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerOperator.vue'),
+ },
+ ],
+};
+
+const departmentCard = {
+ name: 'DepartmentCard',
+ path: ':id',
+ component: () => import('src/pages/Department/Card/DepartmentCard.vue'),
+ redirect: { name: 'DepartmentSummary' },
+ meta: {
+ menu: ['DepartmentBasicData'],
+ },
+ children: [
+ {
+ path: 'summary',
+ name: 'DepartmentSummary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Department/Card/DepartmentSummary.vue'),
+ },
+ {
+ path: 'basic-data',
+ name: 'DepartmentBasicData',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('src/pages/Department/Card/DepartmentBasicData.vue'),
+ },
+ ],
+};
+
+export default {
+ name: 'Worker',
+ path: '/worker',
+ meta: {
+ title: 'workers',
+ icon: 'vn:worker',
+ moduleName: 'Worker',
+ keyBinding: 'w',
+ menu: ['WorkerList', 'WorkerDepartment'],
+ },
+ component: RouterView,
+ redirect: { name: 'WorkerMain' },
+ children: [
+ {
+ path: '',
+ name: 'WorkerMain',
+ component: () => import('src/components/common/VnModule.vue'),
+ redirect: { name: 'WorkerIndexMain' },
children: [
{
- name: 'WorkerSummary',
- path: 'summary',
- meta: {
- title: 'summary',
- icon: 'launch',
- },
- component: () => import('src/pages/Worker/Card/WorkerSummary.vue'),
- },
- {
- path: 'basic-data',
- name: 'WorkerBasicData',
- meta: {
- title: 'basicData',
- icon: 'vn:settings',
- acls: [
- {
- model: 'Worker',
- props: 'updateAttributes',
- accessType: 'WRITE',
- },
- ],
- },
- component: () => import('src/pages/Worker/Card/WorkerBasicData.vue'),
- },
- {
- path: 'notes',
- name: 'NotesCard',
- redirect: { name: 'WorkerNotes' },
+ path: '',
+ name: 'WorkerIndexMain',
+ redirect: { name: 'WorkerList' },
+ component: () => import('src/pages/Worker/WorkerList.vue'),
children: [
{
- path: '',
- name: 'WorkerNotes',
+ name: 'WorkerList',
+ path: 'list',
meta: {
- title: 'notes',
- icon: 'vn:notes',
+ title: 'list',
+ icon: 'view_list',
},
- component: () =>
- import('src/pages/Worker/Card/WorkerNotes.vue'),
},
+ workerCard,
],
},
{
- name: 'WorkerTimeControl',
- path: 'time-control',
- meta: {
- title: 'timeControl',
- icon: 'access_time',
- },
- component: () =>
- import('src/pages/Worker/Card/WorkerTimeControl.vue'),
- },
- {
- name: 'WorkerCalendar',
- path: 'calendar',
- meta: {
- title: 'calendar',
- icon: 'calendar_today',
- },
- component: () => import('src/pages/Worker/Card/WorkerCalendar.vue'),
- },
- {
- name: 'WorkerPda',
- path: 'pda',
- meta: {
- title: 'pda',
- icon: 'phone_android',
- },
- component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
- },
- {
- name: 'WorkerNotificationsManager',
- path: 'notifications',
- meta: {
- title: 'notifications',
- icon: 'notifications',
- },
- component: () =>
- import('src/pages/Worker/Card/WorkerNotificationsManager.vue'),
- },
- {
- path: 'pbx',
- name: 'WorkerPBX',
- meta: {
- title: 'pbx',
- icon: 'vn:pbx',
- },
- component: () => import('src/pages/Worker/Card/WorkerPBX.vue'),
- },
- {
- name: 'WorkerDms',
- path: 'dms',
- meta: {
- title: 'dms',
- icon: 'cloud_upload',
- },
- component: () => import('src/pages/Worker/Card/WorkerDms.vue'),
- },
- {
- name: 'WorkerLog',
- path: 'log',
- meta: {
- title: 'log',
- icon: 'vn:History',
- acls: [{ model: 'WorkerLog', props: 'find', accessType: 'READ' }],
- },
- component: () => import('src/pages/Worker/Card/WorkerLog.vue'),
- },
- {
- name: 'WorkerLocker',
- path: 'locker',
- meta: {
- title: 'locker',
- icon: 'lock',
- },
- component: () => import('src/pages/Worker/Card/WorkerLocker.vue'),
- },
- {
- name: 'WorkerBalance',
- path: 'balance',
- meta: {
- title: 'balance',
- icon: 'balance',
- },
- component: () => import('src/pages/Worker/Card/WorkerBalance.vue'),
- },
- {
- name: 'WorkerFormation',
- path: 'formation',
- meta: {
- title: 'formation',
- icon: 'clinical_notes',
- },
- component: () => import('src/pages/Worker/Card/WorkerFormation.vue'),
- },
- {
- name: 'WorkerMedical',
- path: 'medical',
- meta: {
- title: 'medical',
- icon: 'medical_information',
- },
- component: () => import('src/pages/Worker/Card/WorkerMedical.vue'),
- },
- {
- name: 'WorkerPit',
- path: 'pit',
- meta: {
- title: 'pit',
- icon: 'lock',
- },
- component: () => import('src/pages/Worker/Card/WorkerPit.vue'),
- },
- {
- name: 'WorkerOperator',
- path: 'operator',
- meta: {
- title: 'operator',
- icon: 'person',
- },
- component: () => import('src/pages/Worker/Card/WorkerOperator.vue'),
+ path: 'department',
+ name: 'Department',
+ redirect: { name: 'WorkerDepartment' },
+ component: () => import('src/pages/Worker/WorkerDepartment.vue'),
+ children: [
+ {
+ name: 'WorkerDepartment',
+ path: 'list',
+ meta: { title: 'department', icon: 'vn:greuge' },
+ },
+ departmentCard,
+ ],
},
],
},
diff --git a/src/router/routes.js b/src/router/routes.js
index b9120f8c4..d84ba7e46 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -9,7 +9,6 @@ import invoiceIn from './modules/invoiceIn';
import wagon from './modules/wagon';
import supplier from './modules/supplier';
import travel from './modules/travel';
-import department from './modules/department';
import ItemType from './modules/itemType';
import shelving from 'src/router/modules/shelving';
import order from 'src/router/modules/order';
@@ -85,7 +84,6 @@ const routes = [
route,
supplier,
travel,
- department,
roadmap,
entry,
parking,