@@ -173,44 +173,16 @@ export class UserProfileAppController implements angular.IController {
173
173
this . initColor = this . user . avatar_color ;
174
174
this . initShape = this . user . avatar_shape ;
175
175
this . projectsSettings = result . data . projectsSettings ;
176
- this . breadcrumbService . set ( 'top' , [
176
+
177
+ this . breadcrumbService . set ( 'top' , [
177
178
{ label : 'User Profile' }
178
179
] ) ;
179
180
this . applicationHeaderService . setPageName ( this . user . name + '\'s User Profile' ) ;
180
-
181
- // populate the project pickList default values with the userProfile picked values
182
- for ( const project of this . projectsSettings ) {
183
- if ( project . userProperties && project . userProperties . userProfilePickLists ) {
184
- angular . forEach ( project . userProperties . userProfilePickLists ,
185
- ( pickList , pickListId ) => {
186
- // ensure user has profile data
187
- if ( this . user . projectUserProfiles [ project . id ] ) {
188
- if ( this . user . projectUserProfiles [ project . id ] [ pickListId ] ) {
189
- project . userProperties . userProfilePickLists [ pickListId ]
190
- . defaultKey = this . user . projectUserProfiles [ project . id ] [ pickListId ] ;
191
- }
192
- }
193
- }
194
- ) ;
195
- }
196
- }
197
181
}
198
182
} ) ;
199
183
}
200
184
201
185
private updateUser ( ) : void {
202
- // populate the userProfile picked values from the project pickLists
203
- for ( const project of this . projectsSettings ) {
204
- this . user . projectUserProfiles [ project . id ] = { } ;
205
- if ( project . userProperties && project . userProperties . userProfilePickLists ) {
206
- angular . forEach ( project . userProperties . userProfilePickLists ,
207
- ( pickList , pickListId ) => {
208
- this . user . projectUserProfiles [ project . id ] [ pickListId ] = pickList . defaultKey ;
209
- }
210
- ) ;
211
- }
212
- }
213
-
214
186
this . userService . updateProfile ( this . user , result => {
215
187
if ( result . ok ) {
216
188
if ( this . user . avatar_color !== this . initColor || this . user . avatar_shape !== this . initShape ) {
0 commit comments