Ready to publish
Added new Email Template and new Modal form for expired TECNs. Updated Email Template and new Modal form for TECNs. Added more margin on all modal dialogs
This commit is contained in:
committed by
Tucker Chase (CSC FI SPS MESLEO)
parent
e19cb5fcda
commit
c4036471f7
@ -86,29 +86,47 @@
|
||||
|
||||
if (Model.IsTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress
|
||||
&& !Model.ExpirationProcessed && !Model.Converted
|
||||
&& !Model.LockedForConversion
|
||||
&& (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today))
|
||||
&& !Model.LockedForConversion)
|
||||
{
|
||||
ViewBag.CanResubmit = "true";
|
||||
<input type="button" value="Change Type" class="btn btn-primary btn-xs" id="ReSubmitDocument" disabled="disabled" />
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
if (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today)
|
||||
{
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="button" value="Return to Process" class="btn btn-primary btn-xs" id="ReturnToProcessDocument" />
|
||||
}
|
||||
}
|
||||
|
||||
else if (Model.IsTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress
|
||||
&& !Model.ExpirationProcessed
|
||||
&& Model.ConversionApprovalInProgress == false
|
||||
&& (Model.ExpirationDate >= DateTime.Today || Model.ExtensionDate >= DateTime.Today))
|
||||
&& Model.ConversionApprovalInProgress == false)
|
||||
{
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
if (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today)
|
||||
{
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="button" value="Return to Process" class="btn btn-primary btn-xs" id="ReturnToProcessDocument" />
|
||||
}
|
||||
}
|
||||
|
||||
else if (Model.IsEmergencyTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress
|
||||
&& !Model.ExpirationProcessed && !Model.Converted
|
||||
&& (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today))
|
||||
&& !Model.ExpirationProcessed && !Model.Converted)
|
||||
{
|
||||
ViewBag.CanResubmit = "true";
|
||||
<input type="button" value="Change Type" class="btn btn-primary btn-xs" id="ReSubmitDocument" disabled="disabled" />
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
if (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today)
|
||||
{
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="button" value="Return to Process" class="btn btn-primary btn-xs" id="ReturnToProcessDocument" />
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1251,6 +1269,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("_ECNCancel")
|
||||
@Html.Partial("_ECNReturnToProcess")
|
||||
|
||||
@Html.Partial("_ECNReassignOriginator")
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -2188,40 +2209,6 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#CancelDocument').on('click', function () {
|
||||
docType = 5;
|
||||
if (confirm("Are you sure you want to Cancel this document?")) {
|
||||
$.ajax({
|
||||
url: "/ECN/CancelDocument",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ecnNumber: $("#txtECNNumber").val(),
|
||||
currentStep: 1,
|
||||
documentType: docType,
|
||||
ecnTypeString: ecnTypeString
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
if (data == 'Redirect') {
|
||||
var url = '@Url.Action("ReadOnly", "ECN", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#txtECNNumber").val());
|
||||
|
||||
}
|
||||
else {
|
||||
// TODO alert an error message
|
||||
}
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed on Cancel" + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var returnNoOfDays = function () {
|
||||
//var start = new Date($('#txSubmitDate').val());
|
||||
var start = new Date();
|
||||
|
75
Fab2ApprovalSystem/Views/ECN/_ECNCancel.cshtml
Normal file
75
Fab2ApprovalSystem/Views/ECN/_ECNCancel.cshtml
Normal file
@ -0,0 +1,75 @@
|
||||
<div class="modal fade" id="Cancel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel"><center>Has the process returned to the original state?</center></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="row">
|
||||
<div class="col-sm-13">
|
||||
<h4 class="modal-title">Comments (Required):</h4>
|
||||
<textarea class="form-control" rows="5" id="comments" style="resize: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmCancel">Confirm Cancel (Yes)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#CancelDocument").click(function (e) {
|
||||
|
||||
$("#comments").val("");
|
||||
|
||||
$("#Cancel").modal('show');
|
||||
});
|
||||
|
||||
$('#ConfirmCancel').on('click', function () {
|
||||
|
||||
if ($("#comments").val() == "") {
|
||||
alert("Comments are required");
|
||||
return;
|
||||
}
|
||||
|
||||
$('#ConfirmCancel').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/ECN/CancelDocument",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ecnNumber: $("#txtECNNumber").val(),
|
||||
currentStep: 1,
|
||||
documentType: 5,
|
||||
ecnTypeString: ecnTypeString,
|
||||
comments: $("#comments").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
$("#Cancel").modal('hide');
|
||||
|
||||
var url = '@Url.Action("ReadOnly", "ECN", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#txtECNNumber").val());
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
$('#ConfirmCancel').attr("disabled", false);
|
||||
alert("Server error while canceling document");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
75
Fab2ApprovalSystem/Views/ECN/_ECNReturnToProcess.cshtml
Normal file
75
Fab2ApprovalSystem/Views/ECN/_ECNReturnToProcess.cshtml
Normal file
@ -0,0 +1,75 @@
|
||||
<div class="modal fade" id="ReturnToProcess" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel"><center>Has the process returned to the original state?</center></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="row">
|
||||
<div class="col-sm-13">
|
||||
<h4 class="modal-title">Comments (Required):</h4>
|
||||
<textarea class="form-control" rows="5" id="ReturnToProcessComments" style="resize: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReturnToProcess">Confirm Return to Process (Yes)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#ReturnToProcessDocument").click(function (e) {
|
||||
|
||||
$("#ReturnToProcessComments").val("");
|
||||
|
||||
$("#ReturnToProcess").modal('show');
|
||||
});
|
||||
|
||||
$('#ConfirmReturnToProcess').on('click', function () {
|
||||
|
||||
if ($("#ReturnToProcessComments").val() == "") {
|
||||
alert("Comments are required");
|
||||
return;
|
||||
}
|
||||
|
||||
$('#ConfirmReturnToProcess').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/ECN/CancelDocument",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ecnNumber: $("#txtECNNumber").val(),
|
||||
currentStep: 1,
|
||||
documentType: 5,
|
||||
ecnTypeString: ecnTypeString,
|
||||
comments: $("#ReturnToProcessComments").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
$("#ReturnToProcess").modal('hide');
|
||||
|
||||
var url = '@Url.Action("ReadOnly", "ECN", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#txtECNNumber").val());
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
$('#ConfirmReturnToProcess').attr("disabled", false);
|
||||
alert("Server error while ReturnToProcessing document");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user