Bug Fix: Warranty Repair list
This commit is contained in:
@@ -150,7 +150,7 @@ namespace Disco.BI.Extensions
|
||||
return !j.ClosedDate.HasValue &&
|
||||
(j.DeviceSerialNumber != null) &&
|
||||
j.JobTypeId == JobType.JobTypeIds.HWar &&
|
||||
string.IsNullOrEmpty(j.JobMetaWarranty.ExternalReference);
|
||||
!j.JobMetaWarranty.ExternalLoggedDate.HasValue;
|
||||
}
|
||||
public static void OnLogWarranty(this Job j, DiscoDataContext Database, string FaultDescription, PluginFeatureManifest WarrantyProviderDefinition, OrganisationAddress Address, User TechUser, Dictionary<string, string> WarrantyProviderProperties)
|
||||
{
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace Disco.Services
|
||||
|
||||
if (j.JobTypeId == JobType.JobTypeIds.HWar)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(j.JobMetaWarranty_ExternalReference) && !j.JobMetaWarranty_ExternalCompletedDate.HasValue)
|
||||
if (j.JobMetaWarranty_ExternalLoggedDate.HasValue && !j.JobMetaWarranty_ExternalCompletedDate.HasValue)
|
||||
return Job.JobStatusIds.AwaitingWarrantyRepair; // Job Logged - but not marked as completed
|
||||
}
|
||||
|
||||
|
||||
@@ -39,19 +39,10 @@
|
||||
<td>
|
||||
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalLoggedDate))
|
||||
{
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate)
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Not Logged", "Job_JobMetaWarranty_ExternalLoggedDate")
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)))',
|
||||
'ExternalLoggedDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
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
|
||||
@@ -89,25 +80,17 @@
|
||||
}
|
||||
</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))
|
||||
{
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate)
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Not Completed", "Job_JobMetaWarranty_ExternalCompletedDate")
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)))',
|
||||
'ExternalCompletedDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
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
|
||||
@@ -116,6 +99,7 @@
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34003
|
||||
// Runtime Version:4.0.30319.34011
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
@@ -213,7 +214,7 @@ WriteLiteral(">Warranty Logged\r\n </th>\r\n <td>\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 42 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate));
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Not Logged", "Job_JobMetaWarranty_ExternalLoggedDate"));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -243,27 +244,29 @@ WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
WriteLiteral(">\r\n document.DiscoFunctions.DateDialogCreateUpdater(\'");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)));
|
||||
#line 45 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalLoggedDate\',\r\n null\r\n" +
|
||||
" );\r\n });\r\n </s" +
|
||||
"cript>\r\n");
|
||||
WriteLiteral("\', \'Warranty Logged\', \'Job_JobMetaWarranty_ExternalLoggedDate\', null, \'WarrantyEx" +
|
||||
"ternalLoggedDate\', \'Not Logged\', \'");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#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
|
||||
{
|
||||
@@ -272,14 +275,14 @@ WriteLiteral("\',\r\n \'ExternalLoggedDate\',\r\n
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Unknown/None", null));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -293,13 +296,13 @@ WriteLiteral(" style=\"width: 200px;\"");
|
||||
WriteLiteral(">Warranty Reference\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 58 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 67 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 58 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalReference))
|
||||
{
|
||||
|
||||
@@ -307,42 +310,42 @@ WriteLiteral(">Warranty Reference\r\n </th>\r\n <td>\r\n")
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 60 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 60 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 70 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 61 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 70 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 61 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 62 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 62 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -360,7 +363,7 @@ WriteLiteral(@">
|
||||
'");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 68 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null)));
|
||||
|
||||
|
||||
@@ -370,7 +373,7 @@ WriteLiteral("\',\r\n \'ExternalReference\'\r\n
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 73 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -386,7 +389,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral("><Unknown/None></span>");
|
||||
|
||||
|
||||
#line 86 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 77 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -394,34 +397,49 @@ WriteLiteral("><Unknown/None></span>");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 79 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Model.Job.JobMetaWarranty.ExternalReference);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 79 "..\..\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");
|
||||
|
||||
|
||||
#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(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">Warranty Completed\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 88 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 96 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 88 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalCompletedDate))
|
||||
{
|
||||
|
||||
@@ -429,28 +447,28 @@ WriteLiteral(">Warranty Completed\r\n </th>\r\n <td>\r\n")
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 98 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate));
|
||||
#line 90 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Not Completed", "Job_JobMetaWarranty_ExternalCompletedDate"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 98 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 90 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 99 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 91 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 99 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 91 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -460,27 +478,29 @@ WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
WriteLiteral(">\r\n document.DiscoFunctions.DateDialogCreateUpdater(\'");
|
||||
|
||||
|
||||
#line 106 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)));
|
||||
#line 93 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalCompletedDate\',\r\n nul" +
|
||||
"l\r\n );\r\n });\r\n " +
|
||||
"</script>\r\n");
|
||||
WriteLiteral("\', \'Warranty Logged\', \'Job_JobMetaWarranty_ExternalCompletedDate\', null, \'Warrant" +
|
||||
"yExternalCompletedDate\', \'Not Completed\', \'");
|
||||
|
||||
|
||||
#line 112 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 93 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToISO8601());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\', false);\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -489,14 +509,14 @@ WriteLiteral("\',\r\n \'ExternalCompletedDate\',\r\n
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 98 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Unknown/None", null));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 98 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -506,13 +526,16 @@ WriteLiteral("\',\r\n \'ExternalCompletedDate\',\r\n
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 102 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
#line 119 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
#line 103 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
@@ -552,7 +575,7 @@ WriteLiteral(" style=\"display: none\"");
|
||||
WriteLiteral(">\r\n </div>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 133 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 117 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -566,13 +589,13 @@ WriteLiteral(">\r\n $(\'#jobDetailTabItems\').append(\'<li><a href=\"#jobDeta
|
||||
"nty</a></li>\');\r\n");
|
||||
|
||||
|
||||
#line 138 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 122 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 138 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 122 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
|
||||
{
|
||||
|
||||
@@ -599,7 +622,7 @@ WriteLiteral(@"
|
||||
'");
|
||||
|
||||
|
||||
#line 157 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 141 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.Job.WarrantyProviderJobDetails()));
|
||||
|
||||
|
||||
@@ -608,7 +631,7 @@ WriteLiteral(@"
|
||||
WriteLiteral("\',\r\n { id: \'");
|
||||
|
||||
|
||||
#line 158 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 142 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Model.Job.Id);
|
||||
|
||||
|
||||
@@ -631,7 +654,7 @@ WriteLiteral(@"' },
|
||||
");
|
||||
|
||||
|
||||
#line 172 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
#line 156 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user