ui-soxo-bootstrap-core 2.6.8 → 2.6.9
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.
|
@@ -105,16 +105,14 @@ export default function ReportingDashboard({
|
|
|
105
105
|
const fetchId = idOverride || id;
|
|
106
106
|
await CoreScripts.getRecord({ id: fetchId, dbPtr }).then(async ({ result }) => {
|
|
107
107
|
// Check if display columns are provided from backend
|
|
108
|
-
|
|
109
|
-
// Parse and set columns from stored JSON
|
|
110
|
-
|
|
111
|
-
setColumns(JSON.parse(result.display_columns));
|
|
112
|
-
} else {
|
|
113
|
-
// Reset columns if no display columns exist
|
|
108
|
+
let parsedColumns = [];
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
if (result.display_columns) {
|
|
111
|
+
parsedColumns = JSON.parse(result.display_columns);
|
|
116
112
|
}
|
|
117
|
-
|
|
113
|
+
setColumns(parsedColumns);
|
|
114
|
+
|
|
115
|
+
await prepareInputParameters(result, parsedColumns);
|
|
118
116
|
|
|
119
117
|
if (result.summary_columns) {
|
|
120
118
|
setSummaryColumns(JSON.parse(result.summary_columns));
|
|
@@ -159,7 +157,7 @@ export default function ReportingDashboard({
|
|
|
159
157
|
*/
|
|
160
158
|
|
|
161
159
|
//Prepare input parameters by mapping default values and binding models if needed
|
|
162
|
-
async function prepareInputParameters(record) {
|
|
160
|
+
async function prepareInputParameters(record, parsedColumns) {
|
|
163
161
|
setLoading(true);
|
|
164
162
|
let urlParams = Location.search();
|
|
165
163
|
|
|
@@ -235,7 +233,7 @@ export default function ReportingDashboard({
|
|
|
235
233
|
setformContents(formContent);
|
|
236
234
|
|
|
237
235
|
// Trigger form submission
|
|
238
|
-
onFinish(formContent, null, record.input_parameters);
|
|
236
|
+
onFinish(formContent, null, record.input_parameters, parsedColumns);
|
|
239
237
|
|
|
240
238
|
setLoading(false);
|
|
241
239
|
|
|
@@ -259,7 +257,7 @@ export default function ReportingDashboard({
|
|
|
259
257
|
getPatientDetails();
|
|
260
258
|
}
|
|
261
259
|
|
|
262
|
-
const fetchReportData = async (id, values, dbPtr, pagination) => {
|
|
260
|
+
const fetchReportData = async (id, values, dbPtr, pagination, parsedColumns) => {
|
|
263
261
|
const { current, pageSize } = pagination || {};
|
|
264
262
|
// If card script id is exist load that id otherwise load id
|
|
265
263
|
const coreScriptId = scriptId.current ? scriptId.current : id;
|
|
@@ -300,8 +298,10 @@ export default function ReportingDashboard({
|
|
|
300
298
|
}
|
|
301
299
|
// Update patients
|
|
302
300
|
setPatients(resultDetails || []);
|
|
301
|
+
console.log(parsedColumns);
|
|
302
|
+
|
|
303
303
|
// Check if columns are not yet defined
|
|
304
|
-
if (
|
|
304
|
+
if (parsedColumns.length === 0 && resultDetails.length > 0) {
|
|
305
305
|
// Create columns dynamically from resultDetails keys
|
|
306
306
|
setColumns((prev) => {
|
|
307
307
|
if (prev.length > 0) return prev;
|
|
@@ -363,7 +363,7 @@ export default function ReportingDashboard({
|
|
|
363
363
|
* @param {*} values
|
|
364
364
|
*/
|
|
365
365
|
|
|
366
|
-
const onFinish = async (values, resetPage, inputParamsString) => {
|
|
366
|
+
const onFinish = async (values, resetPage, inputParamsString, parsedColumns) => {
|
|
367
367
|
setLoading(true);
|
|
368
368
|
setCardLoading(true);
|
|
369
369
|
// // Check if the dashboard is visible and both start and end values are provided
|
|
@@ -423,7 +423,7 @@ export default function ReportingDashboard({
|
|
|
423
423
|
|
|
424
424
|
// Call API
|
|
425
425
|
try {
|
|
426
|
-
await fetchReportData(id, values, dbPtr, paginationData);
|
|
426
|
+
await fetchReportData(id, values, dbPtr, paginationData, parsedColumns);
|
|
427
427
|
} finally {
|
|
428
428
|
setLoading(false);
|
|
429
429
|
setCardLoading(false);
|
|
@@ -634,13 +634,13 @@ function GuestList({
|
|
|
634
634
|
useEffect(() => {
|
|
635
635
|
//Cheaking if there is patient data exists
|
|
636
636
|
if (patients) {
|
|
637
|
-
let data = patients?.map((entry) => {
|
|
638
|
-
|
|
637
|
+
// let data = patients?.map((entry) => {
|
|
638
|
+
// entry.rowIndex = entry.opb_id;
|
|
639
639
|
|
|
640
|
-
|
|
640
|
+
// entry.dispatch = dispatch;
|
|
641
641
|
|
|
642
|
-
|
|
643
|
-
});
|
|
642
|
+
// return entry;
|
|
643
|
+
// });
|
|
644
644
|
|
|
645
645
|
// setData(data);
|
|
646
646
|
|
|
@@ -797,7 +797,6 @@ function GuestList({
|
|
|
797
797
|
</div>
|
|
798
798
|
|
|
799
799
|
<div>
|
|
800
|
-
|
|
801
800
|
<Card>
|
|
802
801
|
{loading ? (
|
|
803
802
|
<>
|
|
@@ -806,10 +805,12 @@ function GuestList({
|
|
|
806
805
|
) : (
|
|
807
806
|
<TableComponent
|
|
808
807
|
size="small"
|
|
809
|
-
scroll={{ x: 'max-content' }}
|
|
808
|
+
// scroll={{ x: 'max-content' }}
|
|
809
|
+
scroll={{ x: 'max-content', y: '60vh' }}
|
|
810
810
|
rowKey={(record) => record.OpNo}
|
|
811
811
|
dataSource={filtered ? filtered : patients} // In case if there is no filtered values we can use patient data
|
|
812
812
|
columns={cols}
|
|
813
|
+
sticky
|
|
813
814
|
pagination={false}
|
|
814
815
|
// title={config.caption}
|
|
815
816
|
summary={(pageData) => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Handles navigation and action controls for a multi-step process,
|
|
4
4
|
* including dynamic content rendering and process completion actions.
|
|
5
5
|
*/
|
|
6
|
-
import React, { useState } from 'react';
|
|
6
|
+
import React, { useState, useEffect } from 'react';
|
|
7
7
|
import { Skeleton } from 'antd';
|
|
8
8
|
import { Button } from '../../lib';
|
|
9
9
|
import './action-buttons.scss';
|
|
@@ -23,7 +23,9 @@ export default function ActionButtons({
|
|
|
23
23
|
timelineCollapsed,
|
|
24
24
|
}) {
|
|
25
25
|
const [showNextProcess, setShowNextProcess] = useState(false);
|
|
26
|
-
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
setShowNextProcess(false);
|
|
28
|
+
}, [steps]);
|
|
27
29
|
return (
|
|
28
30
|
<div className="action-buttons-layout">
|
|
29
31
|
<div className="action-buttons-content">{loading ? <Skeleton active /> : renderDynamicComponent()}</div>
|