From 58750aa065bc68addc416e4d0fd0895aa0516e49 Mon Sep 17 00:00:00 2001 From: vicent Date: Wed, 12 Apr 2023 10:02:06 +0200 Subject: [PATCH 1/2] =?UTF-8?q?refs=20#5318=20eliminido=20triggers=20y=20a?= =?UTF-8?q?=C3=B1adido=20loggable=20en=20salix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/changes/231401/00-deviceProduction.sql | 5 ++ modules/worker/back/model-config.json | 3 + .../back/models/device-production-log.json | 55 +++++++++++++++++++ .../back/models/device-production-user.json | 6 +- .../worker/back/models/device-production.json | 5 +- modules/worker/front/pda/index.html | 11 ++-- 6 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 db/changes/231401/00-deviceProduction.sql create mode 100644 modules/worker/back/models/device-production-log.json diff --git a/db/changes/231401/00-deviceProduction.sql b/db/changes/231401/00-deviceProduction.sql new file mode 100644 index 000000000..37a2f1371 --- /dev/null +++ b/db/changes/231401/00-deviceProduction.sql @@ -0,0 +1,5 @@ +DROP TRIGGER `vn`.`deviceProduction_afterInsert`; +DROP TRIGGER `vn`.`deviceProduction_afterUpdate`; + +DROP TRIGGER `vn`.`deviceProductionUser_afterDelete`; + diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json index 145934700..fd34c013b 100644 --- a/modules/worker/back/model-config.json +++ b/modules/worker/back/model-config.json @@ -23,6 +23,9 @@ "DeviceProduction": { "dataSource": "vn" }, + "DeviceProductionLog": { + "dataSource": "vn" + }, "DeviceProductionModels": { "dataSource": "vn" }, diff --git a/modules/worker/back/models/device-production-log.json b/modules/worker/back/models/device-production-log.json new file mode 100644 index 000000000..c935398fc --- /dev/null +++ b/modules/worker/back/models/device-production-log.json @@ -0,0 +1,55 @@ +{ + "name": "DeviceProductionLog", + "base": "VnModel", + "options": { + "mysql": { + "table": "deviceProductionLog" + } + }, + "properties": { + "id": { + "id": true, + "type": "number", + "forceId": false + }, + "originFk": { + "type": "number", + "required": true + }, + "userFk": { + "type": "number" + }, + "deviceProduction": { + "type": "number" + }, + "action": { + "type": "string", + "required": true + }, + "created": { + "type": "date" + }, + "oldInstance": { + "type": "object" + }, + "newInstance": { + "type": "object" + }, + "changedModel": { + "type": "string" + }, + "changedModelId": { + "type": "number" + } + }, + "relations": { + "user": { + "type": "belongsTo", + "model": "Account", + "foreignKey": "userFk" + } + }, + "scope": { + "order": ["created DESC", "id DESC"] + } +} diff --git a/modules/worker/back/models/device-production-user.json b/modules/worker/back/models/device-production-user.json index 568e79413..3eeaae137 100644 --- a/modules/worker/back/models/device-production-user.json +++ b/modules/worker/back/models/device-production-user.json @@ -1,6 +1,10 @@ { "name": "DeviceProductionUser", - "base": "VnModel", + "base": "Loggable", + "log": { + "model": "DeviceProductionLog", + "relation": "deviceProduction" + }, "options": { "mysql": { "table": "deviceProductionUser" diff --git a/modules/worker/back/models/device-production.json b/modules/worker/back/models/device-production.json index 63672500b..35787cccc 100644 --- a/modules/worker/back/models/device-production.json +++ b/modules/worker/back/models/device-production.json @@ -1,6 +1,9 @@ { "name": "DeviceProduction", - "base": "VnModel", + "base": "Loggable", + "log": { + "model": "DeviceProductionLog" + }, "options": { "mysql": { "table": "deviceProduction" diff --git a/modules/worker/front/pda/index.html b/modules/worker/front/pda/index.html index 2f1626ba8..be67dd903 100644 --- a/modules/worker/front/pda/index.html +++ b/modules/worker/front/pda/index.html @@ -31,11 +31,12 @@ value-field="id" show-field="serialNumber"> - ID: {{id}} - - {{'Model' | translate}}: {{modelFk}} - - {{'Serial Number' | translate}}: {{serialNumber}} +
+ ID: {{id}} +
+
+ {{modelFk}}, {{serialNumber}} +
From 5ace66ebca005ea6e4729bf336d03e8541d49f7b Mon Sep 17 00:00:00 2001 From: vicent Date: Wed, 19 Apr 2023 09:54:54 +0200 Subject: [PATCH 2/2] refs #5318 fix e2e --- modules/worker/front/pda/index.html | 2 +- modules/worker/front/pda/style.scss | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/worker/front/pda/index.html b/modules/worker/front/pda/index.html index be67dd903..c6d31dc85 100644 --- a/modules/worker/front/pda/index.html +++ b/modules/worker/front/pda/index.html @@ -34,7 +34,7 @@
ID: {{id}}
-
+
{{modelFk}}, {{serialNumber}}
diff --git a/modules/worker/front/pda/style.scss b/modules/worker/front/pda/style.scss index 4d9d70953..c55c9d218 100644 --- a/modules/worker/front/pda/style.scss +++ b/modules/worker/front/pda/style.scss @@ -1,6 +1,6 @@ -span.separator{ - border-left: 1px solid black; - height: 100%; - margin: 0 10px; +@import "./variables"; + +.text-grey { + color: $color-font-light; }