From 7027b33fe249ed6e1efdf3f3e8954c4b1983a11c Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Thu, 13 Feb 2014 22:26:26 +1100 Subject: [PATCH] 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. --- .../JobSubTypeExtensions.cs | 2 +- Disco.Web/ClientSource/Style/Job.css | 4 +- Disco.Web/ClientSource/Style/Job.less | 4 +- Disco.Web/ClientSource/Style/Job.min.css | 2 +- Disco.Web/Controllers/JobController.cs | 6 +- Disco.Web/Views/Job/Create.cshtml | 25 +- Disco.Web/Views/Job/Create.generated.cs | 218 ++++++++++++------ 7 files changed, 180 insertions(+), 81 deletions(-) diff --git a/Disco.Web.Extensions/DataModelExtension/JobSubTypeExtensions.cs b/Disco.Web.Extensions/DataModelExtension/JobSubTypeExtensions.cs index 141c3596..a2be31d2 100644 --- a/Disco.Web.Extensions/DataModelExtension/JobSubTypeExtensions.cs +++ b/Disco.Web.Extensions/DataModelExtension/JobSubTypeExtensions.cs @@ -34,7 +34,7 @@ namespace Disco.Web.Extensions var sb = new System.Text.StringBuilder(System.Web.HttpUtility.HtmlEncode(jst.Description)); foreach (var jq in jst.JobQueues) - sb.AppendFormat(" ", jq.Icon, jq.IconColour, jq.Name); + sb.AppendFormat(" ", jq.Icon, jq.IconColour, jq.Name); return sb.ToString(); } diff --git a/Disco.Web/ClientSource/Style/Job.css b/Disco.Web/ClientSource/Style/Job.css index 02a22ba2..e1bb39f3 100644 --- a/Disco.Web/ClientSource/Style/Job.css +++ b/Disco.Web/ClientSource/Style/Job.css @@ -732,7 +732,7 @@ margin-bottom: 4px; } #createJob_Container #createJob_QuickLogAutoCloseContainer input { - margin-left: 6px; + margin-left: 4px; } #createJob_Container #createJob_QuickLogTaskTimeContainer { display: none; @@ -746,7 +746,7 @@ padding-right: 10px; } #createJob_Container #createJob_QuickLogTaskTimeContainer label { - margin-right: 20px; + margin-right: 15px; } #createJob_Container #createJob_QuickLogTaskTimeContainer #createJob_TaskTimeOtherMinutesContainer { display: none; diff --git a/Disco.Web/ClientSource/Style/Job.less b/Disco.Web/ClientSource/Style/Job.less index 0d1c8615..b135c25e 100644 --- a/Disco.Web/ClientSource/Style/Job.less +++ b/Disco.Web/ClientSource/Style/Job.less @@ -771,7 +771,7 @@ } input { - margin-left: 6px; + margin-left: 4px; } } @@ -788,7 +788,7 @@ } label { - margin-right: 20px; + margin-right: 15px; } #createJob_TaskTimeOtherMinutesContainer { diff --git a/Disco.Web/ClientSource/Style/Job.min.css b/Disco.Web/ClientSource/Style/Job.min.css index a62417c7..3bc8b54c 100644 --- a/Disco.Web/ClientSource/Style/Job.min.css +++ b/Disco.Web/ClientSource/Style/Job.min.css @@ -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 #jobDetailTabItems>li>a{padding:5px 8px}#jobDetailTabs div.ui-tabs-panel{border-radius:0;padding:4px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-top:none;background-color:#eee}#jobShowResources #Comments{width:375px;height:300px;padding:0;border:1px solid #ccc;background-color:#fff}#jobShowResources #Comments div.commentOutput{height:249px;overflow:auto;background-color:#fafafa;color:#000}#jobShowResources #Comments div.commentOutput>div{padding:3px;margin:4px 6px;border-bottom:1px solid #ccc}#jobShowResources #Comments div.commentOutput>div span.author{color:#444;display:block;font-weight:bold;font-size:.95em;float:left}#jobShowResources #Comments div.commentOutput>div span.timestamp{display:block;float:right;font-size:.9em;font-style:italic}#jobShowResources #Comments div.commentOutput>div span.comment{clear:both;display:block;margin-left:4px}#jobShowResources #Comments div.commentOutput>div:hover span.remove{opacity:.5}#jobShowResources #Comments div.commentOutput>div span.remove{font-size:1.2em;color:#e51400;margin-left:6px;cursor:pointer;opacity:0}#jobShowResources #Comments div.commentOutput>div span.remove:hover{opacity:1}#jobShowResources #Comments div.commentOutput>div:last-child{border-bottom:none}#jobShowResources #Comments.cannotAddLogs div.commentOutput{height:300px}#jobShowResources #Comments div.commentInput{border-top:1px solid #ccc;height:40px;padding:5px}#jobShowResources #Comments div.commentInput textarea.commentInput{border:0;padding:0;margin:0;width:325px;height:40px;min-height:40px;overflow:auto;float:left;resize:none}#jobShowResources #Comments div.commentInput span.action{color:#333;font-size:1.5em;display:block;margin:0;cursor:pointer;float:left;border:1px solid #fff;padding:.5em}#jobShowResources #Comments div.commentInput span.action:hover{color:#335a87;background-color:#ededed;border:1px solid #ccc}#jobShowResources #Attachments{height:300px;padding:0;border:1px solid #ccc;background-color:#fff}#jobShowResources #Attachments div.attachmentOutput{height:249px;overflow:auto}#jobShowResources #Attachments div.attachmentOutput>a{display:block;float:left;height:48px;width:221px;padding:2px;margin:2px;font-size:.95em;border:1px solid #fff;color:#000;text-decoration:none}#jobShowResources #Attachments div.attachmentOutput>a span.comments,#jobShowResources #Attachments div.attachmentOutput>a span.author,#jobShowResources #Attachments div.attachmentOutput>a span.timestamp{display:block;float:left;width:168px;overflow:hidden;height:16px}#jobShowResources #Attachments div.attachmentOutput>a span.author{color:#888;width:150px}#jobShowResources #Attachments div.attachmentOutput>a span.timestamp{color:#888;font-style:italic}#jobShowResources #Attachments div.attachmentOutput>a span.icon{display:block;float:left;height:48px;width:48px;margin-right:2px}#jobShowResources #Attachments div.attachmentOutput>a span.icon img{height:48px;width:48px}#jobShowResources #Attachments div.attachmentOutput>a:hover{background-color:#ededed;border:1px solid #ccc}#jobShowResources #Attachments div.attachmentOutput>a:hover span.remove{opacity:.5}#jobShowResources #Attachments div.attachmentOutput>a span.remove{font-size:1.2em;color:#e51400;margin-left:2px;cursor:pointer;opacity:0}#jobShowResources #Attachments div.attachmentOutput>a span.remove:hover{opacity:1}#jobShowResources #Attachments.cannotAddAttachments div.attachmentOutput{height:300px}#jobShowResources #Attachments div.attachmentInput{border-top:1px solid #ccc;height:40px;background-color:#fff;padding:5px}#jobShowResources #Attachments div.attachmentInput span.action{color:#333;display:block;margin:0 4px 0 0;font-size:1.5em;cursor:pointer;float:right;border:1px solid #fff;padding:.5em}#jobShowResources #Attachments div.attachmentInput span.action:hover{color:#335a87;background-color:#ededed;border:1px solid #ccc}#Job_Show_Job_Actions_AddQueue_Dialog{height:400px}#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker{position:absolute;width:250px;height:300px;overflow-y:auto;background-color:#fcfcfc;border:1px solid #ccc}#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker>div{background-color:#fff;border-bottom:1px solid #ddd;padding:6px 0 6px 6px;cursor:pointer}#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker>div:hover{background-color:#f4f4f4}#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker>div.selected,#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker>div.selected:hover{background-color:#eee}#Job_Show_Job_Actions_AddQueue_Dialog .details{display:none;position:absolute;left:280px;top:40px}#Job_Show_Job_Actions_AddQueue_Dialog .details h4{margin-bottom:4px}#Job_Show_Job_Actions_AddQueue_Dialog .details #Priority{margin-bottom:10px;min-width:200px}#Job_Show_Job_Actions_AddQueue_Dialog .details #SLAExpiresMinutes{margin-bottom:10px;min-width:200px}#Job_Show_Job_Actions_AddQueue_Dialog .details #Comment{min-width:280px}#jobDetailTab-Queues #jobQueues{border:solid 1px #d8d8d8;border-collapse:collapse;table-layout:fixed}#jobDetailTab-Queues #jobQueues td{border:solid 1px #d8d8d8;background-color:#fff}#jobDetailTab-Queues #jobQueues th{background-color:#eee;border:solid 1px #d8d8d8}#jobDetailTab-Queues #jobQueues i.fa-edit{float:right;margin-top:4px;font-size:1.1em;cursor:pointer;display:none;color:#335a87}#jobDetailTab-Queues #jobQueues i.fa-edit:hover{color:#5e8cc2}#jobDetailTab-Queues #jobQueues td:hover i.fa-edit{display:inline-block}#jobDetailTab-Queues #jobQueues th.name{width:200px}#jobDetailTab-Queues #jobQueues th.sla{width:130px}#jobDetailTab-Queues #jobQueues tr.removed td{background-color:#f4f4f4}#jobDetailTab-Queues #jobQueues td.name{vertical-align:middle}#jobDetailTab-Queues #jobQueues td.name .fa-stack{line-height:1.6em}#jobDetailTab-Queues #jobQueues td.added .when,#jobDetailTab-Queues #jobQueues td.removed .when{font-style:italic;margin-top:4px;font-size:.9em}#jobDetailTab-Queues #jobQueues td.added .comments,#jobDetailTab-Queues #jobQueues td.removed .comments{white-space:pre-line}#jobDetailTab-Queues #jobQueues td.removed.na{vertical-align:middle;text-align:center}#jobDetailTab-Queues #jobQueues td.sla{vertical-align:middle}#jobDetailTab-Queues #jobQueues td.sla.overdue{color:#e51400}#jobDetailTab-Queues>.none{text-align:center;padding:30px 0;font-style:italic;background-color:#fff}#Job_Show_Queues_Actions_EditAddedComment_Dialog h4,#Job_Show_Queues_Actions_EditRemovedComment_Dialog h4,#Job_Show_Queues_Actions_EditSla_Dialog h4{margin-bottom:4px}#Job_Show_Queues_Actions_EditAddedComment_Dialog_Comment{width:280px}#Job_Show_Queues_Actions_EditRemovedComment_Dialog_Comment{width:280px}#jobComponents{border:solid 1px #d8d8d8;border-collapse:collapse}#jobComponents td{border:solid 1px #d8d8d8;background-color:#fff}#jobComponents th{background-color:#eee;border:solid 1px #d8d8d8}#jobComponents tr th.actions{width:18px}#jobComponents tr input.description{width:400px}#jobComponents tr input.cost{width:150px}#jobComponents tr span.remove{font-size:1.5em;color:#e51400;cursor:pointer;opacity:.5}#jobComponents tr span.remove:hover{opacity:1}#jobComponents tr input.updating{background-position:right center;background-repeat:no-repeat;background-image:url(data:image/gif;base64,R0lGODlhEAALAPQAAP///zNah+Hm7dng6O7x9DddiTNah1d3nJqtw3+Xs8fS3k5vlm6JqaGzx4KatcrU4FFymDZciHGMq+ru8t/l7Pb3+V9+oeLo7vT2+MTP3LLB0dTc5fHz9gAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCwAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA)}#jobComponents tr .totalCost{font-weight:bold}#jobNonWarrantyFinance{border:solid 1px #d8d8d8;border-collapse:collapse}#jobNonWarrantyFinance td{border:solid 1px #d8d8d8;background-color:#fff}#jobNonWarrantyFinance th{background-color:#eee;border:solid 1px #d8d8d8}#jobNonWarrantyFinance tr th{width:200px;text-align:right}#jobNonWarrantyRepairs{border:solid 1px #d8d8d8;border-collapse:collapse}#jobNonWarrantyRepairs td{border:solid 1px #d8d8d8;background-color:#fff}#jobNonWarrantyRepairs th{background-color:#eee;border:solid 1px #d8d8d8}#jobNonWarrantyRepairs tr th{width:200px;text-align:right}#jobNonWarrantyInsurance{border:solid 1px #d8d8d8;border-collapse:collapse}#jobNonWarrantyInsurance td{border:solid 1px #d8d8d8;background-color:#fff}#jobNonWarrantyInsurance th{background-color:#eee;border:solid 1px #d8d8d8}#jobNonWarrantyInsurance tr th{width:200px;text-align:right}#jobNonWarrantyInsurance tr td textarea{width:400px}#jobFlags{border:solid 1px #d8d8d8;border-collapse:collapse}#jobFlags td{border:solid 1px #d8d8d8;background-color:#fff}#jobFlags th{background-color:#eee;border:solid 1px #d8d8d8}#jobFlags tr th{width:200px;text-align:right}#warrantyJobForm #warrantyDisclosedInformation table{font-size:.9em}#warrantyJobForm #warrantyDisclosedInformation table tr:not(:last-child){border-bottom:1px dashed #aaa}#warrantyJobForm #warrantyDisclosedInformation table th{padding:2px;font-weight:bold;width:200px}#warrantyJobForm #warrantyDisclosedInformation table td{padding:2px}#warrantyJobFaultDescription #FaultDescription{width:600px;height:250px}#createJob_Container{margin:0 -20px}#createJob_Container img.modelImage{width:64px;height:64px}#createJob_Container .createJob_Component{margin:0 10px;padding:5px 0;border-bottom:1px dashed #ccc}#createJob_Container .createJob_Component:last-child{border-bottom:none}#createJob_Container #createJob_Type{border:1px solid #ccc;background-color:#f2f2f2;padding:2px 4px}#createJob_Container #createJob_SubTypes{margin:-1px 0 0 20px;border:1px solid #ccc;border-top:none;padding:2px 4px;background-color:#f2f2f2}#createJob_Container #createJob_SubTypes .createJob_SubType{display:none}#createJob_Container #createJob_Type li,#createJob_Container #createJob_SubTypes li{margin:2px 0;padding:0 0 0 4px}#createJob_Container #createJob_Type li i,#createJob_Container #createJob_SubTypes li i{display:none;cursor:default;font-weight:normal}#createJob_Container #createJob_Type li:hover i,#createJob_Container #createJob_SubTypes li:hover i{display:inline-block}#createJob_Container #createJob_Type li.highlight,#createJob_Container #createJob_SubTypes li.highlight{background-color:#cddbec;font-weight:600;color:#000}#createJob_Container #createJob_Type li.highlight i,#createJob_Container #createJob_SubTypes li.highlight i{display:inline-block}#createJob_Container #createJob_CommentsContainer #Comments{width:100%;min-width:500px}#createJob_Container #createJob_QuickLogAutoCloseContainer h3{margin-bottom:4px}#createJob_Container #createJob_QuickLogAutoCloseContainer input{margin-left:6px}#createJob_Container #createJob_QuickLogTaskTimeContainer{display:none;margin:4px 0 0 25px;padding:4px 4px;background-color:#f2f2f2;border-left:4px solid #d8d8d8}#createJob_Container #createJob_QuickLogTaskTimeContainer h4{display:inline-block;padding-right:10px}#createJob_Container #createJob_QuickLogTaskTimeContainer label{margin-right:20px}#createJob_Container #createJob_QuickLogTaskTimeContainer #createJob_TaskTimeOtherMinutesContainer{display:none}#createJob_Container #createJob_QuickLogTaskTimeContainer #createJob_TaskTimeOtherMinutes{width:50px}#createJobRedirect h1{margin-top:60px!important;margin-bottom:60px}#createJobRedirect>div{text-align:right}#createJobRedirect>div i{margin-right:10px} \ No newline at end of file +.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 #jobDetailTabItems>li>a{padding:5px 8px}#jobDetailTabs div.ui-tabs-panel{border-radius:0;padding:4px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-top:none;background-color:#eee}#jobShowResources #Comments{width:375px;height:300px;padding:0;border:1px solid #ccc;background-color:#fff}#jobShowResources #Comments div.commentOutput{height:249px;overflow:auto;background-color:#fafafa;color:#000}#jobShowResources #Comments div.commentOutput>div{padding:3px;margin:4px 6px;border-bottom:1px solid #ccc}#jobShowResources #Comments div.commentOutput>div span.author{color:#444;display:block;font-weight:bold;font-size:.95em;float:left}#jobShowResources #Comments div.commentOutput>div span.timestamp{display:block;float:right;font-size:.9em;font-style:italic}#jobShowResources #Comments div.commentOutput>div span.comment{clear:both;display:block;margin-left:4px}#jobShowResources #Comments div.commentOutput>div:hover span.remove{opacity:.5}#jobShowResources #Comments div.commentOutput>div span.remove{font-size:1.2em;color:#e51400;margin-left:6px;cursor:pointer;opacity:0}#jobShowResources #Comments div.commentOutput>div span.remove:hover{opacity:1}#jobShowResources #Comments div.commentOutput>div:last-child{border-bottom:none}#jobShowResources #Comments.cannotAddLogs div.commentOutput{height:300px}#jobShowResources #Comments div.commentInput{border-top:1px solid #ccc;height:40px;padding:5px}#jobShowResources #Comments div.commentInput textarea.commentInput{border:0;padding:0;margin:0;width:325px;height:40px;min-height:40px;overflow:auto;float:left;resize:none}#jobShowResources #Comments div.commentInput span.action{color:#333;font-size:1.5em;display:block;margin:0;cursor:pointer;float:left;border:1px solid #fff;padding:.5em}#jobShowResources #Comments div.commentInput span.action:hover{color:#335a87;background-color:#ededed;border:1px solid #ccc}#jobShowResources #Attachments{height:300px;padding:0;border:1px solid #ccc;background-color:#fff}#jobShowResources #Attachments div.attachmentOutput{height:249px;overflow:auto}#jobShowResources #Attachments div.attachmentOutput>a{display:block;float:left;height:48px;width:221px;padding:2px;margin:2px;font-size:.95em;border:1px solid #fff;color:#000;text-decoration:none}#jobShowResources #Attachments div.attachmentOutput>a span.comments,#jobShowResources #Attachments div.attachmentOutput>a span.author,#jobShowResources #Attachments div.attachmentOutput>a span.timestamp{display:block;float:left;width:168px;overflow:hidden;height:16px}#jobShowResources #Attachments div.attachmentOutput>a span.author{color:#888;width:150px}#jobShowResources #Attachments div.attachmentOutput>a span.timestamp{color:#888;font-style:italic}#jobShowResources #Attachments div.attachmentOutput>a span.icon{display:block;float:left;height:48px;width:48px;margin-right:2px}#jobShowResources #Attachments div.attachmentOutput>a span.icon img{height:48px;width:48px}#jobShowResources #Attachments div.attachmentOutput>a:hover{background-color:#ededed;border:1px solid #ccc}#jobShowResources #Attachments div.attachmentOutput>a:hover span.remove{opacity:.5}#jobShowResources #Attachments div.attachmentOutput>a span.remove{font-size:1.2em;color:#e51400;margin-left:2px;cursor:pointer;opacity:0}#jobShowResources #Attachments div.attachmentOutput>a span.remove:hover{opacity:1}#jobShowResources #Attachments.cannotAddAttachments div.attachmentOutput{height:300px}#jobShowResources #Attachments div.attachmentInput{border-top:1px solid #ccc;height:40px;background-color:#fff;padding:5px}#jobShowResources #Attachments div.attachmentInput span.action{color:#333;display:block;margin:0 4px 0 0;font-size:1.5em;cursor:pointer;float:right;border:1px solid #fff;padding:.5em}#jobShowResources #Attachments div.attachmentInput span.action:hover{color:#335a87;background-color:#ededed;border:1px solid #ccc}#Job_Show_Job_Actions_AddQueue_Dialog{height:400px}#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker{position:absolute;width:250px;height:300px;overflow-y:auto;background-color:#fcfcfc;border:1px solid #ccc}#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker>div{background-color:#fff;border-bottom:1px solid #ddd;padding:6px 0 6px 6px;cursor:pointer}#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker>div:hover{background-color:#f4f4f4}#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker>div.selected,#Job_Show_Job_Actions_AddQueue_Dialog .queuePicker>div.selected:hover{background-color:#eee}#Job_Show_Job_Actions_AddQueue_Dialog .details{display:none;position:absolute;left:280px;top:40px}#Job_Show_Job_Actions_AddQueue_Dialog .details h4{margin-bottom:4px}#Job_Show_Job_Actions_AddQueue_Dialog .details #Priority{margin-bottom:10px;min-width:200px}#Job_Show_Job_Actions_AddQueue_Dialog .details #SLAExpiresMinutes{margin-bottom:10px;min-width:200px}#Job_Show_Job_Actions_AddQueue_Dialog .details #Comment{min-width:280px}#jobDetailTab-Queues #jobQueues{border:solid 1px #d8d8d8;border-collapse:collapse;table-layout:fixed}#jobDetailTab-Queues #jobQueues td{border:solid 1px #d8d8d8;background-color:#fff}#jobDetailTab-Queues #jobQueues th{background-color:#eee;border:solid 1px #d8d8d8}#jobDetailTab-Queues #jobQueues i.fa-edit{float:right;margin-top:4px;font-size:1.1em;cursor:pointer;display:none;color:#335a87}#jobDetailTab-Queues #jobQueues i.fa-edit:hover{color:#5e8cc2}#jobDetailTab-Queues #jobQueues td:hover i.fa-edit{display:inline-block}#jobDetailTab-Queues #jobQueues th.name{width:200px}#jobDetailTab-Queues #jobQueues th.sla{width:130px}#jobDetailTab-Queues #jobQueues tr.removed td{background-color:#f4f4f4}#jobDetailTab-Queues #jobQueues td.name{vertical-align:middle}#jobDetailTab-Queues #jobQueues td.name .fa-stack{line-height:1.6em}#jobDetailTab-Queues #jobQueues td.added .when,#jobDetailTab-Queues #jobQueues td.removed .when{font-style:italic;margin-top:4px;font-size:.9em}#jobDetailTab-Queues #jobQueues td.added .comments,#jobDetailTab-Queues #jobQueues td.removed .comments{white-space:pre-line}#jobDetailTab-Queues #jobQueues td.removed.na{vertical-align:middle;text-align:center}#jobDetailTab-Queues #jobQueues td.sla{vertical-align:middle}#jobDetailTab-Queues #jobQueues td.sla.overdue{color:#e51400}#jobDetailTab-Queues>.none{text-align:center;padding:30px 0;font-style:italic;background-color:#fff}#Job_Show_Queues_Actions_EditAddedComment_Dialog h4,#Job_Show_Queues_Actions_EditRemovedComment_Dialog h4,#Job_Show_Queues_Actions_EditSla_Dialog h4{margin-bottom:4px}#Job_Show_Queues_Actions_EditAddedComment_Dialog_Comment{width:280px}#Job_Show_Queues_Actions_EditRemovedComment_Dialog_Comment{width:280px}#jobComponents{border:solid 1px #d8d8d8;border-collapse:collapse}#jobComponents td{border:solid 1px #d8d8d8;background-color:#fff}#jobComponents th{background-color:#eee;border:solid 1px #d8d8d8}#jobComponents tr th.actions{width:18px}#jobComponents tr input.description{width:400px}#jobComponents tr input.cost{width:150px}#jobComponents tr span.remove{font-size:1.5em;color:#e51400;cursor:pointer;opacity:.5}#jobComponents tr span.remove:hover{opacity:1}#jobComponents tr input.updating{background-position:right center;background-repeat:no-repeat;background-image:url(data:image/gif;base64,R0lGODlhEAALAPQAAP///zNah+Hm7dng6O7x9DddiTNah1d3nJqtw3+Xs8fS3k5vlm6JqaGzx4KatcrU4FFymDZciHGMq+ru8t/l7Pb3+V9+oeLo7vT2+MTP3LLB0dTc5fHz9gAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCwAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA)}#jobComponents tr .totalCost{font-weight:bold}#jobNonWarrantyFinance{border:solid 1px #d8d8d8;border-collapse:collapse}#jobNonWarrantyFinance td{border:solid 1px #d8d8d8;background-color:#fff}#jobNonWarrantyFinance th{background-color:#eee;border:solid 1px #d8d8d8}#jobNonWarrantyFinance tr th{width:200px;text-align:right}#jobNonWarrantyRepairs{border:solid 1px #d8d8d8;border-collapse:collapse}#jobNonWarrantyRepairs td{border:solid 1px #d8d8d8;background-color:#fff}#jobNonWarrantyRepairs th{background-color:#eee;border:solid 1px #d8d8d8}#jobNonWarrantyRepairs tr th{width:200px;text-align:right}#jobNonWarrantyInsurance{border:solid 1px #d8d8d8;border-collapse:collapse}#jobNonWarrantyInsurance td{border:solid 1px #d8d8d8;background-color:#fff}#jobNonWarrantyInsurance th{background-color:#eee;border:solid 1px #d8d8d8}#jobNonWarrantyInsurance tr th{width:200px;text-align:right}#jobNonWarrantyInsurance tr td textarea{width:400px}#jobFlags{border:solid 1px #d8d8d8;border-collapse:collapse}#jobFlags td{border:solid 1px #d8d8d8;background-color:#fff}#jobFlags th{background-color:#eee;border:solid 1px #d8d8d8}#jobFlags tr th{width:200px;text-align:right}#warrantyJobForm #warrantyDisclosedInformation table{font-size:.9em}#warrantyJobForm #warrantyDisclosedInformation table tr:not(:last-child){border-bottom:1px dashed #aaa}#warrantyJobForm #warrantyDisclosedInformation table th{padding:2px;font-weight:bold;width:200px}#warrantyJobForm #warrantyDisclosedInformation table td{padding:2px}#warrantyJobFaultDescription #FaultDescription{width:600px;height:250px}#createJob_Container{margin:0 -20px}#createJob_Container img.modelImage{width:64px;height:64px}#createJob_Container .createJob_Component{margin:0 10px;padding:5px 0;border-bottom:1px dashed #ccc}#createJob_Container .createJob_Component:last-child{border-bottom:none}#createJob_Container #createJob_Type{border:1px solid #ccc;background-color:#f2f2f2;padding:2px 4px}#createJob_Container #createJob_SubTypes{margin:-1px 0 0 20px;border:1px solid #ccc;border-top:none;padding:2px 4px;background-color:#f2f2f2}#createJob_Container #createJob_SubTypes .createJob_SubType{display:none}#createJob_Container #createJob_Type li,#createJob_Container #createJob_SubTypes li{margin:2px 0;padding:0 0 0 4px}#createJob_Container #createJob_Type li i,#createJob_Container #createJob_SubTypes li i{display:none;cursor:default;font-weight:normal}#createJob_Container #createJob_Type li:hover i,#createJob_Container #createJob_SubTypes li:hover i{display:inline-block}#createJob_Container #createJob_Type li.highlight,#createJob_Container #createJob_SubTypes li.highlight{background-color:#cddbec;font-weight:600;color:#000}#createJob_Container #createJob_Type li.highlight i,#createJob_Container #createJob_SubTypes li.highlight i{display:inline-block}#createJob_Container #createJob_CommentsContainer #Comments{width:100%;min-width:500px}#createJob_Container #createJob_QuickLogAutoCloseContainer h3{margin-bottom:4px}#createJob_Container #createJob_QuickLogAutoCloseContainer input{margin-left:4px}#createJob_Container #createJob_QuickLogTaskTimeContainer{display:none;margin:4px 0 0 25px;padding:4px 4px;background-color:#f2f2f2;border-left:4px solid #d8d8d8}#createJob_Container #createJob_QuickLogTaskTimeContainer h4{display:inline-block;padding-right:10px}#createJob_Container #createJob_QuickLogTaskTimeContainer label{margin-right:15px}#createJob_Container #createJob_QuickLogTaskTimeContainer #createJob_TaskTimeOtherMinutesContainer{display:none}#createJob_Container #createJob_QuickLogTaskTimeContainer #createJob_TaskTimeOtherMinutes{width:50px}#createJobRedirect h1{margin-top:60px!important;margin-bottom:60px}#createJobRedirect>div{text-align:right}#createJobRedirect>div i{margin-right:10px} \ No newline at end of file diff --git a/Disco.Web/Controllers/JobController.cs b/Disco.Web/Controllers/JobController.cs index 8f485067..87d26df2 100644 --- a/Disco.Web/Controllers/JobController.cs +++ b/Disco.Web/Controllers/JobController.cs @@ -397,7 +397,11 @@ namespace Disco.Web.Controllers } 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 // Set Opened Date in the past diff --git a/Disco.Web/Views/Job/Create.cshtml b/Disco.Web/Views/Job/Create.cshtml index 9f213e89..16fd1db0 100644 --- a/Disco.Web/Views/Job/Create.cshtml +++ b/Disco.Web/Views/Job/Create.cshtml @@ -33,6 +33,7 @@ } + if (Authorization.Has(Claims.Job.Properties.DeviceHeld)){
@Html.ValidationMessageFor(m => m.DeviceHeld) @Html.HiddenFor(m => m.DeviceHeld) @@ -50,6 +51,9 @@
+ }else{ + @Html.Hidden("DeviceHeld", false) + }
@@ -69,11 +73,12 @@

Task Time:

- - - - - + + + + + + Minutes @@ -207,6 +212,7 @@ //#region DeviceHeld var $deviceHeld = $('#DeviceHeld'); + @if (Authorization.Has(Claims.Job.Properties.DeviceHeld)){ if ($('#DeviceSerialNumber').val()) { switch ($deviceHeld.val()) { case 'True': @@ -237,6 +243,7 @@ $deviceHeld.val('False'); $('#createJob_DeviceHeldContainer').hide(); } + } //#endregion @if (Authorization.Has(Claims.Job.Actions.Close)){ @@ -251,6 +258,7 @@ $deviceHeld.change(validateQuickLog); $jobTypes.change(validateQuickLog); + $('#createJob_SubTypes').on('change', 'input', validateQuickLog); validateQuickLog(); function validateQuickLog() { @@ -259,6 +267,7 @@ if ($deviceHeld.val() === 'True') { quickLogAllowed = false; } else { + // Allow Quick-Log only for certain Job Types var selectedType = $jobTypes.filter(':checked').val(); switch (selectedType) { case 'HMisc': @@ -266,7 +275,11 @@ case 'SImg': case 'SOS': 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; default: quickLogAllowed = false; diff --git a/Disco.Web/Views/Job/Create.generated.cs b/Disco.Web/Views/Job/Create.generated.cs index 8e585edc..e0891568 100644 --- a/Disco.Web/Views/Job/Create.generated.cs +++ b/Disco.Web/Views/Job/Create.generated.cs @@ -249,6 +249,13 @@ WriteLiteral("\r\n
\r\n #line hidden WriteLiteral(" \r\n \r\n"); + + #line 36 "..\..\Views\Job\Create.cshtml" + if (Authorization.Has(Claims.Job.Properties.DeviceHeld)){ + + + #line default + #line hidden WriteLiteral(" \r\n"); WriteLiteral(" "); - #line 37 "..\..\Views\Job\Create.cshtml" + #line 38 "..\..\Views\Job\Create.cshtml" Write(Html.ValidationMessageFor(m => m.DeviceHeld)); @@ -271,7 +278,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 38 "..\..\Views\Job\Create.cshtml" + #line 39 "..\..\Views\Job\Create.cshtml" Write(Html.HiddenFor(m => m.DeviceHeld)); @@ -311,6 +318,28 @@ WriteLiteral(" for=\"createJob_DeviceNotHeld\""); WriteLiteral(">Not Held\r\n \r\n \r\n " + "
\r\n
\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(" \r\n \r\n \r\n WriteLiteral(" "); - #line 60 "..\..\Views\Job\Create.cshtml" + #line 64 "..\..\Views\Job\Create.cshtml" Write(Html.EditorFor(m => m.Comments)); @@ -334,7 +363,7 @@ WriteLiteral("\r\n \r\n \r\n " \r\n"); - #line 65 "..\..\Views\Job\Create.cshtml" + #line 69 "..\..\Views\Job\Create.cshtml" if (Authorization.Has(Claims.Job.Actions.Close)){ @@ -372,6 +401,20 @@ WriteLiteral(">\r\n

Task Time:

\r\n 5 Minutes\r\n 10 Minutes\r\n 10 Minutes\r\n 30 Minutes\r\n 30 Minutes\r\n 1 Hour\r\n 1 Hour\r\n 2 Hours\r\n 2 Hours\r\n Other\r\n Other\r\n \r\n Minutes\r\n \r\n" WriteLiteral(" "); - #line 81 "..\..\Views\Job\Create.cshtml" + #line 86 "..\..\Views\Job\Create.cshtml" Write(Html.ValidationMessageFor(m => m.QuickLogTaskTimeMinutes)); @@ -468,7 +511,7 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n \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"); - #line 170 "..\..\Views\Job\Create.cshtml" + #line 175 "..\..\Views\Job\Create.cshtml" #line default #line hidden - #line 170 "..\..\Views\Job\Create.cshtml" + #line 175 "..\..\Views\Job\Create.cshtml" if (Authorization.Has(Claims.Job.Actions.Close)){ @@ -570,46 +613,79 @@ WriteLiteral(@" WriteLiteral("\r\n"); - #line 194 "..\..\Views\Job\Create.cshtml" + #line 199 "..\..\Views\Job\Create.cshtml" } #line default #line hidden -WriteLiteral("\r\n return isValid;\r\n }\r\n\r\n validator.setting" + -"s.submitHandler = function (form) {\r\n if (additionalValidation())" + -" {\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" + -"\n\r\n if ($(\'#DeviceSerialNumber\').val()) {\r\n switch ($d" + -"eviceHeld.val()) {\r\n case \'True\':\r\n $(" + -"\'#createJob_DeviceHeld\').prop(\'checked\', true);\r\n $(\'#cre" + -"ateJob_DeviceNotHeld\').prop(\'checked\', false);\r\n break;\r\n" + -" case \'False\':\r\n $(\'#createJob_DeviceH" + -"eld\').prop(\'checked\', false);\r\n $(\'#createJob_DeviceNotHe" + -"ld\').prop(\'checked\', true);\r\n break;\r\n " + -" default:\r\n $(\'#createJob_DeviceHeld\').prop(\'checked\', fa" + -"lse);\r\n $(\'#createJob_DeviceNotHeld\').prop(\'checked\', fal" + -"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"); +WriteLiteral(@" + return isValid; + } + + validator.settings.submitHandler = function (form) { + if (additionalValidation()) { + discoDialogMethods.setButtons({}); + form.submit(); + } + } + //#endregion + + //#region DeviceHeld + var $deviceHeld = $('#DeviceHeld'); + +"); - #line 242 "..\..\Views\Job\Create.cshtml" + #line 215 "..\..\Views\Job\Create.cshtml" #line default #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)){ @@ -625,37 +701,43 @@ WriteLiteral("\r\n //#region QuickLog\r\n var $quickLog = "teJob_TaskTimeOtherMinutes\');\r\n var $quickLogTaskTimeValidationMessag" + "e = $quickLogTaskTimeContainer.find(\'[data-valmsg-for=\"QuickLogTaskTimeMinutes\"]" + "\');\r\n\r\n $deviceHeld.change(validateQuickLog);\r\n $jobTypes." + -"change(validateQuickLog);\r\n validateQuickLog();\r\n\r\n functi" + -"on validateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " + -" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowe" + -"d = false;\r\n } else {\r\n var selectedType = $jo" + -"bTypes.filter(\':checked\').val();\r\n switch (selectedType) {\r\n " + -" case \'HMisc\':\r\n case \'SApp\':\r\n " + -" case \'SImg\':\r\n case \'SOS\':\r\n " + -" case \'UMgmt\':\r\n quickLogAllowed = true" + -";\r\n break;\r\n default:\r\n " + -" quickLogAllowed = false;\r\n break" + -";\r\n }\r\n }\r\n\r\n if (quickLogAllow" + -"ed) {\r\n $quickLogContainer.slideDown();\r\n } el" + -"se {\r\n if (init)\r\n $quickLogContainer." + -"hide();\r\n else\r\n $quickLogContainer.sl" + -"ideUp();\r\n $quickLog.prop(\'checked\', false).change();\r\n " + -" }\r\n }\r\n\r\n $quickLog.change(function () {\r\n " + -" if ($(this).is(\':checked\')) {\r\n $quickLogTaskTimeCo" + -"ntainer.slideDown();\r\n } else {\r\n $quickLogTas" + -"kTimeContainer.slideUp();\r\n }\r\n });\r\n\r\n $qu" + -"ickLogTaskTimes.change(function () {\r\n if ($quickLogTaskTimes.fil" + -"ter(\':checked\').val() === \"\") {\r\n $(\'#createJob_TaskTimeOther" + -"MinutesContainer\').show();\r\n $quickLogTaskTimeOtherMinutes.at" + -"tr(\'disabled\', null).focus().select();\r\n } else {\r\n " + -" $(\'#createJob_TaskTimeOtherMinutesContainer\').hide();\r\n " + -" $quickLogTaskTimeOtherMinutes.attr(\'disabled\', \'disabled\');\r\n }\r" + -"\n });\r\n //#endregion\r\n "); +"change(validateQuickLog);\r\n $(\'#createJob_SubTypes\').on(\'change\', \'in" + +"put\', validateQuickLog);\r\n validateQuickLog();\r\n\r\n functio" + +"n validateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " + +" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowed" + +" = false;\r\n } else {\r\n // Allow Quick-Log only" + +" for certain Job Types\r\n var selectedType = $jobTypes.filter(" + +"\':checked\').val();\r\n switch (selectedType) {\r\n " + +" case \'HMisc\':\r\n case \'SApp\':\r\n " + +" case \'SImg\':\r\n case \'SOS\':\r\n " + +" case \'UMgmt\':\r\n // If Job-Queues are configured for " + +"a Sub-Type, don\'t allow quick-log.\r\n if ($(\'#createJo" + +"b_SubType_\' + $jobTypes.filter(\':checked\').val()).find(\'input:checked\').closest(" + +"\'li\').has(\'i.queue\').length == 0)\r\n quickLogAllow" + +"ed = true;\r\n else\r\n qu" + +"ickLogAllowed = false;\r\n break;\r\n " + +" default:\r\n quickLogAllowed = false;\r\n " + +" break;\r\n }\r\n }\r\n\r\n " + +" if (quickLogAllowed) {\r\n $quickLogContainer.slideDown();\r" + +"\n } else {\r\n if (init)\r\n " + +" $quickLogContainer.hide();\r\n else\r\n " + +"$quickLogContainer.slideUp();\r\n $quickLog.prop(\'checked\', fal" + +"se).change();\r\n }\r\n }\r\n\r\n $quickLog.change(" + +"function () {\r\n if ($(this).is(\':checked\')) {\r\n " + +" $quickLogTaskTimeContainer.slideDown();\r\n } else {\r\n " + +" $quickLogTaskTimeContainer.slideUp();\r\n }\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"); - #line 307 "..\..\Views\Job\Create.cshtml" + #line 320 "..\..\Views\Job\Create.cshtml" }