@asaleh37/ui-base 25.9.24 → 25.9.29
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 +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +1 -0
- package/src/components/templates/report/ReportViewer.tsx +14 -10
- package/src/layout/TopBar.tsx +1 -1
- package/src/main.tsx +1 -1
- package/src/redux/features/administration/AdministrationStoresMetaData.ts +7 -1
- package/vite.config.ts +1 -1
package/package.json
CHANGED
|
@@ -49,15 +49,6 @@ 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
|
-
}
|
|
61
52
|
},
|
|
62
53
|
failureCallBkFn: (response) => {
|
|
63
54
|
setErrorMessage(
|
|
@@ -68,6 +59,20 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
68
59
|
});
|
|
69
60
|
};
|
|
70
61
|
|
|
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
|
+
|
|
71
76
|
const runReport = async (params) => {
|
|
72
77
|
setReportViewerState("WAITING_RESULT");
|
|
73
78
|
if (reportInfo?.reportType === "Excel") {
|
|
@@ -98,7 +103,6 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
98
103
|
successCallBkFn: (response: any) => {
|
|
99
104
|
setReportViewerState("SHOWING_RESULT");
|
|
100
105
|
const contentDisposition = response.headers["content-disposition"];
|
|
101
|
-
debugger;
|
|
102
106
|
let filename = "downloaded_file";
|
|
103
107
|
if (
|
|
104
108
|
contentDisposition &&
|
package/src/layout/TopBar.tsx
CHANGED
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://
|
|
6
|
+
apiBaseUrl="http://localhost:8080/api-base"
|
|
7
7
|
enableUINotifications={false}
|
|
8
8
|
appLogo={"/logo.png"}
|
|
9
9
|
appName="UI Base Library"
|
|
@@ -28,6 +28,7 @@ export const ADMINISTRATION_STORES: CommonStores = {
|
|
|
28
28
|
SystemWorkflows: {
|
|
29
29
|
autoLoad: true,
|
|
30
30
|
url: "api/v1/dev/workflowdocument/all",
|
|
31
|
+
authority: "DEVELOPMENT_ADMIN",
|
|
31
32
|
data: [],
|
|
32
33
|
},
|
|
33
34
|
SystemWidgetTypes: {
|
|
@@ -67,26 +68,31 @@ export const ADMINISTRATION_STORES: CommonStores = {
|
|
|
67
68
|
},
|
|
68
69
|
SystemOrganizationRanks: {
|
|
69
70
|
autoLoad: true,
|
|
71
|
+
authority: "SYSTEM_ADMIN",
|
|
70
72
|
url: "api/v1/public/organization/ranks/all",
|
|
71
73
|
data: [],
|
|
72
74
|
},
|
|
73
75
|
CurrentOrganizationRanks: {
|
|
74
76
|
autoLoad: true,
|
|
77
|
+
authority: "SYSTEM_ADMIN",
|
|
75
78
|
url: "api/v1/public/organizationrank/all",
|
|
76
79
|
data: [],
|
|
77
80
|
},
|
|
78
81
|
SystemOrganizationUnits: {
|
|
79
82
|
autoLoad: true,
|
|
83
|
+
authority: "SYSTEM_ADMIN",
|
|
80
84
|
url: "api/v1/public/organization/units/all",
|
|
81
85
|
data: [],
|
|
82
86
|
},
|
|
83
87
|
CurrentOrganizationUnits: {
|
|
84
88
|
autoLoad: true,
|
|
89
|
+
authority: "SYSTEM_ADMIN",
|
|
85
90
|
url: "api/v1/public/organizationunit/all",
|
|
86
91
|
data: [],
|
|
87
92
|
},
|
|
88
93
|
SystemOrganizationUnitType: {
|
|
89
94
|
autoLoad: true,
|
|
95
|
+
authority: "SYSTEM_ADMIN",
|
|
90
96
|
url: "api/v1/public/organizationunittype/all",
|
|
91
97
|
data: [],
|
|
92
98
|
},
|
|
@@ -152,7 +158,7 @@ export const ADMINISTRATION_STORES: CommonStores = {
|
|
|
152
158
|
},
|
|
153
159
|
persons: {
|
|
154
160
|
autoLoad: true,
|
|
155
|
-
data: [],
|
|
161
|
+
data: [],
|
|
156
162
|
url: "api/v1/public/person/all",
|
|
157
163
|
},
|
|
158
164
|
};
|