(null);
const [processModels, setProcessModels] = useState([]);
@@ -34,7 +46,7 @@ export default function ProcessGroupShow() {
const { targetUris } = useUriListForPermissions();
const permissionRequestData: PermissionsToCheck = {
[targetUris.processGroupListPath]: ['POST'],
- [targetUris.processGroupShowPath]: ['PUT'],
+ [targetUris.processGroupShowPath]: ['PUT', 'DELETE'],
[targetUris.processModelCreatePath]: ['POST'],
};
const { ability } = usePermissionFetcher(permissionRequestData);
@@ -99,6 +111,22 @@ export default function ProcessGroupShow() {
);
};
+ const navigateToProcessGroups = (_result: any) => {
+ navigate(`/admin/process-groups`);
+ };
+
+ const deleteProcessGroup = () => {
+ if (processGroup) {
+ HttpService.makeCallToBackend({
+ path: `/process-groups/${modifyProcessIdentifierForPathParam(
+ processGroup.id
+ )}`,
+ successCallback: navigateToProcessGroups,
+ httpMethod: 'DELETE',
+ });
+ }
+ };
+
if (processGroup && modelPagination) {
const { page, perPage } = getPageInfoFromSearchParams(searchParams);
const modifiedProcessGroupId = modifyProcessIdentifierForPathParam(
@@ -112,7 +140,35 @@ export default function ProcessGroupShow() {
['', `process_group:${processGroup.id}`],
]}
/>
- Process Group: {processGroup.display_name}
+
+
+ Process Group: {processGroup.display_name}
+
+
+
+
+
+
+
+
{processGroup.description}
@@ -134,13 +190,6 @@ export default function ProcessGroupShow() {
Add a process model
-
-
-
diff --git a/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx b/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx
index c209e5535..1424a40aa 100644
--- a/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx
+++ b/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx
@@ -563,7 +563,18 @@ export default function ProcessModelShow() {
Process Model: {processModel.display_name}
-
+
+
+
-
-
-
@@ -608,6 +611,7 @@ export default function ProcessModelShow() {
filtersEnabled={false}
processModelFullIdentifier={processModel.id}
perPageOptions={[2, 5, 25]}
+ showReports={false}
/>