Added ability to unlock Corrective Actions when locked for editing.

This commit is contained in:
Daniel Wathen 2023-03-02 11:54:50 -07:00
parent adad38b849
commit a2b2e04f1f
12 changed files with 382 additions and 265 deletions

Binary file not shown.

View File

@ -321,6 +321,25 @@ namespace Fab2ApprovalSystem.Controllers
return View(ca); return View(ca);
}
public void ReleaseLockOnDocumentAdmin(int issueID)
{
try
{
caDMO.ReleaseLockOnDocument(-1, issueID);
}
catch (Exception e)
{
try
{
Functions.WriteEvent(@User.Identity.Name + "\r\n ReleaseLockOnDocument CA\r\n" + issueID.ToString() + "\r\n" + e.Message, System.Diagnostics.EventLogEntryType.Error);
}
catch { }
caDMO.ReleaseLockOnDocument(-1, issueID);
}
} }
/// <summary> /// <summary>
/// ///

View File

@ -884,6 +884,7 @@ namespace Fab2ApprovalSystem.DMO
} }
} }
public IEnumerable<IssuesViewModel> GetECNList() public IEnumerable<IssuesViewModel> GetECNList()
{ {
var parameters = new DynamicParameters(); var parameters = new DynamicParameters();

View File

@ -213,6 +213,7 @@ namespace Fab2ApprovalSystem.Models
public DateTime? ApprovedDate { get; set; } public DateTime? ApprovedDate { get; set; }
public bool RecordLockIndicator { get; set; } public bool RecordLockIndicator { get; set; }
public int RecordLockedBy { get; set; } public int RecordLockedBy { get; set; }
public string RecordLockByName { get; set; }
public bool RecordLocked { get; set; } public bool RecordLocked { get; set; }
public DateTime RecordLockedDate { get; set; } public DateTime RecordLockedDate { get; set; }
public DateTime LastUpdateDate { get; set; } public DateTime LastUpdateDate { get; set; }

View File

@ -160,6 +160,32 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row">
<div class="col-sm-12">
<div class="control-group">
<div class="controls">
<div class="controls">
<label for="AssignDelegate">Assign Delegate?</label>
<input type="checkbox" name="AssignDelegate" id="AssignDelegate" value="false" onclick="toggleDelegate()" />
<p>*Please assign a delegate if this user will be assigned tasks while Out of Office.</p>
</div>
</div>
</div>
</div>
</div>
<br />
<div class="row hiddenDelegate" id="delegateLabel">
<div class="col-sm-12">
<div class="control-group">
<div class="controls">
<div class="controls">
<label for="CurrentUser">Delegate To:</label>
</div>
</div>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
@ -465,6 +491,10 @@
<script> <script>
function toggleDelegate() {
document.getElementById("delegateControl").classList.toggle("hiddenDelegate");
document.getElementById("delegateLabel").classList.toggle("hiddenDelegate");
}
function error_handler(e) { function error_handler(e) {
alert("Error during the operation"); alert("Error during the operation");
@ -577,10 +607,16 @@
$('#SaveOOOInfo').on('click', function () { $('#SaveOOOInfo').on('click', function () {
var bfound = false; var bfound = false;
//var currentDate = new Date(); //var currentDate = new Date();
var delegate = "";
var isChecked = $("#AssignDelegate").is(":checked");
if (userid == $("#DelegateTo").data("kendoDropDownList").value()) if (isChecked === true)
{ delegate = $("#DelegateTo").data("kendoDropDownList").value();
else
delegate = "0";
if (userid == delegate) {
alert('The OOO person cannot be same as the delegate to person'); alert('The OOO person cannot be same as the delegate to person');
return false; return false;
} }
@ -594,7 +630,7 @@
var tempCurrentDate = twoDigitMonth + "/" + fullDate.getDate() + "/" + fullDate.getFullYear(); var tempCurrentDate = twoDigitMonth + "/" + fullDate.getDate() + "/" + fullDate.getFullYear();
var arrCurrDate = tempCurrentDate.split('/'); var arrCurrDate = tempCurrentDate.split('/');
var currentDate = new Date(arrCurrDate[2], arrCurrDate[0] - 1, arrCurrDate[1]); var currentDate = new Date(arrCurrDate[2], arrCurrDate[0] - 1, arrCurrDate[1]);
if (!$("#txtStartDate").val() || !$("#txtEndDate").val()) { if (!$("#txtStartDate").val() || !$("#txtEndDate").val()) {
alert('Start or the End Date cannot be blank'); alert('Start or the End Date cannot be blank');
@ -615,7 +651,7 @@
return false; return false;
} }
if (endDate <= stDate) { if (endDate <= stDate) {
alert("The End Date should be greater than the Start Date "); alert("The End Date should be greater than the Start Date ");
@ -630,7 +666,7 @@
url: urlString, url: urlString,
data: { data: {
oooUserID: userid, oooUserID: userid,
delegatedTo: $("#DelegateTo").data("kendoDropDownList").value(), delegatedTo: delegate,
startDate: $("#txtStartDate").val(), startDate: $("#txtStartDate").val(),
endDate: $("#txtEndDate").val(), endDate: $("#txtEndDate").val(),
}, },

View File

@ -44,16 +44,64 @@
<div class="panel panel-default center-block" data-spy="affix"> <div class="panel panel-default center-block" data-spy="affix">
<input type="button" value="Back to CA List" class="btn btn-primary btn-xs" id="CAList" /> <input type="button" value="Back to CA List" class="btn btn-primary btn-xs" id="CAList" />
<input type="button" value="Section Approval Log" class="btn btn-primary btn-xs" id="ShowSectionApprovalLog" /> <input type="button" value="Section Approval Log" class="btn btn-primary btn-xs" id="ShowSectionApprovalLog" />
@if (Session[GlobalVars.IS_ADMIN] != null)
{
<input type="button" value="Unlock Document" class="btn btn-primary btn-xs" id="UnlockDocumentBtn" onclick="UnlockDocument()" />
}
</div> </div>
</div> </div>
<div class="panel panel-default center-block" style="font-size: 10px"> <div class="panel panel-default" style="font-size: 10px">
<div class="panel-body bg-warning"> <div class="panel-body bg-warning">
<div class="row"> <div class="row">
<div class="col-sm-12 text-center"> <div class="col-sm-4">
<font style="color: crimson; font-size:24px;font-weight: bolder"> <div class="row">
Corrective Action <div class="col-sm-3">
</font>
</div>
<div class="col-sm-3">
</div>
<div class="col-sm-6">
</div>
</div>
</div> </div>
<div class="col-sm-4 text-center">
<div class="row">
<div class="col-sm-12">
<font style="color: crimson; font-size:24px;font-weight: bolder">
Corrective Action
</font>
</div>
</div>
</div>
<div class="col-sm-4 text-right">
<div class="row">
<div class="col-sm-12">
<font style="color:crimson">
@if (Model.RecordLockByName == null)
{
<h4>
<font style="color:red">
Mode: [Readonly]
</font>
</h4>
}
else
{
<h4>
<font style="color:red">
Mode: [Readonly] - Locked for Editing by <font style="color: green; font-weight:bold; font-style:italic">@Model.RecordLockByName</font>
</font>
</h4>
}
</font>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -322,7 +370,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label">Affected Documents:</label> <label class="control-label">Affected Documents:</label>
<div class="col-sm-12"> <div class="col-sm-12">
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>() @(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
.Name("Attachments") .Name("Attachments")
@ -1241,285 +1289,285 @@
</div> </div>
</div>*@ </div>*@
@*<div class="panel panel-default"> @*<div class="panel panel-default">
<div class="panel-body bg-danger"> <div class="panel-body bg-danger">
<h5> <h5>
<font style="color: crimson; font-weight: bold"> <font style="color: crimson; font-weight: bold">
D4 D4
</font> </font>
<a class="btn btn-xs pull-right alert-info" id="SectionD4" role="button" data-toggle="collapse" href="#collapseSectionD4" aria-expanded="true" aria-controls="collapseSectionD4"> <a class="btn btn-xs pull-right alert-info" id="SectionD4" role="button" data-toggle="collapse" href="#collapseSectionD4" aria-expanded="true" aria-controls="collapseSectionD4">
Collapse Collapse
</a> </a>
</h5> </h5>
</div> </div>
<div class="collapse" id="collapseSectionD4"> <div class="collapse" id="collapseSectionD4">
<div class="panel-body bg-warning">
<div class="panel-body bg-warning"> <div class="panel-body bg-warning">
<label class="control-label ">D4 Completed:</label>
@Html.CheckBoxFor(model => model.D4Completed, new { disabled = "disabled" })
</div>
<div class="row">
<div class="col-sm-6"> <div class="panel-body bg-warning">
<div class="row"> <label class="control-label ">D4 Completed:</label>
<div class="col-sm-12"> @Html.CheckBoxFor(model => model.D4Completed, new { disabled = "disabled" })
<label class="control-label pull-left">Root Cause 1:</label> </div>
@Html.TextAreaFor(model => model.D4RootCause1, 5, 30, new { id = "txtD4RootCause1", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">
<label class="control-label pull-left">Root Cause 1:</label>
@Html.TextAreaFor(model => model.D4RootCause1, 5, 30, new { id = "txtD4RootCause1", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div>
</div>
<div class="row">
<div class="col-sm-12">
<label class="control-label pull-left">Root Cause 2:</label>
@Html.TextAreaFor(model => model.D4RootCause2, 5, 30, new { id = "txtD4RootCause2", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div>
</div>
<div class="row">
<div class="col-sm-12">
<label class="control-label pull-left">Root Cause 3:</label>
@Html.TextAreaFor(model => model.D4RootCause3, 5, 30, new { id = "txtD4RootCause3", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div>
</div>
<div class="row">
<div class="col-sm-12">
<label class="control-label pull-left">Root Cause4:</label>
@Html.TextAreaFor(model => model.D4RootCause4, 5, 30, new { id = "txtD4RootCause4", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-sm-12"> <div class="col-sm-6" style="font-size: 10px">
<label class="control-label pull-left">Root Cause 2:</label> <div class="row">
@Html.TextAreaFor(model => model.D4RootCause2, 5, 30, new { id = "txtD4RootCause2", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div> <div class="col-sm-12">
</div>
<div class="row">
<div class="col-sm-12">
<label class="control-label pull-left">Root Cause 3:</label> @(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
@Html.TextAreaFor(model => model.D4RootCause3, 5, 30, new { id = "txtD4RootCause3", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" }) .Name("D4Attachments")
</div> .Columns(columns =>
</div> {
<div class="row"> columns.Bound(a => a.ID).Visible(false);
<div class="col-sm-12"> columns.Bound(a => a.CANo).Visible(false);
<label class="control-label pull-left">Root Cause4:</label> columns.Bound(a => a.FileGUID).Visible(false);
@Html.TextAreaFor(model => model.D4RootCause4, 5, 30, new { id = "txtD4RootCause4", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" }) columns.Bound(a => a.FileName);
columns.Bound(a => a.UploadedByName);
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
columns.Command(command => command.Custom("View").Click("DownloadCAAttachment"));
})
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 10px" })
.DataSource(dataSource => dataSource
.Ajax()
//.Batch(false)
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(p => p.ID);
})
.PageSize(50)
.Read(read => read.Action("GetD4AttachmentList", "CorrectiveAction", new { caNO = Model.CANo }))
)
)
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<div class="col-sm-6" style="font-size: 10px"> </div>
<div class="row">
<div class="col-sm-12"> //D5-D6 =============================================================================
<div class="panel panel-default">
<div class="panel-body bg-danger">
<h5>
<font style="color: crimson; font-weight: bold">
Corrective Action D5/D6
</font>
<a class="btn btn-xs pull-right alert-info" id="SectionD5D6" role="button" data-toggle="collapse" href="#collapseSectionD5D6" aria-expanded="true" aria-controls="collapseSectionD5D6">
Collapse
</a>
</h5>
</div>
<div class="collapse" id="collapseSectionD5D6">
<div class="panel-body bg-warning">
<table>
<tr>
<td>
<label class="control-label ">D5 Completed:</label>
@Html.CheckBoxFor(model => model.D5Completed, new { disabled = "disabled" })
</td>
<td>
<label class="control-label ">D6 Validated:</label>
@Html.CheckBoxFor(model => model.D6Validated, new { disabled = "disabled" })
</td>
</tr>
</table>
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>() </div>
.Name("D4Attachments") <div class="panel-body bg-warning">
.Columns(columns =>
{
columns.Bound(a => a.ID).Visible(false);
columns.Bound(a => a.CANo).Visible(false);
columns.Bound(a => a.FileGUID).Visible(false);
columns.Bound(a => a.FileName);
columns.Bound(a => a.UploadedByName);
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
columns.Command(command => command.Custom("View").Click("DownloadCAAttachment"));
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.D5D6CorrectivetAction>()
.Name("D5D6CorrectivetActions")
.Columns(columns =>
{
columns.Bound(a => a.ID).Visible(false);
columns.Bound(a => a.ResponsibilityOwnerID).Visible(false);
columns.Bound(a => a.ImprovementID).Visible(false);
columns.Bound(a => a.CorrectiveAction).Width("500px");
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px");
columns.Bound(a => a.CARequired).Width("50px").Title("Choose");
columns.Bound(a => a.Result).Width("100px");
columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px");
columns.Bound(a => a.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, CANo)#").Width("100px");
columns.Bound(a => a.ResponsibilityOwnerName).Width("100px");
columns.Bound(a => a.ECD).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
columns.Bound(a => a.ImplementedDate).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
columns.Bound(a => a.Improvement).Width("150px").Format("{0:MM/dd/yy hh:mm:ss}");
}) })
//.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
.Resizable(resize => resize.Columns(true))
.Sortable() .Sortable()
.Scrollable() .Scrollable()
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 10px" }) .HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" })
.DataSource(dataSource => dataSource .DataSource(dataSource => dataSource
.Ajax() .Ajax()
//.Batch(false) //.Batch(false)
.ServerOperation(false) .ServerOperation(false)
.Events(events => events.Error("error_handler")) .Model(model =>
.Model(model => {
{ model.Id(p => p.ID);
model.Id(p => p.ID); model.Field(a => a.CANo).DefaultValue(Model.CANo);
})
.PageSize(50)
.Read(read => read.Action("GetD4AttachmentList", "CorrectiveAction", new { caNO = Model.CANo }))
)
) })
</div> .PageSize(50)
.Read(read => read.Action("GetD5D6CorrectivetActionList", "CorrectiveAction", new { caNo = Model.CANo }))
</div> )
</div> )
</div> </div>
</div> </div>
</div> </div>
</div>
//D5-D6 =============================================================================
<div class="panel panel-default">
<div class="panel-body bg-danger">
<h5>
<font style="color: crimson; font-weight: bold">
Corrective Action D5/D6
</font>
<a class="btn btn-xs pull-right alert-info" id="SectionD5D6" role="button" data-toggle="collapse" href="#collapseSectionD5D6" aria-expanded="true" aria-controls="collapseSectionD5D6">
Collapse
</a>
</h5>
</div>
<div class="collapse" id="collapseSectionD5D6">
<div class="panel-body bg-warning">
<table>
<tr>
<td>
<label class="control-label ">D5 Completed:</label>
@Html.CheckBoxFor(model => model.D5Completed, new { disabled = "disabled" })
</td>
<td>
<label class="control-label ">D6 Validated:</label>
@Html.CheckBoxFor(model => model.D6Validated, new { disabled = "disabled" })
</td>
</tr>
</table>
//D7 =============================================================================
<div class="panel panel-default">
<div class="panel-body bg-danger">
<h5>
<font style="color: crimson; font-weight: bold">
Preventive Action D7
</font>
<a class="btn btn-xs pull-right alert-info" id="SectionD7" role="button" data-toggle="collapse" href="#collapseSectionD7" aria-expanded="true" aria-controls="collapseSectionD7">
Collapse
</a>
</h5>
</div> </div>
<div class="panel-body bg-warning"> <div class="collapse" id="collapseSectionD7">
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.D5D6CorrectivetAction>()
.Name("D5D6CorrectivetActions") <div class="panel-body bg-warning">
<label class="control-label ">D7 Completed:</label>
@Html.CheckBoxFor(model => model.D7Completed, new { disabled = "disabled" })
</div>
<div class="panel-body bg-warning">
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.D7PreventiveAction>()
.Name("D7PreventiveActions")
.Columns(columns => .Columns(columns =>
{ {
columns.Bound(a => a.ID).Visible(false); columns.Bound(a => a.ID).Visible(false);
columns.Bound(a => a.ResponsibilityOwnerID).Visible(false); columns.Bound(a => a.ResponsibilityOwnerID).Visible(false);
columns.Bound(a => a.ImprovementID).Visible(false); columns.Bound(a => a.PreventiveAction).Width("250px");
columns.Bound(a => a.CorrectiveAction).Width("500px");
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px"); columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px");
columns.Bound(a => a.CARequired).Width("50px").Title("Choose");
columns.Bound(a => a.Result).Width("100px"); columns.Bound(a => a.Result).Width("100px");
columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px"); columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px");
columns.Bound(a => a.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, CANo)#").Width("100px"); columns.Bound(a => a.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, CANo)#").Width("100px");
columns.Bound(a => a.ResponsibilityOwnerName).Width("100px"); columns.Bound(a => a.ResponsibilityOwnerName).Width("100px");
columns.Bound(a => a.ECD).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}"); columns.Bound(a => a.ECD).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
columns.Bound(a => a.ImplementedDate).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}"); columns.Bound(a => a.ImplementedDate).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
columns.Bound(a => a.Improvement).Width("150px").Format("{0:MM/dd/yy hh:mm:ss}");
}) })
//.ToolBar(toolbar => toolbar.Create().Text("Add Item")) //.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
.Resizable(resize => resize.Columns(true)) .Resizable(resize => resize.Columns(true))
.Sortable() .Sortable()
.Scrollable() .Scrollable()
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" }) .HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" })
.DataSource(dataSource => dataSource .DataSource(dataSource => dataSource
.Ajax() .Ajax()
//.Batch(false) //.Batch(false)
.ServerOperation(false) .ServerOperation(false)
.Model(model => .Model(model =>
{ {
model.Id(p => p.ID); model.Id(p => p.ID);
model.Field(a => a.CANo).DefaultValue(Model.CANo); model.Field(a => a.CANo).DefaultValue(Model.CANo);
}) })
.PageSize(50) .PageSize(50)
.Read(read => read.Action("GetD5D6CorrectivetActionList", "CorrectiveAction", new { caNo = Model.CANo })) .Read(read => read.Action("GetD7PreventiveActionList", "CorrectiveAction", new { caNo = Model.CANo }))
) )
) )
</div> </div>
</div>
</div>
//D7 =============================================================================
<div class="panel panel-default">
<div class="panel-body bg-danger">
<h5>
<font style="color: crimson; font-weight: bold">
Preventive Action D7
</font>
<a class="btn btn-xs pull-right alert-info" id="SectionD7" role="button" data-toggle="collapse" href="#collapseSectionD7" aria-expanded="true" aria-controls="collapseSectionD7">
Collapse
</a>
</h5>
</div>
<div class="collapse" id="collapseSectionD7">
<div class="panel-body bg-warning">
<label class="control-label ">D7 Completed:</label>
@Html.CheckBoxFor(model => model.D7Completed, new { disabled = "disabled" })
</div> </div>
<div class="panel-body bg-warning">
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.D7PreventiveAction>()
.Name("D7PreventiveActions")
.Columns(columns =>
{
columns.Bound(a => a.ID).Visible(false);
columns.Bound(a => a.ResponsibilityOwnerID).Visible(false);
columns.Bound(a => a.PreventiveAction).Width("250px");
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px");
columns.Bound(a => a.Result).Width("100px");
columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px");
columns.Bound(a => a.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, CANo)#").Width("100px");
columns.Bound(a => a.ResponsibilityOwnerName).Width("100px");
columns.Bound(a => a.ECD).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
columns.Bound(a => a.ImplementedDate).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
})
//.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
.Resizable(resize => resize.Columns(true))
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" })
.DataSource(dataSource => dataSource
.Ajax()
//.Batch(false)
.ServerOperation(false)
.Model(model =>
{
model.Id(p => p.ID);
model.Field(a => a.CANo).DefaultValue(Model.CANo);
})
.PageSize(50)
.Read(read => read.Action("GetD7PreventiveActionList", "CorrectiveAction", new { caNo = Model.CANo }))
)
)
</div>
</div> </div>
<div class="panel panel-default">
</div> <div class="panel-body bg-danger">
<div class="panel panel-default"> <h5>
<div class="panel-body bg-danger"> <font style="color: crimson; font-weight: bold">
<h5> D8
<font style="color: crimson; font-weight: bold"> </font>
D8 <a class="btn btn-xs pull-right alert-info" id="SectionD8" role="button" data-toggle="collapse" href="#collapseSectionD8" aria-expanded="true" aria-controls="collapseSectionD8">
</font> Collapse
<a class="btn btn-xs pull-right alert-info" id="SectionD8" role="button" data-toggle="collapse" href="#collapseSectionD8" aria-expanded="true" aria-controls="collapseSectionD8"> </a>
Collapse </h5>
</a>
</h5>
</div>
<div class="collapse" id="collapseSectionD8">
<div class="panel-body bg-warning">
<label class="control-label ">D8 Completed:</label>
@Html.CheckBoxFor(model => model.D8Completed, new { disabled = "disabled" })
</div> </div>
<div class="collapse" id="collapseSectionD8">
<div class="panel-body bg-warning">
<div class="row">
<div class="col-sm-6 text-left">
<font style="color: black; font-size:12px;font-weight: bolder">
How we recognized the team:
</font>
@Html.TextAreaFor(model => model.D8TeamRecognition, 3, 100, new { id = "txtD8TeamRecognition", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div>
<div class="col-sm-6"> <div class="panel-body bg-warning">
<font style="color: black; font-size:12px;font-weight: bolder"> <label class="control-label ">D8 Completed:</label>
Lessons Leanred: @Html.CheckBoxFor(model => model.D8Completed, new { disabled = "disabled" })
</font>
@Html.TextAreaFor(model => model.D8LessonsLearned, 3, 100, new { id = "txtD8LessonsLearned", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div>
</div> </div>
<div class="panel-body bg-warning">
<div class="row">
<div class="col-sm-6 text-left">
<font style="color: black; font-size:12px;font-weight: bolder">
How we recognized the team:
</font>
@Html.TextAreaFor(model => model.D8TeamRecognition, 3, 100, new { id = "txtD8TeamRecognition", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div>
<div class="col-sm-6">
<font style="color: black; font-size:12px;font-weight: bolder">
Lessons Leanred:
</font>
@Html.TextAreaFor(model => model.D8LessonsLearned, 3, 100, new { id = "txtD8LessonsLearned", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
</div>
</div>
</div>
</div> </div>
</div> </div>*@
</div>*@
<div class="panel panel-default" style="font-size: 10px"> <div class="panel panel-default" style="font-size: 10px">
@if (Model.ApprovalStatus != 0) @if (Model.ApprovalStatus != 0)
@ -1559,7 +1607,6 @@
) )
.Resizable(resize => resize.Columns(true)) .Resizable(resize => resize.Columns(true))
) )
} }
@ -1579,15 +1626,15 @@
<div class="modal fade" id="SectionApprovalLog" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static"> <div class="modal fade" id="SectionApprovalLog" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header" style="background-color: #e4daa1; font-size: 15px;"> <div class="modal-header" style="background-color: #e4daa1; font-size: 15px;">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">Section Approval Log:</h4> <h4 class="modal-title" id="myModalLabel">Section Approval Log:</h4>
</div> </div>
<div class="modal-body" id="SectionApprovalLogContainer" style="background-color: #75adc6; font-size: 12px;"> <div class="modal-body" id="SectionApprovalLogContainer" style="background-color: #75adc6; font-size: 12px;">
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CASectionApproval>() @(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CASectionApproval>()
.Name("SectionApprovalList") .Name("SectionApprovalList")
.Columns(columns => .Columns(columns =>
{ {
@ -1617,13 +1664,13 @@
) )
</div> </div>
<div class="modal-footer" style="background-color: #e4daa1; font-size: 15px;"> <div class="modal-footer" style="background-color: #e4daa1; font-size: 15px;">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
</body> </body>
@ -1656,7 +1703,7 @@
}) })
$("#CAList").on('click', function () { $("#CAList").on('click', function () {
var url = '@Url.Action("CorrectiveActionList", "Home")'; var url = '@Url.Action("CorrectiveActionList", "Home")';
@ -1681,7 +1728,25 @@
} }
function UnlockDocument() {
$.ajax({
url: "/CorrectiveAction/ReleaseLockOnDocumentAdmin",
type: "GET",
datatype: "json",
data: {
issueID: ("@Model.CANo")
},
success: function () {
alert('Document Unlocked!');
var url = '@Url.Action("ReadOnlyCA", "CorrectiveAction", new { caNo = "__id__" })';
url = url.replace('amp;', '');
window.location.href = url.replace('__id__', @Model.CANo);
},
error: function (result) {
alert("ReleaseLockOnDocument - Failed " + result);
}
});
}
@ -1699,7 +1764,7 @@
} }
} }
@ -1783,7 +1848,7 @@
}) })
</script> </script>

View File

@ -153,10 +153,10 @@
<div class="col-sm-6"> <div class="col-sm-6">
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", style = "width:100%" }) @Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", style = "width:100%" })
</div> </div>
<div class="col-sm-6 col-sm-offset-4" style="color:red;"> <div class="col-sm-6 col-sm-offset-4" style="color: red;">
*(DO NOT USE Rev I, O, Q, S, X, and Z) *(DO NOT USE Rev I, O, Q, S, X, and Z)
</div> </div>
<div class="col-sm-6 col-sm-offset-4" style="color:red;"> <div class="col-sm-6 col-sm-offset-4" style="color: red;">
Revision Y is followed by AA. YY is followed by AAA Revision Y is followed by AA. YY is followed by AAA
</div> </div>
</div> </div>
@ -170,7 +170,7 @@
.Value(ViewBag.Nothing) .Value(ViewBag.Nothing)
) )
</div> </div>
<div class="col-sm-6" style="left:40%;color:red;"> <div class="col-sm-6 col-sm-offset-4" style="color:red;">
Add minimum of Quality, Si Production, and Dept Specfic Add minimum of Quality, Si Production, and Dept Specfic
</div> </div>
</div> </div>

View File

@ -371,17 +371,12 @@
var delegate = ""; var delegate = "";
var isChecked = $("#AssignDelegate").is(":checked"); var isChecked = $("#AssignDelegate").is(":checked");
console.log(isChecked);
if (isChecked === true) if (isChecked === true)
delegate = $("#DelegateTo").data("kendoDropDownList").value(); delegate = $("#DelegateTo").data("kendoDropDownList").value();
else else
delegate = "0"; delegate = "0";
console.log(delegate);
if (userid == delegate) if (userid == delegate)
{ {
alert('The OOO person cannot be same as the delegate to person'); alert('The OOO person cannot be same as the delegate to person');