@thecb/components 5.8.1-beta.3 → 5.8.1-beta.6
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 +24 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +24 -13
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/obligation/Obligation.js +22 -9
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +3 -1
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +4 -2
package/package.json
CHANGED
|
@@ -30,8 +30,16 @@ const Obligation = ({
|
|
|
30
30
|
inactiveLookupInput = "Account",
|
|
31
31
|
inactiveLookupValue = ""
|
|
32
32
|
}) => {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
/*
|
|
34
|
+
The value of obligations is always an array. It can contain:
|
|
35
|
+
- A single obligation
|
|
36
|
+
- A group of obligations (a "collection")
|
|
37
|
+
|
|
38
|
+
The top level desc/subdesc for all obligations in a collection is the same
|
|
39
|
+
(Collection accounts look different in the Account Details page)
|
|
40
|
+
*/
|
|
41
|
+
const firstObligation = obligations[0];
|
|
42
|
+
const customAttributes = firstObligation?.customAttributes ?? {};
|
|
35
43
|
const boxShadowValue =
|
|
36
44
|
"0px 4px 4px rgba(41, 42, 51, 0.1), 0px 1px 1px 2px rgba(41, 42, 51, 0.1);";
|
|
37
45
|
const activeObligation = (
|
|
@@ -40,11 +48,16 @@ const Obligation = ({
|
|
|
40
48
|
borderRadius="4px"
|
|
41
49
|
boxShadow={boxShadowValue}
|
|
42
50
|
as="section"
|
|
43
|
-
aria-label={`${
|
|
51
|
+
aria-label={`${firstObligation?.description ??
|
|
52
|
+
"account"} ${firstObligation?.subDescription ?? obligationAssocID}`}
|
|
44
53
|
>
|
|
45
|
-
<Box background={WHITE}>
|
|
54
|
+
<Box background={WHITE} padding="24px 16px">
|
|
46
55
|
<Stack childGap="14px">
|
|
47
|
-
<Box
|
|
56
|
+
<Box
|
|
57
|
+
key={`${firstObligation?.id}-top`}
|
|
58
|
+
padding="0 8px"
|
|
59
|
+
minWidth="100%"
|
|
60
|
+
>
|
|
48
61
|
<Cluster
|
|
49
62
|
justify="space-between"
|
|
50
63
|
align="center"
|
|
@@ -63,8 +76,8 @@ const Obligation = ({
|
|
|
63
76
|
/>
|
|
64
77
|
)}
|
|
65
78
|
<TitleModule
|
|
66
|
-
title={
|
|
67
|
-
subtitle={
|
|
79
|
+
title={firstObligation?.description}
|
|
80
|
+
subtitle={firstObligation?.subDescription}
|
|
68
81
|
titleColor={BRIGHT_GREY}
|
|
69
82
|
isMobile={isMobile}
|
|
70
83
|
/>
|
|
@@ -72,7 +85,7 @@ const Obligation = ({
|
|
|
72
85
|
</Box>
|
|
73
86
|
{!isMobile && (
|
|
74
87
|
<AmountModule
|
|
75
|
-
totalAmountDue={obligations
|
|
88
|
+
totalAmountDue={obligations?.reduce(
|
|
76
89
|
(acc, curr) => acc + curr.amountDue,
|
|
77
90
|
0
|
|
78
91
|
)}
|
|
@@ -137,7 +150,7 @@ const Obligation = ({
|
|
|
137
150
|
>
|
|
138
151
|
<Box background={ATHENS_GREY}>
|
|
139
152
|
<Stack childGap="14px">
|
|
140
|
-
<Box key={`${
|
|
153
|
+
<Box key={`${obligationAssocID}-top`} padding="0 8px" minWidth="100%">
|
|
141
154
|
<Cluster
|
|
142
155
|
justify="space-between"
|
|
143
156
|
align="center"
|
|
@@ -25,7 +25,7 @@ const InactiveControlsModule = ({
|
|
|
25
25
|
border={isMobile ? `1px solid ${GHOST_GREY}` : `0px`}
|
|
26
26
|
borderWidthOverride={isMobile ? `1px 0 0 0` : `0px`}
|
|
27
27
|
>
|
|
28
|
-
<Cluster childGap={isMobile ? `8px` : `
|
|
28
|
+
<Cluster childGap={isMobile ? `8px` : `16px`} nowrap>
|
|
29
29
|
{autoPayEnabled && (
|
|
30
30
|
<Box padding="0" extraStyles={`flex-grow: 1;`}>
|
|
31
31
|
<AutopayModalModule
|
|
@@ -50,7 +50,9 @@ const InactiveControlsModule = ({
|
|
|
50
50
|
text="Remove"
|
|
51
51
|
action={handleRemoveAccount}
|
|
52
52
|
dataQa="Remove Account"
|
|
53
|
-
extraStyles={
|
|
53
|
+
extraStyles={
|
|
54
|
+
isMobile ? `flex-grow: 1; width: 100%;` : `margin: 0px;`
|
|
55
|
+
}
|
|
54
56
|
/>
|
|
55
57
|
</Box>
|
|
56
58
|
</Cluster>
|