Feature: Job Queues

Also UI style, theme and element changes
This commit is contained in:
Gary Sharp
2014-02-03 14:50:08 +11:00
parent bdb3e1e6b4
commit 3f63281dc4
212 changed files with 17334 additions and 5441 deletions
+394
View File
@@ -0,0 +1,394 @@
@model Disco.Web.Models.Job.ShowModel
@using Disco.Services.Jobs.JobQueues;
@{
Authorization.Require(Claims.Job.ShowJobsQueues);
var hasAddOwn = Authorization.Has(Claims.Job.Actions.AddOwnQueues);
var hasAddAny = Authorization.Has(Claims.Job.Actions.AddAnyQueues);
var hasRemoveOwn = Authorization.Has(Claims.Job.Actions.RemoveOwnQueues);
var hasRemoveAny = Authorization.Has(Claims.Job.Actions.RemoveAnyQueues);
var hasJobQueueShow = Authorization.Has(Claims.Config.JobQueue.Show);
var queues = JobQueueService.GetQueues();
var queueHistory = Model.Job.JobQueues.Select(jq => new Tuple<JobQueueJob, JobQueueToken>(jq, queues.First(q => q.JobQueue.Id == jq.JobQueueId))).OrderBy(jq => jq.Item1.AddedDate).ToList();
}
@if (queueHistory.Count > 0)
{
<table id="jobQueues">
<tr>
<th class="name">Name</th>
<th class="added">Added</th>
<th class="removed">Removed</th>
<th class="sla">SLA</th>
</tr>
@foreach (var jq in queueHistory.OrderByDescending(jqj => jqj.Item1.AddedDate))
{
bool overdue = (jq.Item1.SLAExpiresDate.HasValue && jq.Item1.SLAExpiresDate.Value < (jq.Item1.RemovedDate.HasValue ? jq.Item1.RemovedDate : DateTime.Now));
<tr data-jobqueuejobid="@jq.Item1.Id" data-jobqueuejobaddeddate="@(jq.Item1.AddedDate.ToString("s"))" class="@(!jq.Item1.RemovedDate.HasValue ? "added" : "removed")">
<td class="name">
<i class="fa fa-@(jq.Item2.JobQueue.Icon) fa-fw fa-lg d-@(jq.Item2.JobQueue.IconColour)"></i>
@if (hasJobQueueShow)
{
@Html.ActionLink(jq.Item2.JobQueue.Name, MVC.Config.JobQueue.Index(jq.Item2.JobQueue.Id))
}
else
{
@jq.Item2.JobQueue.Name
}
@if (jq.Item2.JobQueue.Priority != JobQueuePriority.Normal)
{
<i class="fa d-priority-@(jq.Item2.JobQueue.Priority.ToString().ToLower())" title="@(jq.Item2.JobQueue.Priority.ToString()) Queue Priority"></i>
}
</td>
<td class="added">
@if (jq.Item1.CanEditAddedComment())
{
<i class="fa fa-fw fa-edit" title="Edit Comment"></i>
}
@if (jq.Item1.AddedComment == null)
{
<div class="comments smallMessage">[no comment]</div>
}
else
{
<div class="comments">@jq.Item1.AddedComment</div>
}
<div class="when">@CommonHelpers.FriendlyDateAndUser(jq.Item1.AddedDate, jq.Item1.AddedUser)</div>
</td>
<td class="removed@(!jq.Item1.RemovedDate.HasValue ? " na" : null)">
@if (jq.Item1.RemovedDate.HasValue)
{
if (jq.Item1.CanEditRemovedComment())
{
<i class="fa fa-fw fa-edit" title="Edit Comment"></i>
}
if (jq.Item1.RemovedComment == null)
{
<div class="comments smallMessage">[no comment]</div>
}
else
{
<div class="comments">@jq.Item1.RemovedComment</div>
}
<div class="when">@CommonHelpers.FriendlyDateAndUser(jq.Item1.RemovedDate.Value, jq.Item1.RemovedUser)</div>
}
else if (jq.Item1.CanRemove())
{
@Html.ActionLinkSmallButton("Remove", MVC.API.JobQueueJob.RemoveJob(jq.Item1.Id, null), null, (jq.Item1.CanCloseJobNormallyAfterRemoved() ? "remove canCloseNormally" : "remove"))
}
else
{
<span class="smallMessage">In Progress</span>
}
</td>
<td class="sla @(overdue ? "overdue" : null) @(jq.Item1.CanEditSla() ? "canEditSLA" : null) @(jq.Item1.CanEditPriority() ? "canEditPriority" : null)" data-priority="@(jq.Item1.Priority.ToString())" data-sla="@(jq.Item1.SLAExpiresDate.HasValue ? jq.Item1.SLAExpiresDate.Value.ToString("s") : null)">
@if (jq.Item1.CanEditSla() || jq.Item1.CanEditPriority())
{
<i class="fa fa-fw fa-edit" title="Edit SLA"></i>
}
<i class="fa d-priority-@(jq.Item1.Priority.ToString().ToLower())" title="@(jq.Item1.Priority.ToString()) Job Priority"></i>
@if (jq.Item1.SLAExpiresDate.HasValue)
{
if (jq.Item1.RemovedDate.HasValue)
{
@CommonHelpers.FriendlyDate(jq.Item1.SLAExpiresDate.Value, WithoutSuffix: true)
if (jq.Item1.RemovedDate.Value <= jq.Item1.SLAExpiresDate.Value)
{
<span>early</span>
}
else
{
<span>late</span>
}
}
else
{
<span>due </span>@CommonHelpers.FriendlyDate(jq.Item1.SLAExpiresDate.Value)
}
}
</td>
</tr>
}
</table>
<div id="Job_Show_Queues_Actions_Remove_Dialog" class="dialog" title="Remove this Job from the queue?">
@using (Html.BeginForm(MVC.API.JobQueueJob.RemoveJob()))
{
<input id="Job_Show_Queues_Actions_Remove_Dialog_Id" type="hidden" name="id" value="" />
<p>
<i class="fa fa-exclamation-triangle fa-lg"></i>&nbsp;Are you sure?
</p>
<h3>Comment:</h3>
<p>
<textarea name="Comment" class="block"></textarea>
</p>
<div id="Job_Show_Queues_Actions_Remove_Dialog_CloseJob_Container">
<input id="Job_Show_Queues_Actions_Remove_Dialog_CloseJob" type="checkbox" name="CloseJob" value="true" />
<label for="Job_Show_Queues_Actions_Remove_Dialog_CloseJob">Close the Job</label>
</div>
}
</div>
<div id="Job_Show_Queues_Actions_EditAddedComment_Dialog" class="dialog" title="Edit the Added Comment">
@using (Html.BeginForm(MVC.API.JobQueueJob.UpdateAddedComment()))
{
<input id="Job_Show_Queues_Actions_EditAddedComment_Dialog_Id" type="hidden" name="id" value="" />
<input type="hidden" name="redirect" value="true" />
<h4>Comment:</h4>
<p>
<textarea id="Job_Show_Queues_Actions_EditAddedComment_Dialog_Comment" name="AddedComment" class="block"></textarea>
</p>
}
</div>
<div id="Job_Show_Queues_Actions_EditRemovedComment_Dialog" class="dialog" title="Edit the Removed Comment">
@using (Html.BeginForm(MVC.API.JobQueueJob.UpdateRemovedComment()))
{
<input id="Job_Show_Queues_Actions_EditRemovedComment_Dialog_Id" type="hidden" name="id" value="" />
<input type="hidden" name="redirect" value="true" />
<h4>Comment:</h4>
<p>
<textarea id="Job_Show_Queues_Actions_EditRemovedComment_Dialog_Comment" name="RemovedComment" class="block"></textarea>
</p>
}
</div>
<div id="Job_Show_Queues_Actions_EditSla_Dialog" class="dialog" title="Edit the SLA">
@using (Html.BeginForm(MVC.API.JobQueueJob.UpdateSlaAndPriority()))
{
<input id="Job_Show_Queues_Actions_EditSla_Dialog_Id" type="hidden" name="id" value="" />
<input type="hidden" name="redirect" value="true" />
<div class="priority">
<h4>Job Priority:</h4>
<p>
<i class="fa"></i>
<select id="Job_Show_Queues_Actions_EditSla_Dialog_Priority" name="Priority" autofocus="autofocus">
@foreach (var priorityItem in Enum.GetNames(typeof(JobQueuePriority)))
{
<option value="@(priorityItem)">@(priorityItem)</option>
}
</select>
</p>
</div>
<div class="sla">
<h4>SLA Target:</h4>
<p>
<input id="Job_Show_Queues_Actions_EditSla_Dialog_Sla" name="Sla" type="text" placeholder="None" />
</p>
</div>
}
</div>
<script type="text/javascript">
$(function () {
var jobQueues = $('#jobQueues');
var dialog = null;
var dialogEditAddedComment = null;
var dialogEditRemovedComment = null;
var dialogEditSla = null;
var dialogEditSla_BothUrl = '@(Url.Action(MVC.API.JobQueueJob.UpdateSlaAndPriority()))';
var dialogEditSla_SlaUrl = '@(Url.Action(MVC.API.JobQueueJob.UpdateSla()))';
var dialogEditSla_PriorityUrl = '@(Url.Action(MVC.API.JobQueueJob.UpdatePriority()))';
jobQueues.on('click', 'a.remove', function (e) {
var $this = $(this);
var jobQueueJobId = $this.closest('tr').attr('data-jobqueuejobid');
if (!dialog) {
dialog = $('#Job_Show_Queues_Actions_Remove_Dialog');
dialog.dialog({
resizable: false,
modal: true,
autoOpen: false,
buttons: {
"Remove Job": function () {
var $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
$this.find('form').submit();
},
Cancel: function () {
$(this).dialog("close");
}
}
});
}
if ($this.hasClass('canCloseNormally')) {
$('#Job_Show_Queues_Actions_Remove_Dialog_CloseJob_Container').show();
} else {
$('#Job_Show_Queues_Actions_Remove_Dialog_CloseJob_Container').hide();
}
$('#Job_Show_Queues_Actions_Remove_Dialog_CloseJob').prop('checked', false);
$('#Job_Show_Queues_Actions_Remove_Dialog_Id').val(jobQueueJobId);
dialog.dialog('open');
e.preventDefault();
return false;
});
jobQueues.on('click', 'td.added i.fa-edit', function (e) {
var $this = $(this);
var jobQueueJobId = $this.closest('tr').attr('data-jobqueuejobid');
if (!dialogEditAddedComment) {
dialogEditAddedComment = $('#Job_Show_Queues_Actions_EditAddedComment_Dialog');
dialogEditAddedComment.dialog({
resizable: false,
modal: true,
width: 320,
autoOpen: false,
buttons: {
"Save Changes": function () {
var $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
$this.find('form').submit();
},
Cancel: function () {
$(this).dialog("close");
}
}
});
}
var $comments = $this.closest('td').find('.comments');
if ($comments.hasClass('smallMessage')) {
$('#Job_Show_Queues_Actions_EditAddedComment_Dialog_Comment').val('');
} else {
$('#Job_Show_Queues_Actions_EditAddedComment_Dialog_Comment').val($comments.text());
}
$('#Job_Show_Queues_Actions_EditAddedComment_Dialog_Id').val(jobQueueJobId);
dialogEditAddedComment.dialog('open');
e.preventDefault();
return false;
});
jobQueues.on('click', 'td.removed i.fa-edit', function (e) {
var $this = $(this);
var jobQueueJobId = $this.closest('tr').attr('data-jobqueuejobid');
if (!dialogEditRemovedComment) {
dialogEditRemovedComment = $('#Job_Show_Queues_Actions_EditRemovedComment_Dialog');
dialogEditRemovedComment.dialog({
resizable: false,
modal: true,
width: 320,
autoOpen: false,
buttons: {
"Save Changes": function () {
var $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
$this.find('form').submit();
},
Cancel: function () {
$(this).dialog("close");
}
}
});
}
var $comments = $this.closest('td').find('.comments');
if ($comments.hasClass('smallMessage')) {
$('#Job_Show_Queues_Actions_EditRemovedComment_Dialog_Comment').val('');
} else {
$('#Job_Show_Queues_Actions_EditRemovedComment_Dialog_Comment').val($comments.text());
}
$('#Job_Show_Queues_Actions_EditRemovedComment_Dialog_Id').val(jobQueueJobId);
dialogEditRemovedComment.dialog('open');
e.preventDefault();
return false;
});
jobQueues.on('click', 'td.sla i.fa-edit', function (e) {
var $this = $(this);
var jobQueueJobId = $this.closest('tr').attr('data-jobqueuejobid');
var priorityChange = function () {
var $element = $('#Job_Show_Queues_Actions_EditSla_Dialog_Priority');
var icon = dialogEditSla.find('.priority i');
icon[0].className = '';
icon.addClass('fa d-priority-' + $element.val().toLowerCase()).attr('title', $element.val() + ' Priority');
};
if (!dialogEditSla) {
dialogEditSla = $('#Job_Show_Queues_Actions_EditSla_Dialog');
dialogEditSla.dialog({
resizable: false,
modal: true,
width: 320,
autoOpen: false,
buttons: {
"Save Changes": function () {
var $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
$this.find('form').submit();
},
Cancel: function () {
$(this).dialog("close");
}
}
});
$('#Job_Show_Queues_Actions_EditSla_Dialog_Priority').change(priorityChange);
}
var $td = $this.closest('td');
var priority = $td.attr('data-priority');
var sla = $td.attr('data-sla');
var slaStart = $this.closest('tr').attr('data-jobqueuejobaddeddate');
var canEditSla = $td.hasClass('canEditSLA');
var canEditPriority = $td.hasClass('canEditPriority');
if (canEditPriority) {
$('#Job_Show_Queues_Actions_EditSla_Dialog_Priority').val(priority);
priorityChange();
dialogEditSla.find('div.priority').show();
} else {
dialogEditSla.find('div.priority').hide();
}
if (canEditSla) {
var $sla = $('#Job_Show_Queues_Actions_EditSla_Dialog_Sla');
$sla.datetimepicker('destroy').datetimepicker({
defaultDate: new Date(),
ampm: true,
changeYear: true,
changeMonth: true,
minDate: moment(slaStart).add('m', 1).toDate(),
dateFormat: 'yy/mm/dd'
});
if (sla) {
$sla.datetimepicker('setDate', moment(sla).toDate());
} else {
$sla.val('');
}
dialogEditSla.find('div.sla').show();
} else {
dialogEditSla.find('div.sla').hide();
}
if (canEditPriority && canEditSla)
dialogEditSla.find('form').attr('action', dialogEditSla_BothUrl);
else if (canEditPriority)
dialogEditSla.find('form').attr('action', dialogEditSla_PriorityUrl);
else if (canEditSla)
dialogEditSla.find('form').attr('action', dialogEditSla_SlaUrl);
$('#Job_Show_Queues_Actions_EditSla_Dialog_Id').val(jobQueueJobId);
dialogEditSla.dialog('open');
e.preventDefault();
return false;
});
});
</script>
}
else
{
<div class="none">This job has no associated queue history</div>
}
File diff suppressed because it is too large Load Diff
@@ -268,7 +268,9 @@
if (!quick) {
e.animate({ backgroundColor: '#ffff99' }, 500, function () {
e.animate({ backgroundColor: '#f4f4f4' }, 500);
e.animate({ backgroundColor: '#fafafa' }, 500, function () {
e.css('background-color', '');
});
});
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
}
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Job.JobParts
using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
@@ -952,7 +953,9 @@ WriteLiteral(@"?id=$1"">#$1</a>');
if (!quick) {
e.animate({ backgroundColor: '#ffff99' }, 500, function () {
e.animate({ backgroundColor: '#f4f4f4' }, 500);
e.animate({ backgroundColor: '#fafafa' }, 500, function () {
e.css('background-color', '');
});
});
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
}
@@ -967,14 +970,14 @@ WriteLiteral(@"?id=$1"">#$1</a>');
");
#line 283 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 285 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
#line hidden
#line 284 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 286 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canShowAttachments)
{
@@ -995,7 +998,7 @@ WriteLiteral(@" <script>
var jobId = parseInt('");
#line 297 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 299 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1006,13 +1009,13 @@ WriteLiteral("\');\r\n\r\n //#region Attachments\r\n var $
"tput\');\r\n\r\n");
#line 303 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 305 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 303 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 305 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canAddAttachments)
{
@@ -1043,7 +1046,7 @@ WriteLiteral(@"
'");
#line 326 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 328 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
@@ -1064,7 +1067,7 @@ WriteLiteral(@"',
'UploadUrl=");
#line 338 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 340 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)));
@@ -1099,7 +1102,7 @@ WriteLiteral(@"');
");
#line 364 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 366 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1108,13 +1111,13 @@ WriteLiteral(@"');
WriteLiteral("\r\n");
#line 366 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 368 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 366 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 368 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
{
@@ -1149,7 +1152,7 @@ WriteLiteral(@"
url: '");
#line 393 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 395 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentRemove()));
@@ -1177,7 +1180,7 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
" }\r\n\r\n //#endregion\r\n\r\n ");
#line 426 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 428 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1188,7 +1191,7 @@ WriteLiteral("\r\n function addAttachment(key, quick) {\r\n\r\n
" $.ajax({\r\n url: \'");
#line 434 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 436 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.Attachment()));
@@ -1200,13 +1203,13 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
"");
#line 440 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 442 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 440 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 442 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canRemoveAnyAttachments)
{
@@ -1220,7 +1223,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
WriteLiteral("\r\n");
#line 443 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 445 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else if (canRemoveOwnAttachments)
{
@@ -1233,7 +1236,7 @@ WriteLiteral(" ");
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
#line 446 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 448 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(CurrentUser.Id);
@@ -1244,7 +1247,7 @@ WriteLiteral("\'), quick);");
WriteLiteral("\r\n");
#line 447 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 449 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else
{
@@ -1259,7 +1262,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
WriteLiteral("\r\n");
#line 451 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 453 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1287,7 +1290,7 @@ WriteLiteral(@" } else {
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
#line 471 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 473 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
@@ -1296,7 +1299,7 @@ WriteLiteral(@" } else {
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
#line 472 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 474 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
@@ -1329,14 +1332,14 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.C
" </script>\r\n");
#line 518 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 520 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
#line hidden
#line 519 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 521 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canShowLogs && canShowAttachments)
{
@@ -1346,7 +1349,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.C
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
#line 523 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 525 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1375,7 +1378,7 @@ WriteLiteral("\');\r\n\r\n //#region LiveEvents\r\n functi
" var liveMessagesConnection = $.connection(\'");
#line 556 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 558 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Content("~/API/Repository/Notifications"));
@@ -1394,7 +1397,7 @@ WriteLiteral(@"', { addToGroups: 'JobLog,JobAttachment' })
");
#line 566 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 568 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else if (canShowLogs)
{
@@ -1405,7 +1408,7 @@ else if (canShowLogs)
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
#line 571 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 573 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1433,7 +1436,7 @@ WriteLiteral(@"');
var liveMessagesConnection = $.connection('");
#line 590 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 592 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Content("~/API/Repository/Notifications"));
@@ -1452,7 +1455,7 @@ WriteLiteral(@"', { addToGroups: 'JobLog' })
");
#line 600 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 602 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else if (canShowAttachments)
{
@@ -1463,7 +1466,7 @@ else if (canShowAttachments)
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
#line 605 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 607 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1489,7 +1492,7 @@ WriteLiteral(@"');
var liveMessagesConnection = $.connection('");
#line 622 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 624 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Content("~/API/Repository/Notifications"));
@@ -1508,7 +1511,7 @@ WriteLiteral(@"', { addToGroups: 'JobAttachment' })
");
#line 632 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 634 "..\..\Views\Job\JobParts\Resources.cshtml"
}
+116 -10
View File
@@ -376,9 +376,9 @@
</tr>
<tr id="Job_Show_Subjects_Actions">
<td id="Job_Show_Job_Actions">
@if (Model.Job.CanForceClose())
@if (Model.Job.CanCloseForced())
{
@Html.ActionLinkSmallButton("Forcibly Close Job", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button")
@Html.ActionLinkSmallButton("Forcibly Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button")
<div id="Job_Show_Job_Actions_ForceClose_Dialog" class="dialog" title="Forcibly Close this Job?">
@using (Html.BeginForm(MVC.API.Job.ForceClose(Model.Job.Id, null, true)))
{
@@ -424,9 +424,9 @@
</script>
}
@if (Model.Job.CanClose())
@if (Model.Job.CanCloseNormally())
{
@Html.ActionLinkSmallButton("Close Job", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button")
@Html.ActionLinkSmallButton("Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button")
<div id="Job_Show_Job_Actions_Close_Dialog" class="dialog" title="Close this Job?">
<p>
<i class="fa fa-exclamation-triangle fa-lg"></i>&nbsp;Are you sure?
@@ -507,7 +507,7 @@
}
@if (Model.Job.CanDelete())
{
@Html.ActionLinkSmallButton("Delete Job", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button")
@Html.ActionLinkSmallButton("Delete", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button")
<div id="Job_Show_Job_Actions_Delete_Dialog" class="dialog" title="Delete this Job?">
<p>
<i class="fa fa-exclamation-triangle fa-lg"></i>&nbsp;This item will be permanently deleted and cannot be recovered. Are you sure?
@@ -546,6 +546,112 @@
});
</script>
}
@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();
@Html.ActionLinkSmallButton("Add to Queue", MVC.API.JobQueueJob.AddJob(), "Job_Show_Job_Actions_AddQueue_Button")
<div id="Job_Show_Job_Actions_AddQueue_Dialog" class="dialog" title="Add Job to Queue">
@using (Html.BeginForm(MVC.API.JobQueueJob.AddJob())){
<input id="Job_Show_Job_Actions_AddQueue_Dialog_Id" type="hidden" name="id" />
<input id="Job_Show_Job_Actions_AddQueue_Dialog_JobId" type="hidden" name="JobId" value="@Model.Job.Id" />
<div class="queuePicker">
@foreach (var jobQueue in Model.AvailableQueues.OrderBy(jq => jq.Name))
{
<div class="queue" data-queueid="@(jobQueue.Id)" data-queuesla="@(jobQueue.DefaultSLAExpiry.HasValue ? jobQueue.DefaultSLAExpiry.Value.ToString() : null)" data-queuepriority="@(jobQueue.Priority.ToString())">
<i class="fa fa-@(jobQueue.Icon) fa-fw fa-lg d-@(jobQueue.IconColour)"></i>@jobQueue.Name
</div>
}
</div>
<div class="details">
<div>
<h4>Job Priority</h4>
@Html.DropDownList("Priority", priorityItems) <i class="fa d-priority-@(priorityValue.ToLower())" title="@(priorityValue) Priority"></i>
</div>
<div>
<h4>SLA Target</h4>
@Html.DropDownList("SLAExpiresMinutes", slaOptions)
</div>
<div>
<h4>Comment</h4>
@Html.TextArea("Comment")
</div>
</div>
}
</div>
<script type="text/javascript">
$(function () {
var button = $('#Job_Show_Job_Actions_AddQueue_Button');
var buttonDialog = null;
var buttonLink = button.attr('href');
var queuePicker = null;
var details = null;
function queueSelected(){
var queue = $(this);
queuePicker.children().removeClass('selected');
queue.addClass('selected');
$('#Job_Show_Job_Actions_AddQueue_Dialog_Id').val(queue.attr('data-queueid'));
var queueSLA = queue.attr('data-queuesla');
details.find('#Priority').val('Normal');
details.find('#SLAExpiresMinutes').val(queueSLA);
details.find('#Comment').val('');
details.show();
}
button.attr('href', '#').click(function (e) {
e.preventDefault();
if (!buttonDialog){
buttonDialog = $('#Job_Show_Job_Actions_AddQueue_Dialog');
buttonDialog.dialog({
width: 600,
height: 410,
resizable: false,
modal: true,
autoOpen: false,
buttons: {
Cancel: function () {
$(this).dialog("close");
},
"Add to Queue": function () {
var $this = $(this);
$this.dialog("disable");
$this.dialog("option", "buttons", null);
buttonDialog.find('form').submit();
}
}
});
queuePicker = buttonDialog.find('.queuePicker');
details = buttonDialog.find('.details');
var priorityList = buttonDialog.find('#Priority');
priorityList.change(function () {
var icon = priorityList.closest('div').find('i').first();
icon[0].className = '';
icon.addClass('fa d-priority-' + priorityList.val().toLowerCase()).attr('title', priorityList.val() + ' Priority');
});
queuePicker.on('click', 'div.queue', queueSelected);
}
buttonDialog.dialog('open');
return false;
});
});
</script>
}
@if (Model.Job.CanLogWarranty())
{
@Html.ActionLinkSmallButton("Log Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogWarranty_Button")
@@ -664,15 +770,15 @@
<td id="Job_Show_Device_Actions">
@if (Model.Job.CanDeviceHeld())
{
@Html.ActionLinkSmallButton("Held", MVC.API.Job.DeviceHeld(Model.Job.Id, true), "Job_Show_Device_Actions_Held_Button")
@Html.ActionLinkSmallButton("Device Held", MVC.API.Job.DeviceHeld(Model.Job.Id, true), "Job_Show_Device_Actions_Held_Button")
}
@if (Model.Job.CanDeviceReadyForReturn())
{
@Html.ActionLinkSmallButton("Ready For Return", MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReadyForReturn_Button", "alert")
@Html.ActionLinkSmallButton("Device Ready For Return", MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReadyForReturn_Button", "alert")
}
@if (Model.Job.CanDeviceReturned())
{
@Html.ActionLinkSmallButton("Returned", MVC.API.Job.DeviceReturned(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReturned_Button", Model.Job.CanDeviceReadyForReturn() ? null : "alert")
@Html.ActionLinkSmallButton("Device Returned", MVC.API.Job.DeviceReturned(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReturned_Button", Model.Job.CanDeviceReadyForReturn() ? null : "alert")
}
</td>
}
@@ -683,7 +789,7 @@
@if (Model.Job.CanWaitingForUserAction())
{
<a id="Job_Show_User_Actions_WaitingForUserAction_Button" href="#" class="button small">Awaiting Action</a>
<a id="Job_Show_User_Actions_WaitingForUserAction_Button" href="#" class="button small">Awaiting User Action</a>
<div id="Job_Show_User_Actions_WaitingForUserAction_Dialog" class="dialog" title="Waiting for User Action">
@using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true)))
{
@@ -727,7 +833,7 @@
}
@if (Model.Job.CanNotWaitingForUserAction())
{
<a id="Job_Show_User_Actions_NotWaitingForUserAction_Button" href="#" class="button alert small">Action Resolved</a>
<a id="Job_Show_User_Actions_NotWaitingForUserAction_Button" href="#" class="button alert small">User Action Resolved</a>
<div id="Job_Show_User_Actions_NotWaitingForUserAction_Dialog" class="dialog" title="Not Waiting for User Action">
@using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true)))
{
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Job.JobParts
using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
@@ -1591,7 +1592,7 @@ WriteLiteral(">\r\n");
#line hidden
#line 379 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanForceClose())
if (Model.Job.CanCloseForced())
{
@@ -1599,14 +1600,14 @@ WriteLiteral(">\r\n");
#line hidden
#line 381 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Forcibly Close Job", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button"));
Write(Html.ActionLinkSmallButton("Forcibly Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button"));
#line default
#line hidden
#line 381 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
@@ -1701,7 +1702,7 @@ WriteLiteral("\r\n");
#line hidden
#line 427 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanClose())
if (Model.Job.CanCloseNormally())
{
@@ -1709,14 +1710,14 @@ WriteLiteral("\r\n");
#line hidden
#line 429 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Close Job", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button"));
Write(Html.ActionLinkSmallButton("Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button"));
#line default
#line hidden
#line 429 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
@@ -1850,14 +1851,14 @@ WriteLiteral(" ");
#line hidden
#line 510 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Delete Job", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button"));
Write(Html.ActionLinkSmallButton("Delete", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button"));
#line default
#line hidden
#line 510 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
@@ -1914,6 +1915,320 @@ WriteLiteral(" ");
#line 549 "..\..\Views\Job\JobParts\_Subject.cshtml"
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();
#line default
#line hidden
#line 557 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Add to Queue", MVC.API.JobQueueJob.AddJob(), "Job_Show_Job_Actions_AddQueue_Button"));
#line default
#line hidden
#line 557 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" id=\"Job_Show_Job_Actions_AddQueue_Dialog\"");
WriteLiteral(" class=\"dialog\"");
WriteLiteral(" title=\"Add Job to Queue\"");
WriteLiteral(">\r\n");
#line 559 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
#line 559 "..\..\Views\Job\JobParts\_Subject.cshtml"
using (Html.BeginForm(MVC.API.JobQueueJob.AddJob())){
#line default
#line hidden
WriteLiteral(" <input");
WriteLiteral(" id=\"Job_Show_Job_Actions_AddQueue_Dialog_Id\"");
WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"id\"");
WriteLiteral(" />\r\n");
WriteLiteral(" <input");
WriteLiteral(" id=\"Job_Show_Job_Actions_AddQueue_Dialog_JobId\"");
WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"JobId\"");
WriteAttribute("value", Tuple.Create(" value=\"", 35204), Tuple.Create("\"", 35225)
#line 561 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 35212), Tuple.Create<System.Object, System.Int32>(Model.Job.Id
#line default
#line hidden
, 35212), false)
);
WriteLiteral(" />\r\n");
WriteLiteral(" <div");
WriteLiteral(" class=\"queuePicker\"");
WriteLiteral(">\r\n");
#line 563 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
#line 563 "..\..\Views\Job\JobParts\_Subject.cshtml"
foreach (var jobQueue in Model.AvailableQueues.OrderBy(jq => jq.Name))
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"queue\"");
WriteLiteral(" data-queueid=\"");
#line 565 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(jobQueue.Id);
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(" data-queuesla=\"");
#line 565 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(jobQueue.DefaultSLAExpiry.HasValue ? jobQueue.DefaultSLAExpiry.Value.ToString() : null);
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(" data-queuepriority=\"");
#line 565 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(jobQueue.Priority.ToString());
#line default
#line hidden
WriteLiteral("\"");
WriteLiteral(">\r\n <i");
WriteAttribute("class", Tuple.Create(" class=\"", 35674), Tuple.Create("\"", 35741)
, Tuple.Create(Tuple.Create("", 35682), Tuple.Create("fa", 35682), true)
, Tuple.Create(Tuple.Create(" ", 35684), Tuple.Create("fa-", 35685), true)
#line 566 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 35688), Tuple.Create<System.Object, System.Int32>(jobQueue.Icon
#line default
#line hidden
, 35688), false)
, Tuple.Create(Tuple.Create(" ", 35704), Tuple.Create("fa-fw", 35705), true)
, Tuple.Create(Tuple.Create(" ", 35710), Tuple.Create("fa-lg", 35711), true)
, Tuple.Create(Tuple.Create(" ", 35716), Tuple.Create("d-", 35717), true)
#line 566 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 35719), Tuple.Create<System.Object, System.Int32>(jobQueue.IconColour
#line default
#line hidden
, 35719), false)
);
WriteLiteral("></i>");
#line 566 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(jobQueue.Name);
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n");
#line 568 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
#line default
#line hidden
WriteLiteral(" </div>\r\n");
WriteLiteral(" <div");
WriteLiteral(" class=\"details\"");
WriteLiteral(">\r\n <div>\r\n <h4>Job Priority</h" +
"4>\r\n");
WriteLiteral(" ");
#line 573 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.DropDownList("Priority", priorityItems));
#line default
#line hidden
WriteLiteral(" <i");
WriteAttribute("class", Tuple.Create(" class=\"", 36055), Tuple.Create("\"", 36103)
, Tuple.Create(Tuple.Create("", 36063), Tuple.Create("fa", 36063), true)
, Tuple.Create(Tuple.Create(" ", 36065), Tuple.Create("d-priority-", 36066), true)
#line 573 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 36077), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
#line default
#line hidden
, 36077), false)
);
WriteAttribute("title", Tuple.Create(" title=\"", 36104), Tuple.Create("\"", 36137)
#line 573 "..\..\Views\Job\JobParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 36112), Tuple.Create<System.Object, System.Int32>(priorityValue
#line default
#line hidden
, 36112), false)
, Tuple.Create(Tuple.Create(" ", 36128), Tuple.Create("Priority", 36129), true)
);
WriteLiteral("></i>\r\n </div>\r\n <div>\r\n " +
" <h4>SLA Target</h4>\r\n");
WriteLiteral(" ");
#line 577 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.DropDownList("SLAExpiresMinutes", slaOptions));
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n <div>\r\n " +
" <h4>Comment</h4>\r\n");
WriteLiteral(" ");
#line 581 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.TextArea("Comment"));
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n </div>\r\n");
#line 584 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
#line default
#line hidden
WriteLiteral(" </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n var button = $(\'#" +
"Job_Show_Job_Actions_AddQueue_Button\');\r\n var buttonDialo" +
"g = null;\r\n var buttonLink = button.attr(\'href\');\r\n " +
" \r\n var queuePicker = null;\r\n " +
" var details = null;\r\n\r\n function queueSelect" +
"ed(){\r\n var queue = $(this);\r\n\r\n " +
" queuePicker.children().removeClass(\'selected\');\r\n " +
" queue.addClass(\'selected\');\r\n\r\n $(\'#Job_Show_Job_" +
"Actions_AddQueue_Dialog_Id\').val(queue.attr(\'data-queueid\'));\r\n\r\n " +
" var queueSLA = queue.attr(\'data-queuesla\');\r\n\r\n " +
" details.find(\'#Priority\').val(\'Normal\');\r\n de" +
"tails.find(\'#SLAExpiresMinutes\').val(queueSLA);\r\n det" +
"ails.find(\'#Comment\').val(\'\');\r\n\r\n details.show();\r\n " +
" }\r\n \r\n butt" +
"on.attr(\'href\', \'#\').click(function (e) {\r\n e.prevent" +
"Default();\r\n\r\n if (!buttonDialog){\r\n " +
" buttonDialog = $(\'#Job_Show_Job_Actions_AddQueue_Dialog\');\r\n " +
" buttonDialog.dialog({\r\n " +
" width: 600,\r\n height: 410,\r\n " +
" resizable: false,\r\n " +
"modal: true,\r\n autoOpen: false,\r\n " +
" buttons: {\r\n Canc" +
"el: function () {\r\n $(this).dialog(\"c" +
"lose\");\r\n },\r\n " +
" \"Add to Queue\": function () {\r\n " +
" var $this = $(this);\r\n $this." +
"dialog(\"disable\");\r\n $this.dialog(\"op" +
"tion\", \"buttons\", null);\r\n buttonDial" +
"og.find(\'form\').submit();\r\n }\r\n " +
" }\r\n });\r\n\r\n " +
" queuePicker = buttonDialog.find(\'.queuePicker\');\r\n " +
" details = buttonDialog.find(\'.details\');\r\n\r\n " +
" var priorityList = buttonDialog.find(\'#Priority\');\r\n " +
" priorityList.change(function () {\r\n " +
" var icon = priorityList.closest(\'div\').find(\'i\').first();\r\n " +
" icon[0].className = \'\';\r\n " +
" icon.addClass(\'fa d-priority-\' + priorityList.val().toLowerCase()).attr" +
"(\'title\', priorityList.val() + \' Priority\');\r\n })" +
";\r\n\r\n queuePicker.on(\'click\', \'div.queue\', queueS" +
"elected);\r\n }\r\n\r\n buttonDi" +
"alog.dialog(\'open\');\r\n return false;\r\n " +
" });\r\n });\r\n </script>\r\n");
#line 654 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 655 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanLogWarranty())
{
@@ -1921,14 +2236,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 551 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 657 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Log Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogWarranty_Button"));
#line default
#line hidden
#line 551 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 657 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -1938,7 +2253,7 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 553 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 659 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanWarrantyCompleted())
{
@@ -1946,14 +2261,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 555 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 661 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Warranty Complete", MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_WarrantyComplete_Button", "alert"));
#line default
#line hidden
#line 555 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 661 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -1963,7 +2278,7 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 557 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 663 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanInsuranceClaimFormSent())
{
@@ -1971,14 +2286,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 559 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 665 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Insurance Claim Sent", MVC.API.Job.UpdateInsuranceClaimFormSentDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_InsuranceClaimSent_Button", "alert"));
#line default
#line hidden
#line 559 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 665 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -1988,7 +2303,7 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 561 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 667 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanLogRepair())
{
@@ -1996,14 +2311,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 563 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 669 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Repairs Logged", MVC.API.Job.LogRepair(Model.Job.Id, null, null, true), "Job_Show_Job_Actions_LogRepair_Button"));
#line default
#line hidden
#line 563 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 669 "..\..\Views\Job\JobParts\_Subject.cshtml"
@@ -2020,13 +2335,13 @@ WriteLiteral(" title=\"Repairs Logged\"");
WriteLiteral(">\r\n");
#line 565 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 671 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
#line 565 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 671 "..\..\Views\Job\JobParts\_Subject.cshtml"
using (Html.BeginForm(MVC.API.Job.LogRepair(Model.Job.Id, null, null, true)))
{
@@ -2058,7 +2373,7 @@ WriteLiteral(" name=\"RepairerReference\"");
WriteLiteral(" />\r\n </p>\r\n");
#line 575 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 681 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2096,7 +2411,7 @@ WriteLiteral(">\r\n $(function () {\r\n
" });\r\n });\r\n </script>\r\n");
#line 613 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 719 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2105,7 +2420,7 @@ WriteLiteral(">\r\n $(function () {\r\n
WriteLiteral(" ");
#line 614 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 720 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanRepairComplete())
{
@@ -2113,14 +2428,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 616 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 722 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Repairs Complete", MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_RepairComplete_Button", "alert"));
#line default
#line hidden
#line 616 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 722 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2130,7 +2445,7 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 618 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 724 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanConvertHWarToHNWar())
{
@@ -2138,14 +2453,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 620 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 726 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Convert to Non-Warranty", MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true), "Job_Show_Job_Actions_ConvertToHNWar_Button"));
#line default
#line hidden
#line 620 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 726 "..\..\Views\Job\JobParts\_Subject.cshtml"
@@ -2193,7 +2508,7 @@ WriteLiteral(">\r\n $(function () {\r\n
" \r\n });\r\n </script>\r\n");
#line 660 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 766 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2202,13 +2517,13 @@ WriteLiteral(">\r\n $(function () {\r\n
WriteLiteral(" </td>\r\n");
#line 662 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 768 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
#line 662 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 768 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.Device != null)
{
@@ -2222,13 +2537,13 @@ WriteLiteral(" id=\"Job_Show_Device_Actions\"");
WriteLiteral(">\r\n");
#line 665 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 771 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
#line 665 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 771 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanDeviceHeld())
{
@@ -2236,15 +2551,15 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 667 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Held", MVC.API.Job.DeviceHeld(Model.Job.Id, true), "Job_Show_Device_Actions_Held_Button"));
#line 773 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Device Held", MVC.API.Job.DeviceHeld(Model.Job.Id, true), "Job_Show_Device_Actions_Held_Button"));
#line default
#line hidden
#line 667 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 773 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2253,7 +2568,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 669 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 775 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanDeviceReadyForReturn())
{
@@ -2261,15 +2576,15 @@ WriteLiteral(" ");
#line default
#line hidden
#line 671 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Ready For Return", MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReadyForReturn_Button", "alert"));
#line 777 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Device Ready For Return", MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReadyForReturn_Button", "alert"));
#line default
#line hidden
#line 671 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 777 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2278,7 +2593,7 @@ WriteLiteral(" ");
WriteLiteral(" ");
#line 673 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 779 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanDeviceReturned())
{
@@ -2286,15 +2601,15 @@ WriteLiteral(" ");
#line default
#line hidden
#line 675 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Returned", MVC.API.Job.DeviceReturned(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReturned_Button", Model.Job.CanDeviceReadyForReturn() ? null : "alert"));
#line 781 "..\..\Views\Job\JobParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Device Returned", MVC.API.Job.DeviceReturned(Model.Job.Id, true), "Job_Show_Device_Actions_DeviceReturned_Button", Model.Job.CanDeviceReadyForReturn() ? null : "alert"));
#line default
#line hidden
#line 675 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 781 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2303,7 +2618,7 @@ WriteLiteral(" ");
WriteLiteral(" </td>\r\n");
#line 678 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 784 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2312,7 +2627,7 @@ WriteLiteral(" </td>\r\n");
WriteLiteral(" ");
#line 679 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 785 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.User != null)
{
@@ -2326,13 +2641,13 @@ WriteLiteral(" id=\"Job_Show_User_Actions\"");
WriteLiteral(">\r\n\r\n\r\n");
#line 684 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 790 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
#line 684 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 790 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanWaitingForUserAction())
{
@@ -2347,7 +2662,7 @@ WriteLiteral(" href=\"#\"");
WriteLiteral(" class=\"button small\"");
WriteLiteral(">Awaiting Action</a>\r\n");
WriteLiteral(">Awaiting User Action</a>\r\n");
WriteLiteral(" <div");
@@ -2360,13 +2675,13 @@ WriteLiteral(" title=\"Waiting for User Action\"");
WriteLiteral(">\r\n");
#line 688 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 794 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
#line 688 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 794 "..\..\Views\Job\JobParts\_Subject.cshtml"
using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true)))
{
@@ -2384,7 +2699,7 @@ WriteLiteral(" class=\"block\"");
WriteLiteral("></textarea>\r\n </p>\r\n");
#line 694 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 800 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2419,7 +2734,7 @@ WriteLiteral(">\r\n $(function () {\r\n
" });\r\n </script>\r\n");
#line 727 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 833 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2428,7 +2743,7 @@ WriteLiteral(">\r\n $(function () {\r\n
WriteLiteral(" ");
#line 728 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 834 "..\..\Views\Job\JobParts\_Subject.cshtml"
if (Model.Job.CanNotWaitingForUserAction())
{
@@ -2443,7 +2758,7 @@ WriteLiteral(" href=\"#\"");
WriteLiteral(" class=\"button alert small\"");
WriteLiteral(">Action Resolved</a>\r\n");
WriteLiteral(">User Action Resolved</a>\r\n");
WriteLiteral(" <div");
@@ -2456,13 +2771,13 @@ WriteLiteral(" title=\"Not Waiting for User Action\"");
WriteLiteral(">\r\n");
#line 732 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 838 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line default
#line hidden
#line 732 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 838 "..\..\Views\Job\JobParts\_Subject.cshtml"
using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true)))
{
@@ -2480,7 +2795,7 @@ WriteLiteral(" class=\"block\"");
WriteLiteral("></textarea>\r\n </p>\r\n");
#line 738 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 844 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2516,7 +2831,7 @@ WriteLiteral(">\r\n $(function () {\r\n
" });\r\n </script>\r\n");
#line 772 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 878 "..\..\Views\Job\JobParts\_Subject.cshtml"
}
@@ -2525,7 +2840,7 @@ WriteLiteral(">\r\n $(function () {\r\n
WriteLiteral("\r\n </td>\r\n");
#line 775 "..\..\Views\Job\JobParts\_Subject.cshtml"
#line 881 "..\..\Views\Job\JobParts\_Subject.cshtml"
}