feat: add log
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-07-19 13:35:17 +02:00
parent ac344d6edd
commit c56ac1c192
6 changed files with 29 additions and 8 deletions

View File

@ -0,0 +1,3 @@
INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
VALUES
('ShelvingLog','*','READ','ALLOW','ROLE','employee');

View File

@ -4,5 +4,8 @@
},
"Shelving": {
"dataSource": "vn"
},
"ShelvingLog": {
"dataSource": "vn"
}
}

View File

@ -8,20 +8,20 @@
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
"type": "number",
"forceId": false
},
"originFk": {
"type": "string",
"required": true
},
"userFk": {
"type": "number",
"required": true
"type": "number"
},
"action": {
"type": "string"
"type": "string",
"required": true
},
"creationDate": {
"type": "date"
@ -44,5 +44,15 @@
"changedModelValue": {
"type": "string"
}
}
},
"relations": {
"user": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "userFk"
}
},
"scope": {
"order": ["creationDate DESC", "id DESC"]
}
}

View File

@ -1,6 +1,10 @@
{
"name": "Shelving",
"base": "VnModel",
"base": "Loggable",
"log": {
"model": "ShelvingLog",
"showField": "id"
},
"options": {
"mysql": {
"table": "shelving"

View File

@ -8,3 +8,4 @@ import './index/';
import './main';
import './search-panel';
import './summary';
import './log';

View File

@ -1 +1 @@
<vn-log url="ShelvingLog" origin-id="$ctrl.$params.id"></vn-log>
<vn-log url="ShelvingLogs" origin-id="$ctrl.$params.code"></vn-log>