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:
@@ -9,7 +9,7 @@
|
||||
@Html.ValidationSummary(true)
|
||||
@Html.HiddenFor(m => m.JobId)
|
||||
@Html.ValidationMessageFor(m => m.JobId)
|
||||
<input type="hidden" name="WarrantyAction" value="@(Model.IsCustomProvider ? "Custom" : "Disclose")" />
|
||||
<input type="hidden" name="SubmissionAction" value="@(Model.IsManualProvider ? "Manual" : "Disclose")" />
|
||||
<div id="warrantyJobForm" class="form" style="width: 650px">
|
||||
<table>
|
||||
<tr>
|
||||
@@ -69,24 +69,32 @@
|
||||
<th>Warranty Provider:
|
||||
</th>
|
||||
<td>
|
||||
@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.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, AdditionalItems: new Dictionary<string, string>() { { "MANUAL", "<Manually Submitted Claim>" } }))<br />
|
||||
@Html.ValidationMessageFor(m => m.WarrantyProviderId)
|
||||
@if (Model.WarrantyProviders.Count == 0 && Authorization.Has(Claims.Config.Plugin.Install))
|
||||
{
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>View the <a href="@(Url.Action(MVC.Config.Plugins.Install()))">Plugin Catalogue</a> to discover and install warranty provider plugins.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@if (Model.IsCustomProvider)
|
||||
@if (Model.IsManualProvider)
|
||||
{
|
||||
<tr>
|
||||
<th>Custom Provider:</th>
|
||||
<th>Provider Name:</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.CustomProviderName)<br />
|
||||
@Html.ValidationMessageFor(m => m.CustomProviderName)
|
||||
@Html.EditorFor(model => model.ManualProviderName)<br />
|
||||
@Html.ValidationMessageFor(m => m.ManualProviderName)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Provider Job Reference:</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.CustomProviderReference)<br />
|
||||
@Html.ValidationMessageFor(m => m.CustomProviderReference)
|
||||
@Html.EditorFor(model => model.ManualProviderReference)<br />
|
||||
@Html.ValidationMessageFor(m => m.ManualProviderReference)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@@ -110,7 +118,7 @@
|
||||
</div>
|
||||
}
|
||||
<div class="actionBar">
|
||||
@if (Model.IsCustomProvider)
|
||||
@if (Model.IsManualProvider)
|
||||
{
|
||||
<input type="submit" class="button" value="Save Warranty Claim" />
|
||||
}
|
||||
@@ -130,7 +138,7 @@
|
||||
action: $providerId.closest('form').attr('action'),
|
||||
method: 'post'
|
||||
}).append(
|
||||
$('<input>').attr({ type: 'hidden', name: 'WarrantyAction', value: 'Update' })
|
||||
$('<input>').attr({ type: 'hidden', name: 'SubmissionAction', value: 'Update' })
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: 'JobId', value: $('#JobId').val() })
|
||||
).append(
|
||||
@@ -140,18 +148,18 @@
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: 'FaultDescription', value: $('#FaultDescription').val() })
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: 'CustomProviderName', value: $('#CustomProviderName').val() })
|
||||
$('<input>').attr({ type: 'hidden', name: 'ManualProviderName', value: $('#ManualProviderName').val() })
|
||||
).append(
|
||||
$('<input>').attr({ type: 'hidden', name: 'CustomProviderReference', value: $('#CustomProviderReference').val() })
|
||||
$('<input>').attr({ type: 'hidden', name: 'ManualProviderReference', value: $('#ManualProviderReference').val() })
|
||||
).appendTo('body').submit();
|
||||
}
|
||||
|
||||
$providerId.change(updateDetails);
|
||||
$addressId.change(updateDetails);
|
||||
|
||||
var customProvider = $('#CustomProviderName');
|
||||
if (customProvider.length > 0 && !customProvider.val()) {
|
||||
customProvider.focus();
|
||||
var manualProvider = $('#ManualProviderName');
|
||||
if (manualProvider.length > 0 && !manualProvider.val()) {
|
||||
manualProvider.focus();
|
||||
} else {
|
||||
$('#FaultDescription').focus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user