forked from jsnbuchanan/crowd-funder-for-time-pwa
organizer can toggle admission to the meeting
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user