|
|
@ -392,39 +392,44 @@ export default class MembersList extends Vue { |
|
|
|
did: member.did, |
|
|
|
name: member.name, |
|
|
|
} |
|
|
|
const result = await register( |
|
|
|
this.activeDid, |
|
|
|
this.apiServer, |
|
|
|
this.axios, |
|
|
|
contactOldOrNew, |
|
|
|
); |
|
|
|
if (result.success) { |
|
|
|
member.member.registered = true; |
|
|
|
if (oldContact) { |
|
|
|
await db.contacts.update(member.did, { registered: true }); |
|
|
|
oldContact.registered = true; |
|
|
|
} |
|
|
|
this.$notify( |
|
|
|
{ |
|
|
|
group: "alert", |
|
|
|
type: "success", |
|
|
|
title: "Registered", |
|
|
|
text: "Besides being admitted, they were also registered.", |
|
|
|
}, |
|
|
|
3000, |
|
|
|
try { |
|
|
|
const result = await register( |
|
|
|
this.activeDid, |
|
|
|
this.apiServer, |
|
|
|
this.axios, |
|
|
|
contactOldOrNew, |
|
|
|
); |
|
|
|
} else { |
|
|
|
const additionalInfo = result.error || ""; |
|
|
|
if (result.success) { |
|
|
|
member.member.registered = true; |
|
|
|
if (oldContact) { |
|
|
|
await db.contacts.update(member.did, { registered: true }); |
|
|
|
oldContact.registered = true; |
|
|
|
} |
|
|
|
this.$notify( |
|
|
|
{ |
|
|
|
group: "alert", |
|
|
|
type: "success", |
|
|
|
title: "Registered", |
|
|
|
text: "Besides being admitted, they were also registered.", |
|
|
|
}, |
|
|
|
3000, |
|
|
|
); |
|
|
|
} else { |
|
|
|
throw result; |
|
|
|
} |
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
|
|
|
} catch (error: any) { |
|
|
|
// registration failure is likely explained by a message from the server |
|
|
|
const additionalInfo = serverMessageForUser(error) || error?.error || ""; |
|
|
|
this.$notify( |
|
|
|
{ |
|
|
|
group: "alert", |
|
|
|
type: "danger", |
|
|
|
type: "warning", |
|
|
|
title: "Registration failed", |
|
|
|
text: |
|
|
|
"They were admitted, but registration failed. You can try again, or register from your contacts screen. " + |
|
|
|
text: "They were admitted to the meeting. However, registration failed. You can register them from the contacts screen. " + |
|
|
|
additionalInfo, |
|
|
|
}, |
|
|
|
10000, |
|
|
|
12000, |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|