<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <title>Corass -Student Dashboard</title>
    <link rel="icon" href="img/kp.png" type="image/png" />

    <link rel="stylesheet" href="css/bootstrap1.min.css" />

    <link rel="stylesheet" href="vendors/themefy_icon/themify-icons.css" />

    <link rel="stylesheet" href="vendors/niceselect/css/nice-select.css" />

    <link rel="stylesheet" href="vendors/owl_carousel/css/owl.carousel.css" />

    <link rel="stylesheet" href="vendors/gijgo/gijgo.min.css" />

    <link rel="stylesheet" href="vendors/font_awesome/css/all.min.css" />
    <link rel="stylesheet" href="vendors/tagsinput/tagsinput.css" />

    <link rel="stylesheet" href="vendors/datepicker/date-picker.css" />

    <link rel="stylesheet" href="vendors/scroll/scrollable.css" />

    <link rel="stylesheet" href="vendors/datatable/css/jquery.dataTables.min.css" />
    <link rel="stylesheet" href="vendors/datatable/css/responsive.dataTables.min.css" />
    <link rel="stylesheet" href="vendors/datatable/css/buttons.dataTables.min.css" />

    <link rel="stylesheet" href="vendors/text_editor/summernote-bs4.css" />

    <link rel="stylesheet" href="vendors/morris/morris.css">

    <link rel="stylesheet" href="vendors/material_icon/material-icons.css" />

    <link rel="stylesheet" href="css/metisMenu.css">

    <link rel="stylesheet" href="css/style1.css" />
    <link rel="stylesheet" href="css/colors/default.css" id="colorSkinCSS">

    <!-- toastr -->
    <link href="js/toastr.css" rel="stylesheet">
    <style>
        #subscribeModal .modal-content {
            overflow: hidden;
        }

        a.h2 {
            color: #007b5e;
            margin-bottom: 0;
            text-decoration: none;
        }

        #subscribeModal .form-control {
            height: 56px;
            border-top-left-radius: 30px;
            border-bottom-left-radius: 30px;
            padding-left: 30px;
        }

        #subscribeModal .btn {
            border-top-right-radius: 30px;
            border-bottom-right-radius: 30px;
            padding-right: 20px;
            background: #007b5e;
            border-color: #007b5e;
        }

        #subscribeModal .form-control:focus {
            color: #495057;
            background-color: #fff;
            border-color: #007b5e;
            outline: 0;
            box-shadow: none;
        }

        #subscribeModal .top-strip {
            height: 155px;
            background: #007b5e;
            transform: rotate(141deg);
            margin-top: -94px;
            margin-right: 190px;
            margin-left: -130px;
            border-bottom: 65px solid #4CAF50;
            border-top: 10px solid #4caf50;
        }

        #subscribeModal .bottom-strip {
            height: 155px;
            background: #007b5e;
            transform: rotate(112deg);
            margin-top: -110px;
            margin-right: -215px;
            margin-left: 300px;
            border-bottom: 65px solid #4CAF50;
            border-top: 10px solid #4caf50;
        }

        /**************************/
        /****** modal-lg stips *********/
        /**************************/
        #subscribeModal .modal-lg .top-strip {
            height: 155px;
            background: #007b5e;
            transform: rotate(141deg);
            margin-top: -106px;
            margin-right: 457px;
            margin-left: -130px;
            border-bottom: 65px solid #4CAF50;
            border-top: 10px solid #4caf50;
        }

        #subscribeModal .modal-lg .bottom-strip {
            height: 155px;
            background: #007b5e;
            transform: rotate(135deg);
            margin-top: -115px;
            margin-right: -339px;
            margin-left: 421px;
            border-bottom: 65px solid #4CAF50;
            border-top: 10px solid #4caf50;
        }

        /****** extra *******/
        #Reloadpage {
            cursor: pointer;
        }
    </style>
</head>

<body class="crm_body_bg">

    <%- include('../component/student-sidebar.ejs')%>
        <section class="main_content dashboard_part large_header_bg">
            <%- include('../component/student-profile-info.ejs')%>
                <div class="main_content_iner ">
                    <div class="container-fluid p-0 ">
                        <h2>Dashboard</h2>
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="single_element">
                                    <div class="quick_activity">
                                        <div class="row">
                                            <div class="col-lg-6">
                                                <div class="single_quick_activity">
                                                    <div class="row">
                                                        <div class="col-lg-7 col-sm-6 col-md-7">
                                                            <div class="count_content">
                                                                <h6>Congratulations <%= user?.firstname %>
                                                                </h6>
                                                                <p>You have unlock some CORASS
                                                                    features</p>
                                                                <div class="submit_button text-center"
                                                                    style="float: left;">
                                                                    <a href="/payment-history" class="btn_1">View
                                                                        payments</a>
                                                                </div>
                                                                <!-- <img src="img/badge.svg" class="congratulation-medal" alt="Medal Pic"> -->
                                                            </div>
                                                        </div>
                                                        <div class="col-lg-5 col-sm-6 col-md-5">
                                                            <img src="/img/paid.jpg" style="width: 150px;" alt="">
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                            <%if (isReady ){%>
                                                <div class="col-lg-6">
                                                    <div class="single_quick_activity">
                                                        <div class="count_content">
                                                            <h6>Congratulations</h6>
                                                            <p>Your Final project has been approved, please
                                                                print your exit form here</p>

                                                            <div class="submit_button text-center" style="float: left;">
                                                                <a href="/acknownledge" class="btn_1">Exit
                                                                    Form</a>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <%}else{ %>
                                                    <div class="col-lg-6">
                                                        <div class="single_quick_activity">
                                                            <div class="count_content">
                                                                <h6>Topic Submission</h6>
                                                                <p>Proceed to view topic approved topic</p>
                                                                <% if(parseInt(topicApproved)> 0){ %>
                                                                        <h5 class="text text-success">Topic approved </h5>
                                                                    <% } %>
                                                                        <div class="submit_button text-center"
                                                                            style="float: left;">
                                                                            <a href="/topic-submission"
                                                                                class="btn_1">View
                                                                                details</a>
                                                                        </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <%}%>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <h5 class="mt-5">Project Documents Submitted</h5>
                        <p class="mb-2">
                            Summary of uploaded project documents (Proposal, Chapter 1 - 5 etc.)
                        </p>
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="single_element">
                                    <div class="quick_activity">
                                        <div class="row">
                                            <div class="col-lg-3">
                                                <div class="single_quick_activity">
                                                    <div class="count_content">
                                                        <h6>
                                                            <%= allDoc%>
                                                        </h6>
                                                        <p>All Documents</p>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-3">
                                                <div class="single_quick_activity">
                                                    <div class="count_content">
                                                        <h6>
                                                            <%= pendingProj %>
                                                        </h6>
                                                        <p>Pending Approval</p>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-lg-3">
                                                <div class="single_quick_activity">
                                                    <div class="count_content">
                                                        <h6>
                                                            <%= approvedProj %>
                                                        </h6>
                                                        <p>Approved Documents</p>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-3">
                                                <div class="single_quick_activity">
                                                    <div class="count_content">
                                                        <h6>
                                                            <%= rejectedProj %>
                                                        </h6>
                                                        <p>Rejected Documents</p>
                                                    </div>
                                                </div>
                                            </div>


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

                <div class="footer_part">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-lg-12">
                                <footer class="footer footer-light  footer-static">
                                    <p class="clearfix mb-0">
                                        <span
                                            class="float-md-start d-block d-md-inline-block mt-25 text-center">COPYRIGHT
                                            &copy;
                                            <script>document.write(new Date().getFullYear())</script><a class="ms-25"
                                                href="">CORASS</a>,
                                            <span class="d-inline-block">All rights Reserved</span>
                                        </span>
                                        <span class="float-md-end d-block text-center">Centralized Online Research
                                            Assessment and Submission System<i data-feather="file-text"></i></span>
                                    </p>
                                </footer>
                            </div>
                        </div>
                    </div>
                </div>
        </section>

        <div id="back-top" style="display: none;">
            <a title="Go to Top" href="#">
                <i class="ti-angle-up"></i>
            </a>
        </div>

        <script>
            var end = new Date('02/23/2023 11:59 PM');

            var _second = 1000;
            var _minute = _second * 60;
            var _hour = _minute * 60;
            var _day = _hour * 24;
            var timer;

            function showRemaining() {
                var now = new Date();
                var distance = end - now;
                if (distance < 0) {

                    clearInterval(timer);
                    // document.getElementById('countdown').innerHTML = 'EXPIRED!';

                    return;
                }
                var days = Math.floor(distance / _day);
                var hours = Math.floor((distance % _day) / _hour);
                var minutes = Math.floor((distance % _hour) / _minute);
                var seconds = Math.floor((distance % _minute) / _second);

                document.getElementById('day').innerHTML = days;
                document.getElementById('hour').innerHTML = hours;
                document.getElementById('min').innerHTML = minutes;
                document.getElementById('sec').innerHTML = seconds;
            }



            timer = setInterval(showRemaining, 1000);
        </script>

        <script src="js/jquery1-3.4.1.min.js"></script>

        <script src="js/popper1.min.js"></script>

        <script src="js/bootstrap1.min.js"></script>

        <script src="vendors/datatable/js/jquery.dataTables.min.js"></script>
        <script src="vendors/datatable/js/dataTables.responsive.min.js"></script>
        <script src="vendors/datatable/js/dataTables.buttons.min.js"></script>
        <script src="vendors/datatable/js/buttons.flash.min.js"></script>
        <script src="vendors/datatable/js/jszip.min.js"></script>
        <script src="vendors/datatable/js/pdfmake.min.js"></script>
        <script src="vendors/datatable/js/vfs_fonts.js"></script>
        <script src="vendors/datatable/js/buttons.html5.min.js"></script>
        <script src="vendors/datatable/js/buttons.print.min.js"></script>

        <!--Start of Tawk.to Script-->
        <script type="text/javascript">
            var Tawk_API = Tawk_API || {}, Tawk_LoadStart = new Date();
            (function () {
                var s1 = document.createElement("script"), s0 = document.getElementsByTagName("script")[0];
                s1.async = true;
                s1.src = 'https://embed.tawk.to/61c33018c82c976b71c2a947/1fnh77ocr';
                s1.charset = 'UTF-8';
                s1.setAttribute('crossorigin', '*');
                s0.parentNode.insertBefore(s1, s0);
            })();
        </script>
        <!--End of Tawk.to Script-->
        <!-- END: Page JS-->

        <script src="js/custom.js"></script>
        <script src="js/jquery1-3.4.1.min.js"></script>
        <script src="js/toastr.min.js"></script>

        <%if(error){%>
            <input hidden id="errorHandler" value="<%=error.error%>">

            <script>toastr.options.progressBar = true;
                toastr.error(
                    document.getElementById('errorHandler').value,
                    "ERROR", {
                    timeOut: 9000
                }
                );</script>
            <%}%>

                <script>
                    $(window).on('load', function () {
                        setTimeout(function () {
                            $('#subscribeModal').modal('show');
                        }, 1000);
                    });
                    $('#Reloadpage').click(function () {
                        location.reload();
                    }); 
                </script>
</body>

</html>