From 4d374023e0aafd95bf147d08307cd4445e50f512 Mon Sep 17 00:00:00 2001 From: jasquat Date: Wed, 13 Sep 2023 10:31:34 -0400 Subject: [PATCH] allow view completed manual task forms and show the instructions w/ burnettk --- .../src/components/TaskListTable.tsx | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-frontend/src/components/TaskListTable.tsx b/spiffworkflow-frontend/src/components/TaskListTable.tsx index f1ecc5a3..4b54eea7 100644 --- a/spiffworkflow-frontend/src/components/TaskListTable.tsx +++ b/spiffworkflow-frontend/src/components/TaskListTable.tsx @@ -17,6 +17,7 @@ import HttpService from '../services/HttpService'; import { PaginationObject, ProcessInstanceTask, Task } from '../interfaces'; import TableCellWithTimeAgoInWords from './TableCellWithTimeAgoInWords'; import CustomForm from './CustomForm'; +import InstructionsForEndUser from './InstructionsForEndUser'; const PER_PAGE_FOR_TASKS_ON_HOME_PAGE = 5; @@ -137,6 +138,29 @@ export default function TaskListTable({ const formSubmissionModal = () => { if (formSubmissionTask) { + // TODO: move this and the code from TaskShow to new component to handle instructions and manual tasks + let formUiSchema; + let jsonSchema = formSubmissionTask.form_schema; + if (formSubmissionTask.typename === 'ManualTask') { + jsonSchema = { + type: 'object', + required: [], + properties: { + isManualTask: { + type: 'boolean', + title: 'Is ManualTask', + default: true, + }, + }, + }; + formUiSchema = { + isManualTask: { + 'ui:widget': 'hidden', + }, + }; + } else if (formSubmissionTask.form_ui_schema) { + formUiSchema = formSubmissionTask.form_ui_schema; + } return (
+ {/* this hides the submit button */}