+
@@ -271,20 +276,18 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, omit
}
{
widgetMetaData.type === "statistics" && (
- widgetData && widgetData[i] && (
-
reloadWidget(i, data)}
- >
-
-
- )
+ // reloadWidgetCallback={(data) => reloadWidget(i, data)}
+ >
+
+
)
}
{
diff --git a/src/qqq/components/widgets/Widget.tsx b/src/qqq/components/widgets/Widget.tsx
index 320b916..cd24a89 100644
--- a/src/qqq/components/widgets/Widget.tsx
+++ b/src/qqq/components/widgets/Widget.tsx
@@ -285,7 +285,7 @@ function Widget(props: React.PropsWithChildren
): JSX.Element
const hasPermission = props.widgetData?.hasPermission === undefined || props.widgetData?.hasPermission === true;
const widgetContent =
-
+
{
diff --git a/src/qqq/components/widgets/charts/piechart/PieChart.tsx b/src/qqq/components/widgets/charts/piechart/PieChart.tsx
index f97647e..877749a 100644
--- a/src/qqq/components/widgets/charts/piechart/PieChart.tsx
+++ b/src/qqq/components/widgets/charts/piechart/PieChart.tsx
@@ -85,7 +85,7 @@ function PieChart({description, chartData}: Props): JSX.Element
}
return (
-
+
diff --git a/src/qqq/components/widgets/statistics/StatisticsCard.tsx b/src/qqq/components/widgets/statistics/StatisticsCard.tsx
index 8a02038..ac728dd 100644
--- a/src/qqq/components/widgets/statistics/StatisticsCard.tsx
+++ b/src/qqq/components/widgets/statistics/StatisticsCard.tsx
@@ -55,6 +55,10 @@ StatisticsCard.defaultProps = {
function StatisticsCard({data, increaseIsGood}: Props): JSX.Element
{
+ if(! data)
+ {
+ return null;
+ }
const {count, percentageAmount, percentageLabel} = data;
let percentageString = "";
@@ -82,7 +86,7 @@ function StatisticsCard({data, increaseIsGood}: Props): JSX.Element
return (
-
+
{
count !== undefined ? (
@@ -96,7 +100,7 @@ function StatisticsCard({data, increaseIsGood}: Props): JSX.Element
}
) : (
-
+
)
}
diff --git a/src/qqq/pages/processes/ProcessRun.tsx b/src/qqq/pages/processes/ProcessRun.tsx
index 35d9a62..506784d 100644
--- a/src/qqq/pages/processes/ProcessRun.tsx
+++ b/src/qqq/pages/processes/ProcessRun.tsx
@@ -38,7 +38,6 @@ import {Alert, Button, CircularProgress, Icon, TablePagination} from "@mui/mater
import Box from "@mui/material/Box";
import Card from "@mui/material/Card";
import Grid from "@mui/material/Grid";
-import Link from "@mui/material/Link";
import Step from "@mui/material/Step";
import StepLabel from "@mui/material/StepLabel";
import Stepper from "@mui/material/Stepper";
@@ -46,6 +45,7 @@ import Typography from "@mui/material/Typography";
import {DataGridPro, GridColDef} from "@mui/x-data-grid-pro";
import FormData from "form-data";
import {Form, Formik} from "formik";
+import parse from "html-react-parser";
import React, {useContext, useEffect, useState} from "react";
import {useLocation, useNavigate, useParams} from "react-router-dom";
import * as Yup from "yup";
@@ -75,7 +75,7 @@ interface Props
recordIds?: string | QQueryFilter;
closeModalHandler?: (event: object, reason: string) => void;
forceReInit?: number;
- overrideLabel?: string
+ overrideLabel?: string;
}
const INITIAL_RETRY_MILLIS = 1_500;
@@ -225,12 +225,12 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, isReport,
xhr.open("POST", url);
xhr.responseType = "blob";
let formData = new FormData();
- formData.append("Authorization", qController.getAuthorizationHeaderValue())
+ formData.append("Authorization", qController.getAuthorizationHeaderValue());
// @ts-ignore
xhr.send(formData);
- xhr.onload = function(e)
+ xhr.onload = function (e)
{
if (this.status == 200)
{
@@ -247,7 +247,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, isReport,
}
else
{
- setProcessError("Error downloading file", true)
+ setProcessError("Error downloading file", true);
}
};
};
@@ -299,7 +299,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, isReport,
{isModal ?
- :
+ : !isWidget &&
}
@@ -350,7 +350,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, isReport,
const {formFields, values, errors, touched} = formData;
let localTableSections = tableSections;
- if(localTableSections == null)
+ if (localTableSections == null)
{
//////////////////////////////////////////////////////////////////////////////////////////////////////
// if the table sections (ones that actually have fields to edit) haven't been built yet, do so now //
@@ -359,6 +359,23 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, isReport,
setTableSections(localTableSections);
}
+ ////////////////////////////////////////////////////////////////////////////////////
+ // if there are any fields that are possible values, they need to know what their //
+ // initial value to display should be. //
+ // this **needs to be** the actual PVS LABEL - not the raw value (e.g, PVS ID) //
+ // but our first use case, they're the same, so... this needs fixed. //
+ ////////////////////////////////////////////////////////////////////////////////////
+ if(formFields && processValues)
+ {
+ Object.keys(formFields).forEach((key) =>
+ {
+ if(formFields[key].possibleValueProps && processValues[key])
+ {
+ formFields[key].possibleValueProps.initialDisplayValue = processValues[key]
+ }
+ })
+ }
+
return (
<>
{
@@ -420,25 +437,25 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, isReport,
{localTableSections.map((section: QTableSection, index: number) =>
{
- const name = section.name
+ const name = section.name;
- if(section.isHidden)
+ if (section.isHidden)
{
- return ;
+ return;
}
const sectionFormFields = {};
- for(let i = 0; i 0)
+ if (Object.keys(sectionFormFields).length > 0)
{
const sectionFormData = {
formFields: sectionFormFields,
@@ -589,6 +606,14 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, isReport,
)
}
+ {
+ component.type === QComponentType.HTML && (
+ processValues[`${step.name}.html`] &&
+