@if ( isset($edit) && $edit )

{{trans('workflow.workflow_triggered_text')}}.

{{trans('workflow.criteria_text')}}

@if($workflow->criterias->count() > 0) @php $identifier = null; $firstCriteria = false; $criteriaIdentifiers = []; $criteriaCount = 0; @endphp @foreach($workflow->criterias as $criteria) @php $identifier = '_' . rand(1,1000) . uniqid(); $criteriaIdentifiers[$criteria->id] = $identifier; $firstCriteria = false; @endphp @if ($loop->first) @php $firstCriteria = true; @endphp @endif @include('workflow::workflows.criteriables.fields', [ 'identifier' => $identifier, 'firstCriteria' => $firstCriteria, 'edit' => $edit, 'criteria' => $criteria, 'criteriaCount' => $criteriaCount, 'existing' => true ]) @php $criteriaCount = $criteriaCount + 1; @endphp @endforeach @endif @include('workflow::workflows.criteriables.fields')
@else

{{trans('workflow_triggered_text')}}.

Set Criteria

@include('workflow::workflows.criteriables.fields')
@endif @if ( isset($edit) && $edit && $workflow->criterias->count() > 0 ) @include('workflow::workflows.criteriables.inputs', [ 'edit' => true, 'criterias' => $workflow->criterias, 'criteriaIdentifiers' => $criteriaIdentifiers ]) @else @include('workflow::workflows.criteriables.inputs') @endif