WIP: Reassigning posts from the modal
This commit is contained in:
parent
a2db458312
commit
cf0861d8c8
|
@ -18,6 +18,7 @@ export default class AssignUserForm extends Component {
|
||||||
|
|
||||||
this.args.formApi.submit = this.assign;
|
this.args.formApi.submit = this.assign;
|
||||||
this.selectedTargetId = this.TOPIC_ID;
|
this.selectedTargetId = this.TOPIC_ID;
|
||||||
|
this.args.model.updatedPostAssignments = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
get assignments() {
|
get assignments() {
|
||||||
|
@ -81,12 +82,20 @@ export default class AssignUserForm extends Component {
|
||||||
this.assigneeName = name;
|
this.assigneeName = name;
|
||||||
this.assigneeError = false;
|
this.assigneeError = false;
|
||||||
|
|
||||||
|
let username, groupName;
|
||||||
if (this.taskActions.allowedGroupsForAssignment.includes(name)) {
|
if (this.taskActions.allowedGroupsForAssignment.includes(name)) {
|
||||||
this.args.model.username = null;
|
username = null;
|
||||||
this.args.model.group_name = name;
|
groupName = name;
|
||||||
} else {
|
} else {
|
||||||
this.args.model.username = name;
|
username = name;
|
||||||
this.args.model.group_name = null;
|
groupName = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.args.model.username = username;
|
||||||
|
this.args.model.group_name = groupName;
|
||||||
|
|
||||||
|
if (this.editingTopicAssignments) {
|
||||||
|
// fixme andrei implement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ export default class AssignUser extends Component {
|
||||||
|
|
||||||
@action
|
@action
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
|
console.log("this.model.updatedPostAssignments", this.model.updatedPostAssignments);
|
||||||
this.args.closeModal();
|
this.args.closeModal();
|
||||||
await this.taskActions.assign(this.model);
|
await this.taskActions.assign(this.model);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue