From 443db55f58e71e7a690ecfe9dd9be5d541154102 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 31 Mar 2022 09:18:18 +0200 Subject: [PATCH] feat(worker_basic-data): add new fields --- modules/worker/back/model-config.json | 3 ++ .../worker/back/models/education-level.json | 18 ++++++++++ modules/worker/back/models/worker.json | 12 +++++++ modules/worker/front/basic-data/index.html | 36 +++++++++++++++++++ modules/worker/front/basic-data/index.js | 7 ++++ modules/worker/front/basic-data/locale/es.yml | 6 ++++ 6 files changed, 82 insertions(+) create mode 100644 modules/worker/back/models/education-level.json create mode 100644 modules/worker/front/basic-data/locale/es.yml diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json index e35e39721..c155e331d 100644 --- a/modules/worker/back/model-config.json +++ b/modules/worker/back/model-config.json @@ -17,6 +17,9 @@ "Department": { "dataSource": "vn" }, + "EducationLevel": { + "dataSource": "vn" + }, "WorkCenter": { "dataSource": "vn" }, diff --git a/modules/worker/back/models/education-level.json b/modules/worker/back/models/education-level.json new file mode 100644 index 000000000..641dfd6b4 --- /dev/null +++ b/modules/worker/back/models/education-level.json @@ -0,0 +1,18 @@ +{ + "name": "EducationLevel", + "base": "VnModel", + "options": { + "mysql": { + "table": "educationLevel" + } + }, + "properties": { + "id": { + "id": true, + "type": "Number" + }, + "name": { + "type": "String" + } + } +} \ No newline at end of file diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index cad38ac3b..209cc24f4 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -34,6 +34,18 @@ }, "bossFk": { "type" : "Number" + }, + "maritalStatus": { + "type" : "String" + }, + "originCountryFk": { + "type" : "Number" + }, + "educationLevelFk": { + "type" : "Number" + }, + "SSN": { + "type" : "String" } }, "relations": { diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html index b61a4cf94..d49b7ab74 100644 --- a/modules/worker/front/basic-data/index.html +++ b/modules/worker/front/basic-data/index.html @@ -39,6 +39,42 @@ label="Boss"> + + + + + + + + + + + + diff --git a/modules/worker/front/basic-data/index.js b/modules/worker/front/basic-data/index.js index d2c7f5b70..ea75d7b97 100644 --- a/modules/worker/front/basic-data/index.js +++ b/modules/worker/front/basic-data/index.js @@ -2,6 +2,13 @@ import ngModule from '../module'; import Section from 'salix/components/section'; class Controller extends Section { + constructor($element, $) { + super($element, $); + this.maritalStatus = [ + {code: 'M', name: this.$t('Married')}, + {code: 'S', name: this.$t('Single')} + ]; + } onSubmit() { return this.$.watcher.submit() .then(() => this.card.reload()); diff --git a/modules/worker/front/basic-data/locale/es.yml b/modules/worker/front/basic-data/locale/es.yml new file mode 100644 index 000000000..c4fcd5529 --- /dev/null +++ b/modules/worker/front/basic-data/locale/es.yml @@ -0,0 +1,6 @@ +Marital status: Estado civil +Origin country: País origen +Education level: Nivel educación +SSN: NSS +Married: Casado +Single: Soltero \ No newline at end of file