From 1c5f208ef1b2b9e9d016b21023f4c0a01e246f5c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 8 May 2017 15:20:01 -0400 Subject: [PATCH] enterprise plan signup --- src/app/constants.js | 8 +++ .../settingsCreateOrganizationController.js | 16 ++++-- .../views/settingsCreateOrganization.html | 56 ++++++++++++++++--- src/less/vault.less | 2 +- 4 files changed, 69 insertions(+), 13 deletions(-) diff --git a/src/app/constants.js b/src/app/constants.js index 467879b244..bc6fe8b479 100644 --- a/src/app/constants.js +++ b/src/app/constants.js @@ -46,6 +46,14 @@ angular.module('bit') monthPlanType: 'teamsMonthly', annualPlanType: 'teamsAnnually', upgradeSortOrder: 2 + }, + enterprise: { + seatPrice: 3, + annualSeatPrice: 36, + monthlySeatPrice: 4, + monthPlanType: 'enterpriseMonthly', + annualPlanType: 'enterpriseAnnually', + upgradeSortOrder: 3 } } }); diff --git a/src/app/settings/settingsCreateOrganizationController.js b/src/app/settings/settingsCreateOrganizationController.js index 676d2eaaab..3389ddbe03 100644 --- a/src/app/settings/settingsCreateOrganizationController.js +++ b/src/app/settings/settingsCreateOrganizationController.js @@ -14,12 +14,12 @@ $scope.totalPrice = function () { if ($scope.model.interval === 'month') { - return ($scope.model.additionalSeats || 0) * $scope.plans[$scope.model.plan].monthlySeatPrice + - $scope.plans[$scope.model.plan].monthlyBasePrice; + return ($scope.model.additionalSeats || 0) * ($scope.plans[$scope.model.plan].monthlySeatPrice || 0) + + ($scope.plans[$scope.model.plan].monthlyBasePrice || 0); } else { - return ($scope.model.additionalSeats || 0) * $scope.plans[$scope.model.plan].annualSeatPrice + - $scope.plans[$scope.model.plan].annualBasePrice; + return ($scope.model.additionalSeats || 0) * ($scope.plans[$scope.model.plan].annualSeatPrice || 0) + + ($scope.plans[$scope.model.plan].annualBasePrice || 0); } }; @@ -27,6 +27,14 @@ if ($scope.plans[$scope.model.plan].hasOwnProperty('monthPlanType')) { $scope.model.interval = 'year'; } + + if ($scope.plans[$scope.model.plan].noAdditionalSeats) { + $scope.model.additionalSeats = 0; + } + else if (!$scope.model.additionalSeats && !$scope.plans[$scope.model.plan].baseSeats && + !$scope.plans[$scope.model.plan].noAdditionalSeats) { + $scope.model.additionalSeats = 1; + } }; $scope.changedBusiness = function () { diff --git a/src/app/settings/views/settingsCreateOrganization.html b/src/app/settings/views/settingsCreateOrganization.html index ed45d6b75c..eeb4dc34b6 100644 --- a/src/app/settings/views/settingsCreateOrganization.html +++ b/src/app/settings/views/settingsCreateOrganization.html @@ -98,6 +98,21 @@ +
+ +
-
+

Additional Users (Seats)

@@ -129,6 +144,27 @@
+
+
+

Users (Seats)

+
+
+

+ How many user seats do you need? + You can also add additional seats later if needed. +

+
+
+
+ + +
+
+
+
+

Billing Summary

@@ -138,15 +174,17 @@
@@ -154,14 +192,16 @@
diff --git a/src/less/vault.less b/src/less/vault.less index ed06bf0769..f41f379bd4 100644 --- a/src/less/vault.less +++ b/src/less/vault.less @@ -215,7 +215,7 @@ form .btn .loading-icon { margin-left: -20px; } - span { + > span { display: block; color: @text-muted; font-size: 90%;