diff --git a/client/claim/src/index/index.html b/client/claim/src/index/index.html
index af7a9b263..88349260a 100644
--- a/client/claim/src/index/index.html
+++ b/client/claim/src/index/index.html
@@ -21,7 +21,6 @@
Id
- Client Id
Client
Created
Worker
@@ -32,8 +31,11 @@
{{::claim.id}}
- {{::claim.client.id}}
- {{::claim.client.name}}
+
+
+ {{::claim.client.name}}
+
+
{{::claim.created | date:'dd/MM/yyyy'}}
{{::claim.worker.firstName}} {{::claim.worker.name}}
{{::claim.claimState.description}}
diff --git a/client/order/src/index/index.html b/client/order/src/index/index.html
index a74f83da1..24bc5eaed 100644
--- a/client/order/src/index/index.html
+++ b/client/order/src/index/index.html
@@ -1,7 +1,7 @@
@@ -10,18 +10,22 @@
- Id
+ Id
Client
Company
- Created
+ Created
{{::order.id}}
- {{::order.clientFk}}
- {{::order.companyFk}}
+
+
+ {{::order.client.name}}
+
+
+ {{::order.company.code}}
{{::order.created | date:'dd/MM/yyyy'}}
@@ -38,10 +42,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/client/order/src/index/index.js b/client/order/src/index/index.js
index aa0c59183..384cfb13e 100644
--- a/client/order/src/index/index.js
+++ b/client/order/src/index/index.js
@@ -2,8 +2,20 @@ import ngModule from '../module';
export default class Controller {
constructor($scope) {
- this.$ = $scope;
+ this.$scope = $scope;
this.ticketSelected = null;
+ this.filter = {
+ include: [
+ {
+ relation: 'client',
+ fields: ['name']
+ },
+ {
+ relation: 'company',
+ fields: ['code']
+ }
+ ]
+ };
}
/* exprBuilder(param, value) {
@@ -26,10 +38,22 @@ export default class Controller {
}
} */
+ showDescriptor(event, clientFk) {
+ this.$scope.descriptor.clientFk = clientFk;
+ this.$scope.descriptor.parent = event.target;
+ this.$scope.descriptor.show();
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ }
+
+ onDescriptorLoad() {
+ this.$scope.popover.relocate();
+ }
+
preview(event, ticket) {
event.preventDefault();
event.stopImmediatePropagation();
- this.$.dialogSummaryTicket.show();
+ this.$scope.dialogSummaryTicket.show();
this.ticketSelected = ticket;
}
}
diff --git a/services/order/common/models/order.json b/services/order/common/models/order.json
index d51d6a843..0c58396d9 100644
--- a/services/order/common/models/order.json
+++ b/services/order/common/models/order.json
@@ -90,6 +90,11 @@
"type": "hasMany",
"model": "OrderRow",
"foreignKey": "orderFk"
+ },
+ "company": {
+ "type": "belongsTo",
+ "model": "Company",
+ "foreignKey": "company_id"
}
}
}