@truedat/dd 7.8.5 → 7.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "7.8.5",
3
+ "version": "7.8.6",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "module": "src/index.js",
@@ -48,7 +48,7 @@
48
48
  "@testing-library/jest-dom": "^6.6.3",
49
49
  "@testing-library/react": "^16.3.0",
50
50
  "@testing-library/user-event": "^14.6.1",
51
- "@truedat/test": "7.8.5",
51
+ "@truedat/test": "7.8.6",
52
52
  "identity-obj-proxy": "^3.0.0",
53
53
  "jest": "^29.7.0",
54
54
  "redux-saga-test-plan": "^4.0.6"
@@ -83,5 +83,5 @@
83
83
  "svg-pan-zoom": "^3.6.2",
84
84
  "swr": "^2.3.3"
85
85
  },
86
- "gitHead": "54905b29b5250d45eed5e3578b0276f1c67d6f69"
86
+ "gitHead": "8dbca36fe9ab1cb4e8455c6a9d122fe289759b72"
87
87
  }
@@ -8,12 +8,14 @@ import { useIntl, FormattedMessage } from "react-intl";
8
8
  import { checkoutGrantRequest } from "../routines";
9
9
  import StructureGrantCart from "./StructureGrantCart";
10
10
  import StructureGrantCartInformation from "./StructureGrantCartInformation";
11
+ import { useState } from "react";
11
12
 
12
13
  export const StructureGrantCartCheckout = ({
13
14
  grantRequestsCart,
14
15
  checkoutGrantRequest,
15
16
  }) => {
16
17
  const { formatMessage } = useIntl();
18
+ const [isRequesting, setIsRequesting] = useState(false);
17
19
 
18
20
  const { template, templateContent, modificationGrant, validCart, user } =
19
21
  grantRequestsCart;
@@ -37,6 +39,7 @@ export const StructureGrantCartCheckout = ({
37
39
  created_by_id: user?.id,
38
40
  }),
39
41
  };
42
+ setIsRequesting(true);
40
43
  checkoutGrantRequest(payload);
41
44
  };
42
45
 
@@ -62,7 +65,7 @@ export const StructureGrantCartCheckout = ({
62
65
  <Button
63
66
  primary
64
67
  onClick={checkout}
65
- disabled={!validCart || !user.valid}
68
+ disabled={!validCart || !user.valid || isRequesting}
66
69
  content={formatMessage({ id: "actions.save" })}
67
70
  />
68
71
  </GridColumn>