@asaleh37/ui-base 1.1.9 → 1.2.1

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 (60) hide show
  1. package/dist/index.d.ts +23 -1
  2. package/dist/index.js +5 -5
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +5 -5
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +1 -1
  7. package/src/components/App.tsx +61 -3
  8. package/src/components/BaseApp.tsx +7 -0
  9. package/src/components/admin/AttachmentGrid.tsx +1 -1
  10. package/src/components/admin/AuthorityGrid.tsx +1 -1
  11. package/src/components/admin/BluePrintGrid.tsx +1 -1
  12. package/src/components/admin/BluePrintPageGrid.tsx +1 -1
  13. package/src/components/admin/BluePrintPointGrid.tsx +1 -1
  14. package/src/components/admin/DashboardGrid.tsx +1 -1
  15. package/src/components/admin/DashboardWidgetGrid.tsx +1 -1
  16. package/src/components/admin/DataQueryGrid.tsx +1 -1
  17. package/src/components/admin/DataQueryParameterGrid.tsx +1 -1
  18. package/src/components/admin/DatasourceConnectionGrid.tsx +1 -1
  19. package/src/components/admin/EmployeeGrid.tsx +1 -1
  20. package/src/components/admin/EntityParameterGrid.tsx +1 -1
  21. package/src/components/admin/ExcelUploaderDetailGrid.tsx +1 -1
  22. package/src/components/admin/ExcelUploaderHeaderGrid.tsx +1 -1
  23. package/src/components/admin/LookupGrid.tsx +1 -1
  24. package/src/components/admin/MailAttachmentGrid.tsx +1 -1
  25. package/src/components/admin/MailBodyGrid.tsx +1 -1
  26. package/src/components/admin/MailNotificationQueueGrid.tsx +1 -1
  27. package/src/components/admin/MailRecipientGrid.tsx +1 -1
  28. package/src/components/admin/MailTemplateGrid.tsx +1 -1
  29. package/src/components/admin/NewTableGrid.tsx +1 -1
  30. package/src/components/admin/NotificationGrid.tsx +1 -1
  31. package/src/components/admin/NotificationQueueGrid.tsx +1 -1
  32. package/src/components/admin/OrganizationApplicationGrid.tsx +1 -1
  33. package/src/components/admin/OrganizationGrid.tsx +1 -1
  34. package/src/components/admin/OrganizationRankGrid.tsx +1 -1
  35. package/src/components/admin/OrganizationUnitGrid.tsx +1 -1
  36. package/src/components/admin/OrganizationUserGrid.tsx +1 -1
  37. package/src/components/admin/OrganizationUserRoleGrid.tsx +1 -1
  38. package/src/components/admin/ReportGrid.tsx +1 -1
  39. package/src/components/admin/ReportParameterGrid.tsx +1 -1
  40. package/src/components/admin/RoleAuthorityGrid.tsx +1 -1
  41. package/src/components/admin/RoleGrid.tsx +1 -1
  42. package/src/components/admin/UserAccountGrid.tsx +1 -1
  43. package/src/components/admin/UserRequestGrid.tsx +1 -1
  44. package/src/components/admin/WidgetGrid.tsx +1 -1
  45. package/src/components/admin/WorkflowDocumentActionGrid.tsx +1 -1
  46. package/src/components/admin/WorkflowDocumentActionHistoryGrid.tsx +1 -1
  47. package/src/components/admin/WorkflowDocumentActionMailGrid.tsx +1 -1
  48. package/src/components/admin/WorkflowDocumentGrid.tsx +1 -1
  49. package/src/components/admin/WorkflowDocumentMailLogGrid.tsx +1 -1
  50. package/src/components/admin/WorkflowDocumentStatusGrid.tsx +1 -1
  51. package/src/components/common/Login.tsx +28 -2
  52. package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +1 -1
  53. package/src/hooks/index.ts +1 -0
  54. package/src/{components/templates/DataEntryTemplates → hooks}/useApiActions.ts +4 -4
  55. package/src/layout/MainContent.tsx +12 -9
  56. package/src/layout/NavigationTree.tsx +10 -9
  57. package/src/redux/features/common/AppInfoSlice.ts +10 -0
  58. package/src/redux/features/common/CommonStoreSlice.ts +1 -4
  59. package/src/theme/DarkThemeOptions.ts +0 -30
  60. package/src/theme/LightThemeOptions.ts +0 -34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "1.1.9",
3
+ "version": "1.2.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -1,16 +1,74 @@
1
1
  import { useDispatch, useSelector } from "react-redux";
2
- import { createTheme } from "@mui/material";
2
+ import { createTheme, ThemeOptions } from "@mui/material";
3
3
  import { ThemeProvider } from "@emotion/react";
4
4
  import React, { useEffect } from "react";
5
5
  import { RootState } from "../redux/store";
6
- import { LightThemeOptions } from "../theme/LightThemeOptions";
7
- import { DarkThemeOptions } from "../theme/DarkThemeOptions";
8
6
  import Layout from "../layout/Layout";
9
7
  import { AppInfo, AppInfoActions } from "../redux/features/common/AppInfoSlice";
10
8
  import { LicenseInfo } from "@mui/x-license";
11
9
 
12
10
  const App: React.FC<AppInfo> = (props: AppInfo) => {
13
11
  LicenseInfo.setLicenseKey(props.muiPremiumKey);
12
+ const LightThemeOptions: ThemeOptions = {
13
+ components: {
14
+ MuiCssBaseline: {
15
+ styleOverrides: `
16
+ /* Custom Scrollbar */
17
+ * {
18
+ scrollbar-width: thin;
19
+ scrollbar-color: ${props.appTheme.light.primaryColor} #ffffff;
20
+ }
21
+
22
+ /* Webkit Browsers */
23
+ *::-webkit-scrollbar {
24
+ width: 12px;
25
+ height: 10px;
26
+ }
27
+ `,
28
+ },
29
+ },
30
+ palette: {
31
+ mode: "light",
32
+ primary: {
33
+ main: props.appTheme.light.primaryColor,
34
+ },
35
+ secondary: {
36
+ main: props.appTheme.light.secondaryColor,
37
+ },
38
+ background: {
39
+ default: "#f5f5f5",
40
+ paper: "#f5f5f5",
41
+ },
42
+ },
43
+ };
44
+ const DarkThemeOptions: ThemeOptions = {
45
+ components: {
46
+ MuiCssBaseline: {
47
+ styleOverrides: `
48
+ /* Custom Scrollbar */
49
+ * {
50
+ scrollbar-width: thin;
51
+ scrollbar-color: ${props.appTheme.dark.primaryColor} #121212;
52
+ }
53
+
54
+ /* Webkit Browsers */
55
+ *::-webkit-scrollbar {
56
+ width: 12px;
57
+ height: 10px;
58
+ }
59
+ `,
60
+ },
61
+ },
62
+ palette: {
63
+ mode: "dark",
64
+ primary: {
65
+ main: props.appTheme.dark.primaryColor,
66
+ },
67
+ secondary: {
68
+ main: props.appTheme.dark.secondaryColor,
69
+ },
70
+ },
71
+ };
14
72
  const dispatch = useDispatch();
15
73
  const AppLayoutState = useSelector((state: RootState) => state.AppLayout);
16
74
  let themeOptions = { ...LightThemeOptions };
@@ -9,12 +9,19 @@ import "react-toastify/dist/ReactToastify.css";
9
9
  import App from "./App";
10
10
  import { AppInfo } from "../redux/features/common/AppInfoSlice";
11
11
  import { commonStoresInitialState } from "../redux/features/common/CommonStoreSlice";
12
+ import { ADMINISTRATION_STORES } from "../redux/features/administration/AdministrationStoresMetaData";
12
13
 
13
14
  library.add(fab);
14
15
  library.add(far);
15
16
  library.add(fas);
16
17
 
17
18
  export const BaseApp: React.FC<AppInfo> = (props) => {
19
+ if (props.enableAdministrationModule) {
20
+ for (let adminStoreKey of Object.keys(ADMINISTRATION_STORES)) {
21
+ commonStoresInitialState[adminStoreKey] =
22
+ ADMINISTRATION_STORES[adminStoreKey];
23
+ }
24
+ }
18
25
  if (props?.businessCommonStoresMetaData) {
19
26
  for (let businessStoreKey of Object.keys(
20
27
  props.businessCommonStoresMetaData
@@ -1,5 +1,5 @@
1
1
  import { useState } from "react";
2
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
2
+ import useApiActions from "../../hooks/useApiActions";
3
3
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
4
4
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const AuthorityGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const BluePrintGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const BluePrintPageGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const BluePrintPointGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const DashboardGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const DashboardWidgetGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const DataQueryGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const DataQueryParameterGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const DatasourceConnectionGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const EmployeeGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const EntityParameterGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const ExcelUploaderDetailGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const ExcelUploaderHeaderGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const LookupGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const MailAttachmentGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const MailBodyGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const MailNotificationQueueGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const MailRecipientGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const MailTemplateGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const NewTableGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const NotificationGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const NotificationQueueGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const OrganizationApplicationGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const OrganizationGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const OrganizationRankGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const OrganizationUnitGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const OrganizationUserGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const OrganizationUserRoleGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const ReportGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const ReportParameterGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const RoleAuthorityGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const RoleGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const UserAccountGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const UserRequestGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const WidgetGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const WorkflowDocumentActionGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const WorkflowDocumentActionHistoryGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const WorkflowDocumentActionMailGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const WorkflowDocumentGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const WorkflowDocumentMailLogGrid: React.FC = () => {
@@ -1,6 +1,6 @@
1
1
  import { useState } from "react";
2
2
  import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import useApiActions from "../../hooks/useApiActions";
4
4
  import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
5
 
6
6
  const WorkflowDocumentStatusGrid: React.FC = () => {
@@ -14,7 +14,6 @@ import axios from "axios";
14
14
  import { toast } from "react-toastify";
15
15
  import { RootState } from "../../redux/store";
16
16
  import { UserSessionActions } from "../../redux/features/common/UserSessionSlice";
17
- import { DarkThemeOptions } from "../../theme/DarkThemeOptions";
18
17
 
19
18
  const Login: React.FC = () => {
20
19
  const appInfo = useSelector((state: RootState) => state.AppInfo.value);
@@ -67,7 +66,34 @@ const Login: React.FC = () => {
67
66
  const userSession = useSelector(
68
67
  (state: RootState) => state.UserSession.value
69
68
  );
70
- const loginTheme = createTheme(DarkThemeOptions);
69
+ const loginTheme = createTheme({
70
+ components: {
71
+ MuiCssBaseline: {
72
+ styleOverrides: `
73
+ /* Custom Scrollbar */
74
+ * {
75
+ scrollbar-width: thin;
76
+ scrollbar-color: ${appInfo.appTheme.dark.primaryColor} #121212;
77
+ }
78
+
79
+ /* Webkit Browsers */
80
+ *::-webkit-scrollbar {
81
+ width: 12px;
82
+ height: 10px;
83
+ }
84
+ `,
85
+ },
86
+ },
87
+ palette: {
88
+ mode: "dark",
89
+ primary: {
90
+ main: appInfo.appTheme.dark.primaryColor,
91
+ },
92
+ secondary: {
93
+ main: appInfo.appTheme.dark.secondaryColor,
94
+ },
95
+ },
96
+ });
71
97
  const checkUserSession = async () => {
72
98
  if (appInfo?.apiBaseUrl) {
73
99
  if (userSession.isAuthenticated == null) {
@@ -8,7 +8,7 @@ import {
8
8
  } from "@mui/x-data-grid-premium";
9
9
  import { UseFormReturn } from "react-hook-form";
10
10
  import { SxProps } from "@mui/material";
11
- import { ApiActions } from "./useApiActions";
11
+ import { ApiActions } from "../../../hooks/useApiActions";
12
12
  export type MakeOptional<T, K extends keyof T> = Omit<T, K> &
13
13
  Partial<Pick<T, K>>;
14
14
 
@@ -4,3 +4,4 @@ export { default as useLoadingMask } from "./useLoadingMask";
4
4
  export { useIsMobile } from "./UseMobile";
5
5
  export { default as useSession } from "./UseSession";
6
6
  export { useWindow } from "./UseWindow";
7
+ export { default as useApiActions } from "./useApiActions";
@@ -1,8 +1,8 @@
1
1
  import { useDispatch, useSelector } from "react-redux";
2
- import { RootState } from "../../../redux/store";
3
- import useSession from "../../../hooks/UseSession";
4
- import useAxios from "../../../hooks/useAxios";
5
- import { setStoreData } from "../../../redux/features/common/CommonStoreSlice";
2
+ import { RootState } from "../redux/store";
3
+ import useSession from "./UseSession";
4
+ import useAxios from "./useAxios";
5
+ import { setStoreData } from "../redux/features/common/CommonStoreSlice";
6
6
 
7
7
  export type ApiActionsProps = {
8
8
  findAll?: string;
@@ -9,6 +9,7 @@ import { SystemRoute } from "../routes/types";
9
9
 
10
10
  const MainContent: React.FC = () => {
11
11
  const AppLayoutState = useSelector((state: RootState) => state.AppLayout);
12
+ const AppInfo = useSelector((state: RootState) => state.AppInfo.value);
12
13
  const businessRoutes = useSelector(
13
14
  (state: RootState) => state.AppInfo.value.businessRoutes
14
15
  );
@@ -28,15 +29,17 @@ const MainContent: React.FC = () => {
28
29
  }}
29
30
  >
30
31
  <Routes>
31
- {SYSTEM_ROUTES.map((route: SystemRoute, index) => {
32
- return (
33
- <Route
34
- key={"adm" + index}
35
- path={route.path}
36
- Component={route.component}
37
- />
38
- );
39
- })}
32
+ {AppInfo.enableAdministrationModule
33
+ ? SYSTEM_ROUTES.map((route: SystemRoute, index) => {
34
+ return (
35
+ <Route
36
+ key={"adm" + index}
37
+ path={route.path}
38
+ Component={route.component}
39
+ />
40
+ );
41
+ })
42
+ : null}
40
43
  {businessRoutes.map((route: SystemRoute, index) => {
41
44
  return (
42
45
  <Route