This commit is contained in:
Andrei Prigorshnev 2024-04-02 00:01:41 +04:00
parent 0b3ff43f2e
commit 607e5ae464
No known key found for this signature in database
GPG Key ID: 185E0A5F45783902
2 changed files with 14 additions and 14 deletions

View File

@ -27,18 +27,4 @@ export default class AssignUserForm extends Component {
await this.args.onSubmit();
}
@action
assignUsername([name]) {
this.assigneeName = name;
this.assigneeError = false;
if (this.taskActions.allowedGroupsForAssignment.includes(name)) {
this.args.model.username = null;
this.args.model.group_name = name;
} else {
this.args.model.username = name;
this.args.model.group_name = null;
}
}
}

View File

@ -28,6 +28,20 @@ export default class Assignment extends Component {
}
}
@action
setAssignee([newAssignee]) {
this.assigneeName = newAssignee;
// this.assigneeError = false; fixme andrei
if (this.taskActions.allowedGroupsForAssignment.includes(newAssignee)) {
this.args.model.username = null;
this.args.model.group_name = newAssignee;
} else {
this.args.model.username = newAssignee;
this.args.model.group_name = null;
}
}
get #assignStatuses() {
return this.siteSettings.assign_statuses.split("|");
}