From 6b165c562e1877c3cd195ad9c8f555163a7519cc Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Mon, 11 Jul 2016 15:34:18 +0100 Subject: [PATCH] Further simplified interface by removing the multi currency support. --- src/main/webdemo/js/Deal.js | 8 ++++++ src/main/webdemo/js/app.js | 19 ++++--------- src/main/webdemo/view/create-deal.html | 39 +++++--------------------- 3 files changed, 21 insertions(+), 45 deletions(-) diff --git a/src/main/webdemo/js/Deal.js b/src/main/webdemo/js/Deal.js index 8fbf18c9d5..bd1e08411c 100644 --- a/src/main/webdemo/js/Deal.js +++ b/src/main/webdemo/js/Deal.js @@ -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; diff --git a/src/main/webdemo/js/app.js b/src/main/webdemo/js/app.js index 44577bac12..6e8bb4b0bf 100644 --- a/src/main/webdemo/js/app.js +++ b/src/main/webdemo/js/app.js @@ -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", diff --git a/src/main/webdemo/view/create-deal.html b/src/main/webdemo/view/create-deal.html index 5d3ebc56e4..18cd2847dd 100644 --- a/src/main/webdemo/view/create-deal.html +++ b/src/main/webdemo/view/create-deal.html @@ -7,10 +7,13 @@
-

Common

- +
@@ -21,18 +24,7 @@
-
-
- -
-
- -
-
+
@@ -111,18 +103,7 @@
-
-
- -
-
- -
-
+
@@ -214,12 +195,6 @@
-