Tarea #443 claim list

This commit is contained in:
gerard 2018-08-31 14:35:20 +02:00
parent 61b9b0c7bc
commit 2d21f84f8b
2 changed files with 15 additions and 2 deletions

View File

@ -33,7 +33,7 @@
<vn-tbody>
<vn-tr ng-repeat="claim in claims" ui-sref="claim.card.detail({id: claim.id})" class=clickable>
<vn-td number>{{::claim.id}}</vn-td>
<vn-td number>{{::claim.client.id}}</vn-td>
<vn-td number><span class="link" ng-click="$ctrl.showDescriptor($event, claim.client.id)">{{::claim.client.id}}</span></vn-td>
<vn-td>{{::claim.client.name}}</vn-td>
<vn-td>{{::claim.created | date:'dd/MM/yyyy'}}</vn-td>
<vn-td>{{::claim.worker.firstName}} {{::claim.worker.name}}</vn-td>
@ -54,4 +54,5 @@
model="model"
scroll-selector="ui-view">
</vn-pagination>
</div>
</div>
<vn-client-descriptor-popover vn-id="descriptor"></vn-client-descriptor-popover>

View File

@ -29,6 +29,18 @@ export default class Controller {
order: 'claimStateFk ASC, created DESC'
};
}
showDescriptor(event, clientFk) {
this.$.descriptor.clientFk = clientFk;
this.$.descriptor.parent = event.target;
this.$.descriptor.show();
event.preventDefault();
event.stopImmediatePropagation();
}
onDescriptorLoad() {
this.$.popover.relocate();
}
}
Controller.$inject = ['$scope'];