@extends("layouts.admin.app") @section("page-title") {{__("Dashboard")}} @endSection @section("css-links") @endsection @section("page-nav-title")

{{__('Offers')}}

{{__('Control and view all offers')}}

@endsection @section("content") @include("includes.dialog")

{{__('Edit Offer')}}

id)}}" enctype="multipart/form-data"> @csrf @method("put")
@error("offer_value_type")
{{$message}}
@enderror
offer_type == "p" && old("offer_value_type") == null)) fas fa-percent @else fas fa-minus @endif" id="OfferIcon">
@error("offer_value")
{{$message}}
@enderror
@error("offer_type")
{{$message}}
@enderror
translate_type == "item" && old("offer_type") == null)) display:none @endif">
@error("category")
{{$message}}
@enderror
translate_type == "category" && old("offer_type") == null) || ($offer->translate_type == "item" && (($offer->top_deals == 0 && $offer->special_offer == 0)) && old("offer_type") == null)) display:none @endif">
@error("item")
{{$message}}
@enderror
{{__('From Date:')}}
@error("start_date")
{{$message}}
@enderror
{{__('End Date:')}}
@error("end_date")
{{$message}}
@enderror

{{__('Select Days')}}


@error("day")
{{__('Select at less one day')}}
@enderror
{{__('Day')}} {{__('From Hour')}} {{__('To Hour')}}
has('FromTime.' . $array[$i] ) || $errors->has('ToTime.' . $array[$i] ) || in_array($array[$i], $offer->offerday->pluck("day")->all())) checked @endif name="day[Saturday]" value="Saturday"> Saturday pluck("from")->all() ? $offer->offerday->where("day", $array[$i])->pluck("from")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
pluck("to")->all() ? $offer->offerday->where("day", $array[$i])->pluck("to")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
has('FromTime.' . $array[$i] ) || $errors->has('ToTime.' . $array[$i] ) || in_array($array[$i], $offer->offerday->pluck("day")->all())) checked @endif name="day[Sunday]" value="Sunday"> Sunday pluck("from")->all() ? $offer->offerday->where("day", $array[$i])->pluck("from")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
pluck("to")->all() ? $offer->offerday->where("day", $array[$i])->pluck("to")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
has('FromTime.' . $array[$i] ) || $errors->has('ToTime.' . $array[$i] ) || in_array($array[$i], $offer->offerday->pluck("day")->all())) checked @endif name="day[Monday]" value="Monday"> Monday pluck("from")->all() ? $offer->offerday->where("day", $array[$i])->pluck("from")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
pluck("to")->all() ? $offer->offerday->where("day", $array[$i])->pluck("to")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
has('FromTime.' . $array[$i] ) || $errors->has('ToTime.' . $array[$i] ) || in_array($array[$i], $offer->offerday->pluck("day")->all())) checked @endif name="day[Tuesday]" value="Tuesday"> Tuesday pluck("from")->all() ? $offer->offerday->where("day", $array[$i])->pluck("from")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
pluck("to")->all() ? $offer->offerday->where("day", $array[$i])->pluck("to")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
has('FromTime.' . $array[$i] ) || $errors->has('ToTime.' . $array[$i] ) || in_array($array[$i], $offer->offerday->pluck("day")->all())) checked @endif name="day[Wednesday]" value="Wednesday"> Wednesday pluck("from")->all() ? $offer->offerday->where("day", $array[$i])->pluck("from")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
pluck("to")->all() ? $offer->offerday->where("day", $array[$i])->pluck("to")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
has('FromTime.' . $array[$i] ) || $errors->has('ToTime.' . $array[$i] ) || in_array($array[$i], $offer->offerday->pluck("day")->all())) checked @endif name="day[Thursday]" value="Thursday"> Thursday pluck("from")->all() ? $offer->offerday->where("day", $array[$i])->pluck("from")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
pluck("to")->all() ? $offer->offerday->where("day", $array[$i])->pluck("to")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
has('FromTime.' . $array[$i] ) || $errors->has('ToTime.' . $array[$i] ) || in_array($array[$i], $offer->offerday->pluck("day")->all())) checked @endif name="day[Friday]" value="Friday"> Friday pluck("from")->all() ? $offer->offerday->where("day", $array[$i])->pluck("from")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
pluck("to")->all() ? $offer->offerday->where("day", $array[$i])->pluck("to")->all()[0]: ""}}"> @error('FromTime.' . $array[$i] )
{{$message}}
@enderror
special_offer == 1 && (old("offer_type") == null || old("offer_type") == "item")) || ($offer->top_deals == 1 && (old("offer_type") == null || old("offer_type") == "item")) || old("offer_type") == 1 || (old("offer_type") == 2 && (old("special_offer") || old("top_deals")))) display:none @endif">

{{__('Select Items')}}


@error("items")
{{__('Select at less one item')}}
@enderror
@foreach($items as $item) @if(!isset($allCurrentOffers["item"][$item->id]) || ($offer->translate_type == "item" && in_array($item->id, $offer->items->pluck("id")->all()))) @endif @endforeach
{{__('Name Item')}} {{__('Image')}}
id, $offer->items->pluck("id")->all()) || old("item") == $item->id) checked @endif type="checkbox" name="items[]" value="{{$item->id}}"> {{$item->name}} @if($item->getFirstMediaFile()) @endif

@error("special_offer_image")
{{$message}}
@enderror
@endsection @section("scripts") @endsection