mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-05 16:32:43 +00:00
Merge remote-tracking branch 'origin/ns-check-institution'
GitOrigin-RevId: a147965b4f3294215f1396e53d184ef4919fa6cd
This commit is contained in:
parent
f32ecc744c
commit
15061047a3
2 changed files with 8 additions and 26 deletions
|
@ -137,7 +137,7 @@
|
|||
href="/user/settings"
|
||||
) Add Affiliation
|
||||
|
||||
.row-spaced(ng-if="hasProjects && userHasNoSubscription", ng-cloak).text-centered
|
||||
.row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered
|
||||
hr
|
||||
p.small #{translate("on_free_sl")}
|
||||
p
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
/* eslint-disable
|
||||
max-len,
|
||||
no-undef,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
/*
|
||||
* decaffeinate suggestions:
|
||||
* DS101: Remove unnecessary use of Array.from
|
||||
* DS102: Remove unnecessary code created because of implicit returns
|
||||
* DS205: Consider reworking code to avoid use of IIFEs
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
define(['base'], App =>
|
||||
App.controller('LeftHandMenuPromoController', function(
|
||||
$scope,
|
||||
|
@ -24,19 +11,14 @@ define(['base'], App =>
|
|||
$scope.userAffiliations = []
|
||||
return UserAffiliationsDataService.getUserEmails().then(function(emails) {
|
||||
$scope.userEmails = emails
|
||||
return (() => {
|
||||
const result = []
|
||||
for (let email of Array.from(emails)) {
|
||||
if (email.affiliation) {
|
||||
result.push($scope.userAffiliations.push(email.affiliation))
|
||||
} else {
|
||||
result.push(undefined)
|
||||
}
|
||||
}
|
||||
return result
|
||||
})()
|
||||
$scope.userAffiliations = emails
|
||||
.filter(email => email.affiliation)
|
||||
.map(email => email.affiliation)
|
||||
$scope.userOnPayingUniversity = $scope.userAffiliations.some(
|
||||
affiliation => affiliation.institution.licence !== 'free'
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
return _userHasNoAffiliation()
|
||||
_userHasNoAffiliation()
|
||||
}))
|
||||
|
|
Loading…
Reference in a new issue