@asaleh37/ui-base 1.0.9 → 1.1.0
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/App.tsx +31 -0
- package/src/components/admin/AttachmentGrid.tsx +116 -0
- package/src/components/admin/AuthorityGrid.tsx +88 -0
- package/src/components/admin/BluePrintGrid.tsx +55 -0
- package/src/components/admin/BluePrintPageGrid.tsx +85 -0
- package/src/components/admin/BluePrintPointGrid.tsx +85 -0
- package/src/components/admin/DashboardGrid.tsx +95 -0
- package/src/components/admin/DashboardWidgetGrid.tsx +75 -0
- package/src/components/admin/DataQueryGrid.tsx +75 -0
- package/src/components/admin/DataQueryParameterGrid.tsx +98 -0
- package/src/components/admin/DatasourceConnectionGrid.tsx +98 -0
- package/src/components/admin/EmployeeGrid.tsx +105 -0
- package/src/components/admin/EntityParameterGrid.tsx +125 -0
- package/src/components/admin/ExcelUploaderDetailGrid.tsx +78 -0
- package/src/components/admin/ExcelUploaderHeaderGrid.tsx +78 -0
- package/src/components/admin/LookupGrid.tsx +95 -0
- package/src/components/admin/MailAttachmentGrid.tsx +65 -0
- package/src/components/admin/MailBodyGrid.tsx +105 -0
- package/src/components/admin/MailNotificationQueueGrid.tsx +131 -0
- package/src/components/admin/MailRecipientGrid.tsx +75 -0
- package/src/components/admin/MailTemplateGrid.tsx +145 -0
- package/src/components/admin/NewTableGrid.tsx +65 -0
- package/src/components/admin/NotificationGrid.tsx +115 -0
- package/src/components/admin/NotificationQueueGrid.tsx +125 -0
- package/src/components/admin/OrganizationApplicationGrid.tsx +81 -0
- package/src/components/admin/OrganizationGrid.tsx +65 -0
- package/src/components/admin/OrganizationRankGrid.tsx +85 -0
- package/src/components/admin/OrganizationUnitGrid.tsx +85 -0
- package/src/components/admin/OrganizationUserGrid.tsx +75 -0
- package/src/components/admin/OrganizationUserRoleGrid.tsx +98 -0
- package/src/components/admin/ReportGrid.tsx +155 -0
- package/src/components/admin/ReportParameterGrid.tsx +95 -0
- package/src/components/admin/RoleAuthorityGrid.tsx +65 -0
- package/src/components/admin/RoleGrid.tsx +78 -0
- package/src/components/admin/UserAccountGrid.tsx +65 -0
- package/src/components/admin/UserRequestGrid.tsx +145 -0
- package/src/components/admin/WidgetGrid.tsx +175 -0
- package/src/components/admin/WorkflowDocumentActionGrid.tsx +111 -0
- package/src/components/admin/WorkflowDocumentActionHistoryGrid.tsx +111 -0
- package/src/components/admin/WorkflowDocumentActionMailGrid.tsx +71 -0
- package/src/components/admin/WorkflowDocumentGrid.tsx +185 -0
- package/src/components/admin/WorkflowDocumentMailLogGrid.tsx +141 -0
- package/src/components/admin/WorkflowDocumentStatusGrid.tsx +121 -0
- package/src/components/common/Home.tsx +31 -0
- package/src/components/common/LanguageSwitcher.tsx +25 -0
- package/src/components/common/LayoutHandlers.tsx +12 -0
- package/src/components/common/LoadingMask.tsx +19 -0
- package/src/components/common/Login.tsx +183 -0
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +288 -0
- package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +201 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormAction.tsx +60 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +194 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementGroup.tsx +98 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/CheckBox.tsx +64 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +94 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/Datefield.tsx +65 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/DatetimeField.tsx +64 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/FiltersPanel.tsx +237 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +9 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +256 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +188 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +844 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridMultiRecordAction.tsx +89 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridRecordAction.tsx +92 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridTopBar.tsx +228 -0
- package/src/components/templates/DataEntryTemplates/useApiActions.ts +125 -0
- package/src/components/templates/TransferList.tsx +250 -0
- package/src/components/templates/Window/ConfirmationWindow.tsx +55 -0
- package/src/components/templates/visuals/TemplateDashboard.tsx +126 -0
- package/src/components/templates/visuals/charts/TemplateBarChart.tsx +16 -0
- package/src/components/templates/visuals/charts/TemplateDataCard.tsx +60 -0
- package/src/components/templates/visuals/charts/TemplateGauge.tsx +16 -0
- package/src/components/templates/visuals/charts/TemplateLineChart.tsx +16 -0
- package/src/components/templates/visuals/charts/TemplateLineProgress.tsx +40 -0
- package/src/components/templates/visuals/charts/TemplatePieChart.tsx +25 -0
- package/src/hooks/UseConfirmationWindow.tsx +54 -0
- package/src/hooks/UseMobile.tsx +13 -0
- package/src/hooks/UseSession.tsx +26 -0
- package/src/hooks/UseWindow.tsx +106 -0
- package/src/hooks/useAxios.tsx +271 -0
- package/src/hooks/useLoadingMask.tsx +16 -0
- package/src/layout/DrawerHeader.tsx +10 -0
- package/src/layout/Layout.tsx +122 -0
- package/src/layout/MainContent.tsx +43 -0
- package/src/layout/MobileDrawer.tsx +103 -0
- package/src/layout/NavigationTree.tsx +284 -0
- package/src/layout/SideBar.tsx +80 -0
- package/src/layout/TopBar.tsx +142 -0
- package/src/locales/arabic/adminLocalsAr.json +356 -0
- package/src/locales/arabic/common.json +34 -0
- package/src/locales/arabic/index.ts +7 -0
- package/src/locales/english/adminLocalsEn.json +356 -0
- package/src/locales/english/common.json +33 -0
- package/src/locales/english/index.ts +6 -0
- package/src/locales/english/index.tsx +0 -0
- package/src/locales/i18n.ts +15 -0
- package/src/locales/index.ts +9 -0
- package/src/navigationItems/Administration/adminNavigationItems.tsx +182 -0
- package/src/navigationItems/Administration/index.tsx +71 -0
- package/src/navigationItems/common/CommonNavigationItems.tsx +12 -0
- package/src/navigationItems/common/index.tsx +7 -0
- package/src/navigationItems/index.tsx +34 -0
- package/src/redux/features/administration/AdministrationStoresMetaData.ts +72 -0
- package/src/redux/features/business/BusinessStoresMetaData.ts +3 -0
- package/src/redux/features/business/CommonStoreSlice.ts +37 -0
- package/src/redux/features/common/AppInfoSlice.ts +30 -0
- package/src/redux/features/common/AppLayoutSlice.ts +37 -0
- package/src/redux/features/common/LoadingMaskSlice.ts +30 -0
- package/src/redux/features/common/UserSessionSlice.ts +62 -0
- package/src/redux/store.ts +10 -10
- package/src/routes/administration/adminRoutes.tsx +259 -0
- package/src/routes/administration/index.ts +4 -0
- package/src/routes/index.ts +11 -0
- package/src/routes/types/index.ts +5 -0
- package/src/theme/DarkThemeOptions.ts +30 -0
- package/src/theme/LightThemeOptions.ts +34 -0
- package/src/util/AppUtils.ts +18 -0
- package/src/util/constants.ts +2 -0
- package/tsconfig.json +2 -2
- package/src/redux/CounterSlice.ts +0 -17
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { SystemRoute } from "../types";
|
|
2
|
+
|
|
3
|
+
import AuthorityGrid from "../../components/admin/AuthorityGrid";
|
|
4
|
+
import BluePrintGrid from "../../components/admin/BluePrintGrid";
|
|
5
|
+
import BluePrintPageGrid from "../../components/admin/BluePrintPageGrid";
|
|
6
|
+
import BluePrintPointGrid from "../../components/admin/BluePrintPointGrid";
|
|
7
|
+
import DashboardGrid from "../../components/admin/DashboardGrid";
|
|
8
|
+
import DashboardWidgetGrid from "../../components/admin/DashboardWidgetGrid";
|
|
9
|
+
import DataQueryGrid from "../../components/admin/DataQueryGrid";
|
|
10
|
+
import DataQueryParameterGrid from "../../components/admin/DataQueryParameterGrid";
|
|
11
|
+
import DatasourceConnectionGrid from "../../components/admin/DatasourceConnectionGrid";
|
|
12
|
+
import EmployeeGrid from "../../components/admin/EmployeeGrid";
|
|
13
|
+
import EntityParameterGrid from "../../components/admin/EntityParameterGrid";
|
|
14
|
+
import ExcelUploaderDetailGrid from "../../components/admin/ExcelUploaderDetailGrid";
|
|
15
|
+
import ExcelUploaderHeaderGrid from "../../components/admin/ExcelUploaderHeaderGrid";
|
|
16
|
+
import LookupGrid from "../../components/admin/LookupGrid";
|
|
17
|
+
import MailAttachmentGrid from "../../components/admin/MailAttachmentGrid";
|
|
18
|
+
import MailBodyGrid from "../../components/admin/MailBodyGrid";
|
|
19
|
+
import MailNotificationQueueGrid from "../../components/admin/MailNotificationQueueGrid";
|
|
20
|
+
import MailRecipientGrid from "../../components/admin/MailRecipientGrid";
|
|
21
|
+
import MailTemplateGrid from "../../components/admin/MailTemplateGrid";
|
|
22
|
+
import NewTableGrid from "../../components/admin/NewTableGrid";
|
|
23
|
+
import NotificationGrid from "../../components/admin/NotificationGrid";
|
|
24
|
+
import NotificationQueueGrid from "../../components/admin/NotificationQueueGrid";
|
|
25
|
+
import OrganizationGrid from "../../components/admin/OrganizationGrid";
|
|
26
|
+
import OrganizationApplicationGrid from "../../components/admin/OrganizationApplicationGrid";
|
|
27
|
+
import OrganizationRankGrid from "../../components/admin/OrganizationRankGrid";
|
|
28
|
+
import OrganizationUnitGrid from "../../components/admin/OrganizationUnitGrid";
|
|
29
|
+
import OrganizationUserGrid from "../../components/admin/OrganizationUserGrid";
|
|
30
|
+
import OrganizationUserRoleGrid from "../../components/admin/OrganizationUserRoleGrid";
|
|
31
|
+
import ReportGrid from "../../components/admin/ReportGrid";
|
|
32
|
+
import ReportParameterGrid from "../../components/admin/ReportParameterGrid";
|
|
33
|
+
import RoleGrid from "../../components/admin/RoleGrid";
|
|
34
|
+
import RoleAuthorityGrid from "../../components/admin/RoleAuthorityGrid";
|
|
35
|
+
import UserAccountGrid from "../../components/admin/UserAccountGrid";
|
|
36
|
+
import UserRequestGrid from "../../components/admin/UserRequestGrid";
|
|
37
|
+
import WidgetGrid from "../../components/admin/WidgetGrid";
|
|
38
|
+
import WorkflowDocumentGrid from "../../components/admin/WorkflowDocumentGrid";
|
|
39
|
+
import WorkflowDocumentActionGrid from "../../components/admin/WorkflowDocumentActionGrid";
|
|
40
|
+
import WorkflowDocumentActionHistoryGrid from "../../components/admin/WorkflowDocumentActionHistoryGrid";
|
|
41
|
+
import WorkflowDocumentActionMailGrid from "../../components/admin/WorkflowDocumentActionMailGrid";
|
|
42
|
+
import WorkflowDocumentMailLogGrid from "../../components/admin/WorkflowDocumentMailLogGrid";
|
|
43
|
+
import WorkflowDocumentStatusGrid from "../../components/admin/WorkflowDocumentStatusGrid";
|
|
44
|
+
import AttachmentGrid from "../../components/admin/AttachmentGrid";
|
|
45
|
+
export const adminRoutes: Array<SystemRoute> = [
|
|
46
|
+
{
|
|
47
|
+
path: "admin/attachments",
|
|
48
|
+
component: AttachmentGrid,
|
|
49
|
+
authority: "ATTACHMENT_VIEW",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
path: "admin/authorities",
|
|
53
|
+
component: AuthorityGrid,
|
|
54
|
+
authority: "AUTHORITY_VIEW",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
path: "admin/blueprints",
|
|
58
|
+
component: BluePrintGrid,
|
|
59
|
+
authority: "BLUE_PRINT_VIEW",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
path: "admin/blueprintpages",
|
|
63
|
+
component: BluePrintPageGrid,
|
|
64
|
+
authority: "BLUE_PRINT_PAGE_VIEW",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
path: "admin/blueprintpoints",
|
|
68
|
+
component: BluePrintPointGrid,
|
|
69
|
+
authority: "BLUE_PRINT_POINT_VIEW",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
path: "admin/dashboards",
|
|
73
|
+
component: DashboardGrid,
|
|
74
|
+
authority: "DASHBOARD_VIEW",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
path: "admin/dashboardwidgets",
|
|
78
|
+
component: DashboardWidgetGrid,
|
|
79
|
+
authority: "DASHBOARD_WIDGET_VIEW",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
path: "admin/dataqueries",
|
|
83
|
+
component: DataQueryGrid,
|
|
84
|
+
authority: "DATA_QUERY_VIEW",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
path: "admin/dataqueryparameters",
|
|
88
|
+
component: DataQueryParameterGrid,
|
|
89
|
+
authority: "DATA_QUERY_PARAMETER_VIEW",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
path: "admin/datasourceconnections",
|
|
93
|
+
component: DatasourceConnectionGrid,
|
|
94
|
+
authority: "DATASOURCE_CONNECTION_VIEW",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
path: "admin/employees",
|
|
98
|
+
component: EmployeeGrid,
|
|
99
|
+
authority: "EMPLOYEE_VIEW",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
path: "admin/entityparameters",
|
|
103
|
+
component: EntityParameterGrid,
|
|
104
|
+
authority: "ENTITY_PARAMETER_VIEW",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
path: "admin/exceluploaderdetails",
|
|
108
|
+
component: ExcelUploaderDetailGrid,
|
|
109
|
+
authority: "EXCEL_UPLOADER_DETAIL_VIEW",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
path: "admin/exceluploaderheaders",
|
|
113
|
+
component: ExcelUploaderHeaderGrid,
|
|
114
|
+
authority: "EXCEL_UPLOADER_HEADER_VIEW",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
path: "admin/lookups",
|
|
118
|
+
component: LookupGrid,
|
|
119
|
+
authority: "LOOKUP_VIEW",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
path: "admin/mailattachments",
|
|
123
|
+
component: MailAttachmentGrid,
|
|
124
|
+
authority: "MAIL_ATTACHMENT_VIEW",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
path: "admin/mailbodies",
|
|
128
|
+
component: MailBodyGrid,
|
|
129
|
+
authority: "MAIL_BODY_VIEW",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
path: "admin/mailnotificationqueues",
|
|
133
|
+
component: MailNotificationQueueGrid,
|
|
134
|
+
authority: "MAIL_NOTIFICATION_QUEUE_VIEW",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
path: "admin/mailrecipients",
|
|
138
|
+
component: MailRecipientGrid,
|
|
139
|
+
authority: "MAIL_RECIPIENT_VIEW",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
path: "admin/mailtemplates",
|
|
143
|
+
component: MailTemplateGrid,
|
|
144
|
+
authority: "MAIL_TEMPLATE_VIEW",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
path: "admin/newtables",
|
|
148
|
+
component: NewTableGrid,
|
|
149
|
+
authority: "NEW_TABLE_VIEW",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
path: "admin/notifications",
|
|
153
|
+
component: NotificationGrid,
|
|
154
|
+
authority: "NOTIFICATION_VIEW",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
path: "admin/notificationqueues",
|
|
158
|
+
component: NotificationQueueGrid,
|
|
159
|
+
authority: "NOTIFICATION_QUEUE_VIEW",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
path: "admin/organizations",
|
|
163
|
+
component: OrganizationGrid,
|
|
164
|
+
authority: "ORGANIZATION_VIEW",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
path: "admin/organizationapplications",
|
|
168
|
+
component: OrganizationApplicationGrid,
|
|
169
|
+
authority: "ORGANIZATION_APPLICATION_VIEW",
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
path: "admin/organizationranks",
|
|
173
|
+
component: OrganizationRankGrid,
|
|
174
|
+
authority: "ORGANIZATION_RANK_VIEW",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
path: "admin/organizationunits",
|
|
178
|
+
component: OrganizationUnitGrid,
|
|
179
|
+
authority: "ORGANIZATION_UNIT_VIEW",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
path: "admin/organizationusers",
|
|
183
|
+
component: OrganizationUserGrid,
|
|
184
|
+
authority: "ORGANIZATION_USER_VIEW",
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
path: "admin/organizationuserroles",
|
|
188
|
+
component: OrganizationUserRoleGrid,
|
|
189
|
+
authority: "ORGANIZATION_USER_ROLE_VIEW",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
path: "admin/reports",
|
|
193
|
+
component: ReportGrid,
|
|
194
|
+
authority: "REPORT_VIEW",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
path: "admin/reportparameters",
|
|
198
|
+
component: ReportParameterGrid,
|
|
199
|
+
authority: "REPORT_PARAMETER_VIEW",
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
path: "admin/roles",
|
|
203
|
+
component: RoleGrid,
|
|
204
|
+
authority: "ROLE_VIEW",
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
path: "admin/roleauthorities",
|
|
208
|
+
component: RoleAuthorityGrid,
|
|
209
|
+
authority: "ROLE_AUTHORITY_VIEW",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
path: "admin/useraccounts",
|
|
213
|
+
component: UserAccountGrid,
|
|
214
|
+
authority: "USER_ACCOUNT_VIEW",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
path: "admin/userrequests",
|
|
218
|
+
component: UserRequestGrid,
|
|
219
|
+
authority: "USER_REQUEST_VIEW",
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
path: "admin/widgets",
|
|
223
|
+
component: WidgetGrid,
|
|
224
|
+
authority: "WIDGET_VIEW",
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
path: "admin/workflowdocuments",
|
|
228
|
+
component: WorkflowDocumentGrid,
|
|
229
|
+
authority: "WORKFLOW_DOCUMENT_VIEW",
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
path: "admin/workflowdocumentactions",
|
|
233
|
+
component: WorkflowDocumentActionGrid,
|
|
234
|
+
authority: "WORKFLOW_DOCUMENT_ACTION_VIEW",
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
path: "admin/workflowdocumentactionhistories",
|
|
238
|
+
component: WorkflowDocumentActionHistoryGrid,
|
|
239
|
+
authority: "WORKFLOW_DOCUMENT_ACTION_HISTORY_VIEW",
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
path: "admin/workflowdocumentactionmails",
|
|
243
|
+
component: WorkflowDocumentActionMailGrid,
|
|
244
|
+
authority: "WORKFLOW_DOCUMENT_ACTION_MAIL_VIEW",
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
path: "admin/workflowdocumentmaillogs",
|
|
248
|
+
component: WorkflowDocumentMailLogGrid,
|
|
249
|
+
authority: "WORKFLOW_DOCUMENT_MAIL_LOG_VIEW",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
path: "admin/workflowdocumentstatuses",
|
|
253
|
+
component: WorkflowDocumentStatusGrid,
|
|
254
|
+
authority: "WORKFLOW_DOCUMENT_STATUS_VIEW",
|
|
255
|
+
},
|
|
256
|
+
];
|
|
257
|
+
|
|
258
|
+
// import { adminRoutes } from "./adminRoutes";
|
|
259
|
+
// [...adminRoutes]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Home from "../components/common/Home";
|
|
2
|
+
import { ADMINISTRATION_ROUTES } from "./administration";
|
|
3
|
+
import { SystemRoute } from "./types";
|
|
4
|
+
|
|
5
|
+
export const SYSTEM_ROUTES: Array<SystemRoute> = [
|
|
6
|
+
{
|
|
7
|
+
path: "/",
|
|
8
|
+
component: Home,
|
|
9
|
+
},
|
|
10
|
+
...ADMINISTRATION_ROUTES,
|
|
11
|
+
];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ThemeOptions } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const DarkThemeOptions: ThemeOptions = {
|
|
4
|
+
components: {
|
|
5
|
+
MuiCssBaseline: {
|
|
6
|
+
styleOverrides: `
|
|
7
|
+
/* Custom Scrollbar */
|
|
8
|
+
* {
|
|
9
|
+
scrollbar-width: thin;
|
|
10
|
+
scrollbar-color: #ea690e #121212;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Webkit Browsers */
|
|
14
|
+
*::-webkit-scrollbar {
|
|
15
|
+
width: 12px;
|
|
16
|
+
height: 10px;
|
|
17
|
+
}
|
|
18
|
+
`,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
palette: {
|
|
22
|
+
mode: "dark",
|
|
23
|
+
primary: {
|
|
24
|
+
main: "#ea690e",
|
|
25
|
+
},
|
|
26
|
+
secondary: {
|
|
27
|
+
main: "#74776B",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ThemeOptions } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const LightThemeOptions: ThemeOptions = {
|
|
4
|
+
components: {
|
|
5
|
+
MuiCssBaseline: {
|
|
6
|
+
styleOverrides: `
|
|
7
|
+
/* Custom Scrollbar */
|
|
8
|
+
* {
|
|
9
|
+
scrollbar-width: thin;
|
|
10
|
+
scrollbar-color: #37505C #ffffff;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Webkit Browsers */
|
|
14
|
+
*::-webkit-scrollbar {
|
|
15
|
+
width: 12px;
|
|
16
|
+
height: 10px;
|
|
17
|
+
}
|
|
18
|
+
`,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
palette: {
|
|
22
|
+
mode: "light",
|
|
23
|
+
primary: {
|
|
24
|
+
main: "#37505C",
|
|
25
|
+
},
|
|
26
|
+
secondary: {
|
|
27
|
+
main: "#ff6d00",
|
|
28
|
+
},
|
|
29
|
+
background: {
|
|
30
|
+
default: "#f5f5f5",
|
|
31
|
+
paper: "#f5f5f5",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function hasDigitsOnly(str: string) {
|
|
2
|
+
return /^\d+$/.test(str);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function isNumber(value: any) {
|
|
6
|
+
return typeof value === "number" && !isNaN(value);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function isNumeric(value: string) {
|
|
10
|
+
return (
|
|
11
|
+
typeof value === "string" && value.trim() !== "" && !isNaN(Number(value))
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function capitalizeFirstLetter(str: string) {
|
|
16
|
+
if (!str) return "";
|
|
17
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
18
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -114,14 +114,14 @@
|
|
|
114
114
|
|
|
115
115
|
{
|
|
116
116
|
"compilerOptions": {
|
|
117
|
-
"target": "
|
|
117
|
+
"target": "ESNext",
|
|
118
118
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
119
119
|
"allowJs": true,
|
|
120
120
|
"skipLibCheck": true,
|
|
121
121
|
"importHelpers": true,
|
|
122
122
|
"esModuleInterop": true,
|
|
123
123
|
"allowSyntheticDefaultImports": true,
|
|
124
|
-
"strict":
|
|
124
|
+
"strict": false,
|
|
125
125
|
"forceConsistentCasingInFileNames": true,
|
|
126
126
|
"noFallthroughCasesInSwitch": true,
|
|
127
127
|
"module": "esnext",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { createSlice } from "@reduxjs/toolkit";
|
|
2
|
-
|
|
3
|
-
const CounterSlice = createSlice({
|
|
4
|
-
name: "counter",
|
|
5
|
-
initialState: { value: 0 },
|
|
6
|
-
reducers: {
|
|
7
|
-
increament: (state) => {
|
|
8
|
-
state.value = state.value + 1;
|
|
9
|
-
},
|
|
10
|
-
decreament: (state) => {
|
|
11
|
-
state.value = state.value - 1;
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export const CounterActions = CounterSlice.actions;
|
|
17
|
-
export default CounterSlice.reducer;
|