<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Hrm_Employee_LateTimeSheet, App_Web_fo2mhtxy" uiculture="auto" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl"
    TagPrefix="Date" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl"
    TagPrefix="hims" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="timePicker" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <div class="himsBoxContent">
                            <div class="leftUlMenu">
                                <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="166"
                                    Visible="true" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="TopPanel" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <asp:Label ID="HeaderTextLabel" runat="server" Text="Late Time Sheet List"></asp:Label>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <asp:Panel ID="PanelSearch" runat="server">

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchEmployeeCodeLabel" runat="server" Text="Employee Code"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5 display-flex">
                                            <asp:TextBox ID="SearchEmployeeCodeTextBox" SkinID="CustomWidthTextBox"
                                                runat="server" MaxLength="100" AutoPostBack="true" OnTextChanged="SearchEmployeeCodeTextBox_TextChanged"> </asp:TextBox>
                                            <asp:ImageButton SkinID="FindImage" ToolTip="Search" ID="SearchEmployeeCodeImageButton"
                                                runat="server" OnClick="SearchEmployeeCodeImageButton_Click" ImageUrl="../../../../Images/icons/icon_find.gif" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchEmployeeNameLabel" runat="server" Text="Employee Name"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SearchEmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                SkinID="CustomWidthTextBox" runat="server" MaxLength="100"> </asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3" runat="server" visible="false">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="StatusLabel" runat="server" Text="Status" SkinID="0"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="SearchStatusDropDownList" runat="server" Class="form-control" AutoPostBack="false">
                                                <asp:ListItem Text="- ALL -" Value="0"></asp:ListItem>
                                                <asp:ListItem Text="Less Hours" Value="LH"></asp:ListItem>
                                                <asp:ListItem Text="Half Day" Value="HD"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchFromDateLabel" runat="server" Text="From Date" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="SearchFromDatePickerControl"
                                                runat="server" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchToDateLabel3" runat="server" Text="To Date" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <Date:DatePickerControl DisplayDatePicker="true" ID="SearchToDatePickerControl"
                                                runat="server" />
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="fLeft pTop5">
                                            <asp:CheckBox ID="IsRemarkCheckBox" runat="server" Text="Remark" Checked="true" />
                                        </div>
                                    </div>

                                    <div class="alignCenter pTop5 col-md-12">
                                        <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" SkinID="0" CssClass="btn-search btn fas" OnClick="SearchButton_Click" />
                                        <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" OnClick="ResetButton_Click" SkinID="0" CssClass="btn-reset btn fas" />
                                    </div>
                                    <br />
                                </asp:Panel>
                                <div id="LateTimeSheetListDiv" runat="server" visible="false">
                                    <div class="cBoth"></div>
                                    <br />

                                    <div class="col-md-12">
                                        <div class="alert alert-info">
                                            <i class="material-icons pos-rel">info</i> |
                                            <asp:Label ID="NoteLabel" runat="server" Text="<b>Note : </b>Early Leave allowed only for office work. |  <b>A : </b>Absent, <b>EL : </b>Early Leave, <b>L : </b>Late, <b>V : </b>Valid" ForeColor="Red"></asp:Label><br />
                                            <%--<i class="material-icons pos-rel">info</i> | <asp:Label ID="StatusWordLabel" runat="server" Text="<b>A : </b>Absent, <b>EL : </b>Early Leave, <b>L : </b>Late, <b>V : </b>Valid"></asp:Label><br />--%>
                                        </div>
                                    </div>
                                    <div class="cBoth"></div>
                                    <br />
                                    <div class="himssuHeader7WireBox col-md-12 table-responsive" id="PatientRelationDiv"
                                        runat="server">
                                        <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                            <ContentTemplate>
                                                <asp:GridView ID="LateTimeSheetGridView" OnRowDataBound="LateTimeSheetGridView_RowDataBound"
                                                    runat="server" AutoGenerateColumns="False" AllowPaging="false"
                                                    PagerSettings-Visible="false" EmptyDataText="No records available for the search criteria"
                                                    ShowHeader="True" CssClass="table table-striped table-bordered table-hover" DataKeyNames="EmployeeId,EmployeeLateStatusId,StatusId,EarlyHrs">
                                                    <Columns>
                                                        <asp:BoundField HeaderText="Date" DataField="Attn_Date" DataFormatString="{0:dd/MM/yyyy}"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="10%" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Code" DataField="Code" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="10%" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Name" DataField="Name" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="10%" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="First In" DataField="FirstIn" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="5%" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Last Out" DataField="LastOut" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="5%" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Duration" DataField="Duration" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="5%" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Present Status" DataField="PresentStatus1" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="5%" />
                                                        </asp:BoundField>
                                                        <asp:TemplateField HeaderText="Early Leave Remark" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="20%"
                                                            ItemStyle-Wrap="true">
                                                            <ItemStyle HorizontalAlign="Left" />
                                                            <ItemTemplate>
                                                                <asp:Label ID="EarlyLeaveRemarkLabel" runat="server" Text='<%#Eval("EarlyLeaveRemark")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="Field Hours" DataField="FieldHrs" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="5%" />
                                                        </asp:BoundField>

                                                        <asp:TemplateField ItemStyle-Wrap="true" ItemStyle-Width="5%">
                                                            <HeaderTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="HeaderApproveCheckBox" runat="server" OnCheckedChanged="HeaderApproveCheckBox_OnCheckedChanged" AutoPostBack="true" />
                                                                    <span></span>
                                                                </label>
                                                                <br />
                                                                <asp:Button ID="ApproveApplyButton" runat="server" Text="Approve" class="fas btn btn-save " OnClick="ApproveApplyButton_Click" />
                                                            </HeaderTemplate>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="ApproveCheckBox" runat="server" Enabled="false" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField ItemStyle-Wrap="true" ItemStyle-Width="5%">
                                                            <HeaderTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="HeaderRejecteCheckBox" runat="server" OnCheckedChanged="HeaderRejecteCheckBox_OnCheckedChanged" AutoPostBack="true" />
                                                                    <span></span>
                                                                </label>
                                                                <br />
                                                                <asp:Button ID="RejecteApplyButton" runat="server" Text="Reject" class="fas btn btn-edit " OnClick="RejecteApplyButton_Click" />
                                                            </HeaderTemplate>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="RejecteCheckBox" runat="server" Enabled="false" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Approve" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="ApproveButton" SkinID="CustomWidthLabel" runat="server"
                                                                    Text="Approve" OnClick="ApproveButton_Click" Enabled="false"></asp:LinkButton>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Reject" ItemStyle-Width="05%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="RejecteButton" SkinID="CustomWidthLabel" runat="server"
                                                                    Text="Reject" OnClick="RejecteButton_Click" Enabled="false"></asp:LinkButton>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Status" ItemStyle-Width="5%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="StatusLabel" runat="server" Text='<%#Eval("Status")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>

                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/late-time-sheet")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
