<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Research Admission</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many" />
        <meta name="keywords" content="" />

         <!-- facebook tags -->
         <meta property="og:url" content="http://www.facebook.com/researchadmission"/>
         <meta property="og:type" content="website"/>
         <meta property="og:title" content="Research Admission"/>
         <meta property="og:description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many"/>
          <!-- Linkedin tags -->
         <meta property="og:url" content="https://www.linkedin.com/company/researchadmission"/>
         <meta property="og:type" content="website"/>
         <meta property="og:title" content="Research Admission"/>
         <meta property="og:description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many"/>

        <!-- favicon -->
        <link rel="shortcut icon" href="{{asset('web/images/logo.png') }}">
        <!-- Bootstrap -->
        <link href="{{ asset('web/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
        <!-- tobii css -->
        <link href="{{asset('web/css/tobii.min.css')}}" rel="stylesheet" type="text/css" />
        <!-- Icons -->
        <link href="{{asset('web/css/materialdesignicons.min.css')}}" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="{{ asset('web/stylesheets/font-awesome.min.css') }}" />
        <link rel="stylesheet" href="https://unicons.iconscout.com/release/v3.0.6/css/line.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/11.6.15/sweetalert2.min.css">

        <!-- Slider -->
        <link rel="stylesheet" href="{{asset('web/css/tiny-slider.css')}}"/>
        <!-- Main Css -->
        <link href="{{asset('web/css/style.css')}}" rel="stylesheet" type="text/css" id="theme-opt" />
        <link href="{{asset('web/css/colors/default.css')}}" rel="stylesheet" id="color-opt">
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap" rel="stylesheet">
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;300&display=swap" rel="stylesheet">
        <link rel="stylesheet" href="{{asset('web/css/datepicker.min.css')}}">
        <link rel="stylesheet" href="{{asset('web/css/sweetalert/sweetalert.css')}}">
        {{-- Ajax Form Submit --}}
        <link href="{{ asset('css/noty/lib/noty.css') }}" rel="stylesheet" type="text/css">
        <link href="{{ asset('css/noty/lib/themes/sunset.css') }}" rel="stylesheet" type="text/css">
        <link href="{{ asset('css/flatpickr/dist/flatpickr.min.css') }}" rel="stylesheet" type="text/css">
        <link href="{{ asset('css/wait-me/waitMe.min.css')}}"  rel="stylesheet" type="text/css">
    </head>
    <style>

body {
    font-family: 'Oswald', sans-serif;
    font-family: 'Quicksand', sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    font-family: 'Quicksand', sans-serif;
}
.bg-half-170 {
    padding:0px;
}
.bg-primary, .btn-primary, .btn-soft-primary:hover, .btn-soft-primary:focus, .btn-soft-primary:active, .btn-soft-primary.active, .btn-soft-primary.focus, .btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active, .btn-outline-primary.active, .btn-outline-primary.focus, .btn-outline-primary:not(:disabled):not(.disabled):active, .pagination .page-item.active .page-link, .nav-pills .nav-link.active, #preloader #status .spinner .double-bounce1, #preloader #status .spinner .double-bounce2, .social-icon li a:hover, #topnav .navbar-toggle.open span:hover, .bg-animation-left.crypto-home:after, .bg-animation-left.task-management-home:after, .classic-app-image .bg-app-shape:after, .classic-saas-image .bg-saas-shape:after, .swiper-slider-hero .swiper-container .swiper-button-prev:hover, .features.fea-primary:hover, .tns-nav button.tns-nav-active, .ribbon.ribbon-primary span, .sidebar .widget .tagcloud > a:hover, .work-container.work-modern .icons .work-icon:hover, .timeline-page .timeline-item .date-label-left:after, .timeline-page .timeline-item .duration-right:after, #navmenu-nav li.account-menu.active .navbar-link, #navmenu-nav li.account-menu:hover .navbar-link, .qs-datepicker-container .qs-squares .qs-square:not(.qs-empty):not(.qs-disabled):not(.qs-day):not(.qs-active):hover, .qs-datepicker-container .qs-squares .qs-square.qs-current, .carousel-indicators [data-bs-target], .carousel-indicators .active, .tns-controls button[data-controls="prev"]:hover, .tns-controls button[data-controls="next"]:hover, .back-to-top {
    background-color: #141639c4 !important;
    color: white!important;
    border-radius:0px !important;
    border-color: #141639c4 !important;
}
.form-check-input.form-check-input:checked{
    border-radius:20px !important;
    background-color: #141639c4 !important;
}
.form-check-input:focus {
    border-color: #141639c4 !important;
    background-image:#141639c4 !important;
}
.nav-pills .nav-link{
    color: white !important;
}
.nav-pills {
    margin-bottom: 0px;
    background:none;
}
.logo {
    font-weight: 700;
    font-size: 24px;
    margin-right: 0px;
    padding: 0 0 6px;
    letter-spacing: 1px;
    line-height: 68px;
}
a {
    text-decoration: none !important;
}
.table {
    width: 100%;
    color: #6e6b7b;
}
.list_table thead tr th {
    font-size: 12px;
    font-weight: 700;
    background-color: #16183f69;
    text-transform: capitalize;
    color: #ffff;
}
.list_table thead tr th {
    padding: 11px 6px 10px!important;
}
.list_table .institute_info {
    display: flex !important;
}
.list_table .institute_info .left {
    width: 37px;
    align-self: center;
}
.list_table .institute_info .left .fa {
    background: #f1f0fb;
    padding: 10px;
    border-radius: 100%;
    font-size: 14px;
    color: #2e1153;
}
tbody, td, tfoot, th, thead, tr {
    border-color: inherit;
    /* border-style: dashed; */
    border-width: 0;
}
.change_pass_btn {
    margin-top: 0;
    color: #ffff;
    border: 1px solid #9f9fa169;
    border-radius: 50%;
    padding: 8px 8px;
    margin-right: 0;
    background: #16183f69;
    font-size: 15px!important;
}
.change_pass_btn:hover {
    color: #ff7f00;
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
    border: 1px solid #ff7f00 !important;
}
.icon_bar {
    width: fit-content;
    overflow: auto;
    border-radius: 0.25rem;
    padding: 2px 4px;
    margin: 0 auto;
    border: 0.5px solid #d8e2e7;
}
.icon_bar a {
    text-align: center;
    padding: 0;
    color: #818084;
    font-size: 16px;
    margin: 0 3px;
    border-bottom: none;
    top: 0;
}
.label_badge_radius {
    color: #2e1153;
    border-radius: 20px;
    padding: 1px 10px;
    font-size: 10px;
    line-height: 1.3;
    letter-spacing: .2px;
    font-weight: 600;
    /* background-image: linear-gradient(to right, rgb(46 17 83 / 19%), rgb(245, 244, 253)); */
}
.label_badge_no {
    color: red;
    border-radius: 20px;
    padding: 1px 10px;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: .2px;
    font-weight: 600;
    background-color:#ffecee;
}
.label_badge_gpa {
    color: #00b4d8;
    border-radius: 20px;
    padding: 1px 10px;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: .2px;
    font-weight: 600;
    background-color:#e2edff;
}
.label_badge_work {
    color: #10bd77;
    border-radius: 20px;
    padding: 1px 10px;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: .2px;
    font-weight: 600;
    background-color:#dffff2;;
}
.ms-5 {
    margin-left: 2.4rem!important;
}
.btncl{
    padding: 2px 6px;
    color: #ffffff !important;
    background-color: #ffc107 !important;
    border-radius: 30px;
}
.btncl:hover {
    background-color: #ffffff !important;
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}
.btn2{
    background-color: #141639c4 !important;
    color:white !important;
    border-radius: 20px;
    box-shadow:none !important;
    padding:3px 13px !important;
    font-size:13px;
}
.btn2:hover{
    background: #fff !important;
    color:  #141639c4 !important;
    border-radius: 20px;
    border-color: #2e1153!important;
}
.top_part_status_name {
    border-radius: 20px;
    padding: 1px 22px 1px 10px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: .2px;
    top: 0;
    position: relative;
    width: fit-content;
    display: flex;
}
.top_part_status .dropdown .dropdown-menu.show .dropdown-item:first-child {
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}
.top_part_status .dropdown .dropdown-menu.show .dropdown-item:hover {
    background: #2e1153;
    color: #fff !important;
}
.dropdown-menu {
    display: none;
    float: left;
    min-width:5rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    font-size: 11px;
    background-color: #dedbf1;
}
.dropdown-item {
    display: block;
    width: 100%;
    clear: both;
    font-weight: 400;
    text-align: inherit;
    white-space: nowrap;
    background: 0 0;
    border: 0;
    padding: 4px 12px;
}
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 80px;
    background: #fff;
    padding: 0px 15px 0 0;
    z-index: 80;
}
.sidebar-wrapper .sidebar-menu ul li a {
    display: inline-block;
    width: 100%;
    text-decoration: none;
    position: relative;
    padding:7px 15px 7px 20px;
}
.sidebar-wrapper .sidebar-menu ul li:hover>a{
    background-color: #141639c4 !important;
    color:white;
    border-radius: 0px !important
}
.sidebar-footer {
    position: sticky;
}
.single_glance_row {
    font-size: 12px !important;
    margin: 0 !important;
    border: none;
    border-bottom: 1px solid #e8eef1;
    border-radius: 0;
    padding: 8px 10px;
}
.config{
    font-size: 13px;
    font-weight: 600;
    color: black;
}
.method{
    background-color: #2c2d4d;
    margin-top: -11px;
    width: 24%;
    font-size: 14px !important;
    color: #fff;
    padding-left: 9px;
    border-radius: 5px;
}
.method-box{
    width: 31.5%;
    background-color: #eee;
    border-radius: 5px;
}
</style>
<body>
<header id="" class="site-header">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12">
                <nav class="mt-2 header-navbar navbar-expand-lg navbar-fixed align-items-center navbar-brand-center">
                        <div class="navbar-container d-flex content">
                            <div class="col-md-6" >
                                <div class="d-flex align-items-center">
                                    <ul class="nav navbar-nav mr-auto header_left">
                                        <li class="nav-item d-flex">
                                            <div class="col md-6 mt-1 mb-1" style="margin-left: 10px;">
                                                <a class="logo" href="index.html">
                                                    <h3 style="font-family:Ubuntu !important; color: #3c4858 !important; font-size: 30px !important;">Research Admission</h3>
                                                </a>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="col-md-6" style="display: flex; justify-content: end;">
                                <div >
                                    <div style="border: 1px solid #e2e9ff; width: auto; border-radius: 10px; display: flex; height: 60%; margin-top: 11px;">
                                        @if(\Auth::guard('teacher')->user()->is_available ==0)
                                            <p class="form-check-label ms-2" style="font-size: 11px; margin-top: 9px;">Not Available for Supervision</p>
                                        @endif
                                        <div class="form-check form-switch ms-3" id="" style="margin-top: 6px;">
                                            <input class="form-check-input teacher_is_available" type="checkbox" name="is_available" value="" @if(\Auth::guard('teacher')->user()->is_available ==1) checked @endif>
                                            @if(\Auth::guard('teacher')->user()->is_available ==1)
                                            <label class="form-check-label" for="" style="font-size: 11px; margin-top: -1px; margin-right: 9px;">Available for Supervision </label>
                                            @endif
                                        </div>
                                    </div>
                                </div>
                                <ul class="nav navbar-nav align-items-center ml-auto header_right ps-2">
                                    <li class="nav-item dropdown dropdown-notification">
                                        <a href="javascript:void(0)" class="open_modal_page" data-url="{{route('modal-get',['name'=>'add_wishlist'])}}" data-title="Wishlist">
                                        <button class="btn btn2" style="padding: 6px 10px !important;">New Invite</button>
                                        </a>
                                    </li>
                                </ul>
                                @php
                                    $hashids = new \Hashids\Hashids('student_q_signup', 25);
                                @endphp
                                <div class="flag_country copy" style="display:flex; cursor:pointer;" data-clipboard-text="{{ url('student-q-form/'.$hashids->encode(auth_user('teacher')->id)) }}">
                                    <ul class="nav navbar-nav align-items-center ml-auto header_right ps-2">
                                        <li class="nav-item dropdown dropdown-notification">
                                            <a href="javascript:void(0)">
                                                <i class="fa fa-bolt change_pass_btn" style="padding: 8px 9px;"></i>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                                <ul class="nav navbar-nav align-items-center ml-auto header_right ps-2">
                                    <li class="nav-item dropdown dropdown-notification">
                                        <a href="">
                                            <i class="fa fa-bell change_pass_btn" style="padding: 8px 9px;"></i>
                                        </a>
                                    </li>
                                </ul>
                                <ul class="nav navbar-nav align-items-center ml-auto header_right ps-2">
                                    <li class="nav-item dropdown dropdown-notification">
                                        <a href="">
                                            <h5 class="change_pass_btn" style="height: 33px; margin-top: 7px; padding: 4px 9px;">IZ</h5>
                                        </a>
                                    </li>
                                </ul>
                                <ul class="nav navbar-nav align-items-center ml-auto header_right ps-2">
                                    <li class="nav-item dropdown dropdown-notification">
                                        <a href="{{ url('teacher-logout') }}"
                                            onclick="event.preventDefault();
                                                            document.getElementById('logout-form').submit();">
                                             <i class="fa fa-sign-out change_pass_btn"></i>
                                        </a>
                                        <form id="logout-form" action="{{ url('teacher-logout') }}" method="POST" class="d-none">
                                            @csrf
                                        </form>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
</header>
<section class="bg-half-170 d-table w-100 it-home" style="background-color: #efefef; height:100vh;">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-2" style="padding:0px">
                    <nav class="sidebar-wrapper" id="sidebar" style="background-color: #1416398a!important; width: 16.6%; height: 100%; position: fixed; overflow-y: hidden; top: 65px;">
                        <div class="sidebar-content" style="height: calc(100vh - 75px);">
                            <div class="sidebar-menu" style="padding-bottom: 110px; height: 100vh; overflow: auto;">
                                <ul class="nav nav-pills nav-justified flex-column mb-0" id="pills-tab" role="tablist">
                                    <li class="nav-item" style="margin-top: 35px;">
                                        <a class="nav-link active" id="dashboard" data-bs-toggle="pill" href="#dash" role="tab" aria-controls="dash" aria-selected="false">
                                            <div class="text-start py-1 px-2" style="display:flex;">
                                            <i class="fa fa-home ms-3" style="font-size: 11px; margin-top: 3px;"></i>
                                                <h6 class="mb-0" style="margin-left: 6px; font-size: 13px !important;">Dashboard</h6>
                                            </div>
                                        </a><!--end nav link-->
                                    </li><!--end nav item-->

                                    <li class="nav-item">
                                        <a class="nav-link" id="application" data-bs-toggle="pill" href="#applicate" role="tab" aria-controls="dental" aria-selected="false">
                                            <div class="text-start py-1 px-2" style="display:flex;">
                                            <i class="fa fa-graduation-cap ms-3" style="font-size: 11px; margin-top: 3px;"></i>
                                                <h6 class="mb-0" style="margin-left: 6px; font-size: 13px !important;">Application</h6>
                                            </div>
                                        </a><!--end nav link-->
                                    </li><!--end nav item-->

                                    <li class="nav-item">
                                        <a class="nav-link rounded" id="wishlist" data-bs-toggle="pill" href="#list" role="tab" aria-controls="list" aria-selected="false">
                                            <div class="text-start py-1 px-2" style="display:flex;">
                                            <i class="fa fa-shopping-bag  ms-3" style="font-size: 11px; margin-top: 3px;"></i>
                                                <h6 class="mb-0" style="margin-left: 6px; font-size: 13px !important;">Wishlist </h6>
                                            </div>
                                        </a><!--end nav link-->
                                    </li><!--end nav item-->

                                    <li class="nav-item">
                                        <a class="nav-link rounded" id="explores" data-bs-toggle="pill" href="#explore" role="tab" aria-controls="explore" aria-selected="false">
                                            <div class="text-start py-1 px-2" style="display:flex;">
                                            <i class="fa fa-university ms-3" style="font-size: 11px; margin-top: 3px;"></i>
                                                <h6 class="mb-0" style="margin-left: 6px; font-size: 13px !important;">Explore</h6>
                                            </div>
                                        </a><!--end nav link-->
                                    </li><!--end nav item-->
                                    <li class="nav-item">
                                        <a class="nav-link rounded" id="myaccount" data-bs-toggle="pill" href="#account" role="tab" aria-controls="account" aria-selected="false">
                                            <div class="text-start py-1 px-2" style="display:flex;">
                                            <i class="fa fa-user ms-3" style="font-size: 11px; margin-top: 3px;"></i>
                                                <h6 class="mb-0" style="margin-left: 6px; font-size: 13px !important;">My Account</h6>
                                            </div>
                                        </a><!--end nav link-->
                                    </li><!--end nav item-->
                                </ul><!--end nav pills-->
                            </div>
                            <div class="sidebar-footer" style="display: block;bottom: 65px !important;">
                                <div class="sidebar-menu" style="padding: 0 !important;">
                                    <ul class="nav nav-pills nav-justified flex-column mb-0" id="">
                                        <li class="nav-item" style="margin-top: 35px;">
                                            <div class="nav-link" style="background-color: #141639c4; border-radius: 0px !important;">
                                                <div class="text-start py-1 px-2">
                                                    <h6 class="mb-0" style="font-size: 12px !important; font-weight:400;">Your Account Reference Number</h6>
                                                    <h6 class="mb-0" style="font-size: 13px !important; color: #ffbd59;">{{ auth_user('teacher')->ref_no }}</h6>
                                                </div>
                                            </div><!--end nav link-->
                                        </li><!--end nav item-->
                                    </ul><!--end nav pills-->
                                </div>
                            </div>
                        </div>
                    </nav>
                </div><!--end col-->

            <div class="col-md-10 col-12 mt-5" style="padding:1rem; padding-top: 2.5rem!important;">
                <div class="tab-content" id="pills-tabContent">
                    <div class="tab-pane fade show p-2 rounded active" id="dash" role="tabpanel" aria-labelledby="dashboard">
                        <div class="card p-2 rounded border-0" style="background-color: #ffffff; color: #141639c4; height: 80vh;">
                            <div class="col-md-12">
                                <div class="row p-2">
                                    <h6 style="font-weight:bold !important;">3 Ways you can receive proposals from Doctoral candidates : </h6>
                                    <div class="col-md-4 mt-3 ms-3 method-box">
                                        <h6 class="method"> Option 1:</h6>
                                        <p style="font-size: 13px;"> You can give your ARN to the student and request them to submit their proposal using your reference.</p>
                                    </div>
                                    <div class="col-md-4 mt-3 ms-3 method-box">
                                        <h6 class="method"> Option 2:</h6>
                                        <p style="font-size: 13px;">You can log in to your account, include the student's name and email address in Q Apply, and send them an invitation. This way, their application will be automatically tagged with your reference.</p>
                                    </div>
                                    <div class="col-md-4 mt-3 ms-3 method-box">
                                        <h6 class="method"> Option 3:</h6>
                                        <p style="font-size: 13px; margin-bottom: 0px;">You can share the Q Apply link with the student and ask them to fill out the form using their name and email. An invitation email will be sent to them, and then they can proceed with method 2.</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div><!--end teb pane-->

                    <div class="tab-pane fade show p-2 rounded" id="applicate" role="tabpanel" aria-labelledby="application">
                        <form method="POST" action="" style="padding: 10px; background-color: #16183f69; border-radius: 5px 5px 0px 0px;">
                            <div class="row">
                                <div class="col-md-3">
                                    <div class="mb-1">
                                            <label class="form-label" for="apply_ref" style="color: white; font-size:12px;">Apply Ref/Student Name or Email</label>
                                        <div class="form-icon position-relative">
                                            <input type="text" for="apply_ref" name="apply_ref" class="form-control ps-2" required="">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                        <div class="mb-1">
                                            <label class="form-label" for="" style="color: white; font-size:12px;">Status</label>
                                        <div class="form-icon position-relative">
                                            <select name="approve" id="approve" class="form-control frm" required="">
                                                <option disabled="" selected="" value="">Default</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="mb-1">
                                            <label class="form-label" style="color: white; font-size:12px;">Application Received</label>
                                        <div class="form-icon position-relative">
                                            <select name="app_date" id="app_date" class="form-control frm" required="">
                                                <option disabled="" selected="" value="">Date Range</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="mb-1">
                                            <label class="form-label" for="start date" style="color: white; font-size:12px;">Preffered Start Date</label>
                                        <div class="form-icon position-relative">
                                            <input name="startdate" type="text" class="form-control start_date" placeholder="Start Date" autocomplete="off">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <div class="col-md-12" style="background-color:white; border-radius: 0px 0px 5px 5px;">
                            <div class="mb-4" style="padding:15px;">
                                <div class="text-end">
                                    <button class="btn btncl"><i class="fa fa-refresh"></i></button>
                                    <button class="btn btn2">Save</button>
                                </div>
                            </div>
                        </div>
                        @if(count($students) >0)
                        <div class="col-md-12 bg-white" style="padding:10px; height:500px;">
                            <h4 class="text-info"></h4>
                            <div class="table-responsive">
                                <table class="table table-bordered list_table">
                                    <thead>
                                        <tr>
                                            <th>Sl</th>
                                            <th>Student Information</th>
                                            <th>Education</th>
                                            <th class="text-center">English Test</th>
                                            <th class="text-center">work History</th>
                                            <th>Proposal Summary</th>
                                            <th class="text-center">Status</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    @foreach($students as $key=>$row)
                                        <tr>
                                            <td style="font-size: 11px;">{{$key+1}}</td>
                                            <td>
                                                <div style="font-size: 11px; font-weight: 900; color: black;">
                                                    <span>{{cn($row,'student_details.first_name','')}} {{cn($row,'student_details.last_name','')}}</span>
                                                </div>
                                                <div style="font-size: 11px;">
                                                    <a href="" class="" style="color: black;"><span class="label_badge_work"> {{$row->student_apply_ref ?? "N/A"}} </span></a>
                                                </div>
                                                <div style="font-size: 11px;">
                                                    <span style="color: black;">@if(!empty($row->student_details->dob)){{ date("d M, Y", strtotime(cn($row,'student_details.dob','')))}} @else @endif</span>
                                                </div>
                                            </td>
                                            <td style="font-size: 11px;">
                                                <div style="font-size: 11px; font-weight: 600; display:block;">
                                                    <span style="color: black;">{{cn($row,'institutes.institution','')}}</span>
                                                </div>
                                                <div style="font-size: 11px;">
                                                    <span style="color: black;">@if(!empty($row->institutes->start_date)) {{date('M Y',strtotime(cn($row,'institutes.start_date','N/A')))}} @else @endif  @if(!empty($row->institutes->end_date)) - {{date('M Y',strtotime(cn($row,'institutes.end_date','N/A')))}} @else @endif</span>
                                                </div>
                                                <div class="mt-1" style="font-size: 11px;">
                                                    <span class="label_badge_gpa">{{cn($row,'institutes.result','')}} (GPA)</span>
                                                </div>
                                            </td>
                                            <td style="font-size: 11px; text-align:center; color: black;">{{cn($row,'scores.test_name','N/A')}}
                                                <div style="font-size: 11px;">
                                                    <span style="color: black;">{{cn($row,'scores.overall_score','')}}</span>
                                                </div>
                                            </td>
                                            <td style="font-size: 11px; text-align:center;">
                                                @php

                                                    $work_history_first =$row->work_experience_date()->whereNotNull('start_date')->oldest()->first();

                                                    $work_history_last =$row->work_experience_date()->latest()->first();
                                                    if($work_history_first && $work_history_last && $work_history_last->end_date){

                                                    $diff_in_days =diff_in_days($work_history_first->start_date,$work_history_last->end_date);

                                                    }elseif($work_history_first){
                                                    $diff_in_days =diff_in_days($work_history_first->start_date, now());
                                                    }else{
                                                    $diff_in_days =0;
                                                    }

                                                    $years = ($diff_in_days / 365) ;
                                                    $years = floor($years);
                                                    $month = ($diff_in_days % 365) / 30.5;
                                                    $month = floor($month);
                                                    $days = ($diff_in_days % 365) % 30.5;
                                                  @endphp


                                                <div style="font-size: 11px; display:block;">
                                                    <span class="label_badge_work">{{$years}} years</span>
                                                </div>
                                                <div style="font-size: 11px; display:block;">


                                                    {{-- ({{ dDate($work_history_first->start_date) }} - {{dDate($work_history_last->end_date, 'd M Y', 'Continue')}})  --}}

                                                </div>
                                            </td>
                                            <td style="font-size: 11px;">
                                                <div class="inner_right">
                                                    <a href="{{ url('teacher/student-proposal-details') }}/{{$row->id}}"><strong style="font-size:11px; color:black;">{{cn($row,'proposal.title','')}}</strong></a></br>
                                                    <span style="color:black;">{{cn($row,'proposal.methology','')}}</span>
                                                    @php
                                                        $proposal =\DB::table('proposal')->where(
                                                           'student_id',$row->student_id
                                                           )->first();

                                                        if(isset($proposal)){
                                                            $department =\DB::table('departments')->where(
                                                               'id',$proposal->department
                                                               )->first();
                                                        } 
                                                    @endphp
                                                    @if(isset($department))
                                                    <span>.</span>
                                                    <span style="color:black;"> 
                                                        {{ $department->name }} 
                                                    </span>
                                                    @endif
                                                    <span>.</span>
                                                    <span style="color:black;">{{cn($row,'proposal.status','')}}</span>
                                                </div>
                                            </td>
                                            <td style="font-size: 11px; text-align:center;">

                                                <div class="top_part_status">
                                                    @if($row->accepted_status==1 && $row->proposal_status ==1)
                                                         <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Reviewing</button>
                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==2)
                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Reviewing</button>
                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==3)
                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Push</button>
                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==4)
                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Hold</button>
                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==5)
                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Interested</button>
                                                    @elseif($row->accepted_status==1 && $row->proposal_status ==6)
                                                        <button class="btn btn2" style="padding: 1px 10px !important; font-size: 11px;">Rejected</button>
                                                    @else
                                                        <button class="btn btn2 accept_status_update" data-id="{{$row->id}}" style="padding: 1px 10px !important; font-size: 11px;">Accept</button>
                                                    @endif

                                                    @if($row->proposal_status_date)
                                                       <br>
                                                      <span style="font-size:11px; font-weight: bold;">{{date('d M Y H:i:A', strtotime($row->proposal_status_date))}}</span>

                                                    @endif
                                                </div>
                                            </td>
                                        </tr>
                                    @endforeach
                                    </tbody>
                                </table>
                            </div>
                        </div><!--end col-->
                        @endif
                    </div><!--end teb pane-->

                    <div class="tab-pane fade bg-white p-2 rounded shadow" id="list" role="tabpanel" aria-labelledby="wisthlist"  style="height:100%;">
                        <div class="col-md-12">
                            <div class="table-responsive">
                                <table class="table table-bordered list_table" style="margin: 0px;">
                                    <thead>
                                        <tr>
                                            <th>Sl</th>
                                            <th>Name</th>
                                            <th>Email</th>
                                            <th>Invited on</th>
                                            <th>Applied</th>
                                            <th>Channel</th>
                                            <th class="text-center">Total Invited</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        @if(count($refer_users) > 0)
                                        @foreach($refer_users as $key=>$row)
                                        <tr>
                                            <td style="font-size: 11px;">{{$key+1}}</td>
                                            <td style="font-size: 11px;">{{$row->first_name }} {{$row->last_name }}</td>
                                            <td style="font-size: 11px;">{{$row->email}}</td>
                                            <td style="font-size: 11px;">@if(!empty($row->invitation_date)) {{ date('d M Y h.i A', strtotime($row->invitation_date)) }} @else -- @endif</td>
                                            <td style="font-size: 11px;">
                                                @php
                                                  $teacher_id =\Auth::guard('teacher')->user()->id;
                                                  $submitted =\DB::table('student_proposals')->where(
                                                    'student_id',$row->id
                                                  )->where(
                                                    'teacher_id',$teacher_id
                                                  )->where(
                                                    'proposal_submit_status',1
                                                  )->orderBy('id','DESC')->first();
                                                @endphp
                                                @if(!empty($submitted->submitted_date)) {{ date('d M Y h.i A', strtotime($submitted->submitted_date)) }} @else -- @endif
                                            </td>
                                            <td style="font-size: 11px;">
                                                @if($row->register_type==3)
                                                 Q-Apply
                                                @else
                                                --
                                                @endif
                                            </td>
                                            <td class="text-center">
                                                @php
                                                    $user_invited_count = \DB::table('refer_users')->where('email',$row->email)->count();
                                                @endphp
                                                @if($user_invited_count > 1)
                                                <span class="badge bg-secondary">
                                                    {{ $user_invited_count }}
                                                </span>
                                                @else
                                                    --
                                                @endif
                                            </td>
                                        </tr>
                                        @endforeach
                                        @else
                                        <tr>
                                            <td colspan="5" class="text-center text-danger">No data found!</td>
                                        </tr>
                                        @endif
                                    </tbody>
                                </table>
                            </div>
                        </div><!--end col-->
                    </div><!--end teb pane-->

                    <div class="tab-pane fade bg-white p-2 rounded shadow" id="explore" role="tabpanel" aria-labelledby="explores"  style="height:100%;">
                        <div class="col-md-12">
                            <h3 class="p-5" style="text-align: center;">Coming Soon...</h3>
                        </div><!--end col-->

                        <!-- Account -->
                    </div><!--end teb pane-->
                    <div class="tab-pane fade p-2" id="account" role="tabpanel" aria-labelledby="myaccount"  style="height:100%;">
                        <div class="row">
                            <div class="col-md-8 rounded p-2 ms-2">
                                <div class="bg-white p-2 rounded">
                                    <h6 style="padding: 8px 4px 0px; color: #141639c4; font-weight:bold !important;">Application Summary</h6>
                                    <div class="col-md-12 bg-white">
                                        <div class="table-responsive">
                                            <table class="table table-bordered list_table">
                                                <thead>
                                                    <tr>
                                                        <th>Status</th>
                                                        <th>Jan</th>
                                                        <th>Feb</th>
                                                        <th>Mar</th>
                                                        <th>Apr</th>
                                                        <th>May</th>
                                                        <th>Jun</th>
                                                        <th>Jul</th>
                                                        <th>Aug</th>
                                                        <th>Sept</th>
                                                        <th>Oct</th>
                                                        <th>Nov</th>
                                                        <th>Dec</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td style="font-size: 12px;">App receive</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                    </tr>
                                                    <tr>
                                                        <td style="font-size: 12px;">Hold</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                    </tr>
                                                    <tr>
                                                        <td style="font-size: 12px;">Rejected</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                    </tr>
                                                    <tr>
                                                        <td style="font-size: 12px;">Pause</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                    </tr>
                                                    <tr>
                                                        <td style="font-size: 12px;">Interested</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                        <td style="font-size: 11px;">-</td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-12 mt-3" style="margin-left: -4px;">
                                    <div class="row">
                                        <div class="col-md-5 bg-white rounded p-2 ms-3" style="width: 47.1%;">
                                            <div class="row">
                                                <div class="col-md-12 mt-2">
                                                        <div style="display: flex;">
                                                            <div class="left" style="width: 90%;">
                                                                <span class="title p-2" style="margin-bottom: 0px !important; color: #141639c4; font-weight:bold !important;">Profile</span>
                                                            </div>
                                                            <div class="right" style="width: 10%;">
                                                                <span class="title" style="font-size:11px; font-weight: 600;">
                                                                        <button type="button" class="btn btn2" id="edit_profile_open_hide" style="padding: 2px 5px !important; font-size: 11px;"><i class="fa fa-pencil"></i></button>

                                                                </span>
                                                            </div>
                                                        </div>
                                                        <div class="single_glance_row mt-5" style="border-bottom: 1px solid #e8eef1;">
                                                            <div class="col-md-12">
                                                                <div id="demo16" class="collapse mt-2">
                                                                    <div class="panel-body profile_form" style="padding:10px; background-color: #4b4c6824; border: 1px solid #e9e5e5; border-radius: 5px;">
                                                                        <input type="hidden"  id="u_id" name="id" value="{{$user->id}}">
                                                                            <div class="row">
                                                                                <div class="col-md-6">
                                                                                    <div class="mb-2">
                                                                                        <label class="form-label config">First Name</label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <input type="text" class="form-control" placeholder="First Name" id="first_name" name="first_name" value="{{$user->first_name}}" required="" style="font-size: 13px;">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-6">
                                                                                    <div class="mb-2">
                                                                                        <label class="form-label config">Last Name</label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <input type="text" class="form-control" placeholder="Last Name" id="last_name" name="last_name" value="{{$user->last_name}}" required="" style="font-size: 13px;">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-12">
                                                                                <div class="mb-2">
                                                                                    <label class="form-label config">University Name</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        {{-- <input type="text" class="form-control" placeholder="University Name" id="university_name" name="university_name" value="{{$user->university_name}}" required="" style="font-size: 13px;"> --}}
                                                                                        <select class="form-control" name="university" id="university_id">
                                                                                            <option value="" disabled selected>Choose one..</option>
                                                                                            @foreach($universities as $row)
                                                                                                <option value="{{$row->id}}" @if($user->university_name ==$row->id) selected @endif>{{ $row->name}}</option>
                                                                                            @endforeach

                                                                                        </select>

                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-12">
                                                                                <div class="mb-2">
                                                                                    <label class="form-label config">Department</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <select class="form-control" name="department" id="department_id">
                                                                                            <option value="" disabled selected>Choose one..</option>
                                                                                            @foreach($departments as $row)
                                                                                                <option value="{{$row->id}}" @if($user->department ==$row->id) selected @endif>{{ $row->name}}</option>
                                                                                            @endforeach

                                                                                        </select>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-12">
                                                                                <div class="mb-2">
                                                                                    <label class="form-label config">Designation</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text" class="form-control" placeholder="Designation" id="designation" name="designation" value="{{$user->designation}}" required="" style="font-size: 13px;">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-12">
                                                                                <div class="text-end">
                                                                                    <button class="btn btn2 update_profile">Update</button>
                                                                                </div>
                                                                            </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    <div class="left mb-2 mt-2">
                                                        <div id="load_profile_info">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div><!--end col-->
                                        <div class="col-md-5 bg-white rounded p-2 ms-4" style="width: 47.1%;">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <h6 style="padding: 13px 10px 0px; color: #141639c4; font-weight:bold !important;">Change password</h6>
                                                    <div class="form-icon position-relative p-2 mt-2">
                                                        <input type="hidden" name="user_id" value="{{$user->id}}" id="user_id">
                                                        <input type="password" class="form-control" placeholder="Old password" name="old_password" id="old_password" required="" style="font-size: 13px;">
                                                    </div>
                                                    <div class="form-icon position-relative p-2">
                                                        <input type="password" class="form-control" placeholder="New password" name="new_password" id="new_password" required="" style="font-size: 13px;">
                                                    </div>
                                                    <div class="form-icon position-relative p-2">
                                                        <input type="password" class="form-control" placeholder="Re-type new password" name="new_password_confirmation" id="new_password_confirmation" required="" style="font-size: 13px;">
                                                        <div class="col-md-12"  style="text-align: center;">
                                                            <button class="btn btn2 mt-3 change_password">Changed</button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div><!--end col-->
                                    </div><!--end col-->
                                </div>
                            </div><!--end col-->

                            <div class="col-md-3 bg-white rounded mt-2 p-2 ms-3" style="width: 30%;">
                                <div class="row">
                                    <div class="col-md-12">
                                        <h6 style="padding: 13px 8px 0px; margin-bottom: 0px; color: #141639c4; font-weight:bold !important;">Research Interest</h6>
                                        <p class="ms-2" style="font-size: 11px;">Make yourself visible to candidates</p>
                                        <div class="col-md-12 mt-2">
                                            <div class="mb-2">
                                                <div class="form-icon position-relative p-2" style="display: flex;">
                                                    <input type="hidden" name="user_id" value="{{$user->id}}" id="res_user_id">
                                                    <input type="text" class="form-control" placeholder="" name="research" id="research" required="">
                                                    <button class="btn btn2 research_interest" style="margin-left: -3.4rem; border-radius: 0px 6px 6px 0px">Add</button>
                                                </div>
                                            </div>

                                            <div id="load_research_interest"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </div>
                    </div><!--end teb pane-->
                </div><!--end tab content-->
            </div><!--end col-->
        </div><!--end row-->
    </div><!--end container-->
</section><!--end section-->


      <script src="{{asset('web/js/bootstrap.bundle.min.js')}}"></script>
      <!-- tobii js -->
      <script src="{{asset('web/js/tobii.min.js')}}"></script>
      <!-- SLIDER -->
      <script src="{{asset('web/js/tiny-slider.js')}}"></script>
      <!-- Icons -->
      <script src="{{asset('web/js/feather.min.js')}}"></script>
      <!-- Main Js -->
      <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.slim.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/11.6.15/sweetalert2.min.js"></script>
      <script src="{{asset('web/js/plugins.init.js')}}"></script>
      <script src="{{asset('web/js/app.js')}}"></script>
      <script src="{{asset('web/js/datepicker.min.js')}}"></script>
      <script src="{{asset('web/js/bootstrap.bundle.min.js')}}"></script>
      <script src="{{asset('web/js/plugins.init.js')}}"></script>
      <script src="{{asset('web/js/app.js')}}"></script>
      <script src="{{asset('web/css/sweetalert/sweetalert.min.js')}}"></script>
      {{-- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> --}}

        {{-- Ajax Form Submit --}}

        <script src="{{ asset('css/jquery.min.js') }}"></script>
        <script src="{{ asset('css/jquery-form/dist/jquery.form.min.js') }}"></script>
        <script src="{{ asset('css/noty/lib/noty.min.js') }}"></script>
        <script src="{{ asset('css/flatpickr/dist/flatpickr.min.js') }}"></script>
        <script src="{{ asset('css/wait-me/waitMe.min.js')}}"></script>
        <script src="{{ asset('css/clipboard/dist/clipboard.min.js')}}"></script>

        @include('web.layouts.modal')
      <script>
        function fetch_sub_content(selector, url, args=null){

            var config={
            spinner: true
            }

            if(typeof args=='object'){
            config=Object.assign(config, args);
            }

            if(config.spinner){

            $(selector).waitMe({
                effect: 'facebook',
                text: 'Please! Wait ...'
            });

            }

            $(selector).load(url, null, function(){
            $(selector).waitMe('hide');
            if(typeof args=='function') args();
            });

            }

            function wait_me(selector, config=null){

            if(config){

                selector.waitMe(config);

            }else{

                selector.waitMe({
                    effect: 'facebook',
                    //color: '#000',
                    text: 'Please! Wait ...'
                });
            }
        }

        function pop_up_msg(msg='No message specified', type='success', callback=null){
            new Noty({
            theme:'sunset',
            text: msg,
            type: type,
            timeout:1500,
            callbacks:{
                afterClose: callback
            }
            }).show();
        }

        function err_msg(err){

            var msg="Request failed to process, try again later.";

            if(err.responseJSON && err.responseJSON.msg){
            msg=err.responseJSON.msg;
            }

            return msg;

        }

        function ajax_form(form, cllback=null, config={spinner: true}){

            $('.btn-submit').prop('disabled', true);
            var redirect=$(form).data('redirect');

            if(typeof config=='object'){

            if(config.spinner) wait_me($(form));

            }

            $(form).ajaxSubmit({
            success:function(res){

                wait_me($(form), 'hide');

                if(res.msg){

                pop_up_msg(res.msg, 'success', function(){

                    $('.btn-submit').prop('disabled', false);

                    if(redirect) window.location.replace(redirect);
                    else if(typeof cllback=='function'){
                    cllback(form, res);
                    }

                });

                }

                //$.notify(res.msg, 'success');
            },
            error:function(res){

                wait_me($(form), 'hide');

                var msg="Request failed to process, try again later.";

                if(res.responseJSON && res.responseJSON.msg){
                msg=res.responseJSON.msg;
                }

                pop_up_msg(msg, 'error');
                $('.btn-submit').prop('disabled', false);

            }

            });

            } //End of ajax form definition


        $(function(){
            $("#edit_profile_open_hide").on('click', function(){
                $("#demo16").show();
            });

            $(".start_date").flatpickr({
                dateFormat: "M y",
            });

            var clipboard = new ClipboardJS('.copy');

            clipboard.on('success', function(e){
                //pop_up_msg('Successfully copy this link.');

                new Noty({
                    theme:'sunset',
                    text: 'Successfully copy this link',
                    type: 'success',
                    timeout:1500
                }).show();

            });


            fetch_sub_content(
                '#load_profile_info',
                "{{ route('sub-content', ['name'=>'load_profile_info']) }}"
            );

            fetch_sub_content(
                '#load_research_interest',
                "{{ route('sub-content', ['name'=>'load_research_interest']) }}"
            );

            $('.update_profile').on('click', function(){

                var id =$('#u_id').val();
                var first_name =$('#first_name').val();
                var last_name =$('#last_name').val();
                var university_id =$('#university_id').val();
                var department =$('#department_id option:selected').val();
                var designation =$('#designation').val();

                var form_data={
                    _token: "{{ csrf_token() }}",
                    id: id,
                    first_name: first_name,
                    last_name: last_name,
                    university_id: university_id,
                    department: department,
                    designation: designation,
                }

                $.post("{{ route('ajax-post', ['name'=>'update_profile']) }}", form_data, function(res){
                    pop_up_msg(res.msg);

                    $("#demo16").hide();

                    fetch_sub_content(
                        '#load_profile_info',
                        "{{ route('sub-content', ['name'=>'load_profile_info']) }}"
                    );

                }).fail(function(err){

                    pop_up_msg(err_msg(err), 'error');

                });
            });

            $('.change_password').on('click', function(){
                var id =$('#user_id').val();
                var old_password =$('#old_password').val();
                var new_password =$('#new_password').val();
                var new_password_confirmation =$('#new_password_confirmation').val();

                var form_data={
                    _token: "{{ csrf_token() }}",
                    id: id,
                    old_password: old_password,
                    new_password: new_password,
                    new_password_confirmation: new_password_confirmation,
                }

                $.post("{{ route('ajax-post', ['name'=>'teacher_change_password']) }}", form_data, function(res){
                    pop_up_msg(res.msg);

                }).fail(function(err){

                    pop_up_msg(err_msg(err), 'error');

                });
            });

            $('.research_interest').on('click', function(){
                var id =$('#res_user_id').val();
                var research =$('#research').val();

                var form_data={
                    _token: "{{ csrf_token() }}",
                    id: id,
                    research: research,
                }

                $.post("{{ route('ajax-post', ['name'=>'research_interest']) }}", form_data, function(res){
                    pop_up_msg(res.msg);
                    $('#research').val('');
                    fetch_sub_content(
                        '#load_research_interest',
                        "{{ route('sub-content', ['name'=>'load_research_interest']) }}"
                    );

                }).fail(function(err){

                    pop_up_msg(err_msg(err), 'error');

                });
            });


            $('.accept_status_update').on('click', function(){
                var self =$(this);
                var id =self.data('id');

                var form_data={
                    _token :"{{csrf_token()}}",
                    'id':id,
                 }

                swal({
                    title: "Are you sure you want to change status?",
                    text: "Please check before submitting!",
                    type: "warning",
                    showCancelButton: true,
                    confirmButtonClass: "btn-danger",
                    cancelButtonClass: "btn-info",
                    confirmButtonText: "Yes",
                    cancelButtonText: "No",
                    closeOnConfirm: true,
                    closeOnCancel: true
                }, function(isConfirm){

                    if(isConfirm){
                        $.post("{{ route('ajax-post', ['name'=>'accept_status_update']) }}", form_data, function(res){
                            pop_up_msg(res.msg);
                            window.location.reload();

                        }).fail(function(err){

                            pop_up_msg(err_msg(err), 'error');

                        });
                    }
                });
            });


    $('.teacher_is_available').on('click', function(){
        var self =$(this);
        var checked =self.prop("checked");

        var form_data={
            _token :"{{csrf_token()}}",
            'checked':checked,
            }

        swal({
            title: "Are you sure you want to change status?",
            text: "Please check before submitting!",
            type: "warning",
            showCancelButton: true,
            confirmButtonClass: "btn-danger",
            cancelButtonClass: "btn-info",
            confirmButtonText: "Yes",
            cancelButtonText: "No",
            closeOnConfirm: true,
            closeOnCancel: true
        }, function(isConfirm){

            if(isConfirm){
                $.post("{{ route('ajax-post', ['name'=>'teacher_is_available']) }}", form_data, function(res){
                    pop_up_msg(res.msg);
                    window.location.reload();

                }).fail(function(err){

                    pop_up_msg(err_msg(err), 'error');

                });
            }
        });
    });

  });


        // let answer = document.getElementById("interest").contentEditable;
        // document.getElementById("demo").innerHTML = answer;
      </script>


</body>
</html>
