Compare commits

...

2 Commits

  1. 11
      src/constants/notifications.ts
  2. 2
      src/db/tables/settings.ts
  3. 11
      src/services/AbsurdSqlDatabaseService.ts
  4. 7
      src/views/ClaimView.vue
  5. 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.", 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 = { export const NOTIFY_GIFTED_DETAILS_RECORDING_GIVE = {
title: "", title: "",
message: "Recording the give...", message: "Recording the give...",

2
src/db/tables/settings.ts

@ -10,6 +10,8 @@ export type BoundingBox = {
/** /**
* Settings type encompasses user-specific configuration details. * Settings type encompasses user-specific configuration details.
*
* New entries that are boolean should also be added to PlatformServiceMixin._mapColumnsToValues
*/ */
export type Settings = { export type Settings = {
// default entry is keyed with MASTER_SETTINGS_KEY; other entries are linked to an account with account ID // default entry is keyed with MASTER_SETTINGS_KEY; other entries are linked to an account with account ID

11
src/services/AbsurdSqlDatabaseService.ts

@ -182,14 +182,6 @@ class AbsurdSqlDatabaseService implements DatabaseService {
} }
operation.resolve(result); operation.resolve(result);
} catch (error) { } catch (error) {
// logger.error( // DISABLED
// "Error while processing SQL queue:",
// error,
// " ... for sql:",
// operation.sql,
// " ... with params:",
// operation.params,
// );
logger.error( logger.error(
"Error while processing SQL queue:", "Error while processing SQL queue:",
error, error,
@ -242,9 +234,6 @@ class AbsurdSqlDatabaseService implements DatabaseService {
// If initialized but no db, something went wrong // If initialized but no db, something went wrong
if (!this.db) { if (!this.db) {
// logger.error( // DISABLED
// `Database not properly initialized after await waitForInitialization() - initialized flag is true but db is null`,
// );
logger.error( logger.error(
`Database not properly initialized after await waitForInitialization() - initialized flag is true but db is null`, `Database not properly initialized after await waitForInitialization() - initialized flag is true but db is null`,
); );

7
src/views/ClaimView.vue

@ -1055,13 +1055,8 @@ export default class ClaimView extends Vue {
if (this.projectInfo) { if (this.projectInfo) {
// Recipient is a project // Recipient is a project
recipient = { recipient = {
did:
this.detailsForGive?.fulfillsPlanHandleId ||
this.detailsForOffer?.fulfillsPlanHandleId,
name: this.projectInfo.name, name: this.projectInfo.name,
handleId: handleId: this.detailsForOffer?.fulfillsPlanHandleId,
this.detailsForGive?.fulfillsPlanHandleId ||
this.detailsForOffer?.fulfillsPlanHandleId,
image: this.projectInfo.imageUrl, image: this.projectInfo.imageUrl,
}; };
} else { } else {

25
src/views/GiftedDetailsView.vue

@ -296,8 +296,6 @@ import {
NOTIFY_GIFTED_DETAILS_DELETE_IMAGE_CONFIRM, NOTIFY_GIFTED_DETAILS_DELETE_IMAGE_CONFIRM,
NOTIFY_GIFTED_DETAILS_DELETE_IMAGE_ERROR, NOTIFY_GIFTED_DETAILS_DELETE_IMAGE_ERROR,
NOTIFY_GIFTED_DETAILS_NO_IDENTIFIER, 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_RECORDING_GIVE,
NOTIFY_GIFTED_DETAILS_CREATE_GIVE_ERROR, NOTIFY_GIFTED_DETAILS_CREATE_GIVE_ERROR,
NOTIFY_GIFTED_DETAILS_GIFT_RECORDED, NOTIFY_GIFTED_DETAILS_GIFT_RECORDED,
@ -635,29 +633,32 @@ export default class GiftedDetails extends Vue {
} }
notifyUserOfGiver() { notifyUserOfGiver() {
// there's no individual giver or there's a provider project
if (!this.giverDid) { if (!this.giverDid) {
this.notify.warning( this.notify.warning(
NOTIFY_GIFTED_DETAILS_NO_IDENTIFIER.message, "To assign a giver, you must choose a person in a previous step.",
TIMEOUTS.SHORT, TIMEOUTS.SHORT,
); );
} else { } else {
// must be because providedByProject is true
this.notify.warning( this.notify.warning(
NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED.message, "You cannot assign both a giver and a project.",
TIMEOUTS.SHORT, TIMEOUTS.SHORT,
); );
} }
} }
notifyUserOfRecipient() { notifyUserOfRecipient() {
// there's no individual recipient or there's a fulfills project
if (!this.recipientDid) { if (!this.recipientDid) {
this.notify.warning( this.notify.warning(
NOTIFY_GIFTED_DETAILS_NO_IDENTIFIER.message, "To assign a recipient, you must choose a person in a previous step.",
TIMEOUTS.SHORT, TIMEOUTS.SHORT,
); );
} else { } else {
// must be because givenToProject is true // must be because givenToProject is true
this.notify.warning( this.notify.warning(
NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED.message, "You cannot assign both to a recipient and to a project.",
TIMEOUTS.SHORT, 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 // we're here because they clicked and either there is no provider project or there is a giver chosen
if (!this.providerProjectId) { if (!this.providerProjectId) {
this.notify.warning( 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, TIMEOUTS.SHORT,
); );
} else { } else {
// no providing project was chosen // no providing project was chosen, so there must be an individual giver
this.notify.warning( this.notify.warning(
NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED.message, "You cannot select both a giving project and person.",
TIMEOUTS.SHORT, 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 // we're here because they clicked and either there is no fulfills project or there is a recipient chosen
if (!this.fulfillsProjectId) { if (!this.fulfillsProjectId) {
this.notify.warning( 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, TIMEOUTS.SHORT,
); );
} else { } else {
// no fulfills project was chosen // no fulfills project was chosen, so there must be an individual recipient
this.notify.warning( this.notify.warning(
NOTIFY_GIFTED_DETAILS_BOTH_PROVIDER_SELECTED.message, "You cannot select both a receiving project and person.",
TIMEOUTS.SHORT, TIMEOUTS.SHORT,
); );
} }

Loading…
Cancel
Save