27c21175d7
Migrate much of BI to Services. Added Wireless Profile Provider plugin feature. Added Certificate Authority Provider plugin feature. Modified Certificate Provider plugin feature. Database migration v17, for Device Profiles. Enrolment Client Updated to support CA Certificates, Wireless Profiles and Hardware Info. New Client Enrolment Protocol to support new features. Plugin Manifest Generator added to main solution. Improved AD search performance.
3162 lines
122 KiB
C#
3162 lines
122 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.42000
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Views.Job.JobParts
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco;
|
|
using Disco.Models.Repository;
|
|
|
|
#line 2 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
using Disco.Models.Services.Job;
|
|
|
|
#line default
|
|
#line hidden
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
|
|
#line 3 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
using Disco.Services.Users.UserFlags;
|
|
|
|
#line default
|
|
#line hidden
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/_Subject.cshtml")]
|
|
public partial class _Subject : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
|
{
|
|
public _Subject()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 4 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
Authorization.Require(Claims.Job.Show);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<table");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Subjects\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <td");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Dates\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <td>Opened:\r\n " +
|
|
" </td>\r\n <td><span");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Dates_Opened\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 16 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(CommonHelpers.FriendlyDateAndTitleUser(Model.Job.OpenedDate, Model.Job.OpenedTechUser));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 18 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 18 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (!Model.Job.ClosedDate.HasValue || Model.Job.ExpectedClosedDate.HasValue)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <td>\r\n " +
|
|
" <span");
|
|
|
|
WriteLiteral(" title=\"Expected to Close\"");
|
|
|
|
WriteLiteral(">Expected:</span>\r\n </td>\r\n " +
|
|
" <td>");
|
|
|
|
|
|
#line 24 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Authorization.Has(Claims.Job.Properties.ExpectedClosedDate))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 26 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.TextBoxFor(m => m.Job.ExpectedClosedDate, "{0:yyyy/MM/dd hh:mm tt}", new { @class = "small discreet" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 26 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 26 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 26 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 26 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 26 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var $ajaxSave = $('#Job_ExpectedClosedDate').next('.ajaxSave');
|
|
var dateFieldChangeToken = null;
|
|
var dateFieldValue = $('#Job_ExpectedClosedDate').val();
|
|
$('#Job_ExpectedClosedDate')
|
|
.watermark('Unknown')
|
|
.datetimepicker({
|
|
ampm: true,
|
|
stepMinute: 1,
|
|
hour: 9,
|
|
minDate: ");
|
|
|
|
|
|
#line 38 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.OpenedDate.ToJavascriptDate());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@",
|
|
changeYear: true,
|
|
changeMonth: true,
|
|
dateFormat: 'yy/mm/dd'
|
|
}).change(function () {
|
|
var $this = $(this);
|
|
var dateText = $this.val();
|
|
if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) {
|
|
dateFieldValue = dateText;
|
|
if (dateFieldChangeToken)
|
|
window.clearTimeout(dateFieldChangeToken);
|
|
dateFieldChangeToken = window.setTimeout(function () {
|
|
$ajaxSave.hide();
|
|
var $ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
|
var data = { ExpectedClosedDate: dateText };
|
|
$.getJSON('");
|
|
|
|
|
|
#line 53 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Url.Action(MVC.API.Job.UpdateExpectedClosedDate(Model.Job.Id, null)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"', data, function (response, result) {
|
|
if (result != 'success' || response != 'OK') {
|
|
alert('Unable to change Expected Closed Date:\n' + response);
|
|
$ajaxLoading.hide();
|
|
} else {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
}
|
|
})
|
|
dateFieldChangeToken = null;
|
|
}, 750);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 67 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 70 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.Job.ExpectedClosedDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 70 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 74 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 75 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.ClosedDate.HasValue)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <td>Closed:\r\n " +
|
|
" </td>\r\n <td><span");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Dates_Closed\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 80 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(CommonHelpers.FriendlyDateAndTitleUser(Model.Job.ClosedDate, Model.Job.ClosedTechUser));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 82 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </table>\r\n </div>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Type\"");
|
|
|
|
WriteLiteral(" class=\"status\"");
|
|
|
|
WriteLiteral(">\r\n <h2");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 5652), Tuple.Create("\"", 5681)
|
|
|
|
#line 86 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 5660), Tuple.Create<System.Object, System.Int32>(Model.Job.JobType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 5660), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 86 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.JobType.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</h2>\r\n <table");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n");
|
|
|
|
|
|
#line 89 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 89 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
var jobSubTypeFirst = (int)Math.Ceiling((double)(Model.Job.JobSubTypes.Count + 1) / 2);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <td>\r\n <ul");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_SubTypes_1\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 94 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 94 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
foreach (var jobSubType in Model.Job.JobSubTypes.Take(jobSubTypeFirst))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 6269), Tuple.Create("\"", 6291)
|
|
|
|
#line 96 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 6277), Tuple.Create<System.Object, System.Int32>(jobSubType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 6277), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 96 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(jobSubType.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 97 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n </td>\r\n " +
|
|
" <td>\r\n <ul");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_SubTypes_2\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 102 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 102 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
foreach (var jobSubType in Model.Job.JobSubTypes.Skip(jobSubTypeFirst))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 6729), Tuple.Create("\"", 6751)
|
|
|
|
#line 104 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 6737), Tuple.Create<System.Object, System.Int32>(jobSubType.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 6737), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 104 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(jobSubType.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 105 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n");
|
|
|
|
|
|
#line 107 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 107 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Authorization.Has(Claims.Job.Actions.UpdateSubTypes) && !Model.Job.ClosedDate.HasValue)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_SubTypes_Update\"");
|
|
|
|
WriteLiteral(">Update Sub Types</a>\r\n");
|
|
|
|
|
|
#line 110 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n " +
|
|
" </table>\r\n");
|
|
|
|
|
|
#line 114 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 114 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Authorization.Has(Claims.Job.Actions.UpdateSubTypes))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_SubTypes_Update_Dialog\"");
|
|
|
|
WriteLiteral(" title=\"Update Job Types\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n <h2>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 119 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.JobType.Description);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</h2>\r\n");
|
|
|
|
|
|
#line 120 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 120 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
using (Html.BeginForm(MVC.API.Job.UpdateSubTypes(Model.Job.Id, redirect: true), FormMethod.Post, new { id = "formUpdateJobTypes" }))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 122 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 122 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <hr />\r\n");
|
|
|
|
WriteLiteral(" <div>\r\n " +
|
|
" <input");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" value=\"true\"");
|
|
|
|
WriteLiteral(" id=\"UpdateJobTypesAddComponents\"");
|
|
|
|
WriteLiteral(" name=\"AddComponents\"");
|
|
|
|
WriteLiteral("\r\n checked=\"checked\"");
|
|
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteLiteral(" for=\"UpdateJobTypesAddComponents\"");
|
|
|
|
WriteLiteral(">Add Components for newly added Sub Types</label>\r\n " +
|
|
" </div>\r\n");
|
|
|
|
|
|
#line 128 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script>\r\n $(function(){\r\n " +
|
|
" var $Job_Show_Job_SubTypes_Update_Dialog = null;\r\n\r\n" +
|
|
" $(\'#Job_Show_Job_SubTypes_Update\').click(functio" +
|
|
"n () {\r\n if (!$Job_Show_Job_SubTypes_Update_D" +
|
|
"ialog) {\r\n $Job_Show_Job_SubTypes_Update_" +
|
|
"Dialog = $(\'#Job_Show_Job_SubTypes_Update_Dialog\');\r\n " +
|
|
" $Job_Show_Job_SubTypes_Update_Dialog.dialog({\r\n " +
|
|
" resizable: false,\r\n " +
|
|
" modal: true,\r\n autoOpen: false" +
|
|
",\r\n width: 700,\r\n " +
|
|
" buttons: {\r\n " +
|
|
" \"Save\": function () {\r\n $" +
|
|
"(\'#formUpdateJobTypes\').submit();\r\n " +
|
|
" $Job_Show_Job_SubTypes_Update_Dialog.dialog(\"disable\");\r\n " +
|
|
" },\r\n " +
|
|
" Cancel: function () {\r\n $" +
|
|
"(this).dialog(\"close\");\r\n }\r\n " +
|
|
" }\r\n " +
|
|
" });\r\n }\r\n\r\n " +
|
|
" $Job_Show_Job_SubTypes_Update_Dialog.dialog(\'open\');\r\n " +
|
|
" return false;\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 160 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 162 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 162 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Authorization.Has(Claims.Job.Actions.GenerateDocuments))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_GenerateDocument_Container\"");
|
|
|
|
WriteLiteral(" class=\"status\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 165 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.DropDownList("Job_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n v" +
|
|
"ar generatePdfUrl = \'");
|
|
|
|
|
|
#line 168 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Url.Action(MVC.API.Job.GeneratePdf(Model.Job.Id.ToString(), null)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("?DocumentTemplateId=\';\r\n var $documentTemplates = " +
|
|
"$(\'#Job_Show_GenerateDocument\');\r\n var $generatio" +
|
|
"nHost;\r\n\r\n $documentTemplates.change(function () " +
|
|
"{\r\n var v = $documentTemplates.val();\r\n " +
|
|
" if (v) {\r\n " +
|
|
"var url = generatePdfUrl + v;\r\n\r\n if ($.c" +
|
|
"onnection && $.connection.hub && $.connection.hub.transport &&\r\n " +
|
|
" $.connection.hub.transport.name == \'foreverFrame" +
|
|
"\') {\r\n // SignalR active with forever" +
|
|
"Frame transport - use popup window\r\n " +
|
|
"window.open(url, \'_blank\', \'height=150,width=250,location=no,menubar=no,resizabl" +
|
|
"e=no,scrollbars=no,status=no,toolbar=no\');\r\n " +
|
|
" } else {\r\n // use iFrame\r\n " +
|
|
" if (!$generationHost) {\r\n " +
|
|
" $generationHost = $(\'<iframe>\')\r\n " +
|
|
" .attr({ \'src\': url, \'title\': \'Document Genera" +
|
|
"tion Host\' })\r\n .addClass(\'hi" +
|
|
"dden\')\r\n .appendTo(\'body\')\r\n " +
|
|
" .contents();\r\n " +
|
|
" } else {\r\n " +
|
|
" $generationHost[0].location.href = url;\r\n " +
|
|
" }\r\n }\r\n\r\n " +
|
|
" $documentTemplates.val(\'\').blur();\r\n " +
|
|
" }\r\n });\r\n " +
|
|
"});\r\n </script>\r\n </div>\r\n");
|
|
|
|
|
|
#line 200 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n");
|
|
|
|
|
|
#line 203 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 203 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.Device != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <td");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n <h2");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_SerialNumber\"");
|
|
|
|
WriteLiteral(" title=\"Serial Number\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 207 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Authorization.Has(Claims.Device.Show))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 208 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 208 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 210 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.DeviceSerialNumber);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 210 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</h2>\r\n <div");
|
|
|
|
WriteLiteral(" class=\"clearfix\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details\"");
|
|
|
|
WriteLiteral(">\r\n <img");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Model_Image\"");
|
|
|
|
WriteLiteral(" alt=\"Model Image\"");
|
|
|
|
WriteAttribute("src", Tuple.Create(" src=\"", 13636), Tuple.Create("\"", 13754)
|
|
|
|
#line 213 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 13642), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 13642), false)
|
|
);
|
|
|
|
WriteLiteral(" />\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_ComputerName\"");
|
|
|
|
WriteLiteral(" title=\"Computer Name\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 214 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.Device.ComputerName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Model\"");
|
|
|
|
WriteLiteral(" title=\"Model\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 215 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLink(Model.Job.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Job.Device.DeviceModelId)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 216 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 216 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.Device.DeviceBatch != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Batch\"");
|
|
|
|
WriteLiteral(" title=\"Batch\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 218 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLink(Model.Job.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Job.Device.DeviceBatchId)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 219 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 221 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 221 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.Device.DeviceBatch != null)
|
|
{
|
|
if (Model.Job.JobTypeId == JobType.JobTypeIds.HWar)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HWar\"");
|
|
|
|
WriteLiteral(">\r\n <div>DEVICE WARRANTY</div>\r\n " +
|
|
" <div>Until: <span");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HWar_ValidUntil\"");
|
|
|
|
WriteLiteral(" data-livestamp=\"");
|
|
|
|
|
|
#line 227 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToUnixEpoc());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 227 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.Device.DeviceBatch.WarrantyValidUntil.ToFullDateTime("Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></div>\r\n");
|
|
|
|
|
|
#line 228 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 228 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (!string.IsNullOrWhiteSpace(Model.Job.Device.DeviceBatch.WarrantyDetails))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HWar_Details_Button\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(">Show Details</a>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HWar_Details_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 15418), Tuple.Create("\"", 15483)
|
|
, Tuple.Create(Tuple.Create("", 15426), Tuple.Create("Warranty", 15426), true)
|
|
, Tuple.Create(Tuple.Create(" ", 15434), Tuple.Create("Details", 15435), true)
|
|
, Tuple.Create(Tuple.Create(" ", 15442), Tuple.Create("for", 15443), true)
|
|
|
|
#line 231 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create(" ", 15446), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
|
|
|
|
#line default
|
|
#line hidden
|
|
, 15447), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <div>");
|
|
|
|
|
|
#line 232 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(new HtmlString(Model.Job.Device.DeviceBatch.WarrantyDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var d;
|
|
$('#Job_Show_Device_Details_HWar_Details_Button').click(function () {
|
|
if (!d)
|
|
d = $('#Job_Show_Device_Details_HWar_Details_Dialog').dialog({
|
|
width: 570,
|
|
modal: true
|
|
});
|
|
else
|
|
d.dialog('open');
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 249 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div> \r\n");
|
|
|
|
|
|
#line 251 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
if (Model.Job.JobTypeId == JobType.JobTypeIds.HNWar)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HNWar\"");
|
|
|
|
WriteLiteral(">\r\n <div>INSURANCE</div>\r\n " +
|
|
" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HNWar_InsuranceSupplier\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 256 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.Device.DeviceBatch.InsuranceSupplier);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n <div>Until: <span");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HNWar_ValidUntil\"");
|
|
|
|
WriteLiteral(" data-livestamp=\"");
|
|
|
|
|
|
#line 257 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.Device.DeviceBatch.InsuredUntil.ToUnixEpoc());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 257 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.Device.DeviceBatch.InsuredUntil.ToFullDateTime("Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></div>\r\n");
|
|
|
|
|
|
#line 258 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 258 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (!string.IsNullOrWhiteSpace(Model.Job.Device.DeviceBatch.InsuranceDetails))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HNWar_Details_Button\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(">Show Details</a>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Details_HNWar_Details_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 17746), Tuple.Create("\"", 17812)
|
|
, Tuple.Create(Tuple.Create("", 17754), Tuple.Create("Insurance", 17754), true)
|
|
, Tuple.Create(Tuple.Create(" ", 17763), Tuple.Create("Details", 17764), true)
|
|
, Tuple.Create(Tuple.Create(" ", 17771), Tuple.Create("for", 17772), true)
|
|
|
|
#line 261 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create(" ", 17775), Tuple.Create<System.Object, System.Int32>(Model.Job.Device.DeviceBatch.Name
|
|
|
|
#line default
|
|
#line hidden
|
|
, 17776), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <div>");
|
|
|
|
|
|
#line 262 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(new HtmlString(Model.Job.Device.DeviceBatch.InsuranceDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var d;
|
|
$('#Job_Show_Device_Details_HNWar_Details_Button').click(function () {
|
|
if (!d)
|
|
d = $('#Job_Show_Device_Details_HNWar_Details_Dialog').dialog({
|
|
width: 570,
|
|
modal: true
|
|
});
|
|
else
|
|
d.dialog('open');
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|
|
");
|
|
|
|
|
|
#line 279 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div> \r\n");
|
|
|
|
|
|
#line 281 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 284 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 284 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.DeviceHeld.HasValue)
|
|
{
|
|
var canEditLocation = Authorization.Has(Claims.Job.Properties.DeviceHeldLocation);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_DeviceHeld\"");
|
|
|
|
WriteLiteral(" class=\"status\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <td>" +
|
|
"Location:</td>\r\n <td>\r\n " +
|
|
" <span");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_DeviceHeld_Location\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 293 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 293 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (canEditLocation)
|
|
{
|
|
switch (Model.LocationMode)
|
|
{
|
|
case LocationModes.Unrestricted:
|
|
case LocationModes.OptionalList:
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 299 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.TextBoxFor(m => m.Job.DeviceHeldLocation, new { @class = "small discreet" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 299 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
break;
|
|
case LocationModes.RestrictedList:
|
|
List<SelectListItem> listOptions = new List<SelectListItem>() { new SelectListItem() { Value = "", Text = "<Unknown>" } };
|
|
if (!string.IsNullOrWhiteSpace(Model.Job.DeviceHeldLocation) && !Model.LocationOptions.Any(l => l.Location.Equals(Model.Job.DeviceHeldLocation)))
|
|
{
|
|
listOptions.Add(new SelectListItem() { Value = Model.Job.DeviceHeldLocation, Text = string.Format("Custom: {0}", Model.Job.DeviceHeldLocation) });
|
|
}
|
|
listOptions.AddRange(Model.LocationOptions.Select(l => new SelectListItem() { Value = l.Location, Text = (l.References.Count == 0 ? l.Location : (l.References.Count == 1 ? string.Format("{0} [Job {1}]", l.Location, l.References[0].JobId) : string.Format("{0} [{1} jobs]", l.Location, l.References.Count))) }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 308 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.DropDownListFor(m => m.Job.DeviceHeldLocation, listOptions, new { @class = "small discreet" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 308 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
;
|
|
break;
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 311 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 311 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 311 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 311 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
else if (string.IsNullOrEmpty(Model.Job.DeviceHeldLocation))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None/Unknown></span>\r\n");
|
|
|
|
|
|
#line 316 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 319 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.DeviceHeldLocation);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 319 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" </span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Held Since:</td>
|
|
<td><span");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_DeviceHeld_DeviceHeld\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 326 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceHeld, Model.Job.DeviceHeldTechUser));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 328 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 328 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.DeviceReadyForReturn.HasValue)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n " +
|
|
" <td>Ready:</td>\r\n <td><span");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_DeviceHeld_DeviceReadyForReturn\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 332 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceReadyForReturn, Model.Job.DeviceReadyForReturnTechUser));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 334 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 335 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.DeviceReturnedDate.HasValue)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n " +
|
|
" <td>Returned:</td>\r\n <td><span");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_DeviceHeld_DeviceReturnedDate\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 339 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(CommonHelpers.FriendlyDateAndTitleUser(Model.Job.DeviceReturnedDate, Model.Job.DeviceReturnedTechUser));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 341 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </table>\r\n");
|
|
|
|
|
|
#line 343 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 343 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (canEditLocation)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n");
|
|
|
|
|
|
#line 347 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 347 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
switch (Model.LocationMode)
|
|
{
|
|
case LocationModes.Unrestricted:
|
|
case LocationModes.OptionalList:
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral(@"
|
|
var $deviceHeldLocation = $('#Job_DeviceHeldLocation');
|
|
var $ajaxSave = $deviceHeldLocation.next('.ajaxSave');
|
|
var autocompleteLoaded = false;
|
|
|
|
$deviceHeldLocation
|
|
.watermark('Unknown')
|
|
.focus(function () {
|
|
$deviceHeldLocation.select();
|
|
|
|
// Load AutoComplete
|
|
if (!autocompleteLoaded){
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 364 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Url.Action(MVC.API.Job.DeviceHeldLocations()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" success: function (d) {\r\n\r" +
|
|
"\n $.each(d, function(" +
|
|
"){\r\n this.value =" +
|
|
" this.Location;\r\n " +
|
|
" this.label = this.Location;\r\n " +
|
|
" });\r\n\r\n $de" +
|
|
"viceHeldLocation.autocomplete({\r\n " +
|
|
" source: d,\r\n " +
|
|
" minLength: 0,\r\n " +
|
|
" focus: function(e, ui){\r\n " +
|
|
" return false;\r\n " +
|
|
" },\r\n " +
|
|
" select: function (e, ui) {\r\n " +
|
|
" $deviceHeldLocation.val(ui.item.Location).blur().cha" +
|
|
"nge();\r\n retu" +
|
|
"rn false;\r\n }\r\n " +
|
|
" }).data(\'ui-autocomple" +
|
|
"te\')._renderItem = function (ul, item) {\r\n " +
|
|
" var anchor = $(\'<a>\').append($(\'<strong>\').text(item.L" +
|
|
"ocation));\r\n if (" +
|
|
"item.References){\r\n " +
|
|
" anchor.append(document.createTextNode(\' [\'+item.References+\']\'));\r\n " +
|
|
" }\r\n " +
|
|
" var item = $(\"<li></li>\")\r\n " +
|
|
" .data(\"item.autocomp" +
|
|
"lete\", item)\r\n " +
|
|
" .append(anchor);\r\n " +
|
|
" return item.appendTo(ul);\r\n " +
|
|
" };\r\n \r" +
|
|
"\n $deviceHeldLocation" +
|
|
".autocomplete(\'search\', \'\');\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" autocompleteLoaded = true;\r\n " +
|
|
" }else{\r\n " +
|
|
" $deviceHeldLocation.autocomplete(\'search\', \'\');\r\n " +
|
|
" }\r\n })" +
|
|
"\r\n .keydown(function (e) {\r\n " +
|
|
" $ajaxSave.show();\r\n " +
|
|
" if (e.which == 13) {\r\n " +
|
|
" $(this).blur();\r\n " +
|
|
" }\r\n }).blur(function () {\r\n " +
|
|
" $ajaxSave.hide();\r\n " +
|
|
" })\r\n .chang" +
|
|
"e(function () {\r\n $ajaxSave.hide(" +
|
|
");\r\n $ajaxLoading = $ajaxSave.nex" +
|
|
"t(\'.ajaxLoading\').show();\r\n var d" +
|
|
"ata = { DeviceHeldLocation: $deviceHeldLocation.val() };\r\n " +
|
|
" $.ajax({\r\n " +
|
|
" url: \'");
|
|
|
|
|
|
#line 415 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Url.Action(MVC.API.Job.UpdateDeviceHeldLocation(Model.Job.Id, null)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
dataType: 'json',
|
|
data: data,
|
|
success: function (d) {
|
|
if (d == 'OK') {
|
|
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
|
} else {
|
|
$ajaxLoading.hide();
|
|
alert('Unable to update device held location: ' + d);
|
|
}
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
alert('Unable to update device held location: ' + textStatus);
|
|
$ajaxLoading.hide();
|
|
}
|
|
});
|
|
});
|
|
");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 433 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
break;
|
|
case LocationModes.RestrictedList:
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral(@"
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#Job_DeviceHeldLocation'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 439 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Url.Action(MVC.API.Job.UpdateDeviceHeldLocation(Model.Job.Id, null)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'DeviceHeldLocation\');\r\n " +
|
|
" ");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 442 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
break;
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n \r\n }" +
|
|
");\r\n </script>\r\n");
|
|
|
|
|
|
#line 448 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 450 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n");
|
|
|
|
|
|
#line 453 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 454 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.User != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <td");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n <h2");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_DisplayName\"");
|
|
|
|
WriteLiteral(" title=\"Display Name\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 458 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Authorization.Has(Claims.User.Show))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 459 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 459 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 461 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.User.DisplayName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 461 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </h2>\r\n <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_Id\"");
|
|
|
|
WriteLiteral(" title=\"Id\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 463 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.User.FriendlyId());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 464 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 464 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Authorization.Has(Claims.User.ShowDetails))
|
|
{
|
|
if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_PhoneNumber\"");
|
|
|
|
WriteLiteral(" title=\"Phone Number\"");
|
|
|
|
WriteLiteral(">Phone: ");
|
|
|
|
|
|
#line 467 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.User.PhoneNumber);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>");
|
|
|
|
|
|
#line 467 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_EmailAddress\"");
|
|
|
|
WriteLiteral(" title=\"Email Address\"");
|
|
|
|
WriteLiteral(">Email: <a");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 32897), Tuple.Create("\"", 32941)
|
|
, Tuple.Create(Tuple.Create("", 32904), Tuple.Create("mailto:", 32904), true)
|
|
|
|
#line 469 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 32911), Tuple.Create<System.Object, System.Int32>(Model.Job.User.EmailAddress
|
|
|
|
#line default
|
|
#line hidden
|
|
, 32911), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 469 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.User.EmailAddress);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</a></div>");
|
|
|
|
|
|
#line 469 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 471 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_Flags\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 474 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 474 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
foreach (var flag in Model.Job.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 33424), Tuple.Create("\"", 33494)
|
|
, Tuple.Create(Tuple.Create("", 33432), Tuple.Create("flag", 33432), true)
|
|
, Tuple.Create(Tuple.Create(" ", 33436), Tuple.Create("fa", 33437), true)
|
|
, Tuple.Create(Tuple.Create(" ", 33439), Tuple.Create("fa-", 33440), true)
|
|
|
|
#line 476 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 33443), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
|
|
|
#line default
|
|
#line hidden
|
|
, 33443), false)
|
|
, Tuple.Create(Tuple.Create(" ", 33461), Tuple.Create("fa-fw", 33462), true)
|
|
, Tuple.Create(Tuple.Create(" ", 33467), Tuple.Create("d-", 33468), true)
|
|
|
|
#line 476 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 33470), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
|
|
|
#line default
|
|
#line hidden
|
|
, 33470), false)
|
|
);
|
|
|
|
WriteLiteral("><span");
|
|
|
|
WriteLiteral(" class=\"details\"");
|
|
|
|
WriteLiteral("><span");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 476 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(flag.Item2.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>");
|
|
|
|
|
|
#line 476 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (flag.Item1.Comments != null)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"comments\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 477 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(flag.Item1.Comments.ToHtmlComment());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>");
|
|
|
|
|
|
#line 477 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"added\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 477 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span></span></i>\r\n");
|
|
|
|
|
|
#line 478 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n " +
|
|
" $(\'#Job_Show_User_Flags\')\r\n .toolt" +
|
|
"ip({\r\n items: \'i.flag\',\r\n " +
|
|
" content: function () {\r\n " +
|
|
" var $this = $(this);\r\n " +
|
|
" return $this.children(\'.details\').html();\r\n " +
|
|
" },\r\n tooltipClas" +
|
|
"s: \'User_FlagAssignment_Tooltip\',\r\n p" +
|
|
"osition: {\r\n my: \"right top\",\r\n " +
|
|
" at: \"right bottom\",\r\n " +
|
|
" collision: \"flipfit flip\"\r\n " +
|
|
" },\r\n hade: " +
|
|
"{\r\n effect: \'\'\r\n " +
|
|
" },\r\n close" +
|
|
": function (e, ui) {\r\n ui.tooltip" +
|
|
".hover(\r\n function () {\r\n " +
|
|
" $(this).stop(true).fadeTo(10" +
|
|
"0, 1);\r\n },\r\n " +
|
|
" function () {\r\n " +
|
|
" $(this).fadeOut(100, function () { $(this).remove(); " +
|
|
"});\r\n });\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" });\r\n </script>\r\n " +
|
|
" </div>\r\n");
|
|
|
|
|
|
#line 510 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 511 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.WaitingForUserAction.HasValue)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_WaitingForUserAction\"");
|
|
|
|
WriteLiteral(" class=\"status\"");
|
|
|
|
WriteLiteral(">\r\n <h4>Awaiting Action</h4>\r\n " +
|
|
" Since: <span");
|
|
|
|
WriteLiteral(" data-livestamp=\"");
|
|
|
|
|
|
#line 515 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.WaitingForUserAction.ToUnixEpoc());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 515 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Model.Job.WaitingForUserAction.ToFullDateTime());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n </div>\r\n");
|
|
|
|
|
|
#line 517 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n");
|
|
|
|
|
|
#line 520 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </tr>\r\n <tr");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Subjects_Actions\"");
|
|
|
|
WriteLiteral(">\r\n <td");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Actions\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 524 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 524 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
List<string> CanCloseForcedReasons;
|
|
if (Model.Job.CanCloseForced(out CanCloseForcedReasons))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 528 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLinkSmallButton("Forcibly Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 528 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Actions_ForceClose_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Forcibly Close this Job?\"");
|
|
|
|
WriteLiteral(">\r\n <div");
|
|
|
|
WriteLiteral(" class=\"info-box error\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-circle\"");
|
|
|
|
WriteLiteral("></i><strong>Are you sure?</strong>\r\n </p>\r\n " +
|
|
" <ul>\r\n");
|
|
|
|
|
|
#line 535 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 535 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
foreach (var reason in CanCloseForcedReasons)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <li>");
|
|
|
|
|
|
#line 537 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(reason);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</li>\r\n");
|
|
|
|
|
|
#line 538 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </ul>\r\n </div>\r\n");
|
|
|
|
|
|
#line 541 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 541 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
using (Html.BeginForm(MVC.API.Job.ForceClose(Model.Job.Id, null, true)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h3>Reason:</h3>\r\n");
|
|
|
|
WriteLiteral(" <p>\r\n <textarea");
|
|
|
|
WriteLiteral(" name=\"Reason\"");
|
|
|
|
WriteLiteral(" class=\"block\"");
|
|
|
|
WriteLiteral("></textarea>\r\n </p>\r\n");
|
|
|
|
|
|
#line 547 "..\..\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_ForceClose_Button\');\r\n var buttonDia" +
|
|
"log = null;\r\n\r\n button.click(function () {\r\n " +
|
|
" if (!buttonDialog) {\r\n buttonDialo" +
|
|
"g = $(\'#Job_Show_Job_Actions_ForceClose_Dialog\');\r\n " +
|
|
" buttonDialog.dialog({\r\n resizable: false,\r" +
|
|
"\n modal: true,\r\n " +
|
|
" autoOpen: false,\r\n buttons: {\r\n " +
|
|
" \"Forcibly Close Job\": function () {\r\n " +
|
|
" var $this = $(this);\r\n " +
|
|
" $this.dialog(\"disable\");\r\n " +
|
|
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
|
" $this.find(\'form\').submit();\r\n " +
|
|
" },\r\n Cancel: function () {\r\n " +
|
|
" $(this).dialog(\"close\");\r\n " +
|
|
" }\r\n }\r\n " +
|
|
" });\r\n }\r\n\r\n " +
|
|
" buttonDialog.dialog(\'open\');\r\n return false;\r\n " +
|
|
" });\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 580 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n\r\n");
|
|
|
|
|
|
#line 583 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 583 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanCloseNormally())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 585 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLinkSmallButton("Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_Close_Button"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 585 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Actions_Close_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Close this Job?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|
|
|
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n var button = $(\'#" +
|
|
"Job_Show_Job_Actions_Close_Button\');\r\n var buttonDialog =" +
|
|
" null;\r\n var buttonLink = button.attr(\'href\');\r\n " +
|
|
" button.attr(\'href\', \'#\').click(function () {\r\n " +
|
|
" if (!buttonDialog){\r\n buttonDialog = $(\'" +
|
|
"#Job_Show_Job_Actions_Close_Dialog\');\r\n buttonDia" +
|
|
"log.dialog({\r\n resizable: false,\r\n " +
|
|
" modal: true,\r\n autoO" +
|
|
"pen: false,\r\n buttons: {\r\n " +
|
|
" \"Close Job\": function () {\r\n " +
|
|
" var $this = $(this);\r\n $" +
|
|
"this.dialog(\"disable\");\r\n $this.dialo" +
|
|
"g(\"option\", \"buttons\", null);\r\n windo" +
|
|
"w.location.href = buttonLink;\r\n },\r\n " +
|
|
" Cancel: function () {\r\n " +
|
|
" $(this).dialog(\"close\");\r\n " +
|
|
" }\r\n }\r\n " +
|
|
" });\r\n }\r\n\r\n buttonDialog" +
|
|
".dialog(\'open\');\r\n return false;\r\n " +
|
|
" });\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 622 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 623 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanReopen())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 625 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLinkSmallButton("Reopen Job", MVC.API.Job.Reopen(Model.Job.Id, true), "Job_Show_Job_Actions_Reopen_Button"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 625 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Actions_Reopen_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Reopen this Job?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|
|
|
WriteLiteral("></i> Are you sure?\r\n </p>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n var button = $(\'#" +
|
|
"Job_Show_Job_Actions_Reopen_Button\');\r\n var buttonDialog " +
|
|
"= null;\r\n var buttonLink = button.attr(\'href\');\r\n " +
|
|
" button.attr(\'href\', \'#\');\r\n button.click(" +
|
|
"function () {\r\n if (!buttonDialog){\r\n " +
|
|
" buttonDialog = $(\'#Job_Show_Job_Actions_Reopen_Dialog\');\r\n " +
|
|
" buttonDialog.dialog({\r\n " +
|
|
" resizable: false,\r\n modal: true,\r\n " +
|
|
" autoOpen: false,\r\n " +
|
|
" buttons: {\r\n \"Reopen\": function () {\r" +
|
|
"\n var $this = $(this);\r\n " +
|
|
" $this.dialog(\"disable\");\r\n " +
|
|
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
|
" window.location.href = buttonLink;\r\n " +
|
|
" },\r\n Cancel: funct" +
|
|
"ion () {\r\n $(this).dialog(\"close\");\r\n" +
|
|
" }\r\n }" +
|
|
"\r\n });\r\n }\r\n " +
|
|
" \r\n buttonDialog.dialog(\'open\');\r\n " +
|
|
" return false;\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 663 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 664 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanDelete())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 666 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLinkSmallButton("Delete", MVC.API.Job.Delete(Model.Job.Id, true), "Job_Show_Job_Actions_Delete_Button"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 666 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Actions_Delete_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Delete this Job?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|
|
|
WriteLiteral("></i> This item will be permanently deleted and cannot be recovered. Are you" +
|
|
" sure?\r\n </p>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n var button = $(\'#" +
|
|
"Job_Show_Job_Actions_Delete_Button\');\r\n var buttonDialog " +
|
|
"= null;\r\n var buttonLink = button.attr(\'href\');\r\n " +
|
|
" button.attr(\'href\', \'#\');\r\n button.click(" +
|
|
"function () {\r\n if (!buttonDialog){\r\n " +
|
|
" buttonDialog = $(\'#Job_Show_Job_Actions_Delete_Dialog\');\r\n " +
|
|
" buttonDialog.dialog({\r\n " +
|
|
" resizable: false,\r\n modal: true,\r\n " +
|
|
" autoOpen: false,\r\n " +
|
|
" buttons: {\r\n \"Delete\": function () {\r" +
|
|
"\n var $this = $(this);\r\n " +
|
|
" $this.dialog(\"disable\");\r\n " +
|
|
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
|
" window.location.href = buttonLink;\r\n " +
|
|
" },\r\n Cancel: funct" +
|
|
"ion () {\r\n $(this).dialog(\"close\");\r\n" +
|
|
" }\r\n }" +
|
|
"\r\n });\r\n }\r\n\r\n " +
|
|
" buttonDialog.dialog(\'open\');\r\n re" +
|
|
"turn false;\r\n });\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 704 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 705 "..\..\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 713 "..\..\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 713 "..\..\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 715 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 715 "..\..\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=\"", 46987), Tuple.Create("\"", 47008)
|
|
|
|
#line 718 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 46995), Tuple.Create<System.Object, System.Int32>(Model.Job.Id
|
|
|
|
#line default
|
|
#line hidden
|
|
, 46995), false)
|
|
);
|
|
|
|
WriteLiteral(" />\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"queuePicker\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 720 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 720 "..\..\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 722 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(jobQueue.Id);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" data-queuesla=\"");
|
|
|
|
|
|
#line 722 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(jobQueue.DefaultSLAExpiry.HasValue ? jobQueue.DefaultSLAExpiry.Value.ToString() : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(" data-queuepriority=\"");
|
|
|
|
|
|
#line 722 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(jobQueue.Priority.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 47477), Tuple.Create("\"", 47544)
|
|
, Tuple.Create(Tuple.Create("", 47485), Tuple.Create("fa", 47485), true)
|
|
, Tuple.Create(Tuple.Create(" ", 47487), Tuple.Create("fa-", 47488), true)
|
|
|
|
#line 723 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 47491), Tuple.Create<System.Object, System.Int32>(jobQueue.Icon
|
|
|
|
#line default
|
|
#line hidden
|
|
, 47491), false)
|
|
, Tuple.Create(Tuple.Create(" ", 47507), Tuple.Create("fa-fw", 47508), true)
|
|
, Tuple.Create(Tuple.Create(" ", 47513), Tuple.Create("fa-lg", 47514), true)
|
|
, Tuple.Create(Tuple.Create(" ", 47519), Tuple.Create("d-", 47520), true)
|
|
|
|
#line 723 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 47522), Tuple.Create<System.Object, System.Int32>(jobQueue.IconColour
|
|
|
|
#line default
|
|
#line hidden
|
|
, 47522), false)
|
|
);
|
|
|
|
WriteLiteral("></i>");
|
|
|
|
|
|
#line 723 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(jobQueue.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 725 "..\..\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 Pri" +
|
|
"ority</h4>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 730 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.DropDownList("Priority", priorityItems, new { id = "Job_Show_Job_Actions_AddQueue_Priority" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <i");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 47941), Tuple.Create("\"", 47989)
|
|
, Tuple.Create(Tuple.Create("", 47949), Tuple.Create("fa", 47949), true)
|
|
, Tuple.Create(Tuple.Create(" ", 47951), Tuple.Create("d-priority-", 47952), true)
|
|
|
|
#line 730 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 47963), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 47963), false)
|
|
);
|
|
|
|
WriteAttribute("title", Tuple.Create(" title=\"", 47990), Tuple.Create("\"", 48023)
|
|
|
|
#line 730 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 47998), Tuple.Create<System.Object, System.Int32>(priorityValue
|
|
|
|
#line default
|
|
#line hidden
|
|
, 47998), false)
|
|
, Tuple.Create(Tuple.Create(" ", 48014), Tuple.Create("Priority", 48015), true)
|
|
);
|
|
|
|
WriteLiteral("></i>\r\n </div>\r\n <div>\r\n " +
|
|
" <h4>SLA Target</h4>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 734 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.DropDownList("SLAExpiresMinutes", slaOptions, new { id = "Job_Show_Job_Actions_AddQueue_SLAExpiresMinutes" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n <div>\r\n " +
|
|
" <h4>Tasks/Comment</h4>\r\n " +
|
|
"<textarea");
|
|
|
|
WriteLiteral(" name=\"Comment\"");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Actions_AddQueue_Comment\"");
|
|
|
|
WriteLiteral("></textarea>\r\n </div>\r\n </div>\r" +
|
|
"\n");
|
|
|
|
|
|
#line 741 "..\..\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 queueId = null;\r\n var details = null;\r\n\r" +
|
|
"\n function queueSelected(){\r\n " +
|
|
"var queue = $(this);\r\n\r\n queuePicker.children().remov" +
|
|
"eClass(\'selected\');\r\n queue.addClass(\'selected\');\r\n\r\n" +
|
|
" queueId.val(queue.attr(\'data-queueid\'));\r\n\r\n " +
|
|
" var queueSLA = queue.attr(\'data-queuesla\');\r\n " +
|
|
" if (!queueSLA)\r\n queueSLA = 0;\r\n\r\n " +
|
|
" $(\'#Job_Show_Job_Actions_AddQueue_Priority\').val(\'Norm" +
|
|
"al\');\r\n $(\'#Job_Show_Job_Actions_AddQueue_SLAExpiresM" +
|
|
"inutes\').val(queueSLA);\r\n\r\n details.show();\r\n\r\n " +
|
|
" $(\'#Job_Show_Job_Actions_AddQueue_Comment\').focus().select" +
|
|
"();\r\n }\r\n \r\n " +
|
|
" button.attr(\'href\', \'#\').click(function (e) {\r\n e.p" +
|
|
"reventDefault();\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 " +
|
|
" Cancel: function () {\r\n $(this).dia" +
|
|
"log(\"close\");\r\n },\r\n " +
|
|
" \"Add to Queue\": function () {\r\n " +
|
|
" if (!!queueId.val()){\r\n " +
|
|
" var $this = $(this);\r\n $this" +
|
|
".dialog(\"disable\");\r\n $this.dialo" +
|
|
"g(\"option\", \"buttons\", null);\r\n b" +
|
|
"uttonDialog.find(\'form\').submit();\r\n " +
|
|
"}else{\r\n alert(\'Select a Job Queu" +
|
|
"e\');\r\n }\r\n " +
|
|
" }\r\n }\r\n " +
|
|
" });\r\n\r\n queuePicker = buttonDialog.find(\'." +
|
|
"queuePicker\');\r\n queueId = $(\'#Job_Show_Job_Actio" +
|
|
"ns_AddQueue_Dialog_Id\');\r\n details = buttonDialog" +
|
|
".find(\'.details\');\r\n\r\n var priorityList = $(\'#Job" +
|
|
"_Show_Job_Actions_AddQueue_Priority\');\r\n priority" +
|
|
"List.change(function () {\r\n var icon = priori" +
|
|
"tyList.closest(\'div\').find(\'i\').first();\r\n ic" +
|
|
"on[0].className = \'\';\r\n icon.addClass(\'fa d-p" +
|
|
"riority-\' + priorityList.val().toLowerCase()).attr(\'title\', priorityList.val() +" +
|
|
" \' Priority\');\r\n });\r\n\r\n " +
|
|
" queuePicker.on(\'click\', \'div.queue\', queueSelected);\r\n " +
|
|
" }\r\n\r\n buttonDialog.dialog(\'open\');\r\n " +
|
|
" return false;\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 820 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 821 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanLogWarranty())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 823 "..\..\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 823 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 825 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanWarrantyCompleted())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 827 "..\..\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 827 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 829 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanInsuranceClaimFormSent())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 831 "..\..\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 831 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 833 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanLogRepair())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 835 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
Write(Html.ActionLinkSmallButton("Log Repair", MVC.Job.LogRepair(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogRepair_Button"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 835 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 837 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanRepairComplete())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 839 "..\..\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 839 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 841 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanConvertHWarToHNWar())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 843 "..\..\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 843 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Job_Actions_ConvertToHNWar_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Convert this Job?\"");
|
|
|
|
WriteLiteral(">\r\n <p>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
|
|
|
|
WriteLiteral("></i> This process is not reversible.<br />\r\n Are you" +
|
|
" sure?\r\n </p>\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n var button = $(\'#" +
|
|
"Job_Show_Job_Actions_ConvertToHNWar_Button\');\r\n var butto" +
|
|
"nDialog = null;\r\n var buttonLink = button.attr(\'href\');\r\n" +
|
|
" button.attr(\'href\', \'#\');\r\n butto" +
|
|
"n.click(function () {\r\n if (!buttonDialog){\r\n " +
|
|
" buttonDialog = $(\'#Job_Show_Job_Actions_ConvertToHNWar_D" +
|
|
"ialog\');\r\n buttonDialog.dialog({\r\n " +
|
|
" resizable: false,\r\n moda" +
|
|
"l: true,\r\n autoOpen: false,\r\n " +
|
|
" buttons: {\r\n \"Convert" +
|
|
"\": function () {\r\n var $this = $(this" +
|
|
");\r\n $this.dialog(\"disable\");\r\n " +
|
|
" $this.dialog(\"option\", \"buttons\", null);\r\n" +
|
|
" window.location.href = buttonLink;\r\n" +
|
|
" },\r\n " +
|
|
" Cancel: function () {\r\n $(this).d" +
|
|
"ialog(\"close\");\r\n }\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" }\r\n\r\n buttonDialog.dialog(\'open\');\r\n " +
|
|
" return false;\r\n });\r\n " +
|
|
" \r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 883 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n");
|
|
|
|
|
|
#line 885 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 885 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.Device != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <td");
|
|
|
|
WriteLiteral(" id=\"Job_Show_Device_Actions\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 888 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 888 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanDeviceHeld())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 890 "..\..\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 890 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 892 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanDeviceReadyForReturn())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 894 "..\..\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 894 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 896 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanDeviceReturned())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 898 "..\..\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 898 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n");
|
|
|
|
|
|
#line 901 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 902 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.User != null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <td");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_Actions\"");
|
|
|
|
WriteLiteral(">\r\n\r\n\r\n");
|
|
|
|
|
|
#line 907 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 907 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanWaitingForUserAction())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_Actions_WaitingForUserAction_Button\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(">Awaiting User Action</a>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_Actions_WaitingForUserAction_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Waiting for User Action\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 911 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 911 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h3>Reason:</h3>\r\n");
|
|
|
|
WriteLiteral(" <p>\r\n <textarea");
|
|
|
|
WriteLiteral(" name=\"Reason\"");
|
|
|
|
WriteLiteral(" class=\"block\"");
|
|
|
|
WriteLiteral("></textarea>\r\n </p>\r\n");
|
|
|
|
|
|
#line 917 "..\..\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 butto" +
|
|
"n = $(\'#Job_Show_User_Actions_WaitingForUserAction_Button\');\r\n " +
|
|
" var buttonDialog = null;\r\n\r\n button.click(f" +
|
|
"unction () {\r\n if (!buttonDialog) {\r\n " +
|
|
" buttonDialog = $(\'#Job_Show_User_Actions_WaitingForUserA" +
|
|
"ction_Dialog\');\r\n buttonDialog.dialog({\r\n " +
|
|
" resizable: false,\r\n " +
|
|
" modal: true,\r\n autoOpen: f" +
|
|
"alse,\r\n buttons: {\r\n " +
|
|
" \"Waiting for User Action\": function () {\r\n " +
|
|
" var $this = $(this);\r\n " +
|
|
" $this.dialog(\"disable\");\r\n " +
|
|
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
|
" $this.find(\'form\').submit();\r\n " +
|
|
" },\r\n Cancel: fun" +
|
|
"ction () {\r\n $(this).dialog(\"clos" +
|
|
"e\");\r\n }\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" }\r\n\r\n buttonDialog.dialog(\'open\');\r\n " +
|
|
" return false;\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 950 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 951 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
if (Model.Job.CanNotWaitingForUserAction())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <a");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_Actions_NotWaitingForUserAction_Button\"");
|
|
|
|
WriteLiteral(" href=\"#\"");
|
|
|
|
WriteLiteral(" class=\"button alert small\"");
|
|
|
|
WriteLiteral(">User Action Resolved</a>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"Job_Show_User_Actions_NotWaitingForUserAction_Dialog\"");
|
|
|
|
WriteLiteral(" class=\"dialog\"");
|
|
|
|
WriteLiteral(" title=\"Not Waiting for User Action\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 955 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 955 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true)))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h3>Resolution:</h3>\r\n");
|
|
|
|
WriteLiteral(" <p>\r\n <textarea");
|
|
|
|
WriteLiteral(" name=\"Resolution\"");
|
|
|
|
WriteLiteral(" class=\"block\"");
|
|
|
|
WriteLiteral("></textarea>\r\n </p>\r\n");
|
|
|
|
|
|
#line 961 "..\..\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 butto" +
|
|
"n = $(\'#Job_Show_User_Actions_NotWaitingForUserAction_Button\');\r\n " +
|
|
" var buttonDialog = null;\r\n\r\n button.clic" +
|
|
"k(function () {\r\n if (!buttonDialog) {\r\n " +
|
|
" buttonDialog = $(\'#Job_Show_User_Actions_NotWaitingFo" +
|
|
"rUserAction_Dialog\');\r\n buttonDialog.dialog({" +
|
|
"\r\n resizable: false,\r\n " +
|
|
" height: 240,\r\n modal" +
|
|
": true,\r\n autoOpen: false,\r\n " +
|
|
" buttons: {\r\n " +
|
|
" \"Not Waiting for User Action\": function () {\r\n " +
|
|
" var $this = $(this);\r\n " +
|
|
" $this.dialog(\"disable\");\r\n " +
|
|
" $this.dialog(\"option\", \"buttons\", null);\r\n " +
|
|
" $this.find(\'form\').submit();\r\n " +
|
|
" },\r\n Cancel: function () {\r\n " +
|
|
" $(this).dialog(\"close\");\r\n " +
|
|
" }\r\n }\r\n" +
|
|
" });\r\n }\r\n\r\n " +
|
|
" buttonDialog.dialog(\'open\');\r\n " +
|
|
" return false;\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 995 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n");
|
|
|
|
|
|
#line 998 "..\..\Views\Job\JobParts\_Subject.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </tr>\r\n</table>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|