philiplambok
7/17/2018 - 5:45 AM

Replace file `/resources/views/users/singleorder.blade.php`.

Replace file /resources/views/users/singleorder.blade.php.

@extends('layouts.app')

@section('content')
<div class="row">
  <div class="col-md-3">
   <h3>Tools Member</h3>
    <div class="list-group">
      <li class="list-group-item"><a href="/home/offer">Media Partner</a>
      <li class="list-group-item"><a href="/home/order">Lihat Pesanan</a>
      <li class="list-group-item"><a href="#">Inbox</a>
    </div>
   <br>
  </div>
      <div class="col-md-9">
        <h3>order ID : {{ $order->order_id }}</h3>
        <h5>order Date : {{ $order->created_at->toFormattedDateString() }}</h5>
        <br>
        <table class="table table-bordered table-condensed">
          <thead>
            <tr>
              <th>Title</th>
              <th>Price</th>
              <th>Amount</th>
              <th>Total</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>{{ $order->event->title }}</td>
              <td>Rp. {{ $order->event->price }}</td>
              <td>{{ $order->amount }} &nbsp Ticket</td>
              <td>Rp. {{ number_format($order->total) }}</td>
            </tr>
          </tbody>
        </table>
        <div class="col-lg-4 col-md-4 col-sm-1 pull-right">
          <table class="table table-responsive table-borderless">
            <tr>
              <td><strong>Grand Total</strong></td>
              <td><strong>Rp.</strong></td>
              <td class="text-right"><strong>{{ $order->total }}</strong></td>
            </tr>
          </table>
        </div>
      </div>

      <div class="row margin-bottom-20">
        <div class="col-md-9 col-md-offset-3">
          <div class="panel panel-default" id="panel-confirm">
            <div class="panel-body">
              @if ($order->confirm == null)
                <form class="form-horizontal" action="{{ asset('order/'. $order->order_id .'/confirm')}}" role="form" id="confirm-payment" method="post" enctype="multipart/form-data">
                  <fieldset>
                    <legend>Confirm Payment</legend>
                    <div class="form-group">
                      <label for="acc_bank" class="col-lg-3 control-label">Bank <span class="require">*</span></label>
                      <div class="col-lg-8">
                        <input type="text" name="acc_bank" class="form-control" id="acc_bank" aria-describedby="helpBlockacc_bank" >
                        <span id="helpBlockacc_bank" class="help-block">
                          {{ $errors->has('acc_bank') ? $errors->first('acc_bank') : ''}}
                        </span>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="acc_name" class="col-lg-3 control-label">Sender Name <span class="require">*</span></label>
                      <div class="col-lg-8">
                        <input type="text" name="acc_name" class="form-control" id="acc_name" aria-describedby="helpBlockacc_name" >
                        <span id="helpBlockacc_name" class="help-block">
                          {{ $errors->has('acc_name') ? $errors->first('acc_name') : ''}}
                        </span>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="total_trf" class="col-lg-3 control-label">Total Transfer (Rp) <span class="require">*</span></label>
                      <div class="col-lg-8">
                        <input type="number" min="1" name="total_trf" class="form-control" id="total_trf" aria-describedby="helpBlocktotal_trf" >
                        <span id="helpBlocktotal_trf" class="help-block">
                          {{ $errors->has('total_trf') ? $errors->first('total_trf') : ''}}
                        </span>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="image" class="col-lg-3 control-label">Image <span class="require">*</span></label>
                      <div class="col-lg-8">
                        <input type="file" name="image" class="form-control" id="image">
                      </div>
                    </div>
                  </fieldset>
                  <div class="col-md-3"></div>
                  <div class="col-md-8">
                    {{ csrf_field() }}
                    <input type="submit" class="btn btn-success pull-right" value="Confirm">
                  </div>
                </form>
               @else
                <form class="form-horizontal">
                  <fieldset>
                    <legend>Confirm Payment</legend>
                    <div class="form-group">
                      <label for="nama-bank" class="col-lg-3 control-label">Bank <span class="require">*</span></label>
                      <div class="col-lg-8">
                        <input type="text" name="nama_bank" class="form-control" id="nama-bank" value="{{ $order->confirm->acc_bank }}" disabled="true">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="nama-pengirim" class="col-lg-3 control-label">Sender Name <span class="require">*</span></label>
                      <div class="col-lg-8">
                        <input type="text" name="nama_pengirim" class="form-control" id="nama-pengirim" value="{{ $order->confirm->acc_name }}" disabled="true">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="total-transfer" class="col-lg-3 control-label">Total Transfer (Rp) <span class="require">*</span></label>
                      <div class="col-lg-8">
                        <input type="number" min="1" name="total_transfer" class="form-control" id="total-transfer" value="{{ $order->confirm->total_trf }}" disabled="true">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="text" class="col-lg-3 control-label">Image <span class="require">*</span></label>
                      <div class="col-lg-8">
                        <input type="text" name="image" class="form-control" id="image" value="(Image has been saved)" disabled="true">
                      </div>
                    </div>
                    @if($order->confirm->status == 1)
                    <div class="form-group">
                      <label for="name-admin" class="col-lg-3 control-label">Confirmed By</label>
                      <div class="col-lg-8">
                        <input type="text" name="admin_name" class="form-control" id="name-admin" value="Abdurrahman Aziz" disabled="true">
                      </div>
                    </div>
                    @endif
                    <div class="form-group">
                      <label for="status" class="col-lg-3 control-label">Status</label>
                      <div class="col-lg-8">
                        @if ($order->confirm->status == 0)
                            <button type="button" class="btn btn-warning btn-xs">On Process</button>
                        @else
                            <button type="button" class="btn btn-success btn-xs">Confirmed</button>
                        @endif
                      </div>
                    </div>
                    @if ($order->confirm->status == 1)
                      <div class="form-group">
                        <div class="col-md-3"></div>
                        <div class="col-md-8">
                          <a href="{{ asset('order/'. $order->order_id .'/print') }}" class="btn btn-info">Print Your Tickets</a>
                        </div>
                      </div>
                    @endif
                  </fieldset>
                </form>
              @endif
            </div>
          </div>
        </div>
      </div>

      <div class="row margin-bottom-20 ">
        <div class="col-lg-12 "></div>
      </div>
    </div>
  </div>
@endsection