Merge pull request '5318-deviceProductionLog_toSalix' (!1460) from 5318-deviceProductionLog_toSalix into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1460
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Vicent Llopis 2023-04-24 05:07:06 +00:00
commit a7a0853248
7 changed files with 82 additions and 11 deletions

View File

@ -0,0 +1,5 @@
DROP TRIGGER `vn`.`deviceProduction_afterInsert`;
DROP TRIGGER `vn`.`deviceProduction_afterUpdate`;
DROP TRIGGER `vn`.`deviceProductionUser_afterDelete`;

View File

@ -23,6 +23,9 @@
"DeviceProduction": {
"dataSource": "vn"
},
"DeviceProductionLog": {
"dataSource": "vn"
},
"DeviceProductionModels": {
"dataSource": "vn"
},

View File

@ -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"]
}
}

View File

@ -1,6 +1,10 @@
{
"name": "DeviceProductionUser",
"base": "VnModel",
"base": "Loggable",
"log": {
"model": "DeviceProductionLog",
"relation": "deviceProduction"
},
"options": {
"mysql": {
"table": "deviceProductionUser"

View File

@ -1,6 +1,9 @@
{
"name": "DeviceProduction",
"base": "VnModel",
"base": "Loggable",
"log": {
"model": "DeviceProductionLog"
},
"options": {
"mysql": {
"table": "deviceProduction"

View File

@ -31,11 +31,12 @@
value-field="id"
show-field="serialNumber">
<tpl-item>
<span>ID: {{id}}</span>
<span class="separator"></span>
<span>{{'Model' | translate}}: {{modelFk}}</span>
<span class="separator"></span>
<span>{{'Serial Number' | translate}}: {{serialNumber}}</span>
<div>
ID: {{id}}
</div>
<div class="text-caption text-grey">
{{modelFk}}, {{serialNumber}}
</div>
</tpl-item>
</vn-autocomplete>
</vn-horizontal>

View File

@ -1,6 +1,6 @@
span.separator{
border-left: 1px solid black;
height: 100%;
margin: 0 10px;
@import "./variables";
.text-grey {
color: $color-font-light;
}