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

namespace Disco.Web.Views.Job.JobParts
{
    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.BI.Extensions;
    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/JobParts/Repairs.cshtml")]
    public partial class Repairs : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
    {
        public Repairs()
        {
        }
        public override void Execute()
        {
            
            #line 2 "..\..\Views\Job\JobParts\Repairs.cshtml"
  
    Authorization.Require(Claims.Job.ShowNonWarrantyFinance);

    Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");

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

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

WriteLiteral(">\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Repairer Name\r\n        </th>\r\n        <td>\r\n");

            
            #line 12 "..\..\Views\Job\JobParts\Repairs.cshtml"
            
            
            #line default
            #line hidden
            
            #line 12 "..\..\Views\Job\JobParts\Repairs.cshtml"
             if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerName))
            {
                
            
            #line default
            #line hidden
            
            #line 14 "..\..\Views\Job\JobParts\Repairs.cshtml"
           Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName));

            
            #line default
            #line hidden
            
            #line 14 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                                                           
                
            
            #line default
            #line hidden
            
            #line 15 "..\..\Views\Job\JobParts\Repairs.cshtml"
           Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
            
            #line 15 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                       
                
            
            #line default
            #line hidden
            
            #line 16 "..\..\Views\Job\JobParts\Repairs.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
            
            #line 16 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                         

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

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

WriteLiteral(@">
                    $(function () {
                        document.DiscoFunctions.PropertyChangeHelper(
                                $('#Job_JobMetaNonWarranty_RepairerName'),
                                'Unknown',
                                '");

            
            #line 22 "..\..\Views\Job\JobParts\Repairs.cshtml"
                            Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            \'RepairerName\'\r\n                        );\r\n     " +
"               });\r\n                </script>\r\n");

            
            #line 27 "..\..\Views\Job\JobParts\Repairs.cshtml"
            }
            else
            {
                if (string.IsNullOrWhiteSpace(Model.Job.JobMetaNonWarranty.RepairerName))
                {
            
            #line default
            #line hidden
WriteLiteral("<span");

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

WriteLiteral(">&lt;Unknown/None&gt;</span>");

            
            #line 31 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                                                       }
                else
                {
            
            #line default
            #line hidden
            
            #line 33 "..\..\Views\Job\JobParts\Repairs.cshtml"
            Write(Model.Job.JobMetaNonWarranty.RepairerName);

            
            #line default
            #line hidden
            
            #line 33 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                                           }
            }

            
            #line default
            #line hidden
WriteLiteral("        </td>\r\n    </tr>\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Repair Logged\r\n        </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 41 "..\..\Views\Job\JobParts\Repairs.cshtml"
       Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.RepairerLoggedDate, "Not Logged", "Job_JobMetaNonWarranty_RepairerLoggedDate"));

            
            #line default
            #line hidden
WriteLiteral("\r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Repair Reference\r\n        </th>\r\n        <td>\r\n");

            
            #line 48 "..\..\Views\Job\JobParts\Repairs.cshtml"
            
            
            #line default
            #line hidden
            
            #line 48 "..\..\Views\Job\JobParts\Repairs.cshtml"
             if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerReference))
            {
                
            
            #line default
            #line hidden
            
            #line 50 "..\..\Views\Job\JobParts\Repairs.cshtml"
           Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference));

            
            #line default
            #line hidden
            
            #line 50 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                                                                
                
            
            #line default
            #line hidden
            
            #line 51 "..\..\Views\Job\JobParts\Repairs.cshtml"
           Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
            
            #line 51 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                       
                
            
            #line default
            #line hidden
            
            #line 52 "..\..\Views\Job\JobParts\Repairs.cshtml"
           Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
            
            #line 52 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                         

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

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

WriteLiteral(@">
                    $(function () {
                        document.DiscoFunctions.PropertyChangeHelper(
                                $('#Job_JobMetaNonWarranty_RepairerReference'),
                                'Unknown',
                                '");

            
            #line 58 "..\..\Views\Job\JobParts\Repairs.cshtml"
                            Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            \'RepairerReference\'\r\n                        );\r\n" +
"                    });\r\n                </script>\r\n");

            
            #line 63 "..\..\Views\Job\JobParts\Repairs.cshtml"
            }
            else
            {
                if (string.IsNullOrWhiteSpace(Model.Job.JobMetaNonWarranty.RepairerReference))
                {
            
            #line default
            #line hidden
WriteLiteral("<span");

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

WriteLiteral(">&lt;Unknown/None&gt;</span>");

            
            #line 67 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                                                       }
                else
                {
            
            #line default
            #line hidden
            
            #line 69 "..\..\Views\Job\JobParts\Repairs.cshtml"
            Write(Model.Job.JobMetaNonWarranty.RepairerReference);

            
            #line default
            #line hidden
            
            #line 69 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                                                }
            }

            
            #line default
            #line hidden
WriteLiteral("        </td>\r\n    </tr>\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Repair Completed\r\n        </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 77 "..\..\Views\Job\JobParts\Repairs.cshtml"
       Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.RepairerCompletedDate, "Not Completed", "Job_JobMetaNonWarranty_RepairerCompletedDate"));

            
            #line default
            #line hidden
WriteLiteral("\r\n        </td>\r\n    </tr>\r\n</table>\r\n<script>\r\n    $(function () {\r\n        var " +
"updateUrl = \'");

            
            #line 83 "..\..\Views\Job\JobParts\Repairs.cshtml"
                     Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral("\';\r\n        var jobOpenDate = \'");

            
            #line 84 "..\..\Views\Job\JobParts\Repairs.cshtml"
                       Write(Model.Job.OpenedDate.ToISO8601());

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

            
            #line 86 "..\..\Views\Job\JobParts\Repairs.cshtml"
        
            
            #line default
            #line hidden
            
            #line 86 "..\..\Views\Job\JobParts\Repairs.cshtml"
         if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerLoggedDate))
        {
            
            #line default
            #line hidden
WriteLiteral("document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Repairer Name\', \'Job_" +
"JobMetaNonWarranty_RepairerLoggedDate\', null, \'NonWarrantyRepairerLoggedDate\', \'" +
"Not Logged\', jobOpenDate, false);");

            
            #line 87 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                                                                                                                                                                                                        }

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

            
            #line 88 "..\..\Views\Job\JobParts\Repairs.cshtml"
         if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerCompletedDate))
        {
            
            #line default
            #line hidden
WriteLiteral("document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Repair Completed\', \'J" +
"ob_JobMetaNonWarranty_RepairerCompletedDate\', null, \'NonWarrantyRepairerComplete" +
"dDate\', \'Not Completed\', jobOpenDate, false);");

            
            #line 89 "..\..\Views\Job\JobParts\Repairs.cshtml"
                                                                                                                                                                                                                                    }

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

        }
    }
}
#pragma warning restore 1591
