<%- include('../Includes/begin.ejs') %>
<%- include('../Includes/staff_nav.ejs') %>


<section id="content-wrapper">
    <main role="main" class="pt-5 main">

        <div class="main-content">
            <div class="header pb-4 pb-sm-8 pt-5 pt-lg-8 d-flex align-items-center"
                style="height: 100px; background-size: cover; background-position: center top;">
            </div>
            <div class="container-fluid mt--7">
                <div class="row">
                    <div class="col-xl-12 order-xl-1">
                        <div class="card bg-secondary shadow">
                            <div class="card-header bg-white border-0">
                                <div class="row align-items-center">
                                    <div class="col-8">
                                        <h3 class="mb-0">My account</h3>
                                    </div>
                                    <div class="col-4 text-right">
                                        <a href="/staff/settings" class="btn btn-sm btn-primary">Settings</a>
                                    </div>
                                </div>
                            </div>
                            <div class="card-body">

                                <h6 class="heading-small text-muted mb-4">User information</h6>
                                <div class="pl-lg-4">
                                    <div class="row">
                                        <div class="col-lg-6">
                                            <div class="form-group">
                                                <label class="form-control-label" for="input-name">Name</label>
                                                <div class="card form-control form-control-alternative">
                                                    <p>
                                                        <%= user.st_name %>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-6">
                                            <div class="form-group focused">
                                                <label class="form-control-label" for="input-gender">Gender</label>
                                                <div class="card form-control form-control-alternative">
                                                    <p>
                                                        <%= user.gender %>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-lg-6">
                                            <div class="form-group">
                                                <label class="form-control-label" for="input-email">Email
                                                    address</label>
                                                <div class="card form-control form-control-alternative">
                                                    <p>
                                                        <%= user.email %>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-6">
                                            <div class="form-group focused">
                                                <label class="form-control-label" for="input-dob">Date of
                                                    Birth</label>
                                                <div class="card form-control form-control-alternative">
                                                    <p>
                                                        <%= userDOB %>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <hr class="my-4">
                                <!-- Address -->
                                <h6 class="heading-small text-muted mb-4">Contact information</h6>
                                <div class="pl-lg-4">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group focused">
                                                <label class="form-control-label">Address</label>
                                                <div class="card form-control form-control-alternative">
                                                    <p>
                                                        <%= user.st_address %>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-lg-4">
                                            <div class="form-group focused">
                                                <label class="form-control-label" for="input-country">Country</label>
                                                <div class="card form-control form-control-alternative">
                                                    <p>Nepal</p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-4">
                                            <div class="form-group focused">
                                                <label class="form-control-label" for="input-contact">Contact</label>
                                                <div class="card form-control form-control-alternative">
                                                    <p>
                                                        <%= user.contact %>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                </div>
                                <hr class="my-4">
                                <h6 class="heading-small text-muted mb-4">Responsibilities</h6>
                                <div class="pl-lg-4">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group focused">
                                                <label class="form-control-label">Department</label>
                                                <div class="card form-control form-control-alternative">
                                                    <p><%= deptData[0].d_name %></p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group focused">
                                                <label class="form-control-label">Class Information</label>
                                                <div class="table-responsive">
                                                    <table class="table">
                                                        <thead class="thead-dark">
                                                            <tr>
                                                                <th scope="col">#</th>
                                                                <th scope="col">COURSE</th>
                                                                <th scope="col">SEMESTER</th>
                                                                <th scope="col">SECTION</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <% for(let i=0; i < classData.length; i++) { %>
                                                            <tr>
                                                                <th scope="row">
                                                                    <%= i + 1 %>
                                                                </th>
                                                                <td>
                                                                    <%= classData[i].name %> (<%= classData[i].c_id %>)
                                                                </td>
                                                                <td>
                                                                    <%= classData[i].semester %>
                                                                </td>
                                                                <td>
                                                                    <%= user.dept_id %>-<%= classData[i].section %>
                                                                </td>

                                                            </tr>
                                                            <% } %>
                                                        </tbody>

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


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




    </main>
</section>


<%- include('../Includes/staff_end.ejs') %>