@extends('admin.layouts.layout') @section('content')

{{ trans('admin_lang.edit') }} Coupon

{{ Form::open( ['route'=>[routeFormUser($pagePath.'.update'),encrypt($sdata->id) ], 'method'=>'patch', 'files' => true, 'class' => 'upload_submit']) }}
{!! Form::text('promo_code', $sdata->promo_code, ['class' => 'form-control', 'placeholder' => 'Enter Promo Code', 'required']) !!} @if ($errors->has('promo_code')) {{ $errors->first('promo_code') }} @endif
{!! Form::textarea('description', $sdata->description, ['class' => 'form-control', 'placeholder' => 'Enter description', 'required']) !!} @if ($errors->has('description')) {{ $errors->first('description') }} @endif
{!! Form::select('promo_code_discount_type', ['flat' => 'Flat', 'percentage' => 'Percentage'], $sdata->discount_type, ['class' => 'form-control', 'id' => 'discount_type', 'required'] ) !!} @if ($errors->has('promo_code_discount_type')) {{ $errors->first('promo_code_discount_type') }} @endif
{!! Form::text('discount', $sdata->amount_percentage, ['class' => 'form-control', 'placeholder' => 'Enter Discount', 'required']) !!} @if ($errors->has('discount')) {{ $errors->first('discount') }} @endif
{!! Form::text('maximum_amount', $sdata->maximum_amount_limit, ['class' => 'form-control', 'placeholder' => 'Enter Maximum Amount', 'id' => 'maximum_amount']) !!} @if ($errors->has('maximum_amount')) {{ $errors->first('maximum_amount') }} @endif
{!! Form::date('start_date', $sdata->start_date, [ 'class' => 'form-control form-control-sm', 'placeholder' => 'Enter the start date', 'id' => 'start_date', ]) !!} @if ($errors->has('start_date')) {{ $errors->first('start_date') }} @endif
{!! Form::date('end_date', $sdata->end_date, [ 'class' => 'form-control form-control-sm', 'placeholder' => 'Enter the from date', 'id' => 'end_date', ]) !!} @if ($errors->has('end_date')) {{ $errors->first('end_date') }} @endif
{!! Form::text('user_maximum', $sdata->user_maximum_usage_limit, ['class' => 'form-control', 'placeholder' => 'Enter Maximum usage limit', 'required']) !!} @if ($errors->has('user_maximum')) {{ $errors->first('user_maximum') }} @endif
{!! Form::select('user_type', ['all' => 'All', 'new' => 'New', 'existing' => 'Existing'], $sdata->user_type, ['class' => 'form-control', 'required'] ) !!} @if ($errors->has('user_type')) {{ $errors->first('user_type') }} @endif
{!! Form::select('service_type', ['all' => 'All', 'door' => 'Door', 'curb' => 'Curb'], $sdata->service_type, ['class' => 'form-control', 'required'] ) !!} @if ($errors->has('service_type')) {{ $errors->first('service_type') }} @endif
{!! Form::select('ride_type', ['all' => 'All', 'wa_assist' => 'WA Assist', 'wa_indep' => 'WA INDEP', 'wc_assist' => 'WC/AMB Assist', 'wc_indep' => 'WC/AMB Indep'], $sdata->ride_type, ['class' => 'form-control', 'id' => 'ride_type', 'required'] ) !!} @if ($errors->has('ride_type')) {{ $errors->first('ride_type') }} @endif
@php if($sdata->ride_type == 'wa_assist') { $car_type = ['All' => 'All', 'Mini Van' =>'Mini Van', 'Full Size'=>'Full Size']; } else if($sdata->ride_type == 'wa_indep') { $car_type = ['All' => 'All', 'Mini Van' =>'Mini Van', 'Full Size'=>'Full Size']; } else if($sdata->ride_type == 'wc_assist') { $car_type = ['All' => 'All', 'Mini Van' =>'Mini Van', 'Regular Car'=>'Regular Car']; } else if($sdata->ride_type == 'wc_indep') { $car_type = ['All' => 'All', 'Mini Van' =>'Mini Van', 'Regular Car'=>'Regular Car']; } else { $car_type = ['All' => 'All', 'Mini Van' =>'Mini Van', 'Regular Car'=>'Regular Car', 'Full Size'=>'Full Size']; } @endphp {!! Form::select('car_type', $car_type, $sdata->car_type, ['class' => 'form-control','id' => 'car_type', 'required'] ) !!} @if ($errors->has('car_type')) {{ $errors->first('car_type') }} @endif
{{ Form::close() }}
@endsection @section('script') @endsection