Added HttpException class for missing HttpException for net8 Wrapped HttpContext.Session, GetJsonResult, IsAjaxRequest and GetUserIdentityName in controllers for net8 Added AuthenticationService to test Fab2ApprovalMKLink code for net8 Compile conditionally flags to debug in dotnet core
1015 lines
39 KiB
Plaintext
1015 lines
39 KiB
Plaintext
@model Fab2ApprovalSystem.Models.CCMeeting
|
|
@{
|
|
ViewBag.Title = "Meeting";
|
|
}
|
|
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
|
<style>
|
|
table {
|
|
border-spacing: 5px;
|
|
padding: 5px;
|
|
border-color: white;
|
|
}
|
|
</style>
|
|
|
|
<body onload="StartTimers();" onmousemove="ResetTimers();" onkeydown="ResetTimers();">
|
|
@using (Html.BeginForm())
|
|
{
|
|
<input type="hidden" id="txtMeetingID" value="@Model.MeetingID" />
|
|
if (Model.Status == 0)
|
|
{
|
|
<div data-spy="affix">
|
|
<div data-spy="affix" data-offset-top="0">
|
|
@*<input type="button" value="Save" class="btn btn-primary btn-xs" id="SaveMeeting" />*@
|
|
<input type="button" value="Back to PCRB" class="btn btn-primary btn-xs" id="BackToCC" />
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div data-spy="affix">
|
|
<div data-spy="affix" data-offset-top="0">
|
|
<input type="button" value="Back to PCRB" class="btn btn-primary btn-xs" id="BackToCC" />
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="panel panel-default center-block" style="font-size: 10px">
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-12 text-center">
|
|
<font style="color: crimson; font-size:24px;font-weight: bolder">
|
|
Meeting Summary (@(Model.Decision == -1 ? "Open": (Model.Decision == 0 ? "Closed- NotApproved" : "Closed-Approved")))
|
|
</font>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@*<div class="panel panel-default">
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-8">
|
|
<label class="control-label">Meeting List:</label>
|
|
@(Html.Kendo().DropDownList()
|
|
.Name("MeetingList")
|
|
.BindTo(new SelectList(ViewBag.MeetingList, "MeetingID", "MeetingInfo"))
|
|
.OptionLabel("Select")
|
|
.HtmlAttributes(new { style = "width: 300px; font-size:10px" })
|
|
)
|
|
<input type="button" value="Display MeetingInfo" class="btn btn-primary btn-xs" id="GetMeeting" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>*@
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-warning">
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Plan #:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.PlanNumber, "P" + "{0:0000}", new { id = "txtPlanNumber", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Title</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue;width:100%" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Change Level</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.ChangeLevel, new { id = "txtChangeLevel", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue;width:100%" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">PCRB</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@*@Html.TextBoxFor(model => model.PCRB, new { id = "txtPCRB", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })*@
|
|
@(Html.Kendo().MultiSelect()
|
|
.Name("PCRValueIDs")
|
|
.BindTo(new SelectList(ViewBag.PCRValues, "PCRValueID", "PCRValueName"))
|
|
.Value(ViewBag.Nothing)
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-sm-2">
|
|
<div class="row">
|
|
<div class="col-sm-3">
|
|
<label class="control-label pull-right">Meeting Date:</label>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
@Html.TextBoxFor(model => model.MeetingDate, "{0:MM/dd/yyy}", new { id = "txtMeetingDate", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-info">
|
|
<div class="pull-left">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Attendees
|
|
</font>
|
|
</h5>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CCMeetingAttendee>()
|
|
.Name("MeetingAttendees")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.MeetingID).Visible(false);
|
|
columns.Bound(a => a.AttendeeName).Width("300px");
|
|
columns.Bound(a => a.JobTitle).Width("100px");
|
|
columns.Bound(a => a.Location).Width("200px");
|
|
|
|
// columns.Command(c => c.Destroy()).Width("40px");
|
|
|
|
|
|
})
|
|
//.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
|
|
.Sortable()
|
|
.Scrollable()
|
|
.Resizable(resize => resize.Columns(true))
|
|
.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.MeetingID).DefaultValue(Model.MeetingID);
|
|
model.Field(a => a.JobTitle).Editable(false);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetMeetingAttendees", "ChangeControl", new { meetingID = Model.MeetingID }))
|
|
|
|
|
|
)
|
|
)
|
|
|
|
</div>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CCMeetingAttachment>()
|
|
.Name("MeetingAttachmentGrid")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.MeetingID).Visible(false);
|
|
columns.Bound(a => a.FileGUID).Visible(false);
|
|
columns.Bound(a => a.FileName).Width("100px");
|
|
columns.Bound(a => a.Title).Width("100px");
|
|
columns.Bound(a => a.UploadedByName).Width("50px").Title("Uploaded By");
|
|
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}").Width("50px").Title("Uploaded Date"); ;
|
|
//columns.Command(c => c.Edit()).Width("80px");
|
|
//columns.Command(c => c.Destroy()).Width("40px");
|
|
columns.Command(c => c.Custom("View Doc").Click("DownloadMeetingAttachment")).Width("40px");
|
|
//columns.Command(c => c.Custom("Upload Doc").Click("UploadMeetingAttachment")).Width("70px");
|
|
})
|
|
.Events(e => e.DataBound("onDataBoundAttachmentGrid"))
|
|
.Resizable(resize => resize.Columns(true))
|
|
.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
|
|
.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.MeetingID).DefaultValue(Model.MeetingID);
|
|
model.Field(a => a.UploadDateTime).Editable(false);
|
|
model.Field(a => a.UploadedByName).Editable(false);
|
|
model.Field(a => a.FileName).Editable(false);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetMeetingAttachments", "ChangeControl", new { meetingID = Model.MeetingID }))
|
|
.Create(create => create.Action("InsertMeetingAttachmentItemAttrib", "ChangeControl"))
|
|
//.Destroy(destroy => destroy.Action("DeleteMeetingAttachment", "ChangeControl"))
|
|
//.Update(update => update.Action("UpdateMeetingAttachmentAttrib", "ChangeControl"))
|
|
)
|
|
)
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-body bg-info">
|
|
<div class="pull-left">
|
|
<table>
|
|
<tr>
|
|
<td style="font-size: 14px; font-weight:bold">
|
|
Decisions:
|
|
</td>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
<input type="checkbox" id="chkApproved" name="Approved" value="Approved" disabled/> <label for="chkApproved"></label>Approved
|
|
</td>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
<input type="checkbox" id="chkNotApproved" name="Not Approved" value="Not Approved" disabled /><label for="chkNotApproved"></label>Not Approved
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CCDecisionSummary>()
|
|
.Name("DecisionSummary")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.DecisionNotes).ClientTemplate("#=changeNewLine(DecisionNotes)#").Width("500px"); ;
|
|
columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px");
|
|
columns.Bound(a => a.LotDispoLinks).ClientTemplate("#=buildLotDispoLinks(LotDispoLinks)#").Width("100px");
|
|
//columns.Command(c => c.Edit()).Width("80px");
|
|
//columns.Command(c => c.Destroy()).Width("40px");
|
|
columns.Command(c => c.Custom("Edit ECN-LotDispo Links").Click("EditECNLotDispoLinks")).Width("70px");
|
|
|
|
})
|
|
//.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.MeetingID).DefaultValue(Model.MeetingID);
|
|
model.Field(a => a.ECNLinks).Editable(false);
|
|
model.Field(a => a.LotDispoLinks).Editable(false);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetDecisionsSummaryList", "ChangeControl", new { meetingID = Model.MeetingID }))
|
|
//.Create(create => create.Action("InsertDecisionsSummary", "ChangeControl"))
|
|
//.Destroy(destroy => destroy.Action("DeleteDecisionsSummary", "ChangeControl"))
|
|
//.Update(update => update.Action("UpdateDecisionsSummary", "ChangeControl"))
|
|
)
|
|
)
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default" style="font-size: 11px">
|
|
<div class="panel-body bg-info">
|
|
<div class="pull-left">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Notes
|
|
</font>
|
|
</h5>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
@Html.TextAreaFor(model => model.Notes, 8, 50, new { id = "txtNotes", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue;width:100%;" })
|
|
<input type="button" value="Update Notes" class="btn btn-primary btn-xs" id="UpdateNotes" />
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default" style="font-size: 10px">
|
|
<div class="panel-body bg-info">
|
|
<div class="pull-left">
|
|
<h5>
|
|
<font style="color:crimson">
|
|
Action Items
|
|
</font>
|
|
</h5>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="panel-body bg-warning">
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CCMeetingActionItem>()
|
|
.Name("MeetingActionItems")
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(a => a.ID).Visible(false);
|
|
columns.Bound(a => a.MeetingID).Visible(false);
|
|
columns.Bound(a => a.ActionItemName).Width("300px");
|
|
columns.Bound(a => a.ResponsiblePerson).Width("100px");
|
|
columns.Bound(a => a.Gating).Width("50px");
|
|
columns.Bound(a => a.DueDate).Width("50px").Format("{0:MM/dd/yy}").Width("150px");
|
|
|
|
if (GlobalVars.IsAdminValueNotNull(Session))
|
|
columns.Command(c => c.Custom("Edit").Click("EditMeetingActionItem")).Width("70px");
|
|
|
|
//columns.Command(c => c.Destroy()).Width("40px");
|
|
|
|
|
|
})
|
|
|
|
.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.MeetingID).DefaultValue(Model.MeetingID);
|
|
})
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetMeetingActionItems", "ChangeControl", new { meetingID = Model.MeetingID }))
|
|
//.Create(create => create.Action("InsertMeetingActionItem", "ChangeControl"))
|
|
//.Destroy(destroy => destroy.Action("DeleteMeetingActionItem", "ChangeControl"))
|
|
//.Update(update => update.Action("UpdateMeetingActionItem", "ChangeControl"))
|
|
)
|
|
)
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
}
|
|
</body>
|
|
|
|
<div class="modal fade" id="WinAttachDocuments" 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">Select File:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-sm-8">
|
|
@(Html.Kendo().Upload()
|
|
.Name("files")
|
|
.Async(a => a
|
|
.Save("AttachSaveMeeting", "ChangeControl", new { planNumber = Model.PlanNumber, meetingID = Model.MeetingID })
|
|
.AutoUpload(true)
|
|
)
|
|
.Events(events => events.Success("RefreshAttachmentsGrid").Upload("UploadAdditionalData"))
|
|
|
|
.ShowFileList(false)
|
|
|
|
)
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="ECN_LotDispoLinkForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" style="width: 700px">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Add/Remove ECNs-Lot Disposition links:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<table>
|
|
<tr>
|
|
<td width="50%">
|
|
<table class="table-condensed" border="0" width="100%">
|
|
<tr>
|
|
<td width="100%" colspan="2">
|
|
<label for="txtECN">Enter ECN#:</label>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
@Html.TextBox("txtECN", null, new { @class = "k-textbox", style = "width:100%" })
|
|
</td>
|
|
<td>
|
|
<input width:100%" type="button" id='AddECN' value="Add ECN" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<select multiple id="lstECNs" style="height: 250px; width: 100%; font-family: Tahoma; border-color: lightgrey"></select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
<input type="button" id='RemoveECN' value="Remove ECN" />
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</td>
|
|
<td width="50%">
|
|
<table class="table-condensed" border="0" width="100%">
|
|
<tr>
|
|
<td width="100%" colspan="2">
|
|
<label for="txtLotDisposition">Enter Lot Disposition#:</label>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
@Html.TextBox("txtLotDisposition", null, new { @class = "k-textbox", style = "width:100%" })
|
|
</td>
|
|
<td>
|
|
<input width:100%" type="button" id='AddLotDispo' value="Add Lot Disposition" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<select multiple id="lstLotDisposition" style="height: 250px; width: 100%; font-family: Tahoma; border-color: lightgrey"></select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
<input type="button" id='RemoveLotDispo' value="Remove Lot Disposition" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-primary" id="SaveECNsLotDispos">OK</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="modal fade" id="MeetingActionItemForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" style="width: 700px">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Edit Meeting Action Items:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
|
|
<table class="table-condensed" border="0" width="100%">
|
|
<tr>
|
|
<td width="25%">
|
|
<label for="txtActionItem">Action Item:</label>
|
|
</td>
|
|
<td width="75%">
|
|
@Html.TextBox("txtActionItem", null, new { @class = "k-textbox", style = "width:100%", disabled = true })
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="25%">
|
|
<label for="txtResponsiblePerson">Re-assign Responsible Person:</label>
|
|
</td>
|
|
<td width="75%">
|
|
@(Html.Kendo().MultiSelect()
|
|
.Name("ResponsibleIDs")
|
|
.BindTo(new SelectList(ViewBag.AIResponsibles, "ResponsibleID", "ResponsibleName"))
|
|
.Value(ViewBag.Nothing)
|
|
.HtmlAttributes(new { style = "font-size:10px" })
|
|
)
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="25%">
|
|
<label for="txtComments">Re-assignment Comments: (Required)</label>
|
|
</td>
|
|
<td width="75%">
|
|
@Html.TextArea("txtComments", null, new { @class = "k-textbox", style = "width:100%;resize: none;", rows = 5 })
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-primary" id="SaveMeetingActionItem">OK</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="UpdateNotesWin" 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">Update Notes:</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea class="form-control" rows="5" id="UpdatedNotes"></textarea>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-primary" id="ConfirmUpdateNotes">OK</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
var summaryLinkID;
|
|
var actionItemID;
|
|
var actionItemOperation;
|
|
$(document).ready(function () {
|
|
|
|
if ("@Model.Decision" == 1)
|
|
$('#chkApproved').prop('checked', true);
|
|
else if ("@Model.Decision" == 0)
|
|
$('#chkNotApproved').prop('checked', true);
|
|
})
|
|
|
|
$("#SaveMeeting").on('click', function (e) {
|
|
e.preventDefault();
|
|
var data = ReturnModelObject();
|
|
|
|
$.ajax({
|
|
url: '/ChangeControl/EditMeeting',
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(data),
|
|
success: function (result) {
|
|
|
|
alert(result);
|
|
|
|
if (result != "Successfully Saved") {
|
|
var url = '@Url.Action("EditMeeting", "ChangeControl", new { meetingID = "__id__" })';
|
|
url = url.replace('amp;', '');
|
|
window.location.href = url.replace('__id__', "@Model.MeetingID");
|
|
}
|
|
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
alert("There was an error while saving the data.Please re-load the page and check if your changes were saved \n. If the changes were not saved please contact the system administrator");
|
|
}
|
|
|
|
})
|
|
|
|
return false;
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
function ReturnModelObject() {
|
|
|
|
var decision;
|
|
if ($('#chkApproved').is(":checked"))
|
|
decision = 1;
|
|
else if ($('#chkNotApproved').is(":checked"))
|
|
decision = 0;
|
|
else
|
|
decision = -1;
|
|
|
|
var objecData = {
|
|
MeetingID: "@Model.MeetingID",
|
|
PlanNumber: "@Model.PlanNumber",
|
|
PCRB: $("#txtPCRB").val(),
|
|
ChangeLevel: $("#txtChangeLevel").val(),
|
|
MeetingDate: $("#txtMeetingDate").val(),
|
|
Notes: $("#txtNotes").val(),
|
|
Decision: decision
|
|
}
|
|
|
|
return objecData;
|
|
}
|
|
|
|
|
|
$('#chkApproved').on('change', function () {
|
|
if ($('#chkApproved').is(":checked")) {
|
|
$('#chkNotApproved').prop('checked', false);
|
|
|
|
}
|
|
})
|
|
|
|
$('#chkNotApproved').on('change', function () {
|
|
if ($('#chkNotApproved').is(":checked")) {
|
|
$('#chkApproved').prop('checked', false);
|
|
|
|
}
|
|
})
|
|
|
|
|
|
|
|
function DownloadMeetingAttachment(e) {
|
|
e.preventDefault();
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
var fileGUID = dataItem.FileGUID;
|
|
var attachmentID = dataItem.AttachmentID;
|
|
|
|
if (fileGUID != null) {
|
|
window.location = '/ChangeControl/DownloadMeetingFile?fileGuid=' + fileGUID + '&planNumber=' + "@Model.PlanNumber";
|
|
}
|
|
else {
|
|
alert("There is no Attachment to display ")
|
|
}
|
|
}
|
|
|
|
|
|
function UploadMeetingAttachment(e) {
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
currentAttachmentID = dataItem.ID;
|
|
e.preventDefault();
|
|
$("#WinAttachDocuments").modal('show');
|
|
}
|
|
|
|
|
|
function RefreshAttachmentsGrid() {
|
|
var grid = $("#MeetingAttachmentGrid").data("kendoGrid");
|
|
grid.dataSource.read($("@Model.PlanNumber").val());
|
|
}
|
|
|
|
function UploadAdditionalData(e) {
|
|
e.data =
|
|
{
|
|
attachID: currentAttachmentID
|
|
}
|
|
}
|
|
|
|
|
|
function buildECNLinks(ECNs) {
|
|
var template = "";
|
|
if (ECNs != null) {
|
|
var tempValue = ECNs.split(',');
|
|
for (var i = 0; i < tempValue.length; i++) {
|
|
template += "<a href='/ECN/Edit?IssueID=" + tempValue[i] + "'> " + tempValue[i] + ",</a>" + " ";
|
|
}
|
|
|
|
}
|
|
return template;
|
|
|
|
}
|
|
|
|
function buildLotDispoLinks(lotDispos) {
|
|
var template = "";
|
|
if (lotDispos != null) {
|
|
var tempValue = lotDispos.split(',');
|
|
for (var i = 0; i < tempValue.length; i++) {
|
|
template += "<a href='/LotDisposition/Edit?IssueID=" + tempValue[i] + "'> " + tempValue[i] + ",</a>" + " ";
|
|
}
|
|
|
|
}
|
|
return template;
|
|
|
|
}
|
|
|
|
function EditECNLotDispoLinks(e) {
|
|
|
|
clearECNsLotDisposListBox();
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
summaryLinkID = dataItem.ID;
|
|
var ecnLinks = dataItem.ECNLinks;
|
|
var lotDispoLinks = dataItem.LotDispoLinks;
|
|
|
|
setECN_LDSelectedListBox(ecnLinks, lotDispoLinks);
|
|
|
|
$("#ECN_LotDispoLinkForm").modal('show');
|
|
|
|
e.preventDefault();
|
|
}
|
|
|
|
|
|
|
|
|
|
var clearECNsLotDisposListBox = function () {
|
|
$('#lstECNs').each(function () {
|
|
this.options.length = 0;
|
|
$(this)[0].options.length = 0;
|
|
});
|
|
|
|
$('#lstLotDisposition').each(function () {
|
|
this.options.length = 0;
|
|
$(this)[0].options.length = 0;
|
|
});
|
|
}
|
|
|
|
|
|
function setECN_LDSelectedListBox(ECNs, lotDispos) {
|
|
|
|
var innerHtml = '';
|
|
if (ECNs != null) {
|
|
var selectedECNs = ECNs.split(',');
|
|
for (i in selectedECNs) {
|
|
innerHtml += '<option value="' + selectedECNs[i].trim() + '">' + selectedECNs[i].trim() + '</option>';
|
|
}
|
|
$('#lstECNs').append(innerHtml);
|
|
}
|
|
|
|
if (lotDispos != null) {
|
|
var selectedLDs = lotDispos.split(',');
|
|
|
|
innerHtml = '';
|
|
for (i in selectedLDs) {
|
|
innerHtml += '<option value="' + selectedLDs[i].trim() + '">' + selectedLDs[i].trim() + '</option>';
|
|
}
|
|
$('#lstLotDisposition').append(innerHtml);
|
|
}
|
|
}
|
|
|
|
$("#AddECN").on('click', function () {
|
|
|
|
$('#lstECNs').append('<option value="' + $("#txtECN").val() + '">' + $("#txtECN").val() + '</option>');
|
|
})
|
|
|
|
$("#RemoveECN").on('click', function (e) {
|
|
|
|
e.preventDefault();
|
|
$("#lstECNs option:selected").remove();
|
|
})
|
|
|
|
$("#AddLotDispo").on('click', function () {
|
|
|
|
$('#lstLotDisposition').append('<option value="' + $("#txtLotDisposition").val() + '">' + $("#txtLotDisposition").val() + '</option>');
|
|
})
|
|
|
|
$("#RemoveLotDispo").on('click', function (e) {
|
|
|
|
e.preventDefault();
|
|
$("#lstLotDisposition option:selected").remove();
|
|
})
|
|
|
|
$("#SaveECNsLotDispos").on('click', function (e) {
|
|
e.preventDefault();
|
|
var ecns = "";
|
|
var lds = "";
|
|
|
|
$('#lstECNs option').each(function () {
|
|
if (ecns.length == 0)
|
|
ecns = this.value;
|
|
else
|
|
ecns += ', ' + this.value;
|
|
});
|
|
|
|
|
|
$('#lstLotDisposition option').each(function () {
|
|
if (lds.length == 0)
|
|
lds = this.value;
|
|
else
|
|
lds += ', ' + this.value;
|
|
});
|
|
|
|
var url = "/ChangeControl/UpdateECN_LotDispoLinks";
|
|
|
|
$.ajax({
|
|
url: url,
|
|
type: "POST",
|
|
datatype: "json",
|
|
data: {
|
|
id: summaryLinkID,
|
|
ecnLinks: ecns,
|
|
lotDispoLinks: lds
|
|
},
|
|
success: function (data) {
|
|
|
|
var grid = $("#DecisionSummary").data("kendoGrid");
|
|
grid.dataSource.read($("@Model.MeetingID").val());
|
|
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
}
|
|
});
|
|
|
|
|
|
$("#ECN_LotDispoLinkForm").modal('hide');
|
|
})
|
|
|
|
function clearMeetingForm() {
|
|
$("#txtActionItem").val('');
|
|
$("#txtResponsiblePerson").val('');
|
|
$("#txtComments").val('');
|
|
//$("#dropGating").data("kendoDropDownList").value("0");
|
|
//$("#txtDueDate").val('');
|
|
|
|
}
|
|
|
|
function EditMeetingActionItem(e) {
|
|
|
|
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
|
actionItemID = dataItem.ID;
|
|
|
|
clearMeetingForm();
|
|
$("#txtActionItem").val(dataItem.ActionItemName);
|
|
|
|
var temResponsible;
|
|
//alert(dataItem.ResponsiblePerson);
|
|
var data;
|
|
var dataArray;
|
|
|
|
$("#ResponsibleIDs").data("kendoMultiSelect").value("");
|
|
|
|
if (dataItem.ResponsibleID != null) {
|
|
temResponsible = dataItem.ResponsibleID.split(',');
|
|
var attValues = new Array();
|
|
}
|
|
|
|
$("#ResponsibleIDs").data("kendoMultiSelect").value(temResponsible);
|
|
|
|
actionItemOperation = 'Edit';
|
|
$("#MeetingActionItemForm").modal("show");
|
|
}
|
|
|
|
$("#SaveMeetingActionItem").on('click', function () {
|
|
|
|
if ($("#txtComments").val() == "") {
|
|
alert("Comments are required");
|
|
return;
|
|
}
|
|
|
|
var objectData = ReturnMeetingActionObject();
|
|
|
|
$.ajax({
|
|
url: "/ChangeControl/ReassignMeetingActionItemResponsiblePersons",
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(objectData),
|
|
success: function (data) {
|
|
var grid = $("#MeetingActionItems").data("kendoGrid");
|
|
grid.dataSource.read($("@Model.MeetingID").val());
|
|
$("#MeetingActionItemForm").modal("hide");
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
$("#MeetingActionItemForm").modal("hide");
|
|
}
|
|
});
|
|
|
|
|
|
})
|
|
|
|
function ReturnMeetingActionObject() {
|
|
|
|
var resp = $("#ResponsibleIDs").data("kendoMultiSelect").value()
|
|
resp = resp.join();
|
|
|
|
var objectData = {
|
|
meetingActionItemId: actionItemID,
|
|
newResponsiblePersonIDs: resp + ",",
|
|
comments: $("#txtComments").val(),
|
|
}
|
|
|
|
return objectData;
|
|
}
|
|
|
|
$("#BackToCC").on('click', function () {
|
|
|
|
window.location = '/ChangeControl/Edit?issueID=' + "@Model.PlanNumber";
|
|
|
|
})
|
|
|
|
|
|
$("#GetMeeting").on('click', function (e) {
|
|
|
|
e.preventDefault()
|
|
var meetingid = $("#MeetingList").data("kendoDropDownList").value();
|
|
window.location.href = "/ChangeControl/EditMeeting?meetingID=" + meetingid;
|
|
|
|
})
|
|
|
|
$("#CloseMeeting").on('click', function () {
|
|
|
|
if (confirm("Are you sure you want to close the Meeting")) {
|
|
|
|
var url = '/ChangeControl/CloseMeeting?meetingID=' + "@Model.MeetingID";
|
|
$.ajax({
|
|
url: url,
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
success: function (data) {
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
})
|
|
|
|
$("#CancelMeeting").on('click', function () {
|
|
|
|
if (confirm("Are you sure you want to cancel the Meeting")) {
|
|
|
|
var url = '/ChangeControl/CancelMeeting?meetingID=' + "@Model.MeetingID";
|
|
$.ajax({
|
|
url: url,
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
success: function (data) {
|
|
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
})
|
|
|
|
|
|
function onDataBoundAttachmentGrid() {
|
|
//Selects all edit buttons
|
|
var grid = $("#MeetingAttachmentGrid").data("kendoGrid");
|
|
var gridData = grid.dataSource.view();
|
|
|
|
for (var i = 0; i < gridData.length; i++) {
|
|
var currentUid = gridData[i].uid;
|
|
if (gridData[i].Title == 'Meeting Presentation (Required)') {
|
|
var currenRow = grid.table.find("tr[data-uid='" + currentUid + "']");
|
|
var editButton = $(currenRow).find(".k-grid-edit");
|
|
var deleteButton = $(currenRow).find(".k-grid-delete");
|
|
editButton.hide();
|
|
deleteButton.hide();
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
$('#UpdateNotes').on('click', function () {
|
|
$('#ConfirmUpdateNotes').attr("disabled", false);
|
|
$("#UpdatedNotes").val("");
|
|
$("#UpdateNotesWin").modal('show');
|
|
return false;
|
|
})
|
|
|
|
function changeNewLine(text) {
|
|
if (text != null) {
|
|
var regexp = new RegExp('\n', 'g');
|
|
return text.replace(regexp, '<br>');
|
|
}
|
|
else
|
|
return '';
|
|
}
|
|
|
|
$("#ConfirmUpdateNotes").on('click', function (e) {
|
|
|
|
var url = '/ChangeControl/UpdateMeetingNotes?meetingID=' + "@Model.MeetingID" + "¬es=" + $("#UpdatedNotes").val();
|
|
|
|
$.ajax({
|
|
url: url,
|
|
type: "POST",
|
|
contentType: "application/json; charset=utf-8",
|
|
success: function (data) {
|
|
var existingData = $("#txtNotes").val();
|
|
$("#txtNotes").val(existingData + "\n" + $("#UpdatedNotes").val());
|
|
$("#UpdateNotesWin").modal('hide');
|
|
},
|
|
error: function (result) {
|
|
alert("Failed " + result);
|
|
$("#UpdateNotesWin").modal('hide');
|
|
|
|
}
|
|
});
|
|
})
|
|
|
|
</script> |