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-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">
<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>{{n.text}}</div>
</vn-auto>

View File

@ -17,7 +17,7 @@ export const COMPONENT = {
};
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(
json => {
this.observations = json.data;

View File

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

View File

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

View File

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