@asaleh37/ui-base 26.2.2 → 26.2.16
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 +45 -45
- 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/administration/dev/EntityParameterGrid.tsx +20 -5
- package/src/components/administration/dev/MailAttachmentGrid.tsx +19 -2
- package/src/components/administration/dev/MailTemplateGrid.tsx +1 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridTopBar.tsx +159 -142
- package/src/components/templates/report/ReportViewer.tsx +50 -61
- package/src/hooks/useParameterPanel.tsx +1 -1
- package/src/main.tsx +1 -1
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ import { DATE_FORMAT, DATE_TIME_FORMAT } from "../../../util";
|
|
|
12
12
|
const EntityParameterGrid: React.FC = () => {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
14
|
const SystemParameterTypes = useSelector(
|
|
15
|
-
(state: any) => state.commonStores.stores.SystemParameterTypes.data
|
|
15
|
+
(state: any) => state.commonStores.stores.SystemParameterTypes.data,
|
|
16
16
|
);
|
|
17
17
|
const [data, setData] = useState([]);
|
|
18
18
|
const apiActions = useApiActions({
|
|
@@ -24,7 +24,7 @@ const EntityParameterGrid: React.FC = () => {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
const SystemDataQueries = useSelector(
|
|
27
|
-
(state: any) => state.commonStores.stores.SystemDataQueries.data
|
|
27
|
+
(state: any) => state.commonStores.stores.SystemDataQueries.data,
|
|
28
28
|
);
|
|
29
29
|
const adjustFormAccordingFormValues: FormValueChangeCallBk = (
|
|
30
30
|
formValues: any,
|
|
@@ -32,7 +32,7 @@ const EntityParameterGrid: React.FC = () => {
|
|
|
32
32
|
formManager,
|
|
33
33
|
fieldName,
|
|
34
34
|
newValue,
|
|
35
|
-
selectedRecord
|
|
35
|
+
selectedRecord,
|
|
36
36
|
) => {
|
|
37
37
|
if (fieldName) {
|
|
38
38
|
if (fieldName === "parameterType") {
|
|
@@ -41,6 +41,7 @@ const EntityParameterGrid: React.FC = () => {
|
|
|
41
41
|
formActions.showField("parameterDataQueryId");
|
|
42
42
|
formActions.showField("parameterDataset");
|
|
43
43
|
formActions.showField("parameterDisplayField");
|
|
44
|
+
formActions.showField("comboboxValueDataType");
|
|
44
45
|
formActions.showField("parameterValueField");
|
|
45
46
|
formActions.hideField("parameterValueFormat");
|
|
46
47
|
} else {
|
|
@@ -48,6 +49,7 @@ const EntityParameterGrid: React.FC = () => {
|
|
|
48
49
|
formActions.hideField("parameterDataset");
|
|
49
50
|
formActions.hideField("parameterDisplayField");
|
|
50
51
|
formActions.hideField("parameterValueField");
|
|
52
|
+
formActions.hideField("comboboxValueDataType");
|
|
51
53
|
}
|
|
52
54
|
if (newValue === "date" || newValue === "datetime") {
|
|
53
55
|
formActions.showField("parameterValueFormat");
|
|
@@ -75,14 +77,14 @@ const EntityParameterGrid: React.FC = () => {
|
|
|
75
77
|
formActions.showField("parameterDataQueryId");
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
|
-
} else {
|
|
80
|
+
} else {
|
|
79
81
|
if (formValues?.parameterType === "combobox") {
|
|
80
82
|
formManager.setValue("parameterValueFormat", null);
|
|
81
83
|
formActions.showField("parameterDataQueryId");
|
|
82
84
|
formActions.showField("parameterDataset");
|
|
83
85
|
formActions.showField("parameterDisplayField");
|
|
84
86
|
formActions.showField("parameterValueField");
|
|
85
|
-
formActions.hideField("parameterValueFormat");
|
|
87
|
+
formActions.hideField("parameterValueFormat");
|
|
86
88
|
} else if (formValues?.parameterType === "date") {
|
|
87
89
|
formActions.hideField("parameterDataQueryId");
|
|
88
90
|
formActions.hideField("parameterDataset");
|
|
@@ -257,6 +259,19 @@ const EntityParameterGrid: React.FC = () => {
|
|
|
257
259
|
fieldType: "text",
|
|
258
260
|
},
|
|
259
261
|
},
|
|
262
|
+
{
|
|
263
|
+
type: "field",
|
|
264
|
+
mode: "props",
|
|
265
|
+
props: {
|
|
266
|
+
fieldLabel: "Value Type",
|
|
267
|
+
fieldName: "comboboxValueDataType",
|
|
268
|
+
fieldType: "combobox",
|
|
269
|
+
options: [{ value: "string" }, { value: "number" }],
|
|
270
|
+
comboboxValueDataType: "string",
|
|
271
|
+
optionDisplayField: "value",
|
|
272
|
+
optionValueField: "value",
|
|
273
|
+
},
|
|
274
|
+
},
|
|
260
275
|
{
|
|
261
276
|
type: "field",
|
|
262
277
|
mode: "props",
|
|
@@ -12,7 +12,10 @@ type MailAttachmentGridProps = {
|
|
|
12
12
|
|
|
13
13
|
const MailAttachmentGrid: React.FC<MailAttachmentGridProps> = (props) => {
|
|
14
14
|
const SystemReports = useSelector(
|
|
15
|
-
(state: any) => state.commonStores.stores.SystemReports.data
|
|
15
|
+
(state: any) => state.commonStores.stores.SystemReports.data,
|
|
16
|
+
);
|
|
17
|
+
const SystemDataQueries = useSelector(
|
|
18
|
+
(state: any) => state.commonStores.stores.SystemDataQueries.data,
|
|
16
19
|
);
|
|
17
20
|
const { t } = useTranslation();
|
|
18
21
|
const [data, setData] = useState([]);
|
|
@@ -99,10 +102,24 @@ const MailAttachmentGrid: React.FC<MailAttachmentGridProps> = (props) => {
|
|
|
99
102
|
optionDisplayField: "reportName",
|
|
100
103
|
fieldLabel: "REPORT_REPORT_NAME",
|
|
101
104
|
fieldName: "reportId",
|
|
102
|
-
required:
|
|
105
|
+
required: false,
|
|
103
106
|
fieldType: "combobox",
|
|
104
107
|
},
|
|
105
108
|
},
|
|
109
|
+
{
|
|
110
|
+
type: "field",
|
|
111
|
+
mode: "props",
|
|
112
|
+
props: {
|
|
113
|
+
fieldLabel:
|
|
114
|
+
"Attachment Query (List of Attachments Records) from XXCCAD.ATTACHMENT Table ",
|
|
115
|
+
fieldName: "attachmentQueryId",
|
|
116
|
+
required: false,
|
|
117
|
+
fieldType: "combobox",
|
|
118
|
+
options: SystemDataQueries,
|
|
119
|
+
optionDisplayField: "queryName",
|
|
120
|
+
optionValueField: "id",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
106
123
|
{
|
|
107
124
|
type: "field",
|
|
108
125
|
mode: "props",
|
|
@@ -48,7 +48,7 @@ const StyledToolbarButton = styled(ToolbarButton)<{ ownerState: OwnerState }>(
|
|
|
48
48
|
opacity: ownerState.expanded ? 0 : 1,
|
|
49
49
|
pointerEvents: ownerState.expanded ? "none" : "auto",
|
|
50
50
|
transition: theme.transitions.create(["opacity"]),
|
|
51
|
-
})
|
|
51
|
+
}),
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
const StyledTextField = styled(TextField)<{
|
|
@@ -62,7 +62,7 @@ const StyledTextField = styled(TextField)<{
|
|
|
62
62
|
}));
|
|
63
63
|
|
|
64
64
|
const TemplateGridTopBar: React.FC<TemplateGridTopBarProps> = (
|
|
65
|
-
props: TemplateGridTopBarProps
|
|
65
|
+
props: TemplateGridTopBarProps,
|
|
66
66
|
) => {
|
|
67
67
|
const { t } = useTranslation();
|
|
68
68
|
const session = useSession();
|
|
@@ -76,158 +76,175 @@ const TemplateGridTopBar: React.FC<TemplateGridTopBarProps> = (
|
|
|
76
76
|
type: "include",
|
|
77
77
|
},
|
|
78
78
|
props?.templateProps?.data || [],
|
|
79
|
-
props?.templateProps?.keyColumnName || "id"
|
|
79
|
+
props?.templateProps?.keyColumnName || "id",
|
|
80
80
|
);
|
|
81
81
|
return (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
props?.templateProps?.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
82
|
+
<>
|
|
83
|
+
<Toolbar>
|
|
84
|
+
{isCreationEnabled &&
|
|
85
|
+
isCreationAuthorized &&
|
|
86
|
+
props?.templateProps?.editMode?.editMode != "none" ? (
|
|
87
|
+
props?.templateProps?.hideCreateBtn === undefined ||
|
|
88
|
+
props?.templateProps?.hideCreateBtn === false ? (
|
|
89
|
+
<Button onClick={props?.handleCreateNewRecord}>
|
|
90
|
+
<FontAwesomeIcon
|
|
91
|
+
icon="add"
|
|
92
|
+
style={{ marginRight: 5, marginLeft: 5 }}
|
|
93
|
+
/>
|
|
94
|
+
{t("ADD_BTN_LABEL")}
|
|
95
|
+
</Button>
|
|
96
|
+
) : (
|
|
97
|
+
<></>
|
|
98
|
+
)
|
|
95
99
|
) : (
|
|
96
100
|
<></>
|
|
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
|
-
</Box>
|
|
123
|
-
|
|
124
|
-
<Tooltip title="Columns">
|
|
125
|
-
<ColumnsPanelTrigger render={<ToolbarButton />}>
|
|
126
|
-
<GridViewColumnIcon fontSize="small" />
|
|
127
|
-
</ColumnsPanelTrigger>
|
|
128
|
-
</Tooltip>
|
|
101
|
+
)}
|
|
102
|
+
{props?.templateProps?.rowActions ? (
|
|
103
|
+
props.templateProps.rowActions.map((rowAction, index) =>
|
|
104
|
+
rowAction?.gridActionProps?.multiRecord === true ? (
|
|
105
|
+
<TemplateGridMultiRecordAction
|
|
106
|
+
{...rowAction}
|
|
107
|
+
key={index}
|
|
108
|
+
reloadData={async () => {
|
|
109
|
+
props.templateProps.apiActions.reloadData(
|
|
110
|
+
props?.templateProps?.gridLoadParametersValues,
|
|
111
|
+
);
|
|
112
|
+
}}
|
|
113
|
+
recordIdsToProcessActionOn={gridSelection.selectedRecordIds}
|
|
114
|
+
recordsToProcessActionOn={gridSelection.selectedRecords}
|
|
115
|
+
/>
|
|
116
|
+
) : null,
|
|
117
|
+
)
|
|
118
|
+
) : (
|
|
119
|
+
<></>
|
|
120
|
+
)}
|
|
121
|
+
<Box
|
|
122
|
+
sx={{
|
|
123
|
+
flex: 1,
|
|
124
|
+
}}
|
|
125
|
+
></Box>
|
|
129
126
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
badgeContent={state.filterCount}
|
|
136
|
-
color="primary"
|
|
137
|
-
variant="dot"
|
|
138
|
-
>
|
|
139
|
-
<GridFilterListIcon fontSize="small" />
|
|
140
|
-
</Badge>
|
|
141
|
-
</ToolbarButton>
|
|
142
|
-
)}
|
|
143
|
-
/>
|
|
144
|
-
</Tooltip>
|
|
127
|
+
<Tooltip title="Columns">
|
|
128
|
+
<ColumnsPanelTrigger render={<ToolbarButton />}>
|
|
129
|
+
<GridViewColumnIcon fontSize="small" />
|
|
130
|
+
</ColumnsPanelTrigger>
|
|
131
|
+
</Tooltip>
|
|
145
132
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
133
|
+
<Tooltip title="Filters">
|
|
134
|
+
<FilterPanelTrigger
|
|
135
|
+
render={(props, state) => (
|
|
136
|
+
<ToolbarButton {...props} color="default">
|
|
137
|
+
<Badge
|
|
138
|
+
badgeContent={state.filterCount}
|
|
139
|
+
color="primary"
|
|
140
|
+
variant="dot"
|
|
141
|
+
>
|
|
142
|
+
<GridFilterListIcon fontSize="small" />
|
|
143
|
+
</Badge>
|
|
144
|
+
</ToolbarButton>
|
|
145
|
+
)}
|
|
146
|
+
/>
|
|
151
147
|
</Tooltip>
|
|
152
|
-
) : (
|
|
153
|
-
<></>
|
|
154
|
-
)}
|
|
155
148
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
149
|
+
{props?.templateProps?.gridStateKey ? (
|
|
150
|
+
<Tooltip title={t("RESET_GRID_STATE")}>
|
|
151
|
+
<IconButton onClick={props?.clearGridState}>
|
|
152
|
+
<FontAwesomeIcon icon="eraser" />
|
|
153
|
+
</IconButton>
|
|
154
|
+
</Tooltip>
|
|
155
|
+
) : (
|
|
156
|
+
<></>
|
|
157
|
+
)}
|
|
158
|
+
|
|
159
|
+
<Divider
|
|
160
|
+
orientation="vertical"
|
|
161
|
+
variant="middle"
|
|
162
|
+
flexItem
|
|
163
|
+
sx={{ mx: 0.5 }}
|
|
164
|
+
/>
|
|
162
165
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
<Tooltip title={t("EXPORT_EXECL_LABEL")}>
|
|
167
|
+
<ExportExcel render={<MenuItem />}>
|
|
168
|
+
<FontAwesomeIcon icon="file-excel" color="green" />
|
|
169
|
+
</ExportExcel>
|
|
170
|
+
</Tooltip>
|
|
168
171
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
<StyledQuickFilter>
|
|
173
|
+
<QuickFilterTrigger
|
|
174
|
+
render={(triggerProps, state) => (
|
|
175
|
+
<Tooltip title={t("SEARCH_BTN_LABEL")} enterDelay={0}>
|
|
176
|
+
<StyledToolbarButton
|
|
177
|
+
{...triggerProps}
|
|
178
|
+
ownerState={{ expanded: state.expanded }}
|
|
179
|
+
color="default"
|
|
180
|
+
aria-disabled={state.expanded}
|
|
181
|
+
>
|
|
182
|
+
<FontAwesomeIcon icon="search" />
|
|
183
|
+
</StyledToolbarButton>
|
|
184
|
+
</Tooltip>
|
|
185
|
+
)}
|
|
186
|
+
/>
|
|
187
|
+
<QuickFilterControl
|
|
188
|
+
render={({ ref, ...controlProps }, state) => (
|
|
189
|
+
<StyledTextField
|
|
190
|
+
{...controlProps}
|
|
175
191
|
ownerState={{ expanded: state.expanded }}
|
|
176
|
-
|
|
177
|
-
aria-
|
|
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
|
-
</StyledQuickFilter>
|
|
192
|
+
inputRef={ref}
|
|
193
|
+
aria-label="Search"
|
|
194
|
+
placeholder={`${t("SEARCH_BTN_LABEL")}...`}
|
|
195
|
+
size="small"
|
|
196
|
+
slotProps={{
|
|
197
|
+
input: {
|
|
198
|
+
startAdornment: (
|
|
199
|
+
<InputAdornment position="start">
|
|
200
|
+
<FontAwesomeIcon icon="search" />
|
|
201
|
+
</InputAdornment>
|
|
202
|
+
),
|
|
203
|
+
endAdornment: state.value ? (
|
|
204
|
+
<InputAdornment position="end">
|
|
205
|
+
<QuickFilterClear
|
|
206
|
+
edge="end"
|
|
207
|
+
size="small"
|
|
208
|
+
aria-label="Clear search"
|
|
209
|
+
// material={{ sx: { marginRight: -0.75 } }}
|
|
210
|
+
>
|
|
211
|
+
<FontAwesomeIcon icon="xmark" />
|
|
212
|
+
</QuickFilterClear>
|
|
213
|
+
</InputAdornment>
|
|
214
|
+
) : null,
|
|
215
|
+
...controlProps.slotProps?.input,
|
|
216
|
+
},
|
|
217
|
+
...controlProps.slotProps,
|
|
218
|
+
}}
|
|
219
|
+
/>
|
|
220
|
+
)}
|
|
221
|
+
/>
|
|
222
|
+
</StyledQuickFilter>
|
|
223
|
+
|
|
224
|
+
<IconButton
|
|
225
|
+
onClick={() => {
|
|
226
|
+
props.templateProps.apiActions.reloadData(
|
|
227
|
+
props?.templateProps?.gridLoadParametersValues,
|
|
228
|
+
);
|
|
229
|
+
}}
|
|
230
|
+
>
|
|
231
|
+
<FontAwesomeIcon icon="refresh" />
|
|
232
|
+
</IconButton>
|
|
233
|
+
</Toolbar>
|
|
220
234
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
235
|
+
{props?.templateProps?.tBar ? (
|
|
236
|
+
<Box
|
|
237
|
+
sx={{
|
|
238
|
+
display: "flex",
|
|
239
|
+
padding: 2,
|
|
240
|
+
}}
|
|
241
|
+
>
|
|
242
|
+
{props?.templateProps?.tBar}
|
|
243
|
+
</Box>
|
|
244
|
+
) : (
|
|
245
|
+
<></>
|
|
246
|
+
)}
|
|
247
|
+
</>
|
|
231
248
|
);
|
|
232
249
|
};
|
|
233
250
|
|
|
@@ -27,7 +27,7 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
27
27
|
const [errorMessage, setErrorMessage] = useState(null);
|
|
28
28
|
const [excelReportData, setExcelReportData] = useState<Array<any>>([]);
|
|
29
29
|
const [reportViewerState, setReportViewerState] = useState<ReportViewerState>(
|
|
30
|
-
"WAITING_REPORT_CODE"
|
|
30
|
+
"WAITING_REPORT_CODE",
|
|
31
31
|
);
|
|
32
32
|
const { handleGetRequest, handlePostRequest, HandleDownloadHTTPPostPDF } =
|
|
33
33
|
useAxios();
|
|
@@ -52,7 +52,7 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
52
52
|
},
|
|
53
53
|
failureCallBkFn: (response) => {
|
|
54
54
|
setErrorMessage(
|
|
55
|
-
"Failed loading report metadata ... contact your administrator"
|
|
55
|
+
"Failed loading report metadata ... contact your administrator",
|
|
56
56
|
);
|
|
57
57
|
setReportViewerState("ERROR");
|
|
58
58
|
},
|
|
@@ -136,7 +136,7 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
136
136
|
},
|
|
137
137
|
failureCallBkFn: (response) => {
|
|
138
138
|
setErrorMessage(
|
|
139
|
-
"Failed To run report ... contact your administrator"
|
|
139
|
+
"Failed To run report ... contact your administrator",
|
|
140
140
|
);
|
|
141
141
|
setReportViewerState("ERROR");
|
|
142
142
|
},
|
|
@@ -160,9 +160,9 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
160
160
|
<>
|
|
161
161
|
<Box
|
|
162
162
|
sx={{
|
|
163
|
-
display: "flex",
|
|
164
|
-
alignItems: "center",
|
|
165
|
-
justifyContent: "center",
|
|
163
|
+
// display: "flex",
|
|
164
|
+
// alignItems: "center",
|
|
165
|
+
// justifyContent: "center",
|
|
166
166
|
width: "100%",
|
|
167
167
|
}}
|
|
168
168
|
>
|
|
@@ -208,63 +208,52 @@ const ReportViewer: React.FC<ReportViewerProps> = (props) => {
|
|
|
208
208
|
<></>
|
|
209
209
|
)}
|
|
210
210
|
</Box>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
) : reportViewerState === "SHOWING_RESULT" ||
|
|
225
|
-
((reportViewerState === "WAITING_PARAMETER_INPUT" ||
|
|
226
|
-
reportViewerState === "WAITING_RESULT") &&
|
|
227
|
-
reportInfo?.reportType === "Excel") ? (
|
|
228
|
-
reportInfo?.reportType === "Excel" ? (
|
|
229
|
-
<ExcelReportViewer
|
|
230
|
-
reportData={excelReportData}
|
|
231
|
-
setReportData={setExcelReportData}
|
|
232
|
-
reloadReport={async () => {
|
|
233
|
-
runReport(parametersValues);
|
|
234
|
-
}}
|
|
235
|
-
gridLoadParameters={panelElements}
|
|
236
|
-
gridLoadParametersValues={parametersValues}
|
|
237
|
-
setGridLoadParametersValues={setParametersValues}
|
|
238
|
-
/>
|
|
239
|
-
) : (
|
|
240
|
-
<iframe
|
|
241
|
-
src={blobUrl}
|
|
242
|
-
width="100%"
|
|
243
|
-
height="100%"
|
|
244
|
-
title="PDF Preview"
|
|
245
|
-
style={{ border: "1px solid #ccc", marginTop: "20px" }}
|
|
246
|
-
></iframe>
|
|
247
|
-
)
|
|
248
|
-
) : reportViewerState === "ERROR" ? (
|
|
249
|
-
<Box
|
|
250
|
-
sx={{
|
|
251
|
-
display: "flex",
|
|
252
|
-
flex: 1,
|
|
253
|
-
alignItems: "center",
|
|
254
|
-
justifyContent: "center",
|
|
211
|
+
{reportViewerState === "WAITING_PARAMETER_INPUT" &&
|
|
212
|
+
reportInfo?.reportType != "Excel" ? (
|
|
213
|
+
<ParameterPanel searchBtnClickCallBk={runReport} />
|
|
214
|
+
) : reportViewerState === "SHOWING_RESULT" ||
|
|
215
|
+
((reportViewerState === "WAITING_PARAMETER_INPUT" ||
|
|
216
|
+
reportViewerState === "WAITING_RESULT") &&
|
|
217
|
+
reportInfo?.reportType === "Excel") ? (
|
|
218
|
+
reportInfo?.reportType === "Excel" ? (
|
|
219
|
+
<ExcelReportViewer
|
|
220
|
+
reportData={excelReportData}
|
|
221
|
+
setReportData={setExcelReportData}
|
|
222
|
+
reloadReport={async () => {
|
|
223
|
+
runReport(parametersValues);
|
|
255
224
|
}}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
style={{ marginRight: 10, marginLeft: 10 }}
|
|
261
|
-
/>
|
|
262
|
-
{errorMessage}
|
|
263
|
-
</Box>
|
|
225
|
+
gridLoadParameters={panelElements}
|
|
226
|
+
gridLoadParametersValues={parametersValues}
|
|
227
|
+
setGridLoadParametersValues={setParametersValues}
|
|
228
|
+
/>
|
|
264
229
|
) : (
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
230
|
+
<iframe
|
|
231
|
+
src={blobUrl}
|
|
232
|
+
width="100%"
|
|
233
|
+
height="100%"
|
|
234
|
+
title="PDF Preview"
|
|
235
|
+
style={{ border: "1px solid #ccc", marginTop: "20px" }}
|
|
236
|
+
></iframe>
|
|
237
|
+
)
|
|
238
|
+
) : reportViewerState === "ERROR" ? (
|
|
239
|
+
<Box
|
|
240
|
+
sx={{
|
|
241
|
+
display: "flex",
|
|
242
|
+
flex: 1,
|
|
243
|
+
alignItems: "center",
|
|
244
|
+
justifyContent: "center",
|
|
245
|
+
}}
|
|
246
|
+
>
|
|
247
|
+
<FontAwesomeIcon
|
|
248
|
+
icon="circle-exclamation"
|
|
249
|
+
color="darkred"
|
|
250
|
+
style={{ marginRight: 10, marginLeft: 10 }}
|
|
251
|
+
/>
|
|
252
|
+
{errorMessage}
|
|
253
|
+
</Box>
|
|
254
|
+
) : (
|
|
255
|
+
<></>
|
|
256
|
+
)}
|
|
268
257
|
</>
|
|
269
258
|
);
|
|
270
259
|
};
|
package/src/main.tsx
CHANGED
|
@@ -14,7 +14,7 @@ createRoot(document.getElementById("root")!).render(
|
|
|
14
14
|
}}
|
|
15
15
|
appThemeMode="dark"
|
|
16
16
|
allowThemeChange={true}
|
|
17
|
-
appVersion="25.12.
|
|
17
|
+
appVersion="25.12.16"
|
|
18
18
|
authenticationMethod="APP"
|
|
19
19
|
azureConfiguration={{
|
|
20
20
|
frontEndClientId: "c3bbbdbd-f392-4459-b3dd-2351cb07f924",
|