Feature #2: Implement Repair Provider

Logging Repair for Non-Warranty jobs has been brought into line with
Logging Warranty. RepairProviderFeature implemented which allows plugins
to be used in submitting jobs to third-parties for repair.
This commit is contained in:
Gary Sharp
2014-07-10 17:45:13 +10:00
parent 5ba9fde10f
commit f4394fe2a0
47 changed files with 4471 additions and 1163 deletions
+98 -48
View File
@@ -110,16 +110,16 @@ WriteLiteral(" <input");
WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"WarrantyAction\"");
WriteLiteral(" name=\"SubmissionAction\"");
WriteAttribute("value", Tuple.Create(" value=\"", 495), Tuple.Create("\"", 552)
WriteAttribute("value", Tuple.Create(" value=\"", 497), Tuple.Create("\"", 554)
#line 12 "..\..\Views\Job\LogWarranty.cshtml"
, Tuple.Create(Tuple.Create("", 503), Tuple.Create<System.Object, System.Int32>(Model.IsCustomProvider ? "Custom" : "Disclose"
, Tuple.Create(Tuple.Create("", 505), Tuple.Create<System.Object, System.Int32>(Model.IsManualProvider ? "Manual" : "Disclose"
#line default
#line hidden
, 503), false)
, 505), false)
);
WriteLiteral(" />\r\n");
@@ -330,7 +330,7 @@ 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>" } })));
Write(Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, AdditionalItems: new Dictionary<string, string>() { { "MANUAL", "<Manually Submitted Claim>" } })));
#line default
@@ -346,30 +346,80 @@ WriteLiteral(" ");
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
WriteLiteral("\r\n");
#line 76 "..\..\Views\Job\LogWarranty.cshtml"
#line 74 "..\..\Views\Job\LogWarranty.cshtml"
#line default
#line hidden
#line 74 "..\..\Views\Job\LogWarranty.cshtml"
if (Model.WarrantyProviders.Count == 0 && Authorization.Has(Claims.Config.Plugin.Install))
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"info-box\"");
WriteLiteral(">\r\n <p");
WriteLiteral(" class=\"fa-p\"");
WriteLiteral(">\r\n <i");
WriteLiteral(" class=\"fa fa-info-circle\"");
WriteLiteral("></i>View the <a");
WriteAttribute("href", Tuple.Create(" href=\"", 3317), Tuple.Create("\"", 3367)
#line 78 "..\..\Views\Job\LogWarranty.cshtml"
, Tuple.Create(Tuple.Create("", 3324), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Plugins.Install())
#line default
#line hidden
, 3324), false)
);
WriteLiteral(">Plugin Catalogue</a> to discover and install warranty provider plugins.\r\n " +
" </p>\r\n </div>\r\n");
#line 81 "..\..\Views\Job\LogWarranty.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 84 "..\..\Views\Job\LogWarranty.cshtml"
#line default
#line hidden
#line 76 "..\..\Views\Job\LogWarranty.cshtml"
if (Model.IsCustomProvider)
#line 84 "..\..\Views\Job\LogWarranty.cshtml"
if (Model.IsManualProvider)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <th>Custom Provider:</th>\r\n " +
" <td>\r\n");
WriteLiteral(" <tr>\r\n <th>Provider Name:</th>\r\n " +
" <td>\r\n");
WriteLiteral(" ");
#line 81 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.EditorFor(model => model.CustomProviderName));
#line 89 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.EditorFor(model => model.ManualProviderName));
#line default
@@ -379,8 +429,8 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" ");
#line 82 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.ValidationMessageFor(m => m.CustomProviderName));
#line 90 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.ValidationMessageFor(m => m.ManualProviderName));
#line default
@@ -393,8 +443,8 @@ WriteLiteral(" <tr>\r\n <th>Provider Job Refer
WriteLiteral(" ");
#line 88 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.EditorFor(model => model.CustomProviderReference));
#line 96 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.EditorFor(model => model.ManualProviderReference));
#line default
@@ -404,8 +454,8 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" ");
#line 89 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.ValidationMessageFor(m => m.CustomProviderReference));
#line 97 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.ValidationMessageFor(m => m.ManualProviderReference));
#line default
@@ -413,7 +463,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 92 "..\..\Views\Job\LogWarranty.cshtml"
#line 100 "..\..\Views\Job\LogWarranty.cshtml"
}
@@ -435,7 +485,7 @@ WriteLiteral(">\r\n <h2>Fault Description</h2>\r\n <table>\r\n
WriteLiteral(" ");
#line 100 "..\..\Views\Job\LogWarranty.cshtml"
#line 108 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.EditorFor(model => model.FaultDescription));
@@ -446,7 +496,7 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" ");
#line 101 "..\..\Views\Job\LogWarranty.cshtml"
#line 109 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.ValidationMessageFor(m => m.FaultDescription));
@@ -455,7 +505,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
#line 106 "..\..\Views\Job\LogWarranty.cshtml"
#line 114 "..\..\Views\Job\LogWarranty.cshtml"
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
{
@@ -471,7 +521,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 109 "..\..\Views\Job\LogWarranty.cshtml"
#line 117 "..\..\Views\Job\LogWarranty.cshtml"
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
@@ -480,7 +530,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </div>\r\n");
#line 111 "..\..\Views\Job\LogWarranty.cshtml"
#line 119 "..\..\Views\Job\LogWarranty.cshtml"
}
@@ -493,14 +543,14 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 113 "..\..\Views\Job\LogWarranty.cshtml"
#line 121 "..\..\Views\Job\LogWarranty.cshtml"
#line default
#line hidden
#line 113 "..\..\Views\Job\LogWarranty.cshtml"
if (Model.IsCustomProvider)
#line 121 "..\..\Views\Job\LogWarranty.cshtml"
if (Model.IsManualProvider)
{
@@ -517,7 +567,7 @@ WriteLiteral(" value=\"Save Warranty Claim\"");
WriteLiteral(" />\r\n");
#line 116 "..\..\Views\Job\LogWarranty.cshtml"
#line 124 "..\..\Views\Job\LogWarranty.cshtml"
}
else
{
@@ -536,7 +586,7 @@ WriteLiteral(" value=\"Preview Warranty Claim\"");
WriteLiteral(" />\r\n");
#line 120 "..\..\Views\Job\LogWarranty.cshtml"
#line 128 "..\..\Views\Job\LogWarranty.cshtml"
}
@@ -545,7 +595,7 @@ WriteLiteral(" />\r\n");
WriteLiteral(" </div>\r\n");
#line 122 "..\..\Views\Job\LogWarranty.cshtml"
#line 130 "..\..\Views\Job\LogWarranty.cshtml"
}
@@ -559,23 +609,23 @@ WriteLiteral(">\r\n $(function () {\r\n var $providerId = $(\'#Warrant
" 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");
"end(\r\n $(\'<input>\').attr({ type: \'hidden\', name: \'SubmissionActio" +
"n\', value: \'Update\' })\r\n ).append(\r\n $(\'<input>\').attr" +
"({ type: \'hidden\', name: \'JobId\', value: $(\'#JobId\').val() })\r\n ).app" +
"end(\r\n $(\'<input>\').attr({ type: \'hidden\', name: \'WarrantyProvide" +
"rId\', value: $providerId.val() })\r\n ).append(\r\n $(\'<in" +
"put>\').attr({ type: \'hidden\', name: \'OrganisationAddressId\', value: $addressId.v" +
"al() })\r\n ).append(\r\n $(\'<input>\').attr({ type: \'hidde" +
"n\', name: \'FaultDescription\', value: $(\'#FaultDescription\').val() })\r\n " +
" ).append(\r\n $(\'<input>\').attr({ type: \'hidden\', name: \'ManualPr" +
"oviderName\', value: $(\'#ManualProviderName\').val() })\r\n ).append(\r\n " +
" $(\'<input>\').attr({ type: \'hidden\', name: \'ManualProviderReference" +
"\', value: $(\'#ManualProviderReference\').val() })\r\n ).appendTo(\'body\')" +
".submit();\r\n }\r\n\r\n $providerId.change(updateDetails);\r\n $ad" +
"dressId.change(updateDetails);\r\n\r\n var manualProvider = $(\'#ManualProvide" +
"rName\');\r\n if (manualProvider.length > 0 && !manualProvider.val()) {\r\n " +
" manualProvider.focus();\r\n } else {\r\n $(\'#FaultDescrip" +
"tion\').focus();\r\n }\r\n });\r\n</script>\r\n");
}
}