@model ManualReportEntries

@{
    ViewData["Title"] = "Edit Daily Passdown | Mesa Reporting Services";
}

<div aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li>
        <li class="breadcrumb-item"><a asp-area="" asp-controller="ProductionReport" asp-action="Index">Production Reports</a></li>
        <li class="breadcrumb-item active" aria-current="page">Edit Passdown</li>
    </ol>
</div>
<br />

<div class="container">

    <h1 class="text-center">Edit Daily Targets</h1>

    <form method="post" action="EditDailyReport">
        <div class="row" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-6">
                <h6 style="padding-top: 10px;">Operator Headcount:</h6>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="OperatorHeadcountDays" name="OperatorHeadcountDays">
                    @for (int i = 0; i <= 15; i++)
                    {
                        <option selected="@(i == Model.OperatorHeadcountDays)">@i</option>
                    }
                </select>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="OperatorHeadcountNights" name="OperatorHeadcountNights">
                    @for (int i = 0; i <= 15; i++)
                    {
                        <option selected="@(i == Model.OperatorHeadcountNights)">@i</option>
                    }
                </select>
            </div>
        </div>
        <div class="row" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-6">
                <h6 style="padding-top: 10px;">Total Call Outs (Operators):</h6>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="OperatorCallOutsDays" name="OperatorCallOutsDays">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.OperatorCallOutsDays)">@i</option>
                    }
                </select>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="OperatorCallOutsNights" name="OperatorCallOutsNights">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.OperatorCallOutsNights)">@i</option>
                    }
                </select>
            </div>
        </div>
        <div class="row" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-6">
                <h6 style="padding-top: 10px;">Engineering Headcount:</h6>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="EngineeringHeadcountDays" name="EngineeringHeadcountDays">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.EngineeringHeadcountDays)">@i</option>
                    }
                </select>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="EngineeringHeadcountNights" name="EngineeringHeadcountNights">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.EngineeringHeadcountNights)">@i</option>
                    }
                </select>
            </div>
        </div>
        <div class="row" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-6">
                <h6 style="padding-top: 10px;">Total Call Outs (Engineers):</h6>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="EngineerCallOutsDays" name="EngineeringCallOutsDays">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.EngineeringCallOutsDays)">@i</option>
                    }
                </select>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="EngineerCallOutsNights" name="EngineeringCallOutsNights">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.EngineeringCallOutsNights)">@i</option>
                    }
                </select>
            </div>
        </div>
        <div class="row" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-6">
                <h6 style="padding-top: 10px;">Maintenance Headcount:</h6>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="MaintenanceHeadcountDays" name="MaintenanceHeadcountDays">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.MaintenanceHeadcountDays)">@i</option>
                    }
                </select>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="MaintenanceHeadcountNights" name="MaintenanceHeadcountNights">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.MaintenanceHeadcountNights)">@i</option>
                    }
                </select>
            </div>
        </div>
        <div class="row" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-6">
                <h6 style="padding-top: 10px;">Total Call Outs (Maintenance):</h6>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="MaintenanceCallOutsDays" name="MaintenanceCallOutsDays">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.MaintenanceCallOutsDays)">@i</option>
                    }
                </select>
            </div>
            <div class="col-lg-2 col-3">
                <select class="form-control" id="MaintenanceCallOutsNights" name="MaintenanceCallOutsNights">
                    @for (int i = 0; i <= 5; i++)
                    {
                        <option selected="@(i == Model.MaintenanceCallOutsNights)">@i</option>
                    }
                </select>
            </div>
        </div>
        <br /><br />
        <div id="bottleChanges" class="row myMultiselect" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-md-4">
                <h6>Bottle Changes:</h6>
            </div>
            <div class="form-group col-lg-4 col-md-5">
                <div class="mySelectLabel selectBox" onclick="toggleCheckboxArea()">
                    <select class="form-select" name="BottleChanges">
                        <option>somevalue</option>
                    </select>
                    <div class="overSelect"></div>
                </div>
                <div class="mySelectOptions">
                    @for (int i = 20; i < 80; i++)
                    {
                        string isMatching = "";
                        string[] bottleChanges = Model.BottleChanges.Split(',');

                        for (int j = 0; j < bottleChanges.Length; j++)
                        {
                            if (bottleChanges[j] == "R" + i)
                                isMatching = "checked";
                        }

                        <label><input type="checkbox" onchange="checkboxStatusChange()" value="@("R" + i)" @isMatching />@(" R" + i)</label>
                    }
                </div>
            </div>
            <div class="col-lg-2 col-md-3">
                <button class="btn btn-info" type="button" onclick="clearList()">Clear List</button>
            </div>
        </div>
        <div id="dailyPartChanges" class="row myMultiselect" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-md-4">
                <h6>Daily Part Changes:</h6>
            </div>
            <div class="form-group col-lg-4 col-md-5">
                <div class="mySelectLabel selectBox" onclick="toggleCheckboxArea()">
                    <select class="form-select" name="DailyPartChanges">
                        <option>somevalue</option>
                    </select>
                    <div class="overSelect"></div>
                </div>
                <div class="mySelectOptions">
                    @for (int i = 20; i < 80; i++)
                    {
                        string isMatching = "";
                        string[] dailyPartChanges = Model.DailyPartChanges.Split(',');

                        for (int j = 0; j < dailyPartChanges.Length; j++)
                        {
                            if (dailyPartChanges[j] == "R" + i)
                                isMatching = "checked";
                        }

                        <label><input type="checkbox" onchange="checkboxStatusChange()" value="@("R" + i)" @isMatching />@(" R" + i)</label>
                    }
                </div>
            </div>
            <div class="col-lg-2 col-md-3">
                <button class="btn btn-info" type="button" onclick="clearList()">Clear List</button>
            </div>
        </div>
        <div id="weeklyPartChanges" class="row myMultiselect" style="padding-top: 5px; padding-bottom: 5px;">
            <div class="col-lg-3 col-md-4">
                <h6>Weekly Part Changes:</h6>
            </div>
            <div class="form-group col-lg-4 col-md-5">
                <div class="mySelectLabel selectBox" onclick="toggleCheckboxArea()">
                    <select class="form-select" name="WeeklyPartChanges">
                        <option>somevalue</option>
                    </select>
                    <div class="overSelect"></div>
                </div>
                <div class="mySelectOptions">
                    @for (int i = 20; i < 80; i++)
                    {
                        string isMatching = "";
                        string[] weeklyPartChanges = Model.WeeklyPartChanges.Split(',');

                        for (int j = 0; j < weeklyPartChanges.Length; j++)
                        {
                            if (weeklyPartChanges[j] == "R" + i)
                                isMatching = "checked";
                        }

                        <label><input type="checkbox" onchange="checkboxStatusChange()" value="@("R" + i)" @isMatching />@(" R" + i)</label>
                    }
                </div>
            </div>
            <div class="col-lg-2 col-md-3">
                <button class="btn btn-info" type="button" onclick="clearList()">Clear List</button>
            </div>
        </div>
        <button type="submit" value="Submit" class="btn btn-light" style="margin-top: 5px;">Submit</button>
    </form>

</div>