-
Notifications
You must be signed in to change notification settings - Fork 1
SAN-4781 Payments Integration #1674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4d841a8
abc2822
607ddde
45d5ac4
f84aa23
41d0bb6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ function ControllerApp( | |
| keypather, | ||
| ModalService, | ||
| pageName, | ||
| currentOrg, | ||
|
|
||
| user, | ||
| orgs, | ||
|
|
@@ -119,9 +120,9 @@ function ControllerApp( | |
| } | ||
| }; | ||
|
|
||
| if ($rootScope.featureFlags.billing && (activeAccount.isInGrace() || activeAccount.isGraceExpired())) { | ||
| if ($rootScope.featureFlags.billing && (currentOrg.poppa.isInGrace() || currentOrg.poppa.isGraceExpired())) { | ||
| // Determine if it's a trial end or just a normal payment due | ||
| if (activeAccount.attrs.hasPaymentMethod) { | ||
| if (currentOrg.poppa.attrs.hasPaymentMethod) { | ||
| ModalService.showModal({ | ||
| controller: 'ExpiredAccountController', | ||
| controllerAs: 'EAC', | ||
|
|
@@ -146,13 +147,13 @@ function ControllerApp( | |
|
|
||
| CA.showTrialEndingNotification = function () { | ||
| return $rootScope.featureFlags.billing && | ||
| activeAccount.isInTrial() && | ||
| activeAccount.trialDaysRemaining() <= 3 && | ||
| !activeAccount.attrs.hasPaymentMethod && !keypather.get($localStorage, 'hasDismissedTrialNotification.' + activeAccount.attrs.id); | ||
| currentOrg.poppa.isInTrial() && | ||
| currentOrg.poppa.trialDaysRemaining() <= 3 && | ||
| !currentOrg.poppa.attrs.hasPaymentMethod && !keypather.get($localStorage, 'hasDismissedTrialNotification.' + currentOrg.github.attrs.id); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. currentOrg.github.attrs.id should be able to come from poppa (currentOrg.poppa.attrs.githubId)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yea, but I have the github object anyways, and if I'm looking for a github ID what better place than from the actual github object we have. |
||
| }; | ||
|
|
||
| CA.closeTrialEndingNotification = function () { | ||
| keypather.set($localStorage, 'hasDismissedTrialNotification.' + activeAccount.attrs.id, true); | ||
| keypather.set($localStorage, 'hasDismissedTrialNotification.' + currentOrg.github.attrs.id, true); | ||
| }; | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,8 @@ require('app') | |
| keypather, | ||
| ModalService, | ||
| parseDockerfileForCardInfoFromInstance, | ||
| promisify | ||
| promisify, | ||
| currentOrg | ||
| ) { | ||
| return { | ||
| restrict: 'A', | ||
|
|
@@ -80,7 +81,7 @@ require('app') | |
| }; | ||
| $scope.helpCards = helpCards; | ||
| $scope.server = {}; | ||
| $scope.activeAccount = $rootScope.dataApp.data.activeAccount; | ||
| $scope.activeAccount = currentOrg.github; // I'm unsure if this is used. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean our old practice of using stuff attached to the scope from 5 or 6 levels up is not great for determining how and when a variable is used... impossible!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something like that. |
||
|
|
||
| function scrollIntoView() { | ||
| $document.scrollToElement(ele, 100, 200); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next steps will be to move this to api-client....