Skip to content

Commit ea1be27

Browse files
emmanuelbaadogi
andauthored
teams: smoother survey title handling (fixes #9161) (#9177)
Co-authored-by: dogi <[email protected]>
1 parent 22815a0 commit ea1be27

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "planet",
33
"license": "AGPL-3.0",
4-
"version": "0.20.45",
4+
"version": "0.20.46",
55
"myplanet": {
66
"latest": "v0.34.30",
77
"min": "v0.33.30"

src/app/exams/exams-view.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ export class ExamsViewComponent implements OnInit, OnDestroy {
198198
if (this.route.snapshot.data.newUser === true) {
199199
this.router.navigate(
200200
[ '/users/submission', { id: this.submissionId } ],
201-
{ queryParams: { teamId: this.teamId } }
201+
{ queryParams: { teamId: this.teamId },
202+
state: { title: this.title} }
202203
);
203204
} else {
204205
this.goBack();

src/app/users/users-update/users-update.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="space-container">
1212
<mat-toolbar class="primary-color font-size-1">
1313
<span>{{user.name}}</span>
14-
<span *ngIf="submissionMode" i18n>Optional user info form</span>
14+
<span *ngIf="submissionMode" i18n>{{title}}</span>
1515
</mat-toolbar>
1616
<div class="view-container">
1717
<div class="form-container">

src/app/users/users-update/users-update.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export class UsersUpdateComponent implements OnInit, CanComponentDeactivate {
3535
urlName = '';
3636
redirectUrl = '/';
3737
file: any;
38+
title = '';
3839
roles: string[] = [];
3940
languages = languages;
4041
submissionMode = false;
@@ -61,6 +62,8 @@ export class UsersUpdateComponent implements OnInit, CanComponentDeactivate {
6162
private dialog: MatDialog
6263
) {
6364
this.userData();
65+
const nav = this.router.getCurrentNavigation();
66+
this.title = nav?.extras?.state?.['title'] || '';
6467
}
6568

6669
ngOnInit() {

0 commit comments

Comments
 (0)