diff --git a/modules/worker/back/models/department.js b/modules/worker/back/models/department.js index 5a927fc64..ff88a34d0 100644 --- a/modules/worker/back/models/department.js +++ b/modules/worker/back/models/department.js @@ -1,4 +1,11 @@ module.exports = Self => { + Self.validatesFormatOf('Email', { + message: 'Invalid email', + allowNull: true, + allowBlank: true, + with: /^[\W]*([\w+\-.%]+@[\w\-.]+\.[A-Za-z]{1,61}[\W]*,{1}[\W]*)*([\w+\-.%]+@[\w\-.]+\.[A-Za-z]{1,61})[\W]*$/ + }); + require('../methods/department/getLeaves')(Self); require('../methods/department/createChild')(Self); require('../methods/department/removeChild')(Self); diff --git a/modules/worker/front/department/basic-data/index.js b/modules/worker/front/department/basic-data/index.js index 000ef0597..e2df4804a 100644 --- a/modules/worker/front/department/basic-data/index.js +++ b/modules/worker/front/department/basic-data/index.js @@ -1,7 +1,6 @@ import ngModule from '../../module'; import Section from 'salix/components/section'; - ngModule.vnComponent('vnWorkerDepartmentBasicData', { template: require('./index.html'), controller: Section, diff --git a/modules/worker/front/department/descriptor/index.html b/modules/worker/front/department/descriptor/index.html index 3ef8f1887..ec8aebdbe 100644 --- a/modules/worker/front/department/descriptor/index.html +++ b/modules/worker/front/department/descriptor/index.html @@ -33,7 +33,7 @@
+ icon="icon-worker">
diff --git a/modules/worker/front/department/main/index.html b/modules/worker/front/department/main/index.html index a1caef294..a272490ad 100644 --- a/modules/worker/front/department/main/index.html +++ b/modules/worker/front/department/main/index.html @@ -4,6 +4,14 @@ limit="20" order="id"> + + + + diff --git a/modules/worker/front/department/summary/index.html b/modules/worker/front/department/summary/index.html index a6f06ade4..27654bd49 100644 --- a/modules/worker/front/department/summary/index.html +++ b/modules/worker/front/department/summary/index.html @@ -1,3 +1,11 @@ + + + +
{{summary.name}} @@ -34,34 +42,40 @@ + + + + + + + + + + + + + + + + + + - - - - - - - - - - - -