@extends('layouts.vertical', ["page_title"=> "Add & Edit Action Sheets"]) @section('css') @endsection @section('content')
@if(session()->has('message'))
{{ session()->get('message') }}
@endif @if(session()->has('error'))
{{ session()->get('error') }}
@endif
@csrf

Add / Edit {{$title}}

Back
@foreach($fields as $field => $props) @if($props['type'] != 'hidden')
@endif @switch($props['type']) @case('hidden') @break @case('text') @break @case('number') @break @case('date') @break @case('textarea') @if($field === 'html_format') Use each metric id as a placeholder, for example {Ciphaler}. @endif @break @case('select') @php $selected = ($mode == 'edit' && isset($item->{$field}) && $item->{$field} !== '') ? $item->{$field} : ($props['default'] ?? ''); @endphp @break @case('multiselect') @break @case('sheet_metrics')
Metric id is the HTML placeholder key.
@php $sheetMetrics = ($mode == 'edit' && isset($item->metrics) && is_array($item->metrics)) ? $item->metrics : []; @endphp @foreach($sheetMetrics as $i => $map) @endforeach
Id Title Label Metrics
@break @endswitch @if($props['type'] != 'hidden')
@endif @endforeach
Back
@endsection @section('script') @endsection