#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Disco.Web.Views.Job
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Text;
    using System.Web;
    using System.Web.Helpers;
    using System.Web.Mvc;
    using System.Web.Mvc.Ajax;
    using System.Web.Mvc.Html;
    using System.Web.Routing;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.WebPages;
    using Disco;
    using Disco.Models.Repository;
    using Disco.Services;
    using Disco.Services.Authorization;
    using Disco.Services.Web;
    using Disco.Web;
    using Disco.Web.Extensions;
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
    [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Index.cshtml")]
    public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.IndexModel>
    {
        public Index()
        {
        }
        public override void Execute()
        {
            
            #line 2 "..\..\Views\Job\Index.cshtml"
  
    ViewBag.Title = "Jobs";

    if (Authorization.Has(Claims.Job.ShowDailyChart))
    {
        Html.BundleDeferred("~/ClientScripts/Modules/Highcharts");
    }

            
            #line default
            #line hidden
WriteLiteral("\r\n<div");

WriteLiteral(" class=\"clearfix columnHost\"");

WriteLiteral(">\r\n");

            
            #line 11 "..\..\Views\Job\Index.cshtml"
    
            
            #line default
            #line hidden
            
            #line 11 "..\..\Views\Job\Index.cshtml"
     if (Authorization.Has(Claims.Job.Search))
    {

            
            #line default
            #line hidden
WriteLiteral("        <div");

WriteLiteral(" class=\"column50\"");

WriteLiteral(">\r\n            <h2>Search Jobs</h2>\r\n");

WriteLiteral("            ");

            
            #line 15 "..\..\Views\Job\Index.cshtml"
       Write(Html.Partial(MVC.Shared.Views._SearchDialog, "jobs"));

            
            #line default
            #line hidden
WriteLiteral("\r\n        </div>\r\n");

            
            #line 17 "..\..\Views\Job\Index.cshtml"
    }

            
            #line default
            #line hidden
WriteLiteral("    ");

            
            #line 18 "..\..\Views\Job\Index.cshtml"
     if (Authorization.Has(Claims.Job.ShowDailyChart))
    {

            
            #line default
            #line hidden
WriteLiteral("        <div");

WriteLiteral(" class=\"column50\"");

WriteLiteral(">\r\n            <h2>Daily Opened &amp; Closed Jobs</h2>\r\n            <div");

WriteLiteral(" id=\"chartHostJobDailyOpenedClosed\"");

WriteLiteral(" style=\"height: 175px;\"");

WriteLiteral(">\r\n            </div>\r\n");

            
            #line 24 "..\..\Views\Job\Index.cshtml"
            
            
            #line default
            #line hidden
            
            #line 24 "..\..\Views\Job\Index.cshtml"
              
                var jsonData = new HtmlString(Json.Encode(Model.DailyOpenedClosedStatistics));
            
            
            #line default
            #line hidden
WriteLiteral("\r\n            <script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(">\r\n                (function () {\r\n                    var chartData;\r\n\r\n        " +
"            function buildChart() {\r\n                        $(function () {\r\n\r\n" +
"                            var data = chartData;\r\n\r\n                           " +
" var dataTotalOpenJobs = [];\r\n                            var dataOpenedJobs = [" +
"];\r\n                            var dataClosedJobs = [];\r\n                      " +
"      for (var i = 0; i < data.length; i++) {\r\n                                v" +
"ar dataItem = data[i];\r\n                                var dataItemDate = new D" +
"ate(parseInt(dataItem.Timestamp.substr(6, dataItem.Timestamp.length - 8))).getTi" +
"me(); // $.datepicker.parseDate(\'yy-mm-dd\', dataItem.Timestamp.substr(0, 10)).ge" +
"tTime();\r\n                                dataTotalOpenJobs.push([dataItemDate, " +
"dataItem.TotalJobs]);\r\n                                dataOpenedJobs.push([data" +
"ItemDate, dataItem.OpenedJobs]);\r\n                                dataClosedJobs" +
".push([dataItemDate, dataItem.ClosedJobs]);\r\n                            }\r\n    " +
"                        Highcharts.setOptions({\r\n                               " +
" global: {\r\n                                    useUTC: false\r\n                 " +
"               }\r\n                            });\r\n                            n" +
"ew Highcharts.Chart({\r\n                                chart: {\r\n               " +
"                     renderTo: \'chartHostJobDailyOpenedClosed\',\r\n               " +
"                     height: 175,\r\n                                    animation" +
": false,\r\n                                    style: {\r\n                        " +
"                fontFamily: \'\"Segoe UI\", Arial, Verdana, Tahoma, sans-serif\'\r\n  " +
"                                  }\r\n                                },\r\n       " +
"                         colors: [\'#BBBBBB\', \'#005fab\', \'#60ab1e\'],\r\n           " +
"                     title: {\r\n                                    text: null\r\n " +
"                               },\r\n                                plotOptions: " +
"{\r\n                                    series: {\r\n                              " +
"          marker: {\r\n                                            radius: 3\r\n    " +
"                                    },\r\n                                        " +
"animation: false\r\n                                    }\r\n                       " +
"         },\r\n                                legend: {\r\n                        " +
"            align: \'left\',\r\n                                    verticalAlign: \'" +
"top\',\r\n                                    y: 0,\r\n                              " +
"      floating: true,\r\n                                    borderWidth: 0,\r\n    " +
"                                itemStyle: {\r\n                                  " +
"      color: \'#333\',\r\n                                        fontWeight: \'norma" +
"l\'\r\n                                    }\r\n                                },\r\n " +
"                               xAxis: {\r\n                                    typ" +
"e: \'datetime\',\r\n                                    tickInterval: 7 * 24 * 3600 " +
"* 1000, // week\r\n                                    tickWidth: 1,\r\n            " +
"                        gridLineWidth: 1,\r\n                                    d" +
"ateTimeLabelFormats: {\r\n                                        week: \'%e %b\'\r\n " +
"                                   }\r\n                                },\r\n      " +
"                          yAxis: [{\r\n                                    title: " +
"{\r\n                                        text: null\r\n                         " +
"           },\r\n                                    labels: {\r\n                  " +
"                      enabled: false\r\n                                    },\r\n  " +
"                                  min: 0\r\n                                }, {\r\n" +
"                                    title: {\r\n                                  " +
"      text: null\r\n                                    },\r\n                      " +
"              labels: {\r\n                                        enabled: false\r" +
"\n                                    },\r\n                                    min" +
": 0\r\n                                }],\r\n                                series" +
": [{\r\n                                    name: \'Total Open Jobs\',\r\n            " +
"                        data: dataTotalOpenJobs,\r\n                              " +
"      yAxis: 1\r\n                                }, {\r\n                          " +
"          name: \'Closed Jobs\',\r\n                                    data: dataCl" +
"osedJobs\r\n                                }, {\r\n                                " +
"    name: \'Opened Jobs\',\r\n                                    data: dataOpenedJo" +
"bs\r\n                                }],\r\n                                credits" +
": {\r\n                                    enabled: false\r\n                       " +
"         }\r\n                            });\r\n                        });\r\n      " +
"              }\r\n                    chartData = $.parseJSON(\'");

            
            #line 126 "..\..\Views\Job\Index.cshtml"
                                         Write(jsonData);

            
            #line default
            #line hidden
WriteLiteral("\');\r\n                    buildChart();\r\n                }());\r\n\r\n            </sc" +
"ript>\r\n        </div>\r\n");

            
            #line 132 "..\..\Views\Job\Index.cshtml"
    }

            
            #line default
            #line hidden
WriteLiteral("</div>\r\n");

            
            #line 134 "..\..\Views\Job\Index.cshtml"
 if (Authorization.Has(Claims.Job.Lists.MyJobs))
{

            
            #line default
            #line hidden
WriteLiteral("    <div");

WriteLiteral(" id=\"Jobs_Index_MyJobs\"");

WriteLiteral(">\r\n        <h2>My Jobs (");

            
            #line 137 "..\..\Views\Job\Index.cshtml"
                Write(Model.MyJobs.Items.Count());

            
            #line default
            #line hidden
WriteLiteral(")</h2>\r\n");

WriteLiteral("        ");

            
            #line 138 "..\..\Views\Job\Index.cshtml"
   Write(Html.Partial(MVC.Shared.Views._JobTable, Model.MyJobs, new ViewDataDictionary()));

            
            #line default
            #line hidden
WriteLiteral("\r\n    </div>\r\n");

            
            #line 140 "..\..\Views\Job\Index.cshtml"
}

            
            #line default
            #line hidden
            
            #line 141 "..\..\Views\Job\Index.cshtml"
 if (Authorization.Has(Claims.Job.Lists.StaleJobs))
{

            
            #line default
            #line hidden
WriteLiteral("    <div");

WriteLiteral(" id=\"Jobs_Index_StaleJobs\"");

WriteLiteral(">\r\n        <h2>Stale Jobs (");

            
            #line 144 "..\..\Views\Job\Index.cshtml"
                   Write(Model.StaleJobs.Items.Count());

            
            #line default
            #line hidden
WriteLiteral(")</h2>\r\n");

WriteLiteral("        ");

            
            #line 145 "..\..\Views\Job\Index.cshtml"
   Write(Html.Partial(MVC.Shared.Views._JobTable, Model.StaleJobs, new ViewDataDictionary()));

            
            #line default
            #line hidden
WriteLiteral("\r\n    </div>\r\n");

            
            #line 147 "..\..\Views\Job\Index.cshtml"
}

            
            #line default
            #line hidden
            
            #line 148 "..\..\Views\Job\Index.cshtml"
 if (Authorization.Has(Claims.Job.Actions.Export))
{

            
            #line default
            #line hidden
WriteLiteral("    <div");

WriteLiteral(" class=\"actionBar\"");

WriteLiteral(">\r\n");

WriteLiteral("        ");

            
            #line 151 "..\..\Views\Job\Index.cshtml"
   Write(Html.ActionLinkButton("Export Jobs", MVC.Job.Export()));

            
            #line default
            #line hidden
WriteLiteral("\r\n    </div>\r\n");

            
            #line 153 "..\..\Views\Job\Index.cshtml"
}

            
            #line default
            #line hidden
            
            #line 154 "..\..\Views\Job\Index.cshtml"
 if (Model.PendingEnrolments != null && Model.PendingEnrolments.Count > 0 && Authorization.Has(Claims.Device.Actions.EnrolDevices))
{

            
            #line default
            #line hidden
WriteLiteral("    <div");

WriteLiteral(" id=\"pendingEnrolments\"");

WriteLiteral(">\r\n        <i");

WriteLiteral(" class=\"fa fa-exclamation-circle info\"");

WriteLiteral("></i>\r\n        <div>There are device enrolments pending approval.</div>\r\n        " +
"<a");

WriteAttribute("href", Tuple.Create(" href=\"", 6926), Tuple.Create("\"", 6975)
            
            #line 159 "..\..\Views\Job\Index.cshtml"
, Tuple.Create(Tuple.Create("", 6933), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Enrolment.Status())
            
            #line default
            #line hidden
, 6933), false)
);

WriteLiteral(" class=\"button small alert\"");

WriteLiteral(" target=\"_blank\"");

WriteLiteral(">View Enrolments</a>\r\n    </div>\r\n");

WriteLiteral("    <script>\r\n        $(function () {\r\n            var layout_PageHeading = $(\'#l" +
"ayout_PageHeading\').height(80);\r\n            $(\'#pendingEnrolments\')\r\n          " +
"      .detach()\r\n                .appendTo(layout_PageHeading);\r\n        });\r\n  " +
"  </script>\r\n");

            
            #line 169 "..\..\Views\Job\Index.cshtml"
}
            
            #line default
            #line hidden
        }
    }
}
#pragma warning restore 1591
