From 1f1739f00cfa88517a049b0511a14b55428df82b Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Wed, 6 Aug 2025 20:54:34 -0600 Subject: [PATCH] fix: Fix messaging on the info-circles by givers & receivers in gifting details. --- src/constants/notifications.ts | 11 ----------- src/views/GiftedDetailsView.vue | 25 +++++++++++++------------ 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/constants/notifications.ts b/src/constants/notifications.ts index 9ffeb31f..474e0d5e 100644 --- a/src/constants/notifications.ts +++ b/src/constants/notifications.ts @@ -1191,17 +1191,6 @@ export const NOTIFY_GIFTED_DETAILS_NO_IDENTIFIER = { message: "You must select an identifier before you can record a give.", }; -export const NOTIFY_GIFTED_DETAILS_PROJECT_PROVIDER_INFO = { - title: "Project Provider Info", - message: - "To select a project as a provider, you must open this page through a project.", -}; - -export const NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED = { - title: "Invalid Selection", - message: "You cannot select both a giving project and person.", -}; - export const NOTIFY_GIFTED_DETAILS_RECORDING_GIVE = { title: "", message: "Recording the give...", diff --git a/src/views/GiftedDetailsView.vue b/src/views/GiftedDetailsView.vue index a9501b53..ede96ef8 100644 --- a/src/views/GiftedDetailsView.vue +++ b/src/views/GiftedDetailsView.vue @@ -296,8 +296,6 @@ import { NOTIFY_GIFTED_DETAILS_DELETE_IMAGE_CONFIRM, NOTIFY_GIFTED_DETAILS_DELETE_IMAGE_ERROR, NOTIFY_GIFTED_DETAILS_NO_IDENTIFIER, - NOTIFY_GIFTED_DETAILS_PROJECT_PROVIDER_INFO, - NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED, NOTIFY_GIFTED_DETAILS_RECORDING_GIVE, NOTIFY_GIFTED_DETAILS_CREATE_GIVE_ERROR, NOTIFY_GIFTED_DETAILS_GIFT_RECORDED, @@ -635,29 +633,32 @@ export default class GiftedDetails extends Vue { } notifyUserOfGiver() { + // there's no individual giver or there's a provider project if (!this.giverDid) { this.notify.warning( - NOTIFY_GIFTED_DETAILS_NO_IDENTIFIER.message, + "To assign a giver, you must choose a person in a previous step.", TIMEOUTS.SHORT, ); } else { + // must be because providedByProject is true this.notify.warning( - NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED.message, + "You cannot assign both a giver and a project.", TIMEOUTS.SHORT, ); } } notifyUserOfRecipient() { + // there's no individual recipient or there's a fulfills project if (!this.recipientDid) { this.notify.warning( - NOTIFY_GIFTED_DETAILS_NO_IDENTIFIER.message, + "To assign a recipient, you must choose a person in a previous step.", TIMEOUTS.SHORT, ); } else { // must be because givenToProject is true this.notify.warning( - NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED.message, + "You cannot assign both to a recipient and to a project.", TIMEOUTS.SHORT, ); } @@ -667,13 +668,13 @@ export default class GiftedDetails extends Vue { // we're here because they clicked and either there is no provider project or there is a giver chosen if (!this.providerProjectId) { this.notify.warning( - NOTIFY_GIFTED_DETAILS_PROJECT_PROVIDER_INFO.message, + "To select a project as a provider, you must choose a project in a previous step.", TIMEOUTS.SHORT, ); } else { - // no providing project was chosen + // no providing project was chosen, so there must be an individual giver this.notify.warning( - NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED.message, + "You cannot select both a giving project and person.", TIMEOUTS.SHORT, ); } @@ -683,13 +684,13 @@ export default class GiftedDetails extends Vue { // we're here because they clicked and either there is no fulfills project or there is a recipient chosen if (!this.fulfillsProjectId) { this.notify.warning( - NOTIFY_GIFTED_DETAILS_PROJECT_PROVIDER_INFO.message, + "To assign a project as a recipient, you must choose a project in a previous step.", TIMEOUTS.SHORT, ); } else { - // no fulfills project was chosen + // no fulfills project was chosen, so there must be an individual recipient this.notify.warning( - NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED.message, + "You cannot select both a receiving project and person.", TIMEOUTS.SHORT, ); }