ui-soxo-bootstrap-core 2.4.25-dev.8 → 2.4.25

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.
Files changed (31) hide show
  1. package/.github/workflows/npm-publish.yml +15 -37
  2. package/core/components/extra-info/extra-info-details.js +126 -109
  3. package/core/components/landing-api/landing-api.js +30 -22
  4. package/core/lib/Store.js +18 -20
  5. package/core/lib/components/index.js +1 -4
  6. package/core/lib/components/sidemenu/sidemenu.js +256 -153
  7. package/core/lib/components/sidemenu/sidemenu.scss +26 -39
  8. package/core/lib/hooks/index.js +12 -2
  9. package/core/lib/pages/login/login.js +139 -255
  10. package/core/lib/pages/login/login.scss +32 -140
  11. package/core/models/dashboard/dashboard.js +0 -14
  12. package/core/models/menus/components/menu-add/menu-add.js +268 -230
  13. package/core/models/menus/components/menu-lists/menu-lists.js +89 -126
  14. package/core/models/menus/components/menu-lists/menu-lists.scss +0 -9
  15. package/core/models/menus/menus.js +267 -247
  16. package/core/models/roles/components/role-add/role-add.js +227 -269
  17. package/core/models/roles/components/role-list/role-list.js +6 -8
  18. package/core/models/roles/roles.js +174 -182
  19. package/core/models/users/components/user-add/user-add.js +1 -69
  20. package/core/models/users/users.js +0 -57
  21. package/core/modules/index.js +13 -23
  22. package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +1 -1
  23. package/package.json +2 -2
  24. package/README.md +0 -260
  25. package/core/lib/hooks/use-otp-timer.js +0 -99
  26. package/core/models/staff/components/staff-add/staff-add.js +0 -352
  27. package/core/models/staff/components/staff-add/staff-add.scss +0 -0
  28. package/core/modules/steps/action-buttons.js +0 -79
  29. package/core/modules/steps/steps.js +0 -553
  30. package/core/modules/steps/steps.scss +0 -158
  31. package/core/modules/steps/timeline.js +0 -49
@@ -9,188 +9,180 @@ import { DateUtils } from './../../lib/';
9
9
  import { ApiUtils } from './../../lib/';
10
10
 
11
11
  class RolesAPI extends BaseAPI {
12
- constructor() {
13
- super();
14
-
15
- this.fields = [
16
- {
17
- field: 'name',
18
- caption: 'Name',
19
- },
20
-
21
- {
22
- field: 'description',
23
- caption: 'Description',
24
- },
25
-
26
- {
27
- field: 'path',
28
- caption: 'Path',
29
- },
30
- ];
31
- }
32
-
33
- relativeAdd() {
34
- return true;
35
- }
36
-
37
- get getEndpoint() {
38
- return 'core-roles';
39
- }
40
-
41
- get path() {
42
- return `roles`;
43
- }
44
-
45
- get getName() {
46
- return this.modelName + `s`;
47
- }
48
-
49
- get modelName() {
50
- return `core-role`;
51
- }
52
-
53
- get columns() {
54
- return [
55
- // {
56
- // caption: 'Type',
57
- // field: 'type',
58
- // key: 'type',
59
- // },
60
-
61
- {
62
- caption: 'Role',
63
- field: 'name',
64
- key: 'name',
65
- },
66
- {
67
- field: 'description',
68
- caption: 'Description',
69
- key: 'description',
70
- },
71
-
72
- // {
73
- // caption: 'Identifier',
74
- // field: 'identifier',
75
- // key: 'identifier',
76
- // },
77
-
78
- // {
79
- // caption: 'Mode',
80
- // field: 'mode',
81
- // key: 'mode',
82
- // },
83
-
84
- // {
85
- // caption: 'Created By',
86
- // field: 'created_by',
87
- // key: 'created_by',
88
- // },
89
-
90
- {
91
- caption: 'Created at',
92
- field: 'created_at',
93
- key: 'created_at',
94
- render: (ele) => {
95
- return ele.created_at ? DateUtils.formatDate(ele.created_at) : null;
96
- },
97
- },
98
-
99
- // {
100
- // // field: '',
101
- // title: 'Eye',
102
- // render: record => {
103
- // return (
104
- // <ExtraInfoDetail icon={true} modeValue='RD' title='Role Details' {...record} />
105
-
106
- // );
107
- // },
108
- // }
109
- ];
110
- }
111
-
112
- ListComponent = RoleList;
113
-
114
- ModalAddComponent = (props) => <RoleAdd model={this} {...props} />;
115
-
116
- /**
117
- * load the detail of role
118
- *
119
- * @param {*} menu
120
- * @returns
121
- */
122
- getDetail = (id) => {
123
- return this.getRecord(id).then((result) => {
124
- return result;
125
- });
126
- };
127
-
128
- /**
129
- * load the list of role
130
- *
131
- * @param {*} menu
132
- * @returns
133
- */
134
- getRoles = (config) => {
135
- // return this.getData({ path: `menus/get-menus`, queries: queries}).then((result) => {
136
- // return result;
137
- // });
138
-
139
- return this.get({ url: `admin/role`, config: config }).then((result) => {
140
- return result;
141
- });
142
- };
143
-
144
- deleteRole = (id) => {
145
- return ApiUtils.delete({
146
- url: `core-roles/delete/${id}`,
147
- });
148
- };
149
-
150
- getRole = () => {
151
- return ApiUtils.get({
152
- url: `core-roles/get-core-roles?active=Y`,
153
- });
154
- };
155
-
156
- /**
157
- * Cutsom Api for creating user
158
- *
159
- * @param {*} values
160
- * @returns
161
- */
162
- createRole = (formBody) => {
163
- return ApiUtils.post({
164
- url: `core-roles/save-core-role`,
165
- formBody,
166
- });
167
- };
168
-
169
- /**
170
- * Cutsom Api for updating user
171
- *
172
- * @param {*} values
173
- * @returns
174
- */
175
- updateRole = ({ id, formBody }) => {
176
- return ApiUtils.put({ url: `core-roles/update/${id}`, formBody });
177
- };
178
-
179
- // /**
180
- // * Function to load the roles
181
- // *
182
- // * @param {*} item
183
- // * @returns
184
- // */
185
- // loadMenus = (item) => {
186
- // return this.get().then((result) => {
187
- // return Promise.all(result.menus.map(this.loadDetail)).then((result) => {
188
- // return { menus: result };
189
- // });
190
- // });
191
- // };
192
-
193
- // ModalAddComponent =
12
+
13
+ constructor() {
14
+
15
+ super();
16
+
17
+ this.fields = [
18
+ {
19
+ field: 'name',
20
+ caption: 'Name',
21
+ },
22
+
23
+ {
24
+ field: 'description',
25
+ caption: 'Description',
26
+ },
27
+
28
+ {
29
+ field: 'path',
30
+ caption: 'Path',
31
+ },
32
+ ];
33
+
34
+ }
35
+
36
+ relativeAdd() {
37
+ return true;
38
+ }
39
+
40
+
41
+ get getEndpoint() {
42
+ return 'core-roles';
43
+ }
44
+
45
+ get path() {
46
+ return `roles`;
47
+ }
48
+
49
+ get getName() {
50
+ return this.modelName + `s`;
51
+ }
52
+
53
+ get modelName() {
54
+ return `core-role`;
55
+ }
56
+
57
+ get columns() {
58
+ return [
59
+
60
+ // {
61
+ // caption: 'Type',
62
+ // field: 'type',
63
+ // key: 'type',
64
+ // },
65
+
66
+ {
67
+ caption: 'Name',
68
+ field: 'name',
69
+ key: 'name',
70
+ },
71
+
72
+ {
73
+ caption: 'Identifier',
74
+ field: 'identifier',
75
+ key: 'identifier',
76
+ },
77
+
78
+ // {
79
+ // caption: 'Mode',
80
+ // field: 'mode',
81
+ // key: 'mode',
82
+ // },
83
+
84
+ // {
85
+ // caption: 'Created By',
86
+ // field: 'created_by',
87
+ // key: 'created_by',
88
+ // },
89
+
90
+ {
91
+ caption: 'Created at',
92
+ field: 'created_at',
93
+ key: 'created_at',
94
+ render: (ele) => {
95
+ return ele.created_at ? DateUtils.formatDate(ele.created_at) : null
96
+ },
97
+ },
98
+
99
+ // {
100
+ // // field: '',
101
+ // title: 'Eye',
102
+ // render: record => {
103
+ // return (
104
+ // <ExtraInfoDetail icon={true} modeValue='RD' title='Role Details' {...record} />
105
+
106
+ // );
107
+ // },
108
+ // }
109
+ ];
110
+ }
111
+
112
+ ListComponent = RoleList;
113
+
114
+ ModalAddComponent = (props) => <RoleAdd model={this} {...props} />;
115
+
116
+
117
+ /**
118
+ * load the detail of role
119
+ *
120
+ * @param {*} menu
121
+ * @returns
122
+ */
123
+ getDetail = (id) => {
124
+ return this.getRecord(id).then((result) => {
125
+ return result;
126
+ });
127
+ };
128
+
129
+ /**
130
+ * load the list of role
131
+ *
132
+ * @param {*} menu
133
+ * @returns
134
+ */
135
+ getRoles = (config) => {
136
+
137
+ // return this.getData({ path: `menus/get-menus`, queries: queries}).then((result) => {
138
+ // return result;
139
+ // });
140
+
141
+ return this.get({ url: `admin/role`, config: config }).then((result) => {
142
+ return result;
143
+ });
144
+
145
+ };
146
+
147
+ /**
148
+ * Cutsom Api for creating user
149
+ *
150
+ * @param {*} values
151
+ * @returns
152
+ */
153
+ createRole = (formBody) => {
154
+ return ApiUtils.post({ url: `core-roles/create`, formBody });
155
+ }
156
+
157
+
158
+ /**
159
+ * Cutsom Api for updating user
160
+ *
161
+ * @param {*} values
162
+ * @returns
163
+ */
164
+ updateRole = ({ id, formBody }) => {
165
+ return ApiUtils.put({ url: `core-roles/update/${id}`, formBody });
166
+ }
167
+
168
+
169
+ // /**
170
+ // * Function to load the roles
171
+ // *
172
+ // * @param {*} item
173
+ // * @returns
174
+ // */
175
+ // loadMenus = (item) => {
176
+ // return this.get().then((result) => {
177
+ // return Promise.all(result.menus.map(this.loadDetail)).then((result) => {
178
+ // return { menus: result };
179
+ // });
180
+ // });
181
+ // };
182
+
183
+ // ModalAddComponent =
184
+
185
+
194
186
  }
195
187
 
196
188
  export default RolesAPI;
@@ -12,7 +12,6 @@ import { ModelsAPI, PagesAPI } from '../../..';
12
12
 
13
13
  import { UsersAPI } from '../../..';
14
14
  import DoctorAdd from '../../../doctor/components/doctor-add/doctor-add';
15
- import StaffAdd from '../../../staff/components/staff-add/staff-add';
16
15
 
17
16
  const { Title } = Typography;
18
17
 
@@ -38,9 +37,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
38
37
  const [users, setUsers] = useState([]);
39
38
  const [doctorID, setDoctorID] = useState(false);
40
39
  const [selectedDoctor, setSelectedDoctor] = useState(null);
41
- const [staffID, setStaffID] = useState(false);
42
- const [selectedStaff, setSelectedStaff] = useState(null);
43
- const [staffList, setStaffList] = useState([]);
44
40
  /**Converting to JSON */
45
41
  let firmDetails = JSON.parse(user.firm.f_otherdetails1);
46
42
 
@@ -164,7 +160,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
164
160
  { label: 'General', value: 'GEN' },
165
161
  { label: 'Doctor', value: 'RAD' },
166
162
  { label: 'Radiographer', value: 'TECH' },
167
- { label: 'Staff', value: 'STAFF' },
168
163
  ];
169
164
 
170
165
  /**
@@ -242,25 +237,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
242
237
  })
243
238
  .catch((err) => console.error('Doctor API Error:', err));
244
239
  };
245
- /** Get staff List */
246
- const getStaff = () => {
247
- UsersAPI.getAllStaff()
248
- .then((res) => {
249
- console.log('Staff List Response:', res);
250
-
251
- if (Array.isArray(res)) {
252
- const list = res.map((staff) => ({
253
- label: `${staff.shortName || 'No Name'} (${staff.id})`,
254
- value: staff.id,
255
- }));
256
-
257
- setStaffList(list);
258
- } else {
259
- console.error('API did not return an array!');
260
- }
261
- })
262
- .catch((err) => console.error('staff API Error:', err));
263
- };
264
240
 
265
241
  // Function to handle user type change
266
242
  const handleUserTypeChange = (value) => {
@@ -271,11 +247,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
271
247
  } else {
272
248
  form.setFieldsValue({ default_code: undefined });
273
249
  }
274
- if (value === 'STAFF') {
275
- getStaff(); // load staff list
276
- } else {
277
- form.setFieldsValue({ staff_code: undefined });
278
- }
279
250
  };
280
251
 
281
252
  useEffect(() => {
@@ -283,7 +254,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
283
254
  getDesignations();
284
255
  getDepartments();
285
256
  getDoctors(); // load doctor list
286
- getStaff();
287
257
  }, []);
288
258
 
289
259
  useEffect(() => {
@@ -294,9 +264,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
294
264
  if (formContent.user_type === 'RAD' && formContent.doctor_code) {
295
265
  form.setFieldsValue({ default_code: formContent.doctor_code });
296
266
  }
297
- if (formContent.user_type === 'STAFF' && formContent.staff_code) {
298
- form.setFieldsValue({ staff_code: formContent.staff_code });
299
- }
300
267
  }
301
268
  if (formContent?.id && formContent?.organization_details) {
302
269
  try {
@@ -327,6 +294,7 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
327
294
  * Submit values
328
295
  */
329
296
  const onSubmit = (values) => {
297
+ console.log('values____________', values);
330
298
  /**If PanelOpen is open and edit mode then password will be existing password else new password*/
331
299
  if (!isPasswordVisible && mode === 'Edit') {
332
300
  values.password = body.password;
@@ -338,11 +306,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
338
306
  } else {
339
307
  values.doctor_code = null;
340
308
  }
341
- if (values.user_type === 'STAFF') {
342
- values.staff_code = values.staff_code;
343
- } else {
344
- values.staff_code = null;
345
- }
346
309
  values = {
347
310
  ...values,
348
311
  auth_type: 'LDAP',
@@ -518,37 +481,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
518
481
  />
519
482
  </Form.Item>
520
483
  )}
521
- {userType === 'STAFF' && (
522
- <Form.Item name="staff_code" label="Staff Code" rules={[{ required: true, message: 'Please select a staff code' }]}>
523
- <Select
524
- placeholder="Select Code"
525
- options={staffList}
526
- showSearch
527
- optionFilterProp="label"
528
- dropdownRender={(menu) => (
529
- <>
530
- {menu}
531
- <div
532
- style={{
533
- padding: '8px',
534
- cursor: 'pointer',
535
- borderTop: '1px solid #f0f0f0',
536
- color: '#1890ff',
537
- }}
538
- onClick={() => setVisible(true)}
539
- >
540
- + Add New Staff
541
- </div>
542
- </>
543
- )}
544
- />
545
- {/* Render DoctorAdd OUTSIDE the Select */}
546
-
547
- <StaffAdd visible={visible} onCancel={() => setVisible(false)} staffData={selectedStaff} staffId={staffID} onSuccess={getStaff} />
548
-
549
- <></>
550
- </Form.Item>
551
- )}
552
484
  </Col>
553
485
  </Row>
554
486
  <Row gutter={16}>
@@ -276,63 +276,6 @@ class Users extends Base {
276
276
  getUser = ({ id }) => {
277
277
  return ApiUtils.get({ url: `users/${id}` });
278
278
  };
279
-
280
- /**
281
- *Cutsom Api for creating staff
282
- * @returns
283
- */
284
-
285
- createStaff = (formBody) => {
286
- return ApiUtils.post({
287
- url: `staff/create-staff`,
288
- formBody,
289
- });
290
- };
291
-
292
- /**
293
- * Update a staff by ID
294
- * @param {Object} formBody - Data to update
295
- * @param {string|number} id - Staff ID
296
- * @returns {Promise} API response
297
- */
298
- updateStaff = (formBody, id) => {
299
- return ApiUtils.put({
300
- url: `staff/update-staff/${id}`,
301
- formBody,
302
- });
303
- };
304
-
305
- /**
306
- * edit staff with id
307
- * @returns
308
- */
309
-
310
- getStaff = (id) => {
311
- return ApiUtils.get({
312
- url: `staff/get-staff/${id}`,
313
- });
314
- };
315
-
316
- /**
317
- * staff code validation
318
- *
319
- */
320
- getStaffCode = (code) => {
321
- return ApiUtils.get({
322
- url: `staff/check-staff-exists/${code}`,
323
- });
324
- };
325
-
326
- /**
327
- * get all staff
328
- * @returns
329
- */
330
-
331
- getAllStaff = () => {
332
- return ApiUtils.get({
333
- url: 'staff/get-all-staff',
334
- });
335
- };
336
279
  }
337
280
 
338
281
  export default Users;
@@ -22,30 +22,20 @@ import ReportingDashboard from '../modules/reporting/components/reporting-dashbo
22
22
 
23
23
  import ChangeInfo from './Informations/change-info/change-info';
24
24
  // All Dashboard Components Ends
25
- import ProcessStepsPage from './steps/steps';
26
-
27
25
 
28
26
  export {
29
- ProcessStepsPage,
30
- GenericList,
31
- GenericAdd,
32
-
33
- GenericEdit,
34
-
35
- GenericDetail,
36
-
37
- ModuleRoutes,
38
-
39
-
40
- DashboardCard,
41
-
42
- PopQueryDashboard,
43
- HomePageAPI,
44
- Profile,
45
- ReportingDashboard,
46
- ChangePassword,
47
- ChangeInfo
48
- }
49
-
27
+ GenericList,
28
+ GenericAdd,
29
+ GenericEdit,
30
+ GenericDetail,
31
+ ModuleRoutes,
32
+ DashboardCard,
33
+ PopQueryDashboard,
34
+ HomePageAPI,
35
+ Profile,
36
+ ReportingDashboard,
37
+ ChangePassword,
38
+ ChangeInfo,
39
+ };
50
40
 
51
41
  // export { Generic } from './generic/generic-detail/generic-detail';
@@ -565,7 +565,7 @@ function GuestList({
565
565
  attributes,
566
566
  fetchReportData,
567
567
  }) {
568
-
568
+ console.log(attributes, '_____________________________________');
569
569
  /**
570
570
  * @param {*} propValues
571
571
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-soxo-bootstrap-core",
3
- "version": "2.4.25-dev.8",
3
+ "version": "2.4.25",
4
4
  "description": "All the Core Components for you to start",
5
5
  "keywords": [
6
6
  "all in one"
@@ -19,7 +19,7 @@
19
19
  "build": "webpack --mode production",
20
20
  "deploy": "gh-pages -d examples/build",
21
21
  "quick-deploy": "git status && git add . && git commit -m \"Theme Updates\" && git push",
22
- "release": "git tag -a v2023-v2.0.92 -m \"Theme Updates\" && npm run quick-deploy && npm publish",
22
+ "release": "git tag -a v2023-v2.0.91 -m \"Theme Updates\" && npm run quick-deploy && npm publish",
23
23
  "quick-commit": "git status && git add . && git commit -m 'Saving changes after deploying' && git push ",
24
24
  "publish-demo": "npm run build && npm run deploy",
25
25
  "lint": "eslint core",