feature: lodge insurance

This commit is contained in:
Gary Sharp
2024-09-25 16:21:51 +10:00
parent 78b7b059ea
commit e0d620bf67
61 changed files with 5861 additions and 1808 deletions
+35 -22
View File
@@ -2,10 +2,11 @@
@{
Authorization.Require(Claims.Job.Actions.LogWarranty);
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Warranty");
}
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
@Html.HiddenFor(m => m.JobId)
@Html.HiddenFor(m => m.OrganisationAddressId)
@@ -16,28 +17,32 @@
<div id="warrantyJobForm" class="form" style="width: 650px">
<table>
<tr>
<th>Internal Job Id:
<th>
Internal Job Id:
</th>
<td>
@Model.JobId
</td>
</tr>
<tr>
<th>Device Serial Number:
<th>
Device Serial Number:
</th>
<td>
@Model.Job.Device.SerialNumber
</td>
</tr>
<tr>
<th>Device Model:
<th>
Device Model:
</th>
<td>
@Model.Job.Device.DeviceModel.Manufacturer @Model.Job.Device.DeviceModel.Model
</td>
</tr>
<tr>
<th>Technician:
<th>
Technician:
</th>
<td>
@Model.TechUser.DisplayName
@@ -48,7 +53,8 @@
</td>
</tr>
<tr>
<th style="width: 150px">Warranty Address:
<th style="width: 150px">
Warranty Address:
</th>
<td>
<div id="organisationAddressDetails">
@@ -62,21 +68,24 @@
</td>
</tr>
<tr>
<th>Warranty Provider:
<th>
Warranty Provider:
</th>
<td>
@Model.WarrantyProvider.Name (@Model.WarrantyProvider.Id) @Model.WarrantyProvider.PluginManifest.Version.ToString(3)
</td>
</tr>
<tr>
<th>Fault Description:
<th>
Fault Description:
</th>
<td>
@Model.FaultDescription.ToMultilineString()
</td>
</tr>
<tr>
<th>Disclosed Information
<th>
Disclosed Information
</th>
<td>
<div id="warrantyDisclosedInformation">
@@ -84,12 +93,15 @@
@foreach (var dp in Model.DiscloseProperties)
{
<tr>
<th>@dp.Key:
</th>
<td>@dp.Value
</td>
</tr>
}
<th>
@dp.Key:
</th>
<td>
@dp.Value
</td>
</tr>
}
</table>
</div>
</td>
@@ -106,14 +118,15 @@
<input type="hidden" name="PublishAttachmentIds" value="@ja.Id" />
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
<span class="icon" title="@ja.Filename">
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" />
</span>
<span class="comments" title="@ja.Comments">
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
{ @ja.DocumentTemplate.Description}
else
{ @ja.Comments }}
{ @ja.DocumentTemplate.Description}
else
{ @ja.Comments }}
</span><span class="author">@ja.TechUser.ToStringFriendly()</span><span class="timestamp" data-livestamp="@(ja.Timestamp.ToUnixEpoc())" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFullDateTime()</span>
</a>
</a>
}
</div>
</div>
@@ -123,7 +136,7 @@
</table>
</div>
<div id="submitDialog" class="dialog" title="Please Wait">
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Submitting Warranty Job...</h4>
<h4><i class="fa fa-lg fa-cog fa-spin" title="Please Wait"></i>Lodging Warranty Claim...</h4>
</div>
<script>
$(function () {
@@ -147,6 +160,6 @@
});
</script>
<div class="actionBar">
<input id="submitJob" type="submit" class="button" value="Submit Warranty Claim" />
<input id="submitJob" type="submit" class="button" value="Lodge Warranty Claim" />
</div>
}