{{-- resources/views/admin/branches/create.blade.php --}} @extends('layouts.master') @section('title', isset($branch) ? __('تعديل فرع') : __('إضافة فرع')) @section('pages') {{ __('dashboard.home') }} @endsection @section('css') @endsection @section('content')
{{-- رسائل النظام --}} @if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
@endif
@csrf @if (isset($branch)) @method('PUT') @endif {{-- عنوان + أزرار --}}
{{ __('dashboard.back') }}
{{-- Tabs --}}
{{-- تبويب: البيانات الأساسية --}}
@error('branch_category_id') {{ $message }} @enderror
@error('branch_type_id') {{ $message }} @enderror
@error('name.ar') {{ $message }} @enderror
@error('name.en') {{ $message }} @enderror
* المدن محمّلة وفق الدولة المختارة في إعدادات الشركة.
@error('city_id') {{ $message }} @enderror
@error('primary_phone') {{ $message }} @enderror
@php $activeOld = old('active', isset($branch)?(int)$branch->active:1); @endphp @error('active') {{ $message }} @enderror
أرقام هواتف فرعية
@php $phones = old('phones', isset($branch)?($branch->phones ?? []):[]); @endphp @if (empty($phones)) @php $phones = [['label'=>['ar'=>'','en'=>''],'number'=>'']]; @endphp @endif @foreach ($phones as $i => $p)
@endforeach @error('phones.*.label.ar') {{ $message }} @enderror @error('phones.*.label.en') {{ $message }} @enderror @error('phones.*.number') {{ $message }} @enderror
{{-- تبويب: العنوان --}}
{{-- تبويب: الاعدادات --}}
اعدادات اخرى
{{-- تبويب: الأهداف الشهرية (6 شهور + 6 شهور جنب بعض) --}}
@php $months = [ 1 => 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر', ]; @endphp
{{-- النصف الأول --}}
@foreach (array_slice($months, 0, 6, true) as $m => $label) @php $i=$m-1; @endphp @endforeach
الشهر المستهدف
{{ $label }}
{{-- النصف الثاني --}}
@foreach (array_slice($months, 6, 6, true) as $m => $label) @php $i=$m-1; @endphp @endforeach
الشهر المستهدف
{{ $label }}
{{-- /tab-content --}}
@endsection @section('js') @endsection