Merge branch '2148-entry_log' of verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Bernat Exposito 2020-03-04 08:06:31 +00:00 committed by Gitea
commit 3a8d061ef7
10 changed files with 82 additions and 4 deletions

View File

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

View File

@ -1,5 +1,8 @@
{
"Entry": {
"dataSource": "vn"
},
"EntryLog": {
"dataSource": "vn"
}
}

View File

@ -0,0 +1,42 @@
{
"name": "EntryLog",
"base": "VnModel",
"options": {
"mysql": {
"table": "entryLog"
}
},
"properties": {
"id": {
"id": true,
"type": "Number"
},
"originFk": {
"type": "Number",
"required": true
},
"userFk": {
"type": "Number"
},
"action": {
"type": "String",
"required": true
},
"creationDate": {
"type": "Date"
},
"description": {
"type": "String"
}
},
"relations": {
"user": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "userFk"
}
},
"scope": {
"order": ["creationDate DESC", "id DESC"]
}
}

View File

@ -1,6 +1,9 @@
{
"name": "Entry",
"base": "VnModel",
"log": {
"model":"EntryLog"
},
"options": {
"mysql": {
"table": "entry"

View File

@ -6,3 +6,4 @@ import './search-panel';
import './descriptor';
import './card';
import './summary';
import './log';

View File

@ -0,0 +1 @@
<vn-log url="EntryLogs" origin-id="$ctrl.$stateParams.id"></vn-log>

View File

@ -0,0 +1,15 @@
import ngModule from '../module';
class Controller {
constructor($scope, $stateParams) {
this.$scope = $scope;
this.$stateParams = $stateParams;
}
}
Controller.$inject = ['$scope', '$stateParams'];
ngModule.component('vnEntryLog', {
template: require('./index.html'),
controller: Controller,
});

View File

@ -0,0 +1 @@
Date: Fecha

View File

@ -9,6 +9,7 @@
{"state": "entry.index", "icon": "icon-entry"}
],
"card": [
{"state": "entry.card.log", "icon": "history"}
]
},
"routes": [
@ -36,6 +37,11 @@
"params": {
"entry": "$ctrl.entry"
}
}, {
"url" : "/log",
"state": "entry.card.log",
"component": "vn-entry-log",
"description": "Log"
}
]
}

View File

@ -1,13 +1,17 @@
{
"Travel": {
"dataSource": "vn"
},"TravelLog": {
},
"TravelLog": {
"dataSource": "vn"
},"Currency": {
},
"Currency": {
"dataSource": "vn"
},"Thermograph": {
},
"Thermograph": {
"dataSource": "vn"
},"TravelThermograph": {
},
"TravelThermograph": {
"dataSource": "vn"
}
}