ui-soxo-bootstrap-core 2.6.1-dev.3 → 2.6.1-dev.31
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/core/components/extra-info/extra-info-details.js +2 -2
- package/core/components/index.js +2 -11
- package/core/components/landing-api/landing-api.js +216 -18
- package/core/components/landing-api/landing-api.scss +22 -0
- package/core/components/license-management/license-alert.js +97 -0
- package/core/lib/Store.js +8 -4
- package/core/lib/components/global-header/global-header.js +217 -242
- package/core/lib/components/index.js +2 -2
- package/core/lib/components/sidemenu/sidemenu.js +19 -13
- package/core/lib/components/sidemenu/sidemenu.scss +1 -1
- package/core/lib/elements/basic/country-phone-input/country-phone-input.js +14 -9
- package/core/lib/elements/basic/dragabble-wrapper/draggable-wrapper.js +1 -1
- package/core/lib/elements/basic/menu-tree/menu-tree.js +26 -13
- package/core/lib/models/forms/components/form-creator/form-creator.js +525 -468
- package/core/lib/models/forms/components/form-creator/form-creator.scss +30 -26
- package/core/lib/models/menus/components/menu-list/menu-list.js +424 -467
- package/core/lib/models/process/components/process-dashboard/process-dashboard.js +469 -3
- package/core/lib/models/process/components/process-dashboard/process-dashboard.scss +4 -0
- package/core/lib/modules/generic/generic-list/ExportReactCSV.js +28 -2
- package/core/lib/pages/change-password/change-password.js +17 -24
- package/core/lib/pages/change-password/change-password.scss +45 -48
- package/core/lib/pages/login/commnication-mode-selection.js +2 -2
- package/core/lib/pages/login/login.js +53 -64
- package/core/lib/pages/login/login.scss +9 -0
- package/core/lib/pages/login/reset-password.js +17 -17
- package/core/lib/pages/login/reset-password.scss +10 -1
- package/core/lib/pages/profile/themes.json +4 -4
- package/core/lib/utils/api/api.utils.js +53 -45
- package/core/lib/utils/common/common.utils.js +49 -35
- package/core/lib/utils/generic/generic.utils.js +2 -1
- package/core/lib/utils/http/http.utils.js +33 -4
- package/core/lib/utils/index.js +4 -1
- package/core/models/base/base.js +7 -3
- package/core/models/core-scripts/core-scripts.js +147 -126
- package/core/models/doctor/components/doctor-add/doctor-add.js +9 -4
- package/core/models/menus/components/menu-add/menu-add.js +1 -1
- package/core/models/menus/components/menu-lists/menu-lists.js +53 -54
- package/core/models/menus/menus.js +49 -2
- package/core/models/roles/components/role-add/role-add.js +92 -59
- package/core/models/roles/components/role-list/role-list.js +1 -1
- package/core/models/staff/components/staff-add/staff-add.js +20 -32
- package/core/models/users/components/assign-role/assign-role.js +145 -50
- package/core/models/users/components/assign-role/assign-role.scss +209 -45
- package/core/models/users/components/assign-role/avatar-props.js +45 -0
- package/core/models/users/components/user-add/user-add.js +46 -55
- package/core/models/users/components/user-add/user-edit.js +25 -4
- package/core/models/users/users.js +9 -1
- package/core/modules/dashboard/components/dashboard-card/menu-dashboard-card.js +1 -1
- package/core/modules/reporting/components/reporting-dashboard/README.md +316 -0
- package/core/modules/reporting/components/reporting-dashboard/adavance-search/advance-search.js +174 -0
- package/core/modules/reporting/components/reporting-dashboard/adavance-search/advance-search.scss +76 -0
- package/core/modules/reporting/components/reporting-dashboard/display-columns/build-display-columns.js +90 -0
- package/core/modules/reporting/components/reporting-dashboard/display-columns/build-display-columns.test.js +74 -0
- package/core/modules/reporting/components/reporting-dashboard/display-columns/display-cell-renderer.js +448 -0
- package/core/modules/reporting/components/reporting-dashboard/display-columns/display-cell-renderer.test.js +199 -0
- package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +195 -822
- package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.scss +43 -0
- package/core/modules/reporting/components/reporting-dashboard/reporting-table.js +517 -0
- package/core/modules/steps/action-buttons.js +30 -16
- package/core/modules/steps/action-buttons.scss +55 -9
- package/core/modules/steps/chat-assistant.js +141 -0
- package/core/modules/steps/openai-realtime.js +275 -0
- package/core/modules/steps/readme.md +167 -0
- package/core/modules/steps/steps.js +1286 -60
- package/core/modules/steps/steps.scss +703 -86
- package/core/modules/steps/timeline.js +21 -19
- package/core/modules/steps/voice-navigation.js +709 -0
- package/package.json +2 -1
|
@@ -3,62 +3,48 @@
|
|
|
3
3
|
* Global header component
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import React, { useState, useEffect, useContext,useRef } from
|
|
6
|
+
import React, { useState, useEffect, useContext, useRef } from 'react';
|
|
7
7
|
|
|
8
|
-
import { animationControls, motion, useAnimation } from
|
|
8
|
+
import { animationControls, motion, useAnimation } from 'framer-motion';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
boxVariants,
|
|
12
|
-
} from "./animations"
|
|
10
|
+
import { boxVariants } from './animations';
|
|
13
11
|
|
|
14
|
-
import { GlobalContext } from "./../../Store";
|
|
12
|
+
import { GlobalContext, GlobalProvider } from "./../../Store";
|
|
15
13
|
|
|
16
|
-
import { Link, useLocation } from
|
|
14
|
+
import { Link, useLocation } from 'react-router-dom';
|
|
17
15
|
|
|
18
|
-
import { Typography, Avatar ,
|
|
16
|
+
import { Typography, Avatar, Input, Tooltip } from "antd";
|
|
19
17
|
|
|
18
|
+
import ProgressBar from '../progress-bar/progress-bar'; // Adjust the path as needed
|
|
20
19
|
|
|
20
|
+
import { Button } from '../../elements';
|
|
21
21
|
|
|
22
|
-
import
|
|
22
|
+
import GenericHeader from '../header/generic-header';
|
|
23
23
|
|
|
24
|
-
import {
|
|
24
|
+
import { MenuOutlined, UserOutlined, SettingOutlined, QuestionOutlined } from '@ant-design/icons';
|
|
25
25
|
|
|
26
|
+
import { Drawer } from 'antd';
|
|
26
27
|
|
|
28
|
+
import { ReloadOutlined, SearchOutlined } from '@ant-design/icons';
|
|
27
29
|
|
|
28
|
-
import
|
|
30
|
+
import SideMenu from './../sidemenu/sidemenu';
|
|
29
31
|
|
|
30
|
-
import
|
|
31
|
-
MenuOutlined,
|
|
32
|
-
UserOutlined,
|
|
33
|
-
SettingOutlined,
|
|
34
|
-
} from "@ant-design/icons";
|
|
32
|
+
import './global-header.scss';
|
|
35
33
|
|
|
36
|
-
import
|
|
34
|
+
import LanguageSwitcher from '../language-switcher/language-switcher';
|
|
37
35
|
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
import SideMenu from "./../sidemenu/sidemenu";
|
|
41
|
-
|
|
42
|
-
import "./global-header.scss";
|
|
43
|
-
|
|
44
|
-
import LanguageSwitcher from "../language-switcher/language-switcher";
|
|
45
|
-
|
|
46
|
-
import { useTranslation } from "react-i18next";
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
import BorderStyle from "pdf-lib/cjs/core/annotation/BorderStyle";
|
|
50
|
-
|
|
51
|
-
import SettingsUtil from "../../../utils/settings.utils";
|
|
52
|
-
import { SpotlightSearch } from "..";
|
|
36
|
+
import { useTranslation } from 'react-i18next';
|
|
53
37
|
|
|
38
|
+
import BorderStyle from 'pdf-lib/cjs/core/annotation/BorderStyle';
|
|
54
39
|
|
|
40
|
+
import SettingsUtil from '../../../utils/settings.utils';
|
|
41
|
+
import SpotlightSearch from '../spotlight-search/spotlight-search.component';
|
|
42
|
+
import { LicenseAlert } from '../../../components';
|
|
55
43
|
|
|
56
44
|
const { Title } = Typography;
|
|
57
45
|
|
|
58
46
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
export default function GlobalHeader({
|
|
47
|
+
function GlobalHeaderContent({
|
|
62
48
|
loading,
|
|
63
49
|
appSettings,
|
|
64
50
|
children,
|
|
@@ -67,30 +53,27 @@ export default function GlobalHeader({
|
|
|
67
53
|
modules = [],
|
|
68
54
|
sidemenu = [],
|
|
69
55
|
reload,
|
|
56
|
+
licAlert,
|
|
57
|
+
licenseData,
|
|
70
58
|
meta = {},
|
|
71
59
|
...props
|
|
72
60
|
}) {
|
|
73
|
-
|
|
74
61
|
let location = useLocation();
|
|
75
62
|
// let location = {};
|
|
76
63
|
|
|
77
64
|
|
|
78
65
|
|
|
79
|
-
const { isMobile, user = { locations: [] }, kiosk, state } = useContext(GlobalContext);
|
|
80
|
-
|
|
81
|
-
|
|
66
|
+
const { isMobile, user = { locations: [] }, kiosk, state, settings } = useContext(GlobalContext);
|
|
82
67
|
|
|
83
68
|
const [visible, setVisible] = useState(false);
|
|
69
|
+
const helpDeskSetting = settings?.HELPATR || {}
|
|
84
70
|
|
|
85
71
|
// Variable to handle toggling of menu
|
|
86
72
|
const [collapsed, setCollapsed] = useState(false);
|
|
87
73
|
// varibale handle branch switcher
|
|
88
74
|
|
|
89
|
-
|
|
90
|
-
|
|
91
75
|
// const [searchModalVisible, setSearchModalVisible] = useState(false);
|
|
92
76
|
|
|
93
|
-
|
|
94
77
|
const { globalCustomerHeader = () => { } } = appSettings;
|
|
95
78
|
|
|
96
79
|
const { t, i18n } = useTranslation();
|
|
@@ -98,18 +81,10 @@ export default function GlobalHeader({
|
|
|
98
81
|
const spotlightRef = useRef();
|
|
99
82
|
|
|
100
83
|
useEffect(() => {
|
|
101
|
-
|
|
102
84
|
setTimeout(() => {
|
|
103
|
-
|
|
104
85
|
i18n.changeLanguage(localStorage.selectedLanguage);
|
|
105
|
-
|
|
106
|
-
}, 0)
|
|
107
|
-
|
|
108
|
-
|
|
86
|
+
}, 0);
|
|
109
87
|
}, []);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
88
|
|
|
114
89
|
/**
|
|
115
90
|
* Function to handle toggling of menu
|
|
@@ -125,9 +100,6 @@ export default function GlobalHeader({
|
|
|
125
100
|
// input to avoid typing
|
|
126
101
|
SettingsUtil.openSpotlightModal();
|
|
127
102
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
103
|
|
|
132
104
|
/**
|
|
133
105
|
* Function to remove toggling on mobile view
|
|
@@ -156,79 +128,51 @@ export default function GlobalHeader({
|
|
|
156
128
|
const boxControls = useAnimation();
|
|
157
129
|
|
|
158
130
|
async function animate() {
|
|
159
|
-
await boxControls.start(
|
|
131
|
+
await boxControls.start('entered');
|
|
160
132
|
|
|
161
133
|
//await boxControls.start("show");
|
|
162
134
|
}
|
|
163
135
|
|
|
164
136
|
useEffect(() => {
|
|
165
|
-
|
|
166
137
|
animate();
|
|
167
|
-
}, [])
|
|
138
|
+
}, []);
|
|
168
139
|
|
|
169
140
|
useEffect(() => {
|
|
170
141
|
|
|
171
142
|
}, [state.theme]);
|
|
172
143
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
144
|
|
|
178
145
|
|
|
179
|
-
return (
|
|
180
|
-
<div
|
|
181
|
-
className={`global-header ${process.env.REACT_APP_THEME} ${isConnected && !kiosk ? "connected" : ""
|
|
182
|
-
}`}
|
|
183
|
-
style={{
|
|
184
|
-
|
|
185
|
-
// background: state.theme.colors.bodyBackground,
|
|
186
146
|
|
|
187
|
-
height: 10,
|
|
188
147
|
|
|
189
|
-
}}
|
|
190
|
-
>
|
|
191
|
-
{/* <MenuOutlined style={{left:'1%',top:'1%', fontSize:18, position:'absolute', zIndex:999}} onClick={showSidebar}/> */}
|
|
192
148
|
|
|
193
|
-
|
|
194
|
-
<div
|
|
149
|
+
useEffect(() => { }, [state.theme]);
|
|
195
150
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
151
|
+
return (
|
|
152
|
+
<>
|
|
153
|
+
<div
|
|
154
|
+
className={`global-header ${process.env.REACT_APP_THEME} ${isConnected && !kiosk ? 'connected' : ''}`}
|
|
155
|
+
style={{
|
|
156
|
+
// background: state.theme.colors.bodyBackground,
|
|
157
|
+
|
|
158
|
+
height: 10,
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
161
|
+
{/* <MenuOutlined style={{left:'1%',top:'1%', fontSize:18, position:'absolute', zIndex:999}} onClick={showSidebar}/> */}
|
|
162
|
+
|
|
163
|
+
<div className="layout-content">
|
|
164
|
+
<div
|
|
165
|
+
//whileHover="hover"
|
|
166
|
+
//whileTap="tap"
|
|
167
|
+
className={`left-bar ${!isConnected && !isMobile ? '' : 'hide'}${!collapsed ? 'open' : 'close'}${kiosk && !isConnected ? 'kioskon' : ''}`}
|
|
199
168
|
// style={{ background: state.theme.colors.leftSectionBackground }}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
className={`sidebar-container ${!collapsed ? "open" : "close"}${kiosk ? "" : "kioskon"}`}
|
|
208
|
-
|
|
209
|
-
>
|
|
210
|
-
|
|
211
|
-
<SideMenu
|
|
212
|
-
// isOpen={isOpen}
|
|
213
|
-
collapsed={collapsed}
|
|
214
|
-
setCollapsed={setCollapsed}
|
|
215
|
-
loading={loading}
|
|
216
|
-
appSettings={appSettings}
|
|
217
|
-
callback={onClose}
|
|
218
|
-
modules={modules}
|
|
219
|
-
history={history}
|
|
220
|
-
/>
|
|
221
|
-
|
|
222
|
-
</motion.div>
|
|
223
|
-
) : (
|
|
224
|
-
<Drawer
|
|
225
|
-
placement="left"
|
|
226
|
-
onClose={onClose}
|
|
227
|
-
visible={visible}
|
|
228
|
-
className="side-drawer-content"
|
|
229
|
-
>
|
|
230
|
-
<div
|
|
231
|
-
className={`sidebar-container ${!collapsed ? "open" : "close"}`}
|
|
169
|
+
>
|
|
170
|
+
{!isMobile && !isConnected ? (
|
|
171
|
+
<motion.div
|
|
172
|
+
variants={boxVariants}
|
|
173
|
+
initial={['entering']}
|
|
174
|
+
animate={boxControls}
|
|
175
|
+
className={`sidebar-container ${!collapsed ? 'open' : 'close'}${kiosk ? '' : 'kioskon'}`}
|
|
232
176
|
>
|
|
233
177
|
<SideMenu
|
|
234
178
|
// isOpen={isOpen}
|
|
@@ -240,155 +184,190 @@ export default function GlobalHeader({
|
|
|
240
184
|
modules={modules}
|
|
241
185
|
history={history}
|
|
242
186
|
/>
|
|
243
|
-
</div>
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
187
|
+
</motion.div>
|
|
188
|
+
) : (
|
|
189
|
+
<Drawer placement="left" onClose={onClose} visible={visible} className="side-drawer-content">
|
|
190
|
+
<div className={`sidebar-container ${!collapsed ? 'open' : 'close'}`}>
|
|
191
|
+
<SideMenu
|
|
192
|
+
// isOpen={isOpen}
|
|
193
|
+
collapsed={collapsed}
|
|
194
|
+
setCollapsed={setCollapsed}
|
|
195
|
+
loading={loading}
|
|
196
|
+
appSettings={appSettings}
|
|
197
|
+
callback={onClose}
|
|
198
|
+
modules={modules}
|
|
199
|
+
history={history}
|
|
200
|
+
/>
|
|
201
|
+
</div>
|
|
202
|
+
</Drawer>
|
|
203
|
+
)}
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
{/* Right Section of the Component Loader */}
|
|
207
|
+
<div
|
|
208
|
+
className={`right-section ${!collapsed ? 'open' : 'close'} ${kiosk ? 'kioskon' : ''}`}
|
|
209
|
+
style={{ background: state.theme.colors.bodyBackground }}
|
|
210
|
+
>
|
|
211
|
+
{/* For not connected section */}
|
|
212
|
+
{!isConnected && !kiosk ? (
|
|
213
|
+
<div
|
|
214
|
+
className={`page-wrapper ${!collapsed ? 'open' : 'close'}`}
|
|
215
|
+
// style={{ background: state.theme.colors.headerBg }}
|
|
216
|
+
>
|
|
217
|
+
{/* */}
|
|
218
|
+
<div className="page-header-name">
|
|
219
|
+
<ProgressBar isLoading={loading} />
|
|
247
220
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
{/* For not connected section */}
|
|
251
|
-
{!isConnected && !kiosk ? (
|
|
252
|
-
|
|
253
|
-
<div className={`page-wrapper ${!collapsed ? "open" : "close"}`}
|
|
254
|
-
// style={{ background: state.theme.colors.headerBg }}
|
|
255
|
-
>
|
|
256
|
-
{/* */}
|
|
257
|
-
<div className="page-header-name">
|
|
258
|
-
|
|
259
|
-
<ProgressBar isLoading={loading} />
|
|
260
|
-
|
|
261
|
-
<span type
|
|
262
|
-
onClick={!isMobile ? toggleCollapsed : hideToggle}
|
|
263
|
-
className="toggle-box toggle-menu"
|
|
264
|
-
>
|
|
265
|
-
<MenuOutlined />
|
|
266
|
-
|
|
267
|
-
</span>
|
|
268
|
-
|
|
269
|
-
{/* Back Button */}
|
|
270
|
-
{location.pathname !== "/" ? (
|
|
271
|
-
<span
|
|
272
|
-
className="toggle-box"
|
|
273
|
-
onClick={() => {
|
|
274
|
-
history && history.goBack();
|
|
275
|
-
}}
|
|
276
|
-
>
|
|
277
|
-
<GenericHeader />
|
|
221
|
+
<span type onClick={!isMobile ? toggleCollapsed : hideToggle} className="toggle-box toggle-menu">
|
|
222
|
+
<MenuOutlined />
|
|
278
223
|
</span>
|
|
279
|
-
) : null}
|
|
280
|
-
{/* Back Button Ends */}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
{location.pathname !== "/" ? (
|
|
284
|
-
<h4 className="menu-caption header-caption" style={{ color: state.theme.colors.headerColor }}>
|
|
285
|
-
{menu.caption}
|
|
286
|
-
</h4>
|
|
287
|
-
) : null}
|
|
288
|
-
</div>
|
|
289
|
-
|
|
290
|
-
{/* Page Menu Actions */}
|
|
291
|
-
|
|
292
|
-
{user.role || user.id ? (
|
|
293
|
-
<div className="page-menu">
|
|
294
|
-
{/* Search Input in header start */}
|
|
295
|
-
{ !isMobile && (
|
|
296
|
-
|
|
297
|
-
<div>
|
|
298
|
-
<Input
|
|
299
|
-
placeholder="Search (Shift + F)"
|
|
300
|
-
prefix={<SearchOutlined />}
|
|
301
|
-
onClick={openSearchModal}
|
|
302
|
-
|
|
303
|
-
readOnly
|
|
304
|
-
style={{ width: 250 }}
|
|
305
|
-
/>
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
<SpotlightSearch ref={(elem) => SettingsUtil.registerModal(elem)} props={props}/>
|
|
309
|
-
|
|
310
|
-
</div>
|
|
311
|
-
)}
|
|
312
|
-
{/* Search Input in header start */}
|
|
313
|
-
|
|
314
|
-
{/** branchswitcher Option */}
|
|
315
|
-
{/* branch switcher controlled with env for matria and nura */}
|
|
316
|
-
{!process.env.REACT_APP_SHOW_BRANCH_SWITCHER ? (
|
|
317
|
-
<div className="branch-switcher">{globalCustomerHeader()}</div>
|
|
318
|
-
):null}
|
|
319
|
-
{/* <div className="branch-switcher">{globalCustomerHeader()}</div> */}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
{/* Search Option */}
|
|
323
|
-
|
|
324
|
-
{/* <ModalSearch /> */}
|
|
325
|
-
|
|
326
|
-
{/* Search Option Ends */}
|
|
327
|
-
|
|
328
|
-
{/* Configurator Actions */}
|
|
329
|
-
{user.isAdmin ? (
|
|
330
|
-
<>
|
|
331
|
-
{/* Models */}
|
|
332
|
-
{menu && menu.id ? (
|
|
333
|
-
<Link to={`/menus/${menu.id}`}>
|
|
334
224
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
)
|
|
340
|
-
|
|
341
|
-
|
|
225
|
+
{/* Back Button */}
|
|
226
|
+
{location.pathname !== '/' ? (
|
|
227
|
+
<span
|
|
228
|
+
className="toggle-box"
|
|
229
|
+
onClick={() => {
|
|
230
|
+
history && history.goBack();
|
|
231
|
+
}}
|
|
232
|
+
>
|
|
233
|
+
<GenericHeader />
|
|
234
|
+
</span>
|
|
342
235
|
) : null}
|
|
343
|
-
{/*
|
|
344
|
-
|
|
345
|
-
|
|
236
|
+
{/* Back Button Ends */}
|
|
346
237
|
|
|
238
|
+
{location.pathname !== '/' ? (
|
|
239
|
+
<h4 className="menu-caption header-caption" style={{ color: state.theme.colors.headerColor }}>
|
|
240
|
+
{menu.caption}
|
|
241
|
+
</h4>
|
|
242
|
+
) : null}
|
|
243
|
+
</div>
|
|
347
244
|
|
|
245
|
+
{/* Page Menu Actions */}
|
|
348
246
|
|
|
247
|
+
{user.role || user.id ? (
|
|
248
|
+
<div className="page-menu">
|
|
249
|
+
{/* Search Input in header start */}
|
|
250
|
+
{!isMobile && (
|
|
251
|
+
<div>
|
|
252
|
+
<Input
|
|
253
|
+
placeholder="Search (Shift + F)"
|
|
254
|
+
prefix={<SearchOutlined />}
|
|
255
|
+
onClick={openSearchModal}
|
|
256
|
+
readOnly
|
|
257
|
+
style={{ width: 250 }}
|
|
258
|
+
/>
|
|
259
|
+
|
|
260
|
+
<SpotlightSearch ref={(elem) => SettingsUtil.registerModal(elem)} props={props} />
|
|
261
|
+
</div>
|
|
262
|
+
)}
|
|
263
|
+
{/* Search Input in header start */}
|
|
349
264
|
|
|
350
|
-
|
|
265
|
+
{/** branchswitcher Option */}
|
|
266
|
+
{/* branch switcher controlled with env for matria and nura */}
|
|
267
|
+
{!process.env.REACT_APP_SHOW_BRANCH_SWITCHER ? <div className="branch-switcher">{globalCustomerHeader()}</div> : null}
|
|
268
|
+
{/* <div className="branch-switcher">{globalCustomerHeader()}</div> */}
|
|
269
|
+
|
|
270
|
+
{/* Search Option */}
|
|
271
|
+
|
|
272
|
+
{/* <ModalSearch /> */}
|
|
273
|
+
|
|
274
|
+
{/* Search Option Ends */}
|
|
275
|
+
|
|
276
|
+
{/* Configurator Actions */}
|
|
277
|
+
{user.isAdmin ? (
|
|
278
|
+
<>
|
|
279
|
+
{/* Models */}
|
|
280
|
+
{menu && menu.id ? (
|
|
281
|
+
<Link to={`/menus/${menu.id}`}>
|
|
282
|
+
<Button type="default" size={'small'} icon={<SettingOutlined />}></Button>
|
|
283
|
+
</Link>
|
|
284
|
+
) : null}
|
|
285
|
+
{/* Models Ends */}
|
|
286
|
+
</>
|
|
287
|
+
) : null}
|
|
288
|
+
{/* Configurator Actions Ends */}
|
|
289
|
+
|
|
290
|
+
{/* Reload Button */}
|
|
291
|
+
|
|
292
|
+
<Button onClick={reload} icon={<ReloadOutlined />} type="default" size={'small'}></Button>
|
|
293
|
+
|
|
294
|
+
{/* Reload Button Ends */}
|
|
295
|
+
|
|
296
|
+
{/* Help-desk-btn */}
|
|
297
|
+
{helpDeskSetting?.showSupportBtn ? <Tooltip title={helpDeskSetting?.toolTipText}>
|
|
298
|
+
<span>
|
|
299
|
+
<Button
|
|
300
|
+
onClick={() => window.open(helpDeskSetting?.helpDeskLink ?? '', '_blank')}
|
|
301
|
+
icon={<QuestionOutlined />}
|
|
302
|
+
type="default"
|
|
303
|
+
size="small"
|
|
304
|
+
/>
|
|
305
|
+
</span>
|
|
306
|
+
</Tooltip> : null}
|
|
307
|
+
|
|
308
|
+
{/** Switch Languages starts */}
|
|
309
|
+
{process.env.REACT_APP_ENABLE_LANGUAGE_SWITCHER ? <LanguageSwitcher /> : null}
|
|
310
|
+
{/** Switch Languages ends */}
|
|
311
|
+
|
|
312
|
+
{/* User Profile */}
|
|
313
|
+
<div style={{ padding: '10px' }}>
|
|
314
|
+
<ProfileAvatar />
|
|
315
|
+
<span style={{ color: state.theme.colors.colorText }}> {user.name} </span>
|
|
316
|
+
</div>
|
|
317
|
+
{/* User Profile Ends */}
|
|
318
|
+
</div>
|
|
319
|
+
) : null}
|
|
351
320
|
|
|
352
|
-
|
|
321
|
+
{/* Page Menu Actions Ends */}
|
|
322
|
+
</div>
|
|
323
|
+
) : null}
|
|
353
324
|
|
|
354
|
-
|
|
325
|
+
{/* The children is rendered */}
|
|
326
|
+
{children}
|
|
327
|
+
{/* The children is rendered */}
|
|
328
|
+
</div>
|
|
355
329
|
|
|
356
|
-
|
|
330
|
+
{/* Right Section of the Component Loader Ends */}
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
{licAlert && licenseData && (
|
|
334
|
+
<div
|
|
335
|
+
style={{
|
|
336
|
+
marginTop: '3rem',
|
|
337
|
+
right: '2%',
|
|
338
|
+
position: 'absolute',
|
|
339
|
+
zIndex: 999,
|
|
340
|
+
}}
|
|
341
|
+
>
|
|
342
|
+
<LicenseAlert data={licenseData} />
|
|
343
|
+
</div>
|
|
344
|
+
)}
|
|
345
|
+
</>
|
|
346
|
+
);
|
|
347
|
+
}
|
|
357
348
|
|
|
358
|
-
{/** Switch Languages starts */}
|
|
359
|
-
{process.env.REACT_APP_ENABLE_LANGUAGE_SWITCHER ? <LanguageSwitcher /> : null}
|
|
360
|
-
{/** Switch Languages ends */}
|
|
361
349
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
<ProfileAvatar />
|
|
365
|
-
<span style={{ color: state.theme.colors.colorText }}> {user.name} </span>
|
|
366
|
-
</div>
|
|
367
|
-
{/* User Profile Ends */}
|
|
368
|
-
</div>
|
|
369
|
-
) : null}
|
|
350
|
+
export default function GlobalHeader(props) {
|
|
351
|
+
const context = useContext(GlobalContext);
|
|
370
352
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
353
|
+
if (context.dispatch) {
|
|
354
|
+
return <GlobalHeaderContent {...props} />;
|
|
355
|
+
}
|
|
374
356
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
{/* Right Section of the Component Loader Ends */}
|
|
380
|
-
</div>
|
|
381
|
-
</div>
|
|
357
|
+
return (
|
|
358
|
+
<GlobalProvider {...props} appSettings={props.appSettings}>
|
|
359
|
+
<GlobalHeaderContent {...props} />
|
|
360
|
+
</GlobalProvider>
|
|
382
361
|
);
|
|
383
362
|
}
|
|
384
363
|
|
|
385
364
|
|
|
365
|
+
|
|
386
366
|
/**
|
|
387
|
-
*
|
|
388
|
-
* @returns
|
|
367
|
+
*
|
|
368
|
+
* @returns
|
|
389
369
|
*/
|
|
390
370
|
function ProfileAvatar() {
|
|
391
|
-
|
|
392
371
|
const { user = { locations: [] } } = useContext(GlobalContext);
|
|
393
372
|
|
|
394
373
|
useEffect(() => { }, []);
|
|
@@ -397,11 +376,7 @@ function ProfileAvatar() {
|
|
|
397
376
|
<Link className="profile-avatar" to="/profile">
|
|
398
377
|
{user.photograph ? (
|
|
399
378
|
<>
|
|
400
|
-
<img
|
|
401
|
-
className="profile-picture"
|
|
402
|
-
src={user.photograph}
|
|
403
|
-
alt={"user photograph"}
|
|
404
|
-
/>
|
|
379
|
+
<img className="profile-picture" src={user.photograph} alt={'user photograph'} />
|
|
405
380
|
</>
|
|
406
381
|
) : (
|
|
407
382
|
<Avatar shape="square" size="small" icon={<UserOutlined />} />
|
|
@@ -410,4 +385,4 @@ function ProfileAvatar() {
|
|
|
410
385
|
{/* {user.name} */}
|
|
411
386
|
</Link>
|
|
412
387
|
);
|
|
413
|
-
}
|
|
388
|
+
}
|
|
@@ -109,7 +109,7 @@ import ConsentComponent from './consent/consent'
|
|
|
109
109
|
import TaskOverviewLegacy from './../models/process/components/task-overview-legacy/task-overview-legacy'
|
|
110
110
|
|
|
111
111
|
import ReportingDashboard from '../../modules/reporting/components/reporting-dashboard/reporting-dashboard';
|
|
112
|
-
|
|
112
|
+
import ReportingTable from '../../modules/reporting/components/reporting-dashboard/reporting-table'
|
|
113
113
|
import ProcessStepsPage from '../../modules/steps/steps'
|
|
114
114
|
export {
|
|
115
115
|
|
|
@@ -198,7 +198,7 @@ export {
|
|
|
198
198
|
TaskOverviewLegacy,
|
|
199
199
|
// WebCamera,
|
|
200
200
|
ConsentComponent,
|
|
201
|
-
|
|
201
|
+
ReportingTable,
|
|
202
202
|
ReportingDashboard,
|
|
203
203
|
ProcessStepsPage
|
|
204
204
|
|
|
@@ -39,18 +39,18 @@ function CollapsedIconMenu({ menu, collapsed, icon, caption }) {
|
|
|
39
39
|
// Import t and i18n from useTranslation
|
|
40
40
|
const { t, i18n } = useTranslation();
|
|
41
41
|
const { state } = useContext(GlobalContext);
|
|
42
|
-
|
|
42
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
const handleResize = () => {
|
|
46
|
+
setIsMobile(window.innerWidth < 768); // Common breakpoint for mobile
|
|
47
|
+
};
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
handleResize(); // Set initial value
|
|
50
|
+
window.addEventListener('resize', handleResize);
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
53
|
+
}, []);
|
|
54
54
|
|
|
55
55
|
const menuText = t(caption);
|
|
56
56
|
const menuContent = (
|
|
@@ -85,8 +85,14 @@ function CollapsedIconMenu({ menu, collapsed, icon, caption }) {
|
|
|
85
85
|
</>
|
|
86
86
|
);
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
// On mobile, or when the menu is collapsed (based on original logic), don't show the popover tooltip.
|
|
89
|
+
return isMobile || collapsed ? (
|
|
90
|
+
menuContent
|
|
91
|
+
) : (
|
|
92
|
+
<Popover content={menuText} placement="right">
|
|
93
|
+
{menuContent}
|
|
94
|
+
</Popover>
|
|
95
|
+
);
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
export default function SideMenu({ loading, modules = [], callback, appSettings, collapsed }) {
|
|
@@ -123,7 +129,7 @@ export default function SideMenu({ loading, modules = [], callback, appSettings,
|
|
|
123
129
|
* Logout Function
|
|
124
130
|
*/
|
|
125
131
|
async function handleLogout() {
|
|
126
|
-
let dbPtrValue = appSettings.headers.db_ptr;
|
|
132
|
+
// let dbPtrValue = appSettings.headers.db_ptr;
|
|
127
133
|
const isEnvThemeTrue = process.env.REACT_APP_THEME === 'true';
|
|
128
134
|
|
|
129
135
|
// Only clear localStorage if theme is not 'true'
|
|
@@ -137,7 +143,7 @@ export default function SideMenu({ loading, modules = [], callback, appSettings,
|
|
|
137
143
|
// const result = Users.logout()
|
|
138
144
|
localStorage.clear();
|
|
139
145
|
|
|
140
|
-
localStorage.setItem('db_ptr', dbPtrValue);
|
|
146
|
+
// localStorage.setItem('db_ptr', dbPtrValue);
|
|
141
147
|
|
|
142
148
|
let userInfo = {
|
|
143
149
|
dms: {},
|