mirror of
https://github.com/corda/corda.git
synced 2025-02-01 08:48:09 +00:00
Added more content to the deal page in demo web UI
This commit is contained in:
parent
c0752c0f95
commit
cdea9b6674
@ -96,6 +96,44 @@
|
||||
<td>Terminates</td>
|
||||
<td>{{deal.fixedLeg.terminationDate}}</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td>Payment Rule</td>
|
||||
<td>{{deal.fixedLeg.paymentRule}}</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td>Payment Calendars</td>
|
||||
<td>
|
||||
<span ng-repeat="calendar in deal.fixedLeg.paymentCalendar.calendars">
|
||||
<span>{{calendar}}</span><span ng-show="!$last">,</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td colspan="2">
|
||||
<div class="ui accordion">
|
||||
<div class="title">
|
||||
<i class="dropdown icon"></i>
|
||||
Holiday Dates
|
||||
</div>
|
||||
<div class="content">
|
||||
<table class="ui celled small table">
|
||||
<tbody>
|
||||
<tr class="center aligned" ng-repeat="date in deal.fixedLeg.paymentCalendar.holidayDates">
|
||||
<td>{{date}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td>Fixed Rate</td>
|
||||
<td>
|
||||
<span ng-show="!deal.fixedLeg.fixedRate.positive">-</span>
|
||||
{{deal.fixedLeg.fixedRate.value}}%
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -127,6 +165,64 @@
|
||||
<td>Terminates</td>
|
||||
<td>{{deal.floatingLeg.terminationDate}}</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td>Payment Rule</td>
|
||||
<td>{{deal.floatingLeg.paymentRule}}</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td>Payment Calendars</td>
|
||||
<td>
|
||||
<span ng-repeat="calendar in deal.floatingLeg.paymentCalendar.calendars">
|
||||
<span>{{calendar}}</span><span ng-show="!$last">,</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td colspan="2">
|
||||
<div class="ui accordion">
|
||||
<div class="title">
|
||||
<i class="dropdown icon"></i>
|
||||
Holiday Dates
|
||||
</div>
|
||||
<div class="content">
|
||||
<table class="ui celled small table">
|
||||
<tbody>
|
||||
<tr class="center aligned" ng-repeat="date in deal.floatingLeg.paymentCalendar.holidayDates">
|
||||
<td>{{date}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td>Fixing Calendars</td>
|
||||
<td>
|
||||
<span ng-repeat="calendar in deal.floatingLeg.fixingCalendar.calendars">
|
||||
<span>{{calendar}}</span><span ng-show="!$last">,</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="center aligned">
|
||||
<td colspan="2">
|
||||
<div class="ui accordion">
|
||||
<div class="title">
|
||||
<i class="dropdown icon"></i>
|
||||
Holiday Dates
|
||||
</div>
|
||||
<div class="content">
|
||||
<table class="ui celled small table">
|
||||
<tbody>
|
||||
<tr class="center aligned" ng-repeat="date in deal.floatingLeg.fixingCalendar.holidayDates">
|
||||
<td>{{date}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -61,7 +61,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="center aligned" ng-repeat="deal in deals">
|
||||
<td><a href="./deal.html">{{deal.ref}}</a></td>
|
||||
<td><a href="./deal.html?id={{deal.ref}}">{{deal.ref}}</a></td>
|
||||
<td class="single line"><a href="party.html">{{deal.fixedLeg.fixedRatePayer}}</a></td>
|
||||
<td class="single line">{{deal.fixedLeg.notional.quantity}} {{deal.fixedLeg.notional.token}}</td>
|
||||
<td class="single line"><a href="party.html">{{deal.floatingLeg.floatingRatePayer}}</a></td>
|
||||
|
@ -62,7 +62,11 @@ let nodeService = irsViewer.factory('nodeService', ($http) => {
|
||||
|
||||
this.getDeal = (dealId) => {
|
||||
return load('deal' + dealId, $http.get('http://localhost:31338/api/irs/deals/' + dealId)).then((resp) => {
|
||||
return resp.data;
|
||||
// Do some data modification to simplify the model
|
||||
let deal = resp.data;
|
||||
deal.fixedLeg.fixedRate.value = (deal.fixedLeg.fixedRate.ratioUnit.value * 100).toString().slice(0, 6);
|
||||
console.log(deal);
|
||||
return deal;
|
||||
});
|
||||
};
|
||||
|
||||
@ -99,6 +103,12 @@ irsViewer.controller('HomeController', ($http, $scope, nodeService) => {
|
||||
});
|
||||
|
||||
irsViewer.controller('DealController', ($http, $scope, nodeService) => {
|
||||
let initSemanticUi = () => {
|
||||
$('.ui.accordion').accordion();
|
||||
}
|
||||
|
||||
initSemanticUi();
|
||||
|
||||
$scope.isLoading = nodeService.isLoading;
|
||||
|
||||
nodeService.getDeal('T000000001').then((deal) => $scope.deal = deal);
|
||||
|
Loading…
x
Reference in New Issue
Block a user