diff --git a/src/components/EntitySummaryButton.vue b/src/components/EntitySummaryButton.vue index cd874675..344b5bea 100644 --- a/src/components/EntitySummaryButton.vue +++ b/src/components/EntitySummaryButton.vue @@ -74,10 +74,6 @@ export default class EntitySummaryButton extends Vue { @Prop({ required: true }) entity!: EntityData | Contact | null; - /** Type of entity: 'person' or 'project' */ - @Prop({ required: true }) - entityType!: "person" | "project"; - /** Display label for the entity role */ @Prop({ required: true }) label!: string; @@ -92,6 +88,10 @@ export default class EntitySummaryButton extends Vue { entity: EntityData | Contact | null; }) => void | Promise; + get entityType(): string { + return this.entity && "handleId" in this.entity ? "project" : "person"; + } + /** * CSS classes for the main container */