Browse Source

fix: Fix messaging on the info-circles by givers & receivers in gifting details.

get-get-hash
Trent Larson 1 week ago
parent
commit
1f1739f00c
  1. 11
      src/constants/notifications.ts
  2. 25
      src/views/GiftedDetailsView.vue

11
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...",

25
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,
);
}

Loading…
Cancel
Save