ui-soxo-bootstrap-core 2.6.1-dev.1 → 2.6.1-dev.11
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/lib/Store.js +3 -3
- package/core/lib/components/global-header/global-header.js +2 -2
- package/core/lib/components/sidemenu/sidemenu.js +19 -13
- package/core/lib/elements/basic/country-phone-input/country-phone-input.js +14 -8
- 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.scss +5 -4
- package/core/lib/models/menus/components/menu-list/menu-list.js +424 -467
- 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 +46 -0
- package/core/lib/pages/login/communication-mode-selection.scss +60 -0
- package/core/lib/pages/login/login.js +126 -22
- package/core/lib/pages/login/login.scss +229 -334
- package/core/lib/pages/login/reset-password.js +124 -0
- package/core/lib/pages/login/reset-password.scss +31 -0
- package/core/lib/pages/profile/themes.json +4 -4
- package/core/lib/utils/api/api.utils.js +30 -18
- package/core/lib/utils/common/common.utils.js +85 -0
- package/core/lib/utils/http/http.utils.js +1 -0
- package/core/lib/utils/index.js +4 -1
- package/core/models/base/base.js +7 -3
- package/core/models/core-scripts/core-scripts.js +9 -0
- 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 +5 -9
- package/core/models/menus/menus.js +21 -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 +16 -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 +266 -0
- package/core/modules/reporting/components/reporting-dashboard/display-columns/build-display-columns.js +75 -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 +252 -0
- package/core/modules/reporting/components/reporting-dashboard/display-columns/display-cell-renderer.test.js +126 -0
- package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +285 -399
- package/core/modules/steps/action-buttons.js +42 -44
- package/core/modules/steps/action-buttons.scss +35 -6
- package/core/modules/steps/steps.js +12 -10
- package/core/modules/steps/steps.scss +229 -31
- package/core/modules/steps/timeline.js +21 -19
- package/package.json +2 -1
|
@@ -21,7 +21,7 @@ import ExtraInfo from './extra-info';
|
|
|
21
21
|
|
|
22
22
|
const { TabPane } = Tabs;
|
|
23
23
|
|
|
24
|
-
export default function ExtraInfoDetail({ modeValue, icon, title, tabPosition = 'left', showDrawerData, dbPtr, callback, ...record }) {
|
|
24
|
+
export default function ExtraInfoDetail({ modeValue, icon, title, tabPosition = 'left', showDrawerData, dbPtr, callback, drawerWidth = '35%', ...record }) {
|
|
25
25
|
// State to control drawer
|
|
26
26
|
const [open, setOpen] = useState(false);
|
|
27
27
|
|
|
@@ -121,7 +121,7 @@ export default function ExtraInfoDetail({ modeValue, icon, title, tabPosition =
|
|
|
121
121
|
{/* */}
|
|
122
122
|
|
|
123
123
|
{/* */}
|
|
124
|
-
<Drawer width={
|
|
124
|
+
<Drawer width={drawerWidth} title={title} onClose={onClose} open={open}>
|
|
125
125
|
<div className="main-drawer-content">
|
|
126
126
|
<div className="drawer-container">
|
|
127
127
|
<div className="drawer-click">
|
package/core/lib/Store.js
CHANGED
|
@@ -50,7 +50,7 @@ const initialTheme = () => {
|
|
|
50
50
|
// manage theme with env
|
|
51
51
|
const isEnvThemeTrue = process.env.REACT_APP_THEME;
|
|
52
52
|
|
|
53
|
-
console.log('REACT_APP_THEME:', isEnvThemeTrue);
|
|
53
|
+
// console.log('REACT_APP_THEME:', isEnvThemeTrue);
|
|
54
54
|
const matchedTheme = themes.find((t) => t.name === isEnvThemeTrue);
|
|
55
55
|
|
|
56
56
|
if (matchedTheme) return matchedTheme;
|
|
@@ -64,7 +64,7 @@ const initialTheme = () => {
|
|
|
64
64
|
// Fallback to default
|
|
65
65
|
return themes[0];
|
|
66
66
|
} catch (e) {
|
|
67
|
-
console.error('Error loading theme:', e);
|
|
67
|
+
// console.error('Error loading theme:', e);
|
|
68
68
|
return themes[0];
|
|
69
69
|
}
|
|
70
70
|
};
|
|
@@ -94,7 +94,7 @@ export const GlobalProvider = ({ children, CustomModels,CustomComponents, appSet
|
|
|
94
94
|
|
|
95
95
|
const [state, dispatch] = useReducer(AppReducer, initialState);
|
|
96
96
|
|
|
97
|
-
console.log(state);
|
|
97
|
+
// console.log(state);
|
|
98
98
|
|
|
99
99
|
const { isMobile } = useDeviceDetect();
|
|
100
100
|
|
|
@@ -49,7 +49,7 @@ import { useTranslation } from "react-i18next";
|
|
|
49
49
|
import BorderStyle from "pdf-lib/cjs/core/annotation/BorderStyle";
|
|
50
50
|
|
|
51
51
|
import SettingsUtil from "../../../utils/settings.utils";
|
|
52
|
-
import
|
|
52
|
+
import SpotlightSearch from "../spotlight-search/spotlight-search.component";
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
@@ -410,4 +410,4 @@ function ProfileAvatar() {
|
|
|
410
410
|
{/* {user.name} */}
|
|
411
411
|
</Link>
|
|
412
412
|
);
|
|
413
|
-
}
|
|
413
|
+
}
|
|
@@ -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: {},
|
|
@@ -11,7 +11,17 @@ import 'react-phone-input-2/lib/style.css';
|
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import './phone-input.scss';
|
|
13
13
|
|
|
14
|
-
export default function CountryPhoneInput({
|
|
14
|
+
export default function CountryPhoneInput({
|
|
15
|
+
value,
|
|
16
|
+
onChange,
|
|
17
|
+
disabled,
|
|
18
|
+
disableCountryCode,
|
|
19
|
+
required,
|
|
20
|
+
defaultCountryCode,
|
|
21
|
+
onBlur,
|
|
22
|
+
className,
|
|
23
|
+
onKeyDown,
|
|
24
|
+
}) {
|
|
15
25
|
const inputRef = useRef();
|
|
16
26
|
const hasInitializedRef = useRef(false); // IMPORTANT
|
|
17
27
|
|
|
@@ -21,11 +31,7 @@ export default function CountryPhoneInput({ value, onChange, disabled, disableCo
|
|
|
21
31
|
* run ONLY ONCE when initial value has dial code
|
|
22
32
|
*/
|
|
23
33
|
useEffect(() => {
|
|
24
|
-
if (
|
|
25
|
-
!hasInitializedRef.current &&
|
|
26
|
-
value?.code?.dialCode &&
|
|
27
|
-
value?.value
|
|
28
|
-
) {
|
|
34
|
+
if (!hasInitializedRef.current && value?.code?.dialCode && value?.value) {
|
|
29
35
|
setPhone(value.code.dialCode + value.value);
|
|
30
36
|
hasInitializedRef.current = true; // 👈 mark as done
|
|
31
37
|
}
|
|
@@ -54,7 +60,7 @@ export default function CountryPhoneInput({ value, onChange, disabled, disableCo
|
|
|
54
60
|
// country={disableCountryCode ? false : 'in'}
|
|
55
61
|
value={phone}
|
|
56
62
|
onChange={handleInput}
|
|
57
|
-
inputProps={{ required: required }}
|
|
63
|
+
inputProps={{ required: required, onKeyDown: onKeyDown }}
|
|
58
64
|
disabled={disabled}
|
|
59
65
|
onBlur={onBlur}
|
|
60
66
|
/>
|
|
@@ -73,4 +79,4 @@ CountryPhoneInput.propTypes = {
|
|
|
73
79
|
disableCountryCode: PropTypes.bool,
|
|
74
80
|
/** A boolean indicating whether the input is required or not. This prop is optional. */
|
|
75
81
|
required: PropTypes.bool,
|
|
76
|
-
};
|
|
82
|
+
};
|
|
@@ -102,7 +102,7 @@ export default function DraggableWrapper({ id, index, movePanel, item, dragEnabl
|
|
|
102
102
|
>
|
|
103
103
|
<div style={{ flex: 1 }}>
|
|
104
104
|
{dragEnabled && <span style={{ marginRight: 8 }}>⋮⋮</span>}
|
|
105
|
-
<span>{item.
|
|
105
|
+
<span>{item.caption}</span>
|
|
106
106
|
{dragEnabled ? (
|
|
107
107
|
<span style={{ marginLeft: 8, fontSize: 11, color: '#999' }}>(Level {level})</span>
|
|
108
108
|
) : (
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import React from 'react';
|
|
26
|
-
import { Checkbox, Collapse } from 'antd';
|
|
26
|
+
import { Checkbox, Collapse, Tag } from 'antd';
|
|
27
27
|
|
|
28
28
|
const { Panel } = Collapse;
|
|
29
29
|
|
|
@@ -73,11 +73,15 @@ export const MenuTree = ({ menus, selectedMenus = [], toggleMenu, parentId = nul
|
|
|
73
73
|
background: '#fff',
|
|
74
74
|
display: 'flex',
|
|
75
75
|
alignItems: 'center',
|
|
76
|
-
|
|
76
|
+
justifyContent: 'space-between',
|
|
77
77
|
}}
|
|
78
78
|
>
|
|
79
|
-
{
|
|
80
|
-
<
|
|
79
|
+
{/* Left Side */}
|
|
80
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
|
81
|
+
{showCheckbox && <Checkbox checked={selectedMenus.includes(menu.id)} onChange={(e) => onParentChange(e.target.checked)} />}
|
|
82
|
+
<span>{menu.caption}</span>
|
|
83
|
+
</div>
|
|
84
|
+
<Tag color={menu.is_visible === true ? 'green' : 'blue'}>{menu.is_visible === true ? 'VISIBLE' : 'HIDDEN'}</Tag>{' '}
|
|
81
85
|
</div>
|
|
82
86
|
);
|
|
83
87
|
}
|
|
@@ -91,15 +95,24 @@ export const MenuTree = ({ menus, selectedMenus = [], toggleMenu, parentId = nul
|
|
|
91
95
|
<Panel
|
|
92
96
|
key={menu.id}
|
|
93
97
|
header={
|
|
94
|
-
<div
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
<div
|
|
99
|
+
style={{
|
|
100
|
+
display: 'flex',
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
justifyContent: 'space-between',
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
|
106
|
+
{showCheckbox && (
|
|
107
|
+
<Checkbox
|
|
108
|
+
checked={children.every((c) => selectedMenus.includes(c.id))}
|
|
109
|
+
indeterminate={children.some((c) => selectedMenus.includes(c.id)) && !children.every((c) => selectedMenus.includes(c.id))}
|
|
110
|
+
onChange={(e) => onParentChange(e.target.checked)}
|
|
111
|
+
/>
|
|
112
|
+
)}
|
|
113
|
+
<span>{menu.caption}</span>
|
|
114
|
+
</div>
|
|
115
|
+
<Tag color={menu.is_visible === true ? 'green' : 'blue'}>{menu.is_visible === true ? 'VISIBLE' : 'HIDDEN'}</Tag>{' '}
|
|
103
116
|
</div>
|
|
104
117
|
}
|
|
105
118
|
>
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.new-record {
|
|
7
|
-
|
|
7
|
+
gap: 10px !important;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.form-item-element {
|
|
11
11
|
position: relative;
|
|
12
12
|
padding: 8px;
|
|
13
13
|
border-radius: 4px;
|
|
14
|
-
border: 1px solid #e3e3e3;
|
|
14
|
+
// border: 1px solid #e3e3e3;
|
|
15
15
|
margin-bottom: 3px;
|
|
16
16
|
|
|
17
17
|
.field-customizer {
|
|
@@ -22,9 +22,10 @@
|
|
|
22
22
|
// right: 0px;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
.submit-button {
|
|
28
29
|
margin-top: 10px;
|
|
29
30
|
}
|
|
30
31
|
}
|