datastake-daf 0.6.376 → 0.6.378
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 +39 -18
- package/dist/style/datastake/mapbox-gl.css +330 -0
- package/package.json +1 -1
- package/src/@daf/core/components/Screens/Admin/AdminModals/AddUser/index.jsx +4 -2
- package/src/@daf/core/components/Screens/Admin/AdminModals/NewUser/index.jsx +22 -5
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Edit/index.jsx +14 -1
- package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/index.jsx +2 -0
package/dist/components/index.js
CHANGED
|
@@ -54050,6 +54050,7 @@ function AddUserModal({
|
|
|
54050
54050
|
setAccountUsed(true);
|
|
54051
54051
|
}).catch(() => {});
|
|
54052
54052
|
};
|
|
54053
|
+
console.log("hellooooooooooooooooooooooooo");
|
|
54053
54054
|
return /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
54054
54055
|
open: isOpen,
|
|
54055
54056
|
title: "admin::edit-user",
|
|
@@ -54093,13 +54094,6 @@ function AddUserModal({
|
|
|
54093
54094
|
}
|
|
54094
54095
|
}
|
|
54095
54096
|
})
|
|
54096
|
-
}), accountUsed && /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
|
|
54097
|
-
message: t("FB00001"),
|
|
54098
|
-
type: "error",
|
|
54099
|
-
className: "mb-2",
|
|
54100
|
-
showIcon: true,
|
|
54101
|
-
closable: true,
|
|
54102
|
-
onClose: () => setAccountUsed(false)
|
|
54103
54097
|
}), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
54104
54098
|
name: "role",
|
|
54105
54099
|
label: t("Role"),
|
|
@@ -56910,7 +56904,8 @@ function NewUser({
|
|
|
56910
56904
|
isOpen,
|
|
56911
56905
|
onClose,
|
|
56912
56906
|
defaultData,
|
|
56913
|
-
userRoles = []
|
|
56907
|
+
userRoles = [],
|
|
56908
|
+
addUser = () => {}
|
|
56914
56909
|
}) {
|
|
56915
56910
|
const [MainForm] = antd.Form.useForm();
|
|
56916
56911
|
const [accountUsed, setAccountUsed] = React.useState(false);
|
|
@@ -56924,8 +56919,25 @@ function NewUser({
|
|
|
56924
56919
|
}, [defaultData]);
|
|
56925
56920
|
const onSubmit = () => {
|
|
56926
56921
|
MainForm.validateFields().then(val => {
|
|
56927
|
-
|
|
56928
|
-
|
|
56922
|
+
// Create user object with the form data
|
|
56923
|
+
const userData = {
|
|
56924
|
+
firstName: val.firstName,
|
|
56925
|
+
lastName: val.lastName,
|
|
56926
|
+
email: val.email,
|
|
56927
|
+
apps: {
|
|
56928
|
+
sbg: {
|
|
56929
|
+
role: val.role,
|
|
56930
|
+
access: true
|
|
56931
|
+
}
|
|
56932
|
+
}
|
|
56933
|
+
};
|
|
56934
|
+
|
|
56935
|
+
// Add user to local state
|
|
56936
|
+
addUser(userData);
|
|
56937
|
+
|
|
56938
|
+
// Close modal and reset form
|
|
56939
|
+
onClose();
|
|
56940
|
+
MainForm.resetFields();
|
|
56929
56941
|
}).catch(() => {});
|
|
56930
56942
|
};
|
|
56931
56943
|
return /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
@@ -56971,13 +56983,6 @@ function NewUser({
|
|
|
56971
56983
|
}
|
|
56972
56984
|
}
|
|
56973
56985
|
})
|
|
56974
|
-
}), accountUsed && /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
|
|
56975
|
-
message: t("FB00001"),
|
|
56976
|
-
type: "error",
|
|
56977
|
-
className: "mb-2",
|
|
56978
|
-
showIcon: true,
|
|
56979
|
-
closable: true,
|
|
56980
|
-
onClose: () => setAccountUsed(false)
|
|
56981
56986
|
}), /*#__PURE__*/jsxRuntime.jsx(antd.Form.Item, {
|
|
56982
56987
|
name: "role",
|
|
56983
56988
|
label: t("Role"),
|
|
@@ -57248,6 +57253,7 @@ function Users({
|
|
|
57248
57253
|
accountStatuses,
|
|
57249
57254
|
deleteUser = () => {},
|
|
57250
57255
|
updateUser = () => {},
|
|
57256
|
+
addUser = () => {},
|
|
57251
57257
|
transferAdmin = () => {}
|
|
57252
57258
|
}) {
|
|
57253
57259
|
const [hasError, setHasError] = React.useState(false);
|
|
@@ -57370,7 +57376,8 @@ function Users({
|
|
|
57370
57376
|
t: t,
|
|
57371
57377
|
isOpen: newUserModalVisible,
|
|
57372
57378
|
onClose: () => setNewUserModalVisible(false),
|
|
57373
|
-
userRoles: userRoles
|
|
57379
|
+
userRoles: userRoles,
|
|
57380
|
+
addUser: addUser
|
|
57374
57381
|
})]
|
|
57375
57382
|
});
|
|
57376
57383
|
}
|
|
@@ -57606,6 +57613,18 @@ function Edit({
|
|
|
57606
57613
|
})
|
|
57607
57614
|
}));
|
|
57608
57615
|
}, []);
|
|
57616
|
+
const addUser = React.useCallback(userData => {
|
|
57617
|
+
setIsChanged(true);
|
|
57618
|
+
setData(prev => ({
|
|
57619
|
+
...prev,
|
|
57620
|
+
users: [...(prev.users || []), {
|
|
57621
|
+
...userData,
|
|
57622
|
+
id: Date.now(),
|
|
57623
|
+
// Temporary ID
|
|
57624
|
+
status: "unsaved"
|
|
57625
|
+
}]
|
|
57626
|
+
}));
|
|
57627
|
+
}, []);
|
|
57609
57628
|
const onSuspend = () => {
|
|
57610
57629
|
antd.Modal.confirm({
|
|
57611
57630
|
title: t("sbg-admin::suspend-title"),
|
|
@@ -57652,6 +57671,7 @@ function Edit({
|
|
|
57652
57671
|
onCancel: () => {}
|
|
57653
57672
|
});
|
|
57654
57673
|
};
|
|
57674
|
+
console.log("good morning");
|
|
57655
57675
|
const renderItem = item => {
|
|
57656
57676
|
if (item.type === "users") {
|
|
57657
57677
|
return /*#__PURE__*/jsxRuntime.jsx(Users, {
|
|
@@ -57663,6 +57683,7 @@ function Edit({
|
|
|
57663
57683
|
userRoles: userRoles,
|
|
57664
57684
|
deleteUser: deleteUser,
|
|
57665
57685
|
updateUser: updateUser,
|
|
57686
|
+
addUser: addUser,
|
|
57666
57687
|
goTo: goTo,
|
|
57667
57688
|
accountStatuses: accountStatuses,
|
|
57668
57689
|
transferAdmin: transferAdmin
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
/* Isolated Mapbox GL CSS - Scoped to prevent Leaflet conflicts */
|
|
2
|
+
|
|
3
|
+
/* Mapbox GL Core Styles - Scoped with .mapbox-gl-scope */
|
|
4
|
+
.mapbox-gl-scope .mapboxgl-map {
|
|
5
|
+
font: 12px/20px Helvetica Neue, Arial, Helvetica, sans-serif;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
position: relative;
|
|
8
|
+
-webkit-tap-highlight-color: rgb(0 0 0/0);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mapbox-gl-scope .mapboxgl-canvas {
|
|
12
|
+
left: 0;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mapbox-gl-scope .mapboxgl-map:-webkit-full-screen {
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mapbox-gl-scope .mapboxgl-canary {
|
|
23
|
+
background-color: salmon;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive,
|
|
27
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button.mapboxgl-ctrl-compass {
|
|
28
|
+
cursor: grab;
|
|
29
|
+
-webkit-user-select: none;
|
|
30
|
+
user-select: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive:active,
|
|
38
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active {
|
|
39
|
+
cursor: grabbing;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,
|
|
43
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas {
|
|
44
|
+
touch-action: pan-x pan-y;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-drag-pan,
|
|
48
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas {
|
|
49
|
+
touch-action: pinch-zoom;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,
|
|
53
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas {
|
|
54
|
+
touch-action: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Control positioning */
|
|
58
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom,
|
|
59
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left,
|
|
60
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right,
|
|
61
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left,
|
|
62
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right,
|
|
63
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top,
|
|
64
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left,
|
|
65
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right {
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
position: absolute;
|
|
68
|
+
z-index: 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left {
|
|
72
|
+
left: 0;
|
|
73
|
+
top: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top {
|
|
77
|
+
left: 50%;
|
|
78
|
+
top: 0;
|
|
79
|
+
transform: translateX(-50%);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right {
|
|
83
|
+
right: 0;
|
|
84
|
+
top: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right {
|
|
88
|
+
right: 0;
|
|
89
|
+
top: 50%;
|
|
90
|
+
transform: translateY(-50%);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right {
|
|
94
|
+
bottom: 0;
|
|
95
|
+
right: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom {
|
|
99
|
+
bottom: 0;
|
|
100
|
+
left: 50%;
|
|
101
|
+
transform: translateX(-50%);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left {
|
|
105
|
+
bottom: 0;
|
|
106
|
+
left: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left {
|
|
110
|
+
left: 0;
|
|
111
|
+
top: 50%;
|
|
112
|
+
transform: translateY(-50%);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.mapbox-gl-scope .mapboxgl-ctrl {
|
|
116
|
+
clear: both;
|
|
117
|
+
pointer-events: auto;
|
|
118
|
+
transform: translate(0);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left .mapboxgl-ctrl {
|
|
122
|
+
float: left;
|
|
123
|
+
margin: 10px 0 0 10px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top .mapboxgl-ctrl {
|
|
127
|
+
float: left;
|
|
128
|
+
margin: 10px 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right .mapboxgl-ctrl {
|
|
132
|
+
float: right;
|
|
133
|
+
margin: 10px 10px 0 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl,
|
|
137
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right .mapboxgl-ctrl {
|
|
138
|
+
float: right;
|
|
139
|
+
margin: 0 10px 10px 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom .mapboxgl-ctrl {
|
|
143
|
+
float: left;
|
|
144
|
+
margin: 10px 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl,
|
|
148
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left .mapboxgl-ctrl {
|
|
149
|
+
float: left;
|
|
150
|
+
margin: 0 0 10px 10px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Control group styling */
|
|
154
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group {
|
|
155
|
+
background: #fff;
|
|
156
|
+
border-radius: 4px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group:not(:empty) {
|
|
160
|
+
box-shadow: 0 0 0 2px #0000001a;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button {
|
|
164
|
+
background-color: initial;
|
|
165
|
+
border: 0;
|
|
166
|
+
box-sizing: border-box;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
display: block;
|
|
169
|
+
height: 29px;
|
|
170
|
+
outline: none;
|
|
171
|
+
overflow: hidden;
|
|
172
|
+
padding: 0;
|
|
173
|
+
width: 29px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button+button {
|
|
177
|
+
border-top: 1px solid #ddd;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.mapbox-gl-scope .mapboxgl-ctrl button .mapboxgl-ctrl-icon {
|
|
181
|
+
background-position: 50%;
|
|
182
|
+
background-repeat: no-repeat;
|
|
183
|
+
display: block;
|
|
184
|
+
height: 100%;
|
|
185
|
+
width: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attrib-button:focus,
|
|
189
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:focus {
|
|
190
|
+
box-shadow: 0 0 2px 2px #0096ff;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:disabled {
|
|
194
|
+
cursor: not-allowed;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon {
|
|
198
|
+
opacity: .25;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:first-child {
|
|
202
|
+
border-radius: 4px 4px 0 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:last-child {
|
|
206
|
+
border-radius: 0 0 4px 4px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:only-child {
|
|
210
|
+
border-radius: inherit;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:not(:disabled):hover {
|
|
214
|
+
background-color: #0000000d;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Marker styles */
|
|
218
|
+
.mapbox-gl-scope .mapboxgl-marker {
|
|
219
|
+
position: absolute;
|
|
220
|
+
z-index: 1;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.mapbox-gl-scope .mapboxgl-marker svg {
|
|
224
|
+
display: block;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Popup styles */
|
|
228
|
+
.mapbox-gl-scope .mapboxgl-popup {
|
|
229
|
+
position: absolute;
|
|
230
|
+
text-align: center;
|
|
231
|
+
margin-bottom: 20px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.mapbox-gl-scope .mapboxgl-popup-content-wrapper {
|
|
235
|
+
padding: 1px;
|
|
236
|
+
text-align: left;
|
|
237
|
+
border-radius: 12px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.mapbox-gl-scope .mapboxgl-popup-content {
|
|
241
|
+
margin: 13px 24px 13px 20px;
|
|
242
|
+
line-height: 1.3;
|
|
243
|
+
font-size: 13px;
|
|
244
|
+
min-height: 1px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.mapbox-gl-scope .mapboxgl-popup-content p {
|
|
248
|
+
margin: 17px 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.mapbox-gl-scope .mapboxgl-popup-tip-container {
|
|
252
|
+
width: 40px;
|
|
253
|
+
height: 20px;
|
|
254
|
+
position: absolute;
|
|
255
|
+
left: 50%;
|
|
256
|
+
margin-top: -1px;
|
|
257
|
+
margin-left: -20px;
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
pointer-events: none;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.mapbox-gl-scope .mapboxgl-popup-tip {
|
|
263
|
+
width: 17px;
|
|
264
|
+
height: 17px;
|
|
265
|
+
padding: 1px;
|
|
266
|
+
margin: -10px auto 0;
|
|
267
|
+
pointer-events: auto;
|
|
268
|
+
-webkit-transform: rotate(45deg);
|
|
269
|
+
-moz-transform: rotate(45deg);
|
|
270
|
+
-ms-transform: rotate(45deg);
|
|
271
|
+
transform: rotate(45deg);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.mapbox-gl-scope .mapboxgl-popup-content-wrapper,
|
|
275
|
+
.mapbox-gl-scope .mapboxgl-popup-tip {
|
|
276
|
+
background: white;
|
|
277
|
+
color: #333;
|
|
278
|
+
box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button {
|
|
282
|
+
position: absolute;
|
|
283
|
+
top: 0;
|
|
284
|
+
right: 0;
|
|
285
|
+
border: none;
|
|
286
|
+
text-align: center;
|
|
287
|
+
width: 24px;
|
|
288
|
+
height: 24px;
|
|
289
|
+
font: 16px/24px Tahoma, Verdana, sans-serif;
|
|
290
|
+
color: #757575;
|
|
291
|
+
text-decoration: none;
|
|
292
|
+
background: transparent;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button:hover,
|
|
296
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button:focus {
|
|
297
|
+
color: #585858;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* Attribution */
|
|
301
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution {
|
|
302
|
+
background: #fff;
|
|
303
|
+
background: rgba(255, 255, 255, 0.8);
|
|
304
|
+
margin: 0;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution,
|
|
308
|
+
.mapbox-gl-scope .mapboxgl-ctrl-scale-line {
|
|
309
|
+
padding: 0 5px;
|
|
310
|
+
color: #333;
|
|
311
|
+
line-height: 1.4;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a {
|
|
315
|
+
text-decoration: none;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a:hover,
|
|
319
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a:focus {
|
|
320
|
+
text-decoration: underline;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* Hide attribution by default */
|
|
324
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution {
|
|
325
|
+
display: none !important;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.mapbox-gl-scope .mapboxgl-ctrl-logo {
|
|
329
|
+
display: none !important;
|
|
330
|
+
}
|
package/package.json
CHANGED
|
@@ -24,6 +24,8 @@ export default function AddUserModal({ isOpen, defaultData = {}, userRoles = [],
|
|
|
24
24
|
.catch(() => {});
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
console.log("hellooooooooooooooooooooooooo");
|
|
28
|
+
|
|
27
29
|
return (
|
|
28
30
|
<Modal
|
|
29
31
|
open={isOpen}
|
|
@@ -55,7 +57,7 @@ export default function AddUserModal({ isOpen, defaultData = {}, userRoles = [],
|
|
|
55
57
|
}}
|
|
56
58
|
/>
|
|
57
59
|
</Form.Item>
|
|
58
|
-
{accountUsed && (
|
|
60
|
+
{/* {accountUsed && (
|
|
59
61
|
<Alert
|
|
60
62
|
message={t("FB00001")}
|
|
61
63
|
type="error"
|
|
@@ -64,7 +66,7 @@ export default function AddUserModal({ isOpen, defaultData = {}, userRoles = [],
|
|
|
64
66
|
closable
|
|
65
67
|
onClose={() => setAccountUsed(false)}
|
|
66
68
|
/>
|
|
67
|
-
)}
|
|
69
|
+
)} */}
|
|
68
70
|
|
|
69
71
|
<Form.Item name="role" label={t("Role")} rules={[{ required: true }]}>
|
|
70
72
|
<Select
|
|
@@ -2,7 +2,7 @@ import Modal from "../../../../Modal/index.jsx";
|
|
|
2
2
|
import { Form, Select, Alert, Input } from "antd";
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
4
|
|
|
5
|
-
export default function NewUser({ t, isOpen, onClose, defaultData, userRoles = [] }) {
|
|
5
|
+
export default function NewUser({ t, isOpen, onClose, defaultData, userRoles = [], addUser = () => {} }) {
|
|
6
6
|
const [MainForm] = Form.useForm();
|
|
7
7
|
const [accountUsed, setAccountUsed] = useState(false);
|
|
8
8
|
|
|
@@ -18,8 +18,25 @@ export default function NewUser({ t, isOpen, onClose, defaultData, userRoles = [
|
|
|
18
18
|
const onSubmit = () => {
|
|
19
19
|
MainForm.validateFields()
|
|
20
20
|
.then((val) => {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
// Create user object with the form data
|
|
22
|
+
const userData = {
|
|
23
|
+
firstName: val.firstName,
|
|
24
|
+
lastName: val.lastName,
|
|
25
|
+
email: val.email,
|
|
26
|
+
apps: {
|
|
27
|
+
sbg: {
|
|
28
|
+
role: val.role,
|
|
29
|
+
access: true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Add user to local state
|
|
35
|
+
addUser(userData);
|
|
36
|
+
|
|
37
|
+
// Close modal and reset form
|
|
38
|
+
onClose();
|
|
39
|
+
MainForm.resetFields();
|
|
23
40
|
})
|
|
24
41
|
.catch(() => {});
|
|
25
42
|
};
|
|
@@ -45,7 +62,7 @@ export default function NewUser({ t, isOpen, onClose, defaultData, userRoles = [
|
|
|
45
62
|
}}
|
|
46
63
|
/>
|
|
47
64
|
</Form.Item>
|
|
48
|
-
{accountUsed && (
|
|
65
|
+
{/* {accountUsed && (
|
|
49
66
|
<Alert
|
|
50
67
|
message={t("FB00001")}
|
|
51
68
|
type="error"
|
|
@@ -54,7 +71,7 @@ export default function NewUser({ t, isOpen, onClose, defaultData, userRoles = [
|
|
|
54
71
|
closable
|
|
55
72
|
onClose={() => setAccountUsed(false)}
|
|
56
73
|
/>
|
|
57
|
-
)}
|
|
74
|
+
)} */}
|
|
58
75
|
|
|
59
76
|
<Form.Item name="role" label={t("Role")} rules={[{ required: true }]}>
|
|
60
77
|
<Select
|
|
@@ -58,6 +58,18 @@ export default function Edit({
|
|
|
58
58
|
}));
|
|
59
59
|
}, []);
|
|
60
60
|
|
|
61
|
+
const addUser = useCallback((userData) => {
|
|
62
|
+
setIsChanged(true);
|
|
63
|
+
setData((prev) => ({
|
|
64
|
+
...prev,
|
|
65
|
+
users: [...(prev.users || []), {
|
|
66
|
+
...userData,
|
|
67
|
+
id: Date.now(), // Temporary ID
|
|
68
|
+
status: "unsaved"
|
|
69
|
+
}]
|
|
70
|
+
}));
|
|
71
|
+
}, []);
|
|
72
|
+
|
|
61
73
|
const onSuspend = () => {
|
|
62
74
|
Modal.confirm({
|
|
63
75
|
title: t("sbg-admin::suspend-title"),
|
|
@@ -105,7 +117,7 @@ export default function Edit({
|
|
|
105
117
|
onCancel: () => {},
|
|
106
118
|
});
|
|
107
119
|
};
|
|
108
|
-
|
|
120
|
+
console.log("good morning");
|
|
109
121
|
const renderItem = (item) => {
|
|
110
122
|
if (item.type === "users") {
|
|
111
123
|
return (
|
|
@@ -118,6 +130,7 @@ export default function Edit({
|
|
|
118
130
|
userRoles={userRoles}
|
|
119
131
|
deleteUser={deleteUser}
|
|
120
132
|
updateUser={updateUser}
|
|
133
|
+
addUser={addUser}
|
|
121
134
|
goTo={goTo}
|
|
122
135
|
accountStatuses={accountStatuses}
|
|
123
136
|
transferAdmin={transferAdmin}
|
|
@@ -29,6 +29,7 @@ export default function Users({
|
|
|
29
29
|
accountStatuses,
|
|
30
30
|
deleteUser = () => {},
|
|
31
31
|
updateUser = () => {},
|
|
32
|
+
addUser = () => {},
|
|
32
33
|
transferAdmin = () => {},
|
|
33
34
|
}) {
|
|
34
35
|
const [hasError, setHasError] = useState(false);
|
|
@@ -177,6 +178,7 @@ export default function Users({
|
|
|
177
178
|
isOpen={newUserModalVisible}
|
|
178
179
|
onClose={() => setNewUserModalVisible(false)}
|
|
179
180
|
userRoles={userRoles}
|
|
181
|
+
addUser={addUser}
|
|
180
182
|
/>
|
|
181
183
|
</div>
|
|
182
184
|
);
|