@thecb/components 11.1.6 → 11.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "11.1.6",
3
+ "version": "11.1.7",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -45,7 +45,8 @@ const Obligation = ({
45
45
  cartConfig = undefined,
46
46
  multiCartParams = undefined,
47
47
  isInCart = false,
48
- isLoading = false
48
+ isLoading = false,
49
+ showRemoveButton = true
49
50
  }) => {
50
51
  /*
51
52
  The value of obligations is always an array. It can contain:
@@ -345,6 +346,7 @@ const Obligation = ({
345
346
  subDescription={subDescription}
346
347
  allowedPaymentInstruments={allowedPaymentInstruments}
347
348
  disableActions={isInCustomerManagement}
349
+ showRemoveButton={showRemoveButton}
348
350
  />
349
351
  )}
350
352
  </Cluster>
@@ -368,6 +370,7 @@ const Obligation = ({
368
370
  subDescription={subDescription}
369
371
  allowedPaymentInstruments={allowedPaymentInstruments}
370
372
  disableActions={isInCustomerManagement}
373
+ showRemoveButton={showRemoveButton}
371
374
  />
372
375
  )}
373
376
  </Stack>
@@ -420,7 +420,8 @@ export const InactiveObligation = {
420
420
  inactive: true,
421
421
  inactiveLookupInput: undefined,
422
422
  inactiveLookupTitle: "Health Service System",
423
- inactiveLookupValue: "012856"
423
+ inactiveLookupValue: "012856",
424
+ showRemoveButton: true
424
425
  },
425
426
  render: args => (
426
427
  <Box minWidth="800px">
@@ -22,7 +22,8 @@ const InactiveControlsModule = ({
22
22
  description,
23
23
  subDescription,
24
24
  allowedPaymentInstruments,
25
- disableActions = false
25
+ disableActions = false,
26
+ showRemoveButton = true
26
27
  }) => {
27
28
  const [modalOpen, toggleModal] = useState(false);
28
29
  const { deleteObligationAssoc } = actions;
@@ -63,15 +64,17 @@ const InactiveControlsModule = ({
63
64
  />
64
65
  </Box>
65
66
  )}
66
- <Box padding="0" extraStyles={`flex-grow: 1;`}>
67
- <RemoveAccountModalModule
68
- agencyName={agencyName}
69
- removeAccount={disableActions ? noop : handleRemoveAccount}
70
- accountType={configType === "ACCOUNT" ? "Account" : "Property"}
71
- isMobile={isMobile}
72
- disableActions={disableActions}
73
- />
74
- </Box>
67
+ {showRemoveButton && (
68
+ <Box padding="0" extraStyles={`flex-grow: 1;`}>
69
+ <RemoveAccountModalModule
70
+ agencyName={agencyName}
71
+ removeAccount={disableActions ? noop : handleRemoveAccount}
72
+ accountType={configType === "ACCOUNT" ? "Account" : "Property"}
73
+ isMobile={isMobile}
74
+ disableActions={disableActions}
75
+ />
76
+ </Box>
77
+ )}
75
78
  </Cluster>
76
79
  </Box>
77
80
  );
Binary file