ui-soxo-bootstrap-core 2.4.25-dev.9 → 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.
- package/.github/workflows/npm-publish.yml +15 -37
- package/core/components/extra-info/extra-info-details.js +126 -109
- package/core/components/landing-api/landing-api.js +30 -22
- package/core/lib/Store.js +18 -20
- package/core/lib/components/index.js +1 -4
- package/core/lib/components/sidemenu/sidemenu.js +256 -153
- package/core/lib/components/sidemenu/sidemenu.scss +26 -39
- package/core/lib/elements/basic/rangepicker/rangepicker.js +29 -118
- package/core/lib/hooks/index.js +12 -2
- package/core/lib/pages/login/login.js +139 -255
- package/core/lib/pages/login/login.scss +32 -140
- package/core/models/dashboard/dashboard.js +0 -14
- package/core/models/menus/components/menu-add/menu-add.js +268 -230
- package/core/models/menus/components/menu-lists/menu-lists.js +89 -126
- package/core/models/menus/components/menu-lists/menu-lists.scss +0 -9
- package/core/models/menus/menus.js +267 -247
- package/core/models/roles/components/role-add/role-add.js +227 -269
- package/core/models/roles/components/role-list/role-list.js +6 -8
- package/core/models/roles/roles.js +174 -182
- package/core/models/users/components/user-add/user-add.js +1 -69
- package/core/models/users/users.js +0 -57
- package/core/modules/index.js +13 -23
- package/core/modules/reporting/components/reporting-dashboard/reporting-dashboard.js +1 -1
- package/package.json +2 -2
- package/core/lib/hooks/use-otp-timer.js +0 -99
- package/core/models/staff/components/staff-add/staff-add.js +0 -352
- package/core/models/staff/components/staff-add/staff-add.scss +0 -0
- package/core/modules/steps/action-buttons.js +0 -79
- package/core/modules/steps/steps.js +0 -553
- package/core/modules/steps/steps.scss +0 -158
- package/core/modules/steps/timeline.js +0 -49
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Base from '../base/base';
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
|
|
6
6
|
import MenuList from './components/menu-list/menu-list';
|
|
7
7
|
|
|
@@ -12,6 +12,7 @@ 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
|
+
|
|
15
16
|
// import MenuAdd from '../modules/common/resources/menu-add/menu-add';
|
|
16
17
|
|
|
17
18
|
// import MenuDetail from '../modules/common/resources/menu-detail/menu-detail';
|
|
@@ -19,253 +20,272 @@ import MenuLists from './components/menu-lists/menu-lists';
|
|
|
19
20
|
// import { Models, Pages, Modules } from './index';
|
|
20
21
|
|
|
21
22
|
class MenusAPI extends Base {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* load the list of menu
|
|
165
|
-
*
|
|
166
|
-
* @param {*} menu
|
|
167
|
-
* @returns
|
|
168
|
-
*/
|
|
169
|
-
getMenus = (config) => {
|
|
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) => {
|
|
170
164
|
// Use 'core-menus' endpoint if REACT_APP_USE_CORE_MENUS is true (used for Matria)
|
|
171
|
-
const url =
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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
|
-
|
|
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
|
+
|
|
269
289
|
}
|
|
270
290
|
|
|
271
291
|
export default MenusAPI;
|