Updates to Sentry & removal of Stripe.
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||
import { CardElement } from "@stripe/react-stripe-js";
|
||||
import { Checkbox, Form, Input, Radio, Select } from "antd";
|
||||
import { Form, Input, Radio, Select } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import Alert from "../alert/alert.component";
|
||||
import DatePickerFormItem from "../form-date-picker/form-date-picker.component";
|
||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||
import JobSearchSelect from "../job-search-select/job-search-select.component";
|
||||
@@ -19,11 +17,9 @@ const mapStateToProps = createStructuredSelector({
|
||||
|
||||
export function PaymentFormComponent({
|
||||
form,
|
||||
stripeStateArr,
|
||||
bodyshop,
|
||||
disabled,
|
||||
}) {
|
||||
const [stripeState, setStripeState] = stripeStateArr;
|
||||
const { Qb_Multi_Ar } = useTreatments(
|
||||
["Qb_Multi_Ar"],
|
||||
{},
|
||||
@@ -31,9 +27,6 @@ export function PaymentFormComponent({
|
||||
);
|
||||
|
||||
const { t } = useTranslation();
|
||||
const handleStripeChange = (e) => {
|
||||
setStripeState({ error: e.error, cardComplete: e.complete });
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -150,57 +143,6 @@ export function PaymentFormComponent({
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow grow>
|
||||
<div>
|
||||
<Form.Item
|
||||
label={t("payments.labels.electronicpayment")}
|
||||
name="useStripe"
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Checkbox
|
||||
defaultChecked={!!bodyshop.stripe_acct_id}
|
||||
disabled={!!!bodyshop.stripe_acct_id || disabled}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
{!bodyshop.stripe_acct_id ? (
|
||||
<div style={{ fontStyle: "italic" }}>
|
||||
{t("payments.labels.signup")}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<Form.Item shouldUpdate>
|
||||
{() => {
|
||||
if (form.getFieldValue("useStripe"))
|
||||
return (
|
||||
<CardElement
|
||||
options={{
|
||||
style: {
|
||||
base: {
|
||||
color: "#32325d",
|
||||
//fontFamily: '"Helvetica Neue", Helvetica, sans-serif',
|
||||
fontSmoothing: "antialiased",
|
||||
//fontSize: "16px",
|
||||
"::placeholder": {
|
||||
color: "#aab7c4",
|
||||
},
|
||||
},
|
||||
invalid: {
|
||||
color: "#fa755a",
|
||||
iconColor: "#fa755a",
|
||||
},
|
||||
},
|
||||
}}
|
||||
onChange={handleStripeChange}
|
||||
/>
|
||||
);
|
||||
|
||||
return null;
|
||||
}}
|
||||
</Form.Item>
|
||||
{stripeState.error ? (
|
||||
<Alert type="error" message={stripeState.error.message} />
|
||||
) : null}
|
||||
</div>
|
||||
<Form.Item
|
||||
label={t("general.labels.sendby")}
|
||||
name="sendby"
|
||||
|
||||
Reference in New Issue
Block a user