diff --git a/src/components/ProjectRepresentativeDialog.vue b/src/components/ProjectRepresentativeDialog.vue index c15b2dcd..51afcb5f 100644 --- a/src/components/ProjectRepresentativeDialog.vue +++ b/src/components/ProjectRepresentativeDialog.vue @@ -13,7 +13,7 @@ :active-did="activeDid" :all-my-dids="allMyDids" :all-contacts="allContacts" - :conflict-checker="conflictChecker" + :conflict-checker="() => false" :show-you-entity="false" :show-unnamed-entity="false" :notify="notify" @@ -70,10 +70,6 @@ export default class ProjectRepresentativeDialog extends Vue { @Prop({ required: true }) allMyDids!: string[]; - /** Function to check if a person DID would create a conflict */ - @Prop({ required: true }) - conflictChecker!: (did: string) => boolean; - /** Notification function from parent component */ @Prop() notify?: (notification: NotificationIface, timeout?: number) => void; @@ -83,11 +79,9 @@ export default class ProjectRepresentativeDialog extends Vue { * Immediately assigns the selected contact and closes the dialog */ handleEntitySelected(event: { type: "person" | "project"; data: Contact }) { - if (event.type === "person") { - const contact = event.data as Contact; - this.emitAssign(contact); - this.close(); - } + const contact = event.data as Contact; + this.emitAssign(contact); + this.close(); } /** @@ -117,11 +111,6 @@ export default class ProjectRepresentativeDialog extends Vue { emitAssign(contact: Contact): Contact { return contact; } - - @Emit("cancel") - emitCancel(): void { - // No return value needed - } } diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue index 29362324..1d006d48 100644 --- a/src/views/NewEditProjectView.vue +++ b/src/views/NewEditProjectView.vue @@ -110,10 +110,8 @@ :all-contacts="allContacts" :active-did="activeDid" :all-my-dids="allMyDids" - :conflict-checker="() => false" :notify="$notify" @assign="handleRepresentativeAssigned" - @cancel="handleRepresentativeCancel" />
@@ -1062,13 +1060,6 @@ export default class NewEditProjectView extends Vue { this.agentDid = contact.did; } - /** - * Handle representative dialog cancel - */ - handleRepresentativeCancel(): void { - // Dialog closes itself, nothing to do here - } - /** * Unset the representative and revert to initial state */