Commit f4aa56e2 authored by Romain DELEAU's avatar Romain DELEAU

reset task identifier on duplicate identifier in a role

parent 9cfe12e3
......@@ -239,7 +239,8 @@ export class AnnexeTaskComponent implements OnInit {
}
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
......@@ -241,7 +241,8 @@ export class FinalTaskComponent implements OnInit {
}
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
......@@ -258,7 +258,8 @@ export class OptionnalTaskComponent implements OnInit {
}
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
......@@ -236,7 +236,8 @@ export class RandomEventComponent implements OnInit {
}
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
......@@ -269,7 +269,8 @@ export class TaskComponent implements OnInit {
}
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment