<!--
TemplateName:Admin
-->
<!DOCTYPE html>
<html>
<head>
	<title>AutoTardy Kiosk Overrides</title>
<!-- required scripts -->
	~[wc:commonscripts] 
<!-- Required style sheets: screen.css, and print.css --> 
	<link href="/images/css/screen.css" rel="stylesheet" media="screen">
	<link href="/images/css/print.css" rel="stylesheet" media="print">
    <style>
        #studentIdentifier:focus {
            background-color: #ccffcc;
        }

        input[type=text]:blur {
            background-color: white;
        }

        .idMErrorResolution td:first-child {
            text-align: center;
        }

        .idm_strike {
            text-decoration: line-through;
        }
    </style>
</head> 
<body> 
	~[wc:admin_header_css] 
    <!-- breadcrumb start --><a href="/admin/home.html" target="_top">~[text:psx.html.admin_attendance_functions.attendancestatus.start_page]</a> > <a href="/admin/attendance/functions/attendancestatus.html" target="_top">~[text:psx.html.admin_attendance_functions.attendancestatus.attendance1]</a> > AutoTardy Kiosk Overrides<!-- breadcrumb end --> 
    <!-- start of main menu and content --> 
	~[wc:admin_navigation_css] 
    <!-- Start of Page -->
    <p style="float:right; margin:25px 20px;"><a href="https://www.identimetrics.net" target="_blank"><img src="/images/img/identimetrics-wordmark.svg" style="height:2em;"></a></p>	<h1>AutoTardy Kiosk Overrides</h1> 
    <!-- start of content area --> 
    <div data-require-path="components/identimetricsFOTM/index" data-module-name="identimetricsFOTM" data-ng-controller="fotm" data-ng-cloak>
        <div>
            <div class="button-row" data-ng-if="devMode">
                <button type="button" id="logScope" name="logScope" data-ng-click="logScope()">logScope</button>
            </div>
            <table style="width:min-content;">
                <tr>
                    <td class="bold">Date:</td>
                    <td style="white-space:nowrap;">
                        <input type="text" class="psDateWidget" data-ng-model="ctrlData.reportControls.dateStart">
                    </td>
                </tr>
            </table>
            <div class="box-round">
                <div
                    data-pss-grid-widget
                    data-data="ctrlData.kioskPredictions"
                    data-filtered-data="ctrlData.filteredPredictions"
                    data-pss-message-prefixes="psx.htmlc.idm"
                    data-client-side-pagination="true"
                    data-custom-pre-filter-function="kioskService.testValidateAll"
                >
                    <div>
                        <div data-ng-show="ctrlData.loadingKiosk">
                            <i class="fa fa-spinner fa-spin"></i>
                        </div>
                        <table class="grid" data-ng-show="!ctrlData.loadingKiosk">
                            <thead>
                                <tr>
                                    <th data-pss-sort-fields="lastfirst">Student</th>
                                    <th data-pss-sort-fields="schoolid" data-ng-if="'~(curschoolid)' == '0'">School</th>
                                    <th data-pss-sort-fields="studentIdentifier">Scan ID</th>
                                    <th>Default</th>
                                    <th>Override</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr data-ng-repeat="kioskEntry in ctrlData.filteredPredictions">
                                    <td>{{kioskEntry.lastfirst}} <span data-ng-show="kioskEntry.loading"><i class="fa fa-spinner fa-spin"></i></span></td>
                                    <td data-ng-show="'~(curschoolid)' == '0'">
                                        {{ctrlData.map.schoolsInverted[kioskEntry.schoolid]}}
                                    </td>
                                    <td>{{kioskEntry.studentIdentifier}}</td>
                                    <td data-ng-class="{'idm_strike': kioskEntry.dateStartOverride}">
                                        {{ctrlData.map.scanResultsInverted[kioskEntry.kioskResult]}}
                                    </td>
                                    <td>
                                        {{ctrlData.map.scanResultsInverted[kioskEntry.resultOverride]}}
                                        <span data-ng-if="kioskEntry.dateStartOverride">
                                            ({{kioskEntry.dateStartOverride|date}}
                                            <span data-ng-if="kioskEntry.dateStartOverride != kioskEntry.dateEndOverride"> - {{kioskEntry.dateEndOverride|date}}</span>
                                            )
                                        </span>
                                        <span data-ng-if="kioskEntry.notesOverride"><br>{{kioskEntry.notesOverride}}</span>
                                    </td>
                                    <td>
                                        <button type="button" data-ng-click="kioskService.createOverride([kioskEntry])">Manual Override</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <!--<label data-pss-filter-field="scanTime|time" data-default-filter="fixed" data-exclude-comparators="lt,lte,gt,gte">Scan Time</label>-->
                        <label data-pss-filter-field="kioskResult|multiselect-dropdown" data-filter-info="ctrlData.map.scanResults" data-default-filter="fixed">Default Scan Result</label>
                        <label data-pss-filter-field="resultOverride|multiselect-dropdown" data-filter-info="ctrlData.map.overrideResults" data-default-filter="fixed">Overridden Scan Result</label>
                    </div>
                </div>
            </div>

            <div class="hide" id="idMFOTMDialogHolder">
                <div id="idMKioskManualDialog">
                    <table class="grid">
                        <tr>
                            <th>Date Start</th>
                            <td>
                                <input type="text" class="psDateWidget" data-ng-model="ctrlData.currentOverride.dateStartOverride">
                            </td>
                        </tr>
                        <tr>
                            <th>Date End</th>
                            <td>
                                <input type="text" class="psDateWidget" data-ng-model="ctrlData.currentOverride.dateEndOverride">
                            </td>
                        </tr>
                        <tr>
                            <th>Override Result</th>
                            <td>
                                <select data-ng-model="ctrlData.currentOverride.resultOverride">
                                    <option value="">Please Select</option>
                                    <option value="1">Allowed</option>
                                    <!--<option value="0">Warning</option>-->
                                    <option value="-1">Denied - No Student Found</option>
                                    <option value="-2">Denied - Different School</option>
                                    <option value="-3">Denied - Attendance</option>
                                    <option value="-4">Denied - Enrollment</option>
                                    <option value="-5">Denied - No Membership</option>
                                    <option value="-6">Denied - Repeated Scan</option>
                                    <option value="-100">Denied - Other</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th>Notes</th>
                            <td>
                                <textarea cols="50" rows="5" data-ng-model="ctrlData.currentOverride.notesOverride"></textarea>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div> 
    </div>
    ~[wc:idM_FOTM_args]
    <!-- end of content area --> 
	~[wc:admin_footer_css] 
    ~[wc:idM_AutoTardy_auth]
</body> 
</html>