#1070 Renombrar columnas de la vista vn.worker
gitea/salix/dev This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-02-27 13:10:26 +01:00
parent 048c5c2ad8
commit 1e89b6977a
6 changed files with 84 additions and 80 deletions

View File

@ -1,72 +1,74 @@
{
"name": "Account",
"base": "VnModel",
"options": {
"mysql": {
"table": "account.user"
}
},
"properties": {
"id": {
"type": "number",
"required": true
},
"name": {
"type": "string",
"required": true
},
"roleFk": {
"type": "number",
"mysql": {
"columnName": "role"
}
},
"nickname": {
"type": "string"
},
"password": {
"type": "string",
"required": true
},
"active": {
"type": "boolean"
},
"email": {
"type": "string"
},
"created": {
"type": "date"
},
"updated": {
"type": "date"
}
},
"relations": {
"role": {
"type": "belongsTo",
"model": "Role",
"foreignKey": "roleFk"
}
},
"acls": [
{
"property": "login",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}, {
"property": "logout",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
}, {
"property": "validateToken",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
}
]
"name": "Account",
"base": "VnModel",
"options": {
"mysql": {
"table": "account.user"
}
},
"properties": {
"id": {
"type": "number",
"required": true
},
"name": {
"type": "string",
"required": true
},
"roleFk": {
"type": "number",
"mysql": {
"columnName": "role"
}
},
"nickname": {
"type": "string"
},
"password": {
"type": "string",
"required": true
},
"active": {
"type": "boolean"
},
"email": {
"type": "string"
},
"created": {
"type": "date"
},
"updated": {
"type": "date"
}
},
"relations": {
"role": {
"type": "belongsTo",
"model": "Role",
"foreignKey": "roleFk"
}
},
"acls": [
{
"property": "login",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
},
{
"property": "logout",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
},
{
"property": "validateToken",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
}
]
}

View File

@ -17,9 +17,12 @@
"type": "string",
"required": true
},
"name": {
"lastName": {
"type": "string",
"required": true
"required": true,
"mysql": {
"columnName": "name"
}
},
"phone": {
"type" : "String"

View File

@ -18,7 +18,7 @@
<vn-textfield
vn-one
label="Last name"
field="$ctrl.worker.name">
field="$ctrl.worker.lastName">
</vn-textfield>
</vn-horizontal>
<vn-horizontal>

View File

@ -10,15 +10,15 @@
</vn-horizontal>
<div class="body">
<div class="attributes">
<h5 title="{{$ctrl.worker.firstName}} {{$ctrl.worker.name}}">
{{$ctrl.worker.firstName}} {{$ctrl.worker.name}}
<h5 title="{{$ctrl.worker.firstName}} {{$ctrl.worker.lastName}}">
{{$ctrl.worker.firstName}} {{$ctrl.worker.lastName}}
</h5>
<vn-label-value label="Id"
value="{{$ctrl.worker.id}}">
</vn-label-value>
<vn-label-value label="User"
value="{{$ctrl.worker.user.name}}"
title="{{$ctrl.worker.firstName}} {{$ctrl.worker.name}}">
title="{{$ctrl.worker.firstName}} {{$ctrl.worker.lastName}}">
</vn-label-value>
<vn-label-value label="Email"
value="{{$ctrl.worker.user.email}}">

View File

@ -27,7 +27,7 @@
value="{{::worker.id}}">
</vn-label-value>
<vn-label-value label="User"
value="{{::worker.user.name}}">
value="{{::worker.user.nickname}}">
</vn-label-value>
<vn-label-value label="Email"
value="{{::worker.user.email}}">

View File

@ -1,5 +1,5 @@
<vn-card class="summary">
<h5>{{worker.firstName}} {{worker.name}}</h5>
<h5>{{worker.firstName}} {{worker.lastName}}</h5>
<vn-horizontal pad-medium>
<vn-one>
<h4 translate>Basic data</h4>
@ -22,8 +22,7 @@
value="{{worker.userFk}}">
</vn-label-value>
<vn-label-value label="User"
value="{{worker.user.name}}"
title="{{worker.firstName}} {{worker.name}}">
value="{{worker.user.name}}">
</vn-label-value>
<vn-label-value label="Role"
value="{{worker.user.role.name}}">