<div class="row g-5 g-xl-8 mb-7">
    <div class="col-xl-12">
        <div class="card">
            <div class="card-header">
                <div class="card-title">
                    SMS Bilgileri
                </div>
            </div>
            <div class="card-body pb-0">
                <div class="d-flex flex-wrap py-5">
                    <div class="flex-equal me-5">
                        <table class="table table-flush fw-semibold gy-1">
                            <tbody>
                                    @if($userinfo['uisettings']['smsapprove'] == 1)
                                    <tr>
                                        <td class="text-muted min-w-125px w-125px">Doğrulama Durumu: </td>
                                        <td class="text-success">Doğrulandı</td>
                                    </tr>
                                    @else
                                    <tr>
                                        <td class="text-muted min-w-125px w-125px">Doğrulama Durumu: </td>
                                        <td class="text-success">Doğrulanmadı</td>
                                    </tr>
                                    @endif
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            @if($userinfo['uisettings']['smsapprove'] == 0)
            <div class="card-body p-3">
                <a class="btn btn-danger beSetSMSApprove">Doğrula</a>
            </div>
            @endif
        </div>
    </div>
</div>
<script>
    $(".beSetSMSApprove").on("click",function(){
        $.ajax({
            url: "{{ beGetRoute('smsapprove.admin.approve.post') }}",
            type: "post",
            data: {uid:"{{ $user['uid'] }}"},
            dataType: "json",
            crossDomain: true,
            success: function(response){
                if(response.status){
                    Swal.fire("Başarılı",response.message,"success");
                    setTimeout(function(){
                        location.reload();
                    },1000);
                }
                else{
                    Swal.fire("Bir Hata Oluştu",response.message,"error");
                }
            }
        });	
        return false;
    });
</script>