From 600dd7a4347d40bb49a4a0e2cdecda346178f521 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Wed, 5 Oct 2022 11:52:14 +0200 Subject: [PATCH] Created the model and UI --- .../workerDisableExclueded/checkExcluded.js | 26 +++++++++++++++++++ modules/worker/back/model-config.json | 3 +++ .../back/models/workerDisableExcluded.json | 23 ++++++++++++++++ modules/worker/front/descriptor/index.html | 10 +++++++ modules/worker/front/descriptor/index.js | 8 ++++++ 5 files changed, 70 insertions(+) create mode 100644 modules/worker/back/methods/workerDisableExclueded/checkExcluded.js create mode 100644 modules/worker/back/models/workerDisableExcluded.json diff --git a/modules/worker/back/methods/workerDisableExclueded/checkExcluded.js b/modules/worker/back/methods/workerDisableExclueded/checkExcluded.js new file mode 100644 index 000000000..32260c01f --- /dev/null +++ b/modules/worker/back/methods/workerDisableExclueded/checkExcluded.js @@ -0,0 +1,26 @@ + +module.exports = Self => { + Self.remoteMethod('workerDisableExcluded', { + description: 'Check an email inbox and process it', + accessType: 'READ', + accepts: { + arg: 'workerFk', + type: 'Number', + required: true, + description: `The worker id` + }, + returns: { + type: ['Object'], + root: true + }, + http: { + path: `/workerDisableExcluded`, + verb: 'GET' + } + }); + + Self.workerDisableExcluded = workerFk => { + console.log(workerFk); + return 'tests123'; + }; +}; diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json index c155e331d..a41997908 100644 --- a/modules/worker/back/model-config.json +++ b/modules/worker/back/model-config.json @@ -64,6 +64,9 @@ }, "WorkerTimeControlMail": { "dataSource": "vn" + }, + "workerDisableExcluded": { + "dataSource": "vn" } } diff --git a/modules/worker/back/models/workerDisableExcluded.json b/modules/worker/back/models/workerDisableExcluded.json new file mode 100644 index 000000000..eeffb4b15 --- /dev/null +++ b/modules/worker/back/models/workerDisableExcluded.json @@ -0,0 +1,23 @@ +{ + "name": "workerDisableExcluded", + "base": "VnModel", + "options": { + "mysql": { + "table": "workerDisableExcluded" + } + }, + "properties": { + "id": { + "id": true, + "type": "number" + } + }, + "acls": [ + { + "accessType": "READ", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" + } + ] +} \ No newline at end of file diff --git a/modules/worker/front/descriptor/index.html b/modules/worker/front/descriptor/index.html index 01681ebb8..0616f179f 100644 --- a/modules/worker/front/descriptor/index.html +++ b/modules/worker/front/descriptor/index.html @@ -14,6 +14,16 @@ + + +