organizer can toggle admission to the meeting

This commit is contained in:
2025-02-03 19:00:11 -07:00
parent 3c7a044f67
commit 763398ff1b
3 changed files with 106 additions and 45 deletions

View File

@@ -19,8 +19,8 @@
class="p-4 bg-white rounded-lg shadow hover:shadow-md transition-shadow cursor-pointer"
@click="promptPassword(attendingMeeting)"
>
<h2 class="text-xl font-medium">{{ attendingMeeting.name }}</h2>
<div class="flex justify-end mt-2">
<div class="flex justify-between items-center">
<h2 class="text-xl font-medium">{{ attendingMeeting.name }}</h2>
<button
@click.stop="leaveMeeting"
class="text-red-600 hover:text-red-700 p-2"
@@ -110,7 +110,14 @@ interface Meeting {
})
export default class OnboardMeetingListView extends Vue {
$notify!: (
notification: { group: string; type: string; title: string; text: string },
notification: {
group: string;
type: string;
title: string;
text: string;
onYes?: () => void;
yesText?: string;
},
timeout?: number,
) => void;
@@ -281,41 +288,52 @@ export default class OnboardMeetingListView extends Vue {
}
async leaveMeeting() {
try {
const headers = await getHeaders(this.activeDid);
await this.axios.delete(
this.apiServer + "/api/partner/groupOnboardMember",
{ headers },
);
this.$notify(
{
group: "modal",
type: "confirm",
title: "Leave Meeting",
text: "Are you sure you want to leave this meeting?",
onYes: async () => {
try {
const headers = await getHeaders(this.activeDid);
await this.axios.delete(
this.apiServer + "/api/partner/groupOnboardMember",
{ headers },
);
this.attendingMeeting = null;
await this.fetchMeetings();
this.attendingMeeting = null;
await this.fetchMeetings();
this.$notify(
{
group: "alert",
type: "success",
title: "Success",
text: "You left the meeting.",
this.$notify(
{
group: "alert",
type: "success",
title: "Success",
text: "You left the meeting.",
},
5000,
);
} catch (error) {
logConsoleAndDb(
"Error leaving meeting: " + errorStringForLog(error),
true,
);
this.$notify(
{
group: "alert",
type: "danger",
title: "Error",
text:
serverMessageForUser(error) || "You failed to leave the meeting.",
},
5000,
);
}
},
5000,
);
} catch (error) {
logConsoleAndDb(
"Error leaving meeting: " + errorStringForLog(error),
true,
);
this.$notify(
{
group: "alert",
type: "danger",
title: "Error",
text:
serverMessageForUser(error) || "You failed to leave the meeting.",
},
5000,
);
}
},
-1,
);
}
}
</script>