Commit f4aa56e2 authored by Romain DELEAU's avatar Romain DELEAU

reset task identifier on duplicate identifier in a role

parent 9cfe12e3
......@@ -240,6 +240,7 @@ export class AnnexeTaskComponent implements OnInit {
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
......@@ -242,6 +242,7 @@ export class FinalTaskComponent implements OnInit {
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
......@@ -259,6 +259,7 @@ export class OptionnalTaskComponent implements OnInit {
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
......@@ -237,6 +237,7 @@ export class RandomEventComponent implements OnInit {
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
this._snackBar.openFromComponent(IdentifierSnackbarComponent, { duration: 5000 });
this.task.identifier = '';
}
}
......
......@@ -270,6 +270,7 @@ export class TaskComponent implements OnInit {
this.task.identifier = value;
if (this.role.isAlreadyUsedIdentifier(this.task.identifier)) {
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