datastake-daf 0.6.722 → 0.6.723
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/components/index.js +12 -6
- package/dist/hooks/index.js +19 -4658
- package/package.json +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewAccount/index.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminScreens/Accounts.jsx +18 -13
- package/build/favicon.ico +0 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +0 -25
- package/build/robots.txt +0 -3
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export default function NewAccount({
|
|
|
17
17
|
const isEdit = useMemo(() => isOpen && typeof isOpen === "object", [isOpen]);
|
|
18
18
|
|
|
19
19
|
useEffect(() => {
|
|
20
|
-
if (isOpen && typeof
|
|
20
|
+
if (isOpen && typeof isOpen === "object") {
|
|
21
21
|
MainForm.setFieldsValue({
|
|
22
22
|
name: isOpen.name,
|
|
23
23
|
email: isOpen?.admin?.email,
|
|
@@ -25,7 +25,7 @@ export default function NewAccount({
|
|
|
25
25
|
} else {
|
|
26
26
|
MainForm.resetFields();
|
|
27
27
|
}
|
|
28
|
-
}, [isOpen]);
|
|
28
|
+
}, [isOpen, MainForm]);
|
|
29
29
|
|
|
30
30
|
const onSubmit = () => {
|
|
31
31
|
MainForm.validateFields()
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useState } from "react";
|
|
2
2
|
import { message } from "antd";
|
|
3
3
|
import AccountTable from "../AdminTables/AccountTable/index.jsx";
|
|
4
|
+
import DefaultNewAccountModal from "../AdminModals/NewAccount/index.jsx";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Admin Accounts Screen Wrapper
|
|
@@ -33,9 +34,12 @@ export default function AdminAccountsScreen({ config }) {
|
|
|
33
34
|
AdminService,
|
|
34
35
|
options,
|
|
35
36
|
useQuery,
|
|
36
|
-
NewAccountModal,
|
|
37
|
+
NewAccountModal, // If not provided, use DAF's default
|
|
37
38
|
} = config;
|
|
38
39
|
|
|
40
|
+
// Use provided modal or fallback to DAF's default
|
|
41
|
+
const AccountModal = NewAccountModal || DefaultNewAccountModal;
|
|
42
|
+
|
|
39
43
|
const query = useQuery ? useQuery() : { get: () => null };
|
|
40
44
|
const [addAccountVisible, setAddAccountVisible] = useState(!!query.get("create"));
|
|
41
45
|
|
|
@@ -92,18 +96,19 @@ export default function AdminAccountsScreen({ config }) {
|
|
|
92
96
|
setAddAccountVisible,
|
|
93
97
|
},
|
|
94
98
|
}}
|
|
95
|
-
|
|
99
|
+
/>
|
|
96
100
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
)}
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
<AccountModal
|
|
102
|
+
t={t}
|
|
103
|
+
isOpen={addAccountVisible}
|
|
104
|
+
onClose={() => setAddAccountVisible(false)}
|
|
105
|
+
accountTypes={accountTypes}
|
|
106
|
+
fetchData={() => {
|
|
107
|
+
// Refresh table data - handled by AccountTable internally
|
|
108
|
+
}}
|
|
109
|
+
inviteAccount={(data) => AdminService.inviteAccount(data)}
|
|
110
|
+
/>
|
|
111
|
+
</>
|
|
112
|
+
);
|
|
108
113
|
}
|
|
109
114
|
|
package/build/favicon.ico
DELETED
|
Binary file
|
package/build/logo192.png
DELETED
|
Binary file
|
package/build/logo512.png
DELETED
|
Binary file
|
package/build/manifest.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
package/build/robots.txt
DELETED