Further simplified interface by removing the multi currency support.

This commit is contained in:
Clinton Alexander 2016-07-11 15:34:18 +01:00
parent 304b5ae40c
commit 6b165c562e
3 changed files with 21 additions and 45 deletions

View File

@ -16,6 +16,13 @@ let Deal = function(dealViewModel) {
fixedLeg.fixedRate = Number(fixedLeg.fixedRate) / 100;
common.tradeID = tradeId;
common.eligibleCurrency = common.baseCurrency;
common.independentAmounts.token = common.baseCurrency;
common.threshold.token = common.baseCurrency;
common.minimumTransferAmount.token = common.baseCurrency;
common.rounding.token = common.baseCurrency;
fixedLeg.notional.token = common.baseCurrency;
fixedLeg.effectiveDate = formatDateForNode(fixedLeg.effectiveDate);
fixedLeg.terminationDate = formatDateForNode(fixedLeg.terminationDate);
fixedLeg.fixedRate = { ratioUnit: { value: fixedLeg.fixedRate } };
@ -23,6 +30,7 @@ let Deal = function(dealViewModel) {
fixedLeg.dayCountBasisYear = dayCountBasisLookup[fixedLeg.dayCountBasis].year;
delete fixedLeg.dayCountBasis;
floatingLeg.notional.token = common.baseCurrency;
floatingLeg.effectiveDate = formatDateForNode(floatingLeg.effectiveDate);
floatingLeg.terminationDate = formatDateForNode(floatingLeg.terminationDate);
floatingLeg.dayCountBasisDay = dayCountBasisLookup[floatingLeg.dayCountBasis].day;

View File

@ -15,8 +15,7 @@ function formatDateForAngular(dateStr) {
let fixedLegModel = {
fixedRatePayer: "Bank A",
notional: {
quantity: 2500000000,
token: "EUR"
quantity: 2500000000
},
paymentFrequency: "Annual",
effectiveDate: new Date(2016, 3, 11),
@ -38,8 +37,7 @@ let fixedLegModel = {
let floatingLegModel = {
floatingRatePayer: "Bank B",
notional: {
quantity: 2500000000,
token: "EUR"
quantity: 2500000000
},
paymentFrequency: "Quarterly",
effectiveDate: new Date(2016, 3, 11),
@ -86,23 +84,18 @@ let fixedRateViewModel = {
let commonViewModel = {
baseCurrency: "EUR",
eligibleCurrency: "EUR",
eligibleCreditSupport: "Cash in an Eligible Currency",
independentAmounts: {
quantity: 0,
token: "EUR"
quantity: 0
},
threshold: {
quantity: 0,
token: "EUR"
quantity: 0
},
minimumTransferAmount: {
quantity: 25000000,
token: "EUR"
quantity: 25000000
},
rounding: {
quantity: 1000000,
token: "EUR"
quantity: 1000000
},
valuationDate: "Every Local Business Day",
notificationTime: "2:00pm London",

View File

@ -7,10 +7,13 @@
<form class="ui form" ng-submit="createDeal()">
<div class="ui grid">
<div class="sixteen wide column">
<h3>Common</h3>
<div class="field">
<label>Base Currency</label>
<input type="text" name="baseCurrency" ng-model="deal.common.baseCurrency"/>
<select class="ui dropdown fluid" name="token" ng-model="deal.common.baseCurrency">
<option value="EUR">EUR</option>
<option value="USD">USD</option>
<option value="GBP">GBP</option>
</select>
</div>
</div>
<div class="eight wide column" id="createfixedleg">
@ -21,18 +24,7 @@
</div>
<div class="field">
<label>Notional</label>
<div class="ui grid">
<div class="eight wide column">
<input type="text" name="quantity" ng-model="deal.fixedLeg.notional.quantity" fcsa-number/>
</div>
<div class="eight wide column">
<select class="ui dropdown fluid" name="token" ng-model="deal.fixedLeg.notional.token">
<option value="EUR">EUR</option>
<option value="USD">USD</option>
<option value="GBP">GBP</option>
</select>
</div>
</div>
<input type="text" name="quantity" ng-model="deal.fixedLeg.notional.quantity" fcsa-number/>
</div>
<div class="field">
<label>Fixed Rate</label>
@ -111,18 +103,7 @@
</div>
<div class="field">
<label>Notional</label>
<div class="ui grid">
<div class="eight wide column">
<input type="text" name="quantity" ng-model="deal.floatingLeg.notional.quantity" fcsa-number/>
</div>
<div class="eight wide column">
<select class="ui dropdown fluid" name="token" ng-model="deal.floatingLeg.notional.token">
<option value="EUR">EUR</option>
<option value="USD">USD</option>
<option value="GBP">GBP</option>
</select>
</div>
</div>
<input type="text" name="quantity" ng-model="deal.floatingLeg.notional.quantity" fcsa-number/>
</div>
<div class="field">
<label>Payment Frequency</label>
@ -214,12 +195,6 @@
<label>Fixings Per Payment</label>
<input type="text" name="fixingsPerPayment" ng-model="deal.floatingLeg.fixingsPerPayment"/>
</div>
<!--<div class="ui container"><h3>deal.floatingLeg.fixingCalendar</h3>
<div class="field">
<label>0</label>
<input type="text" name="0" ng-model="deal.floatingLeg.fixingCalendar.0"/>
</div>
</div>-->
<div class="field">
<label>Index</label>
<input type="text" name="index" ng-model="deal.floatingLeg.index"/>