Update to support opening child editing form via url (hash or sub-path); also proceses on record-view via hash

This commit is contained in:
2022-12-06 15:56:20 -06:00
parent ad239544f5
commit 80a3c0679e
7 changed files with 220 additions and 95 deletions

View File

@ -278,6 +278,16 @@ export default function App()
component: <EntityCreate table={table} />,
});
///////////////////////////////////////////////////////////////////////////////////////////////////////
// this is the path to open a modal-form when viewing a record, to create a different (child) record //
// it can also be done with a hash like: #/createChild=:childTableName //
///////////////////////////////////////////////////////////////////////////////////////////////////////
routeList.push({
key: `${app.name}.createChild`,
route: `${path}/:id/createChild/:childTableName`,
component: <EntityView table={table} />,
});
routeList.push({
name: `${app.label} View`,
key: `${app.name}.view`,
@ -302,6 +312,10 @@ export default function App()
const processesForTable = QProcessUtils.getProcessesForTable(metaData, table.name, true);
processesForTable.forEach((process) =>
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// paths to open modal process under its owning table. //
// note, processes can also be launched (at least initially on entityView screen) with a hash like: #/launchProcess=:processName //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
routeList.push({
name: process.label,
key: process.name,