@extends('yonetim.yonetim_master')

@section('main')
    <section class="section">
        <div class="section-body">
            <div class="row mt-sm-4">
                <div class="col-12 col-md-12 col-lg-4">
                    <div class="card author-box">
                        <div class="card-body">
                            <div class="author-box-center">
                                @if($veriler->profile_image=="")
                                    <img alt="image" src="{{asset("upload/no_image.jpg")}}" class="rounded-circle author-box-picture">
                                @else
                                    <img alt="image" src="{{asset($veriler->profile_image)}}" class="rounded-circle author-box-picture">
                                @endif

                                <div class="clearfix"></div>
                                <div class="author-box-name mt-2">

                                    <h4 style="color: #2d2626" class="">{{$veriler->name}}</h4>
                                </div>
                                <div class="author-box-job">{{$veriler->username}}</div>
                            </div>
                        </div>
                    </div>
                    <div class="card">

                        <div class="table-responsive">
                            <table style="" class="table table-striped p-3">
                                <thead style="">
                                <tr>

                                    <th>Özellik</th>
                                    <th>Bilgi</th>
                                </tr>
                                </thead>
                                <tbody>

                                <tr>

                                    <td>Üye Tarihi</td>
                                    <td>
                                        {{  \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $veriler->created_at)->format('d.m.Y H:i:s')}}                                    </td>

                                </tr>

                                <tr>
                                    <td>Telefon</td>
                                    <td>
                                        {{$veriler->telefon}}
                                    </td>
                                </tr>


                                <tr>
                                    <td>Mail</td>
                                    <td>
                                        {{$veriler->email}}
                                    </td>
                                </tr>

                                <tr>
                                    <td>Kullanıcı Adı</td>
                                    <td>
                                        {{$veriler->username}}
                                    </td>
                                </tr>

                                <tr>
                                    <td>Bakiye</td>
                                    <td>
                                        {{$veriler->bakiye}}
                                    </td>
                                </tr>





                                </tbody>
                            </table>
                        </div>





                    </div>
                    <div class="card">
                        <div class="card-header">
                            <h4>Kullanıcı İstatistikleri</h4>
                        </div>
                        <div class="card-body">
                            <ul class="list-unstyled user-progress list-unstyled-border list-unstyled-noborder">
                                <li class="media">
                                    <div class="media-body">
                                        <div class="media-title">Siparis Sayısı : </div>
                                    </div>
                                    <div class="media-progressbar">
                                        <h6 style="color: #34395e">{{$siparisler->count()}}</h6>
                                    </div>
                                </li>

                                <li class="media">
                                    <div class="media-body">
                                        <div class="media-title">Destek Talepleri : </div>
                                    </div>
                                    <div class="media-progressbar">
                                        <h6 style="color: #34395e">{{$talepler->count()}}</h6>
                                    </div>
                                </li>


                            </ul>
                        </div>
                    </div>
                </div>
                <div class="col-12 col-md-12 col-lg-8">
                    <div class="card p-4">
                        <form method="post" action="{{route('uyeler.sifredegistirson',$veriler->id)}}">
                            @csrf
                            <div class="form-group">
                                <label>Yeni Şifre</label>
                                <input id="newpassword" name="newpassword" type="password" class="form-control" autocomplete="new-password">
                            </div>

                            <div class="text-right">
                                <button type="submit" name="genelayarkaydet" class="btn btn-primary">Gönder</button>

                            </div>
                        </form>

                        <br><br>
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection
