@model Disco.Web.Models.Job.ShowModel @using Disco.Models.Services.Jobs; @using Disco.Services.Users.UserFlags; @using Disco.Services.Devices.DeviceFlags; @{ Authorization.Require(Claims.Job.Show); }
@Model.Job.JobType.Description
@Model.Job.JobType.Description@using (Html.BeginForm(MVC.API.Job.UpdateSubTypes(Model.Job.Id, redirect: true), FormMethod.Post, new { id = "formUpdateJobTypes" })) { @Html.AntiForgeryToken() @CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3)
@Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel)
}
|
@if (Model.Job.Device != null)
{
@if (Authorization.Has(Claims.Device.Show)) {@Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber))} else {@Model.Job.DeviceSerialNumber}@Model.Job.Device.ComputerName
@Html.ActionLink(Model.Job.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Job.Device.DeviceModelId))
@if (Model.Job.Device.DeviceBatch != null)
{
@Html.ActionLink(Model.Job.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Job.Device.DeviceBatchId))
}
@if (Model.Job.Device.DeviceBatch != null)
{
if (Model.Job.JobTypeId == JobType.JobTypeIds.HWar)
{
DEVICE WARRANTY
Until: @Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToFullDateTime("Unknown")
@if (!string.IsNullOrWhiteSpace(Model.Job.Device.DeviceBatch.WarrantyDetails))
{
Show Details
@(new HtmlString(Model.Job.Device.DeviceBatch.WarrantyDetails))
INSURANCE
@Model.Job.Device.DeviceBatch.InsuranceSupplier
Until: @Model.Job.Device.DeviceBatch.InsuredUntil.ToFullDateTime("Unknown")
@if (!string.IsNullOrWhiteSpace(Model.Job.Device.DeviceBatch.InsuranceDetails))
{
Show Details
@(new HtmlString(Model.Job.Device.DeviceBatch.InsuranceDetails))
@foreach (var flag in Model.Job.Device.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
{
if (flag.Item2.permission.CanShow())
{
@flag.Item2.flag.Name
@if (flag.Item1.Comments != null) {@flag.Item1.Comments.ToHtmlComment()}
@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)
}
}
}
|
}
@if (Model.Job.User != null)
{
@if (Model.HasUserPhoto)
{
@if (Authorization.Has(Claims.User.Show)) {@Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId))} else {@Model.Job.User.DisplayName}@Model.Job.User.FriendlyId()
@if (Authorization.Has(Claims.User.ShowDetails))
{
if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
{Phone: @Model.Job.User.PhoneNumber }
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
{Email: @Model.Job.User.EmailAddress }
}
@if (Model.Job.User.UserFlagAssignments.CanShowAny())
{
@foreach (var flag in Model.Job.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
{
if (flag.Item2.permission.CanShow())
{
@flag.Item2.flag.Name
@if (flag.Item1.Comments != null) {@flag.Item1.Comments.ToHtmlComment()}
@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)
}
}
}
@if (Model.Job.WaitingForUserAction.HasValue)
{
Awaiting ActionSince: @Model.Job.WaitingForUserAction.ToFullDateTime()
@foreach (var detail in Model.UserDetails.Where(d => !d.Key.EndsWith("&")))
{
}
@detail.Key.TrimEnd('*'):
@if (detail.Key.EndsWith("*"))
{
[reveal]
}
else
{
@Html.Partial(MVC.Shared.Views._CustomDetailValueRender, detail)
}
}
|
}
||||||||||||||||
|
@{
List Are you sure?
Reason:}
@using (Html.BeginForm(MVC.API.Job.Close(Model.Job.Id, true)))
{
@Html.AntiForgeryToken()
}
}
@if (Model.Job.CanReopen())
{
Are you sure?
@using (Html.BeginForm(MVC.API.Job.Reopen(Model.Job.Id, true)))
{
@Html.AntiForgeryToken()
}
}
@if (Model.Job.CanDelete())
{
Are you sure?
@using (Html.BeginForm(MVC.API.Job.Delete(Model.Job.Id, true)))
{
@Html.AntiForgeryToken()
}
}
@if (Model.Job.CanAddQueues() && Model.AvailableQueues != null && Model.AvailableQueues.Count > 0)
{
var priorityValue = JobQueuePriority.Normal.ToString();
var priorityItems = Enum.GetNames(typeof(JobQueuePriority)).Select(i => new SelectListItem() { Text = i, Value = i, Selected = (i == priorityValue) }).ToList();
var slaOptions = Disco.Services.Jobs.JobQueues.JobQueueService.SlaOptions.Select(o => new SelectListItem() { Text = o.Value, Value = o.Key.ToString() }).ToList();
This item will be permanently deleted and cannot be recovered. Are you sure?
@using (Html.BeginForm(MVC.API.JobQueueJob.AddJob()))
{
@Html.AntiForgeryToken()
}
@if (Model.Job.CanLogWarranty())
{
@Html.ActionLinkSmallButton("Lodge Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogWarranty_Button")
}
@if (Model.Job.CanWarrantyCompleted())
{
using (Html.BeginForm(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true)))
{
@Html.AntiForgeryToken()
}
}
@if (Model.Job.CanLogInsurance())
{
@Html.ActionLinkSmallButton("Lodge Insurance", MVC.Job.LogInsurance(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogInsurance_Button", "alert")
}
@if (Model.Job.CanLogRepair())
{
@Html.ActionLinkSmallButton("Lodge Repair", MVC.Job.LogRepair(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogRepair_Button")
}
@if (Model.Job.CanRepairComplete())
{
using (Html.BeginForm(MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true)))
{
@Html.AntiForgeryToken()
}
}
@if (Model.Job.CanConvertHWarToHNWar())
{
@foreach (var jobQueue in Model.AvailableQueues.OrderBy(jq => jq.Name))
{
@jobQueue.Name
}
Job Priority@Html.DropDownList("Priority", priorityItems, new { id = "Job_Show_Job_Actions_AddQueue_Priority" })SLA Target@Html.DropDownList("SLAExpiresMinutes", slaOptions, new { id = "Job_Show_Job_Actions_AddQueue_SLAExpiresMinutes" })Tasks/Comment
@using (Html.BeginForm(MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true)))
{
@Html.AntiForgeryToken()
}
}
This process is not reversible. |
@if (Model.Job.Device != null)
{
@if (Model.Job.CanDeviceHeld()) { using (Html.BeginForm(MVC.API.Job.DeviceHeld(Model.Job.Id, true))) { @Html.AntiForgeryToken() } } @if (Model.Job.CanDeviceReadyForReturn()) { using (Html.BeginForm(MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true))) { @Html.AntiForgeryToken() } } @if (Model.Job.CanDeviceReturned()) { using (Html.BeginForm(MVC.API.Job.DeviceReturned(Model.Job.Id, true))) { @Html.AntiForgeryToken() } } | } @if (Model.Job.User != null) {
@if (Model.Job.CanWaitingForUserAction())
{
Awaiting User Action
@using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true)))
{
@Html.AntiForgeryToken()
}
@if (Model.Job.CanNotWaitingForUserAction())
{
User Action Resolved
Reason:}
@using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true)))
{
@Html.AntiForgeryToken()
}
Resolution:} |
}