ui-soxo-bootstrap-core 2.4.24 → 2.4.25-dev.7

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 (33) hide show
  1. package/.github/workflows/npm-publish.yml +37 -15
  2. package/README.md +260 -0
  3. package/core/components/extra-info/extra-info-details.js +109 -126
  4. package/core/components/landing-api/landing-api.js +22 -30
  5. package/core/lib/Store.js +20 -18
  6. package/core/lib/components/index.js +4 -1
  7. package/core/lib/components/sidemenu/sidemenu.js +153 -256
  8. package/core/lib/components/sidemenu/sidemenu.scss +39 -26
  9. package/core/lib/hooks/index.js +2 -12
  10. package/core/lib/hooks/use-otp-timer.js +99 -0
  11. package/core/lib/pages/login/login.js +255 -139
  12. package/core/lib/pages/login/login.scss +140 -32
  13. package/core/models/dashboard/dashboard.js +14 -0
  14. package/core/models/doctor/components/doctor-add/doctor-add.js +403 -0
  15. package/core/models/doctor/components/doctor-add/doctor-add.scss +32 -0
  16. package/core/models/menus/components/menu-add/menu-add.js +230 -268
  17. package/core/models/menus/components/menu-lists/menu-lists.js +126 -89
  18. package/core/models/menus/components/menu-lists/menu-lists.scss +9 -0
  19. package/core/models/menus/menus.js +247 -267
  20. package/core/models/roles/components/role-add/role-add.js +269 -227
  21. package/core/models/roles/components/role-list/role-list.js +8 -6
  22. package/core/models/roles/roles.js +182 -174
  23. package/core/models/users/components/user-add/user-add.js +619 -365
  24. package/core/models/users/components/user-add/user-edit.js +90 -0
  25. package/core/models/users/users.js +261 -165
  26. package/core/modules/index.js +5 -8
  27. package/core/modules/reporting/components/index.js +5 -0
  28. package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +65 -2
  29. package/core/modules/steps/action-buttons.js +79 -0
  30. package/core/modules/steps/steps.js +553 -0
  31. package/core/modules/steps/steps.scss +158 -0
  32. package/core/modules/steps/timeline.js +49 -0
  33. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
2
  import React from 'react';
3
3
  import Base from '../base/base';
4
-
4
+ import { ApiUtils } from '../../lib'; // adjust path if needed
5
5
 
6
6
  import MenuList from './components/menu-list/menu-list';
7
7
 
@@ -12,7 +12,6 @@ import MenuAdd from './components/menu-add/menu-add';
12
12
  import { DateUtils } from './../../lib/';
13
13
  import MenuLists from './components/menu-lists/menu-lists';
14
14
 
15
-
16
15
  // import MenuAdd from '../modules/common/resources/menu-add/menu-add';
17
16
 
18
17
  // import MenuDetail from '../modules/common/resources/menu-detail/menu-detail';
@@ -20,272 +19,253 @@ import MenuLists from './components/menu-lists/menu-lists';
20
19
  // import { Models, Pages, Modules } from './index';
21
20
 
22
21
  class MenusAPI extends Base {
23
-
24
- constructor() {
25
-
26
- super();
27
-
28
- // this.id = model.id;
29
-
30
- // this.name = 'Menus';
31
-
32
- this.fields = [
33
- {
34
- field: 'name',
35
- caption: 'Name',
36
- },
37
- {
38
- field: 'path',
39
- caption: 'Path',
40
- },
41
- ];
42
- }
43
-
44
- get getEndpoint() {
45
- return 'core-menus';
46
- }
47
-
48
- get path() {
49
- return `menus`;
50
- }
51
-
52
- get getName() {
53
- return this.modelName;
54
- }
55
-
56
- get modelName() {
57
- return `core-menus`;
58
- }
59
-
60
- get route() {
61
- return 'core-menus';
62
- }
63
-
64
- get disableAddModal() {
65
- return false;
66
- }
67
-
68
- get disableEditModal() {
69
- return false;
70
- }
71
-
72
- /**
73
- *
74
- */
75
- get columns() {
76
- return [
77
-
78
- {
79
- caption: 'Id',
80
- field: 'id',
81
- key: 'id',
82
- },
83
-
84
- {
85
- caption: 'Name',
86
- field: 'name',
87
- key: 'name',
88
- },
89
-
90
- {
91
- caption: 'Description',
92
- field: 'description',
93
- key: 'description',
94
- },
95
-
96
- {
97
- caption: 'Path',
98
- field: 'path',
99
- key: 'path',
100
- },
101
-
102
- {
103
- caption: 'Route',
104
- field: 'route',
105
- key: 'route',
106
- },
107
- {
108
- caption: 'Created at',
109
- field: 'created_at',
110
- key: 'created_at',
111
- render: (ele) => {
112
- return ele.created_at ? DateUtils.formatDate(ele.created_at) : null
113
- },
114
- },
115
- ];
116
- }
117
-
118
- ListComponent = MenuLists;
119
-
120
- DetailComponent = MenuDetail;
121
-
122
- ModalAddComponent = (props) => <MenuAdd model={this} {...props} />;
123
-
124
- // ModalAddComponent = (props) => <GenericAdd model={this} {...props} />;
125
-
126
- /**
127
- * Get the data from the table
128
- */
129
- // get = (queries) => {
130
- // return this.getMethod(queries).then((result) => {
131
- // return Promise.all(result.menus.map((menu) => this.loadModule(menu))).then((result) => {
132
- // return { menus: result };
133
- // });
134
- // });
135
- // };
136
-
137
- /**
138
- * Load the module of the menu
139
- *
140
- * @param {*} param0
141
- * @returns
142
- */
143
- loadModule = (menu) => { };
144
-
145
- /**
146
- * load the detail of menu
147
- *
148
- * @param {*} menu
149
- * @returns
150
- */
151
- getDetail = (id) => {
152
- return this.getRecord(id).then((result) => {
153
- return result;
154
- });
155
- };
156
-
157
- /**
158
- * load the list of menu
159
- *
160
- * @param {*} menu
161
- * @returns
162
- */
163
- getMenus = (config) => {
22
+ constructor() {
23
+ super();
24
+
25
+ // this.id = model.id;
26
+
27
+ // this.name = 'Menus';
28
+
29
+ this.fields = [
30
+ {
31
+ field: 'name',
32
+ caption: 'Name',
33
+ },
34
+ {
35
+ field: 'path',
36
+ caption: 'Path',
37
+ },
38
+ ];
39
+ }
40
+
41
+ get getEndpoint() {
42
+ return 'core-menus';
43
+ }
44
+
45
+ get path() {
46
+ return `menus`;
47
+ }
48
+
49
+ get getName() {
50
+ return this.modelName;
51
+ }
52
+
53
+ get modelName() {
54
+ return `core-menus`;
55
+ }
56
+
57
+ get route() {
58
+ return 'core-menus';
59
+ }
60
+
61
+ get disableAddModal() {
62
+ return false;
63
+ }
64
+
65
+ get disableEditModal() {
66
+ return false;
67
+ }
68
+
69
+ /**
70
+ *
71
+ */
72
+ get columns() {
73
+ return [
74
+ {
75
+ caption: 'Id',
76
+ field: 'id',
77
+ key: 'id',
78
+ },
79
+
80
+ {
81
+ caption: 'Name',
82
+ field: 'name',
83
+ key: 'name',
84
+ },
85
+
86
+ {
87
+ caption: 'Description',
88
+ field: 'description',
89
+ key: 'description',
90
+ },
91
+
92
+ {
93
+ caption: 'Path',
94
+ field: 'path',
95
+ key: 'path',
96
+ },
97
+
98
+ {
99
+ caption: 'Route',
100
+ field: 'route',
101
+ key: 'route',
102
+ },
103
+ {
104
+ caption: 'Created at',
105
+ field: 'created_at',
106
+ key: 'created_at',
107
+ render: (ele) => {
108
+ return ele.created_at ? DateUtils.formatDate(ele.created_at) : null;
109
+ },
110
+ },
111
+ ];
112
+ }
113
+
114
+ ListComponent = MenuLists;
115
+
116
+ DetailComponent = MenuDetail;
117
+
118
+ ModalAddComponent = (props) => <MenuAdd model={this} {...props} />;
119
+
120
+ // ModalAddComponent = (props) => <GenericAdd model={this} {...props} />;
121
+
122
+ /**
123
+ * Get the data from the table
124
+ */
125
+ // get = (queries) => {
126
+ // return this.getMethod(queries).then((result) => {
127
+ // return Promise.all(result.menus.map((menu) => this.loadModule(menu))).then((result) => {
128
+ // return { menus: result };
129
+ // });
130
+ // });
131
+ // };
132
+
133
+ /**
134
+ * Load the module of the menu
135
+ *
136
+ * @param {*} param0
137
+ * @returns
138
+ */
139
+ loadModule = (menu) => {};
140
+
141
+ /**
142
+ * load the detail of menu
143
+ *
144
+ * @param {*} menu
145
+ * @returns
146
+ */
147
+ getDetail = (id) => {
148
+ return this.getRecord(id).then((result) => {
149
+ return result;
150
+ });
151
+ };
152
+
153
+ /**
154
+ * Save menu order (drag & drop)
155
+ */
156
+ saveOrder = ({ formBody }) => {
157
+ return ApiUtils.put({
158
+ url: `core-menus/menu-order`,
159
+ formBody,
160
+ });
161
+ };
162
+
163
+ /**
164
+ * load the list of menu
165
+ *
166
+ * @param {*} menu
167
+ * @returns
168
+ */
169
+ getMenus = (config) => {
164
170
  // Use 'core-menus' endpoint if REACT_APP_USE_CORE_MENUS is true (used for Matria)
165
- const url = process.env.REACT_APP_USE_CORE_MENUS === 'true'
166
- ? 'core-menus/get-menus' // Matria
167
- : 'menus/get-menus'; // NURA
168
-
169
- return this.get({ url, config }).then(result => result);
170
- };
171
-
172
-
173
-
174
-
175
-
176
- getCoreMenus = () => {
177
-
178
- return [
179
-
180
- // {
181
-
182
- // caption: 'Configure',
183
- // sub_menus: [
184
-
185
- // // {
186
- // // // is_visible: true,
187
- // // path: '/process',
188
- // // caption: 'Process',
189
- // // },
190
-
191
- // // {
192
- // // path: '/models',
193
- // // caption: 'Models',
194
- // // },
195
-
196
- // {
197
- // path: '/pages',
198
- // caption: 'Pages',
199
- // },
200
-
201
-
202
- // {
203
- // path: '/forms',
204
- // caption: 'Forms',
205
- // },
206
-
207
- // {
208
- // path: '/actions',
209
- // caption: 'Actions',
210
- // },
211
-
212
- // {
213
- // path: '/permissions',
214
- // caption: 'Permissions',
215
- // },
216
-
217
- // {
218
- // path: '/questions',
219
- // caption: 'Questions',
220
- // },
221
-
222
-
223
- // {
224
- // path: '/lookup-types',
225
- // caption: 'Lookup Types',
226
- // },
227
-
228
- // ],
229
- // },
230
-
231
- // {
232
-
233
- // caption: 'Access Control',
234
- // sub_menus: [
235
- // // {
236
- // // path: '/users',
237
- // // caption: 'Users',
238
- // // },
239
-
240
- // {
241
- // path: '/roles',
242
- // caption: 'Roles',
243
- // },
244
-
245
- // {
246
- // path: '/menus',
247
- // caption: 'Menus',
248
- // },
249
- // ]
250
- // },
251
-
252
- // {
253
-
254
- // caption: 'Settings',
255
- // sub_menus: [
256
- // {
257
- // path: '/branches',
258
- // caption: 'Branches',
259
- // },
260
-
261
- // {
262
- // path: '/departments',
263
- // caption: 'Departments',
264
- // },
265
-
266
- // {
267
- // path: '/financial-years',
268
- // caption: 'Financial Years',
269
- // },
270
- // {
271
- // path: '/invoice-numbers',
272
- // caption: 'Invoice Numbers',
273
- // },
274
-
275
- // ]
276
- // },
277
- // {
278
- // caption: 'Preferences',
279
- // sub_menus: [{
280
- // path: '/change-password',
281
- // caption: 'Change Password'
282
- // }]
283
- // }
284
-
285
- ];
286
-
287
- }
288
-
171
+ const url =
172
+ process.env.REACT_APP_USE_CORE_MENUS === 'true'
173
+ ? 'core-menus/get-menus' // Matria
174
+ : 'menus/get-menus'; // NURA
175
+
176
+ return this.get({
177
+ url,
178
+ config,
179
+ }).then((result) => result);
180
+ };
181
+
182
+ getCoreMenus = () => {
183
+ return [
184
+ // {
185
+ // caption: 'Configure',
186
+ // sub_menus: [
187
+ // // {
188
+ // // // is_visible: true,
189
+ // // path: '/process',
190
+ // // caption: 'Process',
191
+ // // },
192
+ // // {
193
+ // // path: '/models',
194
+ // // caption: 'Models',
195
+ // // },
196
+ // {
197
+ // path: '/pages',
198
+ // caption: 'Pages',
199
+ // },
200
+ // {
201
+ // path: '/forms',
202
+ // caption: 'Forms',
203
+ // },
204
+ // {
205
+ // path: '/actions',
206
+ // caption: 'Actions',
207
+ // },
208
+ // {
209
+ // path: '/permissions',
210
+ // caption: 'Permissions',
211
+ // },
212
+ // {
213
+ // path: '/questions',
214
+ // caption: 'Questions',
215
+ // },
216
+ // {
217
+ // path: '/lookup-types',
218
+ // caption: 'Lookup Types',
219
+ // },
220
+ // ],
221
+ // },
222
+ // {
223
+ // caption: 'Access Control',
224
+ // sub_menus: [
225
+ // // {
226
+ // // path: '/users',
227
+ // // caption: 'Users',
228
+ // // },
229
+ // {
230
+ // path: '/roles',
231
+ // caption: 'Roles',
232
+ // },
233
+ // {
234
+ // path: '/menus',
235
+ // caption: 'Menus',
236
+ // },
237
+ // ]
238
+ // },
239
+ // {
240
+ // caption: 'Settings',
241
+ // sub_menus: [
242
+ // {
243
+ // path: '/branches',
244
+ // caption: 'Branches',
245
+ // },
246
+ // {
247
+ // path: '/departments',
248
+ // caption: 'Departments',
249
+ // },
250
+ // {
251
+ // path: '/financial-years',
252
+ // caption: 'Financial Years',
253
+ // },
254
+ // {
255
+ // path: '/invoice-numbers',
256
+ // caption: 'Invoice Numbers',
257
+ // },
258
+ // ]
259
+ // },
260
+ // {
261
+ // caption: 'Preferences',
262
+ // sub_menus: [{
263
+ // path: '/change-password',
264
+ // caption: 'Change Password'
265
+ // }]
266
+ // }
267
+ ];
268
+ };
289
269
  }
290
270
 
291
271
  export default MenusAPI;