ui-soxo-bootstrap-core 2.4.24 → 2.4.25-dev.10
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/.github/workflows/npm-publish.yml +37 -15
- package/core/components/extra-info/extra-info-details.js +109 -126
- package/core/components/landing-api/landing-api.js +22 -30
- package/core/lib/Store.js +20 -18
- package/core/lib/components/index.js +4 -1
- package/core/lib/components/sidemenu/sidemenu.js +153 -256
- package/core/lib/components/sidemenu/sidemenu.scss +39 -26
- package/core/lib/elements/basic/rangepicker/rangepicker.js +118 -29
- package/core/lib/elements/basic/switch/switch.js +34 -24
- package/core/lib/hooks/index.js +2 -12
- package/core/lib/hooks/use-otp-timer.js +99 -0
- package/core/lib/pages/login/login.js +255 -139
- package/core/lib/pages/login/login.scss +140 -32
- package/core/models/dashboard/dashboard.js +14 -0
- package/core/models/doctor/components/doctor-add/doctor-add.js +403 -0
- package/core/models/doctor/components/doctor-add/doctor-add.scss +32 -0
- package/core/models/menus/components/menu-add/menu-add.js +230 -268
- package/core/models/menus/components/menu-lists/menu-lists.js +126 -89
- package/core/models/menus/components/menu-lists/menu-lists.scss +9 -0
- package/core/models/menus/menus.js +247 -267
- package/core/models/roles/components/role-add/role-add.js +269 -227
- package/core/models/roles/components/role-list/role-list.js +8 -6
- package/core/models/roles/roles.js +182 -174
- package/core/models/staff/components/staff-add/staff-add.js +352 -0
- package/core/models/staff/components/staff-add/staff-add.scss +0 -0
- package/core/models/users/components/user-add/user-add.js +686 -364
- package/core/models/users/components/user-add/user-edit.js +90 -0
- package/core/models/users/users.js +318 -165
- package/core/modules/index.js +5 -8
- package/core/modules/reporting/components/index.js +5 -0
- package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +65 -2
- package/core/modules/steps/action-buttons.js +79 -0
- package/core/modules/steps/steps.js +553 -0
- package/core/modules/steps/steps.scss +158 -0
- package/core/modules/steps/timeline.js +49 -0
- package/package.json +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.signature-method {
|
|
2
|
+
margin-bottom: 10px;
|
|
3
|
+
}
|
|
4
|
+
.signature-image {
|
|
5
|
+
border: 2px dashed #b4b5b7ff;
|
|
6
|
+
border-radius: 5px;
|
|
7
|
+
padding: 2px;
|
|
8
|
+
margin-bottom: 5px;
|
|
9
|
+
width: 500px;
|
|
10
|
+
}
|
|
11
|
+
.upload-container {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
text-align: center;
|
|
17
|
+
gap: 12px; // optional spacing
|
|
18
|
+
width: 500px;
|
|
19
|
+
height: 200px;
|
|
20
|
+
border: 2px dashed #b4b5b7ff;
|
|
21
|
+
border-radius: 5px;
|
|
22
|
+
padding: 2px;
|
|
23
|
+
margin-bottom: 5px;
|
|
24
|
+
}
|
|
25
|
+
.signature-pad {
|
|
26
|
+
padding: 0 !important;
|
|
27
|
+
.sigCanvas {
|
|
28
|
+
width: 500px !important;
|
|
29
|
+
border: 2px dashed #b4b5b7ff !important;
|
|
30
|
+
border-radius: 5px !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -16,310 +16,272 @@ const { Option } = Select;
|
|
|
16
16
|
|
|
17
17
|
import './menu-add.scss';
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
const MenuAdd = ({ model, callback, edit, history, formContent, match, additional_queries, ...props }) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (formContent.attributes) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
formContent.attributes = JSON.parse(formContent.attributes);
|
|
37
|
-
|
|
38
|
-
} else {
|
|
39
|
-
|
|
40
|
-
formContent.attributes = {};
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
formContent.attributes = {}
|
|
20
|
+
let mode = 'Add';
|
|
21
|
+
|
|
22
|
+
if (formContent.id) {
|
|
23
|
+
mode = 'Edit';
|
|
24
|
+
} else if (formContent.copy) {
|
|
25
|
+
mode = 'copy';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (formContent.attributes) {
|
|
29
|
+
if (typeof formContent.attributes === 'string') {
|
|
30
|
+
if (formContent.attributes !== '') {
|
|
31
|
+
formContent.attributes = JSON.parse(formContent.attributes);
|
|
32
|
+
} else {
|
|
33
|
+
formContent.attributes = {};
|
|
34
|
+
}
|
|
46
35
|
}
|
|
36
|
+
} else {
|
|
37
|
+
formContent.attributes = {};
|
|
38
|
+
}
|
|
47
39
|
|
|
40
|
+
const [loading, setLoading] = useState(true);
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const [form] = Form.useForm();
|
|
52
|
-
|
|
53
|
-
const [pages, setPages] = useState([]);
|
|
54
|
-
|
|
55
|
-
const [models, setModels] = useState([]);
|
|
56
|
-
|
|
57
|
-
const [menus, setMenus] = useState([])
|
|
58
|
-
|
|
59
|
-
const [body, setBody] = useState(formContent);
|
|
60
|
-
|
|
61
|
-
const { params } = match;
|
|
62
|
-
|
|
63
|
-
let location = useLocation();
|
|
64
|
-
|
|
65
|
-
const query = new URLSearchParams(location.search);
|
|
66
|
-
|
|
67
|
-
console.log(query.get('step'));
|
|
68
|
-
|
|
69
|
-
let step = parseInt(query.get('step')) || 1;
|
|
70
|
-
|
|
71
|
-
console.log(step);
|
|
72
|
-
|
|
73
|
-
useEffect(() => {
|
|
74
|
-
|
|
75
|
-
// loadModelColumns();
|
|
76
|
-
getPages();
|
|
77
|
-
|
|
78
|
-
getModels();
|
|
79
|
-
|
|
80
|
-
setLoading(false);
|
|
81
|
-
|
|
82
|
-
getMenus();
|
|
83
|
-
|
|
84
|
-
}, []);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Load the Staffs
|
|
89
|
-
*/
|
|
90
|
-
const getPages = () => {
|
|
91
|
-
PagesAPI.getPages().then((result) => {
|
|
92
|
-
|
|
93
|
-
if (Array.isArray(result.result)) {
|
|
94
|
-
setPages(result.result);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Load the Models
|
|
101
|
-
*/
|
|
102
|
-
const getModels = () => {
|
|
103
|
-
ModelsAPI.get().then((result) => {
|
|
104
|
-
// console.log(result);
|
|
105
|
-
|
|
106
|
-
setModels(result.result);
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
|
|
42
|
+
const [form] = Form.useForm();
|
|
110
43
|
|
|
111
|
-
|
|
112
|
-
* Load the Models
|
|
113
|
-
*/
|
|
114
|
-
const getMenus = () => {
|
|
115
|
-
MenusAPI.get().then((result) => {
|
|
116
|
-
// console.log(result);
|
|
44
|
+
const [pages, setPages] = useState([]);
|
|
117
45
|
|
|
118
|
-
|
|
119
|
-
});
|
|
120
|
-
};
|
|
46
|
+
const [models, setModels] = useState([]);
|
|
121
47
|
|
|
48
|
+
const [menus, setMenus] = useState([]);
|
|
122
49
|
|
|
123
|
-
|
|
124
|
-
* Submit values
|
|
125
|
-
*/
|
|
126
|
-
const onSubmit = (values) => {
|
|
127
|
-
// console.log(values);
|
|
128
|
-
setLoading(true);
|
|
50
|
+
const [body, setBody] = useState(formContent);
|
|
129
51
|
|
|
130
|
-
|
|
52
|
+
const { params } = match;
|
|
131
53
|
|
|
132
|
-
|
|
133
|
-
// values.step = step;
|
|
54
|
+
let location = useLocation();
|
|
134
55
|
|
|
135
|
-
|
|
56
|
+
const query = new URLSearchParams(location.search);
|
|
136
57
|
|
|
137
|
-
|
|
138
|
-
...values,
|
|
139
|
-
attributes: JSON.stringify(values.attributes)
|
|
140
|
-
}
|
|
141
|
-
}
|
|
58
|
+
let step = parseInt(query.get('step')) || 1;
|
|
142
59
|
|
|
143
|
-
|
|
144
|
-
// Update of model
|
|
145
|
-
model.update({ id, values }).then(() => {
|
|
60
|
+
console.log(step);
|
|
146
61
|
|
|
147
|
-
|
|
148
|
-
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
// loadModelColumns();
|
|
64
|
+
getPages();
|
|
149
65
|
|
|
150
|
-
|
|
66
|
+
getModels();
|
|
151
67
|
|
|
152
|
-
|
|
68
|
+
setLoading(false);
|
|
153
69
|
|
|
154
|
-
|
|
70
|
+
getMenus();
|
|
71
|
+
}, []);
|
|
155
72
|
|
|
156
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Load the Staffs
|
|
75
|
+
*/
|
|
76
|
+
const getPages = () => {
|
|
77
|
+
PagesAPI.getPages().then((result) => {
|
|
78
|
+
if (Array.isArray(result.result)) {
|
|
79
|
+
setPages(result.result);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
};
|
|
157
83
|
|
|
158
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Load the Models
|
|
86
|
+
*/
|
|
87
|
+
const getModels = () => {
|
|
88
|
+
ModelsAPI.get().then((result) => {
|
|
89
|
+
// console.log(result);
|
|
159
90
|
|
|
160
|
-
|
|
161
|
-
|
|
91
|
+
setModels(result.result);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
162
94
|
|
|
163
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Load the Models
|
|
97
|
+
*/
|
|
98
|
+
const getMenus = () => {
|
|
99
|
+
MenusAPI.get().then((result) => {
|
|
100
|
+
// console.log(result);
|
|
164
101
|
|
|
165
|
-
|
|
102
|
+
setMenus(result.result);
|
|
103
|
+
});
|
|
104
|
+
};
|
|
166
105
|
|
|
167
|
-
|
|
168
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Submit values
|
|
108
|
+
*/
|
|
109
|
+
const onSubmit = (values) => {
|
|
110
|
+
// console.log(values);
|
|
111
|
+
setLoading(true);
|
|
169
112
|
|
|
170
|
-
|
|
171
|
-
message.success('Menu Added');
|
|
113
|
+
let id = formContent.id;
|
|
172
114
|
|
|
173
|
-
|
|
115
|
+
// Add the step to form content
|
|
116
|
+
// values.step = step;
|
|
174
117
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return (
|
|
182
|
-
<section className="collection-add menu-add">
|
|
183
|
-
{/* <Title level={4}>{mode} Menu</Title> */}
|
|
184
|
-
|
|
185
|
-
{loading ? (
|
|
186
|
-
<Skeleton />
|
|
187
|
-
) : (
|
|
188
|
-
<Form initialValues={{ ...body }} form={form} layout="vertical" onFinish={onSubmit}>
|
|
189
|
-
|
|
190
|
-
<div className='form-container'>
|
|
191
|
-
<div className='left-container'>
|
|
118
|
+
if (values.attributes && typeof values === 'object') {
|
|
119
|
+
values = {
|
|
120
|
+
...values,
|
|
121
|
+
attributes: JSON.stringify(values.attributes),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
192
124
|
|
|
125
|
+
if (id) {
|
|
126
|
+
// Update of model
|
|
127
|
+
model.update({ id, values }).then(() => {
|
|
128
|
+
// callback();
|
|
129
|
+
message.success('Menu Updated');
|
|
193
130
|
|
|
194
|
-
|
|
195
|
-
<Form.Item name={"caption"} label="Caption" required>
|
|
196
|
-
<Input placeholder="Enter caption" />
|
|
197
|
-
</Form.Item>
|
|
198
|
-
{/* Caption Ends */}
|
|
131
|
+
setLoading(false);
|
|
199
132
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
{/* Name Ends */}
|
|
133
|
+
callback();
|
|
134
|
+
});
|
|
135
|
+
} else {
|
|
136
|
+
values.step = step;
|
|
205
137
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
{/* Description Ends */}
|
|
138
|
+
// Append the additional queries to the object
|
|
139
|
+
additional_queries.forEach(({ field, value }) => {
|
|
140
|
+
values[field] = value;
|
|
141
|
+
});
|
|
211
142
|
|
|
212
|
-
|
|
213
|
-
|
|
143
|
+
// add new model
|
|
144
|
+
model.add({ values }).then(() => {
|
|
145
|
+
// callback();
|
|
146
|
+
message.success('Menu Added');
|
|
214
147
|
|
|
215
|
-
|
|
216
|
-
<Select showSearch style={{ width: '100%' }}
|
|
217
|
-
placeholder="Select a Page"
|
|
218
|
-
optionFilterProp="label"
|
|
219
|
-
>
|
|
220
|
-
{models.map((model, key) => (
|
|
221
|
-
<Option key={key} label={model.name} value={model.id}>{model.name}</Option>
|
|
222
|
-
))}
|
|
223
|
-
</Select>
|
|
148
|
+
setLoading(false);
|
|
224
149
|
|
|
225
|
-
|
|
226
|
-
|
|
150
|
+
callback();
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<section className="collection-add menu-add">
|
|
157
|
+
<Title level={4}>{mode} Menu</Title>
|
|
158
|
+
|
|
159
|
+
{loading ? (
|
|
160
|
+
<Skeleton />
|
|
161
|
+
) : (
|
|
162
|
+
<Form initialValues={{ ...body }} form={form} layout="vertical" onFinish={onSubmit}>
|
|
163
|
+
<div className="form-container">
|
|
164
|
+
<div className="left-container">
|
|
165
|
+
{/* Caption */}
|
|
166
|
+
<Form.Item name={'caption'} label="Caption" required>
|
|
167
|
+
<Input placeholder="Enter caption" />
|
|
168
|
+
</Form.Item>
|
|
169
|
+
{/* Caption Ends */}
|
|
170
|
+
|
|
171
|
+
{/* Name */}
|
|
172
|
+
<Form.Item name={'name'} label="Name" required>
|
|
173
|
+
<Input placeholder="Enter name" />
|
|
174
|
+
</Form.Item>
|
|
175
|
+
{/* Name Ends */}
|
|
176
|
+
|
|
177
|
+
{/* Description */}
|
|
178
|
+
<Form.Item name={'description'} label="Description">
|
|
179
|
+
<TextArea placeholder="Enter Description" />
|
|
180
|
+
</Form.Item>
|
|
181
|
+
{/* Description Ends */}
|
|
182
|
+
|
|
183
|
+
{/* Model */}
|
|
184
|
+
<Form.Item label="Models" name={'model_id'}>
|
|
185
|
+
{/* <ReferenceSelect value={model.id} label={model.name} model={Models} /> */}
|
|
186
|
+
<Select showSearch style={{ width: '100%' }} placeholder="Select a Page" optionFilterProp="label">
|
|
187
|
+
{models.map((model, key) => (
|
|
188
|
+
<Option key={key} label={model.name} value={model.id}>
|
|
189
|
+
{model.name}
|
|
190
|
+
</Option>
|
|
191
|
+
))}
|
|
192
|
+
</Select>
|
|
193
|
+
</Form.Item>
|
|
194
|
+
{/* Model Ends
|
|
227
195
|
|
|
228
196
|
|
|
229
197
|
{/* Pages */}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
</div>
|
|
318
|
-
|
|
319
|
-
</Form>
|
|
320
|
-
)}
|
|
321
|
-
</section>
|
|
322
|
-
);
|
|
198
|
+
<Form.Item label="Pages" name={'page_id'}>
|
|
199
|
+
{/* <ReferenceSelect value={pages.id} label={pages.name} model={Pages} /> */}
|
|
200
|
+
|
|
201
|
+
<Select showSearch optionFilterProp="children" style={{ width: '100%' }}>
|
|
202
|
+
{pages.map((model, key) => (
|
|
203
|
+
<Option key={key} value={model.id}>
|
|
204
|
+
{model.name}
|
|
205
|
+
</Option>
|
|
206
|
+
))}
|
|
207
|
+
</Select>
|
|
208
|
+
</Form.Item>
|
|
209
|
+
{/* Pages Ends */}
|
|
210
|
+
|
|
211
|
+
{/* Pages */}
|
|
212
|
+
<Form.Item label="Header" name={'header_id'}>
|
|
213
|
+
{/* <ReferenceSelect value={pages.id} label={pages.name} model={Pages} /> */}
|
|
214
|
+
|
|
215
|
+
<Select
|
|
216
|
+
showSearch
|
|
217
|
+
style={{ width: '100%' }}
|
|
218
|
+
placeholder="Select header"
|
|
219
|
+
optionFilterProp="children"
|
|
220
|
+
filterOption={(input, option) => option.children.toLowerCase().includes(input.toLowerCase())}
|
|
221
|
+
>
|
|
222
|
+
{menus.map((menu) => (
|
|
223
|
+
<Option key={menu.id} value={menu.id}>
|
|
224
|
+
{menu.name}
|
|
225
|
+
</Option>
|
|
226
|
+
))}
|
|
227
|
+
</Select>
|
|
228
|
+
</Form.Item>
|
|
229
|
+
{/* Pages Ends */}
|
|
230
|
+
|
|
231
|
+
{/* Path */}
|
|
232
|
+
<Form.Item name="path" label="Path" required>
|
|
233
|
+
<Input placeholder="Enter path" />
|
|
234
|
+
</Form.Item>
|
|
235
|
+
{/* Path Ends */}
|
|
236
|
+
|
|
237
|
+
{/* Route */}
|
|
238
|
+
<Form.Item name="route" label="Route" required>
|
|
239
|
+
<Input placeholder="Enter route" />
|
|
240
|
+
</Form.Item>
|
|
241
|
+
{/* Route Ends */}
|
|
242
|
+
|
|
243
|
+
{/* Switch */}
|
|
244
|
+
<Form.Item name="is_visible" label="Visible" required>
|
|
245
|
+
<Switch defaultChecked={body.is_visible} />
|
|
246
|
+
</Form.Item>
|
|
247
|
+
{/* Switch Ends */}
|
|
248
|
+
|
|
249
|
+
{/* Step */}
|
|
250
|
+
<Form.Item name={'order'} label="Order" required>
|
|
251
|
+
<InputNumber placeholder="Enter order" />
|
|
252
|
+
</Form.Item>
|
|
253
|
+
{/* Step Ends */}
|
|
254
|
+
|
|
255
|
+
{/* Icon Name*/}
|
|
256
|
+
<Form.Item name="icon_name" label="Icon Name" required>
|
|
257
|
+
<Input placeholder="Enter icon name" />
|
|
258
|
+
</Form.Item>
|
|
259
|
+
{/* Icon Name Ends */}
|
|
260
|
+
|
|
261
|
+
{/* Step */}
|
|
262
|
+
<Form.Item name={'step'} label="Step" required>
|
|
263
|
+
<InputNumber placeholder="Enter step" />
|
|
264
|
+
</Form.Item>
|
|
265
|
+
{/* Step Ends */}
|
|
266
|
+
|
|
267
|
+
<Form.Item>
|
|
268
|
+
<Button loading={loading} htmlType={'submit'} type="primary">
|
|
269
|
+
Submit
|
|
270
|
+
</Button>
|
|
271
|
+
</Form.Item>
|
|
272
|
+
</div>
|
|
273
|
+
<div className="right-container">
|
|
274
|
+
{/* Description */}
|
|
275
|
+
<Form.Item name={'attributes'} label="Attributes">
|
|
276
|
+
<JSONInput />
|
|
277
|
+
</Form.Item>
|
|
278
|
+
{/* Description Ends */}
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
</Form>
|
|
282
|
+
)}
|
|
283
|
+
</section>
|
|
284
|
+
);
|
|
323
285
|
};
|
|
324
286
|
|
|
325
287
|
export default MenuAdd;
|