From 3c58f86c2a3a30879b8c9ea6a6a41c24c6f6891b Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 10 Oct 2023 13:44:22 +0200 Subject: [PATCH] refs #5919 locker back y front --- modules/worker/back/model-config.json | 3 +++ modules/worker/back/models/locker.json | 28 ++++++++++++++++++++++ modules/worker/front/basic-data/index.html | 7 +++--- modules/worker/front/basic-data/index.js | 5 ++++ 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 modules/worker/back/models/locker.json diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json index 8352eb070..fe2b24c06 100644 --- a/modules/worker/back/model-config.json +++ b/modules/worker/back/model-config.json @@ -115,6 +115,9 @@ }, "Operator": { "dataSource": "vn" + }, + "locker": { + "dataSource": "vn" } } diff --git a/modules/worker/back/models/locker.json b/modules/worker/back/models/locker.json new file mode 100644 index 000000000..0e8f9d543 --- /dev/null +++ b/modules/worker/back/models/locker.json @@ -0,0 +1,28 @@ +{ + "name": "locker", + "description": "Employee´s locker", + "base": "Loggable", + "options": { + "mysql": { + "table": "locker" + } + }, + "properties": { + "code": { + "type": "string" + }, + "gender": { + "type": "string" + }, + "workerFk": { + "type": "number" + } + }, + "relations": { + "id": { + "type": "belongsTo", + "model": "worker", + "foreignKey": "workerFk" + } + } +} diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html index 2d85d018d..73b066739 100644 --- a/modules/worker/front/basic-data/index.html +++ b/modules/worker/front/basic-data/index.html @@ -75,11 +75,10 @@ ng-model="$ctrl.worker.SSN" rule> - - + ng-model="$ctrl.worker.locker"> + diff --git a/modules/worker/front/basic-data/index.js b/modules/worker/front/basic-data/index.js index ea75d7b97..faea9804f 100644 --- a/modules/worker/front/basic-data/index.js +++ b/modules/worker/front/basic-data/index.js @@ -13,6 +13,11 @@ class Controller extends Section { return this.$.watcher.submit() .then(() => this.card.reload()); } + + chooseLocker() { + const workerGender = this.worker.sex; + console.log(workerGender); + } } ngModule.vnComponent('vnWorkerBasicData', {