@@ -86,52 +86,38 @@ class="nav-link">
8686 @endcan
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" >
89- @if (isset ($is_hitl_task ) && $is_hitl_task === true )
90- <!-- Smart Extract Manual Edit content when $hitl is true -->
91- @if (isset ($iframe_src ) )
92- <div id =" manual-edit-iframe-container" style =" position : relative ; width : 100% ; height : calc (100vh - 200px ); border : none ; margin : 0 ; padding : 0 ;" >
93- <x-package-smart-extract::iframe-loader
94- :src =" $iframe_src"
95- :title =" __('Smart Extract')"
96- loading-message =" {{ __ (' Loading dashboard' ) } }"
97- />
98- </div >
89+ @can (' update' , $task )
90+ @unless ($hitlEnabled )
91+ <task
92+ ref =" task"
93+ class =" card border-0"
94+ v-model =" formData"
95+ :initial-task-id =" {{ $task -> id } }"
96+ :initial-request-id =" {{ $task -> process_request_id } }"
97+ :screen-version =" {{ $task -> screen [' id' ] ?? null } }"
98+ :user-id =" {{ Auth:: user ()-> id } }"
99+ csrf-token =" {{ csrf_token () } }"
100+ initial-loop-context =" {{ $task -> getLoopContext () } }"
101+ :wait-loading-listeners =" true"
102+ @task -updated =" taskUpdated"
103+ @updated -page-core =" updatePage"
104+ @submit =" submit"
105+ @completed =" completed"
106+ @ @error =" error"
107+ @closed =" closed"
108+ @redirect =" redirectToTask"
109+ @form -data-changed =" handleFormDataChange" />
99110 @else
100- <div class =" alert alert-warning" >
101- {{ __ (' No iframe source provided for Manual Edit.' )} }
102- </div >
103- @endif
104- @else
105- <!-- Original Form content when $hitl is false or not set -->
106- @can (' update' , $task )
107- <task
108- ref =" task"
109- class =" card border-0"
110- v-model =" formData"
111- :initial-task-id =" {{ $task -> id } }"
112- :initial-request-id =" {{ $task -> process_request_id } }"
113- :screen-version =" {{ $task -> screen [' id' ] ?? null } }"
114- :user-id =" {{ Auth:: user ()-> id } }"
115- csrf-token =" {{ csrf_token () } }"
116- initial-loop-context =" {{ $task -> getLoopContext () } }"
117- :wait-loading-listeners =" true"
118- @task -updated =" taskUpdated"
119- @updated -page-core =" updatePage"
120- @submit =" submit"
121- @completed =" completed"
122- @ @error =" error"
123- @closed =" closed"
124- @redirect =" redirectToTask"
125- @form -data-changed =" handleFormDataChange" />
126- @endcan
127- <div v-if =" taskHasComments" >
128- <timeline :commentable_id =" task.id"
129- commentable_type =" ProcessMaker\Models\ProcessRequestToken"
130- :adding =" false"
131- :readonly =" task.status === 'CLOSED'"
132- :timeline =" false" />
133- </div >
134- @endif
111+ @include (' tasks.partials.hitl-iframe' )
112+ @endunless
113+ @endcan
114+ <div v-if =" taskHasComments" >
115+ <timeline :commentable_id =" task.id"
116+ commentable_type =" ProcessMaker\Models\ProcessRequestToken"
117+ :adding =" false"
118+ :readonly =" task.status === 'CLOSED'"
119+ :timeline =" false" />
120+ </div >
135121 </div >
136122 @can (' editData' , $task -> processRequest )
137123 <div v-if =" task.process_request.status === 'ACTIVE'" id =" tab-data" role =" tabpanel" aria-labelledby =" tab-data" class =" card card-body border-top-0 tab-pane p-3" >
@@ -451,7 +437,7 @@ class="mr-2 custom-badges pl-2 pr-2 rounded-lg">
451437 let draftTask = task .draft ;
452438 const userHasAccessToTask = {{ Auth:: user ()-> can (' update' , $task ) ? " true" : " false" } } ;
453439 const userIsAdmin = {{ Auth:: user ()-> is_administrator ? " true" : " false" } } ;
454- const userIsProcessManager = {{ in_array ( Auth:: user ()-> id , $task -> process ?-> manager_id ?? []) ? " true" : " false" } } ;
440+ const userIsProcessManager = {{ Auth:: user ()-> id === $task -> process ?-> manager_id ? " true" : " false" } } ;
455441 const userConfiguration = @json ($userConfiguration );
456442 let screenFields = @json ($screenFields );
457443 window .Processmaker .user = @json ($currentUser );
@@ -463,15 +449,6 @@ class="mr-2 custom-badges pl-2 pr-2 rounded-lg">
463449 @endforeach
464450
465451 <script src =" {{ mix (' js/tasks/edit.js' )} }" ></script >
466- <script >
467- // Simple iframe setup for Manual Edit
468- document .addEventListener (' DOMContentLoaded' , function () {
469- const iframe = document .getElementById (' manual-edit-iframe' );
470- if (iframe) {
471- console .log (' Manual Edit iframe loaded and ready' );
472- }
473- });
474- </script >
475452@endsection
476453
477454@section (' css' )
0 commit comments