@extends('layouts.master')

@section('title', 'IV Media - Increase your popularity')
@section('content')
<!-- Start content -->
<div class="content">
    <div class="container-fluid">

        <div class="row">
            <div class="col-xl-12">
                <div class="page-title-box">
                    <h4 class="page-title float-left">Dashboard</h4>

                    <ol class="breadcrumb float-right">
                        <li class="breadcrumb-item"><a href="{{ url('/') }}">{!! \App\Helper::panelName() !!}</a>
                        </li>
                        <li class="breadcrumb-item active">Dashboard</li>
                    </ol>

                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
        <!-- end row -->


        <div class="row">
            @if ($flash = session('message'))
              <div class="col-md-12">
                <div class="alert alert-success" role="alert">
                  <ul style="margin-bottom:0;">
                  @foreach ($flash as $key => $val)
                    <li>{{$key.' => '.$val}}</li>
                  @endforeach
                  </ul>
                </div>
              </div>
            @endif
            @if (isset($errors) && count($errors) > 0)
              <div class="col-md-12">
                <div class="alert alert-danger" role="alert">
                  <ul style="margin-bottom:0;">
                  @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                  @endforeach
                  </ul>
                </div>
              </div>
            @endif
            <div class="col-md-6 col-xs-12">
                <div class="card-box">

                    <h4 class="header-title m-t-0 m-b-30">Kurangi Balance</h4>
                    <div class="row">
                        <div class="col-12">
                            <form action="{{ url('/admin/transfer') }}" method="POST">
                                {{ csrf_field() }}

                                <fieldset class="form-group">
                                    <label for="url">User</label>
                                    <select name="user" class="form-control select2">
                                      <option></option>
                                      @foreach($user as $u)
                                      <option value="{{$u->username}}">{{$u->username}}</option>
                                      @endforeach
                                    </select>
                                </fieldset>

                                <fieldset class="form-group">
                                    <label for="url">Jumlah</label>
                                    <input type="number" class="form-control" id="jumlah" placeholder="0" name="jumlah">
                                </fieldset>
                                <button type="submit" class="btn btn-block btn-primary">Submit</button>
                            </form>
                        </div>
                    </div><!-- end row -->
                </div>
            </div>
            <div class="col-md-6 col-xs-12">
                <div class="card-box">
                    <h4 class="header-title m-t-0 m-b-30"><span class="label label-primary">{{ auth()->user()->level }}</span> {!! \App\Helper::panelName() !!} PENGURANGAN BALANCE</h4>
                    <ul class="list-group">
                      <li class="list-group-item">Selamat Datang Di {!! \App\Helper::panelName() !!} PANEL</li>
                      <li class="list-group-item">Jika ingin melakukan pengurangan saldo silahkan pilih user</li>
                      <li class="list-group-item">lalu masukkan jumlah nominal yang ingin dikurangkan</li>
                    </ul>
                </div>
            </div>
        </div>
        <!-- end row -->


    </div>
    <!-- container -->

</div>
<!-- content -->
@endsection

@section('js')
<script>
  var resizefunc = [];
</script>
@endsection
