{{-- Internal workflow star rating — not included in report preview / PDF. Others' ratings are only shown in the Approver modal. --}} @php $wfMode = $mecReportWorkflowMode ?? null; $wfReport = $mecReportForWorkflowRating ?? null; $mayRate = $wfReport instanceof \App\Models\MecReport && in_array($wfMode, ['rd', 'sdm'], true) && mec_report_user_may_submit_workflow_rating($wfReport, null, is_string($wfMode) ? $wfMode : null); $existingRating = $mayRate ? (int) old('workflow_star_rating', $mecReportCurrentUserWorkflowRating ?? 0) : 0; $wfAllowClass = in_array($wfMode, ['rd', 'sdm'], true) ? 'mec-wf-allow--'.$wfMode : ''; @endphp @if ($mayRate)
@include('reports.partials.workflow-star-rating-input', [ 'widgetId' => 'mec-star-rating-widget', 'inputId' => 'workflow-star-rating-value', 'inputName' => 'workflow_star_rating', 'labelId' => 'mec-star-rating-label', 'existingRating' => $existingRating, 'wrapperClass' => 'mec-star-rating', 'required' => true, ])
@endif