-
Notifications
You must be signed in to change notification settings - Fork 0
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
Scrum 14 donate popup for specific hospitals #56
Conversation
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 |
There was a problem hiding this 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"; | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this 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.
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"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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;
There was a problem hiding this 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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor typo
…-for-love into SCRUM-14-donate-popup-for-specific-hospitals
…//github.com/digitalaidseattle/games-for-love into SCRUM-14-donate-popup-for-specific-hospitals
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?
What type of PR is this? (check all applicable)
Related Tickets & Documents
https://digitalaidseattle-gfl-team.atlassian.net/browse/SCRUM-14?atlOrigin=eyJpIjoiNmNhOWQzODE2M2FlNDgzOWExYTU1ZDg4M2E2MDE4NDYiLCJwIjoiaiJ9