Fix: Remove Unnecessary AJAX at Log Warranty
Page is always refreshed to provide information to Warranty Plugin - generate address UI at server.
This commit is contained in:
@@ -11,32 +11,28 @@
|
|||||||
<div id="warrantyJobForm" class="form" style="width: 650px">
|
<div id="warrantyJobForm" class="form" style="width: 650px">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Internal Job Id:
|
||||||
Internal Job Id:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.JobId
|
@Model.JobId
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Device Serial Number:
|
||||||
Device Serial Number:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.Job.Device.SerialNumber
|
@Model.Job.Device.SerialNumber
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Device Model:
|
||||||
Device Model:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
|
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Technician:
|
||||||
Technician:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Model.TechUser.DisplayName
|
@Model.TechUser.DisplayName
|
||||||
@@ -47,23 +43,32 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 150px">
|
<th style="width: 150px">Repair Address:
|
||||||
Repair Address:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, true))<br />
|
@Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, (Model.OrganisationAddress == null)))<br />
|
||||||
@Html.ValidationMessageFor(m => m.OrganisationAddressId)
|
@Html.ValidationMessageFor(m => m.OrganisationAddressId)
|
||||||
<div id="organisationAddressDetailsLoading" style="display: none">
|
<div id="organisationAddressDetailsLoading" style="display: none">
|
||||||
<img src="@(Links.ClientSource.Style.Images.Status.loading_gif)" alt="Loading" />
|
<img src="@(Links.ClientSource.Style.Images.Status.loading_gif)" alt="Loading" />
|
||||||
<span class="smallMessage">Loading Details...</span>
|
<span class="smallMessage">Loading Details...</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="organisationAddressDetails">
|
<div id="organisationAddressDetails">
|
||||||
|
@{
|
||||||
|
var oa = Model.OrganisationAddress;
|
||||||
|
if (oa != null)
|
||||||
|
{
|
||||||
|
<span>@oa.Address</span>
|
||||||
|
<br />
|
||||||
|
<span>@oa.Suburb, @oa.Postcode</span>
|
||||||
|
<br />
|
||||||
|
<span>@oa.State, @oa.Country</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>Warranty Provider:
|
||||||
Warranty Provider:
|
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true))<br />
|
@Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true))<br />
|
||||||
@@ -73,8 +78,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="warrantyJobFaultDescription" class="form" style="width: 650px; margin-top: 15px;">
|
<div id="warrantyJobFaultDescription" class="form" style="width: 650px; margin-top: 15px;">
|
||||||
<h2>
|
<h2>Fault Description</h2>
|
||||||
Fault Description</h2>
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -103,24 +107,6 @@
|
|||||||
|
|
||||||
var $ProviderId = $('#WarrantyProviderId');
|
var $ProviderId = $('#WarrantyProviderId');
|
||||||
|
|
||||||
var updateOrganisationAddressDetails = function () {
|
|
||||||
$organisationAddressDetails.slideUp();
|
|
||||||
var orgAddressId = $OrganisationAddressId.val();
|
|
||||||
if (orgAddressId) {
|
|
||||||
$organisationAddressDetailsLoading.slideDown();
|
|
||||||
$.getJSON('@(Url.Action(MVC.API.Job.OrganisationAddress()))', { id: orgAddressId }, function (data) {
|
|
||||||
$organisationAddressDetails.empty().append(
|
|
||||||
$('<span>').text(data.Address),
|
|
||||||
'<br />',
|
|
||||||
$('<span>').text(data.Suburb + ', ' + data.Postcode),
|
|
||||||
'<br />',
|
|
||||||
$('<span>').text(data.State + ', ' + data.Country)
|
|
||||||
);
|
|
||||||
$organisationAddressDetailsLoading.slideUp();
|
|
||||||
$organisationAddressDetails.slideDown();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var updateProviderDetails = function () {
|
var updateProviderDetails = function () {
|
||||||
var providerId = $ProviderId.val();
|
var providerId = $ProviderId.val();
|
||||||
var orgAddressId = $OrganisationAddressId.val();
|
var orgAddressId = $OrganisationAddressId.val();
|
||||||
@@ -129,8 +115,7 @@
|
|||||||
window.location.href = '@(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)))?WarrantyProviderId=' + providerId + '&OrganisationAddressId=' + orgAddressId;
|
window.location.href = '@(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)))?WarrantyProviderId=' + providerId + '&OrganisationAddressId=' + orgAddressId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$OrganisationAddressId.change(updateOrganisationAddressDetails).change(updateProviderDetails);
|
$OrganisationAddressId.change(updateProviderDetails);
|
||||||
$ProviderId.change(updateProviderDetails);
|
$ProviderId.change(updateProviderDetails);
|
||||||
updateOrganisationAddressDetails();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.18033
|
// Runtime Version:4.0.30319.18051
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -118,39 +118,37 @@ WriteLiteral(" class=\"form\"");
|
|||||||
|
|
||||||
WriteLiteral(" style=\"width: 650px\"");
|
WriteLiteral(" style=\"width: 650px\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n I" +
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>Internal Job Id:\r\n " +
|
||||||
"nternal Job Id:\r\n </th>\r\n <td>\r\n");
|
" </th>\r\n <td>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 18 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 17 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Model.JobId);
|
Write(Model.JobId);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||||
">\r\n Device Serial Number:\r\n </th>\r\n " +
|
">Device Serial Number:\r\n </th>\r\n <td>\r\n");
|
||||||
" <td>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 26 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 24 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Model.Job.Device.SerialNumber);
|
Write(Model.Job.Device.SerialNumber);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||||
">\r\n Device Model:\r\n </th>\r\n <td" +
|
">Device Model:\r\n </th>\r\n <td>\r\n");
|
||||||
">\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 34 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 31 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
||||||
|
|
||||||
|
|
||||||
@@ -159,20 +157,19 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 34 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 31 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Model.Job.Device.DeviceModel.Model);
|
Write(Model.Job.Device.DeviceModel.Model);
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||||
">\r\n Technician:\r\n </th>\r\n <td>\r" +
|
">Technician:\r\n </th>\r\n <td>\r\n");
|
||||||
"\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 42 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 38 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Model.TechUser.DisplayName);
|
Write(Model.TechUser.DisplayName);
|
||||||
|
|
||||||
|
|
||||||
@@ -185,7 +182,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
|||||||
WriteLiteral(">\r\n Email Address: ");
|
WriteLiteral(">\r\n Email Address: ");
|
||||||
|
|
||||||
|
|
||||||
#line 44 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 40 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Model.TechUser.EmailAddress);
|
Write(Model.TechUser.EmailAddress);
|
||||||
|
|
||||||
|
|
||||||
@@ -194,7 +191,7 @@ WriteLiteral(">\r\n Email Address: ");
|
|||||||
WriteLiteral("<br />\r\n Phone Number: ");
|
WriteLiteral("<br />\r\n Phone Number: ");
|
||||||
|
|
||||||
|
|
||||||
#line 45 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 41 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Model.TechUser.PhoneNumber);
|
Write(Model.TechUser.PhoneNumber);
|
||||||
|
|
||||||
|
|
||||||
@@ -205,14 +202,13 @@ WriteLiteral("\r\n </div>\r\n </td>\r\n
|
|||||||
|
|
||||||
WriteLiteral(" style=\"width: 150px\"");
|
WriteLiteral(" style=\"width: 150px\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n Repair Address:\r\n </th>\r\n <t" +
|
WriteLiteral(">Repair Address:\r\n </th>\r\n <td>\r\n");
|
||||||
"d>\r\n");
|
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 54 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 49 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, true)));
|
Write(Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, (Model.OrganisationAddress == null))));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -222,7 +218,7 @@ WriteLiteral("<br />\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 55 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 50 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Html.ValidationMessageFor(m => m.OrganisationAddressId));
|
Write(Html.ValidationMessageFor(m => m.OrganisationAddressId));
|
||||||
|
|
||||||
|
|
||||||
@@ -236,14 +232,14 @@ WriteLiteral(" style=\"display: none\"");
|
|||||||
|
|
||||||
WriteLiteral(">\r\n <img");
|
WriteLiteral(">\r\n <img");
|
||||||
|
|
||||||
WriteAttribute("src", Tuple.Create(" src=\"", 2154), Tuple.Create("\"", 2213)
|
WriteAttribute("src", Tuple.Create(" src=\"", 2075), Tuple.Create("\"", 2134)
|
||||||
|
|
||||||
#line 57 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 52 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 2160), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Status.loading_gif
|
, Tuple.Create(Tuple.Create("", 2081), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Status.loading_gif
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 2160), false)
|
, 2081), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" alt=\"Loading\"");
|
WriteLiteral(" alt=\"Loading\"");
|
||||||
@@ -256,14 +252,94 @@ WriteLiteral(">Loading Details...</span>\r\n </div>\r\n
|
|||||||
|
|
||||||
WriteLiteral(" id=\"organisationAddressDetails\"");
|
WriteLiteral(" id=\"organisationAddressDetails\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n </div>\r\n </td>\r\n </tr>\r\n " +
|
WriteLiteral(">\r\n");
|
||||||
" <tr>\r\n <th>\r\n Warranty Provider:\r\n " +
|
|
||||||
" </th>\r\n <td>\r\n");
|
|
||||||
|
#line 56 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 56 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
|
||||||
|
var oa = Model.OrganisationAddress;
|
||||||
|
if (oa != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" <span>");
|
||||||
|
|
||||||
|
|
||||||
|
#line 60 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(oa.Address);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</span>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" <br />\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" <span>");
|
||||||
|
|
||||||
|
|
||||||
|
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(oa.Suburb);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(", ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(oa.Postcode);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</span>\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" <br />\r\n");
|
||||||
|
|
||||||
|
WriteLiteral(" <span>");
|
||||||
|
|
||||||
|
|
||||||
|
#line 64 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(oa.State);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(", ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 64 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
|
Write(oa.Country);
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("</span>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 65 "..\..\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(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 69 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 74 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true)));
|
Write(Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true)));
|
||||||
|
|
||||||
|
|
||||||
@@ -274,7 +350,7 @@ WriteLiteral("<br />\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 70 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 75 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Html.ValidationMessageFor(m => m.WarrantyProviderId));
|
Write(Html.ValidationMessageFor(m => m.WarrantyProviderId));
|
||||||
|
|
||||||
|
|
||||||
@@ -290,13 +366,13 @@ WriteLiteral(" class=\"form\"");
|
|||||||
|
|
||||||
WriteLiteral(" style=\"width: 650px; margin-top: 15px;\"");
|
WriteLiteral(" style=\"width: 650px; margin-top: 15px;\"");
|
||||||
|
|
||||||
WriteLiteral(">\r\n <h2>\r\n Fault Description</h2>\r\n <table>\r\n " +
|
WriteLiteral(">\r\n <h2>Fault Description</h2>\r\n <table>\r\n <tr>\r\n " +
|
||||||
" <tr>\r\n <td>\r\n");
|
" <td>\r\n");
|
||||||
|
|
||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 81 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 85 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Html.EditorFor(model => model.FaultDescription));
|
Write(Html.EditorFor(model => model.FaultDescription));
|
||||||
|
|
||||||
|
|
||||||
@@ -307,7 +383,7 @@ WriteLiteral("<br />\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 82 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 86 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Html.ValidationMessageFor(m => m.FaultDescription));
|
Write(Html.ValidationMessageFor(m => m.FaultDescription));
|
||||||
|
|
||||||
|
|
||||||
@@ -316,7 +392,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 87 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 91 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -332,7 +408,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 90 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 94 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
|
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
|
||||||
|
|
||||||
|
|
||||||
@@ -341,7 +417,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("\r\n </div>\r\n");
|
WriteLiteral("\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 92 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 96 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -362,7 +438,7 @@ WriteLiteral(" value=\"Preview Warranty Claim\"");
|
|||||||
WriteLiteral(" />\r\n </div>\r\n");
|
WriteLiteral(" />\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 96 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 100 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -381,33 +457,6 @@ WriteLiteral(@">
|
|||||||
|
|
||||||
var $ProviderId = $('#WarrantyProviderId');
|
var $ProviderId = $('#WarrantyProviderId');
|
||||||
|
|
||||||
var updateOrganisationAddressDetails = function () {
|
|
||||||
$organisationAddressDetails.slideUp();
|
|
||||||
var orgAddressId = $OrganisationAddressId.val();
|
|
||||||
if (orgAddressId) {
|
|
||||||
$organisationAddressDetailsLoading.slideDown();
|
|
||||||
$.getJSON('");
|
|
||||||
|
|
||||||
|
|
||||||
#line 111 "..\..\Views\Job\LogWarranty.cshtml"
|
|
||||||
Write(Url.Action(MVC.API.Job.OrganisationAddress()));
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
|
||||||
#line hidden
|
|
||||||
WriteLiteral(@"', { id: orgAddressId }, function (data) {
|
|
||||||
$organisationAddressDetails.empty().append(
|
|
||||||
$('<span>').text(data.Address),
|
|
||||||
'<br />',
|
|
||||||
$('<span>').text(data.Suburb + ', ' + data.Postcode),
|
|
||||||
'<br />',
|
|
||||||
$('<span>').text(data.State + ', ' + data.Country)
|
|
||||||
);
|
|
||||||
$organisationAddressDetailsLoading.slideUp();
|
|
||||||
$organisationAddressDetails.slideDown();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var updateProviderDetails = function () {
|
var updateProviderDetails = function () {
|
||||||
var providerId = $ProviderId.val();
|
var providerId = $ProviderId.val();
|
||||||
var orgAddressId = $OrganisationAddressId.val();
|
var orgAddressId = $OrganisationAddressId.val();
|
||||||
@@ -416,21 +465,16 @@ WriteLiteral(@"', { id: orgAddressId }, function (data) {
|
|||||||
window.location.href = '");
|
window.location.href = '");
|
||||||
|
|
||||||
|
|
||||||
#line 129 "..\..\Views\Job\LogWarranty.cshtml"
|
#line 115 "..\..\Views\Job\LogWarranty.cshtml"
|
||||||
Write(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)));
|
Write(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(@"?WarrantyProviderId=' + providerId + '&OrganisationAddressId=' + orgAddressId;
|
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" +
|
||||||
$OrganisationAddressId.change(updateOrganisationAddressDetails).change(updateProviderDetails);
|
"");
|
||||||
$ProviderId.change(updateProviderDetails);
|
|
||||||
updateOrganisationAddressDetails();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user