forked from jsnbuchanan/crowd-funder-for-time-pwa
refactor: remove redundant dialogType prop from BulkMembersDialog
Remove dialogType prop and consolidate to use only isOrganizer prop. - Remove dialogType prop from BulkMembersDialog component - Replace all dialogType checks with isOrganizer boolean checks - Add comments clarifying isOrganizer true/false meanings - Remove dialog-type prop binding from MembersList component This simplifies the component API while maintaining the same functionality.
This commit is contained in:
@@ -145,7 +145,7 @@ import { Contact } from "@/db/tables/contacts";
|
|||||||
export default class BulkMembersDialog extends Vue {
|
export default class BulkMembersDialog extends Vue {
|
||||||
@Prop({ default: "" }) activeDid!: string;
|
@Prop({ default: "" }) activeDid!: string;
|
||||||
@Prop({ default: "" }) apiServer!: string;
|
@Prop({ default: "" }) apiServer!: string;
|
||||||
@Prop({ required: true }) dialogType!: "admit" | "visibility";
|
// isOrganizer: true = organizer mode (admit members), false = member mode (set visibility)
|
||||||
@Prop({ required: true }) isOrganizer!: boolean;
|
@Prop({ required: true }) isOrganizer!: boolean;
|
||||||
|
|
||||||
// Vue notification system
|
// Vue notification system
|
||||||
@@ -253,7 +253,8 @@ export default class BulkMembersDialog extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async handleMainAction() {
|
async handleMainAction() {
|
||||||
if (this.dialogType === "admit") {
|
// isOrganizer: true = admit mode, false = visibility mode
|
||||||
|
if (this.isOrganizer) {
|
||||||
await this.organizerAdmitAndAddWithVisibility();
|
await this.organizerAdmitAndAddWithVisibility();
|
||||||
} else {
|
} else {
|
||||||
await this.memberAddContactWithVisibility();
|
await this.memberAddContactWithVisibility();
|
||||||
@@ -487,8 +488,8 @@ export default class BulkMembersDialog extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
showContactInfo() {
|
showContactInfo() {
|
||||||
const message =
|
// isOrganizer: true = admit mode, false = visibility mode
|
||||||
this.dialogType === "admit"
|
const message = this.isOrganizer
|
||||||
? "This user is already your contact, but they are not yet admitted to the meeting."
|
? "This user is already your contact, but they are not yet admitted to the meeting."
|
||||||
: "This user is already your contact, but your activities are not visible to them yet.";
|
: "This user is already your contact, but your activities are not visible to them yet.";
|
||||||
|
|
||||||
|
|||||||
@@ -223,7 +223,6 @@
|
|||||||
ref="bulkMembersDialog"
|
ref="bulkMembersDialog"
|
||||||
:active-did="activeDid"
|
:active-did="activeDid"
|
||||||
:api-server="apiServer"
|
:api-server="apiServer"
|
||||||
:dialog-type="isOrganizer ? 'admit' : 'visibility'"
|
|
||||||
:is-organizer="isOrganizer"
|
:is-organizer="isOrganizer"
|
||||||
@close="closeBulkMembersDialogCallback"
|
@close="closeBulkMembersDialogCallback"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user