mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 13:20:43 +00:00
First pass at permissions; Updated auth0 to work with access token instead of id token
This commit is contained in:
@ -61,7 +61,10 @@ function RecordGridWidget({title, data}: Props): JSX.Element
|
||||
const tableMetaData = new QTableMetaData(data.childTableMetaData);
|
||||
const {rows, columnsToRender} = DataGridUtils.makeRows(records, tableMetaData);
|
||||
|
||||
const childTablePath = data.tablePath + (data.tablePath.endsWith("/") ? "" : "/")
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// note - tablePath may be null, if the user doesn't have access to the table. //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
const childTablePath = data.tablePath ? data.tablePath + (data.tablePath.endsWith("/") ? "" : "/") : data.tablePath;
|
||||
const columns = DataGridUtils.setupGridColumns(tableMetaData, columnsToRender, childTablePath);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
@ -46,6 +46,7 @@ interface Props {
|
||||
component: ReactNode;
|
||||
};
|
||||
direction?: "right" | "left";
|
||||
isDisabled?: boolean;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
@ -56,6 +57,7 @@ function MiniStatisticsCard({
|
||||
percentage,
|
||||
icon,
|
||||
direction,
|
||||
isDisabled,
|
||||
}: Props): JSX.Element
|
||||
{
|
||||
const [controller] = useMaterialUIController();
|
||||
@ -108,7 +110,7 @@ function MiniStatisticsCard({
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
color="#FFFFFF"
|
||||
sx={{borderRadius: "10px", backgroundColor: colors.info.main}}
|
||||
sx={{borderRadius: "10px", backgroundColor: isDisabled ? colors.secondary.main : colors.info.main}}
|
||||
>
|
||||
<Icon fontSize="medium" color="inherit">
|
||||
{icon.component}
|
||||
@ -134,6 +136,7 @@ MiniStatisticsCard.defaultProps = {
|
||||
text: "",
|
||||
},
|
||||
direction: "right",
|
||||
isDisabled: false,
|
||||
};
|
||||
|
||||
export default MiniStatisticsCard;
|
||||
|
Reference in New Issue
Block a user