diff --git a/modules/worker/back/models/locker.json b/modules/worker/back/models/locker.json
index 9601ca129..62ddd0a5b 100644
--- a/modules/worker/back/models/locker.json
+++ b/modules/worker/back/models/locker.json
@@ -2,11 +2,6 @@
"name": "Locker",
"description": "Employee's locker",
"base": "VnModel",
- "options": {
- "mysql": {
- "table": "locker"
- }
- },
"properties": {
"code": {
"type": "string"
@@ -14,12 +9,5 @@
"gender": {
"type": "string"
}
- },
- "relations": {
- "worker": {
- "type": "belongsTo",
- "model": "worker",
- "foreignKey": "workerFk"
- }
}
}
diff --git a/modules/worker/back/models/worker.js b/modules/worker/back/models/worker.js
index 985d83e9f..266a3e1ca 100644
--- a/modules/worker/back/models/worker.js
+++ b/modules/worker/back/models/worker.js
@@ -20,7 +20,7 @@ module.exports = Self => {
require('../methods/worker/isAuthorized')(Self);
require('../methods/worker/setPassword')(Self);
- Self.validatesUniquenessOf('locker', {
- message: 'This locker has already been assigned'
- });
+ // Self.validatesUniquenessOf('locker', {
+ // message: 'This locker has already been assigned'
+ // });
};
diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json
index 70c3881cf..4680a4daa 100644
--- a/modules/worker/back/models/worker.json
+++ b/modules/worker/back/models/worker.json
@@ -53,6 +53,9 @@
},
"isF11Allowed": {
"type" : "boolean"
+ },
+ "sex": {
+ "type" : "string"
}
},
"relations": {
@@ -87,9 +90,9 @@
"foreignKey": "workerFk"
},
"locker": {
- "type": "belongsTo",
+ "type": "hasOne",
"model": "Locker",
- "foreignKey": "code"
+ "foreignKey": "workerFk"
}
}
}
diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html
index a3f122a49..a835483cc 100644
--- a/modules/worker/front/basic-data/index.html
+++ b/modules/worker/front/basic-data/index.html
@@ -5,6 +5,12 @@
form="form"
save="patch">
+