@extends('backend.layouts.master')

@section('main-content')
<div class="card">
    <div class="row">
        <div class="col-md-12">
            @include('backend.layouts.notification')
        </div>
    </div>
    <h5 class="card-header">Promo code</h5>
    <div class="card-body">
      <form method="post" >
        {{csrf_field()}}
        <div class="form-group">
          <label for="inputTitle" class="col-form-label">User Name <span class="text-danger">*</span></label>
          <input type="hidden" name="user_id" value="{{ $promo->user_id }}" >
          <input id="inputTitle" type="text" readonly placeholder="Enter User Name"  value="{{ $user->name }}" class="form-control" required>
          @error('user_id')
          <span class="text-danger">{{$message}}</span>
          @enderror
        </div>

        <div class="form-group">
          <label for="email" class="col-form-label">Email <span class="text-danger">*</span></label>
          <input id="email" type="text" readonly placeholder="Enter email"  value="{{ $user->email }}" class="form-control" required>
          @error('email')
          <span class="text-danger">{{$message}}</span>
          @enderror
        </div>

        <div class="form-group">
          <label for="points" class="col-form-label">Points <span class="text-danger">*</span></label>
          <input id="points" type="text" readonly placeholder="Enter points"  value="{{ $promo->points }}" class="form-control" required>
          @error('points')
          <span class="text-danger">{{$message}}</span>
          @enderror
        </div>

        <div class="form-group">
          <label for="promo" class="col-form-label">promo <span class="text-danger">*</span></label>
          <input id="promo" type="text" name="promo" readonly placeholder="Enter promo"  value="{{ $promo->promo_code }}" class="form-control" required>
          @error('points')
          <span class="text-danger">{{$message}}</span>
          @enderror
        </div>
        
      </form>
    </div>
</div>

@endsection

@push('styles')
<link rel="stylesheet" href="{{asset('backend/summernote/summernote.min.css')}}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/css/bootstrap-select.css" />
@endpush
@push('scripts')
<script src="/vendor/laravel-filemanager/js/stand-alone-button.js"></script>
<script src="{{asset('backend/summernote/summernote.min.js')}}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>

<script>
    $('#lfm').filemanager('image');

    $('#lfm2').filemanager('files');

    $(document).ready(function() {
      $('#summary').summernote({
        placeholder: "Write short description.....",
          tabsize: 2,
          height: 100
      });
    });

    $(document).ready(function() {
      $('#description').summernote({
        placeholder: "Write detail description.....",
          tabsize: 2,
          height: 150
      });
    });
    
    // $('select').selectpicker();

</script>

@endpush