Update board list when username is changed
This commit is contained in:
parent
ab092e0283
commit
3009e8a360
@ -1,5 +1,5 @@
|
||||
<section>
|
||||
<h2>User Settings</h2>
|
||||
<h2>My Settings</h2>
|
||||
|
||||
<div class="half">
|
||||
<h3>Change Password</h3>
|
||||
@ -26,7 +26,7 @@
|
||||
(click)="resetPasswordForm()">Reset</button>
|
||||
</form>
|
||||
|
||||
<h3 class="tall">All Boards Options</h3>
|
||||
<h3 class="tall">Global Options</h3>
|
||||
<label>
|
||||
Select default board:
|
||||
<select class="autosize"
|
||||
|
@ -117,6 +117,26 @@ export class UserSettings implements OnInit {
|
||||
this.addAlerts(response.alerts);
|
||||
this.resetUsernameForm();
|
||||
this.changeUsername.submitted = false;
|
||||
|
||||
this.settings.getBoards()
|
||||
.subscribe((response: ApiResponse) => {
|
||||
let boardData = response.data[1],
|
||||
boards: Array<Board> = [];
|
||||
|
||||
if (boardData) {
|
||||
boardData.forEach((board: any) => {
|
||||
boards.push(new Board(+board.id, board.name,
|
||||
board.is_active === '1',
|
||||
board.ownColumn,
|
||||
board.ownCategory,
|
||||
board.ownAutoAction,
|
||||
board.ownIssuetracker,
|
||||
board.sharedUser));
|
||||
});
|
||||
|
||||
this.settings.updateBoards(boards);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user