|
1 | 1 | angular.module('platformWebApp')
|
2 |
| - .controller('platformWebApp.userProfile.userProfileController', ['$rootScope', '$scope', 'platformWebApp.i18n', 'platformWebApp.userProfile', 'platformWebApp.common.languages', 'platformWebApp.common.locales', 'platformWebApp.common.timeZones', 'platformWebApp.userProfileApi', 'platformWebApp.authService', |
3 |
| - function ($rootScope, $scope, i18n, userProfile, languages, locales, timeZones, userProfileApi, authService) { |
| 2 | + .controller('platformWebApp.userProfile.userProfileController', ['$rootScope', '$scope', 'platformWebApp.i18n', 'platformWebApp.userProfile', 'platformWebApp.common.languages', 'platformWebApp.common.locales', 'platformWebApp.common.timeZones', 'platformWebApp.userProfileApi', 'platformWebApp.userProfileIconService', |
| 3 | + function ($rootScope, $scope, i18n, userProfile, languages, locales, timeZones, userProfileApi, userProfileIconService) { |
4 | 4 | var blade = $scope.blade;
|
5 | 5 | blade.headIcon = 'fa fa-user';
|
6 | 6 | blade.title = 'platform.blades.user-profile.title';
|
| 7 | + blade.iconUrl = userProfileIconService.userIconUrl; |
7 | 8 |
|
8 | 9 | blade.currentLanguage = i18n.getLanguage();
|
9 | 10 | blade.currentRegionalFormat = i18n.getRegionalFormat();
|
10 | 11 | blade.currentTimeZone = i18n.getTimeZone();
|
11 | 12 | blade.currentTimeAgoSettings = i18n.getTimeAgoSettings();
|
12 | 13 | blade.currentTimeSettings = i18n.getTimeSettings();
|
13 |
| - blade.currentEntity = authService.member; |
14 |
| - // This flag is used to save icon immediately in the MemberIcon blade of the Customer model |
15 |
| - blade.saveIconImmediately = true; |
16 |
| - |
| 14 | + |
17 | 15 | userProfile.load().then(function () {
|
18 | 16 | initializeBlade();
|
19 | 17 | });
|
@@ -55,6 +53,7 @@ angular.module('platformWebApp')
|
55 | 53 | blade.currentTimeZone = getNameByCode($scope.timeZones, blade.currentTimeZone);
|
56 | 54 | blade.currentTimeAgoSettings = userProfile.timeAgoSettings;
|
57 | 55 | blade.currentTimeSettings = userProfile.timeSettings;
|
| 56 | + blade.currentMemberId = userProfile.memberId; |
58 | 57 | }
|
59 | 58 |
|
60 | 59 | function isLoading() {
|
@@ -115,4 +114,10 @@ angular.module('platformWebApp')
|
115 | 114 | userProfile.save();
|
116 | 115 | }
|
117 | 116 | }
|
| 117 | + |
| 118 | + $scope.$watch(function () { |
| 119 | + return userProfileIconService.userIconUrl; |
| 120 | + }, function () { |
| 121 | + blade.iconUrl = userProfileIconService.userIconUrl; |
| 122 | + }); |
118 | 123 | }]);
|
0 commit comments