WIP: combobox options
This commit is contained in:
parent
9c07599fc0
commit
83c6bbbf3f
|
@ -13,12 +13,23 @@ export default class EditTopicAssignments extends Component {
|
|||
super(...arguments);
|
||||
const topicAssignment = {
|
||||
type: "Topic",
|
||||
username: "",
|
||||
group_name: "",
|
||||
status: "",
|
||||
note: ""
|
||||
username: this.topic.assigned_to_user?.username,
|
||||
group_name: this.topic.assigned_to_group?.name,
|
||||
status: this.topic.assignment_status,
|
||||
note: this.topic.assignment_note
|
||||
};
|
||||
this.assignments.push(topicAssignment);
|
||||
|
||||
this.topic.assignedPosts().forEach((a) => {
|
||||
this.assignments.push({
|
||||
type: "Post",
|
||||
post_number: a.post_number,
|
||||
username: a.username,
|
||||
group_name: a.name,
|
||||
status: a.assignment_status,
|
||||
note: a.assignment_note,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
get title() {
|
||||
|
|
|
@ -24,7 +24,10 @@ export default class TopicAssignments extends Component {
|
|||
if (assignment.type === "Topic") {
|
||||
return { id: this.TOPIC_ID, name: "Topic" };
|
||||
} else {
|
||||
return null;
|
||||
return {
|
||||
id: assignment.post_number,
|
||||
name: `Post #${assignment.post_number}`, // fixme andrei string
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ function extendTopicModel(api) {
|
|||
return [...map.values()];
|
||||
},
|
||||
|
||||
// fixme andrei rename to postAssignment()
|
||||
assignedPosts() {
|
||||
if (!this.indirectly_assigned_to) {
|
||||
return [];
|
||||
|
|
Loading…
Reference in New Issue