Skip to content

Commit e5ad267

Browse files
committed
standardize variable naming and simplify HITL condition in task edit view
1 parent 5d49e94 commit e5ad267

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

ProcessMaker/Http/Controllers/TaskController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function edit(ProcessRequestToken $task, string $preview = '')
140140
$element = $task->getDefinition(true);
141141
$screenFields = $screenVersion ? $screenVersion->screenFilteredFields() : [];
142142
$taskDraftsEnabled = TaskDraft::draftsEnabled();
143-
$is_smart_extract_task = $task->element_name === 'Manual Document Review';
143+
$isSmartExtractTask = $task->element_name === 'Manual Document Review';
144144
// Remove screen parent to reduce the size of the response
145145
$screen = $task->screen;
146146
$screen['parent'] = null;
@@ -204,8 +204,7 @@ public function edit(ProcessRequestToken $task, string $preview = '')
204204
'screenFields' => $screenFields,
205205
'taskDraftsEnabled' => $taskDraftsEnabled,
206206
'userConfiguration' => $userConfiguration,
207-
'hitlEnabled' => config('smart-extract.hitl_enabled', false),
208-
'is_smart_extract_task' => $is_smart_extract_task,
207+
'hitlEnabled' => config('smart-extract.hitl_enabled', false) && $isSmartExtractTask,
209208
]);
210209
}
211210
}

resources/views/tasks/edit.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class="nav-link">
8787
<div id="tabContent" class="tab-content tw-flex tw-flex-col tw-grow tw-overflow-y-scroll">
8888
<div id="tab-form" role="tabpanel" aria-labelledby="tab-form" class="tab-pane active show">
8989
@can('update', $task)
90-
@unless($hitlEnabled && $is_smart_extract_task)
90+
@unless($hitlEnabled)
9191
<task
9292
ref="task"
9393
class="card border-0"
@@ -108,7 +108,7 @@ class="card border-0"
108108
@redirect="redirectToTask"
109109
@form-data-changed="handleFormDataChange" />
110110
@else
111-
@include('tasks.partials.hitl-iframe')
111+
@include('tasks.partials.hitl-iframe')
112112
@endunless
113113
@endcan
114114
<div v-if="taskHasComments">

0 commit comments

Comments
 (0)