@extends("admin.layouts.app") @section("styles") @endsection @section("content")
{{logger([url()->previous(),str_contains(url()->previous(), 'accessory-discount-edit')])}}
@lang("constants.price_types")
@forelse($price_types as $price_type) @empty @endforelse
@lang("constants.title") @lang("constants.is_active") @lang("constants.options")
{{$price_type->name}} @if ($price_type->is_active) @else @endif {{Form::open(['route'=>["admin.price-types.destroy",$price_type->id],'method'=>"delete"])}} id)}}" class="btn btn-outline btn-sm purple" title="Edit"> @lang("constants.edit") {!! Form::close() !!}
{!! $price_types->links()!!}
@lang("constants.price_types_order")
{{ Form::open(['route' => "admin.price-types.order",'class'=>"form-horizontal"]) }} {{ Form::hidden('reorder',"",array('id'=>'reorder')) }}
    @foreach ($items as $item)
  1. {{$item['title']}}
    @if(count($item['childs']) > 0)
      @foreach ($item['childs'] as $item2)
    1. {{$item2['title']}}
      @if(count($item2['childs']) > 0)
        @foreach($item2['childs'] as $item3)
      1. {{ $item3['title'] }}
        @if(count($item3['childs']) > 0)
          @foreach($item3['childs'] as $item4)
        1. {{ $item4['title'] }}
        2. @endforeach
        @endif
      2. @endforeach
      @endif
    2. @endforeach
    @endif
  2. @endforeach
{!! Form::close()!!}
@lang("constants.price_types")
@forelse($accessory_discount as $price_type) @empty @endforelse
@lang("constants.title") @lang("Percentage") @lang("التصنيف") @lang("متوافق مع") @lang("باستثناء براند") @lang("من تاريخ") @lang("حتى تاريخ") @lang("constants.is_active") @lang("constants.options")
{{$price_type->name}} {{$price_type->percentage .' % '}} {{optional(\App\Models\AccessoryCategory::query()->where('id',$price_type->accessory_category_id)->first())->title??'-'}} {{optional(\App\Models\Category::query()->where('id',$price_type->category_id)->first())->title??'-'}} {{optional(\App\Models\Brand::query()->where('id',$price_type->brand_id)->first())->name??'-'}} {{$price_type->from ? \Illuminate\Support\Carbon::parse($price_type->from)->format('Y-m-d') : '-'}} {{$price_type->to ? \Illuminate\Support\Carbon::parse($price_type->to)->format('Y-m-d') : '-'}} @if ($price_type->is_active) @else @endif {{Form::open(['route'=>["admin.price-types.accessory-discount-delete",'id'=>$price_type->id],'method'=>"post"])}} @lang("constants.edit") {!! Form::close() !!}
{!! $price_types->links()!!}
@endsection @section("scripts") @include("admin.layouts.update_attribute") @endsection