Просмотр исходного кода

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 лет назад
Родитель
Сommit
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")} 
 
 						div(ng-show="view =='inviteAccepted'")
+							- var doneLink = groupSSOActive ? `/subscription/${subscriptionId}/sso_enrollment` : '/project'
 							p(ng-non-bindable) #{translate("joined_team", {inviterName: inviterName})}
 							p
 								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'
     )
 
-    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) {
       $scope.view = 'restrictedByManagedGroup'
     } else if (hasIndividualRecurlySubscription) {