heading for instances on model show page, move instances below files, add margins

This commit is contained in:
burnettk 2022-11-25 10:56:44 -05:00
parent 3023c52a2b
commit 6a32e5174e
3 changed files with 23 additions and 8 deletions

View File

@ -147,6 +147,10 @@ h1.with-icons {
margin-bottom: 1em; margin-bottom: 1em;
} }
.with-top-margin {
margin-top: 1em;
}
.with-large-bottom-margin { .with-large-bottom-margin {
margin-bottom: 3em; margin-bottom: 3em;
} }
@ -283,3 +287,8 @@ td.actions-cell {
color: #525252; color: #525252;
margin-bottom: 1em; margin-bottom: 1em;
} }
/* top and bottom margin since this is sort of the middle of three sections on the process model show page */
.process-model-files-section {
margin: 2em 0;
}

View File

@ -5,7 +5,8 @@ import TasksWaitingForMyGroups from '../components/TasksWaitingForMyGroups';
export default function GroupedTasks() { export default function GroupedTasks() {
return ( return (
<> <>
{/* be careful moving these around since the first two have with-large-bottom-margin in order to get some space between the three table sections */} {/* be careful moving these around since the first two have with-large-bottom-margin in order to get some space between the three table sections. */}
{/* i wish Stack worked to add space just between top-level elements */}
<TasksForMyOpenProcesses /> <TasksForMyOpenProcesses />
<TasksWaitingForMe /> <TasksWaitingForMe />
<TasksWaitingForMyGroups /> <TasksWaitingForMyGroups />

View File

@ -91,7 +91,7 @@ export default function ProcessModelShow() {
const processInstanceRunResultTag = () => { const processInstanceRunResultTag = () => {
if (processInstance) { if (processInstance) {
return ( return (
<div className="alert alert-success" role="alert"> <div className="alert alert-success with-top-margin" role="alert">
<p> <p>
Process Instance {processInstance.id} kicked off ( Process Instance {processInstance.id} kicked off (
<Link <Link
@ -398,12 +398,16 @@ export default function ProcessModelShow() {
); );
}; };
const processModelButtons = () => { const processModelFilesSection = () => {
if (!processModel) { if (!processModel) {
return null; return null;
} }
return ( return (
<Grid condensed fullWidth className="megacondensed"> <Grid
condensed
fullWidth
className="megacondensed process-model-files-section"
>
<Column md={5} lg={9} sm={3}> <Column md={5} lg={9} sm={3}>
<Accordion align="end" open> <Accordion align="end" open>
<AccordionItem <AccordionItem
@ -477,7 +481,10 @@ export default function ProcessModelShow() {
const processInstanceListTableButton = () => { const processInstanceListTableButton = () => {
if (processModel) { if (processModel) {
return ( return (
<Grid fullWidth> <Grid fullWidth condensed>
<Column sm={{ span: 3 }} md={{ span: 4 }} lg={{ span: 3 }}>
<h2>Process Instances</h2>
</Column>
<Column <Column
sm={{ span: 1, offset: 3 }} sm={{ span: 1, offset: 3 }}
md={{ span: 1, offset: 7 }} md={{ span: 1, offset: 7 }}
@ -563,6 +570,7 @@ export default function ProcessModelShow() {
</Can> </Can>
</Stack> </Stack>
{processInstanceRunResultTag()} {processInstanceRunResultTag()}
{processModelFilesSection()}
<Can I="GET" a={targetUris.processInstanceListPath} ability={ability}> <Can I="GET" a={targetUris.processInstanceListPath} ability={ability}>
{processInstanceListTableButton()} {processInstanceListTableButton()}
<ProcessInstanceListTable <ProcessInstanceListTable
@ -571,10 +579,7 @@ export default function ProcessModelShow() {
perPageOptions={[2, 5, 25]} perPageOptions={[2, 5, 25]}
showReports={false} showReports={false}
/> />
<br />
<br />
</Can> </Can>
{processModelButtons()}
</> </>
); );
} }