Merge pull request #52 from kjannette/stripedKit

Striped kit
This commit is contained in:
S Jannette
2024-01-27 17:59:14 -06:00
committed by GitHub

View File

@@ -40,7 +40,7 @@ const SignupPage = () => {
const [showPaymentModal, setShowPaymentModal] = useState(false); const [showPaymentModal, setShowPaymentModal] = useState(false);
const [showSelectPlan, setShowSelectPlan] = useState(false); const [showSelectPlan, setShowSelectPlan] = useState(false);
const [activeRadioOption, setActiveRadioOption] = useState("partner"); const [activeRadioOption, setActiveRadioOption] = useState("partner");
const [selectedPlan, setSelectedPlan] = useState({}); const [selectedPlan, setSelectedPlan] = useState([{}]);
const [isAnnual, setIsAnnual] = useState(false); const [isAnnual, setIsAnnual] = useState(false);
// Could also go in App.js if needed in the future // Could also go in App.js if needed in the future
const stripe = new Stripe(stripeApiKey); const stripe = new Stripe(stripeApiKey);
@@ -49,7 +49,9 @@ const SignupPage = () => {
? process.env.REACT_APP_API_DEV ? process.env.REACT_APP_API_DEV
: process.env.REACT_APP_API_PROD; : process.env.REACT_APP_API_PROD;
const [showAddAccount, setShowAddAccount] = useState(false); const [showAddAccount, setShowAddAccount] = useState(false);
const [numberOfAccountsToAdd, setNumberOfAccountsToAdd] = useState();
const modalText = "MAYBE PUT TOTAL HERE"; const modalText = "MAYBE PUT TOTAL HERE";
const selectValues = [1, 2, 3, 4, 5, 6, 7, 8];
const handleChangeInput = (e, name) => { const handleChangeInput = (e, name) => {
const newData = handleFormDataChange(e, name, data, signupFields); const newData = handleFormDataChange(e, name, data, signupFields);
@@ -58,6 +60,12 @@ const SignupPage = () => {
} }
}; };
const handleChangeAccountSelect = (e, name) => {
console.log("e, name", e, name);
const num = e.target.value;
setNumberOfAccountsToAdd(num);
};
const handleChangePaymentInput = (e, name) => { const handleChangePaymentInput = (e, name) => {
const newPaymentData = handleFormDataChange( const newPaymentData = handleFormDataChange(
e, e,
@@ -196,6 +204,8 @@ const SignupPage = () => {
//add accounts, close sectin //add accounts, close sectin
setShowAddAccount(!showAddAccount); setShowAddAccount(!showAddAccount);
}; };
//STRIPE AUTH **********************************************************************
async function handleStripeAuthorization( async function handleStripeAuthorization(
user, user,
paymentDataValues, paymentDataValues,
@@ -450,6 +460,33 @@ const SignupPage = () => {
account username(s) and access will be setup later account username(s) and access will be setup later
</p> </p>
</div> </div>
<div>
{" "}
<select
id="accountNo"
className={`form-select`}
value={numberOfAccountsToAdd}
name={"addAccountsSelect"}
onChange={(e) =>
handleChangeAccountSelect(e, "addAccountsSelect")
}
>
<option
id="ddlProducts"
className={`select-option`}
value=""
></option>
{selectValues.map((item, i) => (
<option
id="ddlProducts"
className={`select-option`}
key={`item${i}`}
>
{item}
</option>
))}
</select>
</div>
<div className="details-button-box"> <div className="details-button-box">
<Button <Button
className="secondary-button back-button" className="secondary-button back-button"