mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
19 lines
552 B
CoffeeScript
19 lines
552 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
|
|
App.controller 'LeftHandMenuPromoController', ($scope, UserAffiliationsDataService) ->
|
|
|
|
$scope.hasProjects = window.data.projects.length > 0
|
|
$scope.userHasNoSubscription = window.userHasNoSubscription
|
|
|
|
_userHasNoAffiliation = () ->
|
|
$scope.userEmails = []
|
|
$scope.userAffiliations = []
|
|
UserAffiliationsDataService.getUserEmails().then (emails) ->
|
|
$scope.userEmails = emails
|
|
for email in emails
|
|
if email.affiliation
|
|
$scope.userAffiliations.push email.affiliation
|
|
|
|
_userHasNoAffiliation()
|