Feature/treat blank task as manual (#598)
* adds basic support to use certain components in extensions w/ burnettk * treat a blank Task as a manual task on the frontend w/ burnettk * updated remaining references for ManualTask vs UserTask w/ burnettk --------- Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
parent
234c9646e1
commit
8330c5b383
|
@ -141,7 +141,7 @@ export default function TaskListTable({
|
|||
// 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') {
|
||||
if (formSubmissionTask.typename !== 'UserTask') {
|
||||
jsonSchema = {
|
||||
type: 'object',
|
||||
required: [],
|
||||
|
|
|
@ -25,6 +25,7 @@ export const HUMAN_TASK_TYPES = [
|
|||
'Manual Task',
|
||||
'UserTask',
|
||||
'ManualTask',
|
||||
'Task',
|
||||
];
|
||||
|
||||
export const underscorizeString = (inputString: string) => {
|
||||
|
|
|
@ -102,7 +102,7 @@ export default function TaskShow() {
|
|||
// https://github.com/sartography/spiff-arena/blob/182f56a1ad23ce780e8f5b0ed00efac3e6ad117b/spiffworkflow-frontend/src/routes/TaskShow.tsx#L329
|
||||
const autoSaveTaskData = (formData: any, successCallback?: Function) => {
|
||||
// save-draft gets called when a manual task form loads but there's no data to save so don't do it
|
||||
if (taskWithTaskData?.typename === 'ManualTask') {
|
||||
if (['ManualTask', 'Task'].includes(taskWithTaskData?.typename || '')) {
|
||||
return undefined;
|
||||
}
|
||||
let successCallbackToUse = successCallback;
|
||||
|
@ -240,7 +240,7 @@ export default function TaskShow() {
|
|||
let formUiSchema;
|
||||
let jsonSchema = taskWithTaskData.form_schema;
|
||||
let reactFragmentToHideSubmitButton = null;
|
||||
if (taskWithTaskData.typename === 'ManualTask') {
|
||||
if (taskWithTaskData.typename !== 'UserTask') {
|
||||
jsonSchema = {
|
||||
type: 'object',
|
||||
required: [],
|
||||
|
|
Loading…
Reference in New Issue