diff --git a/src/components/EntitySummaryButton.vue b/src/components/EntitySummaryButton.vue
index 0ae6ffb2..96f7aff0 100644
--- a/src/components/EntitySummaryButton.vue
+++ b/src/components/EntitySummaryButton.vue
@@ -11,17 +11,18 @@ details step with edit functionality. * * @author Matthew Raymer */
void;
notify!: ReturnType;
@Prop() fromProjectId = "";
@@ -564,11 +565,12 @@ export default class GiftedDialog extends Vue {
/**
* Handle entity selection from EntitySelectionStep
- * @param entity - The selected entity (person or project) with stepType
+ * @param entity - The selected entity (person, project, or special) with stepType
*/
handleEntitySelected(entity: {
- type: "person" | "project";
- data: Contact | PlanData;
+ type: "person" | "project" | "special";
+ entityType?: string;
+ data: Contact | PlanData | { did?: string; name: string };
stepType: string;
}) {
if (entity.type === "person") {
@@ -578,13 +580,40 @@ export default class GiftedDialog extends Vue {
} else {
this.selectRecipient(contact);
}
- } else {
+ } else if (entity.type === "project") {
const project = entity.data as PlanData;
if (entity.stepType === "giver") {
this.selectProject(project);
} else {
this.selectRecipientProject(project);
}
+ } else if (entity.type === "special") {
+ // Handle special entities like "You" and "Unnamed"
+ if (entity.entityType === "you") {
+ // "You" entity selected
+ const youEntity = {
+ did: this.activeDid,
+ name: "You",
+ };
+ if (entity.stepType === "giver") {
+ this.giver = youEntity;
+ } else {
+ this.receiver = youEntity;
+ }
+ this.firstStep = false;
+ } else if (entity.entityType === "unnamed") {
+ // "Unnamed" entity selected
+ const unnamedEntity = {
+ did: "",
+ name: "Unnamed",
+ };
+ if (entity.stepType === "giver") {
+ this.giver = unnamedEntity;
+ } else {
+ this.receiver = unnamedEntity;
+ }
+ this.firstStep = false;
+ }
}
}