@velocitycareerlabs/velocity-registrar-app 1.25.0-dev-build.1ffdaffeb → 1.25.0-dev-build.110ca5f47
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": "@velocitycareerlabs/velocity-registrar-app",
|
|
3
|
-
"version": "1.25.0-dev-build.
|
|
3
|
+
"version": "1.25.0-dev-build.110ca5f47",
|
|
4
4
|
"description": "Velocity Registrar",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"not ie <= 11",
|
|
60
60
|
"not op_mini all"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "4878c250303401eb32824ffe14cb44801bb3e3c1"
|
|
63
63
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { useGetOne } from 'react-admin';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import { useSelectedOrganization } from '@velocitycareerlabs/components-organizations-registrar';
|
|
5
4
|
import { Popup } from '@velocitycareerlabs/components-organizations-registrar/components/common';
|
|
@@ -7,7 +6,7 @@ import { Loading } from '@velocitycareerlabs/components-organizations-registrar/
|
|
|
7
6
|
|
|
8
7
|
import { SecureMessageURL } from '../SecureMessageUrl/index.jsx';
|
|
9
8
|
import { SecureTransfer } from '../SecureTransfer/index.jsx';
|
|
10
|
-
import {
|
|
9
|
+
import { useSecureSkip } from '../../hooks/useSecureSkip';
|
|
11
10
|
|
|
12
11
|
export const SecureIntegrationPopup = ({
|
|
13
12
|
isInterceptOnCreateOpen,
|
|
@@ -19,25 +18,18 @@ export const SecureIntegrationPopup = ({
|
|
|
19
18
|
}) => {
|
|
20
19
|
const [did] = useSelectedOrganization();
|
|
21
20
|
|
|
22
|
-
const {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
enabled: !!selectedCAO && isIssueOrInspection,
|
|
29
|
-
},
|
|
30
|
-
);
|
|
21
|
+
const { isLoading } = useSecureSkip({
|
|
22
|
+
isInterceptOnCreateOpen,
|
|
23
|
+
isIssueOrInspection,
|
|
24
|
+
selectedCAO,
|
|
25
|
+
onClose,
|
|
26
|
+
});
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
}, [secureMessageTransfer, onClose]);
|
|
28
|
+
if (isInterceptOnCreateOpen && isIssueOrInspection && isLoading) {
|
|
29
|
+
return <Loading sx={styles.loading} />;
|
|
30
|
+
}
|
|
37
31
|
|
|
38
|
-
return
|
|
39
|
-
<Loading sx={styles.loading} />
|
|
40
|
-
) : (
|
|
32
|
+
return (
|
|
41
33
|
<Popup
|
|
42
34
|
onClose={() => {}}
|
|
43
35
|
title=""
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useGetOne } from 'react-admin';
|
|
3
|
+
import { dataResources } from '../../../utils/remoteDataProvider';
|
|
4
|
+
|
|
5
|
+
export const useSecureSkip = ({
|
|
6
|
+
isInterceptOnCreateOpen,
|
|
7
|
+
isIssueOrInspection,
|
|
8
|
+
selectedCAO,
|
|
9
|
+
onClose,
|
|
10
|
+
}) => {
|
|
11
|
+
const { data, isLoading } = useGetOne(
|
|
12
|
+
dataResources.SECURE_MESSAGE_SUPPORTED,
|
|
13
|
+
{ id: selectedCAO },
|
|
14
|
+
{ enabled: !!selectedCAO && isIssueOrInspection },
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (isInterceptOnCreateOpen && data?.supported === false) {
|
|
19
|
+
onClose();
|
|
20
|
+
}
|
|
21
|
+
}, [isInterceptOnCreateOpen, data?.supported, onClose]);
|
|
22
|
+
|
|
23
|
+
return { isLoading };
|
|
24
|
+
};
|