Files
Disco/Disco.Web/Views/Job/LogInsuranceError.cshtml
T
2024-09-25 16:21:51 +10:00

121 lines
4.3 KiB
Plaintext

@model Disco.Web.Models.Job.LogInsuranceModel
@{
Authorization.RequireAny(Claims.Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent, Claims.Job.Actions.LogInsurance);
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Insurance Claim Error");
}
<div class="form" style="width: 650px">
<h2>Submission Error</h2>
<table>
<tr>
<td>
<div>
<strong>@Model.Error.Message</strong>
</div>
<a href="#" id="errorShow" class="smallMessage">(show more)</a>
<div id="errorMore" style="display: none">
<br />
<strong>Error Type: </strong>@Model.Error.GetType().Name
<br />
<strong>Stack Trace:</strong>
<div class="code">
@Model.Error.StackTrace.ToMultilineString()
</div>
@if (Model.Error.InnerException != null)
{
<hr />
<div>
<strong>Inner Exception:</strong> @Model.Error.InnerException.Message<br />
<strong>Error Type:</strong> @Model.Error.GetType().Name<br />
<strong>Stack Trace:</strong>
<div class="code">
@Model.Error.InnerException.StackTrace
</div>
</div>
}
</div>
<script type="text/javascript">
$(function () {
$('#errorShow').click(function () {
$(this).hide();
$('#errorMore').slideDown();
return false;
});
});
</script>
</td>
</tr>
</table>
</div>
<div id="insuranceJobForm" class="form" style="width: 650px; margin-top: 15px;">
<h2>Insurance Submission Details</h2>
<table>
<tr>
<th>Internal Job Id:
</th>
<td>
@Model.JobId
</td>
</tr>
<tr>
<th>Device Serial Number:
</th>
<td>
@Model.Job.Device.SerialNumber
</td>
</tr>
<tr>
<th>Device Model:
</th>
<td>
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
</td>
</tr>
<tr>
<th>Technician:
</th>
<td>
@Model.TechUser.DisplayName
<div class="smallMessage">
Email Address: @Model.TechUser.EmailAddress<br />
Phone Number: @Model.TechUser.PhoneNumber
</div>
</td>
</tr>
<tr>
<th style="width: 150px">Address:
</th>
<td>
<div id="organisationAddressDetails">
@Model.OrganisationAddress.Name
<div class="smallMessage">
<span>@Model.OrganisationAddress.Address</span><br />
<span>@Model.OrganisationAddress.Suburb, @Model.OrganisationAddress.Postcode</span><br />
<span>@Model.OrganisationAddress.State, @Model.OrganisationAddress.Country</span>
</div>
</div>
</td>
</tr>
<tr>
<th>Provider:
</th>
<td>
@if (Model.Provider != null)
{
<span>
@Model.Provider.Name (@Model.Provider.Id) @Model.Provider.PluginManifest.Version.ToString(3)
</span>
}
else
{
<span class="smallMessage">None Selected</span>
}
</td>
</tr>
</table>
</div>
<div class="actionBar">
@Html.ActionLinkButton("Try Again", MVC.Job.LogInsurance(Model.JobId, null, null))
@Html.ActionLinkButton("Return to Job", MVC.Job.Show(Model.JobId))
</div>