@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.($form ? __('Edit form') : __('New form'))) @section('content') @php $rows = old('kpis'); if (! is_array($rows)) { $rows = $form ? $form->formKpis->map(fn ($fk) => [ 'kpi_indicator_id' => $fk->kpi_indicator_id, 'weightage' => $fk->weightage, 'smart_specific' => $fk->smart_specific, 'smart_measurable' => $fk->smart_measurable, 'smart_achievable' => $fk->smart_achievable, 'smart_relevant' => $fk->smart_relevant, 'smart_timebound' => $fk->smart_timebound, ])->toArray() : []; } if (count($rows) === 0) { $rows[] = ['kpi_indicator_id' => '', 'weightage' => '', 'smart_specific' => '', 'smart_measurable' => '', 'smart_achievable' => '', 'smart_relevant' => '', 'smart_timebound' => '']; } $kpiOptions = $kpisLibrary->map(fn ($lib) => [ 'id' => $lib->id, 'label' => ($lib->title_bn ? $lib->title_bn.' — ' : '').$lib->title, ])->values(); @endphp
{{ $form ? __('Edit evaluation form') : __('New evaluation form') }}
@csrf
{{ __('KPI lines (SMART + weight; weights must total 100%)') }}
@error('kpis')
{{ $message }}
@enderror
{{ __('KPI') }} {{ __('Weight %') }} SMART

{{ __('Weight total') }}: 0%

{{ __('Select KPIs above — weight is split equally among selected rows (e.g. 8 KPIs → 12.5% each). You can adjust manually; use Recalculate to redistribute.') }}

{{ __('Back') }}
@endsection @section('script') @endsection