From bed2c7106a820997d792687d081cc8b1418b4f93 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Mon, 28 Jul 2025 18:46:56 +0800 Subject: [PATCH 1/5] Added: current user in ContactGiftingView - "You" is displayed conditionally, similar to GiftedDialog behavior - "Show All" is hidden in GiftedDialog when accessed from ContactGiftingView (redundant) --- src/components/EntityGrid.vue | 8 ++- src/components/EntitySelectionStep.vue | 5 ++ src/components/GiftedDialog.vue | 2 + src/views/ContactGiftingView.vue | 77 +++++++++++++++++++++++++- 4 files changed, 90 insertions(+), 2 deletions(-) diff --git a/src/components/EntityGrid.vue b/src/components/EntityGrid.vue index ff995652..847f36e7 100644 --- a/src/components/EntityGrid.vue +++ b/src/components/EntityGrid.vue @@ -159,6 +159,10 @@ export default class EntityGrid extends Vue { @Prop({ default: "other party" }) conflictContext!: string; + /** Whether to hide the "Show All" navigation */ + @Prop({ default: false }) + hideShowAll!: boolean; + /** * Function to determine which entities to display (allows parent control) * @@ -245,7 +249,9 @@ export default class EntityGrid extends Vue { * Whether to show the "Show All" navigation */ get shouldShowAll(): boolean { - return this.entities.length > 0 && this.showAllRoute !== ""; + return ( + !this.hideShowAll && this.entities.length > 0 && this.showAllRoute !== "" + ); } /** diff --git a/src/components/EntitySelectionStep.vue b/src/components/EntitySelectionStep.vue index 2c8008d3..b476ea00 100644 --- a/src/components/EntitySelectionStep.vue +++ b/src/components/EntitySelectionStep.vue @@ -27,6 +27,7 @@ Matthew Raymer */ :show-all-query-params="showAllQueryParams" :notify="notify" :conflict-context="conflictContext" + :hide-show-all="hideShowAll" @entity-selected="handleEntitySelected" /> @@ -140,6 +141,10 @@ export default class EntitySelectionStep extends Vue { @Prop() notify?: (notification: NotificationIface, timeout?: number) => void; + /** Whether to hide the "Show All" navigation */ + @Prop({ default: false }) + hideShowAll!: boolean; + /** * CSS classes for the cancel button */ diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index 127c2e2e..b88184a0 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -19,6 +19,7 @@ :giver="giver" :receiver="receiver" :notify="$notify" + :hide-show-all="hideShowAll" @entity-selected="handleEntitySelected" @cancel="cancel" /> @@ -99,6 +100,7 @@ export default class GiftedDialog extends Vue { @Prop() toProjectId = ""; @Prop({ default: false }) showProjects = false; @Prop() isFromProjectView = false; + @Prop({ default: false }) hideShowAll = false; @Watch("showProjects") onShowProjectsChange() { diff --git a/src/views/ContactGiftingView.vue b/src/views/ContactGiftingView.vue index d2577b28..66a29b52 100644 --- a/src/views/ContactGiftingView.vue +++ b/src/views/ContactGiftingView.vue @@ -17,6 +17,24 @@