5ba9fde10f
Warranty job UI changes to make consistent with plans for Repair Logging
584 lines
17 KiB
C#
584 lines
17 KiB
C#
#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
|
|
{
|
|
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/LogWarranty.cshtml")]
|
|
public partial class LogWarranty : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
|
{
|
|
public LogWarranty()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 2 "..\..\Views\Job\LogWarranty.cshtml"
|
|
|
|
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 7 "..\..\Views\Job\LogWarranty.cshtml"
|
|
using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 9 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.ValidationSummary(true));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 9 "..\..\Views\Job\LogWarranty.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 10 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.HiddenFor(m => m.JobId));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 10 "..\..\Views\Job\LogWarranty.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 11 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.JobId));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 11 "..\..\Views\Job\LogWarranty.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" type=\"hidden\"");
|
|
|
|
WriteLiteral(" name=\"WarrantyAction\"");
|
|
|
|
WriteAttribute("value", Tuple.Create(" value=\"", 495), Tuple.Create("\"", 552)
|
|
|
|
#line 12 "..\..\Views\Job\LogWarranty.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 503), Tuple.Create<System.Object, System.Int32>(Model.IsCustomProvider ? "Custom" : "Disclose"
|
|
|
|
#line default
|
|
#line hidden
|
|
, 503), false)
|
|
);
|
|
|
|
WriteLiteral(" />\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"warrantyJobForm\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 650px\"");
|
|
|
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>Internal Job Id:\r\n " +
|
|
" </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 19 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Model.JobId);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
">Device Serial Number:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 26 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Model.Job.Device.SerialNumber);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
">Device Model:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 33 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 33 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Model.Job.Device.DeviceModel.Model);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
|
">Technician:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 40 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Model.TechUser.DisplayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">\r\n Email Address: ");
|
|
|
|
|
|
#line 42 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Model.TechUser.EmailAddress);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n Phone Number: ");
|
|
|
|
|
|
#line 43 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Model.TechUser.PhoneNumber);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
|
" <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 150px\"");
|
|
|
|
WriteLiteral(">Repair Address:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 51 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, (Model.OrganisationAddress == null))));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 52 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.OrganisationAddressId));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" id=\"organisationAddressDetails\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 54 "..\..\Views\Job\LogWarranty.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 54 "..\..\Views\Job\LogWarranty.cshtml"
|
|
|
|
var oa = Model.OrganisationAddress;
|
|
if (oa != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span>");
|
|
|
|
|
|
#line 58 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(oa.Address);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n");
|
|
|
|
WriteLiteral(" <br />\r\n");
|
|
|
|
WriteLiteral(" <span>");
|
|
|
|
|
|
#line 60 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(oa.Suburb);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(", ");
|
|
|
|
|
|
#line 60 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(oa.Postcode);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n");
|
|
|
|
WriteLiteral(" <br />\r\n");
|
|
|
|
WriteLiteral(" <span>");
|
|
|
|
|
|
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(oa.State);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(", ");
|
|
|
|
|
|
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(oa.Country);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n");
|
|
|
|
|
|
#line 63 "..\..\Views\Job\LogWarranty.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
|
" <tr>\r\n <th>Warranty Provider:\r\n </th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 72 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true, InstructionMessage: "Select a Provider", AdditionalItems: new Dictionary<string, string>() { { "CUSTOM", "<Custom Provider>" } })));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 73 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.WarrantyProviderId));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 76 "..\..\Views\Job\LogWarranty.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 76 "..\..\Views\Job\LogWarranty.cshtml"
|
|
if (Model.IsCustomProvider)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <th>Custom Provider:</th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 81 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.EditorFor(model => model.CustomProviderName));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 82 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.CustomProviderName));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
|
|
|
WriteLiteral(" <tr>\r\n <th>Provider Job Reference:</th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 88 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.EditorFor(model => model.CustomProviderReference));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 89 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.CustomProviderReference));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 92 "..\..\Views\Job\LogWarranty.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </table>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"warrantyJobFaultDescription\"");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 650px; margin-top: 15px;\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Fault Description</h2>\r\n <table>\r\n <tr>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 100 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.EditorFor(model => model.FaultDescription));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 101 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.FaultDescription));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
|
|
|
|
|
#line 106 "..\..\Views\Job\LogWarranty.cshtml"
|
|
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"warrantyJobProviderProperties\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 109 "..\..\Views\Job\LogWarranty.cshtml"
|
|
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 111 "..\..\Views\Job\LogWarranty.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 113 "..\..\Views\Job\LogWarranty.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 113 "..\..\Views\Job\LogWarranty.cshtml"
|
|
if (Model.IsCustomProvider)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" type=\"submit\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(" value=\"Save Warranty Claim\"");
|
|
|
|
WriteLiteral(" />\r\n");
|
|
|
|
|
|
#line 116 "..\..\Views\Job\LogWarranty.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" type=\"submit\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(" value=\"Preview Warranty Claim\"");
|
|
|
|
WriteLiteral(" />\r\n");
|
|
|
|
|
|
#line 120 "..\..\Views\Job\LogWarranty.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 122 "..\..\Views\Job\LogWarranty.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n var $providerId = $(\'#WarrantyProviderId\');\r\n " +
|
|
" var $addressId = $(\'#OrganisationAddressId\');\r\n\r\n function updateDeta" +
|
|
"ils() {\r\n $(\'<form>\').attr({\r\n action: $providerId.clo" +
|
|
"sest(\'form\').attr(\'action\'),\r\n method: \'post\'\r\n }).app" +
|
|
"end(\r\n $(\'<input>\').attr({ type: \'hidden\', name: \'WarrantyAction\'" +
|
|
", value: \'Update\' })\r\n ).append(\r\n $(\'<input>\').attr({" +
|
|
" type: \'hidden\', name: \'JobId\', value: $(\'#JobId\').val() })\r\n ).appen" +
|
|
"d(\r\n $(\'<input>\').attr({ type: \'hidden\', name: \'WarrantyProviderI" +
|
|
"d\', value: $providerId.val() })\r\n ).append(\r\n $(\'<inpu" +
|
|
"t>\').attr({ type: \'hidden\', name: \'OrganisationAddressId\', value: $addressId.val" +
|
|
"() })\r\n ).append(\r\n $(\'<input>\').attr({ type: \'hidden\'" +
|
|
", name: \'FaultDescription\', value: $(\'#FaultDescription\').val() })\r\n " +
|
|
").append(\r\n $(\'<input>\').attr({ type: \'hidden\', name: \'CustomProv" +
|
|
"iderName\', value: $(\'#CustomProviderName\').val() })\r\n ).append(\r\n " +
|
|
" $(\'<input>\').attr({ type: \'hidden\', name: \'CustomProviderReference\'," +
|
|
" value: $(\'#CustomProviderReference\').val() })\r\n ).appendTo(\'body\').s" +
|
|
"ubmit();\r\n }\r\n\r\n $providerId.change(updateDetails);\r\n $addr" +
|
|
"essId.change(updateDetails);\r\n\r\n var customProvider = $(\'#CustomProviderN" +
|
|
"ame\');\r\n if (customProvider.length > 0 && !customProvider.val()) {\r\n " +
|
|
" customProvider.focus();\r\n } else {\r\n $(\'#FaultDescripti" +
|
|
"on\').focus();\r\n }\r\n });\r\n</script>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|