@extends('yonetim.yonetim_master')

@section('main')
    <section class="section">
        <div class="section-body">
            <div class="row">
                <div class="col-12 col-md-12 col-lg-12">
                    <div class="card">
                        <div class="padding-20">
                            <ul class="nav nav-tabs" id="myTab2" role="tablist">




                                <li class="nav-item">
                                    <a class="nav-link active" id="home-tab2" data-toggle="tab" href="#about" role="tab"
                                       aria-selected="false">İçerik</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" id="profile-tab2" data-toggle="tab" href="#settings" role="tab"
                                       aria-selected="false">Bayi Paketleri</a>
                                </li>

                                <li class="nav-item">
                                    <a class="nav-link" id="talepler-tab3" data-toggle="tab" href="#talepler" role="tab"
                                       aria-selected="false">Bayi Sıkça Sorulanlar </a>
                                </li>

                            </ul>
                            <div class="tab-content tab-bordered" id="myTab3Content">




                                <div class="tab-pane fade active show" id="about" role="tabpanel" aria-labelledby="home-tab2">

                                    <div class="row">
                                        <div class="col-12 col-md-9 col-lg-9">


                                            <form action="{{route('bayiicerik.veriupdateson')}}" method="post" enctype="multipart/form-data">
                                                @csrf

                                                <div class="card-body">


                                                    <div class="col-lg-12 mx-auto">
                                                        @if ($errors->any())
                                                            <div class="alert alert-danger">
                                                                <ul style="padding: 0;margin: 0">
                                                                    @foreach ($errors->all() as $error)
                                                                        <li>{{ $error }}</li>
                                                                    @endforeach
                                                                </ul>
                                                            </div>
                                                        @endif

                                                        <div class="row">
                                                            <div class="col-md-6">
                                                                <div style="margin-bottom: 10px" class="form-group">

                                                                    <img style="height: 150px" src="{{asset($veriler->resimyol)}}">
                                                                    <p style="padding: 0;margin: 0">Güncel Resim</p>
                                                                    <input type="hidden" name="eskiresimyol" value="{{$veriler->resimyol}}">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label>Resim Yükle(Açıklama Resimi -1 )</label>
                                                                    <input name="resimyol" class="form-control" type="file">
                                                                </div>


                                                                <div class="form-group">
                                                                    <label>Resim Alt Tagı(Açıklama Resimi -1 )</label>
                                                                    <input name="resimyol_alt" class="form-control" type="text" value="{{$veriler->resimyol_alt}}">
                                                                </div>
                                                            </div>

                                                            <div class="col-md-6">
                                                                <div style="margin-bottom: 10px" class="form-group">

                                                                    <img style="height: 150px" src="{{asset($veriler->resimyol2)}}">
                                                                    <p style="padding: 0;margin: 0">Güncel Resim</p>
                                                                    <input type="hidden" name="eskiresimyol2" value="{{$veriler->resimyol2}}">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label>Resim Yükle(Açıklama Resimi - 2  )</label>
                                                                    <input name="resimyol2" class="form-control" type="file" value="">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label>Resim Alt Tagı Açıklama Resimi - 2  </label>
                                                                    <input name="resimyol2_alt" class="form-control" value="{{$veriler->resimyol2_alt}}" type="text">
                                                                </div>

                                                            </div>


                                                            <div class="col-md-6">
                                                                <div style="margin-bottom: 10px" class="form-group">

                                                                    <img style="height: 150px" src="{{asset($veriler->sssresimyol)}}">
                                                                    <p style="padding: 0;margin: 0">Güncel Resim</p>
                                                                    <input type="hidden" name="eskisssresimyol" value="{{$veriler->sssresimyol}}">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label>Resim Yükle(Sıkça Sorulanlar)</label>
                                                                    <input name="sssresimyol" class="form-control" type="file">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label>Resim Alt Tagı(Sıkça Sorulanlar)</label>
                                                                    <input name="sssresimyol_alt" class="form-control" value="{{$veriler->sssresimyol_alt}}" type="text">
                                                                </div>

                                                            </div>


                                                        </div>








                                                        <div class="form-group">
                                                            <label>Üst Başlık</label>
                                                            <input name="baslik1" type="text" class="form-control" value="{{$veriler->baslik1}}" maxlength="255" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Başlık Alt İcerik</label>
                                                            <input name="alticerik" type="text" class="form-control" value="{{$veriler->alticerik}}" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Açıklama Başlık</label>
                                                            <input name="baslik2" type="text" class="form-control" value="{{$veriler->baslik2}}" maxlength="255" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Açıklama</label>
                                                            <textarea name="alticerik2" class="summernote">{{$veriler->alticerik2}}</textarea>
                                                        </div>


                                                        <div class="form-group">
                                                            <label>Açıklama Başlık2</label>
                                                            <input name="baslik3" type="text" class="form-control" value="{{$veriler->baslik3}}" maxlength="255" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Açıklama2</label>
                                                            <textarea name="alticerik3" class="summernote">{{$veriler->alticerik3}}</textarea>
                                                        </div>





                                                        <div class="form-group">
                                                            <label>Sıkça Sorulanlar Başlık</label>
                                                            <input name="sssbaslik" type="text" class="form-control" value="{{$veriler->sssbaslik}}" required maxlength="255">
                                                        </div>




                                                        <div class="card-footer text-right">
                                                            <button type="submit" name="genelayarkaydet" class="btn btn-primary">Güncelle</button>
                                                        </div>


                                                    </div>
                                                </div>
                                            </form>






                                        </div>

                                    </div>
                                </div>


                                <div class="tab-pane fade" id="settings" role="tabpanel" aria-labelledby="profile-tab2">
                                    <div class="card-header">
                                        <h4>Tüm Paketler</h4>
                                        <a href="{{route('bayipaketler.paketveriekle')}}" class="btn btn-primary text-white">Paket Ekle</a>
                                        <br>
                                    </div>
                                    <div class="card-body">

                                        <div class="table-responsive">
                                            <table class="table table-striped" id="table-1">
                                                <thead>
                                                <tr>

                                                    <th>Başlık</th>


                                                    <th>İşlemler</th>
                                                </tr>
                                                </thead>
                                                <tbody>

                                                @foreach($paketveri as $paket)
                                                    <tr>

                                                        <td>{{$paket->baslik}}</td>


                                                        <td>
                                                            <a href="{{ route('bayipaketler.paketveriupdate',$paket->id)}}" class="btn btn-warning"><i class="fa fa-edit"></i> Düzenle</a>
                                                            <a onclick="return confirm('Silmek istediğinizden emin misiniz?')" href="{{ route('bayipaketler.paketverisil',$paket->id)}}" class="btn btn-danger"><i class="fa fa-trash"></i> Sil</a>
                                                        </td>
                                                    </tr>
                                                @endforeach





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






                                </div>



                                <div class="tab-pane fade" id="talepler" role="tabpanel" aria-labelledby="talepler-tab3">
                                    <div class="card-header">
                                        <h4>Bayi Sıkça Sorulanlar Tümü</h4>
                                        <a href="{{route('bayisssler.veriekle')}}" class="btn btn-primary text-white">Sss Ekle</a>
                                        <br>
                                    </div>
                                    <div class="card-body">
                                        <div class="table-responsive">
                                            <table class="table table-striped" id="table-1">
                                                <thead>
                                                <tr>

                                                    <th>Başlık</th>


                                                    <th>İşlemler</th>
                                                </tr>
                                                </thead>
                                                <tbody>

                                                @foreach($bayisssler as $sssler)
                                                    <tr>

                                                        <td>{{$sssler->baslik}}</td>


                                                        <td>
                                                            <a href="{{ route('bayisssler.veriupdate',$sssler->id)}}" class="btn btn-warning"><i class="fa fa-edit"></i> Düzenle</a>
                                                            <a onclick="return confirm('Silmek istediğinizden emin misiniz?')" href="{{ route('bayisssler.verisil',$sssler->id)}}" class="btn btn-danger"><i class="fa fa-trash"></i> Sil</a>
                                                        </td>
                                                    </tr>
                                                @endforeach





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

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>
    </section>
@endsection
