Commit 328f4329 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix undefined route names across wizard completion screens + guardian created_by null

- ParticipantForm: add missing created_by when creating new guardian person
- Fix 7 route references using .index instead of .list (trainers, employees,
  enrollments, groups) and other mismatches (inventory.levels.index,
  parent.excuse-form, pricing.rules.index)
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent adffa599
...@@ -212,6 +212,7 @@ public function save(ParticipantService $service): void ...@@ -212,6 +212,7 @@ public function save(ParticipantService $service): void
'name_ar' => $this->new_guardian_name, 'name_ar' => $this->new_guardian_name,
'name' => $this->new_guardian_name, 'name' => $this->new_guardian_name,
'phone' => $this->new_guardian_phone ?: null, 'phone' => $this->new_guardian_phone ?: null,
'created_by' => auth()->id(),
]); ]);
$newGuardian = Guardian::create([ $newGuardian = Guardian::create([
'academy_id' => $this->participant->academy_id, 'academy_id' => $this->participant->academy_id,
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<h2 class="text-xl font-bold text-gray-800 mb-2">{{ __('تم النقل بنجاح') }}</h2> <h2 class="text-xl font-bold text-gray-800 mb-2">{{ __('تم النقل بنجاح') }}</h2>
<p class="text-gray-500 mb-6">{{ __('تم نقل المشترك إلى المجموعة الجديدة بنجاح') }}</p> <p class="text-gray-500 mb-6">{{ __('تم نقل المشترك إلى المجموعة الجديدة بنجاح') }}</p>
<div class="flex items-center justify-center gap-4"> <div class="flex items-center justify-center gap-4">
<a href="{{ route('enrollments.index') }}" wire:navigate <a href="{{ route('enrollments.list') }}" wire:navigate
class="inline-flex items-center gap-2 px-6 py-3 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 font-medium transition-colors"> class="inline-flex items-center gap-2 px-6 py-3 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 font-medium transition-colors">
{{ __('العودة للتسجيلات') }} {{ __('العودة للتسجيلات') }}
</a> </a>
......
...@@ -203,7 +203,7 @@ class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:r ...@@ -203,7 +203,7 @@ class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:r
<h3 class="text-lg font-semibold text-gray-800 mb-2">{{ __('تم إنشاء المجموعة التدريبية بنجاح') }}</h3> <h3 class="text-lg font-semibold text-gray-800 mb-2">{{ __('تم إنشاء المجموعة التدريبية بنجاح') }}</h3>
<p class="text-sm text-gray-600 mb-6">{{ __('يمكنك الآن إضافة جداول الحصص أو إنشاء مجموعة أخرى') }}</p> <p class="text-sm text-gray-600 mb-6">{{ __('يمكنك الآن إضافة جداول الحصص أو إنشاء مجموعة أخرى') }}</p>
<div class="flex items-center justify-center gap-3"> <div class="flex items-center justify-center gap-3">
<a href="{{ route('groups.index') }}" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-medium hover:bg-gray-200 transition-colors"> <a href="{{ route('groups.list') }}" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-medium hover:bg-gray-200 transition-colors">
{{ __('قائمة المجموعات') }} {{ __('قائمة المجموعات') }}
</a> </a>
<button wire:click="$refresh" onclick="window.location.reload()" class="px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors"> <button wire:click="$refresh" onclick="window.location.reload()" class="px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors">
......
...@@ -264,7 +264,7 @@ class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:r ...@@ -264,7 +264,7 @@ class="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:r
<h3 class="text-lg font-semibold text-gray-800 mb-2">{{ __('تم إضافة الموظف بنجاح') }}</h3> <h3 class="text-lg font-semibold text-gray-800 mb-2">{{ __('تم إضافة الموظف بنجاح') }}</h3>
<p class="text-sm text-gray-600 mb-6">{{ __('يمكنك الآن عرض بيانات الموظف أو إضافة موظف آخر') }}</p> <p class="text-sm text-gray-600 mb-6">{{ __('يمكنك الآن عرض بيانات الموظف أو إضافة موظف آخر') }}</p>
<div class="flex items-center justify-center gap-3"> <div class="flex items-center justify-center gap-3">
<a href="{{ route('employees.index') }}" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-medium hover:bg-gray-200 transition-colors"> <a href="{{ route('employees.list') }}" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-medium hover:bg-gray-200 transition-colors">
{{ __('قائمة الموظفين') }} {{ __('قائمة الموظفين') }}
</a> </a>
<button wire:click="$refresh" onclick="window.location.reload()" class="px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors"> <button wire:click="$refresh" onclick="window.location.reload()" class="px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors">
......
...@@ -723,7 +723,7 @@ class="w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500"> ...@@ -723,7 +723,7 @@ class="w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500">
@endif @endif
</p> </p>
<div class="flex items-center justify-center gap-3"> <div class="flex items-center justify-center gap-3">
<a href="{{ route('trainers.index') }}" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-medium hover:bg-gray-200 transition-colors"> <a href="{{ route('trainers.list') }}" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-medium hover:bg-gray-200 transition-colors">
{{ __('قائمة المدربين') }} {{ __('قائمة المدربين') }}
</a> </a>
<button wire:click="$refresh" onclick="window.location.reload()" class="px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors"> <button wire:click="$refresh" onclick="window.location.reload()" class="px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors">
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
<h2 class="text-xl font-bold text-gray-800 mb-2">{{ __('تمت التسوية بنجاح') }}</h2> <h2 class="text-xl font-bold text-gray-800 mb-2">{{ __('تمت التسوية بنجاح') }}</h2>
<p class="text-gray-500 mb-6">{{ __('تم تعديل المخزون وتسجيل الحركة بنجاح') }}</p> <p class="text-gray-500 mb-6">{{ __('تم تعديل المخزون وتسجيل الحركة بنجاح') }}</p>
<a href="{{ route('inventory.levels.index') }}" wire:navigate <a href="{{ route('inventory.adjustments') }}" wire:navigate
class="inline-flex items-center gap-2 px-6 py-3 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 font-medium transition-colors"> class="inline-flex items-center gap-2 px-6 py-3 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 font-medium transition-colors">
{{ __('العودة لمستويات المخزون') }} {{ __('العودة لمستويات المخزون') }}
</a> </a>
......
...@@ -127,7 +127,7 @@ class="transition-all duration-700"/> ...@@ -127,7 +127,7 @@ class="transition-all duration-700"/>
{{-- Submit Excuse Button --}} {{-- Submit Excuse Button --}}
<div class="fixed bottom-20 start-4 end-4 sm:static sm:mt-4"> <div class="fixed bottom-20 start-4 end-4 sm:static sm:mt-4">
<a href="{{ route('parent.excuse-form') }}" wire:navigate <a href="{{ route('parent.excuses.create') }}" wire:navigate
class="block w-full text-center bg-[#2563EB] text-white font-medium py-3.5 px-6 rounded-2xl hover:bg-blue-700 transition-colors min-h-[44px] shadow-lg sm:shadow-none"> class="block w-full text-center bg-[#2563EB] text-white font-medium py-3.5 px-6 rounded-2xl hover:bg-blue-700 transition-colors min-h-[44px] shadow-lg sm:shadow-none">
{{ __('تقديم عذر') }} {{ __('تقديم عذر') }}
</a> </a>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
<h2 class="text-xl font-bold text-gray-800 mb-2">{{ __('تم إنشاء القاعدة بنجاح') }}</h2> <h2 class="text-xl font-bold text-gray-800 mb-2">{{ __('تم إنشاء القاعدة بنجاح') }}</h2>
<p class="text-gray-500 mb-6">{{ __('تم حفظ قاعدة التسعير وستُطبق على العمليات القادمة') }}</p> <p class="text-gray-500 mb-6">{{ __('تم حفظ قاعدة التسعير وستُطبق على العمليات القادمة') }}</p>
<a href="{{ route('pricing.rules.index') }}" wire:navigate <a href="{{ route('pricing.rules') }}" wire:navigate
class="inline-flex items-center gap-2 px-6 py-3 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 font-medium transition-colors"> class="inline-flex items-center gap-2 px-6 py-3 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 font-medium transition-colors">
{{ __('العودة لقائمة القواعد') }} {{ __('العودة لقائمة القواعد') }}
</a> </a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment