mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-17 21:00:45 +00:00
CE-1946: added child record widget data, minor divider styles
This commit is contained in:
@ -334,6 +334,22 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, reco
|
|||||||
doOpenEditChildForm(name, widgetData.childTableMetaData, rowIndex, defaultValues, disabledFields);
|
doOpenEditChildForm(name, widgetData.childTableMetaData, rowIndex, defaultValues, disabledFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
function openAddChildRecord(name: string, widgetData: any)
|
||||||
|
{
|
||||||
|
let disabledFields = widgetData.disabledFieldsForNewChildRecords;
|
||||||
|
if (!disabledFields)
|
||||||
|
{
|
||||||
|
disabledFields = widgetData.defaultValuesForNewChildRecords;
|
||||||
|
}
|
||||||
|
|
||||||
|
doOpenEditChildForm(name, widgetData.childTableMetaData, null, null, disabledFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
@ -693,11 +709,12 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, reco
|
|||||||
widgetMetaData.type === "childRecordList" && (
|
widgetMetaData.type === "childRecordList" && (
|
||||||
widgetData && widgetData[i] &&
|
widgetData && widgetData[i] &&
|
||||||
<RecordGridWidget
|
<RecordGridWidget
|
||||||
disableRowClick={true}
|
disableRowClick={widgetData[i]?.disableRowClick}
|
||||||
allowRecordEdit={true}
|
allowRecordEdit={widgetData[i]?.allowRecordEdit}
|
||||||
|
allowRecordDelete={widgetData[i]?.allowRecordDelete}
|
||||||
deleteRecordCallback={(rowIndex) => deleteChildRecord(widgetMetaData.name, i, rowIndex)}
|
deleteRecordCallback={(rowIndex) => deleteChildRecord(widgetMetaData.name, i, rowIndex)}
|
||||||
editRecordCallback={(rowIndex) => openEditChildRecord(widgetMetaData.name, widgetData[i], rowIndex)}
|
editRecordCallback={(rowIndex) => openEditChildRecord(widgetMetaData.name, widgetData[i], rowIndex)}
|
||||||
allowRecordDelete={true}
|
addNewRecordCallback={() => openAddChildRecord(widgetMetaData.name, widgetData[i])}
|
||||||
widgetMetaData={widgetMetaData}
|
widgetMetaData={widgetMetaData}
|
||||||
data={widgetData[i]}
|
data={widgetData[i]}
|
||||||
/>
|
/>
|
||||||
|
@ -26,7 +26,7 @@ import Divider from "@mui/material/Divider";
|
|||||||
function DividerWidget(): JSX.Element
|
function DividerWidget(): JSX.Element
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<Box pl={3} pt={1} width="100%">
|
<Box pl={3} pt={3} pb={3} width="100%">
|
||||||
<Divider sx={{width: "100%", height: "1px", background: "grey"}} />
|
<Divider sx={{width: "100%", height: "1px", background: "grey"}} />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user