ui-soxo-bootstrap-core 2.4.24 → 2.4.25-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.
Files changed (37) hide show
  1. package/.github/workflows/npm-publish.yml +37 -15
  2. package/core/components/extra-info/extra-info-details.js +109 -126
  3. package/core/components/landing-api/landing-api.js +22 -30
  4. package/core/lib/Store.js +20 -18
  5. package/core/lib/components/index.js +4 -1
  6. package/core/lib/components/sidemenu/sidemenu.js +153 -256
  7. package/core/lib/components/sidemenu/sidemenu.scss +39 -26
  8. package/core/lib/elements/basic/dragabble-wrapper/draggable-wrapper.js +119 -42
  9. package/core/lib/elements/basic/rangepicker/rangepicker.js +118 -29
  10. package/core/lib/elements/basic/switch/switch.js +35 -25
  11. package/core/lib/hooks/index.js +2 -12
  12. package/core/lib/hooks/use-otp-timer.js +99 -0
  13. package/core/lib/pages/login/login.js +255 -139
  14. package/core/lib/pages/login/login.scss +140 -32
  15. package/core/models/dashboard/dashboard.js +14 -0
  16. package/core/models/doctor/components/doctor-add/doctor-add.js +403 -0
  17. package/core/models/doctor/components/doctor-add/doctor-add.scss +32 -0
  18. package/core/models/menus/components/menu-add/menu-add.js +220 -267
  19. package/core/models/menus/components/menu-lists/menu-lists.js +366 -211
  20. package/core/models/menus/components/menu-lists/menu-lists.scss +6 -2
  21. package/core/models/menus/menus.js +256 -267
  22. package/core/models/roles/components/role-add/role-add.js +265 -228
  23. package/core/models/roles/components/role-list/role-list.js +326 -348
  24. package/core/models/roles/roles.js +191 -174
  25. package/core/models/staff/components/staff-add/staff-add.js +352 -0
  26. package/core/models/staff/components/staff-add/staff-add.scss +0 -0
  27. package/core/models/users/components/user-add/user-add.js +723 -367
  28. package/core/models/users/components/user-add/user-edit.js +90 -0
  29. package/core/models/users/users.js +318 -165
  30. package/core/modules/index.js +5 -8
  31. package/core/modules/reporting/components/index.js +5 -0
  32. package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +65 -2
  33. package/core/modules/steps/action-buttons.js +79 -0
  34. package/core/modules/steps/steps.js +553 -0
  35. package/core/modules/steps/steps.scss +158 -0
  36. package/core/modules/steps/timeline.js +49 -0
  37. package/package.json +2 -2
@@ -4,7 +4,7 @@
4
4
  }
5
5
 
6
6
  .ant-collapse {
7
- background: transparent !important;
7
+ background-color: #fafafa !important;
8
8
  border: none !important;
9
9
  }
10
10
  .ant-collapse > .ant-collapse-item {
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  .nested-collapse {
28
- margin-left: 20px; // indent child collapses
28
+ margin-left: 2px; // indent child collapses
29
29
  }
30
30
 
31
31
  .nested-collapse .ant-collapse-item {
@@ -38,4 +38,8 @@
38
38
  padding: 10px 14px;
39
39
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
40
40
  }
41
+ .ant-collapse > .ant-collapse-item > .ant-collapse-heade{
42
+ align-items: center;
43
+ }
44
+
41
45
 
@@ -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,262 @@ 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
+ // get core-menu list with submenu
183
+ getCoreMenuLists = () => {
184
+ const url = 'core-menus/core-menus?step=1&header_id=null';
185
+
186
+ return this.get({
187
+ url,
188
+ }).then((result) => result);
189
+ };
190
+
191
+ getCoreMenus = () => {
192
+ return [
193
+ // {
194
+ // caption: 'Configure',
195
+ // sub_menus: [
196
+ // // {
197
+ // // // is_visible: true,
198
+ // // path: '/process',
199
+ // // caption: 'Process',
200
+ // // },
201
+ // // {
202
+ // // path: '/models',
203
+ // // caption: 'Models',
204
+ // // },
205
+ // {
206
+ // path: '/pages',
207
+ // caption: 'Pages',
208
+ // },
209
+ // {
210
+ // path: '/forms',
211
+ // caption: 'Forms',
212
+ // },
213
+ // {
214
+ // path: '/actions',
215
+ // caption: 'Actions',
216
+ // },
217
+ // {
218
+ // path: '/permissions',
219
+ // caption: 'Permissions',
220
+ // },
221
+ // {
222
+ // path: '/questions',
223
+ // caption: 'Questions',
224
+ // },
225
+ // {
226
+ // path: '/lookup-types',
227
+ // caption: 'Lookup Types',
228
+ // },
229
+ // ],
230
+ // },
231
+ // {
232
+ // caption: 'Access Control',
233
+ // sub_menus: [
234
+ // // {
235
+ // // path: '/users',
236
+ // // caption: 'Users',
237
+ // // },
238
+ // {
239
+ // path: '/roles',
240
+ // caption: 'Roles',
241
+ // },
242
+ // {
243
+ // path: '/menus',
244
+ // caption: 'Menus',
245
+ // },
246
+ // ]
247
+ // },
248
+ // {
249
+ // caption: 'Settings',
250
+ // sub_menus: [
251
+ // {
252
+ // path: '/branches',
253
+ // caption: 'Branches',
254
+ // },
255
+ // {
256
+ // path: '/departments',
257
+ // caption: 'Departments',
258
+ // },
259
+ // {
260
+ // path: '/financial-years',
261
+ // caption: 'Financial Years',
262
+ // },
263
+ // {
264
+ // path: '/invoice-numbers',
265
+ // caption: 'Invoice Numbers',
266
+ // },
267
+ // ]
268
+ // },
269
+ // {
270
+ // caption: 'Preferences',
271
+ // sub_menus: [{
272
+ // path: '/change-password',
273
+ // caption: 'Change Password'
274
+ // }]
275
+ // }
276
+ ];
277
+ };
289
278
  }
290
279
 
291
280
  export default MenusAPI;