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>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<h2 class="text-2xl">Current Meeting</h2>
|
||||
<button
|
||||
@click="startEditing"
|
||||
class="text-blue-600 hover:text-blue-800 transition-colors duration-200 ml-2"
|
||||
class="mb-4 text-blue-600 hover:text-blue-800 transition-colors duration-200 ml-2"
|
||||
title="Edit Meeting"
|
||||
>
|
||||
<fa icon="pen" class="fa-fw" />
|
||||
@@ -200,10 +200,10 @@
|
||||
</div>
|
||||
<router-link
|
||||
:to="onboardMeetingMembersLink()"
|
||||
class="inline-block px-4 text-blue-600"
|
||||
class="inline-block text-blue-600"
|
||||
target="_blank"
|
||||
>
|
||||
Open page that meeting members see
|
||||
Open shortcut page for members <fa icon="external-link" />
|
||||
</router-link>
|
||||
|
||||
<MembersList
|
||||
|
||||
Reference in New Issue
Block a user