diff --git a/Disco.Web/Areas/API/Controllers/JobController.cs b/Disco.Web/Areas/API/Controllers/JobController.cs index f2d02ef9..1e900051 100644 --- a/Disco.Web/Areas/API/Controllers/JobController.cs +++ b/Disco.Web/Areas/API/Controllers/JobController.cs @@ -27,54 +27,54 @@ namespace Disco.Web.Areas.API.Controllers { #region Property Constants - const string pExpectedClosedDate = "expectedcloseddate"; - const string pDeviceHeldLocation = "deviceheldlocation"; - const string pFlags = "flags"; + private const string pExpectedClosedDate = "expectedcloseddate"; + private const string pDeviceHeldLocation = "deviceheldlocation"; + private const string pFlags = "flags"; - const string pNonWarrantyAccountingChargeRequired = "nonwarrantyaccountingchargerequired"; - const string pNonWarrantyAccountingChargeAdded = "nonwarrantyaccountingchargeadded"; - const string pNonWarrantyAccountingChargePaid = "nonwarrantyaccountingchargepaid"; - const string pNonWarrantyPurchaseOrderRaised = "nonwarrantypurchaseorderraised"; - const string pNonWarrantyPurchaseOrderReference = "nonwarrantypurchaseorderreference"; - const string pNonWarrantyPurchaseOrderSent = "nonwarrantypurchaseordersent"; - const string pNonWarrantyInvoiceReceived = "nonwarrantyinvoicereceived"; - const string pNonWarrantyRepairerName = "nonwarrantyrepairername"; - const string pNonWarrantyRepairerLoggedDate = "nonwarrantyrepairerloggeddate"; - const string pNonWarrantyRepairerReference = "nonwarrantyrepairerreference"; - const string pNonWarrantyRepairerCompletedDate = "nonwarrantyrepairercompleteddate"; - const string pNonWarrantyIsInsuranceClaim = "nonwarrantyinsuranceisinsuranceclaim"; + private const string pNonWarrantyAccountingChargeRequired = "nonwarrantyaccountingchargerequired"; + private const string pNonWarrantyAccountingChargeAdded = "nonwarrantyaccountingchargeadded"; + private const string pNonWarrantyAccountingChargePaid = "nonwarrantyaccountingchargepaid"; + private const string pNonWarrantyPurchaseOrderRaised = "nonwarrantypurchaseorderraised"; + private const string pNonWarrantyPurchaseOrderReference = "nonwarrantypurchaseorderreference"; + private const string pNonWarrantyPurchaseOrderSent = "nonwarrantypurchaseordersent"; + private const string pNonWarrantyInvoiceReceived = "nonwarrantyinvoicereceived"; + private const string pNonWarrantyRepairerName = "nonwarrantyrepairername"; + private const string pNonWarrantyRepairerLoggedDate = "nonwarrantyrepairerloggeddate"; + private const string pNonWarrantyRepairerReference = "nonwarrantyrepairerreference"; + private const string pNonWarrantyRepairerCompletedDate = "nonwarrantyrepairercompleteddate"; + private const string pNonWarrantyIsInsuranceClaim = "nonwarrantyinsuranceisinsuranceclaim"; - const string pInsuranceLossOrDamageDate = "insurancelossordamagedate"; - const string pInsuranceEventLocation = "insuranceeventlocation"; - const string pInsuranceDescription = "insurancedescription"; - const string pInsuranceThirdPartyCaused = "insurancethirdpartycaused"; - const string pInsuranceThirdPartyCausedName = "insurancethirdpartycausedname"; - const string pInsuranceThirdPartyCausedWhy = "insurancethirdpartycausedwhy"; - const string pInsuranceWitnessesNamesAddresses = "insurancewitnessesnamesaddresses"; - const string pInsuranceBurglaryTheftMethodOfEntry = "insuranceburglarytheftmethodofentry"; - const string pInsurancePropertyLastSeenDate = "insurancepropertylastseendate"; - const string pInsurancePoliceNotified = "insurancepolicenotified"; - const string pInsurancePoliceNotifiedStation = "insurancepolicenotifiedstation"; - const string pInsurancePoliceNotifiedDate = "insurancepolicenotifieddate"; - const string pInsurancePoliceNotifiedCrimeReportNo = "insurancepolicenotifiedcrimereportno"; - const string pInsuranceRecoverReduceAction = "insurancerecoverreduceaction"; - const string pInsuranceOtherInterestedParties = "insuranceotherinterestedparties"; - const string pInsuranceDateOfPurchase = "insurancedateofpurchase"; - const string pInsuranceClaimFormSentDate = "insuranceclaimformsentdate"; - const string pInsuranceClaimFormSentUserId = "insuranceclaimformsentuserid"; + private const string pInsuranceLossOrDamageDate = "insurancelossordamagedate"; + private const string pInsuranceEventLocation = "insuranceeventlocation"; + private const string pInsuranceDescription = "insurancedescription"; + private const string pInsuranceThirdPartyCaused = "insurancethirdpartycaused"; + private const string pInsuranceThirdPartyCausedName = "insurancethirdpartycausedname"; + private const string pInsuranceThirdPartyCausedWhy = "insurancethirdpartycausedwhy"; + private const string pInsuranceWitnessesNamesAddresses = "insurancewitnessesnamesaddresses"; + private const string pInsuranceBurglaryTheftMethodOfEntry = "insuranceburglarytheftmethodofentry"; + private const string pInsurancePropertyLastSeenDate = "insurancepropertylastseendate"; + private const string pInsurancePoliceNotified = "insurancepolicenotified"; + private const string pInsurancePoliceNotifiedStation = "insurancepolicenotifiedstation"; + private const string pInsurancePoliceNotifiedDate = "insurancepolicenotifieddate"; + private const string pInsurancePoliceNotifiedCrimeReportNo = "insurancepolicenotifiedcrimereportno"; + private const string pInsuranceRecoverReduceAction = "insurancerecoverreduceaction"; + private const string pInsuranceOtherInterestedParties = "insuranceotherinterestedparties"; + private const string pInsuranceDateOfPurchase = "insurancedateofpurchase"; + private const string pInsuranceClaimFormSentDate = "insuranceclaimformsentdate"; + private const string pInsuranceClaimFormSentUserId = "insuranceclaimformsentuserid"; - const string pWarrantyExternalName = "warrantyexternalname"; - const string pWarrantyExternalLoggedDate = "warrantyexternalloggeddate"; - const string pWarrantyExternalReference = "warrantyexternalreference"; - const string pWarrantyExternalCompletedDate = "warrantyexternalcompleteddate"; + private const string pWarrantyExternalName = "warrantyexternalname"; + private const string pWarrantyExternalLoggedDate = "warrantyexternalloggeddate"; + private const string pWarrantyExternalReference = "warrantyexternalreference"; + private const string pWarrantyExternalCompletedDate = "warrantyexternalcompleteddate"; - const string pJobDetailsTabResources = "jobDetailTab-Resources"; - const string pJobDetailsTabComponents = "jobDetailTab-Components"; - const string pJobDetailsTabNonWarrantyFinance = "jobDetailTab-NonWarrantyFinance"; - const string pJobDetailsTabNonWarrantyRepairs = "jobDetailTab-NonWarrantyRepairs"; - const string pJobDetailsTabNonWarrantyInsurance = "jobDetailTab-NonWarrantyInsurance"; - const string pJobDetailsTabWarranty = "jobDetailTab-Warranty"; - const string pJobDetailsTabFlags = "jobDetailTab-Flags"; + private const string pJobDetailsTabResources = "jobDetailTab-Resources"; + private const string pJobDetailsTabComponents = "jobDetailTab-Components"; + private const string pJobDetailsTabNonWarrantyFinance = "jobDetailTab-NonWarrantyFinance"; + private const string pJobDetailsTabNonWarrantyRepairs = "jobDetailTab-NonWarrantyRepairs"; + private const string pJobDetailsTabNonWarrantyInsurance = "jobDetailTab-NonWarrantyInsurance"; + private const string pJobDetailsTabWarranty = "jobDetailTab-Warranty"; + private const string pJobDetailsTabFlags = "jobDetailTab-Flags"; #endregion @@ -917,6 +917,7 @@ namespace Disco.Web.Areas.API.Controllers if (string.IsNullOrEmpty(RepairerLoggedDate)) { job.JobMetaNonWarranty.RepairerLoggedDate = null; + job.JobMetaNonWarranty.RepairerCompletedDate = null; } else { diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js index 309e61d1..8d1cd1cf 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.js @@ -250,10 +250,11 @@ if (!document.DiscoFunctions.DateDialogCreateUpdater) { function dateDialogGet() { if (!dialog) { dialog = $('
').attr({ 'class': 'dialog' }) - dialogForm = $('
').attr({ 'action': '/', 'method': 'post' }).appendTo(dialog); + dialogForm = $('').attr({ 'action': updateUrl, 'method': 'post' }).appendTo(dialog); + $('').attr({ 'type': 'hidden', 'name': '__RequestVerificationToken' }).val(document.body.dataset.antiforgery).appendTo(dialogForm); var dialogBody = $('

').appendTo(dialogForm); dialogHeader = $('

').attr('autofocus', 'autofocus').appendTo(dialogBody); - dialogDatePropertyNameBox = $('').attr({ 'type': 'hidden', 'name': 'key' }).appendTo(dialogBody); + dialogDatePropertyNameBox = $('').attr({ 'type': 'hidden', 'name': 'key', 'value': updatePropertyName }).appendTo(dialogBody); dialogDateBox = $('').attr({ 'type': 'datetime', 'name': 'value' }).css({ 'display': 'block', 'margin-top': 15, 'margin-left': 'auto', 'margin-right': 'auto' }).appendTo(dialogBody); $('').attr({ 'type': 'hidden', 'name': 'redirect' }).val('true').appendTo(dialogBody); @@ -336,11 +337,8 @@ if (!document.DiscoFunctions.DateDialogCreateUpdater) { } } else { // Post Form & Redirect - dialog.dialog("disable"); dialog.dialog("option", "buttons", null); - dialogDatePropertyNameBox.val(updatePropertyName); - dialogForm.attr('action', updateUrl); dialogForm.submit(); } } diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js index bb5ff73e..e5c01065 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers.min.js @@ -1 +1 @@ -if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r,u,f){var h=document.DiscoFunctions.PropertyValue(n),o=null,e=n.nextAll(".ajaxSave").first(),s=n.nextAll(".ajaxLoading").first(),c=function(){e.hide();var t=document.DiscoFunctions.PropertyValue(n);if(h!=t){if(f&&!f(t))return;h=t;o&&window.clearTimeout(o);o=window.setTimeout(async function(){s.show();const n=new FormData;if(n.append("__RequestVerificationToken",document.body.dataset.antiforgery),u)for(const t in u)n.append(t,u[t]);n.append(r,h);try{const t=await fetch(i,{method:"POST",body:n});t.ok?s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"):(alert('Unable to change property "'+r+'":\n'+t.statusText),s.hide())}catch(t){alert('Unable to change property "'+r+'":\n'+t);s.hide()}o=null},500)}};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(c):n.change(c);n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&(n.keydown(function(n){e.show();n.which==13&&$(this).blur()}).blur(function(){e.hide()}).focus(function(){$(this).select()}),t&&n.watermark(t));n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){e.show()}).blur(function(){e.hide()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var h=n.val(),o=null,s=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();h.toLowerCase()!=i.toLowerCase()&&(h=i,o&&window.clearTimeout(o),o=window.setTimeout(async function(){s.show();const n=new FormData;n.append("__RequestVerificationToken",document.body.dataset.antiforgery);n.append(u,h);try{const i=await fetch(r,{method:"POST",body:n});if(i.ok){const n=await i.json();t.text("by "+n.UserDescription);s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}else alert("Unable to change Date:\n"+i.statusText),s.hide()}catch(i){alert("Unable to change Date:\n"+response.statusText);s.hide()}o=null},500))}).focus(function(){$(this).select()});e?n.datepicker({defaultDate:new Date,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var s=n.val(),e=null,o=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();s.toLowerCase()!=t.toLowerCase()&&(s=t,e&&window.clearTimeout(e),e=window.setTimeout(async function(){o.show();const n=new FormData;n.append("__RequestVerificationToken",document.body.dataset.antiforgery);n.append(r,s);try{const t=await fetch(i,{method:"POST",body:n});t.ok?o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"):(alert("Unable to change Date:\n"+t.statusText),o.hide())}catch(t){alert("Unable to change Date:\n"+response.statusText);o.hide()}e=null},500))}).focus(function(){$(this).select()});f?n.datepicker({defaultDate:new Date,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function n(){if(!dialog){dialog=$("
").attr({"class":"dialog"});dialogForm=$("").attr({action:"/",method:"post"}).appendTo(dialog);var n=$("

").appendTo(dialogForm);dialogHeader=$("

").attr("autofocus","autofocus").appendTo(n);dialogDatePropertyNameBox=$("").attr({type:"hidden",name:"key"}).appendTo(n);dialogDateBox=$("").attr({type:"datetime",name:"value"}).css({display:"block","margin-top":15,"margin-left":"auto","margin-right":"auto"}).appendTo(n);$("").attr({type:"hidden",name:"redirect"}).val("true").appendTo(n);dialog.dialog({resizable:!1,modal:!0,autoOpen:!1,buttons:{Update:function(){t()},Cancel:function(){$(this).dialog("close")}},open:function(){dialog.dialog("widget").find(".ui-dialog-buttonpane :tabbable:first").focus()}});dialogDateBox.datetimepicker({defaultDate:new Date,ampm:!0,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd"})}return dialog}async function t(){var r=dialogDateBox.val(),t,n,i;if(useAjax){t=$("#"+dateField);userField&&(n=$("#"+userField));dialog.dialog("close");i=(n?n.next(".ajaxLoading"):t.next(".ajaxLoading")).show();const u=new FormData;u.append("__RequestVerificationToken",document.body.dataset.antiforgery);u.append("key",updatePropertyName);u.append("value",r);try{const r=await fetch(updateUrl,{method:"POST",body:u});if(r.ok){const u=await r.json();u.DateTimeFull?t.attr("data-isodate",u.DateTimeISO8601).attr("data-livestamp",u.DateTimeUnixEpoc).attr("title",u.DateTimeFull).text(u.DateTimeFriendly):t.attr("data-isodate","").attr("data-livestamp","-1").attr("title",notSetDisplay).text(notSetDisplay);n&&n.text("by "+u.UserDescription);i.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}else alert("Unable to change "+friendlyName+" Date:\n"+r.statusText),i.hide()}catch(u){alert("Unable to change "+friendlyName+" Date:\n"+response.statusText);i.hide()}}else dialog.dialog("disable"),dialog.dialog("option","buttons",null),dialogDatePropertyNameBox.val(updatePropertyName),dialogForm.attr("action",updateUrl),dialogForm.submit()}function i(t,i,r,u,f,e,o,s){var h,c;updateUrl=t;friendlyName=i;dateField=r;userField=u;updatePropertyName=f;notSetDisplay=e;minDate=o;useAjax=s;h=n();h.dialog("option","title",friendlyName);dialogHeader.text(friendlyName+" Date");c=$("#"+r).attr("data-isodate");c?dialogDateBox.datetimepicker("setDate",new Date(c)):dialogDateBox.datetimepicker("setDate",new Date);o?dialogDateBox.datetimepicker("option","minDate",moment(minDate).toDate()):dialogDateBox.datetimepicker("option","minDate",null);h.dialog("open")}function r(n,t,r,u,f,e,o,s){$("").attr({href:"#","class":"button small",style:"margin-right: 5px;"}).text("Update").click(function(h){h.preventDefault();i(n,t,r,u,f,e,o,s)}).insertBefore("#"+r)}document.DiscoFunctions.DateDialogCreateUpdater=r} \ No newline at end of file +if(document.DiscoFunctions||(document.DiscoFunctions={}),document.DiscoFunctions.PropertyChangeHelper||(document.DiscoFunctions.PropertyValue=function(n){return n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.is(":checked"):n.val()},document.DiscoFunctions.PropertyChangeHelper=function(n,t,i,r,u,f){var h=document.DiscoFunctions.PropertyValue(n),o=null,e=n.nextAll(".ajaxSave").first(),s=n.nextAll(".ajaxLoading").first(),c=function(){e.hide();var t=document.DiscoFunctions.PropertyValue(n);if(h!=t){if(f&&!f(t))return;h=t;o&&window.clearTimeout(o);o=window.setTimeout(async function(){s.show();const n=new FormData;if(n.append("__RequestVerificationToken",document.body.dataset.antiforgery),u)for(const t in u)n.append(t,u[t]);n.append(r,h);try{const t=await fetch(i,{method:"POST",body:n});t.ok?s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"):(alert('Unable to change property "'+r+'":\n'+t.statusText),s.hide())}catch(t){alert('Unable to change property "'+r+'":\n'+t);s.hide()}o=null},500)}};n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="checkbox"?n.click(c):n.change(c);n[0].nodeName.toLowerCase()=="input"&&n.attr("type")=="text"&&(n.keydown(function(n){e.show();n.which==13&&$(this).blur()}).blur(function(){e.hide()}).focus(function(){$(this).select()}),t&&n.watermark(t));n[0].nodeName.toLowerCase()=="textarea"&&n.keydown(function(){e.show()}).blur(function(){e.hide()})}),document.DiscoFunctions.DateChangeUserHelper||(document.DiscoFunctions.DateChangeUserHelper=function(n,t,i,r,u,f,e){var h=n.val(),o=null,s=t.next(".ajaxLoading");n.watermark(i).change(function(){var i=n.val();h.toLowerCase()!=i.toLowerCase()&&(h=i,o&&window.clearTimeout(o),o=window.setTimeout(async function(){s.show();const n=new FormData;n.append("__RequestVerificationToken",document.body.dataset.antiforgery);n.append(u,h);try{const i=await fetch(r,{method:"POST",body:n});if(i.ok){const n=await i.json();t.text("by "+n.UserDescription);s.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}else alert("Unable to change Date:\n"+i.statusText),s.hide()}catch(i){alert("Unable to change Date:\n"+response.statusText);s.hide()}o=null},500))}).focus(function(){$(this).select()});e?n.datepicker({defaultDate:new Date,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(f).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),document.DiscoFunctions.DateChangeHelper||(document.DiscoFunctions.DateChangeHelper=function(n,t,i,r,u,f){var s=n.val(),e=null,o=n.next(".ajaxLoading");n.watermark(t).change(function(){var t=n.val();s.toLowerCase()!=t.toLowerCase()&&(s=t,e&&window.clearTimeout(e),e=window.setTimeout(async function(){o.show();const n=new FormData;n.append("__RequestVerificationToken",document.body.dataset.antiforgery);n.append(r,s);try{const t=await fetch(i,{method:"POST",body:n});t.ok?o.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow"):(alert("Unable to change Date:\n"+t.statusText),o.hide())}catch(t){alert("Unable to change Date:\n"+response.statusText);o.hide()}e=null},500))}).focus(function(){$(this).select()});f?n.datepicker({defaultDate:new Date,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datepicker("setDate",new Date)}}):n.datetimepicker({defaultDate:new Date,ampm:!0,minDate:moment(u).toDate(),changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd",beforeShow:function(n){$input=$(n);$input.val()||$input.datetimepicker("setDate",new Date)}})}),!document.DiscoFunctions.DateDialogCreateUpdater){var dialog,dialogForm,dialogHeader,dialogDateBox,dialogDatePropertyNameBox,updateUrl,friendlyName,dateField,userField,updatePropertyName,notSetDisplay,minDate,useAjax;function n(){if(!dialog){dialog=$("
").attr({"class":"dialog"});dialogForm=$("").attr({action:updateUrl,method:"post"}).appendTo(dialog);$("").attr({type:"hidden",name:"__RequestVerificationToken"}).val(document.body.dataset.antiforgery).appendTo(dialogForm);var n=$("

").appendTo(dialogForm);dialogHeader=$("

").attr("autofocus","autofocus").appendTo(n);dialogDatePropertyNameBox=$("").attr({type:"hidden",name:"key",value:updatePropertyName}).appendTo(n);dialogDateBox=$("").attr({type:"datetime",name:"value"}).css({display:"block","margin-top":15,"margin-left":"auto","margin-right":"auto"}).appendTo(n);$("").attr({type:"hidden",name:"redirect"}).val("true").appendTo(n);dialog.dialog({resizable:!1,modal:!0,autoOpen:!1,buttons:{Update:function(){t()},Cancel:function(){$(this).dialog("close")}},open:function(){dialog.dialog("widget").find(".ui-dialog-buttonpane :tabbable:first").focus()}});dialogDateBox.datetimepicker({defaultDate:new Date,ampm:!0,changeYear:!0,changeMonth:!0,dateFormat:"yy/mm/dd"})}return dialog}async function t(){var r=dialogDateBox.val(),t,n,i;if(useAjax){t=$("#"+dateField);userField&&(n=$("#"+userField));dialog.dialog("close");i=(n?n.next(".ajaxLoading"):t.next(".ajaxLoading")).show();const u=new FormData;u.append("__RequestVerificationToken",document.body.dataset.antiforgery);u.append("key",updatePropertyName);u.append("value",r);try{const r=await fetch(updateUrl,{method:"POST",body:u});if(r.ok){const u=await r.json();u.DateTimeFull?t.attr("data-isodate",u.DateTimeISO8601).attr("data-livestamp",u.DateTimeUnixEpoc).attr("title",u.DateTimeFull).text(u.DateTimeFriendly):t.attr("data-isodate","").attr("data-livestamp","-1").attr("title",notSetDisplay).text(notSetDisplay);n&&n.text("by "+u.UserDescription);i.hide().next(".ajaxOk").show().delay("fast").fadeOut("slow")}else alert("Unable to change "+friendlyName+" Date:\n"+r.statusText),i.hide()}catch(u){alert("Unable to change "+friendlyName+" Date:\n"+response.statusText);i.hide()}}else dialog.dialog("option","buttons",null),dialogForm.submit()}function i(t,i,r,u,f,e,o,s){var h,c;updateUrl=t;friendlyName=i;dateField=r;userField=u;updatePropertyName=f;notSetDisplay=e;minDate=o;useAjax=s;h=n();h.dialog("option","title",friendlyName);dialogHeader.text(friendlyName+" Date");c=$("#"+r).attr("data-isodate");c?dialogDateBox.datetimepicker("setDate",new Date(c)):dialogDateBox.datetimepicker("setDate",new Date);o?dialogDateBox.datetimepicker("option","minDate",moment(minDate).toDate()):dialogDateBox.datetimepicker("option","minDate",null);h.dialog("open")}function r(n,t,r,u,f,e,o,s){$("").attr({href:"#","class":"button small",style:"margin-right: 5px;"}).text("Update").click(function(h){h.preventDefault();i(n,t,r,u,f,e,o,s)}).insertBefore("#"+r)}document.DiscoFunctions.DateDialogCreateUpdater=r} \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js index 3c02c1e7..fbf18196 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Disco-PropertyChangeHelpers/disco.propertychangehelpers.js @@ -250,10 +250,11 @@ if (!document.DiscoFunctions.DateDialogCreateUpdater) { function dateDialogGet() { if (!dialog) { dialog = $('
').attr({ 'class': 'dialog' }) - dialogForm = $('').attr({ 'action': '/', 'method': 'post' }).appendTo(dialog); + dialogForm = $('').attr({ 'action': updateUrl, 'method': 'post' }).appendTo(dialog); + $('').attr({ 'type': 'hidden', 'name': '__RequestVerificationToken' }).val(document.body.dataset.antiforgery).appendTo(dialogForm); var dialogBody = $('

').appendTo(dialogForm); dialogHeader = $('

').attr('autofocus', 'autofocus').appendTo(dialogBody); - dialogDatePropertyNameBox = $('').attr({ 'type': 'hidden', 'name': 'key' }).appendTo(dialogBody); + dialogDatePropertyNameBox = $('').attr({ 'type': 'hidden', 'name': 'key', 'value': updatePropertyName }).appendTo(dialogBody); dialogDateBox = $('').attr({ 'type': 'datetime', 'name': 'value' }).css({ 'display': 'block', 'margin-top': 15, 'margin-left': 'auto', 'margin-right': 'auto' }).appendTo(dialogBody); $('').attr({ 'type': 'hidden', 'name': 'redirect' }).val('true').appendTo(dialogBody); @@ -336,11 +337,8 @@ if (!document.DiscoFunctions.DateDialogCreateUpdater) { } } else { // Post Form & Redirect - dialog.dialog("disable"); dialog.dialog("option", "buttons", null); - dialogDatePropertyNameBox.val(updatePropertyName); - dialogForm.attr('action', updateUrl); dialogForm.submit(); } } diff --git a/Disco.Web/Views/Job/JobParts/Insurance.cshtml b/Disco.Web/Views/Job/JobParts/Insurance.cshtml index 4de101d3..8b962e8d 100644 --- a/Disco.Web/Views/Job/JobParts/Insurance.cshtml +++ b/Disco.Web/Views/Job/JobParts/Insurance.cshtml @@ -645,13 +645,19 @@
- @if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) + @using (Html.BeginForm(MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, !Model.Job.JobMetaNonWarranty.IsInsuranceClaim, true))) { - @Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true)) - } - else - { - @Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true)) + @Html.AntiForgeryToken() + }
diff --git a/Disco.Web/Views/Job/JobParts/Insurance.generated.cs b/Disco.Web/Views/Job/JobParts/Insurance.generated.cs index 00612ae6..37bc19df 100644 --- a/Disco.Web/Views/Job/JobParts/Insurance.generated.cs +++ b/Disco.Web/Views/Job/JobParts/Insurance.generated.cs @@ -1971,7 +1971,7 @@ WriteLiteral(">\r\n"); #line hidden #line 648 "..\..\Views\Job\JobParts\Insurance.cshtml" - if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) + using (Html.BeginForm(MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, !Model.Job.JobMetaNonWarranty.IsInsuranceClaim, true))) { @@ -1979,31 +1979,68 @@ WriteLiteral(">\r\n"); #line hidden #line 650 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true))); + Write(Html.AntiForgeryToken()); #line default #line hidden #line 650 "..\..\Views\Job\JobParts\Insurance.cshtml" - - } - else - { - - - #line default - #line hidden - - #line 654 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true))); + #line default #line hidden +WriteLiteral(" \r\n"); + - #line 654 "..\..\Views\Job\JobParts\Insurance.cshtml" - + #line 652 "..\..\Views\Job\JobParts\Insurance.cshtml" + + + #line default + #line hidden + + #line 652 "..\..\Views\Job\JobParts\Insurance.cshtml" + if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) + { + + + #line default + #line hidden +WriteLiteral(" "); + +WriteLiteral("Remove Insurance Claim\r\n"); + + + #line 655 "..\..\Views\Job\JobParts\Insurance.cshtml" + } + else + { + + + #line default + #line hidden +WriteLiteral(" "); + +WriteLiteral("Add Insurance Claim\r\n"); + + + #line 659 "..\..\Views\Job\JobParts\Insurance.cshtml" + } + + + #line default + #line hidden +WriteLiteral(" \r\n"); + + + #line 661 "..\..\Views\Job\JobParts\Insurance.cshtml" } @@ -2012,7 +2049,7 @@ WriteLiteral(">\r\n"); WriteLiteral("

\r\n \r\n \r\n"); - #line 659 "..\..\Views\Job\JobParts\Insurance.cshtml" + #line 665 "..\..\Views\Job\JobParts\Insurance.cshtml" } diff --git a/Disco.Web/Views/Job/JobParts/_Subject.cshtml b/Disco.Web/Views/Job/JobParts/_Subject.cshtml index 718d0f2c..06f62891 100644 --- a/Disco.Web/Views/Job/JobParts/_Subject.cshtml +++ b/Disco.Web/Views/Job/JobParts/_Subject.cshtml @@ -574,7 +574,7 @@ List CanCloseForcedReasons; if (Model.Job.CanCloseForced(out CanCloseForcedReasons)) { - @Html.ActionLinkSmallButton("Forcibly Close", MVC.API.Job.Close(Model.Job.Id, true), "Job_Show_Job_Actions_ForceClose_Button") +

@@ -764,7 +764,7 @@ var slaOptions = Disco.Services.Jobs.JobQueues.JobQueueService.SlaOptions.Select(o => new SelectListItem() { Text = o.Value, Value = o.Key.ToString() }).ToList(); - @Html.ActionLinkSmallButton("Add to Queue", MVC.API.JobQueueJob.AddJob(), "Job_Show_Job_Actions_AddQueue_Button") +

@using (Html.BeginForm(MVC.API.JobQueueJob.AddJob())) { @@ -825,9 +825,7 @@ $('#Job_Show_Job_Actions_AddQueue_Comment').focus().select(); } - button.attr('href', '#').click(function (e) { - e.preventDefault(); - + button.click(function (e) { if (!buttonDialog) { buttonDialog = $('#Job_Show_Job_Actions_AddQueue_Dialog'); buttonDialog.dialog({ @@ -867,7 +865,6 @@ } buttonDialog.dialog('open'); - return false; }); }); @@ -878,7 +875,11 @@ } @if (Model.Job.CanWarrantyCompleted()) { - @Html.ActionLinkSmallButton("Warranty Complete", MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_WarrantyComplete_Button", "alert") + using (Html.BeginForm(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true))) + { + @Html.AntiForgeryToken() + + } } @if (Model.Job.CanLogInsurance()) { @@ -890,7 +891,11 @@ } @if (Model.Job.CanRepairComplete()) { - @Html.ActionLinkSmallButton("Repairs Complete", MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true), "Job_Show_Job_Actions_RepairComplete_Button", "alert") + using (Html.BeginForm(MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true))) + { + @Html.AntiForgeryToken() + + } } @if (Model.Job.CanConvertHWarToHNWar()) { diff --git a/Disco.Web/Views/Job/JobParts/_Subject.generated.cs b/Disco.Web/Views/Job/JobParts/_Subject.generated.cs index b16412ad..6de047d4 100644 --- a/Disco.Web/Views/Job/JobParts/_Subject.generated.cs +++ b/Disco.Web/Views/Job/JobParts/_Subject.generated.cs @@ -2309,24 +2309,18 @@ WriteLiteral(">\r\n"); List CanCloseForcedReasons; if (Model.Job.CanCloseForced(out CanCloseForcedReasons)) { - - - #line default - #line hidden - - #line 577 "..\..\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 577 "..\..\Views\Job\JobParts\_Subject.cshtml" - +WriteLiteral(" Forcibly Close\r\n"); - - #line default - #line hidden WriteLiteral(" new SelectListItem() { Text = o.Value, Value = o.Key.ToString() }).ToList(); - - - #line default - #line hidden - - #line 767 "..\..\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 767 "..\..\Views\Job\JobParts\_Subject.cshtml" - +WriteLiteral(" Add to Queue\r\n"); - - #line default - #line hidden WriteLiteral(" (Model.Job.Id + , Tuple.Create(Tuple.Create("", 49714), Tuple.Create(Model.Job.Id #line default #line hidden -, 49765), false) +, 49714), false) ); WriteLiteral(" />\r\n"); @@ -2949,26 +2937,26 @@ WriteLiteral("\""); WriteLiteral(">\r\n (jobQueue.Icon +, Tuple.Create(Tuple.Create("", 50210), Tuple.Create(jobQueue.Icon #line default #line hidden -, 50261), false) -, Tuple.Create(Tuple.Create(" ", 50277), Tuple.Create("fa-fw", 50278), true) -, Tuple.Create(Tuple.Create(" ", 50283), Tuple.Create("fa-lg", 50284), true) -, Tuple.Create(Tuple.Create(" ", 50289), Tuple.Create("d-", 50290), true) +, 50210), false) +, Tuple.Create(Tuple.Create(" ", 50226), Tuple.Create("fa-fw", 50227), true) +, Tuple.Create(Tuple.Create(" ", 50232), Tuple.Create("fa-lg", 50233), true) +, Tuple.Create(Tuple.Create(" ", 50238), Tuple.Create("d-", 50239), true) #line 778 "..\..\Views\Job\JobParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create("", 50292), Tuple.Create(jobQueue.IconColour + , Tuple.Create(Tuple.Create("", 50241), Tuple.Create(jobQueue.IconColour #line default #line hidden -, 50292), false) +, 50241), false) ); WriteLiteral(">"); @@ -3009,27 +2997,27 @@ WriteLiteral(" "); #line hidden WriteLiteral(" (priorityValue.ToLower() + , Tuple.Create(Tuple.Create("", 50682), Tuple.Create(priorityValue.ToLower() #line default #line hidden -, 50733), false) +, 50682), false) ); -WriteAttribute("title", Tuple.Create(" title=\"", 50760), Tuple.Create("\"", 50793) +WriteAttribute("title", Tuple.Create(" title=\"", 50709), Tuple.Create("\"", 50742) #line 785 "..\..\Views\Job\JobParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create("", 50768), Tuple.Create(priorityValue + , Tuple.Create(Tuple.Create("", 50717), Tuple.Create(priorityValue #line default #line hidden -, 50768), false) -, Tuple.Create(Tuple.Create(" ", 50784), Tuple.Create("Priority", 50785), true) +, 50717), false) +, Tuple.Create(Tuple.Create(" ", 50733), Tuple.Create("Priority", 50734), true) ); WriteLiteral(">\r\n
\r\n
\r\n " + @@ -3083,41 +3071,40 @@ WriteLiteral(">\r\n $(function () {\r\n " $(\'#Job_Show_Job_Actions_AddQueue_SLAExpiresMinutes\').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.preventDefault();\r\n\r\n " + -" if (!buttonDialog) {\r\n buttonDialog = $(\'#Job_Sh" + -"ow_Job_Actions_AddQueue_Dialog\');\r\n buttonDialog." + -"dialog({\r\n width: 600,\r\n " + -" height: 410,\r\n resizable: fals" + -"e,\r\n modal: true,\r\n " + -" autoOpen: false,\r\n buttons: {\r\n " + -" Cancel: function () {\r\n " + -" $(this).dialog(\"close\");\r\n " + -" },\r\n \"Add to Queue\": function ()" + -" {\r\n if (!!queueId.val()) {\r\n " + -" $(this)\r\n " + -" .dialog(\"option\", \"buttons\", null)\r\n " + -" .find(\'form\').trigger(\'submit\');\r\n " + -" } else {\r\n " + -" alert(\'Select a Job Queue\');\r\n }" + -"\r\n }\r\n " + -" }\r\n });\r\n\r\n queue" + -"Picker = buttonDialog.find(\'.queuePicker\');\r\n que" + -"ueId = $(\'#Job_Show_Job_Actions_AddQueue_Dialog_Id\');\r\n " + -" details = buttonDialog.find(\'.details\');\r\n\r\n " + -" var priorityList = $(\'#Job_Show_Job_Actions_AddQueue_Priority\');\r\n " + -" priorityList.change(function () {\r\n " + -" var icon = priorityList.closest(\'div\').find(\'i\').first();\r\n " + -" icon[0].className = \'\';\r\n " + -" icon.addClass(\'fa d-priority-\' + priorityList.val().toLowerCase()).attr(" + -"\'title\', priorityList.val() + \' Priority\');\r\n });" + -"\r\n\r\n queuePicker.on(\'click\', \'div.queue\', queueSe" + -"lected);\r\n }\r\n\r\n buttonDia" + -"log.dialog(\'open\');\r\n return false;\r\n " + -" });\r\n });\r\n \r\n"); +" }\r\n\r\n button.click(function (e) {\r\n " + +" if (!buttonDialog) {\r\n buttonDialog =" + +" $(\'#Job_Show_Job_Actions_AddQueue_Dialog\');\r\n bu" + +"ttonDialog.dialog({\r\n width: 600,\r\n " + +" height: 410,\r\n resi" + +"zable: false,\r\n modal: true,\r\n " + +" autoOpen: false,\r\n butto" + +"ns: {\r\n Cancel: function () {\r\n " + +" $(this).dialog(\"close\");\r\n " + +" },\r\n \"Add to Queue\": " + +"function () {\r\n if (!!queueId.val()) " + +"{\r\n $(this)\r\n " + +" .dialog(\"option\", \"buttons\", null)\r\n " + +" .find(\'form\').trigger(\'submit\');\r\n " + +" } else {\r\n " + +" alert(\'Select a Job Queue\');\r\n " + +" }\r\n }\r\n " + +" }\r\n });\r\n\r\n " + +" queuePicker = buttonDialog.find(\'.queuePicker\');\r\n " + +" queueId = $(\'#Job_Show_Job_Actions_AddQueue_Dialog_Id\');\r\n " + +" details = buttonDialog.find(\'.details\');\r\n\r\n " + +" var priorityList = $(\'#Job_Show_Job_Actions_AddQueue_Priority\');\r\n" + +" priorityList.change(function () {\r\n " + +" var icon = priorityList.closest(\'div\').find(\'i\').first();" + +"\r\n icon[0].className = \'\';\r\n " + +" icon.addClass(\'fa d-priority-\' + priorityList.val().toLowerCa" + +"se()).attr(\'title\', priorityList.val() + \' Priority\');\r\n " + +" });\r\n\r\n queuePicker.on(\'click\', \'div.queu" + +"e\', queueSelected);\r\n }\r\n\r\n " + +" buttonDialog.dialog(\'open\');\r\n });\r\n " + +" });\r\n \r\n"); - #line 874 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 871 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3126,7 +3113,7 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral(" "); - #line 875 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 872 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanLogWarranty()) { @@ -3134,14 +3121,14 @@ WriteLiteral(" "); #line default #line hidden - #line 877 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 874 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Lodge Warranty", MVC.Job.LogWarranty(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogWarranty_Button")); #line default #line hidden - #line 877 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 874 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3151,23 +3138,42 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 879 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 876 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanWarrantyCompleted()) { - + using (Html.BeginForm(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, "Now", true))) + { + #line default #line hidden - #line 881 "..\..\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 880 "..\..\Views\Job\JobParts\_Subject.cshtml" + Write(Html.AntiForgeryToken()); #line default #line hidden - #line 881 "..\..\Views\Job\JobParts\_Subject.cshtml" - + #line 880 "..\..\Views\Job\JobParts\_Subject.cshtml" + + + + #line default + #line hidden +WriteLiteral(" Warranty Complete\r\n"); + + + #line 882 "..\..\Views\Job\JobParts\_Subject.cshtml" + } } @@ -3176,7 +3182,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 883 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 884 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanLogInsurance()) { @@ -3184,14 +3190,14 @@ WriteLiteral(" "); #line default #line hidden - #line 885 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 886 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Lodge Insurance", MVC.Job.LogInsurance(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogInsurance_Button", "alert")); #line default #line hidden - #line 885 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 886 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3201,7 +3207,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 887 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 888 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanLogRepair()) { @@ -3209,14 +3215,14 @@ WriteLiteral(" "); #line default #line hidden - #line 889 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 890 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.ActionLinkSmallButton("Lodge Repair", MVC.Job.LogRepair(Model.Job.Id, null, null), "Job_Show_Job_Actions_LogRepair_Button")); #line default #line hidden - #line 889 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 890 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3226,23 +3232,42 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 891 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 892 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanRepairComplete()) { - + using (Html.BeginForm(MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, "Now", true))) + { + #line default #line hidden - #line 893 "..\..\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 896 "..\..\Views\Job\JobParts\_Subject.cshtml" + Write(Html.AntiForgeryToken()); #line default #line hidden - #line 893 "..\..\Views\Job\JobParts\_Subject.cshtml" - + #line 896 "..\..\Views\Job\JobParts\_Subject.cshtml" + + + + #line default + #line hidden +WriteLiteral(" Repairs Complete\r\n"); + + + #line 898 "..\..\Views\Job\JobParts\_Subject.cshtml" + } } @@ -3251,7 +3276,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 895 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 900 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanConvertHWarToHNWar()) { @@ -3279,13 +3304,13 @@ WriteLiteral(" title=\"Convert this Job?\""); WriteLiteral(">\r\n"); - #line 899 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 904 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 899 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 904 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.ConvertHWarToHNWar(Model.Job.Id, true))) { @@ -3293,14 +3318,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 901 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 906 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 901 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 906 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3351,7 +3376,7 @@ WriteLiteral(@"> "); - #line 938 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 943 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3360,13 +3385,13 @@ WriteLiteral(@"> WriteLiteral(" \r\n"); - #line 940 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 945 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 940 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 945 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.Device != null) { @@ -3380,13 +3405,13 @@ WriteLiteral(" id=\"Job_Show_Device_Actions\""); WriteLiteral(">\r\n"); - #line 943 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 948 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 943 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 948 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanDeviceHeld()) { using (Html.BeginForm(MVC.API.Job.DeviceHeld(Model.Job.Id, true))) @@ -3396,14 +3421,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 947 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 952 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 947 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 952 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3420,7 +3445,7 @@ WriteLiteral(" class=\"button small\""); WriteLiteral(">Device Held\r\n"); - #line 949 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 954 "..\..\Views\Job\JobParts\_Subject.cshtml" } } @@ -3430,7 +3455,7 @@ WriteLiteral(">Device Held\r\n"); WriteLiteral(" "); - #line 951 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 956 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanDeviceReadyForReturn()) { using (Html.BeginForm(MVC.API.Job.DeviceReadyForReturn(Model.Job.Id, true))) @@ -3440,14 +3465,14 @@ WriteLiteral(" "); #line default #line hidden - #line 955 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 960 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 955 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 960 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3464,7 +3489,7 @@ WriteLiteral(" class=\"button small alert\""); WriteLiteral(">Device Ready For Return\r\n"); - #line 957 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 962 "..\..\Views\Job\JobParts\_Subject.cshtml" } } @@ -3474,7 +3499,7 @@ WriteLiteral(">Device Ready For Return\r\n"); WriteLiteral(" "); - #line 959 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 964 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanDeviceReturned()) { using (Html.BeginForm(MVC.API.Job.DeviceReturned(Model.Job.Id, true))) @@ -3484,14 +3509,14 @@ WriteLiteral(" "); #line default #line hidden - #line 963 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 968 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 963 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 968 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3503,22 +3528,22 @@ WriteLiteral(" id=\"Job_Show_Device_Actions_DeviceReturned_Button\""); WriteLiteral(" type=\"submit\""); -WriteAttribute("class", Tuple.Create(" class=\"", 60035), Tuple.Create("\"", 60111) -, Tuple.Create(Tuple.Create("", 60043), Tuple.Create("button", 60043), true) -, Tuple.Create(Tuple.Create(" ", 60049), Tuple.Create("small", 60050), true) +WriteAttribute("class", Tuple.Create(" class=\"", 60168), Tuple.Create("\"", 60244) +, Tuple.Create(Tuple.Create("", 60176), Tuple.Create("button", 60176), true) +, Tuple.Create(Tuple.Create(" ", 60182), Tuple.Create("small", 60183), true) - #line 964 "..\..\Views\Job\JobParts\_Subject.cshtml" - , Tuple.Create(Tuple.Create(" ", 60055), Tuple.Create(Model.Job.CanDeviceReadyForReturn() ? null : "alert" + #line 969 "..\..\Views\Job\JobParts\_Subject.cshtml" + , Tuple.Create(Tuple.Create(" ", 60188), Tuple.Create(Model.Job.CanDeviceReadyForReturn() ? null : "alert" #line default #line hidden -, 60056), false) +, 60189), false) ); WriteLiteral(">Device Returned\r\n"); - #line 965 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 970 "..\..\Views\Job\JobParts\_Subject.cshtml" } } @@ -3528,7 +3553,7 @@ WriteLiteral(">Device Returned\r\n"); WriteLiteral(" \r\n"); - #line 968 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 973 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3537,7 +3562,7 @@ WriteLiteral(" \r\n"); WriteLiteral(" "); - #line 969 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 974 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.User != null) { @@ -3551,13 +3576,13 @@ WriteLiteral(" id=\"Job_Show_User_Actions\""); WriteLiteral(">\r\n\r\n\r\n"); - #line 974 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 979 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 974 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 979 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanWaitingForUserAction()) { @@ -3585,13 +3610,13 @@ WriteLiteral(" title=\"Waiting for User Action\""); WriteLiteral(">\r\n"); - #line 978 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 983 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 978 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 983 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.WaitingForUserAction(Model.Job.Id, null, true))) { @@ -3599,14 +3624,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 980 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 985 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 980 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 985 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3623,7 +3648,7 @@ WriteLiteral(" class=\"block\""); WriteLiteral(">\r\n

\r\n"); - #line 985 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 990 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3658,7 +3683,7 @@ WriteLiteral(">\r\n $(function () {\r\n " });\r\n \r\n"); - #line 1018 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1023 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3667,7 +3692,7 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral(" "); - #line 1019 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1024 "..\..\Views\Job\JobParts\_Subject.cshtml" if (Model.Job.CanNotWaitingForUserAction()) { @@ -3695,13 +3720,13 @@ WriteLiteral(" title=\"Not Waiting for User Action\""); WriteLiteral(">\r\n"); - #line 1023 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1028 "..\..\Views\Job\JobParts\_Subject.cshtml" #line default #line hidden - #line 1023 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1028 "..\..\Views\Job\JobParts\_Subject.cshtml" using (Html.BeginForm(MVC.API.Job.NotWaitingForUserAction(Model.Job.Id, null, true))) { @@ -3709,14 +3734,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 1025 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1030 "..\..\Views\Job\JobParts\_Subject.cshtml" Write(Html.AntiForgeryToken()); #line default #line hidden - #line 1025 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1030 "..\..\Views\Job\JobParts\_Subject.cshtml" @@ -3733,7 +3758,7 @@ WriteLiteral(" class=\"block\""); WriteLiteral(">\r\n

\r\n"); - #line 1030 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1035 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3769,7 +3794,7 @@ WriteLiteral(">\r\n $(function () {\r\n " });\r\n \r\n"); - #line 1064 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1069 "..\..\Views\Job\JobParts\_Subject.cshtml" } @@ -3778,7 +3803,7 @@ WriteLiteral(">\r\n $(function () {\r\n WriteLiteral("\r\n \r\n"); - #line 1067 "..\..\Views\Job\JobParts\_Subject.cshtml" + #line 1072 "..\..\Views\Job\JobParts\_Subject.cshtml" }