diff --git a/client/client/src/notes/index.html b/client/client/src/notes/index.html index 3a1f6df4a9..f93b183c39 100644 --- a/client/client/src/notes/index.html +++ b/client/client/src/notes/index.html @@ -3,7 +3,7 @@ Notas -
{{n.creationTime | date:'dd/MM/yyyy HH:mm'}}
+
{{n.created | date:'dd/MM/yyyy HH:mm'}}
{{n.employee.name}}
{{n.text}}
diff --git a/client/client/src/notes/index.js b/client/client/src/notes/index.js index 4594701670..7f3fffa90d 100644 --- a/client/client/src/notes/index.js +++ b/client/client/src/notes/index.js @@ -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; diff --git a/services/client/common/models/Client.json b/services/client/common/models/Client.json index c350ea2245..c61676656a 100644 --- a/services/client/common/models/Client.json +++ b/services/client/common/models/Client.json @@ -19,9 +19,6 @@ "socialName": { "type": "string" }, - "creationTime": { - "type": "string" - }, "contact": { "type": "string" }, @@ -96,6 +93,9 @@ }, "accountingAccount": { "type": "string" + }, + "created": { + "type": "date" } }, "validations": [], diff --git a/services/client/common/models/ClientObservation.js b/services/client/common/models/ClientObservation.js index 84ddbc9d3b..150595f5c6 100644 --- a/services/client/common/models/ClientObservation.js +++ b/services/client/common/models/ClientObservation.js @@ -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(); }); diff --git a/services/client/common/models/ClientObservation.json b/services/client/common/models/ClientObservation.json index af4b60d42b..59f86dcc95 100644 --- a/services/client/common/models/ClientObservation.json +++ b/services/client/common/models/ClientObservation.json @@ -16,7 +16,7 @@ "type": "string", "description": "Text" }, - "creationTime": { + "created": { "type": "date", "description": "Creation date and time" }