@extends('layouts.admin') @section('title', 'Add Measurement - ' . $customer->full_name) @section('page-title', 'Add Measurement') @section('content')
← {{ $customer->full_name }}
@csrf
@if($templates->isNotEmpty()) @php $selectedTemplateId = old('measurement_template_id', $templates->first()->id); $selectedTemplate = $templates->firstWhere('id', (int)$selectedTemplateId) ?? $templates->first(); @endphp

Measurements for template: {{ $selectedTemplate->template_name }}

@foreach($selectedTemplate->fields as $field)
is_required ? 'required' : '' }} class="mt-1 block w-full rounded-lg border border-slate-300 shadow-sm sm:text-sm">
@endforeach
@if($selectedTemplate->fields->isEmpty())

This template has no fields. Add fields in Measurement Templates → Edit.

@endif
@endif
Cancel
@endsection