@asaleh37/ui-base 25.9.24-2 → 25.9.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "25.9.24-2",
3
+ "version": "25.9.24",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -49,6 +49,15 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
49
49
  parameters: { reportCode: props.reportCode },
50
50
  successCallBkFn: (response: any) => {
51
51
  setReportInfo(response.data);
52
+ if (
53
+ props?.byPassParameterEntry === true ||
54
+ response.data.reportParameters.length == 0
55
+ ) {
56
+ runReport(parametersValues);
57
+ setReportViewerState("WAITING_RESULT");
58
+ } else {
59
+ setReportViewerState("WAITING_PARAMETER_INPUT");
60
+ }
52
61
  },
53
62
  failureCallBkFn: (response) => {
54
63
  setErrorMessage(
@@ -59,20 +68,6 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
59
68
  });
60
69
  };
61
70
 
62
- useEffect(() => {
63
- if (reportInfo) {
64
- if (
65
- props?.byPassParameterEntry === true ||
66
- reportInfo.reportParameters.length == 0
67
- ) {
68
- runReport(parametersValues);
69
- setReportViewerState("WAITING_RESULT");
70
- } else {
71
- setReportViewerState("WAITING_PARAMETER_INPUT");
72
- }
73
- }
74
- }, [reportInfo]);
75
-
76
71
  const runReport = async (params) => {
77
72
  setReportViewerState("WAITING_RESULT");
78
73
  if (reportInfo?.reportType === "Excel") {
@@ -103,6 +98,7 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
103
98
  successCallBkFn: (response: any) => {
104
99
  setReportViewerState("SHOWING_RESULT");
105
100
  const contentDisposition = response.headers["content-disposition"];
101
+ debugger;
106
102
  let filename = "downloaded_file";
107
103
  if (
108
104
  contentDisposition &&
@@ -261,7 +261,7 @@ const TopBar: React.FC = () => {
261
261
  ) : (
262
262
  <></>
263
263
  )}
264
- {!isMobile ? (
264
+ {isMobile ? (
265
265
  <div onClick={handleOpenUserMenu} style={{ cursor: "pointer" }}>
266
266
  <AttachmentImageViewer
267
267
  showAsAvatar={true}
package/src/main.tsx CHANGED
@@ -3,7 +3,7 @@ import { BaseApp } from "./components";
3
3
 
4
4
  createRoot(document.getElementById("root")!).render(
5
5
  <BaseApp
6
- apiBaseUrl="http://localhost:8080/api-base"
6
+ apiBaseUrl="http://10.14.22.13:8080/api-base"
7
7
  enableUINotifications={false}
8
8
  appLogo={"/logo.png"}
9
9
  appName="UI Base Library"
@@ -28,7 +28,6 @@ export const ADMINISTRATION_STORES: CommonStores = {
28
28
  SystemWorkflows: {
29
29
  autoLoad: true,
30
30
  url: "api/v1/dev/workflowdocument/all",
31
- authority: "DEVELOPMENT_ADMIN",
32
31
  data: [],
33
32
  },
34
33
  SystemWidgetTypes: {
@@ -68,31 +67,26 @@ export const ADMINISTRATION_STORES: CommonStores = {
68
67
  },
69
68
  SystemOrganizationRanks: {
70
69
  autoLoad: true,
71
- authority: "SYSTEM_ADMIN",
72
70
  url: "api/v1/public/organization/ranks/all",
73
71
  data: [],
74
72
  },
75
73
  CurrentOrganizationRanks: {
76
74
  autoLoad: true,
77
- authority: "SYSTEM_ADMIN",
78
75
  url: "api/v1/public/organizationrank/all",
79
76
  data: [],
80
77
  },
81
78
  SystemOrganizationUnits: {
82
79
  autoLoad: true,
83
- authority: "SYSTEM_ADMIN",
84
80
  url: "api/v1/public/organization/units/all",
85
81
  data: [],
86
82
  },
87
83
  CurrentOrganizationUnits: {
88
84
  autoLoad: true,
89
- authority: "SYSTEM_ADMIN",
90
85
  url: "api/v1/public/organizationunit/all",
91
86
  data: [],
92
87
  },
93
88
  SystemOrganizationUnitType: {
94
89
  autoLoad: true,
95
- authority: "SYSTEM_ADMIN",
96
90
  url: "api/v1/public/organizationunittype/all",
97
91
  data: [],
98
92
  },
@@ -159,7 +153,6 @@ export const ADMINISTRATION_STORES: CommonStores = {
159
153
  persons: {
160
154
  autoLoad: true,
161
155
  data: [],
162
- authority: "SYSTEM_ADMIN",
163
156
  url: "api/v1/public/person/all",
164
157
  },
165
158
  };
package/vite.config.ts CHANGED
@@ -19,6 +19,6 @@ export default defineConfig({
19
19
  },
20
20
  },
21
21
  server: {
22
- port: 3000,
22
+ port: 8082,
23
23
  },
24
24
  });