This commit is contained in:
Vicente Falco 2017-05-15 07:53:40 +02:00
commit 8c47938bd0
5 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@
<vn-title>Notas</vn-title> <vn-title>Notas</vn-title>
<vn-horizontal ng-repeat="n in observation.observations" margin-small-bottom style="align-items: center;"> <vn-horizontal ng-repeat="n in observation.observations" margin-small-bottom style="align-items: center;">
<vn-auto style="border-radius: .3em;" class="pad-small border-solid"> <vn-auto style="border-radius: .3em;" class="pad-small border-solid">
<div class="notes-date">{{n.creationTime | date:'dd/MM/yyyy HH:mm'}}</div> <div class="notes-date">{{n.created | date:'dd/MM/yyyy HH:mm'}}</div>
<div class="notes-date">{{n.employee.name}}</div> <div class="notes-date">{{n.employee.name}}</div>
<div>{{n.text}}</div> <div>{{n.text}}</div>
</vn-auto> </vn-auto>

View File

@ -17,7 +17,7 @@ export const COMPONENT = {
}; };
this.getObservation = function(clientId) { this.getObservation = function(clientId) {
let json = JSON.stringify({where: {clientFk: this.client.id}, order: 'creationTime DESC'}); let json = JSON.stringify({where: {clientFk: this.client.id}, order: 'created DESC'});
$http.get(`/client/api/clientObservations?filter=${json}`).then( $http.get(`/client/api/clientObservations?filter=${json}`).then(
json => { json => {
this.observations = json.data; this.observations = json.data;

View File

@ -19,9 +19,6 @@
"socialName": { "socialName": {
"type": "string" "type": "string"
}, },
"creationTime": {
"type": "string"
},
"contact": { "contact": {
"type": "string" "type": "string"
}, },
@ -96,6 +93,9 @@
}, },
"accountingAccount": { "accountingAccount": {
"type": "string" "type": "string"
},
"created": {
"type": "date"
} }
}, },
"validations": [], "validations": [],

View File

@ -5,7 +5,7 @@ module.exports = function(ClientObservation) {
} }
ClientObservation.observe('before save', function(ctx, next) { ClientObservation.observe('before save', function(ctx, next) {
ctx.instance.creationDate = Date(); ctx.instance.created = Date();
ctx.instance.employeeFk = 20; ctx.instance.employeeFk = 20;
next(); next();
}); });

View File

@ -16,7 +16,7 @@
"type": "string", "type": "string",
"description": "Text" "description": "Text"
}, },
"creationTime": { "created": {
"type": "date", "type": "date",
"description": "Creation date and time" "description": "Creation date and time"
} }