Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrum 14 donate popup for specific hospitals #56

Merged
merged 5 commits into from
Feb 15, 2025

Conversation

MayHyeyeonKim
Copy link
Contributor

Description

Do we need to create a Fundraise Up element for each hospital and store it in the hospital db?
For now, I just created one for testing. (XLGBZUGV)

If so, which db will it be stored in?

Screenshot 2025-02-07 at 2 39 56 AM

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Related Tickets & Documents

https://digitalaidseattle-gfl-team.atlassian.net/browse/SCRUM-14?atlOrigin=eyJpIjoiNmNhOWQzODE2M2FlNDgzOWExYTU1ZDg4M2E2MDE4NDYiLCJwIjoiaiJ9

Copy link

github-actions bot commented Feb 7, 2025

Visit the preview URL for this PR (updated for commit 5933496):

https://games-for-love--pr56-scrum-14-donate-popu-j91ue3ub.web.app

(expires Sat, 22 Feb 2025 17:01:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: d33cf1bface287495d851937842ee0ddad597fe6

Copy link
Collaborator

@jnakaso jnakaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to support two widgets, one for overall and one for hospitals?

The hospital widget will not allow monthly support, the overall donation will.


const FUNDRAISEUP_SELECTED_HOSPITAL_CAMPAIGN_CODE =
import.meta.env.VITE_FUNDRAISEUP_CAMPAIGN_CODE || "#XLGBZUGV";

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad practice to hard code dev data

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to support two widgets, one for overall and one for hospitals?
The hospital widget will not allow monthly support, the overall donation will.

Yes, we need to support two separate donation widgets: one for overall donations and one for hospital-specific donations.

  • The overall donation widget should allow both one-time and monthly donations.
  • The hospital-specific widget should only allow one-time donations.
    This separation ensures that donors can still set up recurring donations for general support while keeping hospital campaigns aligned with their specific requirements.

The hospital-specific donations will likely require customization to remove monthly support. I'll look into it. 🔍

and I will update the env settings. 🫡

src/App.tsx Outdated
import "./App.css";

const FUNDRAISEUP_WIDGET_URL = "https://cdn.fundraiseup.com/widget/AWALQQAB";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use a environment variable here.

It will also be likely that the hospital widget will be different from the overall widget.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! For now, it's set up as a single widget, but I'll look into it further. If we need to use two widgets, I'll split them like this:

const FUNDRAISEUP_OVERALL_WIDGET_URL = import.meta.env.VITE_FUNDRAISEUP_OVERALL_WIDGET_URL;
const FUNDRAISEUP_HOSPITAL_WIDGET_URL = import.meta.env.VITE_FUNDRAISEUP_HOSPITAL_WIDGET_URL;

Copy link
Collaborator

@jnakaso jnakaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add multi hospital support later

index.html Outdated
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo-dark.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Game For Love | Digital Aid Seattle</title>
<script
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we need this

VITE_FUNDRAISEUP_HOSPITAL_WIDGET_URL=https://cdn.fundraiseup.com/widget/AWALQQAB

VITE_FUNDRAISEUP_CAMPAIGN_CODE="#XWQCRFLJ"
VITE_FUNDRAISEUP_SELECTED_HOSPITAL_CAMPAIGN_CODE="#XLGBZUGV"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub scripts for deployment requires an empty final line.

or we can update the workflow scripts :-)


if (!FUNDRAISEUP_SELECTED_HOSPITAL_CAMPAIGN_CODE) {
throw new Error(
"FUNDRAISEUP_SELECTED_HOSPITAL_CAMPAIGN_CODEE is not set. Application cannot start."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor typo

@jnakaso jnakaso merged commit a2810c2 into sprint-6 Feb 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants