Bug Fix: Job Quick-Logging with Queues
Jobs logged cannot be quick-logged if they are added into a queue. 'Device Held' can only be configured if the authorization is given.
This commit is contained in:
1 parent
68256d7abd
commit
7027b33fe2
7 files changed
+180
-81
No files matched your search
@@ -34,7 +34,7 @@ namespace Disco.Web.Extensions
|
|||||||
var sb = new System.Text.StringBuilder(System.Web.HttpUtility.HtmlEncode(jst.Description));
|
var sb = new System.Text.StringBuilder(System.Web.HttpUtility.HtmlEncode(jst.Description));
|
||||||
|
|
||||||
foreach (var jq in jst.JobQueues)
|
foreach (var jq in jst.JobQueues)
|
||||||
sb.AppendFormat(" <i class=\"fa fa-{0} fa-fw d-{1}\" title=\"{2}\"></i>", jq.Icon, jq.IconColour, jq.Name);
|
sb.AppendFormat(" <i class=\"queue fa fa-{0} fa-fw d-{1}\" title=\"{2}\"></i>", jq.Icon, jq.IconColour, jq.Name);
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -732,7 +732,7 @@
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
#createJob_Container #createJob_QuickLogAutoCloseContainer input {
|
#createJob_Container #createJob_QuickLogAutoCloseContainer input {
|
||||||
margin-left: 6px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
#createJob_Container #createJob_QuickLogTaskTimeContainer {
|
#createJob_Container #createJob_QuickLogTaskTimeContainer {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -746,7 +746,7 @@
|
|||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
#createJob_Container #createJob_QuickLogTaskTimeContainer label {
|
#createJob_Container #createJob_QuickLogTaskTimeContainer label {
|
||||||
margin-right: 20px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
#createJob_Container #createJob_QuickLogTaskTimeContainer #createJob_TaskTimeOtherMinutesContainer {
|
#createJob_Container #createJob_QuickLogTaskTimeContainer #createJob_TaskTimeOtherMinutesContainer {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -771,7 +771,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
margin-left: 6px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -788,7 +788,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
margin-right: 20px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#createJob_TaskTimeOtherMinutesContainer {
|
#createJob_TaskTimeOtherMinutesContainer {
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#layout_PageHeading #Job_Show_Status{margin-left:20px;display:inline-block;height:50px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:.7em;text-transform:uppercase}#layout_PageHeading #Job_Show_Status span.icon{margin-right:6px}#layout_PageHeading #Job_Show_QueueStatus{display:inline-block;float:right;height:50px;font-size:.6em}#Job_List{padding-top:20px}#Job_List>.jobTable>h3{margin:30px 0 50px 20px!important}#Job_Show #Job_Show_Subjects{table-layout:fixed}#Job_Show #Job_Show_Subjects>tbody>tr>td{padding-top:0;height:100%}#Job_Show #Job_Show_Subjects>tbody>tr>td>div{position:relative}#Job_Show #Job_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd}#Job_Show #Job_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px}#Job_Show #Job_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Type>table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_1,#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_2{padding-left:16px;font-weight:bold}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_Update{margin-left:16px;font-size:.9em}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_Update_Dialog{display:none}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates{padding-bottom:6px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table>tbody>tr>td{vertical-align:middle}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table>tbody>tr>td:first-child{font-weight:bold;width:60px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container{padding-top:4px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container #Job_Show_GenerateDocument{padding:0}#Job_Show #Job_Show_Subjects #Job_Show_Device>div{padding-left:102px;min-height:100px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Model_Image{position:absolute;left:0;top:0;height:96px;width:96px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details{float:left}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar,#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar{float:right;border-left:1px dashed #ddd;padding-left:4px;margin-right:2px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar_Details_Button,#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar_Details_Button{font-size:.9em}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table>tbody>tr>td:first-child{width:62px}#Job_Show #Job_Show_Subjects #Job_Show_Subjects_Actions>td{padding-top:4px}#Job_Show #Job_Show_Subjects #Job_Show_Subjects_Actions #Job_Show_Device_Actions{padding-left:111px}#jobDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:none;padding:0}#jobDetailTabs #jobDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:none;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table}#jobDetailTabs #jobDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px}#jobDetailTabs #jobDetailTaLine truncated
|
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff}.tableData>tbody>tr:nth-child(odd)>td{background-color:#fcfcfc}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4}.tableData>tbody>tr:hover>td{background-color:#fefefe}.tableData>tbody>tr:hover:nth-child(odd)>td{background-color:#fafafa}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8}.tableDataContainer{background-color:#fff}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer}.subtleUntilHover{-moz-opacity:.3;opacity:.3}.subtleUntilHover:hover{-moz-opacity:1;opacity:1}#layout_PageHeading #Job_Show_Status{margin-left:20px;display:inline-block;height:50px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:.7em;text-transform:uppercase}#layout_PageHeading #Job_Show_Status span.icon{margin-right:6px}#layout_PageHeading #Job_Show_QueueStatus{display:inline-block;float:right;height:50px;font-size:.6em}#Job_List{padding-top:20px}#Job_List>.jobTable>h3{margin:30px 0 50px 20px!important}#Job_Show #Job_Show_Subjects{table-layout:fixed}#Job_Show #Job_Show_Subjects>tbody>tr>td{padding-top:0;height:100%}#Job_Show #Job_Show_Subjects>tbody>tr>td>div{position:relative}#Job_Show #Job_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd}#Job_Show #Job_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px}#Job_Show #Job_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Type>table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_1,#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_2{padding-left:16px;font-weight:bold}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_Update{margin-left:16px;font-size:.9em}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_SubTypes_Update_Dialog{display:none}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates{padding-bottom:6px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table>tbody>tr>td{vertical-align:middle}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_Job_Dates table>tbody>tr>td:first-child{font-weight:bold;width:60px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container{padding-top:4px}#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container #Job_Show_GenerateDocument{padding:0}#Job_Show #Job_Show_Subjects #Job_Show_Device>div{padding-left:102px;min-height:100px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Model_Image{position:absolute;left:0;top:0;height:96px;width:96px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details{float:left}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar,#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar{float:right;border-left:1px dashed #ddd;padding-left:4px;margin-right:2px}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar_Details_Button,#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar_Details_Button{font-size:.9em}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table{table-layout:fixed}#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table>tbody>tr>td:first-child{width:62px}#Job_Show #Job_Show_Subjects #Job_Show_Subjects_Actions>td{padding-top:4px}#Job_Show #Job_Show_Subjects #Job_Show_Subjects_Actions #Job_Show_Device_Actions{padding-left:111px}#jobDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:none;padding:0}#jobDetailTabs #jobDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:none;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table}#jobDetailTabs #jobDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px}#jobDetailTabs #jobDetailTaLine truncated
|
||||||
@@ -397,7 +397,11 @@ namespace Disco.Web.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Authorization.Has(Claims.Job.Actions.Close) && m.QuickLog.HasValue && m.QuickLog.Value && m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0)
|
if (Authorization.Has(Claims.Job.Actions.Close)
|
||||||
|
&& m.QuickLog.HasValue && m.QuickLog.Value
|
||||||
|
&& m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0
|
||||||
|
&& (j.JobQueues == null || j.JobQueues.All(jqj => jqj.RemovedDate.HasValue))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Quick Log
|
// Quick Log
|
||||||
// Set Opened Date in the past
|
// Set Opened Date in the past
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
if (Authorization.Has(Claims.Job.Properties.DeviceHeld)){
|
||||||
<div id="createJob_DeviceHeldContainer" class="createJob_Component">
|
<div id="createJob_DeviceHeldContainer" class="createJob_Component">
|
||||||
@Html.ValidationMessageFor(m => m.DeviceHeld)
|
@Html.ValidationMessageFor(m => m.DeviceHeld)
|
||||||
@Html.HiddenFor(m => m.DeviceHeld)
|
@Html.HiddenFor(m => m.DeviceHeld)
|
||||||
@@ -50,6 +51,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
}else{
|
||||||
|
@Html.Hidden("DeviceHeld", false)
|
||||||
|
}
|
||||||
<div id="createJob_CommentsContainer" class="createJob_Component">
|
<div id="createJob_CommentsContainer" class="createJob_Component">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -69,11 +73,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="createJob_QuickLogTaskTimeContainer">
|
<div id="createJob_QuickLogTaskTimeContainer">
|
||||||
<h4>Task Time:</h4>
|
<h4>Task Time:</h4>
|
||||||
<input type="radio" id="createJob_TaskTime10" name="QuickLogTaskTimeMinutes" value="10" /><label for="createJob_TaskTime10"> 10 Minutes</label>
|
<input type="radio" id="createJob_TaskTime5" name="QuickLogTaskTimeMinutes" value="5" /><label for="createJob_TaskTime5">5 Minutes</label>
|
||||||
<input type="radio" id="createJob_TaskTime30" name="QuickLogTaskTimeMinutes" value="30" /><label for="createJob_TaskTime30"> 30 Minutes</label>
|
<input type="radio" id="createJob_TaskTime10" name="QuickLogTaskTimeMinutes" value="10" /><label for="createJob_TaskTime10">10 Minutes</label>
|
||||||
<input type="radio" id="createJob_TaskTime60" name="QuickLogTaskTimeMinutes" value="60" /><label for="createJob_TaskTime60"> 1 Hour</label>
|
<input type="radio" id="createJob_TaskTime30" name="QuickLogTaskTimeMinutes" value="30" /><label for="createJob_TaskTime30">30 Minutes</label>
|
||||||
<input type="radio" id="createJob_TaskTime120" name="QuickLogTaskTimeMinutes" value="120" /><label for="createJob_TaskTime120"> 2 Hours</label>
|
<input type="radio" id="createJob_TaskTime60" name="QuickLogTaskTimeMinutes" value="60" /><label for="createJob_TaskTime60">1 Hour</label>
|
||||||
<input type="radio" id="createJob_TaskTimeOther" name="QuickLogTaskTimeMinutes" value="" /><label for="createJob_TaskTimeOther"> Other</label>
|
<input type="radio" id="createJob_TaskTime120" name="QuickLogTaskTimeMinutes" value="120" /><label for="createJob_TaskTime120">2 Hours</label>
|
||||||
|
<input type="radio" id="createJob_TaskTimeOther" name="QuickLogTaskTimeMinutes" value="" /><label for="createJob_TaskTimeOther">Other</label>
|
||||||
<span id="createJob_TaskTimeOtherMinutesContainer">
|
<span id="createJob_TaskTimeOtherMinutesContainer">
|
||||||
<input type="number" id="createJob_TaskTimeOtherMinutes" name="QuickLogTaskTimeMinutesOther" value="" disabled="disabled" />
|
<input type="number" id="createJob_TaskTimeOtherMinutes" name="QuickLogTaskTimeMinutesOther" value="" disabled="disabled" />
|
||||||
Minutes
|
Minutes
|
||||||
@@ -207,6 +212,7 @@
|
|||||||
//#region DeviceHeld
|
//#region DeviceHeld
|
||||||
var $deviceHeld = $('#DeviceHeld');
|
var $deviceHeld = $('#DeviceHeld');
|
||||||
|
|
||||||
|
@if (Authorization.Has(Claims.Job.Properties.DeviceHeld)){<text>
|
||||||
if ($('#DeviceSerialNumber').val()) {
|
if ($('#DeviceSerialNumber').val()) {
|
||||||
switch ($deviceHeld.val()) {
|
switch ($deviceHeld.val()) {
|
||||||
case 'True':
|
case 'True':
|
||||||
@@ -237,6 +243,7 @@
|
|||||||
$deviceHeld.val('False');
|
$deviceHeld.val('False');
|
||||||
$('#createJob_DeviceHeldContainer').hide();
|
$('#createJob_DeviceHeldContainer').hide();
|
||||||
}
|
}
|
||||||
|
</text>}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
@if (Authorization.Has(Claims.Job.Actions.Close)){
|
@if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||||
@@ -251,6 +258,7 @@
|
|||||||
|
|
||||||
$deviceHeld.change(validateQuickLog);
|
$deviceHeld.change(validateQuickLog);
|
||||||
$jobTypes.change(validateQuickLog);
|
$jobTypes.change(validateQuickLog);
|
||||||
|
$('#createJob_SubTypes').on('change', 'input', validateQuickLog);
|
||||||
validateQuickLog();
|
validateQuickLog();
|
||||||
|
|
||||||
function validateQuickLog() {
|
function validateQuickLog() {
|
||||||
@@ -259,6 +267,7 @@
|
|||||||
if ($deviceHeld.val() === 'True') {
|
if ($deviceHeld.val() === 'True') {
|
||||||
quickLogAllowed = false;
|
quickLogAllowed = false;
|
||||||
} else {
|
} else {
|
||||||
|
// Allow Quick-Log only for certain Job Types
|
||||||
var selectedType = $jobTypes.filter(':checked').val();
|
var selectedType = $jobTypes.filter(':checked').val();
|
||||||
switch (selectedType) {
|
switch (selectedType) {
|
||||||
case 'HMisc':
|
case 'HMisc':
|
||||||
@@ -266,7 +275,11 @@
|
|||||||
case 'SImg':
|
case 'SImg':
|
||||||
case 'SOS':
|
case 'SOS':
|
||||||
case 'UMgmt':
|
case 'UMgmt':
|
||||||
quickLogAllowed = true;
|
// If Job-Queues are configured for a Sub-Type, don't allow quick-log.
|
||||||
|
if ($('#createJob_SubType_' + $jobTypes.filter(':checked').val()).find('input:checked').closest('li').has('i.queue').length == 0)
|
||||||
|
quickLogAllowed = true;
|
||||||
|
else
|
||||||
|
quickLogAllowed = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
quickLogAllowed = false;
|
quickLogAllowed = false;
|
||||||
|
|||||||
@@ -249,6 +249,13 @@ WriteLiteral("\r\n </div>\r\n </div>
|
|||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral(" </div>\r\n </div>\r\n");
|
WriteLiteral(" </div>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 36 "..\..\Views\Job\Create.cshtml"
|
||||||
|
if (Authorization.Has(Claims.Job.Properties.DeviceHeld)){
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"createJob_DeviceHeldContainer\"");
|
WriteLiteral(" id=\"createJob_DeviceHeldContainer\"");
|
||||||
@@ -260,7 +267,7 @@ WriteLiteral(">\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 37 "..\..\Views\Job\Create.cshtml"
|
#line 38 "..\..\Views\Job\Create.cshtml"
|
||||||
Write(Html.ValidationMessageFor(m => m.DeviceHeld));
|
Write(Html.ValidationMessageFor(m => m.DeviceHeld));
|
||||||
|
|
||||||
|
|
||||||
@@ -271,7 +278,7 @@ WriteLiteral("\r\n");
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 38 "..\..\Views\Job\Create.cshtml"
|
#line 39 "..\..\Views\Job\Create.cshtml"
|
||||||
Write(Html.HiddenFor(m => m.DeviceHeld));
|
Write(Html.HiddenFor(m => m.DeviceHeld));
|
||||||
|
|
||||||
|
|
||||||
@@ -311,6 +318,28 @@ WriteLiteral(" for=\"createJob_DeviceNotHeld\"");
|
|||||||
WriteLiteral(">Not Held</label>\r\n </td>\r\n </tr>\r\n " +
|
WriteLiteral(">Not Held</label>\r\n </td>\r\n </tr>\r\n " +
|
||||||
"</table>\r\n </div>\r\n");
|
"</table>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 54 "..\..\Views\Job\Create.cshtml"
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 55 "..\..\Views\Job\Create.cshtml"
|
||||||
|
Write(Html.Hidden("DeviceHeld", false));
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 55 "..\..\Views\Job\Create.cshtml"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
WriteLiteral(" <div");
|
WriteLiteral(" <div");
|
||||||
|
|
||||||
WriteLiteral(" id=\"createJob_CommentsContainer\"");
|
WriteLiteral(" id=\"createJob_CommentsContainer\"");
|
||||||
@@ -324,7 +353,7 @@ WriteLiteral(">\r\n <table>\r\n <tr>\r\n
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 60 "..\..\Views\Job\Create.cshtml"
|
#line 64 "..\..\Views\Job\Create.cshtml"
|
||||||
Write(Html.EditorFor(m => m.Comments));
|
Write(Html.EditorFor(m => m.Comments));
|
||||||
|
|
||||||
|
|
||||||
@@ -334,7 +363,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n
|
|||||||
" </div>\r\n");
|
" </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 65 "..\..\Views\Job\Create.cshtml"
|
#line 69 "..\..\Views\Job\Create.cshtml"
|
||||||
if (Authorization.Has(Claims.Job.Actions.Close)){
|
if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||||
|
|
||||||
|
|
||||||
@@ -372,6 +401,20 @@ WriteLiteral(">\r\n <h4>Task Time:</h4>\r\n <input
|
|||||||
|
|
||||||
WriteLiteral(" type=\"radio\"");
|
WriteLiteral(" type=\"radio\"");
|
||||||
|
|
||||||
|
WriteLiteral(" id=\"createJob_TaskTime5\"");
|
||||||
|
|
||||||
|
WriteLiteral(" name=\"QuickLogTaskTimeMinutes\"");
|
||||||
|
|
||||||
|
WriteLiteral(" value=\"5\"");
|
||||||
|
|
||||||
|
WriteLiteral(" /><label");
|
||||||
|
|
||||||
|
WriteLiteral(" for=\"createJob_TaskTime5\"");
|
||||||
|
|
||||||
|
WriteLiteral(">5 Minutes</label>\r\n <input");
|
||||||
|
|
||||||
|
WriteLiteral(" type=\"radio\"");
|
||||||
|
|
||||||
WriteLiteral(" id=\"createJob_TaskTime10\"");
|
WriteLiteral(" id=\"createJob_TaskTime10\"");
|
||||||
|
|
||||||
WriteLiteral(" name=\"QuickLogTaskTimeMinutes\"");
|
WriteLiteral(" name=\"QuickLogTaskTimeMinutes\"");
|
||||||
@@ -382,7 +425,7 @@ WriteLiteral(" /><label");
|
|||||||
|
|
||||||
WriteLiteral(" for=\"createJob_TaskTime10\"");
|
WriteLiteral(" for=\"createJob_TaskTime10\"");
|
||||||
|
|
||||||
WriteLiteral("> 10 Minutes</label>\r\n <input");
|
WriteLiteral(">10 Minutes</label>\r\n <input");
|
||||||
|
|
||||||
WriteLiteral(" type=\"radio\"");
|
WriteLiteral(" type=\"radio\"");
|
||||||
|
|
||||||
@@ -396,7 +439,7 @@ WriteLiteral(" /><label");
|
|||||||
|
|
||||||
WriteLiteral(" for=\"createJob_TaskTime30\"");
|
WriteLiteral(" for=\"createJob_TaskTime30\"");
|
||||||
|
|
||||||
WriteLiteral("> 30 Minutes</label>\r\n <input");
|
WriteLiteral(">30 Minutes</label>\r\n <input");
|
||||||
|
|
||||||
WriteLiteral(" type=\"radio\"");
|
WriteLiteral(" type=\"radio\"");
|
||||||
|
|
||||||
@@ -410,7 +453,7 @@ WriteLiteral(" /><label");
|
|||||||
|
|
||||||
WriteLiteral(" for=\"createJob_TaskTime60\"");
|
WriteLiteral(" for=\"createJob_TaskTime60\"");
|
||||||
|
|
||||||
WriteLiteral("> 1 Hour</label>\r\n <input");
|
WriteLiteral(">1 Hour</label>\r\n <input");
|
||||||
|
|
||||||
WriteLiteral(" type=\"radio\"");
|
WriteLiteral(" type=\"radio\"");
|
||||||
|
|
||||||
@@ -424,7 +467,7 @@ WriteLiteral(" /><label");
|
|||||||
|
|
||||||
WriteLiteral(" for=\"createJob_TaskTime120\"");
|
WriteLiteral(" for=\"createJob_TaskTime120\"");
|
||||||
|
|
||||||
WriteLiteral("> 2 Hours</label>\r\n <input");
|
WriteLiteral(">2 Hours</label>\r\n <input");
|
||||||
|
|
||||||
WriteLiteral(" type=\"radio\"");
|
WriteLiteral(" type=\"radio\"");
|
||||||
|
|
||||||
@@ -438,7 +481,7 @@ WriteLiteral(" /><label");
|
|||||||
|
|
||||||
WriteLiteral(" for=\"createJob_TaskTimeOther\"");
|
WriteLiteral(" for=\"createJob_TaskTimeOther\"");
|
||||||
|
|
||||||
WriteLiteral("> Other</label>\r\n <span");
|
WriteLiteral(">Other</label>\r\n <span");
|
||||||
|
|
||||||
WriteLiteral(" id=\"createJob_TaskTimeOtherMinutesContainer\"");
|
WriteLiteral(" id=\"createJob_TaskTimeOtherMinutesContainer\"");
|
||||||
|
|
||||||
@@ -459,7 +502,7 @@ WriteLiteral(" />\r\n Minutes\r\n </span>\r\n"
|
|||||||
WriteLiteral(" ");
|
WriteLiteral(" ");
|
||||||
|
|
||||||
|
|
||||||
#line 81 "..\..\Views\Job\Create.cshtml"
|
#line 86 "..\..\Views\Job\Create.cshtml"
|
||||||
Write(Html.ValidationMessageFor(m => m.QuickLogTaskTimeMinutes));
|
Write(Html.ValidationMessageFor(m => m.QuickLogTaskTimeMinutes));
|
||||||
|
|
||||||
|
|
||||||
@@ -468,7 +511,7 @@ WriteLiteral(" ");
|
|||||||
WriteLiteral("\r\n </div>\r\n </div>\r\n");
|
WriteLiteral("\r\n </div>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 84 "..\..\Views\Job\Create.cshtml"
|
#line 89 "..\..\Views\Job\Create.cshtml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -529,13 +572,13 @@ WriteLiteral(">\r\n $(function () {\r\n var discoDialogMethods
|
|||||||
"tion-error\');\r\n isValid = false;\r\n }\r\n\r\n");
|
"tion-error\');\r\n isValid = false;\r\n }\r\n\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 170 "..\..\Views\Job\Create.cshtml"
|
#line 175 "..\..\Views\Job\Create.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 170 "..\..\Views\Job\Create.cshtml"
|
#line 175 "..\..\Views\Job\Create.cshtml"
|
||||||
if (Authorization.Has(Claims.Job.Actions.Close)){
|
if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||||
|
|
||||||
|
|
||||||
@@ -570,46 +613,79 @@ WriteLiteral(@"
|
|||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 194 "..\..\Views\Job\Create.cshtml"
|
#line 199 "..\..\Views\Job\Create.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n return isValid;\r\n }\r\n\r\n validator.setting" +
|
WriteLiteral(@"
|
||||||
"s.submitHandler = function (form) {\r\n if (additionalValidation())" +
|
return isValid;
|
||||||
" {\r\n discoDialogMethods.setButtons({});\r\n " +
|
}
|
||||||
"form.submit();\r\n }\r\n }\r\n //#endregion\r\n\r\n " +
|
|
||||||
" //#region DeviceHeld\r\n var $deviceHeld = $(\'#DeviceHeld\');\r" +
|
validator.settings.submitHandler = function (form) {
|
||||||
"\n\r\n if ($(\'#DeviceSerialNumber\').val()) {\r\n switch ($d" +
|
if (additionalValidation()) {
|
||||||
"eviceHeld.val()) {\r\n case \'True\':\r\n $(" +
|
discoDialogMethods.setButtons({});
|
||||||
"\'#createJob_DeviceHeld\').prop(\'checked\', true);\r\n $(\'#cre" +
|
form.submit();
|
||||||
"ateJob_DeviceNotHeld\').prop(\'checked\', false);\r\n break;\r\n" +
|
}
|
||||||
" case \'False\':\r\n $(\'#createJob_DeviceH" +
|
}
|
||||||
"eld\').prop(\'checked\', false);\r\n $(\'#createJob_DeviceNotHe" +
|
//#endregion
|
||||||
"ld\').prop(\'checked\', true);\r\n break;\r\n " +
|
|
||||||
" default:\r\n $(\'#createJob_DeviceHeld\').prop(\'checked\', fa" +
|
//#region DeviceHeld
|
||||||
"lse);\r\n $(\'#createJob_DeviceNotHeld\').prop(\'checked\', fal" +
|
var $deviceHeld = $('#DeviceHeld');
|
||||||
"se);\r\n break;\r\n }\r\n $(\'#cre" +
|
|
||||||
"ateJob_DeviceHeldContainer\').find(\'input[type=\"radio\"]\').change(function () {\r\n " +
|
");
|
||||||
" // Update Hidden Field with Boolean Value\r\n " +
|
|
||||||
" // Set DeviceHeld\r\n var deviceHeldValue = \'\';\r\n " +
|
|
||||||
" if ($(\'#createJob_DeviceHeld\').is(\':checked\'))\r\n " +
|
|
||||||
"deviceHeldValue = \'True\';\r\n if ($(\'#createJob_DeviceNotHeld\')" +
|
|
||||||
".is(\':checked\'))\r\n deviceHeldValue = \'False\';\r\n " +
|
|
||||||
" $deviceHeld.val(deviceHeldValue).change();\r\n });\r\n " +
|
|
||||||
" } else {\r\n // No Device Associated\r\n $devic" +
|
|
||||||
"eHeld.val(\'False\');\r\n $(\'#createJob_DeviceHeldContainer\').hide();" +
|
|
||||||
"\r\n }\r\n //#endregion\r\n\r\n");
|
|
||||||
|
|
||||||
|
|
||||||
#line 242 "..\..\Views\Job\Create.cshtml"
|
#line 215 "..\..\Views\Job\Create.cshtml"
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
#line 242 "..\..\Views\Job\Create.cshtml"
|
#line 215 "..\..\Views\Job\Create.cshtml"
|
||||||
|
if (Authorization.Has(Claims.Job.Properties.DeviceHeld)){
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n if ($(\'#DeviceSerialNumber\').val()) {\r\n switch ($dev" +
|
||||||
|
"iceHeld.val()) {\r\n case \'True\':\r\n $(\'#" +
|
||||||
|
"createJob_DeviceHeld\').prop(\'checked\', true);\r\n $(\'#creat" +
|
||||||
|
"eJob_DeviceNotHeld\').prop(\'checked\', false);\r\n break;\r\n " +
|
||||||
|
" case \'False\':\r\n $(\'#createJob_DeviceHel" +
|
||||||
|
"d\').prop(\'checked\', false);\r\n $(\'#createJob_DeviceNotHeld" +
|
||||||
|
"\').prop(\'checked\', true);\r\n break;\r\n d" +
|
||||||
|
"efault:\r\n $(\'#createJob_DeviceHeld\').prop(\'checked\', fals" +
|
||||||
|
"e);\r\n $(\'#createJob_DeviceNotHeld\').prop(\'checked\', false" +
|
||||||
|
");\r\n break;\r\n }\r\n $(\'#creat" +
|
||||||
|
"eJob_DeviceHeldContainer\').find(\'input[type=\"radio\"]\').change(function () {\r\n " +
|
||||||
|
" // Update Hidden Field with Boolean Value\r\n " +
|
||||||
|
"// Set DeviceHeld\r\n var deviceHeldValue = \'\';\r\n " +
|
||||||
|
" if ($(\'#createJob_DeviceHeld\').is(\':checked\'))\r\n de" +
|
||||||
|
"viceHeldValue = \'True\';\r\n if ($(\'#createJob_DeviceNotHeld\').i" +
|
||||||
|
"s(\':checked\'))\r\n deviceHeldValue = \'False\';\r\n " +
|
||||||
|
" $deviceHeld.val(deviceHeldValue).change();\r\n });\r\n " +
|
||||||
|
" } else {\r\n // No Device Associated\r\n $deviceH" +
|
||||||
|
"eld.val(\'False\');\r\n $(\'#createJob_DeviceHeldContainer\').hide();\r\n" +
|
||||||
|
" }\r\n ");
|
||||||
|
|
||||||
|
|
||||||
|
#line 246 "..\..\Views\Job\Create.cshtml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral(" //#endregion\r\n\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 249 "..\..\Views\Job\Create.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 249 "..\..\Views\Job\Create.cshtml"
|
||||||
if (Authorization.Has(Claims.Job.Actions.Close)){
|
if (Authorization.Has(Claims.Job.Actions.Close)){
|
||||||
|
|
||||||
|
|
||||||
@@ -625,37 +701,43 @@ WriteLiteral("\r\n //#region QuickLog\r\n var $quickLog =
|
|||||||
"teJob_TaskTimeOtherMinutes\');\r\n var $quickLogTaskTimeValidationMessag" +
|
"teJob_TaskTimeOtherMinutes\');\r\n var $quickLogTaskTimeValidationMessag" +
|
||||||
"e = $quickLogTaskTimeContainer.find(\'[data-valmsg-for=\"QuickLogTaskTimeMinutes\"]" +
|
"e = $quickLogTaskTimeContainer.find(\'[data-valmsg-for=\"QuickLogTaskTimeMinutes\"]" +
|
||||||
"\');\r\n\r\n $deviceHeld.change(validateQuickLog);\r\n $jobTypes." +
|
"\');\r\n\r\n $deviceHeld.change(validateQuickLog);\r\n $jobTypes." +
|
||||||
"change(validateQuickLog);\r\n validateQuickLog();\r\n\r\n functi" +
|
"change(validateQuickLog);\r\n $(\'#createJob_SubTypes\').on(\'change\', \'in" +
|
||||||
"on validateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " +
|
"put\', validateQuickLog);\r\n validateQuickLog();\r\n\r\n functio" +
|
||||||
" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowe" +
|
"n validateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " +
|
||||||
"d = false;\r\n } else {\r\n var selectedType = $jo" +
|
" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowed" +
|
||||||
"bTypes.filter(\':checked\').val();\r\n switch (selectedType) {\r\n " +
|
" = false;\r\n } else {\r\n // Allow Quick-Log only" +
|
||||||
" case \'HMisc\':\r\n case \'SApp\':\r\n " +
|
" for certain Job Types\r\n var selectedType = $jobTypes.filter(" +
|
||||||
" case \'SImg\':\r\n case \'SOS\':\r\n " +
|
"\':checked\').val();\r\n switch (selectedType) {\r\n " +
|
||||||
" case \'UMgmt\':\r\n quickLogAllowed = true" +
|
" case \'HMisc\':\r\n case \'SApp\':\r\n " +
|
||||||
";\r\n break;\r\n default:\r\n " +
|
" case \'SImg\':\r\n case \'SOS\':\r\n " +
|
||||||
" quickLogAllowed = false;\r\n break" +
|
" case \'UMgmt\':\r\n // If Job-Queues are configured for " +
|
||||||
";\r\n }\r\n }\r\n\r\n if (quickLogAllow" +
|
"a Sub-Type, don\'t allow quick-log.\r\n if ($(\'#createJo" +
|
||||||
"ed) {\r\n $quickLogContainer.slideDown();\r\n } el" +
|
"b_SubType_\' + $jobTypes.filter(\':checked\').val()).find(\'input:checked\').closest(" +
|
||||||
"se {\r\n if (init)\r\n $quickLogContainer." +
|
"\'li\').has(\'i.queue\').length == 0)\r\n quickLogAllow" +
|
||||||
"hide();\r\n else\r\n $quickLogContainer.sl" +
|
"ed = true;\r\n else\r\n qu" +
|
||||||
"ideUp();\r\n $quickLog.prop(\'checked\', false).change();\r\n " +
|
"ickLogAllowed = false;\r\n break;\r\n " +
|
||||||
" }\r\n }\r\n\r\n $quickLog.change(function () {\r\n " +
|
" default:\r\n quickLogAllowed = false;\r\n " +
|
||||||
" if ($(this).is(\':checked\')) {\r\n $quickLogTaskTimeCo" +
|
" break;\r\n }\r\n }\r\n\r\n " +
|
||||||
"ntainer.slideDown();\r\n } else {\r\n $quickLogTas" +
|
" if (quickLogAllowed) {\r\n $quickLogContainer.slideDown();\r" +
|
||||||
"kTimeContainer.slideUp();\r\n }\r\n });\r\n\r\n $qu" +
|
"\n } else {\r\n if (init)\r\n " +
|
||||||
"ickLogTaskTimes.change(function () {\r\n if ($quickLogTaskTimes.fil" +
|
" $quickLogContainer.hide();\r\n else\r\n " +
|
||||||
"ter(\':checked\').val() === \"\") {\r\n $(\'#createJob_TaskTimeOther" +
|
"$quickLogContainer.slideUp();\r\n $quickLog.prop(\'checked\', fal" +
|
||||||
"MinutesContainer\').show();\r\n $quickLogTaskTimeOtherMinutes.at" +
|
"se).change();\r\n }\r\n }\r\n\r\n $quickLog.change(" +
|
||||||
"tr(\'disabled\', null).focus().select();\r\n } else {\r\n " +
|
"function () {\r\n if ($(this).is(\':checked\')) {\r\n " +
|
||||||
" $(\'#createJob_TaskTimeOtherMinutesContainer\').hide();\r\n " +
|
" $quickLogTaskTimeContainer.slideDown();\r\n } else {\r\n " +
|
||||||
" $quickLogTaskTimeOtherMinutes.attr(\'disabled\', \'disabled\');\r\n }\r" +
|
" $quickLogTaskTimeContainer.slideUp();\r\n }\r\n }" +
|
||||||
"\n });\r\n //#endregion\r\n ");
|
");\r\n\r\n $quickLogTaskTimes.change(function () {\r\n if ($" +
|
||||||
|
"quickLogTaskTimes.filter(\':checked\').val() === \"\") {\r\n $(\'#cr" +
|
||||||
|
"eateJob_TaskTimeOtherMinutesContainer\').show();\r\n $quickLogTa" +
|
||||||
|
"skTimeOtherMinutes.attr(\'disabled\', null).focus().select();\r\n } e" +
|
||||||
|
"lse {\r\n $(\'#createJob_TaskTimeOtherMinutesContainer\').hide();" +
|
||||||
|
"\r\n $quickLogTaskTimeOtherMinutes.attr(\'disabled\', \'disabled\')" +
|
||||||
|
";\r\n }\r\n });\r\n //#endregion\r\n ");
|
||||||
|
|
||||||
WriteLiteral("\r\n");
|
WriteLiteral("\r\n");
|
||||||
|
|
||||||
|
|
||||||
#line 307 "..\..\Views\Job\Create.cshtml"
|
#line 320 "..\..\Views\Job\Create.cshtml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user