@thecb/components 3.5.3 → 3.5.5
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
CHANGED
|
@@ -36121,7 +36121,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36121
36121
|
|
|
36122
36122
|
var obligationSlug = config.obligationSlug;
|
|
36123
36123
|
var createPaymentFromProfile = actions.createPaymentFromProfile,
|
|
36124
|
-
setDetailedObligation = actions.setDetailedObligation
|
|
36124
|
+
setDetailedObligation = actions.setDetailedObligation,
|
|
36125
|
+
navigateToDetailedObligation = actions.navigateToDetailedObligation;
|
|
36125
36126
|
var detailsSlug = config.type === "ACCOUNT" ? "/profile/accounts/details/".concat(obligationSlug) : "/profile/properties/details/".concat(obligationSlug);
|
|
36126
36127
|
|
|
36127
36128
|
var handleClick = function handleClick(obligations) {
|
|
@@ -36130,7 +36131,8 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36130
36131
|
};
|
|
36131
36132
|
|
|
36132
36133
|
var handleDetailsClick = function handleDetailsClick() {
|
|
36133
|
-
setDetailedObligation(obligations, config
|
|
36134
|
+
setDetailedObligation(obligations, config);
|
|
36135
|
+
navigateToDetailedObligation(detailsSlug);
|
|
36134
36136
|
};
|
|
36135
36137
|
|
|
36136
36138
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -36194,7 +36196,10 @@ var PaymentDetailsActions = function PaymentDetailsActions(_ref) {
|
|
|
36194
36196
|
}, autoPayAvailable && !autoPayEnabled ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
36195
36197
|
variant: "tertiary",
|
|
36196
36198
|
text: "Set Up Autopay",
|
|
36197
|
-
action:
|
|
36199
|
+
action: function action() {
|
|
36200
|
+
setDetailedObligation(obligations, config);
|
|
36201
|
+
handleAutopayAction();
|
|
36202
|
+
},
|
|
36198
36203
|
dataQa: "Set Up Autopay",
|
|
36199
36204
|
extraStyles: isMobile && "flex-grow: 1; width: 100%;"
|
|
36200
36205
|
}) : /*#__PURE__*/React__default.createElement(AutopayModalModule, {
|
|
@@ -36411,7 +36416,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
36411
36416
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
36412
36417
|
isMobile = _useContext.isMobile;
|
|
36413
36418
|
|
|
36414
|
-
var backButton = !!cancelURL ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
36419
|
+
var backButton = !!cancelURL && !!cancelText ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
36415
36420
|
text: cancelText,
|
|
36416
36421
|
url: cancelURL,
|
|
36417
36422
|
variant: "secondary",
|
package/package.json
CHANGED
|
@@ -20,7 +20,11 @@ const PaymentDetailsActions = ({
|
|
|
20
20
|
const [isLoading, setIsLoading] = useState(false);
|
|
21
21
|
const [modalOpen, toggleModal] = useState(false);
|
|
22
22
|
const { obligationSlug } = config;
|
|
23
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
createPaymentFromProfile,
|
|
25
|
+
setDetailedObligation,
|
|
26
|
+
navigateToDetailedObligation
|
|
27
|
+
} = actions;
|
|
24
28
|
const detailsSlug =
|
|
25
29
|
config.type === "ACCOUNT"
|
|
26
30
|
? `/profile/accounts/details/${obligationSlug}`
|
|
@@ -30,7 +34,8 @@ const PaymentDetailsActions = ({
|
|
|
30
34
|
createPaymentFromProfile(obligations, config);
|
|
31
35
|
};
|
|
32
36
|
const handleDetailsClick = () => {
|
|
33
|
-
setDetailedObligation(obligations, config
|
|
37
|
+
setDetailedObligation(obligations, config);
|
|
38
|
+
navigateToDetailedObligation(detailsSlug);
|
|
34
39
|
};
|
|
35
40
|
return (
|
|
36
41
|
<Box
|
|
@@ -105,7 +110,10 @@ const PaymentDetailsActions = ({
|
|
|
105
110
|
<ButtonWithAction
|
|
106
111
|
variant="tertiary"
|
|
107
112
|
text="Set Up Autopay"
|
|
108
|
-
action={
|
|
113
|
+
action={() => {
|
|
114
|
+
setDetailedObligation(obligations, config);
|
|
115
|
+
handleAutopayAction();
|
|
116
|
+
}}
|
|
109
117
|
dataQa="Set Up Autopay"
|
|
110
118
|
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
111
119
|
/>
|
|
@@ -18,25 +18,26 @@ const PaymentButtonBar = ({
|
|
|
18
18
|
}) => {
|
|
19
19
|
const { isMobile } = useContext(ThemeContext);
|
|
20
20
|
|
|
21
|
-
const backButton =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
extraStyles={isMobile && "flex-grow: 1"}
|
|
27
|
-
dataQa={cancelText}
|
|
28
|
-
/>
|
|
29
|
-
) : (
|
|
30
|
-
backButtonAction && (
|
|
31
|
-
<ButtonWithAction
|
|
32
|
-
text="Back"
|
|
21
|
+
const backButton =
|
|
22
|
+
!!cancelURL && !!cancelText ? (
|
|
23
|
+
<ButtonWithLink
|
|
24
|
+
text={cancelText}
|
|
25
|
+
url={cancelURL}
|
|
33
26
|
variant="secondary"
|
|
34
|
-
action={backButtonAction}
|
|
35
27
|
extraStyles={isMobile && "flex-grow: 1"}
|
|
36
|
-
dataQa=
|
|
28
|
+
dataQa={cancelText}
|
|
37
29
|
/>
|
|
38
|
-
)
|
|
39
|
-
|
|
30
|
+
) : (
|
|
31
|
+
backButtonAction && (
|
|
32
|
+
<ButtonWithAction
|
|
33
|
+
text="Back"
|
|
34
|
+
variant="secondary"
|
|
35
|
+
action={backButtonAction}
|
|
36
|
+
extraStyles={isMobile && "flex-grow: 1"}
|
|
37
|
+
dataQa="Back"
|
|
38
|
+
/>
|
|
39
|
+
)
|
|
40
|
+
);
|
|
40
41
|
|
|
41
42
|
const forwardButton = !!redirectURL ? (
|
|
42
43
|
<ButtonWithLink
|