@extends('layouts/contentNavbarLayout') @if (!isset($coupon)) @section('title', 'Create Coupon') @else @section('title', 'Update Coupon') @endif @section('page-script') @endsection @section('content')

Coupon

Coupon Details
@if (!isset($coupon))
@csrf
@if (\Session::has('error')) @include('content.notification.notification', ['msg' => \Session::get('error')]) @endif
user-avatar

Allowed JPG, GIF or PNG. Max size of 800K


@include('content.special-field.field', [ 'id'=> 'couponTitle', 'type' => 'text', 'placeholder' => 'Coupon Title', 'field' => 'title', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'couponStartDate', 'type' => 'date', 'placeholder' => '', 'field' => 'couponStartDate', 'message' => isset($message)?$message:'' ])
Type of promo
@include('content.special-field.field', [ 'id'=> 'couponEndDate', 'type' => 'date', 'placeholder' => '', 'field' => 'couponEndDate', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'couponPriceBefore', 'type' => 'text', 'placeholder' => '99.99', 'field' => 'couponPriceBefore', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'couponPriceAfter', 'type' => 'text', 'placeholder' => '49.99', 'field' => 'couponPriceAfter', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'couponTotal', 'type' => 'text', 'placeholder' => '50', 'field' => 'couponTotal', 'message' => isset($message)?$message:'' ])
@if ( Session::get('domains')<=1 && Session::get('rol') == 'business') @include('content.special-field.field', [ 'id'=> 'domain_id', 'type' => 'hidden', 'placeholder' => '', 'value' => isset($domain->id) ? $domain->id : '', 'field' => 'domain_id', 'message' => isset($message)?$message:'' ]) @else
@include('content.special-field.field', [ 'id'=> 'domain_id', 'type' => 'hidden', 'placeholder' => '', 'field' => 'domain_id', 'message' => isset($message)?$message:'' ])
@endif
@include('content.special-field.field', [ 'id'=> 'category_id', 'type' => 'hidden', 'placeholder' => '', 'field' => 'category_id', 'message' => isset($message)?$message:'' ])
Cancel
@else @if( Session::get('rol') == 'business' && $coupon->state != 'approved' )
@csrf
@if(Session::has('error')) @include('content.notification.notification', ['msg' => \Session::get('error')]) @endif
user-avatar

Allowed JPG, GIF or PNG. Max size of 800K


@include('content.special-field.field', [ 'id'=> 'couponTitle', 'type' => 'text', 'placeholder' => 'Coupon Title', 'value' => $coupon->title, 'field' => 'title', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'couponStartDate', 'type' => 'date', 'placeholder' => '', 'value' => $coupon->startDate, 'field' => 'couponStartDate', 'message' => isset($message)?$message:'' ])
Type of promo
typeValue=='price') checked @endif/>
typeValue=='percent') checked @endif/>
typeValue=='promo') checked @endif/>
@include('content.special-field.field', [ 'id'=> 'couponEndDate', 'type' => 'date', 'placeholder' => '', 'value' => $coupon->endDate, 'field' => 'couponEndDate', 'message' => isset($message)?$message:'' ])
typeValue!='price') style="display:none" @endif> @include('content.special-field.field', [ 'id'=> 'couponPriceBefore', 'type' => 'text', 'placeholder' => '99.99', 'value' => $coupon->priceBefore, 'field' => 'couponPriceBefore', 'message' => isset($message)?$message:'' ])
typeValue!='percent') style="display:none" @endif> @include('content.special-field.field', [ 'id'=> 'couponDiscount', 'type' => 'text', 'placeholder' => '40', 'value' => $coupon->percent, 'field' => 'couponDiscount', 'message' => isset($message)?$message:'' ])
typeValue!='price') style="display:none" @endif> @include('content.special-field.field', [ 'id'=> 'couponPriceAfter', 'type' => 'text', 'placeholder' => '49.99', 'value' => $coupon->priceAfter, 'field' => 'couponPriceAfter', 'message' => isset($message)?$message:'' ])
typeValue!='promo') style="display:none" @endif> @include('content.special-field.field', [ 'id'=> 'couponCondition', 'type' => 'text', 'placeholder' => 'Only fridays', 'value' => $coupon->condition, 'field' => 'couponCondition', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'couponTotal', 'type' => 'text', 'placeholder' => '50', 'value' => $coupon->quantity, 'field' => 'couponTotal', 'message' => isset($message)?$message:'' ])
@if ( Session::get('domains')<=1 && Session::get('rol') == 'business') @include('content.special-field.field', [ 'id'=> 'domain_id', 'type' => 'hidden', 'placeholder' => '', 'value' => isset($domain->id) ? $domain->id : '', 'field' => 'domain_id', 'message' => isset($message)?$message:'' ]) @else
@include('content.special-field.field', [ 'id'=> 'domain_id', 'type' => 'hidden', 'placeholder' => '', 'value' => $coupon->domain_id, 'field' => 'domain_id', 'message' => isset($message)?$message:'' ])
@endif
@include('content.special-field.field', [ 'id'=> 'category_id', 'type' => 'hidden', 'placeholder' => '', 'value' => $coupon->category_id, 'field' => 'category_id', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'location_id', 'type' => 'hidden', 'placeholder' => '', 'value' => $coupon_location[0]->hashes, 'field' => 'location_id', 'message' => isset($message)?$message:'' ])
Cancel
@endif @if( Session::get('rol') == 'business' && $coupon->state == 'approved' )

This coupon was approved and can't be edited.

@endif @if( Session::get('rol') == 'admin')
@csrf
@if(Session::has('error')) @include('content.notification.notification', ['msg' => \Session::get('error')]) @endif
user-avatar

Allowed JPG, GIF or PNG. Max size of 800K


@include('content.special-field.field', [ 'id'=> 'couponTitle', 'type' => 'text', 'placeholder' => 'Coupon Title', 'value' => $coupon->title, 'field' => 'title', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'couponStartDate', 'type' => 'date', 'placeholder' => '', 'value' => $coupon->startDate, 'field' => 'couponStartDate', 'message' => isset($message)?$message:'' ])
Type of promo
typeValue=='price') checked @endif/>
typeValue=='percent') checked @endif/>
typeValue=='promo') checked @endif/>
@include('content.special-field.field', [ 'id'=> 'couponEndDate', 'type' => 'date', 'placeholder' => '', 'value' => $coupon->endDate, 'field' => 'couponEndDate', 'message' => isset($message)?$message:'' ])
typeValue!='price') style="display:none" @endif> @include('content.special-field.field', [ 'id'=> 'couponPriceBefore', 'type' => 'text', 'placeholder' => '99.99', 'value' => $coupon->priceBefore, 'field' => 'couponPriceBefore', 'message' => isset($message)?$message:'' ])
typeValue!='percent') style="display:none" @endif> @include('content.special-field.field', [ 'id'=> 'couponDiscount', 'type' => 'text', 'placeholder' => '40', 'value' => $coupon->percent, 'field' => 'couponDiscount', 'message' => isset($message)?$message:'' ])
typeValue!='price') style="display:none" @endif> @include('content.special-field.field', [ 'id'=> 'couponPriceAfter', 'type' => 'text', 'placeholder' => '49.99', 'value' => $coupon->priceAfter, 'field' => 'couponPriceAfter', 'message' => isset($message)?$message:'' ])
typeValue!='promo') style="display:none" @endif> @include('content.special-field.field', [ 'id'=> 'couponCondition', 'type' => 'text', 'placeholder' => 'Only fridays', 'value' => $coupon->condition, 'field' => 'couponCondition', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'couponTotal', 'type' => 'text', 'placeholder' => '50', 'value' => $coupon->quantity, 'field' => 'couponTotal', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'domain_id', 'type' => 'hidden', 'placeholder' => '', 'value' => $coupon->domain_id, 'field' => 'domain_id', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'category_id', 'type' => 'hidden', 'placeholder' => '', 'value' => $coupon->category_id, 'field' => 'category_id', 'message' => isset($message)?$message:'' ])
@include('content.special-field.field', [ 'id'=> 'location_id', 'type' => 'hidden', 'placeholder' => '', 'value' => $coupon_location[0]->hashes, 'field' => 'location_id', 'message' => isset($message)?$message:'' ])
Cancel
@endif @endif
@endsection