Feature #2: Improve Warranty Logging

Warranty job UI changes to make consistent with plans for Repair Logging
This commit is contained in:
Gary Sharp
2014-07-08 16:47:13 +10:00
parent 67a624d5b5
commit 5ba9fde10f
13 changed files with 933 additions and 537 deletions
+53 -7
View File
@@ -8,6 +8,7 @@ using Disco.Services.Plugins;
using Disco.Services.Plugins.Features.WarrantyProvider;
using Disco.Services.Users;
using Disco.Services.Authorization;
using Disco.Services.Plugins.Features.RepairProvider;
namespace Disco.BI.Extensions
{
@@ -180,11 +181,34 @@ namespace Disco.BI.Extensions
JobId = j.Id,
TechUserId = TechUser.UserId,
Timestamp = DateTime.Now,
Comments = string.Format("Warranty Claim Submitted{0}{0}Provider: {1}{0}Repair Address: {2}{0}Provider Reference: {3}{0}{0}{4}", Environment.NewLine, WarrantyProvider.Manifest.Name, Address.Name, providerRef, FaultDescription)
Comments = string.Format("####Warranty Claim Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", WarrantyProvider.Manifest.Name, Address.Name, providerRef, FaultDescription)
};
Database.JobLogs.Add(jobLog);
}
}
public static void OnLogWarranty(this Job j, DiscoDataContext Database, string FaultDescription, string CustomProviderName, string CustomProviderReference, OrganisationAddress Address, User TechUser)
{
if (!j.CanLogWarranty())
throw new InvalidOperationException("Log Warranty was Denied");
j.JobMetaWarranty.ExternalLoggedDate = DateTime.Now;
j.JobMetaWarranty.ExternalName = CustomProviderName;
if (CustomProviderReference != null && CustomProviderReference.Length > 100)
j.JobMetaWarranty.ExternalReference = CustomProviderReference.Substring(0, 100);
else
j.JobMetaWarranty.ExternalReference = CustomProviderReference;
// Write Log
JobLog jobLog = new JobLog()
{
JobId = j.Id,
TechUserId = TechUser.UserId,
Timestamp = DateTime.Now,
Comments = string.Format("####Custom Warranty Claim Submitted\r\nCustom Provider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n___\r\n{3}", CustomProviderName, Address.Name, CustomProviderReference ?? "<None>", FaultDescription)
};
Database.JobLogs.Add(jobLog);
}
#endregion
#region Convert HWar to HNWar
@@ -317,16 +341,38 @@ namespace Disco.BI.Extensions
!j.JobMetaNonWarranty.RepairerLoggedDate.HasValue &&
!j.JobMetaNonWarranty.RepairerCompletedDate.HasValue;
}
public static void OnLogRepair(this Job j, string RepairerName, string RepairerReference)
public static void OnLogRepair(this Job j, DiscoDataContext Database, string RepairDescription, PluginFeatureManifest RepairProviderDefinition, OrganisationAddress Address, User TechUser, Dictionary<string, string> ProviderProperties)
{
if (!j.CanLogRepair())
throw new InvalidOperationException("Log Repair was Denied");
if (j.JobMetaNonWarranty.RepairerName != RepairerName)
j.JobMetaNonWarranty.RepairerName = RepairerName;
if (j.JobMetaNonWarranty.RepairerReference != RepairerReference)
j.JobMetaNonWarranty.RepairerReference = RepairerReference;
j.JobMetaNonWarranty.RepairerLoggedDate = DateTime.Now;
if (string.IsNullOrWhiteSpace(RepairDescription))
RepairDescription = j.GenerateFaultDescriptionFooter(Database, RepairProviderDefinition);
else
RepairDescription = string.Concat(RepairDescription, Environment.NewLine, Environment.NewLine, j.GenerateFaultDescriptionFooter(Database, RepairProviderDefinition));
using (RepairProviderFeature RepairProvider = RepairProviderDefinition.CreateInstance<RepairProviderFeature>())
{
string providerRef = RepairProvider.SubmitJob(Database, j, Address, TechUser, RepairDescription, ProviderProperties);
j.JobMetaNonWarranty.RepairerLoggedDate = DateTime.Now;
j.JobMetaNonWarranty.RepairerName = RepairProvider.ProviderId;
if (providerRef.Length > 100)
j.JobMetaNonWarranty.RepairerReference = providerRef.Substring(0, 100);
else
j.JobMetaNonWarranty.RepairerReference = providerRef;
// Write Log
JobLog jobLog = new JobLog()
{
JobId = j.Id,
TechUserId = TechUser.UserId,
Timestamp = DateTime.Now,
Comments = string.Format("####Repair Request Submitted\r\nProvider: **{0}**\r\nAddress: **{1}**\r\nReference: **{2}**\r\n{3}", RepairProvider.Manifest.Name, Address.Name, providerRef, RepairDescription)
};
Database.JobLogs.Add(jobLog);
}
}
#endregion
@@ -16,16 +16,22 @@ namespace Disco.Web.Extensions
if (SelectedItem != null)
selectedId = SelectedItem.Id;
return PluginFeatureDefinitions.ToSelectListItems(selectedId);
return PluginFeatureDefinitions.ToSelectListItems(selectedId, false, null);
}
public static List<SelectListItem> ToSelectListItems(this IEnumerable<PluginFeatureManifest> PluginDefinitions, string SelectedId = null, bool IncludeInstructionFirst = false, string InstructionMessage = "Select a Plugin")
{
var selectItems = default(List<SelectListItem>);
if (SelectedId == null)
selectItems = PluginDefinitions.Select(wpd => new SelectListItem { Value = wpd.Id, Text = wpd.Name }).ToList();
else
selectItems = PluginDefinitions.Select(wpd => new SelectListItem { Value = wpd.Id, Text = wpd.Name, Selected = (SelectedId.Equals(wpd.Id)) }).ToList();
return ToSelectListItems(PluginDefinitions, SelectedId, IncludeInstructionFirst, InstructionMessage, null);
}
public static List<SelectListItem> ToSelectListItems(this IEnumerable<PluginFeatureManifest> PluginDefinitions, string SelectedId = null, bool IncludeInstructionFirst = false, string InstructionMessage = "Select a Plugin", Dictionary<string, string> AdditionalItems = null)
{
List<SelectListItem> selectItems;
selectItems = PluginDefinitions
.Select(wpd => new SelectListItem { Value = wpd.Id, Text = wpd.Name, Selected = (SelectedId != null && SelectedId.Equals(wpd.Id)) })
.Concat(AdditionalItems.Select(i => new SelectListItem { Value = i.Key, Text = i.Value, Selected = (SelectedId != null && SelectedId.Equals(i.Key)) }))
.OrderBy(i => i.Text).ToList();
if (IncludeInstructionFirst)
selectItems.Insert(0, new SelectListItem() { Value = String.Empty, Text = String.Format("<{0}>", InstructionMessage), Selected = String.IsNullOrEmpty(SelectedId) });
+16
View File
@@ -605,6 +605,22 @@
#jobComponents tr .totalCost {
font-weight: bold;
}
#jobWarrantyDetails {
border: solid 1px #d8d8d8;
border-collapse: collapse;
}
#jobWarrantyDetails td {
border: solid 1px #d8d8d8;
background-color: #ffffff;
}
#jobWarrantyDetails th {
background-color: #eeeeee;
border: solid 1px #d8d8d8;
}
#jobWarrantyDetails tr th {
width: 200px;
text-align: right;
}
#jobNonWarrantyFinance {
border: solid 1px #d8d8d8;
border-collapse: collapse;
+11
View File
@@ -645,6 +645,17 @@
}
}
#jobWarrantyDetails {
.tableDataDark;
tr {
th {
width: 200px;
text-align: right;
}
}
}
#jobNonWarrantyFinance {
.tableDataDark;
File diff suppressed because one or more lines are too long
+47 -1
View File
@@ -473,7 +473,12 @@ namespace Disco.Web.Controllers
[DiscoAuthorize(Claims.Job.Actions.LogWarranty)]
public virtual ActionResult LogWarranty(int id, string WarrantyProviderId, int? OrganisationAddressId)
{
var m = new Models.Job.LogWarrantyModel() { JobId = id, WarrantyProviderId = WarrantyProviderId, OrganisationAddressId = OrganisationAddressId };
var m = new Models.Job.LogWarrantyModel()
{
JobId = id,
WarrantyProviderId = WarrantyProviderId,
OrganisationAddressId = OrganisationAddressId
};
m.UpdateModel(Database, false);
m.FaultDescription = m.Job.GenerateFaultDescription(Database);
@@ -500,6 +505,47 @@ namespace Disco.Web.Controllers
{
switch (m.WarrantyAction)
{
case "Update":
var updatedModel = new Models.Job.LogWarrantyModel()
{
JobId = m.JobId,
WarrantyProviderId = m.WarrantyProviderId,
OrganisationAddressId = m.OrganisationAddressId,
FaultDescription = m.FaultDescription
};
updatedModel.UpdateModel(Database, false);
if (updatedModel.WarrantyProvider != null)
{
using (var wp = updatedModel.WarrantyProvider.CreateInstance<WarrantyProviderFeature>())
{
if (wp.SubmitJobViewType != null)
{
updatedModel.WarrantyProviderSubmitJobViewType = wp.SubmitJobViewType;
updatedModel.WarrantyProviderSubmitJobModel = wp.SubmitJobViewModel(Database, this, updatedModel.Job, updatedModel.OrganisationAddress, updatedModel.TechUser);
}
}
}
return View(updatedModel);
case "Custom":
if (string.IsNullOrWhiteSpace(m.CustomProviderName))
{
ModelState.AddModelError("CustomProviderName", "The Custom Warranty Provider Name is required");
return View(Views.LogWarranty, m);
}
try
{
m.Job.OnLogWarranty(Database, m.FaultDescription, m.CustomProviderName, m.CustomProviderReference, m.OrganisationAddress, m.TechUser);
Database.SaveChanges();
return RedirectToAction(MVC.Job.Show(m.JobId));
}
catch (Exception ex)
{
m.Error = ex;
return View(Views.LogWarrantyError, m);
throw;
}
case "Disclose":
using (var p = m.WarrantyProvider.CreateInstance<WarrantyProviderFeature>())
{
+11 -1
View File
@@ -34,6 +34,16 @@ namespace Disco.Web.Models.Job
[Required]
public string WarrantyAction { get; set; }
public bool IsCustomProvider
{
get
{
return WarrantyProviderId == "CUSTOM";
}
}
public string CustomProviderName { get; set; }
public string CustomProviderReference { get; set; }
public Type WarrantyProviderSubmitJobViewType { get; set; }
public object WarrantyProviderSubmitJobModel { get; set; }
public string WarrantyProviderPropertiesJson { get; set; }
@@ -93,7 +103,7 @@ namespace Disco.Web.Models.Job
WarrantyProviderId = Job.Device.DeviceModel.DefaultWarrantyProvider;
}
if (!string.IsNullOrEmpty(WarrantyProviderId))
if (!string.IsNullOrEmpty(WarrantyProviderId) && WarrantyProviderId != "CUSTOM")
WarrantyProvider = Plugins.GetPluginFeature(WarrantyProviderId, typeof(WarrantyProviderFeature));
this.OrganisationAddresses = Database.DiscoConfiguration.OrganisationAddresses.Addresses.OrderBy(a => a.Name).ToList();
+116 -95
View File
@@ -3,106 +3,109 @@
Authorization.Require(Claims.Job.ShowWarranty);
}
<div id="jobDetailTab-Warranty" class="jobPart">
<table id="jobNonWarrantyFinance">
<tr>
<th style="width: 200px;">Warranty Provider
</th>
<td>
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalName))
{
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#Job_JobMetaWarranty_ExternalName'),
'Unknown',
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null))',
<table id="jobWarrantyDetails">
@if (Model.Job.JobMetaWarranty.ExternalName != null || Model.Job.JobMetaWarranty.ExternalLoggedDate.HasValue || Model.Job.JobMetaWarranty.ExternalReference != null)
{
<tr>
<th style="width: 200px;">Warranty Provider
</th>
<td>
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalName))
{
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#Job_JobMetaWarranty_ExternalName'),
'Unknown',
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null))',
'ExternalName'
);
});
</script>
}
else
{
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalName))
{<span class="smallMessage">&lt;Unknown/None&gt;</span>}
});
</script>
}
else
{<span id="Job_JobMetaWarranty_ExternalName">@Model.Job.JobMetaWarranty.ExternalName</span>}
}
</td>
</tr>
<tr>
<th style="width: 200px;">Warranty Logged
</th>
<td>
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalLoggedDate))
{
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Not Logged", "Job_JobMetaWarranty_ExternalLoggedDate")
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
document.DiscoFunctions.DateDialogCreateUpdater('@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))', 'Warranty Logged', 'Job_JobMetaWarranty_ExternalLoggedDate', null, 'WarrantyExternalLoggedDate', 'Not Logged', '@(Model.Job.OpenedDate.ToISO8601())', false);
</script>
}
else
{
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Unknown/None", null)
}
</td>
</tr>
<tr>
<th style="width: 200px;">Warranty Reference
</th>
<td>
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalReference))
{
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#Job_JobMetaWarranty_ExternalReference'),
'Unknown',
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null))',
{
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalName))
{<span class="smallMessage">&lt;Unknown/None&gt;</span>}
else
{<span id="Job_JobMetaWarranty_ExternalName">@Model.Job.JobMetaWarranty.ExternalName</span>}
}
</td>
</tr>
<tr>
<th style="width: 200px;">Warranty Logged
</th>
<td>
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalLoggedDate))
{
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Not Logged", "Job_JobMetaWarranty_ExternalLoggedDate")
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
document.DiscoFunctions.DateDialogCreateUpdater('@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))', 'Warranty Logged', 'Job_JobMetaWarranty_ExternalLoggedDate', null, 'WarrantyExternalLoggedDate', 'Not Logged', '@(Model.Job.OpenedDate.ToISO8601())', false);
</script>
}
else
{
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Unknown/None", null)
}
</td>
</tr>
<tr>
<th style="width: 200px;">Warranty Reference
</th>
<td>
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalReference))
{
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#Job_JobMetaWarranty_ExternalReference'),
'Unknown',
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null))',
'ExternalReference'
);
});
</script>
}
else
{
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalReference))
{<span class="smallMessage">&lt;Unknown/None&gt;</span>}
});
</script>
}
else
{@Model.Job.JobMetaWarranty.ExternalReference}
}
</td>
</tr>
@if (Model.Job.JobMetaWarranty.ExternalLoggedDate.HasValue){
<tr>
<th style="width: 200px;">Warranty Completed
</th>
<td>
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalCompletedDate))
{
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Not Completed", "Job_JobMetaWarranty_ExternalCompletedDate")
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
document.DiscoFunctions.DateDialogCreateUpdater('@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))', 'Warranty Logged', 'Job_JobMetaWarranty_ExternalCompletedDate', null, 'WarrantyExternalCompletedDate', 'Not Completed', '@(Model.Job.OpenedDate.ToISO8601())', false);
</script>
}
else
{
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Unknown/None", null)
}
</td>
</tr>
}
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
{
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalReference))
{<span class="smallMessage">&lt;Unknown/None&gt;</span>}
else
{@Model.Job.JobMetaWarranty.ExternalReference}
}
</td>
</tr>
if (Model.Job.JobMetaWarranty.ExternalLoggedDate.HasValue)
{
<tr>
<th style="width: 200px;">Warranty Completed
</th>
<td>
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalCompletedDate))
{
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Not Completed", "Job_JobMetaWarranty_ExternalCompletedDate")
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
document.DiscoFunctions.DateDialogCreateUpdater('@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))', 'Warranty Logged', 'Job_JobMetaWarranty_ExternalCompletedDate', null, 'WarrantyExternalCompletedDate', 'Not Completed', '@(Model.Job.OpenedDate.ToISO8601())', false);
</script>
}
else
{
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Unknown/None", null)
}
</td>
</tr>
}
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
<tr id="jobWarrantyProviderDetailContainer" style="display: none">
<th style="width: 200px;">Provider Details
</th>
@@ -113,13 +116,31 @@
<div id="jobWarrantyProviderDetailHost" class="clearfix" style="display: none">
</div>
</td>
</tr>
}
}
else
{
<tr>
<th style="width: 200px;">Actions
</th>
<td>
@if (Model.Job.CanLogWarranty())
{
@Html.ActionLinkSmallButton("Log Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Warranty_Actions_LogWarranty_Button")
}
else
{
<span class="smallMessage">&lt;None&gt;</span>
}
</td>
</tr>
}
</table>
</div>
<script type="text/javascript">
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Warranty">Warranty</a></li>');
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails) && Model.Job.JobMetaWarranty.ExternalName != null)
{<text>
$(function () {
var warrantyProviderDetailLoaded = false;
+305 -236
View File
@@ -60,59 +60,47 @@ WriteLiteral(" class=\"jobPart\"");
WriteLiteral(">\r\n <table");
WriteLiteral(" id=\"jobNonWarrantyFinance\"");
WriteLiteral(" id=\"jobWarrantyDetails\"");
WriteLiteral(">\r\n <tr>\r\n <th");
WriteLiteral(">\r\n");
#line 7 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 7 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Model.Job.JobMetaWarranty.ExternalName != null || Model.Job.JobMetaWarranty.ExternalLoggedDate.HasValue || Model.Job.JobMetaWarranty.ExternalReference != null)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px;\"");
WriteLiteral(">Warranty Provider\r\n </th>\r\n <td>\r\n");
WriteLiteral(">Warranty Provider\r\n </th>\r\n <td>\r\n");
#line 11 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 11 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalName))
{
#line 13 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 13 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName));
#line default
#line hidden
#line 13 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 14 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 14 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalName))
{
#line default
#line hidden
#line 15 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxLoader());
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName));
#line default
@@ -124,34 +112,62 @@ WriteLiteral(">Warranty Provider\r\n </th>\r\n <td>\r\n");
#line default
#line hidden
WriteLiteral(" <script");
#line 16 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 16 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 17 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 17 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#Job_JobMetaWarranty_ExternalName'),
'Unknown',
'");
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#Job_JobMetaWarranty_ExternalName'),
'Unknown',
'");
#line 21 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null)));
#line 23 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null)));
#line default
#line hidden
WriteLiteral("\',\r\n \'ExternalName\'\r\n );\r\n " +
" });\r\n </script>\r\n");
" });\r\n </script>\r\n");
#line 26 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalName))
#line 28 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalName))
{
#line default
#line hidden
@@ -162,10 +178,10 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">&lt;Unknown/None&gt;</span>");
#line 30 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
#line 32 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
#line default
#line hidden
@@ -176,8 +192,8 @@ WriteLiteral(" id=\"Job_JobMetaWarranty_ExternalName\"");
WriteLiteral(">");
#line 32 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Model.Job.JobMetaWarranty.ExternalName);
#line 34 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Model.Job.JobMetaWarranty.ExternalName);
#line default
@@ -185,70 +201,72 @@ WriteLiteral(">");
WriteLiteral("</span>");
#line 32 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
}
#line 34 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
WriteLiteral(" </td>\r\n </tr>\r\n");
WriteLiteral(" <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px;\"");
WriteLiteral(">Warranty Logged\r\n </th>\r\n <td>\r\n");
WriteLiteral(">Warranty Logged\r\n </th>\r\n <td>\r\n");
#line 40 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 40 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalLoggedDate))
{
#line 42 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 42 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Not Logged", "Job_JobMetaWarranty_ExternalLoggedDate"));
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalLoggedDate))
{
#line default
#line hidden
#line 42 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 44 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Not Logged", "Job_JobMetaWarranty_ExternalLoggedDate"));
#line default
#line hidden
#line 44 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 43 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line 45 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 43 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 45 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n document.DiscoFunctions.DateDialogCreateUpdater(\'");
WriteLiteral(">\r\n document.DiscoFunctions.DateDialogCreateUpdater(\'");
#line 45 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));
#line 47 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));
#line default
@@ -257,89 +275,63 @@ WriteLiteral("\', \'Warranty Logged\', \'Job_JobMetaWarranty_ExternalLoggedDate\
"ternalLoggedDate\', \'Not Logged\', \'");
#line 45 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Model.Job.OpenedDate.ToISO8601());
#line default
#line hidden
WriteLiteral("\', false);\r\n </script>\r\n");
#line 47 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
Write(Model.Job.OpenedDate.ToISO8601());
#line default
#line hidden
WriteLiteral("\', false);\r\n </script>\r\n");
#line 49 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
#line default
#line hidden
#line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Unknown/None", null));
#line 52 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Unknown/None", null));
#line default
#line hidden
#line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 52 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
WriteLiteral(" </td>\r\n </tr>\r\n");
WriteLiteral(" <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px;\"");
WriteLiteral(">Warranty Reference\r\n </th>\r\n <td>\r\n");
WriteLiteral(">Warranty Reference\r\n </th>\r\n <td>\r\n");
#line 58 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 58 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalReference))
{
#line 60 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 60 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference));
#line default
#line hidden
#line 60 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 61 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 61 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalReference))
{
#line default
#line hidden
#line 62 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxLoader());
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference));
#line default
@@ -351,34 +343,62 @@ WriteLiteral(">Warranty Reference\r\n </th>\r\n <td>\r\n")
#line default
#line hidden
WriteLiteral(" <script");
#line 63 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 63 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 64 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 64 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#Job_JobMetaWarranty_ExternalReference'),
'Unknown',
'");
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#Job_JobMetaWarranty_ExternalReference'),
'Unknown',
'");
#line 68 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null)));
#line 70 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null)));
#line default
#line hidden
WriteLiteral("\',\r\n \'ExternalReference\'\r\n );\r\n" +
" });\r\n </script>\r\n");
" });\r\n </script>\r\n");
#line 73 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalReference))
#line 75 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalReference))
{
#line default
#line hidden
@@ -389,100 +409,95 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">&lt;Unknown/None&gt;</span>");
#line 77 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
#line 79 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
#line default
#line hidden
#line 81 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Model.Job.JobMetaWarranty.ExternalReference);
#line default
#line hidden
#line 81 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 85 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Model.Job.JobMetaWarranty.ExternalLoggedDate.HasValue)
{
#line default
#line hidden
#line 79 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Model.Job.JobMetaWarranty.ExternalReference);
#line default
#line hidden
#line 79 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 83 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 83 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Model.Job.JobMetaWarranty.ExternalLoggedDate.HasValue){
#line default
#line hidden
WriteLiteral(" <tr>\r\n <th");
WriteLiteral(" <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px;\"");
WriteLiteral(">Warranty Completed\r\n </th>\r\n <td>\r\n");
WriteLiteral(">Warranty Completed\r\n </th>\r\n <td>\r\n");
#line 88 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 88 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalCompletedDate))
{
#line default
#line hidden
#line 90 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Not Completed", "Job_JobMetaWarranty_ExternalCompletedDate"));
#line default
#line hidden
#line 90 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 91 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 91 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxLoader());
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalCompletedDate))
{
#line default
#line hidden
#line 91 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 93 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Not Completed", "Job_JobMetaWarranty_ExternalCompletedDate"));
#line default
#line hidden
#line 93 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
#line 94 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 94 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n document.DiscoFunctions.DateDialogCreateUpdater(\'");
WriteLiteral(">\r\n document.DiscoFunctions.DateDialogCreateUpdater(\'");
#line 93 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));
#line 96 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));
#line default
@@ -491,54 +506,46 @@ WriteLiteral("\', \'Warranty Logged\', \'Job_JobMetaWarranty_ExternalCompletedDa
"yExternalCompletedDate\', \'Not Completed\', \'");
#line 93 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Model.Job.OpenedDate.ToISO8601());
#line 96 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Model.Job.OpenedDate.ToISO8601());
#line default
#line hidden
WriteLiteral("\', false);\r\n </script>\r\n");
WriteLiteral("\', false);\r\n </script>\r\n");
#line 95 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
#line default
#line hidden
#line 98 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Unknown/None", null));
}
else
{
#line default
#line hidden
#line 98 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
#line 101 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Unknown/None", null));
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 101 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 102 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
}
#line default
#line hidden
WriteLiteral(" ");
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 103 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
#line 105 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
#line default
@@ -575,7 +582,69 @@ WriteLiteral(" style=\"display: none\"");
WriteLiteral(">\r\n </div>\r\n </td>\r\n </tr>\r\n");
#line 117 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 120 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
}
else
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px;\"");
WriteLiteral(">Actions\r\n </th>\r\n <td>\r\n");
#line 128 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 128 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Model.Job.CanLogWarranty())
{
#line default
#line hidden
#line 130 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Html.ActionLinkSmallButton("Log Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Warranty_Actions_LogWarranty_Button"));
#line default
#line hidden
#line 130 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">&lt;None&gt;</span>\r\n");
#line 135 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 138 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
@@ -589,14 +658,14 @@ WriteLiteral(">\r\n $(\'#jobDetailTabItems\').append(\'<li><a href=\"#jobDeta
"nty</a></li>\');\r\n");
#line 122 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 143 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line default
#line hidden
#line 122 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
#line 143 "..\..\Views\Job\JobParts\Warranty.cshtml"
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails) && Model.Job.JobMetaWarranty.ExternalName != null)
{
#line default
@@ -622,7 +691,7 @@ WriteLiteral(@"
'");
#line 141 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 162 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Url.Action(MVC.Job.WarrantyProviderJobDetails()));
@@ -631,7 +700,7 @@ WriteLiteral(@"
WriteLiteral("\',\r\n { id: \'");
#line 142 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 163 "..\..\Views\Job\JobParts\Warranty.cshtml"
Write(Model.Job.Id);
@@ -654,7 +723,7 @@ WriteLiteral(@"' },
");
#line 156 "..\..\Views\Job\JobParts\Warranty.cshtml"
#line 177 "..\..\Views\Job\JobParts\Warranty.cshtml"
}
+61 -25
View File
@@ -9,7 +9,7 @@
@Html.ValidationSummary(true)
@Html.HiddenFor(m => m.JobId)
@Html.ValidationMessageFor(m => m.JobId)
<input type="hidden" name="WarrantyAction" value="Disclose" />
<input type="hidden" name="WarrantyAction" value="@(Model.IsCustomProvider ? "Custom" : "Disclose")" />
<div id="warrantyJobForm" class="form" style="width: 650px">
<table>
<tr>
@@ -50,10 +50,6 @@
<td>
@Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, (Model.OrganisationAddress == null)))<br />
@Html.ValidationMessageFor(m => m.OrganisationAddressId)
<div id="organisationAddressDetailsLoading" style="display: none">
<img src="@(Links.ClientSource.Style.Images.Status.loading_gif)" alt="Loading" />
<span class="smallMessage">Loading Details...</span>
</div>
<div id="organisationAddressDetails">
@{
var oa = Model.OrganisationAddress;
@@ -73,10 +69,27 @@
<th>Warranty Provider:
</th>
<td>
@Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true))<br />
@Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true, InstructionMessage: "Select a Provider", AdditionalItems: new Dictionary<string, string>() { { "CUSTOM", "<Custom Provider>" } }))<br />
@Html.ValidationMessageFor(m => m.WarrantyProviderId)
</td>
</tr>
@if (Model.IsCustomProvider)
{
<tr>
<th>Custom Provider:</th>
<td>
@Html.EditorFor(model => model.CustomProviderName)<br />
@Html.ValidationMessageFor(m => m.CustomProviderName)
</td>
</tr>
<tr>
<th>Provider Job Reference:</th>
<td>
@Html.EditorFor(model => model.CustomProviderReference)<br />
@Html.ValidationMessageFor(m => m.CustomProviderReference)
</td>
</tr>
}
</table>
</div>
<div id="warrantyJobFaultDescription" class="form" style="width: 650px; margin-top: 15px;">
@@ -90,34 +103,57 @@
</tr>
</table>
</div>
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
{
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
{
<div id="warrantyJobProviderProperties">
@Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel)
</div>
}
}
<div class="actionBar">
<input type="submit" class="button" value="Preview Warranty Claim" />
@if (Model.IsCustomProvider)
{
<input type="submit" class="button" value="Save Warranty Claim" />
}
else
{
<input type="submit" class="button" value="Preview Warranty Claim" />
}
</div>
}
<script type="text/javascript">
$(function () {
var $providerId = $('#WarrantyProviderId');
var $addressId = $('#OrganisationAddressId');
var $organisationAddressDetails = $('#organisationAddressDetails');
var $organisationAddressDetailsLoading = $('#organisationAddressDetailsLoading');
var $OrganisationAddressId = $('#OrganisationAddressId');
var $ProviderId = $('#WarrantyProviderId');
var updateProviderDetails = function () {
var providerId = $ProviderId.val();
var orgAddressId = $OrganisationAddressId.val();
if (providerId) {
window.location.href = '@(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)))?WarrantyProviderId=' + providerId + '&OrganisationAddressId=' + orgAddressId;
}
function updateDetails() {
$('<form>').attr({
action: $providerId.closest('form').attr('action'),
method: 'post'
}).append(
$('<input>').attr({ type: 'hidden', name: 'WarrantyAction', value: 'Update' })
).append(
$('<input>').attr({ type: 'hidden', name: 'JobId', value: $('#JobId').val() })
).append(
$('<input>').attr({ type: 'hidden', name: 'WarrantyProviderId', value: $providerId.val() })
).append(
$('<input>').attr({ type: 'hidden', name: 'OrganisationAddressId', value: $addressId.val() })
).append(
$('<input>').attr({ type: 'hidden', name: 'FaultDescription', value: $('#FaultDescription').val() })
).append(
$('<input>').attr({ type: 'hidden', name: 'CustomProviderName', value: $('#CustomProviderName').val() })
).append(
$('<input>').attr({ type: 'hidden', name: 'CustomProviderReference', value: $('#CustomProviderReference').val() })
).appendTo('body').submit();
}
$providerId.change(updateDetails);
$addressId.change(updateDetails);
var customProvider = $('#CustomProviderName');
if (customProvider.length > 0 && !customProvider.val()) {
customProvider.focus();
} else {
$('#FaultDescription').focus();
}
$OrganisationAddressId.change(updateProviderDetails);
$ProviderId.change(updateProviderDetails);
});
</script>
+170 -75
View File
@@ -112,7 +112,15 @@ WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"WarrantyAction\"");
WriteLiteral(" value=\"Disclose\"");
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");
@@ -232,42 +240,18 @@ WriteLiteral(" ");
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" id=\"organisationAddressDetailsLoading\"");
WriteLiteral(" style=\"display: none\"");
WriteLiteral(">\r\n <img");
WriteAttribute("src", Tuple.Create(" src=\"", 2141), Tuple.Create("\"", 2200)
#line 54 "..\..\Views\Job\LogWarranty.cshtml"
, Tuple.Create(Tuple.Create("", 2147), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Status.loading_gif
#line default
#line hidden
, 2147), false)
);
WriteLiteral(" alt=\"Loading\"");
WriteLiteral(" />\r\n <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">Loading Details...</span>\r\n </div>\r\n <div");
WriteLiteral(" id=\"organisationAddressDetails\"");
WriteLiteral(">\r\n");
#line 58 "..\..\Views\Job\LogWarranty.cshtml"
#line 54 "..\..\Views\Job\LogWarranty.cshtml"
#line default
#line hidden
#line 58 "..\..\Views\Job\LogWarranty.cshtml"
#line 54 "..\..\Views\Job\LogWarranty.cshtml"
var oa = Model.OrganisationAddress;
if (oa != null)
@@ -279,7 +263,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" <span>");
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
#line 58 "..\..\Views\Job\LogWarranty.cshtml"
Write(oa.Address);
@@ -292,7 +276,7 @@ WriteLiteral(" <br />\r\n");
WriteLiteral(" <span>");
#line 64 "..\..\Views\Job\LogWarranty.cshtml"
#line 60 "..\..\Views\Job\LogWarranty.cshtml"
Write(oa.Suburb);
@@ -301,7 +285,7 @@ WriteLiteral(" <span>");
WriteLiteral(", ");
#line 64 "..\..\Views\Job\LogWarranty.cshtml"
#line 60 "..\..\Views\Job\LogWarranty.cshtml"
Write(oa.Postcode);
@@ -314,7 +298,7 @@ WriteLiteral(" <br />\r\n");
WriteLiteral(" <span>");
#line 66 "..\..\Views\Job\LogWarranty.cshtml"
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
Write(oa.State);
@@ -323,7 +307,7 @@ WriteLiteral(" <span>");
WriteLiteral(", ");
#line 66 "..\..\Views\Job\LogWarranty.cshtml"
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
Write(oa.Country);
@@ -332,7 +316,7 @@ WriteLiteral(", ");
WriteLiteral("</span>\r\n");
#line 67 "..\..\Views\Job\LogWarranty.cshtml"
#line 63 "..\..\Views\Job\LogWarranty.cshtml"
}
@@ -345,8 +329,8 @@ WriteLiteral("\r\n </div>\r\n </td>\r\n
WriteLiteral(" ");
#line 76 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true)));
#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
@@ -356,13 +340,86 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" ");
#line 77 "..\..\Views\Job\LogWarranty.cshtml"
#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 </table>\r\n </div>\r\n");
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");
@@ -378,7 +435,7 @@ WriteLiteral(">\r\n <h2>Fault Description</h2>\r\n <table>\r\n
WriteLiteral(" ");
#line 87 "..\..\Views\Job\LogWarranty.cshtml"
#line 100 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.EditorFor(model => model.FaultDescription));
@@ -389,7 +446,7 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" ");
#line 88 "..\..\Views\Job\LogWarranty.cshtml"
#line 101 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.ValidationMessageFor(m => m.FaultDescription));
@@ -398,9 +455,9 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
#line 93 "..\..\Views\Job\LogWarranty.cshtml"
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
{
#line 106 "..\..\Views\Job\LogWarranty.cshtml"
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
{
#line default
@@ -414,7 +471,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 96 "..\..\Views\Job\LogWarranty.cshtml"
#line 109 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
@@ -423,8 +480,8 @@ WriteLiteral(" ");
WriteLiteral("\r\n </div>\r\n");
#line 98 "..\..\Views\Job\LogWarranty.cshtml"
}
#line 111 "..\..\Views\Job\LogWarranty.cshtml"
}
#line default
@@ -433,7 +490,42 @@ WriteLiteral(" <div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n <input");
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\"");
@@ -441,10 +533,19 @@ WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Preview Warranty Claim\"");
WriteLiteral(" />\r\n </div>\r\n");
WriteLiteral(" />\r\n");
#line 102 "..\..\Views\Job\LogWarranty.cshtml"
#line 120 "..\..\Views\Job\LogWarranty.cshtml"
}
#line default
#line hidden
WriteLiteral(" </div>\r\n");
#line 122 "..\..\Views\Job\LogWarranty.cshtml"
}
@@ -454,33 +555,27 @@ WriteLiteral("<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $organisationAddressDetails = $('#organisationAddressDetails');
var $organisationAddressDetailsLoading = $('#organisationAddressDetailsLoading');
var $OrganisationAddressId = $('#OrganisationAddressId');
var $ProviderId = $('#WarrantyProviderId');
var updateProviderDetails = function () {
var providerId = $ProviderId.val();
var orgAddressId = $OrganisationAddressId.val();
if (providerId) {
window.location.href = '");
#line 117 "..\..\Views\Job\LogWarranty.cshtml"
Write(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)));
#line default
#line hidden
WriteLiteral("?WarrantyProviderId=\' + providerId + \'&OrganisationAddressId=\' + orgAddressId;\r\n " +
" }\r\n }\r\n $OrganisationAddressId.change(updateProviderDet" +
"ails);\r\n $ProviderId.change(updateProviderDetails);\r\n });\r\n</script>\r\n" +
"");
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");
}
}
+20 -19
View File
@@ -5,8 +5,7 @@
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty Error");
}
<div class="form" style="width: 650px">
<h2>
Submission Error</h2>
<h2>Submission Error</h2>
<table>
<tr>
<td>
@@ -40,6 +39,7 @@
$('#warrantyJobErrorShow').click(function () {
$(this).hide();
$('#warrantyJobErrorMore').slideDown();
return false;
});
});
</script>
@@ -48,36 +48,31 @@
</table>
</div>
<div id="warrantyJobForm" class="form" style="width: 650px; margin-top: 15px;">
<h2>
Warranty Submission Details</h2>
<h2>Warranty Submission Details</h2>
<table>
<tr>
<th>
Internal Job Id:
<th>Internal Job Id:
</th>
<td>
@Model.JobId
</td>
</tr>
<tr>
<th>
Device Serial Number:
<th>Device Serial Number:
</th>
<td>
@Model.Job.Device.SerialNumber
</td>
</tr>
<tr>
<th>
Device Model:
<th>Device Model:
</th>
<td>
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
</td>
</tr>
<tr>
<th>
Technician:
<th>Technician:
</th>
<td>
@Model.TechUser.DisplayName
@@ -88,8 +83,7 @@
</td>
</tr>
<tr>
<th style="width: 150px">
Repair Address:
<th style="width: 150px">Repair Address:
</th>
<td>
<div id="organisationAddressDetails">
@@ -103,16 +97,23 @@
</td>
</tr>
<tr>
<th>
Warranty Provider:
<th>Warranty Provider:
</th>
<td>
@Model.WarrantyProvider.Name (@Model.WarrantyProvider.Id) @Model.WarrantyProvider.PluginManifest.Version.ToString(3)
@if (Model.WarrantyProvider != null)
{
<span>
@Model.WarrantyProvider.Name (@Model.WarrantyProvider.Id) @Model.WarrantyProvider.PluginManifest.Version.ToString(3)
</span>
}
else
{
<span class="smallMessage">None Selected</span>
}
</td>
</tr>
<tr>
<th>
Fault Description:
<th>Fault Description:
</th>
<td>
@Model.FaultDescription.ToMultilineString()
@@ -60,11 +60,11 @@ WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 650px\"");
WriteLiteral(">\r\n <h2>\r\n Submission Error</h2>\r\n <table>\r\n <tr>\r\n " +
" <td>\r\n <div>\r\n <strong>");
WriteLiteral(">\r\n <h2>Submission Error</h2>\r\n <table>\r\n <tr>\r\n <td>\r\n " +
" <div>\r\n <strong>");
#line 14 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 13 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Error.Message);
@@ -87,7 +87,7 @@ WriteLiteral(" style=\"display: none\"");
WriteLiteral(">\r\n <br />\r\n <strong>Error Type: </strong>");
#line 19 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 18 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Error.GetType().Name);
@@ -103,7 +103,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 23 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 22 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Error.StackTrace.ToMultilineString());
@@ -112,13 +112,13 @@ WriteLiteral(" ");
WriteLiteral("\r\n </div>\r\n");
#line 25 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 24 "..\..\Views\Job\LogWarrantyError.cshtml"
#line default
#line hidden
#line 25 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 24 "..\..\Views\Job\LogWarrantyError.cshtml"
if (Model.Error.InnerException != null)
{
@@ -131,7 +131,7 @@ WriteLiteral(" <div>\r\n <stro
"n:</strong> ");
#line 29 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 28 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Error.InnerException.Message);
@@ -140,7 +140,7 @@ WriteLiteral(" <div>\r\n <stro
WriteLiteral("<br />\r\n <strong>Error Type:</strong> ");
#line 30 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 29 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Error.GetType().Name);
@@ -156,7 +156,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 33 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 32 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Error.InnerException.StackTrace);
@@ -165,7 +165,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </div>\r\n </div>\r\n");
#line 36 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 35 "..\..\Views\Job\LogWarrantyError.cshtml"
}
@@ -180,6 +180,7 @@ WriteLiteral(@">
$('#warrantyJobErrorShow').click(function () {
$(this).hide();
$('#warrantyJobErrorMore').slideDown();
return false;
});
});
</script>
@@ -195,38 +196,37 @@ WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 650px; margin-top: 15px;\"");
WriteLiteral(">\r\n <h2>\r\n Warranty Submission Details</h2>\r\n <table>\r\n <tr>\r" +
"\n <th>\r\n Internal Job Id:\r\n </th>\r\n " +
" <td>\r\n");
WriteLiteral(">\r\n <h2>Warranty Submission Details</h2>\r\n <table>\r\n <tr>\r\n " +
" <th>Internal Job Id:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 59 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 57 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.JobId);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Device Serial Number:\r\n </th>\r\n <td>\r\n");
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Device Serial N" +
"umber:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 67 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 64 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Job.Device.SerialNumber);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Device Model:\r\n </th>\r\n <td>\r\n");
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 75 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 71 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Job.Device.DeviceModel.Manufacturer);
@@ -235,19 +235,19 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 75 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 71 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.Job.Device.DeviceModel.Model);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Technician:\r\n </th>\r\n <td>\r\n");
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Technician:\r\n " +
" </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 83 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 78 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.TechUser.DisplayName);
@@ -260,7 +260,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">\r\n Email Address: ");
#line 85 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 80 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.TechUser.EmailAddress);
@@ -269,7 +269,7 @@ WriteLiteral(">\r\n Email Address: ");
WriteLiteral("<br />\r\n Phone Number: ");
#line 86 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 81 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.TechUser.PhoneNumber);
@@ -280,8 +280,7 @@ WriteLiteral("\r\n </div>\r\n </td>\r\n </tr>\r
WriteLiteral(" style=\"width: 150px\"");
WriteLiteral(">\r\n Repair Address:\r\n </th>\r\n <td>\r\n " +
" <div");
WriteLiteral(">Repair Address:\r\n </th>\r\n <td>\r\n <div");
WriteLiteral(" id=\"organisationAddressDetails\"");
@@ -290,7 +289,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 96 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 90 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.OrganisationAddress.Name);
@@ -303,7 +302,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">\r\n <span>");
#line 98 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 92 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.OrganisationAddress.Address);
@@ -312,7 +311,7 @@ WriteLiteral(">\r\n <span>");
WriteLiteral("</span><br />\r\n <span>");
#line 99 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 93 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.OrganisationAddress.Suburb);
@@ -321,7 +320,7 @@ WriteLiteral("</span><br />\r\n <span>");
WriteLiteral(", ");
#line 99 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 93 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.OrganisationAddress.Postcode);
@@ -330,7 +329,7 @@ WriteLiteral(", ");
WriteLiteral("</span><br />\r\n <span>");
#line 100 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 94 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.OrganisationAddress.State);
@@ -339,21 +338,37 @@ WriteLiteral("</span><br />\r\n <span>");
WriteLiteral(", ");
#line 100 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 94 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.OrganisationAddress.Country);
#line default
#line hidden
WriteLiteral("</span>\r\n </div>\r\n </div>\r\n </td>\r\n " +
" </tr>\r\n <tr>\r\n <th>\r\n Warranty Provider:" +
"\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
" </tr>\r\n <tr>\r\n <th>Warranty Provider:\r\n </th" +
">\r\n <td>\r\n");
#line 110 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.WarrantyProvider.Name);
#line 103 "..\..\Views\Job\LogWarrantyError.cshtml"
#line default
#line hidden
#line 103 "..\..\Views\Job\LogWarrantyError.cshtml"
if (Model.WarrantyProvider != null)
{
#line default
#line hidden
WriteLiteral(" <span>\r\n");
WriteLiteral(" ");
#line 106 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.WarrantyProvider.Name);
#line default
@@ -361,8 +376,8 @@ WriteLiteral(" ");
WriteLiteral(" (");
#line 110 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.WarrantyProvider.Id);
#line 106 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.WarrantyProvider.Id);
#line default
@@ -370,19 +385,43 @@ WriteLiteral(" (");
WriteLiteral(") ");
#line 110 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.WarrantyProvider.PluginManifest.Version.ToString(3));
#line 106 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.WarrantyProvider.PluginManifest.Version.ToString(3));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Fault Description:\r\n </th>\r\n <td>\r\n");
WriteLiteral("\r\n </span>\r\n");
#line 108 "..\..\Views\Job\LogWarrantyError.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">None Selected</span>\r\n");
#line 112 "..\..\Views\Job\LogWarrantyError.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Fault Description" +
":\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 118 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 119 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Model.FaultDescription.ToMultilineString());
@@ -397,7 +436,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 124 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 125 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Html.ActionLinkButton("Try Again", MVC.Job.LogWarranty(Model.JobId, null, null)));
@@ -408,7 +447,7 @@ WriteLiteral("\r\n");
WriteLiteral(" ");
#line 125 "..\..\Views\Job\LogWarrantyError.cshtml"
#line 126 "..\..\Views\Job\LogWarrantyError.cshtml"
Write(Html.ActionLinkButton("Return to Job", MVC.Job.Show(Model.JobId)));