mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-17 12:50:43 +00:00
Merged feature/CE-1068-add-basic-functionality-of into integration/sprint-41
This commit is contained in:
@ -927,7 +927,7 @@ function EntityForm(props: Props): JSX.Element
|
||||
else
|
||||
{
|
||||
setAlertContent(error.message);
|
||||
HtmlUtils.autoScroll(0);
|
||||
scrollToTopToShowAlert();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -973,7 +973,7 @@ function EntityForm(props: Props): JSX.Element
|
||||
else
|
||||
{
|
||||
setAlertContent(error.message);
|
||||
HtmlUtils.autoScroll(0);
|
||||
scrollToTopToShowAlert();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -981,6 +981,22 @@ function EntityForm(props: Props): JSX.Element
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
function scrollToTopToShowAlert()
|
||||
{
|
||||
if (props.isModal)
|
||||
{
|
||||
document.getElementById("modalTopReference")?.scrollIntoView();
|
||||
}
|
||||
else
|
||||
{
|
||||
HtmlUtils.autoScroll(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
@ -1265,6 +1281,7 @@ function EntityForm(props: Props): JSX.Element
|
||||
return (
|
||||
<Box sx={{position: "absolute", overflowY: "auto", maxHeight: "100%", width: "100%"}}>
|
||||
<Card sx={{my: 5, mx: "auto", p: 6, pb: 0, maxWidth: "1024px"}}>
|
||||
<span id="modalTopReference"></span>
|
||||
{body}
|
||||
</Card>
|
||||
</Box>
|
||||
|
@ -94,16 +94,19 @@ function QBreadcrumbs({icon, title, route, light}: Props): JSX.Element
|
||||
{
|
||||
////////////////////////////////////////////////////////
|
||||
// avoid showing "saved view" as a breadcrumb element //
|
||||
// e.g., if at /app/table/savedView/1 (so where i==2) //
|
||||
////////////////////////////////////////////////////////
|
||||
if(routes[i] === "savedView")
|
||||
if(routes[i] === "savedView" && i == 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// avoid showing the table name if it's the element before savedView //
|
||||
// e.g., when at /app/table/savedView/1 (so where i==1) //
|
||||
// we want to just be showing "App" //
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
if(i < routes.length - 1 && routes[i+1] == "savedView")
|
||||
if(i < routes.length - 1 && routes[i+1] == "savedView" && i == 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ export default function QuickFilter({tableMetaData, fullFieldName, fieldMetaData
|
||||
//////////////////////////////
|
||||
// return the button & menu //
|
||||
//////////////////////////////
|
||||
const widthAndMaxWidth = (fieldMetaData?.type == QFieldType.DATE_TIME) ? 295 : 250;
|
||||
const widthAndMaxWidth = (fieldMetaData?.type == QFieldType.DATE_TIME) ? 315 : 250;
|
||||
return (
|
||||
<>
|
||||
{button}
|
||||
|
@ -369,15 +369,15 @@ export default function ShareModal({open, onClose, tableMetaData, record}: Share
|
||||
<Card sx={{my: 5, mx: "auto", p: 3}}>
|
||||
|
||||
{/* header */}
|
||||
<Box display="flex" flexDirection="row" justifyContent="space-between" alignItems="flex-start">
|
||||
<Box display="flex" flexDirection="row" justifyContent="space-between" alignItems="flex-start" maxWidth="590px">
|
||||
<Typography variant="h4" pb={1} fontWeight="600">
|
||||
Share {tableMetaData.label}: {record?.recordLabel ?? record?.values?.get(tableMetaData.primaryKeyField) ?? "Unknown"}
|
||||
<Box color={colors.gray.main} pb={"0.5rem"} fontSize={"0.875rem"} fontWeight="400" maxWidth="590px">
|
||||
<Box color={colors.gray.main} pb={"0.5rem"} fontSize={"0.875rem"} fontWeight="400">
|
||||
{/* todo move to helpContent (what do we attach the meta-data too??) */}
|
||||
Select a user or a group to share this record with.
|
||||
{/*You can choose if they should only be able to Read the record, or also make Edits to it.*/}
|
||||
</Box>
|
||||
<Box fontSize={14} maxWidth="590px" pb={1} fontWeight="300">
|
||||
<Box fontSize={14} pb={1} fontWeight="300">
|
||||
{alert && <Alert color="error" onClose={() => setAlert(null)}>{alert}</Alert>}
|
||||
{statusString}
|
||||
{!alert && !statusString && (<> </>)}
|
||||
|
@ -110,6 +110,7 @@ class FilterUtils
|
||||
|
||||
let values = criteria.values;
|
||||
let hasFilterVariable = false;
|
||||
|
||||
if (field.possibleValueSourceName)
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
@ -123,6 +124,9 @@ class FilterUtils
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
if (values && values.length > 0 && values[0] !== null && values[0] !== undefined && values[0] !== "")
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// do not do this lookup if the field is a filter variable expression //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
if (values[0].type && values[0].type == "FilterVariableExpression")
|
||||
{
|
||||
hasFilterVariable = true;
|
||||
@ -142,11 +146,7 @@ class FilterUtils
|
||||
}
|
||||
}
|
||||
|
||||
if (hasFilterVariable)
|
||||
{
|
||||
values[0] = new FilterVariableExpression({fieldName: field.name, valueIndex: 0});
|
||||
}
|
||||
else if (values && values.length)
|
||||
if (values && values.length)
|
||||
{
|
||||
for (let i = 0; i < values.length; i++)
|
||||
{
|
||||
@ -245,6 +245,10 @@ class FilterUtils
|
||||
{
|
||||
return (new ThisOrLastPeriodExpression(value));
|
||||
}
|
||||
else if (value.type == "FilterVariableExpression")
|
||||
{
|
||||
return (new FilterVariableExpression(value));
|
||||
}
|
||||
}
|
||||
|
||||
return (null);
|
||||
|
Reference in New Issue
Block a user