mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
Merge branch 'release/0.22.0'
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
"@auth0/auth0-react": "1.10.2",
|
"@auth0/auth0-react": "1.10.2",
|
||||||
"@emotion/react": "11.7.1",
|
"@emotion/react": "11.7.1",
|
||||||
"@emotion/styled": "11.6.0",
|
"@emotion/styled": "11.6.0",
|
||||||
"@kingsrook/qqq-frontend-core": "1.0.104",
|
"@kingsrook/qqq-frontend-core": "1.0.105",
|
||||||
"@mui/icons-material": "5.4.1",
|
"@mui/icons-material": "5.4.1",
|
||||||
"@mui/material": "5.11.1",
|
"@mui/material": "5.11.1",
|
||||||
"@mui/styles": "5.11.1",
|
"@mui/styles": "5.11.1",
|
||||||
|
2
pom.xml
2
pom.xml
@ -29,7 +29,7 @@
|
|||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>0.21.0</revision>
|
<revision>0.22.0</revision>
|
||||||
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
@ -183,6 +183,7 @@ function QDynamicForm({formData, formLabel, bulkEditMode, bulkEditSwitchChangeHa
|
|||||||
bulkEditMode={bulkEditMode}
|
bulkEditMode={bulkEditMode}
|
||||||
bulkEditSwitchChangeHandler={bulkEditSwitchChanged}
|
bulkEditSwitchChangeHandler={bulkEditSwitchChanged}
|
||||||
otherValues={otherValuesMap}
|
otherValues={otherValuesMap}
|
||||||
|
useCase="form"
|
||||||
/>
|
/>
|
||||||
{formattedHelpContent}
|
{formattedHelpContent}
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -53,6 +53,7 @@ interface Props
|
|||||||
otherValues?: Map<string, any>;
|
otherValues?: Map<string, any>;
|
||||||
variant: "standard" | "outlined";
|
variant: "standard" | "outlined";
|
||||||
initiallyOpen: boolean;
|
initiallyOpen: boolean;
|
||||||
|
useCase: "form" | "filter";
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicSelect.defaultProps = {
|
DynamicSelect.defaultProps = {
|
||||||
@ -102,7 +103,7 @@ export const getAutocompleteOutlinedStyle = (isDisabled: boolean) =>
|
|||||||
|
|
||||||
const qController = Client.getInstance();
|
const qController = Client.getInstance();
|
||||||
|
|
||||||
function DynamicSelect({tableName, processName, fieldName, possibleValueSourceName, overrideId, fieldLabel, inForm, initialValue, initialDisplayValue, initialValues, onChange, isEditable, isMultiple, bulkEditMode, bulkEditSwitchChangeHandler, otherValues, variant, initiallyOpen}: Props)
|
function DynamicSelect({tableName, processName, fieldName, possibleValueSourceName, overrideId, fieldLabel, inForm, initialValue, initialDisplayValue, initialValues, onChange, isEditable, isMultiple, bulkEditMode, bulkEditSwitchChangeHandler, otherValues, variant, initiallyOpen, useCase}: Props)
|
||||||
{
|
{
|
||||||
const [open, setOpen] = useState(initiallyOpen);
|
const [open, setOpen] = useState(initiallyOpen);
|
||||||
const [options, setOptions] = useState<readonly QPossibleValue[]>([]);
|
const [options, setOptions] = useState<readonly QPossibleValue[]>([]);
|
||||||
@ -194,7 +195,7 @@ function DynamicSelect({tableName, processName, fieldName, possibleValueSourceNa
|
|||||||
(async () =>
|
(async () =>
|
||||||
{
|
{
|
||||||
// console.log(`doing a search with ${searchTerm}`);
|
// console.log(`doing a search with ${searchTerm}`);
|
||||||
const results: QPossibleValue[] = await qController.possibleValues(tableName, processName, possibleValueSourceName ?? fieldName, searchTerm ?? "", null, otherValues);
|
const results: QPossibleValue[] = await qController.possibleValues(tableName, processName, possibleValueSourceName ?? fieldName, searchTerm ?? "", null, otherValues, useCase);
|
||||||
|
|
||||||
if (tableMetaData == null && tableName)
|
if (tableMetaData == null && tableName)
|
||||||
{
|
{
|
||||||
@ -227,7 +228,7 @@ function DynamicSelect({tableName, processName, fieldName, possibleValueSourceNa
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
setOptions([]);
|
setOptions([]);
|
||||||
console.log("Refreshing possible values...");
|
console.log("Refreshing possible values...");
|
||||||
const results: QPossibleValue[] = await qController.possibleValues(tableName, processName, possibleValueSourceName ?? fieldName, searchTerm ?? "", null, otherValues);
|
const results: QPossibleValue[] = await qController.possibleValues(tableName, processName, possibleValueSourceName ?? fieldName, searchTerm ?? "", null, otherValues, useCase);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
setOptions([...results]);
|
setOptions([...results]);
|
||||||
setOtherValuesWhenResultsWereLoaded(JSON.stringify(Object.fromEntries(otherValues)));
|
setOtherValuesWhenResultsWereLoaded(JSON.stringify(Object.fromEntries(otherValues)));
|
||||||
|
@ -183,7 +183,7 @@ const BasicAndAdvancedQueryControls = forwardRef((props: BasicAndAdvancedQueryCo
|
|||||||
{
|
{
|
||||||
// todo - sometimes i want contains instead of equals on strings (client.name, for example...)
|
// todo - sometimes i want contains instead of equals on strings (client.name, for example...)
|
||||||
let defaultOperator = field?.possibleValueSourceName ? QCriteriaOperator.IN : QCriteriaOperator.EQUALS;
|
let defaultOperator = field?.possibleValueSourceName ? QCriteriaOperator.IN : QCriteriaOperator.EQUALS;
|
||||||
if (field?.type == QFieldType.DATE_TIME || field?.type == QFieldType.DATE)
|
if (field?.type == QFieldType.DATE_TIME)
|
||||||
{
|
{
|
||||||
defaultOperator = QCriteriaOperator.GREATER_THAN;
|
defaultOperator = QCriteriaOperator.GREATER_THAN;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ export function EvaluatedExpression({field, expression}: EvaluatedExpressionProp
|
|||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return <>{`${evaluateExpression(timeForEvaluations, field, expression)}`}</>;
|
return <span style={{fontVariantNumeric: "tabular-nums"}}>{`${evaluateExpression(timeForEvaluations, field, expression)}`}</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const HOUR_MS = 60 * 60 * 1000;
|
const HOUR_MS = 60 * 60 * 1000;
|
||||||
|
@ -377,6 +377,7 @@ function FilterCriteriaRowValues({operatorOption, criteria, field, table, valueC
|
|||||||
inForm={false}
|
inForm={false}
|
||||||
onChange={(value: any) => valueChangeHandler(null, 0, value)}
|
onChange={(value: any) => valueChangeHandler(null, 0, value)}
|
||||||
variant="standard"
|
variant="standard"
|
||||||
|
useCase="filter"
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
@ -412,6 +413,7 @@ function FilterCriteriaRowValues({operatorOption, criteria, field, table, valueC
|
|||||||
inForm={false}
|
inForm={false}
|
||||||
onChange={(value: any) => valueChangeHandler(null, "all", value)}
|
onChange={(value: any) => valueChangeHandler(null, "all", value)}
|
||||||
variant="standard"
|
variant="standard"
|
||||||
|
useCase="filter"
|
||||||
/>
|
/>
|
||||||
</Box>;
|
</Box>;
|
||||||
}
|
}
|
||||||
|
@ -440,10 +440,10 @@ function ScriptEditor({title, scriptId, scriptRevisionRecord, closeCallback, tab
|
|||||||
<Box sx={{height: openTool ? "45%" : "100%"}}>
|
<Box sx={{height: openTool ? "45%" : "100%"}}>
|
||||||
<Grid container alignItems="flex-end">
|
<Grid container alignItems="flex-end">
|
||||||
<Box maxWidth={"50%"} minWidth={300}>
|
<Box maxWidth={"50%"} minWidth={300}>
|
||||||
<DynamicSelect fieldName={"apiName"} initialValue={apiName} initialDisplayValue={apiNameLabel} fieldLabel={"API Name *"} tableName={"scriptRevision"} inForm={false} onChange={changeApiName} />
|
<DynamicSelect fieldName={"apiName"} initialValue={apiName} initialDisplayValue={apiNameLabel} fieldLabel={"API Name *"} tableName={"scriptRevision"} inForm={false} onChange={changeApiName} useCase="form" />
|
||||||
</Box>
|
</Box>
|
||||||
<Box maxWidth={"50%"} minWidth={300} pl={2}>
|
<Box maxWidth={"50%"} minWidth={300} pl={2}>
|
||||||
<DynamicSelect fieldName={"apiVersion"} initialValue={apiVersion} initialDisplayValue={apiVersionLabel} fieldLabel={"API Version *"} tableName={"scriptRevision"} inForm={false} onChange={changeApiVersion} />
|
<DynamicSelect fieldName={"apiVersion"} initialValue={apiVersion} initialDisplayValue={apiVersionLabel} fieldLabel={"API Version *"} tableName={"scriptRevision"} inForm={false} onChange={changeApiVersion} useCase="form" />
|
||||||
</Box>
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Box display="flex" sx={{height: "100%"}}>
|
<Box display="flex" sx={{height: "100%"}}>
|
||||||
|
@ -397,6 +397,7 @@ export default function ShareModal({open, onClose, tableMetaData, record}: Share
|
|||||||
initialDisplayValue={selectedAudienceOption?.label}
|
initialDisplayValue={selectedAudienceOption?.label}
|
||||||
inForm={false}
|
inForm={false}
|
||||||
onChange={handleAudienceChange}
|
onChange={handleAudienceChange}
|
||||||
|
useCase="form"
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
{/*
|
{/*
|
||||||
|
@ -58,7 +58,7 @@ export default function UpOrDownNumberBlock({widgetMetaData, data}: StandardBloc
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div style={{display: "flex", flexDirection: data.styles.isStacked ? "column" : "row", alignItems: data.styles.isStacked ? "flex-end" : "baseline"}}>
|
<div style={{display: "flex", flexDirection: data.styles.isStacked ? "column" : "row", alignItems: data.styles.isStacked ? "flex-end" : "baseline", marginLeft: "auto"}}>
|
||||||
|
|
||||||
<div style={{display: "flex", alignItems: "baseline", fontWeight: 700, fontSize: ".875rem"}}>
|
<div style={{display: "flex", alignItems: "baseline", fontWeight: 700, fontSize: ".875rem"}}>
|
||||||
<BlockElementWrapper metaData={widgetMetaData} data={data} slot="number">
|
<BlockElementWrapper metaData={widgetMetaData} data={data} slot="number">
|
||||||
|
@ -87,6 +87,7 @@ export default function FilterAndColumnsSetupWidget({isEditable, widgetMetaData,
|
|||||||
{
|
{
|
||||||
const [modalOpen, setModalOpen] = useState(false);
|
const [modalOpen, setModalOpen] = useState(false);
|
||||||
const [hideColumns, setHideColumns] = useState(widgetData?.hideColumns);
|
const [hideColumns, setHideColumns] = useState(widgetData?.hideColumns);
|
||||||
|
const [hidePreview, setHidePreview] = useState(widgetData?.hidePreview);
|
||||||
const [tableMetaData, setTableMetaData] = useState(null as QTableMetaData);
|
const [tableMetaData, setTableMetaData] = useState(null as QTableMetaData);
|
||||||
|
|
||||||
const [alertContent, setAlertContent] = useState(null as string);
|
const [alertContent, setAlertContent] = useState(null as string);
|
||||||
@ -272,7 +273,7 @@ export default function FilterAndColumnsSetupWidget({isEditable, widgetMetaData,
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
function mayShowQueryPreview(): boolean
|
function mayShowQuery(): boolean
|
||||||
{
|
{
|
||||||
if (tableMetaData)
|
if (tableMetaData)
|
||||||
{
|
{
|
||||||
@ -288,7 +289,7 @@ export default function FilterAndColumnsSetupWidget({isEditable, widgetMetaData,
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
function mayShowColumnsPreview(): boolean
|
function mayShowColumns(): boolean
|
||||||
{
|
{
|
||||||
if (tableMetaData)
|
if (tableMetaData)
|
||||||
{
|
{
|
||||||
@ -356,14 +357,14 @@ export default function FilterAndColumnsSetupWidget({isEditable, widgetMetaData,
|
|||||||
<Box pt="0.5rem">
|
<Box pt="0.5rem">
|
||||||
<Box display="flex" justifyContent="space-between" alignItems="center">
|
<Box display="flex" justifyContent="space-between" alignItems="center">
|
||||||
<h5>Query Filter</h5>
|
<h5>Query Filter</h5>
|
||||||
<Box fontSize="0.75rem" fontWeight="700">{mayShowQueryPreview() && getCurrentSortIndicator(frontendQueryFilter, tableMetaData, null)}</Box>
|
<Box fontSize="0.75rem" fontWeight="700">{mayShowQuery() && getCurrentSortIndicator(frontendQueryFilter, tableMetaData, null)}</Box>
|
||||||
</Box>
|
</Box>
|
||||||
{
|
{
|
||||||
mayShowQueryPreview() &&
|
mayShowQuery() &&
|
||||||
<AdvancedQueryPreview tableMetaData={tableMetaData} queryFilter={frontendQueryFilter} isEditable={false} isQueryTooComplex={frontendQueryFilter.subFilters?.length > 0} removeCriteriaByIndexCallback={null} />
|
<AdvancedQueryPreview tableMetaData={tableMetaData} queryFilter={frontendQueryFilter} isEditable={false} isQueryTooComplex={frontendQueryFilter.subFilters?.length > 0} removeCriteriaByIndexCallback={null} />
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!mayShowQueryPreview() &&
|
!mayShowQuery() &&
|
||||||
<Box width="100%" sx={{fontSize: "1rem", background: "#FFFFFF"}} minHeight={"2.5rem"} p={"0.5rem"} pb={"0.125rem"} borderRadius="0.75rem" border={`1px solid ${colors.grayLines.main}`}>
|
<Box width="100%" sx={{fontSize: "1rem", background: "#FFFFFF"}} minHeight={"2.5rem"} p={"0.5rem"} pb={"0.125rem"} borderRadius="0.75rem" border={`1px solid ${colors.grayLines.main}`}>
|
||||||
{
|
{
|
||||||
isEditable &&
|
isEditable &&
|
||||||
@ -382,11 +383,11 @@ export default function FilterAndColumnsSetupWidget({isEditable, widgetMetaData,
|
|||||||
<h5>Columns</h5>
|
<h5>Columns</h5>
|
||||||
<Box display="flex" flexWrap="wrap" fontSize="1rem">
|
<Box display="flex" flexWrap="wrap" fontSize="1rem">
|
||||||
{
|
{
|
||||||
mayShowColumnsPreview() &&
|
mayShowColumns() && columns &&
|
||||||
columns.columns.map((column, i) => <React.Fragment key={`column-${i}`}>{renderColumn(column)}</React.Fragment>)
|
columns.columns.map((column, i) => <React.Fragment key={`column-${i}`}>{renderColumn(column)}</React.Fragment>)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!mayShowColumnsPreview() &&
|
!mayShowColumns() &&
|
||||||
<Box width="100%" sx={{fontSize: "1rem", background: "#FFFFFF"}} minHeight={"2.375rem"} p={"0.5rem"} pb={"0.125rem"}>
|
<Box width="100%" sx={{fontSize: "1rem", background: "#FFFFFF"}} minHeight={"2.375rem"} p={"0.5rem"} pb={"0.125rem"}>
|
||||||
{
|
{
|
||||||
isEditable &&
|
isEditable &&
|
||||||
@ -402,6 +403,21 @@ export default function FilterAndColumnsSetupWidget({isEditable, widgetMetaData,
|
|||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
{!hidePreview && !isEditable && frontendQueryFilter && tableMetaData && (
|
||||||
|
<Box pt="1rem">
|
||||||
|
<h5>Preview</h5>
|
||||||
|
<RecordQuery
|
||||||
|
allowVariables={widgetData?.allowVariables}
|
||||||
|
ref={recordQueryRef}
|
||||||
|
table={tableMetaData}
|
||||||
|
isPreview={true}
|
||||||
|
usage="reportSetup"
|
||||||
|
isModal={true}
|
||||||
|
initialQueryFilter={frontendQueryFilter}
|
||||||
|
initialColumns={columns}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
{
|
{
|
||||||
modalOpen &&
|
modalOpen &&
|
||||||
<Modal open={modalOpen} onClose={(event, reason) => closeEditor(event, reason)}>
|
<Modal open={modalOpen} onClose={(event, reason) => closeEditor(event, reason)}>
|
||||||
|
@ -786,6 +786,7 @@ function InputPossibleValueSourceSingle(tableName: string, field: QFieldMetaData
|
|||||||
initialDisplayValue={selectedPossibleValue?.label}
|
initialDisplayValue={selectedPossibleValue?.label}
|
||||||
inForm={false}
|
inForm={false}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
|
useCase="filter"
|
||||||
// InputProps={applying ? {endAdornment: <Icon>sync</Icon>} : {}}
|
// InputProps={applying ? {endAdornment: <Icon>sync</Icon>} : {}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
@ -854,6 +855,7 @@ function InputPossibleValueSourceMultiple(tableName: string, field: QFieldMetaDa
|
|||||||
initialValues={selectedPossibleValues}
|
initialValues={selectedPossibleValues}
|
||||||
inForm={false}
|
inForm={false}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
|
useCase="filter"
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -33,8 +33,7 @@ import {QCriteriaOperator} from "@kingsrook/qqq-frontend-core/lib/model/query/QC
|
|||||||
import {QFilterCriteria} from "@kingsrook/qqq-frontend-core/lib/model/query/QFilterCriteria";
|
import {QFilterCriteria} from "@kingsrook/qqq-frontend-core/lib/model/query/QFilterCriteria";
|
||||||
import {QFilterOrderBy} from "@kingsrook/qqq-frontend-core/lib/model/query/QFilterOrderBy";
|
import {QFilterOrderBy} from "@kingsrook/qqq-frontend-core/lib/model/query/QFilterOrderBy";
|
||||||
import {QQueryFilter} from "@kingsrook/qqq-frontend-core/lib/model/query/QQueryFilter";
|
import {QQueryFilter} from "@kingsrook/qqq-frontend-core/lib/model/query/QQueryFilter";
|
||||||
import {Alert, Collapse, Menu, Typography} from "@mui/material";
|
import {Alert, Box, Collapse, Menu, Typography} from "@mui/material";
|
||||||
import Box from "@mui/material/Box";
|
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Card from "@mui/material/Card";
|
import Card from "@mui/material/Card";
|
||||||
import Divider from "@mui/material/Divider";
|
import Divider from "@mui/material/Divider";
|
||||||
@ -92,6 +91,7 @@ interface Props
|
|||||||
launchProcess?: QProcessMetaData;
|
launchProcess?: QProcessMetaData;
|
||||||
usage?: QueryScreenUsage;
|
usage?: QueryScreenUsage;
|
||||||
isModal?: boolean;
|
isModal?: boolean;
|
||||||
|
isPreview?: boolean;
|
||||||
initialQueryFilter?: QQueryFilter;
|
initialQueryFilter?: QQueryFilter;
|
||||||
initialColumns?: QQueryColumns;
|
initialColumns?: QQueryColumns;
|
||||||
allowVariables?: boolean;
|
allowVariables?: boolean;
|
||||||
@ -126,7 +126,7 @@ const getLoadingScreen = (isModal: boolean) =>
|
|||||||
**
|
**
|
||||||
** Yuge component. The best. Lots of very smart people are saying so.
|
** Yuge component. The best. Lots of very smart people are saying so.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
const RecordQuery = forwardRef(({table, usage, isModal, allowVariables, initialQueryFilter, initialColumns}: Props, ref) =>
|
const RecordQuery = forwardRef(({table, usage, isModal, isPreview, allowVariables, initialQueryFilter, initialColumns}: Props, ref) =>
|
||||||
{
|
{
|
||||||
const tableName = table.name;
|
const tableName = table.name;
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
@ -884,6 +884,18 @@ const RecordQuery = forwardRef(({table, usage, isModal, allowVariables, initialQ
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Opens a new query screen in a new window with the current filter
|
||||||
|
*******************************************************************************/
|
||||||
|
const openFilterInNewWindow = () =>
|
||||||
|
{
|
||||||
|
let filterForBackend = JSON.parse(JSON.stringify(view.queryFilter));
|
||||||
|
filterForBackend = FilterUtils.prepQueryFilterForBackend(tableMetaData, filterForBackend);
|
||||||
|
const url = `${metaData?.getTablePathByName(tableName)}?filter=${encodeURIComponent(JSON.stringify(filterForBackend))}`;
|
||||||
|
window.open(url);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** This is the method that actually executes a query to update the data in the table.
|
** This is the method that actually executes a query to update the data in the table.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
@ -2232,12 +2244,25 @@ const RecordQuery = forwardRef(({table, usage, isModal, allowVariables, initialQ
|
|||||||
return (
|
return (
|
||||||
<GridToolbarContainer>
|
<GridToolbarContainer>
|
||||||
<div>
|
<div>
|
||||||
|
<Tooltip title="Refresh Query">
|
||||||
<Button id="refresh-button" onClick={() => updateTable("refresh button")} startIcon={<Icon>refresh</Icon>} sx={{pl: "1rem", pr: "0.5rem", minWidth: "unset"}}></Button>
|
<Button id="refresh-button" onClick={() => updateTable("refresh button")} startIcon={<Icon>refresh</Icon>} sx={{pl: "1rem", pr: "0.5rem", minWidth: "unset"}}></Button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
{
|
||||||
|
!isPreview && (
|
||||||
<div style={{position: "relative"}}>
|
<div style={{position: "relative"}}>
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
<GridToolbarDensitySelector nonce={undefined} />
|
<GridToolbarDensitySelector nonce={undefined} />
|
||||||
</div>
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
isPreview && (
|
||||||
|
<Tooltip title="Open In New Window">
|
||||||
|
<Button id="open-filter-in-new-window-button" onClick={() => openFilterInNewWindow()} startIcon={<Icon>launch</Icon>} sx={{pl: "1rem", pr: "0.5rem", minWidth: "unset"}}></Button>
|
||||||
|
</Tooltip>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
usage == "queryScreen" &&
|
usage == "queryScreen" &&
|
||||||
@ -2872,7 +2897,7 @@ const RecordQuery = forwardRef(({table, usage, isModal, allowVariables, initialQ
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
metaData && tableMetaData &&
|
!isPreview && metaData && tableMetaData &&
|
||||||
<BasicAndAdvancedQueryControls
|
<BasicAndAdvancedQueryControls
|
||||||
ref={basicAndAdvancedQueryControlsRef}
|
ref={basicAndAdvancedQueryControlsRef}
|
||||||
metaData={metaData}
|
metaData={metaData}
|
||||||
|
@ -268,7 +268,15 @@ class ValueUtils
|
|||||||
{
|
{
|
||||||
if (!(date instanceof Date))
|
if (!(date instanceof Date))
|
||||||
{
|
{
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// so, a new Date here will interpret the string as being at midnight UTC, but //
|
||||||
|
// the data object will be in the user/browser timezone. //
|
||||||
|
// so "2024-08-22", for a user in US/Central, will be "2024-08-21T19:00:00-0500". //
|
||||||
|
// correct for that by adding the date's timezone offset (converted from minutes //
|
||||||
|
// to millis) back to it //
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////
|
||||||
date = new Date(date);
|
date = new Date(date);
|
||||||
|
date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000)
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return (`${date.toString("yyyy-MM-dd")}`);
|
return (`${date.toString("yyyy-MM-dd")}`);
|
||||||
|
Reference in New Issue
Block a user