Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ProcessMaker/Http/Controllers/TaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ public function edit(ProcessRequestToken $task, string $preview = '')
'screenFields' => $screenFields,
'taskDraftsEnabled' => $taskDraftsEnabled,
'userConfiguration' => $userConfiguration,
'hitlEnabled' => config('smart-extract.hitl_enabled', false),
]);
}
}
Expand Down
1 change: 1 addition & 0 deletions resources/views/layouts/layoutnext.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class="main flex-grow-1 h-100
@endif

@yield('js')
@stack('scripts')

@isset($addons)
@foreach ($addons as $addon)
Expand Down
42 changes: 23 additions & 19 deletions resources/views/tasks/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,29 @@ class="nav-link">
<div id="tabContent" class="tab-content tw-flex tw-flex-col tw-grow tw-overflow-y-scroll">
<div id="tab-form" role="tabpanel" aria-labelledby="tab-form" class="tab-pane active show">
@can('update', $task)
<task
ref="task"
class="card border-0"
v-model="formData"
:initial-task-id="{{ $task->id }}"
:initial-request-id="{{ $task->process_request_id }}"
:screen-version="{{ $task->screen['id'] ?? null }}"
:user-id="{{ Auth::user()->id }}"
csrf-token="{{ csrf_token() }}"
initial-loop-context="{{ $task->getLoopContext() }}"
:wait-loading-listeners="true"
@task-updated="taskUpdated"
@updated-page-core="updatePage"
@submit="submit"
@completed="completed"
@@error="error"
@closed="closed"
@redirect="redirectToTask"
@form-data-changed="handleFormDataChange" />
@unless($hitlEnabled)
<task
ref="task"
class="card border-0"
v-model="formData"
:initial-task-id="{{ $task->id }}"
:initial-request-id="{{ $task->process_request_id }}"
:screen-version="{{ $task->screen['id'] ?? null }}"
:user-id="{{ Auth::user()->id }}"
csrf-token="{{ csrf_token() }}"
initial-loop-context="{{ $task->getLoopContext() }}"
:wait-loading-listeners="true"
@task-updated="taskUpdated"
@updated-page-core="updatePage"
@submit="submit"
@completed="completed"
@@error="error"
@closed="closed"
@redirect="redirectToTask"
@form-data-changed="handleFormDataChange" />
@else
@include('tasks.partials.hitl-iframe')
@endunless
@endcan
<div v-if="taskHasComments">
<timeline :commentable_id="task.id"
Expand Down
22 changes: 22 additions & 0 deletions resources/views/tasks/partials/hitl-iframe.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{-- Smart Extract Manual Edit content when HITL is enabled --}}
@php
// Note: This URL will be obtained from request data in future implementation.
$iframeSrc = null
@endphp

@if (!empty($iframeSrc))
<div
id="manual-edit-iframe-container"
style="position: relative; width: 100%; height: calc(100vh - 200px); border: none; margin: 0; padding: 0;"
>
<x-package-smart-extract::iframe-loader
:src="$iframeSrc"
:title="__('Smart Extract')"
loading-message="{{ __('Loading dashboard') }}"
/>
</div>
@else
<div class="alert alert-warning">
{{ __('No iframe source provided for Manual Edit.') }}
</div>
@endif
Loading