@thecb/components 11.1.10-beta.0 → 11.1.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -7
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/molecules/obligation/Obligation.js +1 -3
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +25 -9
package/package.json
CHANGED
|
Binary file
|
|
@@ -20,7 +20,7 @@ import { fallbackValues } from "./Obligation.theme";
|
|
|
20
20
|
|
|
21
21
|
const Obligation = ({
|
|
22
22
|
config,
|
|
23
|
-
obligations
|
|
23
|
+
obligations,
|
|
24
24
|
actions,
|
|
25
25
|
autoPayEnabled,
|
|
26
26
|
autoPayAvailable,
|
|
@@ -121,7 +121,6 @@ const Obligation = ({
|
|
|
121
121
|
{!isMobile && (
|
|
122
122
|
<PaymentDetailsActions
|
|
123
123
|
obligations={obligations}
|
|
124
|
-
obligationAssocID={obligationAssocID}
|
|
125
124
|
autoPayEnabled={autoPayEnabled}
|
|
126
125
|
autoPayAvailable={autoPayAvailable}
|
|
127
126
|
handleAutopayAction={handleAutopayAction}
|
|
@@ -147,7 +146,6 @@ const Obligation = ({
|
|
|
147
146
|
{isMobile && (
|
|
148
147
|
<PaymentDetailsActions
|
|
149
148
|
obligations={obligations}
|
|
150
|
-
obligationAssocID={obligationAssocID}
|
|
151
149
|
autoPayEnabled={autoPayEnabled}
|
|
152
150
|
autoPayAvailable={autoPayAvailable}
|
|
153
151
|
handleAutopayAction={handleAutopayAction}
|
|
@@ -8,6 +8,7 @@ import { SEA_GREEN } from "../../../../constants/colors";
|
|
|
8
8
|
import { ACH_METHOD, CC_METHOD } from "../../../../constants/general";
|
|
9
9
|
import { titleCaseString, noop } from "../../../../util/general";
|
|
10
10
|
import { FONT_WEIGHT_REGULAR } from "../../../../constants/style_constants";
|
|
11
|
+
import Paragraph from "../../../atoms/paragraph/index";
|
|
11
12
|
|
|
12
13
|
const AutopayModalModule = ({
|
|
13
14
|
autoPayActive,
|
|
@@ -32,8 +33,8 @@ const AutopayModalModule = ({
|
|
|
32
33
|
onKeyPress
|
|
33
34
|
}) => {
|
|
34
35
|
const generateMethodNeededText = (planText, allowedPaymentInstruments) => {
|
|
35
|
-
const allowsCard = allowedPaymentInstruments
|
|
36
|
-
const allowsACH = allowedPaymentInstruments
|
|
36
|
+
const allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
|
|
37
|
+
const allowsACH = allowedPaymentInstruments.includes(ACH_METHOD);
|
|
37
38
|
const methodRequired =
|
|
38
39
|
allowsCard && !allowsACH
|
|
39
40
|
? "debit or credit card payment method"
|
|
@@ -54,13 +55,28 @@ const AutopayModalModule = ({
|
|
|
54
55
|
const nextDate = dueDate || nextAutopayDate;
|
|
55
56
|
const modalExtraProps = {
|
|
56
57
|
modalHeaderText: autoPayActive ? deactivateText : activateText,
|
|
57
|
-
modalBodyText: autoPayActive
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
modalBodyText: autoPayActive ? (
|
|
59
|
+
<>
|
|
60
|
+
<Paragraph>
|
|
61
|
+
Are you sure you want to stop {plan}?
|
|
62
|
+
{!inactive && nextDate && nextDate !== "On"
|
|
63
|
+
? " Your next payment will be due on " + nextDate + "."
|
|
64
|
+
: ""}
|
|
65
|
+
</Paragraph>
|
|
66
|
+
{!isPaymentPlan && (
|
|
67
|
+
<>
|
|
68
|
+
<br />
|
|
69
|
+
<Paragraph>
|
|
70
|
+
If your next autopayment is scheduled to run today, you may be
|
|
71
|
+
billed today and autopay will then stop for the next billing
|
|
72
|
+
cycle.
|
|
73
|
+
</Paragraph>
|
|
74
|
+
</>
|
|
75
|
+
)}
|
|
76
|
+
</>
|
|
77
|
+
) : (
|
|
78
|
+
generateMethodNeededText(plan, allowedPaymentInstruments)
|
|
79
|
+
),
|
|
64
80
|
continueButtonText: autoPayActive ? `Stop ${shortPlan}` : "Add",
|
|
65
81
|
useDangerButton: autoPayActive,
|
|
66
82
|
continueAction: autoPayActive
|