@extends('layouts.app') @section('content') @php $translationLanguages = ($appLanguages ?? collect())->filter(fn ($language) => filled($language->code))->values(); @endphp

@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
Edit Gift: {{ $gift->name }}

Update gift details, price, link, image, translations, or status.

@csrf @method('PUT')
{{-- Gift Name --}}
@error('name')
{{ $message }}
@enderror
{{-- Price --}}
{{ currency_symbol() }}
@error('price')
{{ $message }}
@enderror
{{-- URL / External Link --}}
Optional link where user or partner can view or purchase the gift.
@error('url')
{{ $message }}
@enderror
{{-- Status --}}
@error('status')
{{ $message }}
@enderror
{{-- Gift Image --}}
Upload new image to replace current one (Max 5MB). Leave empty to keep existing image.
@error('image')
{{ $message }}
@enderror @php $currentImageUrl = $gift->getImageUrl(); @endphp

Current / Preview Image:

@if ($currentImageUrl) {{ $gift->name }} @else
No image uploaded
@endif
{{-- Description --}}
@error('description')
{{ $message }}
@enderror
{{-- Language Translations Section --}} @if($translationLanguages->count())
Language Translations

Update translations below. Default language is {{ strtoupper($defaultTranslationLocale ?? 'en') }}. Missing languages will auto translate if enabled.

@include('includes.partial.auto_translate.edit_toggle')
@foreach($translationLanguages as $language) @php $translationLanguageName = $language->language->name ?? ($language->data['name'] ?? strtoupper($language->code)); $translation = $gift->translations->firstWhere('locale', $language->code); @endphp
@error('translations.' . $language->code . '.name')
{{ $message }}
@enderror
@error('translations.' . $language->code . '.description')
{{ $message }}
@enderror
@endforeach
@endif {{-- Buttons --}}
Cancel
@endsection