@extends('layouts.admin') @section('content')

{{ __('Edit Machine') }}

{{ $machine->name }} / {{ $machine->serial_no }}

url($machine->images[0]) . "'" : 'null' }}, {{ isset($machine->images[1]) ? "'" . Storage::disk('public')->url($machine->images[1]) . "'" : 'null' }}, {{ isset($machine->images[2]) ? "'" . Storage::disk('public')->url($machine->images[2]) . "'" : 'null' }} ], removeImages: [false, false, false], handleImageUpload(event, index) { const file = event.target.files[0]; if (!file) return; const reader = new FileReader(); reader.onload = (e) => { this.imagePreviews[index] = e.target.result; this.removeImages[index] = false; }; reader.readAsDataURL(file); }, removeImage(index) { this.imagePreviews[index] = null; this.removeImages[index] = true; if (this.$refs['imageInput_' + index]) this.$refs['imageInput_' + index].value = ''; } }" action="{{ route('admin.basic-settings.machines.update', $machine) }}" method="POST" enctype="multipart/form-data" class="space-y-6"> @csrf @method('PUT') @if ($errors->any())

{{ __('Some fields need attention') }}

    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

{{ __('Basic Information') }}

@foreach($models as $model) @endforeach
@if(auth()->user()->isSystemAdmin())
@foreach($companies as $company) @endforeach @error('company_id')

{{ $message }}

@enderror
@endif

{{ __('Operational Parameters') }}

{{ __('Hardware & Slots') }}

@foreach([['1-10', 'is_spring_slot_1_10'], ['11-20', 'is_spring_slot_11_20'], ['21-30', 'is_spring_slot_21_30'], ['31-40', 'is_spring_slot_31_40'], ['41-50', 'is_spring_slot_41_50'], ['51-60', 'is_spring_slot_51_60']] as $slot) @endforeach

{{ __('Machine Photos') }}

@for($i = 0; $i < 3; $i++)
{{ __('Photo Slot') }} {{ $i + 1 }}
@endfor

{{ __('PNG, JPG, WEBP up to 10MB') }}

{{ __('Payment & Invoice') }}

@foreach($paymentConfigs as $config) @endforeach

{{ __('Member & External') }}

@endsection