Skip to content

Commit b604ebb

Browse files
author
billy clark
authored
removed old project-specific settings feature (#1647)
1 parent ba4bf1a commit b604ebb

File tree

1 file changed

+2
-30
lines changed

1 file changed

+2
-30
lines changed

src/angular-app/bellows/apps/userprofile/user-profile-app.component.ts

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -173,44 +173,16 @@ export class UserProfileAppController implements angular.IController {
173173
this.initColor = this.user.avatar_color;
174174
this.initShape = this.user.avatar_shape;
175175
this.projectsSettings = result.data.projectsSettings;
176-
this.breadcrumbService.set('top', [
176+
177+
this.breadcrumbService.set('top', [
177178
{ label: 'User Profile' }
178179
]);
179180
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-
}
197181
}
198182
});
199183
}
200184

201185
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-
214186
this.userService.updateProfile(this.user, result => {
215187
if (result.ok) {
216188
if (this.user.avatar_color !== this.initColor || this.user.avatar_shape !== this.initShape) {

0 commit comments

Comments
 (0)