push new user to detail store

This commit is contained in:
Mads Rasmussen
2023-11-28 12:52:38 +01:00
parent 78fef288d3
commit 05c5202510

View File

@@ -22,9 +22,11 @@ export class UmbInviteUserRepository extends UmbUserRepositoryBase {
if (!requestModel) throw new Error('data is missing');
await this.init;
const { error } = await this.#inviteSource.invite(requestModel);
const { data, error } = await this.#inviteSource.invite(requestModel);
if (data) {
this.detailStore!.append(data);
if (!error) {
const notification = { data: { message: `Invite sent to user` } };
this.notificationContext?.peek('positive', notification);
}