ui-soxo-bootstrap-core 2.6.1-dev.2 → 2.6.1-dev.20
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 +91 -15
- 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 +3 -3
- package/core/lib/components/global-header/animations.js +78 -4
- package/core/lib/components/global-header/global-header.js +224 -255
- package/core/lib/components/global-header/global-header.scss +162 -24
- package/core/lib/components/sidemenu/animations.js +84 -2
- package/core/lib/components/sidemenu/sidemenu.js +191 -65
- package/core/lib/components/sidemenu/sidemenu.scss +221 -14
- 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 +4 -3
- 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/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 +47 -62
- 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 +30 -18
- package/core/lib/utils/common/common.utils.js +49 -35
- package/core/lib/utils/http/http.utils.js +2 -1
- package/core/lib/utils/index.js +4 -1
- package/core/models/base/base.js +7 -3
- package/core/models/core-scripts/core-scripts.js +134 -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 +27 -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 +147 -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 +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 +326 -436
- package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.scss +7 -0
- package/core/modules/steps/action-buttons.js +33 -15
- 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 +1078 -57
- package/core/modules/steps/steps.scss +539 -90
- package/core/modules/steps/timeline.js +21 -19
- package/core/modules/steps/voice-navigation.js +709 -0
- package/package.json +2 -1
|
@@ -9,142 +9,150 @@ import React from 'react';
|
|
|
9
9
|
|
|
10
10
|
import Base from '../base/base';
|
|
11
11
|
|
|
12
|
-
import { ApiUtils } from './../../lib/'
|
|
13
|
-
|
|
12
|
+
import { ApiUtils } from './../../lib/';
|
|
14
13
|
|
|
15
14
|
class CoreScript extends Base {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
field: 'name',
|
|
23
|
-
caption: 'Name'
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
field: 'amount',
|
|
27
|
-
caption: 'Amount'
|
|
28
|
-
}
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
// this.columns = ;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get id() {
|
|
35
|
-
return 'id';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
get getEndpoint() {
|
|
39
|
-
return 'core-scripts';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
get modelName() {
|
|
44
|
-
return `core-scripts`;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
get columns() {
|
|
48
|
-
return [
|
|
49
|
-
{
|
|
50
|
-
caption: 'Staff',
|
|
51
|
-
field: 'staff.name',
|
|
52
|
-
key: 'staff'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
caption: 'Weight',
|
|
56
|
-
field: 'weight',
|
|
57
|
-
key: 'weight'
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
caption: 'Date',
|
|
61
|
-
field: 'created_at',
|
|
62
|
-
key: 'created_at'
|
|
63
|
-
}
|
|
64
|
-
];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
*Getting core_script data
|
|
70
|
-
* @returns
|
|
71
|
-
*/
|
|
72
|
-
getReportingLisitng = (id, formBody, dbPtr = null) => {
|
|
73
|
-
|
|
74
|
-
// Settings db pointer
|
|
75
|
-
if (!dbPtr) dbPtr = localStorage.db_ptr;
|
|
76
|
-
return ApiUtils.post({
|
|
77
|
-
url: `core-scripts/dashboardquery/${id}`,
|
|
78
|
-
formBody,
|
|
79
|
-
headers: {
|
|
80
|
-
'Content-Type': 'application/json',
|
|
81
|
-
Authorization: 'Bearer ' + localStorage.access_token,
|
|
82
|
-
db_ptr: dbPtr
|
|
18
|
+
this.fields = [
|
|
19
|
+
{
|
|
20
|
+
field: 'name',
|
|
21
|
+
caption: 'Name',
|
|
83
22
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
23
|
+
{
|
|
24
|
+
field: 'amount',
|
|
25
|
+
caption: 'Amount',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
87
28
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
* @returns
|
|
91
|
-
*/
|
|
92
|
-
getUserDetailsLisitng = (id, formBody) => {
|
|
29
|
+
// this.columns = ;
|
|
30
|
+
}
|
|
93
31
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
});
|
|
98
|
-
};
|
|
32
|
+
get id() {
|
|
33
|
+
return 'id';
|
|
34
|
+
}
|
|
99
35
|
|
|
36
|
+
get getEndpoint() {
|
|
37
|
+
return 'core-scripts';
|
|
38
|
+
}
|
|
100
39
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
getReportMenu = async ({ id }) => {
|
|
105
|
-
|
|
106
|
-
const result = await this.getRecord({ id });
|
|
107
|
-
|
|
108
|
-
const report = result.result
|
|
109
|
-
|
|
110
|
-
return {
|
|
111
|
-
...report,
|
|
112
|
-
caption: report.caption,
|
|
113
|
-
path: '/reports/' + report.id,
|
|
114
|
-
is_visible: true
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* To get extra script data corresponding to mode
|
|
120
|
-
*
|
|
121
|
-
* @param {*} mode
|
|
122
|
-
* @returns
|
|
123
|
-
*/
|
|
124
|
-
getExtraInfo = (mode) => {
|
|
125
|
-
return ApiUtils.get({
|
|
126
|
-
url: `core-scripts/get-script-data?mode=${mode}`,
|
|
127
|
-
});
|
|
128
|
-
};
|
|
40
|
+
get modelName() {
|
|
41
|
+
return `core-scripts`;
|
|
42
|
+
}
|
|
129
43
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
44
|
+
get columns() {
|
|
45
|
+
return [
|
|
46
|
+
{
|
|
47
|
+
caption: 'Staff',
|
|
48
|
+
field: 'staff.name',
|
|
49
|
+
key: 'staff',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
caption: 'Weight',
|
|
53
|
+
field: 'weight',
|
|
54
|
+
key: 'weight',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
caption: 'Date',
|
|
58
|
+
field: 'created_at',
|
|
59
|
+
key: 'created_at',
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*Getting core_script data
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
68
|
+
getReportingLisitng = (id, formBody, dbPtr = null) => {
|
|
69
|
+
// Settings db pointer
|
|
70
|
+
if (!dbPtr) dbPtr = localStorage.db_ptr;
|
|
71
|
+
return ApiUtils.post({
|
|
72
|
+
// baseUrl: 'http://localhost:8002/dev/',
|
|
73
|
+
url: `core-scripts/dashboardquery/${id}`,
|
|
74
|
+
formBody,
|
|
75
|
+
headers: {
|
|
76
|
+
'Content-Type': 'application/json',
|
|
77
|
+
Authorization: 'Bearer ' + localStorage.access_token,
|
|
78
|
+
db_ptr: dbPtr,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
*Updating user details
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
87
|
+
getUserDetailsLisitng = (id, formBody) => {
|
|
88
|
+
return ApiUtils.post({
|
|
89
|
+
url: `core-scripts/update-user-deatils/${id}`,
|
|
90
|
+
formBody,
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
getQuery = (formBody) => {
|
|
95
|
+
return ApiUtils.post({
|
|
96
|
+
url: `core-scripts/execute-script-api`,
|
|
97
|
+
formBody,
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
getQuerySeacch = (formBody) => {
|
|
104
|
+
return ApiUtils.post({
|
|
105
|
+
// baseUrl: 'http://localhost:8002/dev/',
|
|
106
|
+
url: `core-scripts/execute-script-by-search`,
|
|
107
|
+
formBody,
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
getReportMenu = async ({ id }) => {
|
|
115
|
+
const result = await this.getRecord({ id });
|
|
116
|
+
|
|
117
|
+
const report = result.result;
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
...report,
|
|
121
|
+
caption: report.caption,
|
|
122
|
+
path: '/reports/' + report.id,
|
|
123
|
+
is_visible: true,
|
|
147
124
|
};
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* To get extra script data corresponding to mode
|
|
129
|
+
*
|
|
130
|
+
* @param {*} mode
|
|
131
|
+
* @returns
|
|
132
|
+
*/
|
|
133
|
+
getExtraInfo = (mode) => {
|
|
134
|
+
return ApiUtils.get({
|
|
135
|
+
url: `core-scripts/get-script-data?mode=${mode}`,
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* To get executed data
|
|
141
|
+
*
|
|
142
|
+
* @param {*} mode
|
|
143
|
+
* @returns
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
getSelectedExtraInfo = (formBody) => {
|
|
147
|
+
return ApiUtils.post({
|
|
148
|
+
url: `core-scripts/get-selected-script-data`,
|
|
149
|
+
formBody,
|
|
150
|
+
headers: {
|
|
151
|
+
'Content-Type': 'application/json',
|
|
152
|
+
Authorization: 'Bearer ' + localStorage.access_token,
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
};
|
|
148
156
|
}
|
|
149
157
|
|
|
150
158
|
export default CoreScript;
|
|
@@ -6,7 +6,8 @@ import { useTranslation, Button } from './../../../../lib/';
|
|
|
6
6
|
import { UsersAPI } from '../../..';
|
|
7
7
|
import SignatureCanvasComponent from '../../../../lib/components/consent/signature-pad';
|
|
8
8
|
|
|
9
|
-
const DoctorAdd = ({ visible, onCancel,
|
|
9
|
+
const DoctorAdd = ({ visible, onCancel, doctorId, doctorData, onSuccess }) => {
|
|
10
|
+
// console.log('attributes', attributes);
|
|
10
11
|
const [form] = Form.useForm();
|
|
11
12
|
const { t } = useTranslation();
|
|
12
13
|
|
|
@@ -21,8 +22,8 @@ const DoctorAdd = ({ visible, onCancel, attributes, doctorId, doctorData, onSucc
|
|
|
21
22
|
const [doctorID, setDoctorID] = useState(false);
|
|
22
23
|
const [selectedDoctor, setSelectedDoctor] = useState(null);
|
|
23
24
|
|
|
24
|
-
const propValues = attributes || {};
|
|
25
|
-
const doctorType = propValues?.type;
|
|
25
|
+
// const propValues = attributes || {};
|
|
26
|
+
// const doctorType = propValues?.type;
|
|
26
27
|
|
|
27
28
|
const editMode = Boolean(doctorId);
|
|
28
29
|
|
|
@@ -37,6 +38,10 @@ const DoctorAdd = ({ visible, onCancel, attributes, doctorId, doctorData, onSucc
|
|
|
37
38
|
message: '',
|
|
38
39
|
});
|
|
39
40
|
|
|
41
|
+
const getDoctorTypeOptions = () => [
|
|
42
|
+
{ label: 'In House', value: 'DRINH' },
|
|
43
|
+
{ label: 'Out Side', value: 'DROTR' },
|
|
44
|
+
];
|
|
40
45
|
/** Autofocus on modal open */
|
|
41
46
|
useEffect(() => {
|
|
42
47
|
if (visible) {
|
|
@@ -266,7 +271,7 @@ const DoctorAdd = ({ visible, onCancel, attributes, doctorId, doctorData, onSucc
|
|
|
266
271
|
<Row gutter={16}>
|
|
267
272
|
<Col span={8}>
|
|
268
273
|
<Form.Item label="Type" name="type">
|
|
269
|
-
<Select placeholder="Select Type" options={
|
|
274
|
+
<Select placeholder="Select Type" options={getDoctorTypeOptions() || []} showSearch />
|
|
270
275
|
</Form.Item>
|
|
271
276
|
</Col>
|
|
272
277
|
|
|
@@ -164,7 +164,7 @@ const MenuAdd = ({ model, callback, edit, history, formContent, match, additiona
|
|
|
164
164
|
<div className="left-container">
|
|
165
165
|
{/* Caption */}
|
|
166
166
|
<Form.Item name={'caption'} label="Caption" rules={[{ required: true, message: 'Caption is required' }]}>
|
|
167
|
-
<Input placeholder="Enter caption" />
|
|
167
|
+
<Input placeholder="Enter caption" autoFocus />
|
|
168
168
|
</Form.Item>
|
|
169
169
|
{/* Caption Ends */}
|
|
170
170
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useCallback, useEffect } from 'react';
|
|
2
|
-
import { Space, Popconfirm, Input, Drawer, Skeleton, Collapse, message } from 'antd';
|
|
2
|
+
import { Space, Popconfirm, Input, Drawer, Skeleton, Collapse, message, Tag, Empty } from 'antd';
|
|
3
3
|
import { ReloadOutlined, DeleteOutlined, EditOutlined, PlusCircleFilled, CopyOutlined } from '@ant-design/icons';
|
|
4
4
|
import { Button, Card, Switch, DraggableWrapper } from '../../../../lib';
|
|
5
5
|
// for draggable menu list import { DndProvider } from "react-dnd";
|
|
@@ -55,7 +55,6 @@ const MenuLists = ({ model, match, relativeAdd = false, additional_queries = [],
|
|
|
55
55
|
.catch(() => setLoading(false));
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
console.log('record', records);
|
|
59
58
|
/**
|
|
60
59
|
*
|
|
61
60
|
*/
|
|
@@ -204,9 +203,9 @@ const MenuLists = ({ model, match, relativeAdd = false, additional_queries = [],
|
|
|
204
203
|
model.delete(rec).then(loadMenus);
|
|
205
204
|
};
|
|
206
205
|
|
|
207
|
-
const filtered = records.filter((r) => r.
|
|
206
|
+
const filtered = records.filter((r) => r.caption?.toUpperCase().includes(query.toUpperCase()));
|
|
208
207
|
|
|
209
|
-
const visibleItems =
|
|
208
|
+
const visibleItems = filtered;
|
|
210
209
|
|
|
211
210
|
const onSearch = (event) => {
|
|
212
211
|
setQuery(event.target.value);
|
|
@@ -363,50 +362,53 @@ const MenuLists = ({ model, match, relativeAdd = false, additional_queries = [],
|
|
|
363
362
|
<Card>
|
|
364
363
|
<DndProvider backend={HTML5Backend}>
|
|
365
364
|
<Collapse accordion>
|
|
366
|
-
{visibleItems.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
365
|
+
{visibleItems && visibleItems.length > 0 ? (
|
|
366
|
+
visibleItems.map((item, index) => (
|
|
367
|
+
<Panel
|
|
368
|
+
key={item.id}
|
|
369
|
+
header={
|
|
370
|
+
<DraggableWrapper
|
|
371
|
+
id={item.id}
|
|
372
|
+
index={index}
|
|
373
|
+
movePanel={movePanel}
|
|
374
|
+
item={item}
|
|
375
|
+
dragEnabled={dragMode}
|
|
376
|
+
level={1}
|
|
377
|
+
parentId={null}
|
|
378
|
+
onCrossLevelMove={handleCrossLevelMove}
|
|
379
|
+
canAcceptChildren={true}
|
|
380
|
+
/>
|
|
381
|
+
}
|
|
382
|
+
showArrow={item.sub_menus && item.sub_menus.length > 0}
|
|
383
|
+
extra={panelActions(item, model, setSelectedRecord, setDrawerTitle, setDrawerVisible, deleteRecord)}
|
|
384
|
+
>
|
|
385
|
+
{item.sub_menus && item.sub_menus.length > 0 && (
|
|
386
|
+
<NestedMenu
|
|
387
|
+
parentId={item.id}
|
|
388
|
+
step={item.step + 1}
|
|
389
|
+
items={item.sub_menus || []}
|
|
390
|
+
model={model}
|
|
391
|
+
dragMode={dragMode}
|
|
392
|
+
setSelectedRecord={setSelectedRecord}
|
|
393
|
+
setDrawerTitle={setDrawerTitle}
|
|
394
|
+
setDrawerVisible={setDrawerVisible}
|
|
395
|
+
deleteRecord={deleteRecord}
|
|
396
|
+
level={2}
|
|
397
|
+
onCrossLevelMove={handleCrossLevelMove}
|
|
398
|
+
onChange={(subMenus) => {
|
|
399
|
+
const updated = records.map((r) => (r.id === item.id ? { ...r, sub_menus: subMenus } : r));
|
|
400
|
+
setRecords(updated);
|
|
401
|
+
setOrderChanged(true);
|
|
402
|
+
}}
|
|
403
|
+
/>
|
|
404
|
+
)}
|
|
405
|
+
</Panel>
|
|
406
|
+
))
|
|
407
|
+
) : (
|
|
408
|
+
<div style={{ textAlign: 'center', padding: '40px 0' }}>
|
|
409
|
+
<Empty description="No Menu Items" />
|
|
410
|
+
</div>
|
|
411
|
+
)}
|
|
410
412
|
</Collapse>
|
|
411
413
|
</DndProvider>
|
|
412
414
|
</Card>
|
|
@@ -440,7 +442,7 @@ const MenuLists = ({ model, match, relativeAdd = false, additional_queries = [],
|
|
|
440
442
|
function panelActions(item, model, setSelectedRecord, setDrawerTitle, setDrawerVisible, deleteRecord) {
|
|
441
443
|
return (
|
|
442
444
|
<Space onClick={(e) => e.stopPropagation()}>
|
|
443
|
-
{
|
|
445
|
+
<Tag color={item.is_visible === true ? 'green' : 'blue'}>{item.is_visible === true ? 'VISIBLE' : 'HIDDEN'}</Tag>{' '}
|
|
444
446
|
<Button
|
|
445
447
|
size="small"
|
|
446
448
|
type="dashed"
|
|
@@ -459,7 +461,6 @@ function panelActions(item, model, setSelectedRecord, setDrawerTitle, setDrawerV
|
|
|
459
461
|
<PlusCircleFilled />
|
|
460
462
|
Add Sub Menu
|
|
461
463
|
</Button>
|
|
462
|
-
|
|
463
464
|
{model.ModalAddComponent && (
|
|
464
465
|
<Button
|
|
465
466
|
size="small"
|
|
@@ -473,8 +474,7 @@ function panelActions(item, model, setSelectedRecord, setDrawerTitle, setDrawerV
|
|
|
473
474
|
<EditOutlined />
|
|
474
475
|
</Button>
|
|
475
476
|
)}
|
|
476
|
-
|
|
477
|
-
{/* <Button
|
|
477
|
+
<Button
|
|
478
478
|
size="small"
|
|
479
479
|
type="default"
|
|
480
480
|
onClick={() => {
|
|
@@ -484,8 +484,7 @@ function panelActions(item, model, setSelectedRecord, setDrawerTitle, setDrawerV
|
|
|
484
484
|
}}
|
|
485
485
|
>
|
|
486
486
|
<CopyOutlined />
|
|
487
|
-
</Button>
|
|
488
|
-
|
|
487
|
+
</Button>
|
|
489
488
|
<Popconfirm title="Are you sure?" onConfirm={() => deleteRecord(item)}>
|
|
490
489
|
<Button danger size="small" type="default">
|
|
491
490
|
<DeleteOutlined />
|
|
@@ -177,28 +177,47 @@ class MenusAPI extends Base {
|
|
|
177
177
|
* @param {*} menu
|
|
178
178
|
* @returns
|
|
179
179
|
*/
|
|
180
|
-
getMenus = (config) => {
|
|
180
|
+
getMenus = (config, dbPtr = null) => {
|
|
181
181
|
// Use 'core-menus' endpoint if REACT_APP_USE_CORE_MENUS is true (used for Matria)
|
|
182
182
|
const url =
|
|
183
183
|
process.env.REACT_APP_USE_CORE_MENUS === 'true'
|
|
184
184
|
? 'core-menus/get-menus' // Matria
|
|
185
185
|
: 'menus/get-menus'; // NURA
|
|
186
186
|
|
|
187
|
+
if (!dbPtr) dbPtr = localStorage.db_ptr;
|
|
188
|
+
|
|
187
189
|
return this.get({
|
|
188
190
|
url,
|
|
189
191
|
config,
|
|
192
|
+
headers: {
|
|
193
|
+
db_ptr: dbPtr,
|
|
194
|
+
},
|
|
195
|
+
}).then((result) => result);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
getMenubyUser = (user_id) => {
|
|
199
|
+
const url = `menus/get-menus?userId=${user_id}`;
|
|
200
|
+
return this.get({
|
|
201
|
+
url,
|
|
190
202
|
}).then((result) => result);
|
|
191
203
|
};
|
|
192
204
|
|
|
193
205
|
// get core-menu list with submenu
|
|
194
206
|
getCoreMenuLists = () => {
|
|
195
207
|
const url = 'core-menus/core-menus?step=1&header_id=null';
|
|
196
|
-
|
|
197
208
|
return this.get({
|
|
198
209
|
url,
|
|
199
210
|
}).then((result) => result);
|
|
200
211
|
};
|
|
201
212
|
|
|
213
|
+
getCoreMenuByRoleId = async (role_id) => {
|
|
214
|
+
const url = `menus/get-menus-by-role/${role_id}`;
|
|
215
|
+
const result = await this.get({
|
|
216
|
+
url,
|
|
217
|
+
});
|
|
218
|
+
return result;
|
|
219
|
+
};
|
|
220
|
+
|
|
202
221
|
getCoreMenus = () => {
|
|
203
222
|
return [
|
|
204
223
|
// {
|
|
@@ -286,6 +305,12 @@ class MenusAPI extends Base {
|
|
|
286
305
|
// }
|
|
287
306
|
];
|
|
288
307
|
};
|
|
308
|
+
// license summary api call
|
|
309
|
+
getSummary = () => {
|
|
310
|
+
return ApiUtils.get({
|
|
311
|
+
url: 'license/summary',
|
|
312
|
+
});
|
|
313
|
+
};
|
|
289
314
|
}
|
|
290
315
|
|
|
291
316
|
export default MenusAPI;
|