Преглед изворни кода

Fix "Done" button after accepting group invite button does not work as intended because of `href` value is not set correctly

the `doneLink` variable on the pug file is expanded in the backend, so this commit will move the href building in the pug file instead of the frontend angular controller to make sure the value exists

GitOrigin-RevId: 74029a03293324955120bca630925a743ee60c22
M Fahru пре 2 година
родитељ
комит
6a7f230fa2

+ 1 - 0
services/web/app/views/subscriptions/team/invite.pug

@@ -42,6 +42,7 @@ block content
 									a.btn.btn.btn-primary(ng-click="joinTeam()", ng-disabled="inflight") #{translate("accept_invitation")} 
 									a.btn.btn.btn-primary(ng-click="joinTeam()", ng-disabled="inflight") #{translate("accept_invitation")} 
 
 
 						div(ng-show="view =='inviteAccepted'")
 						div(ng-show="view =='inviteAccepted'")
+							- var doneLink = groupSSOActive ? `/subscription/${subscriptionId}/sso_enrollment` : '/project'
 							p(ng-non-bindable) #{translate("joined_team", {inviterName: inviterName})}
 							p(ng-non-bindable) #{translate("joined_team", {inviterName: inviterName})}
 							p
 							p
 								a.btn.btn.btn-primary(href=doneLink) #{translate("done")}
 								a.btn.btn.btn-primary(href=doneLink) #{translate("done")}

+ 0 - 9
services/web/frontend/js/main/subscription/team-invite-controller.js

@@ -24,15 +24,6 @@ export default App.controller('TeamInviteController', [
       'ol-hasIndividualRecurlySubscription'
       'ol-hasIndividualRecurlySubscription'
     )
     )
 
 
-    const groupSSOActive = getMeta('ol-groupSSOActive', false)
-
-    if (groupSSOActive) {
-      const subscriptionId = getMeta('ol-subscriptionId')
-      $scope.doneLink = `/subscription/${subscriptionId}/sso_enrollment`
-    } else {
-      $scope.doneLink = '/project'
-    }
-
     if (hideJoinSubscription) {
     if (hideJoinSubscription) {
       $scope.view = 'restrictedByManagedGroup'
       $scope.view = 'restrictedByManagedGroup'
     } else if (hasIndividualRecurlySubscription) {
     } else if (hasIndividualRecurlySubscription) {