parent
2c54eb253b
commit
4b2be8c6b3
|
@ -54,7 +54,7 @@ export default Component.extend(bufferedProperty("invite"), {
|
|||
moment()
|
||||
.add(this.siteSettings.invite_expiry_days, "days")
|
||||
.format(FORMAT),
|
||||
groupIds: this.model.invite?.groupIds,
|
||||
groupIds: this.model.groupIds ?? this.model.invite?.groupIds,
|
||||
topicId: this.model.invite?.topicId,
|
||||
topicTitle: this.model.invite?.topicTitle,
|
||||
});
|
||||
|
|
|
@ -36,7 +36,7 @@ export default DiscourseRoute.extend({
|
|||
showInviteModal() {
|
||||
const group = this.modelFor("group");
|
||||
this.modal.show(CreateInvite, {
|
||||
model: { invite: { groupIds: [group.id] } },
|
||||
model: { groupIds: [group.id] },
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -262,6 +262,8 @@ acceptance(
|
|||
},
|
||||
]);
|
||||
});
|
||||
|
||||
server.post("/invites", () => helper.response({}));
|
||||
});
|
||||
|
||||
test("shows correct saved data in form", async function (assert) {
|
||||
|
@ -281,6 +283,8 @@ acceptance(
|
|||
await visit("/g/discourse");
|
||||
await click(".group-members-invite");
|
||||
assert.dom(".invite-to-groups .formatted-selection").hasText("Discourse");
|
||||
|
||||
await click(".save-invite");
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue