initial add

This commit is contained in:
Jonathan Ouellette
2022-09-27 14:10:30 -07:00
parent 91fd8a50a9
commit 580e90f6a2
3941 changed files with 954648 additions and 19 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
@model DateTime?
@(Html.Kendo().DatePicker()
.Name("DueDate")
.Value(Model == null ? DateTime.Now : @Model)
.Format("M/d/yyyy")
)

View File

@ -0,0 +1,787 @@
@model Fab2ApprovalSystem.ViewModels.ChangeControlViewModel
@{
ViewBag.Title = "Edit";
}
<style>
table {
border-spacing: 5px;
padding: 5px;
border-color: white;
}
</style>
<script src="~/Scripts/common.js"> </script>
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
<body>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div>
<div class="panel panel-default center-block" data-spy="affix">
<input type="button" value="Back to PCRB List" class="btn btn-primary btn-xs" id="PCRBList" />
</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-4">
<div class="row">
<div class="col-sm-3">
</div>
<div class="col-sm-3">
</div>
<div class="col-sm-6">
</div>
</div>
</div>
<div class="col-sm-4 text-center">
<div class="row">
<div class="col-sm-12 center-block">
<font style="color: crimson; font-size:24px;font-weight: bolder">
Change Control @(Model.Status == 0 ? "" : " (Closed)")
</font>
</div>
</div>
</div>
<div class="col-sm-4">
<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 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 class="col-sm-2 pull-right" style="color:crimson; font-weight:bold">
@(Model.Status == 1 ? "Completed Date:" + Model.ClosedDate.Value.ToString("MM/dd/yyyy") : (Model.Status == 2 ? "Cancelled Date:" + Model.ClosedDate.Value.ToString("MM/dd/yyyy") : ""))
</div>
<div class="col-sm-2 pull-right" style="color:crimson; font-weight:bold">
Status: @(Model.Status == 0 ? "NA" : (Model.Status == 1 ? "Completed" : "Cancelled"))
</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">Owner:</label>
</div>
<div class="col-sm-9">
@Html.TextBoxFor(model => model.OwnerName, new { id = "txtOwner", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
@if (Session[GlobalVars.IS_ADMIN] != null)
{
<a href="javascript:undefined" id="lnkReassignOwner" class="linkbutton edit" title="Re-assign Owner"></a>
}
</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="form-control-static col-sm-9">
@(Html.Kendo().DropDownList()
.Name("ChangeLevel")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>()
{
new SelectListItem()
{
Text = "Select",
Value = "-1"
},
new SelectListItem()
{
Text = "1",
Value = "1"
},
new SelectListItem()
{
Text = "2",
Value = "2"
}
,
new SelectListItem()
{
Text = "3",
Value = "3"
}
}
)
.Value(Model.ChangeLevel.ToString())
)
</div>
</div>
</div>
<div class="col-sm-2">
<div class="row">
<div class="col-sm-3">
<label class="control-label pull-right">Export Control:</label>
</div>
<div class="col-sm-9">
@(Html.Kendo().DropDownList()
.Name("IsITAR")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>()
{
new SelectListItem()
{
Text = "Select",
Value = "-1"
},
new SelectListItem()
{
Text = "Yes",
Value = "1"
},
new SelectListItem()
{
Text = "No",
Value = "0"
}
}
)
.Value(Model.IsITAR.ToString())
)
</div>
</div>
</div>
</div>
</div>
</div>
<table class="table-condensed" style="width: 100%; font-size: 10px; border-color: lightgrey;">
<tbody>
<tr>
<td>
<div class="panel panel-default" style="font-size: 10px">
<div class="panel-info" style="font-size: 11px">
<div class="panel-heading">
<h5 style="font-weight:600">Description of Change</h5>
</div>
</div>
<div class="panel-body bg-warning">
<div class="form-horizontal col-sm-12">
@Html.TextAreaFor(model => model.ReasonForChange, 15, 30, new { id = "txtReasonForChange", @class = "form-control", Readonly = "Readonly", style = "background-color:lightblue; font-size: 11px;width: 100%;" })
</div>
</div>
</div>
</td>
<td>
<div class="panel panel-default" style="font-size: 10px">
<div class="panel-info" style="font-size: 11px">
<div class="panel-heading">
<h5 style="font-weight:600">Reason For Change</h5>
</div>
</div>
<div class="panel-body bg-warning">
<div class="form-horizontal col-sm-12">
@Html.TextAreaFor(model => model.ChangeDescription, 15, 30, new { id = "txtChangeDescription", @class = "form-control", Readonly = "Readonly", style = "background-color:lightblue; font-size: 11px;width: 100%;" })
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table-condensed" style="width: 100%; font-size: 10px; background-color:#95c7c3; border-color: lightgrey; " border="1" cellpadding="1">
<tbody>
<tr style="background-color:#e5e0e0">
<td width="10%" style="font-weight:bold">
</td>
<td>
<div class="panel-info" style="font-size: 11px">
<div class="panel-heading">
<h5 style="font-weight:600">Affected by Change</h5>
</div>
</div>
</td>
</tr>
<tr>
<td bgcolor="e5e0e0" width="10%">
<div class="panel-body bg-success">
Generations
</div>
</td>
<td width="80%">
@(Html.Kendo().MultiSelect()
.Name("GenerationIDs")
.BindTo(new SelectList(ViewBag.Generations, "GenerationID", "Generation"))
.Value(ViewBag.Nothing)
)
</td>
@*<td width="10%">
<button class="btn btn-warning btn-xs" data-toggle="modal" id="editGens" style="font-size:x-small">
Edit
</button>
</td>*@
</tr>
<tr>
<td bgcolor="e5e0e0" width="10%">
<div class="panel-body bg-success">
Notes:
</div>
</td>
<td width="80%">
@Html.TextAreaFor(model => model.Notes, 5, 50, new { id = "txtNotes", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue; width:100%;" })
</td>
</tr>
<tr>
<td bgcolor="e5e0e0" width="10%">
<div class="panel-body bg-success">
Part Numbers
</div>
</td>
<td width="80%">
<table width="100%">
<tr>
<td>
@*<table width="100%" border="0">
<tr>
<td>
Medical(A5)
</td>
<td>
@(Html.Kendo().DropDownList()
.Name("IsMedical")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>()
{
new SelectListItem()
{
Text = "Select",
Value = "-1"
},
new SelectListItem()
{
Text = "Yes",
Value = "1"
},
new SelectListItem()
{
Text = "No",
Value = "0"
}
}
)
.Value(Model.IsMedical.ToString())
)
</td>
</tr>
<tr>
<td>
Radhard(A6)
</td>
<td>
@(Html.Kendo().DropDownList()
.Name("IsRadHard")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>()
{
new SelectListItem()
{
Text = "Select",
Value = "-1"
},
new SelectListItem()
{
Text = "Yes",
Value = "1"
},
new SelectListItem()
{
Text = "No",
Value = "0"
}
}
)
.Value(Model.IsRadHard.ToString())
)
</td>
</tr>
<tr>
<td>
Automotive(A3/A4)
</td>
<td>
@(Html.Kendo().DropDownList()
.Name("IsAutomotive")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>()
{
new SelectListItem()
{
Text = "Select",
Value = "-1"
},
new SelectListItem()
{
Text = "Yes",
Value = "1"
},
new SelectListItem()
{
Text = "No",
Value = "0"
}
}
)
.Value(Model.IsAutomotive.ToString())
)
</td>
</tr>
</table>*@
</td>
<td>
<table width="100%">
<tr>
<td>
<div class="panel-body bg-success">
Part Numbers List
</div>
</td>
</tr>
<tr>
<td>
@Html.TextAreaFor(model => model.PartNumbers, 5, 50, new { id = "txtPartNumber", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue; width:100%; height=100%" })
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="e5e0e0" width="10%">
<div class="panel-body bg-success">
Tool Type
</div>
</td>
<td width="80%">
@Html.TextAreaFor(model => model.ToolTypes, 5, 50, new { id = "txtToolTypes", @class = "k-textbox", Readonly = "Readonly",style = "background-color:lightblue; width:100%;" })
</td>
@*<td width="10%">
<button class="btn btn-warning btn-xs" data-toggle="modal" id="editToolTypes" style="font-size:x-small">
Edit
</button>
</td>*@
</tr>
<tr>
<td bgcolor="e5e0e0" width="10%">
<div class="panel-body bg-success">
Processes
</div>
</td>
<td width="80%">
@(Html.Kendo().MultiSelect()
.Name("ProcessIDs")
.BindTo(new SelectList(ViewBag.Processes, "ProcessID", "Process"))
.Value(ViewBag.Nothing)
)
</td>
@*<td width="10%">
<button class="btn btn-warning btn-xs" data-toggle="modal" id="editProcesses" style="font-size:x-small">
Edit
</button>
</td>*@
</tr>
<tr>
<td bgcolor="e5e0e0" width="10%">
<div class="panel-body bg-success">
Logistics
</div>
</td>
<td width="80%">
@(Html.Kendo().MultiSelect()
.Name("LogisticsIDs")
.BindTo(new SelectList(ViewBag.Logistics, "LogisticsID", "Logistics"))
.Value(ViewBag.Nothing)
)
</td>
@*<td width="10%">
<button class="btn btn-warning btn-xs" data-toggle="modal" id="editLogistics" style="font-size:x-small">
Edit
</button>
</td>*@
</tr>
</tbody>
</table>
<div class="panel panel-default" style="font-size: 10px">
<div class="panel-body bg-info">
<div class="pull-left">
<h5>
<font style="color:crimson">
Documents Attachments
</font>
</h5>
</div>
</div>
<div class="panel-body bg-warning">
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CCAttachment>()
.Name("ChangeControlAttachmentGrid")
.Columns(columns =>
{
columns.Bound(a => a.ID).Visible(false);
columns.Bound(a => a.FileGUID).Visible(false);
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>).Width("100px");
columns.Bound(a => a.Title).Width("300px");
columns.Bound(a => a.UploadedByName).Width("50px");
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}").Width("50px");
columns.Command(c => c.Custom("View Doc").Click("DownloadCCAttachment")).Width("100px"); ;
})
.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.UploadDateTime).Editable(false);
model.Field(a => a.UploadedByName).Editable(false);
model.Field(a => a.FileName).Editable(false);
})
.PageSize(50)
.Read(read => read.Action("GetCCAttachments", "ChangeControl", new { planNumber = Model.PlanNumber }))
)
)
}
</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">
Decision Summary List
</font>
</h5>
</div>
</div>
<div class="panel-body bg-warning">
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.MeetingDecisionSummaryList>()
.Name("DecisionSummaryList")
.Columns(columns =>
{
columns.Bound(a => a.PCRB).Width("100px");
columns.Bound(a => a.MeetingDate).Width("100px");
columns.Bound(a => a.DecisionNotes).ClientTemplate("#=ProcessLinkBreaks(DecisionNotes)#").Width("500px");
columns.Bound(a => a.ECNLinks).ClientTemplate("#=DisplayECNLinks(ECNLinks)#").Width("100px");
columns.Bound(a => a.LotDispoLinks).ClientTemplate("#=DisplayLotDispoLinks(LotDispoLinks)#").Width("100px");
})
.Resizable(resize => resize.Columns(true))
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px; valign:top" })
.DataSource(dataSource => dataSource
.Ajax()
//.Batch(false)
.ServerOperation(false)
.Model(model =>
{
//model.Id(p => p.ID);
})
.PageSize(50)
.Read(read => read.Action("GetMeetingDecisionSummaryList", "ChangeControl", new { planNumber = Model.PlanNumber }))
)
)
</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">
<div id="userListdiv" class="k-content">
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CCMeetingActionItemAll>()
.Name("MeetingActionItemsAll")
.Columns(columns =>
{
columns.Bound(a => a.ID).Visible(false);
columns.Bound(a => a.MeetingID).Visible(false);
columns.Bound(a => a.PCRB).Width("50px");
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("50px");
columns.Bound(a => a.Updates).Width("200px");
columns.Bound(a => a.ClosedStatus).ClientTemplate("<input type='checkbox' disabled #= ClosedStatus ? checked='checked':'' # class='chkbx' />").Width("50px");
columns.Bound(a => a.ClosedDate).Width("50px").Format("{0:MM/dd/yy}").Width("150px");
columns.Bound(a => a.FileName).Width("100px");
columns.Command(c => c.Custom("View Doc").Click("DownloadActionItemAttachment")).Width("75px");
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.HtmlAttributes(new { style = "height: 500px;" })
.Scrollable()
.Resizable(resize => resize.Columns(true))
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(p => p.ID);
model.Field(a => a.MeetingID).Editable(false);
model.Field(a => a.PCRB).Editable(false);
model.Field(a => a.ActionItemName).Editable(false);
model.Field(a => a.ResponsiblePerson).Editable(false);
model.Field(a => a.Gating).Editable(false);
model.Field(a => a.DueDate).Editable(false);
model.Field(a => a.ClosedDate).Editable(false);
})
.PageSize(50)
.Read(read => read.Action("GetMeetingActionItems_All", "ChangeControl", new { planNumber = Model.PlanNumber }))
)
)
</div>
</div>
</div>
}
</body>
@Html.Partial("_CCReassignOwner")
<script type="text/javascript">
function DownloadCCAttachment(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/DownloadCCFile?fileGuid=' + fileGUID + '&planNumber=' + "@Model.PlanNumber";
}
else {
alert("There is no Attachment to display ")
}
}
function ProcessLinkBreaks(data) {
var template = "";
if (data != null) {
var tempValue = data.split('~');
for (var i = 0; i < tempValue.length; i++) {
var value = tempValue[i];
template += value + "<BR>" + " ";
}
}
return template;
}
function DisplayECNLinks(data) {
var template = "";
if (data != null) {
var tempValue = data.split('~');
for (var i = 0; i < tempValue.length; i++) {
var value = tempValue[i];
if (value != null) {
var newtempValue = value.split(',');
var newtemplate = "";
for (var i = 0; i < newtempValue.length; i++) {
newtemplate += "<a href='/ECN/Edit?IssueID=" + newtempValue[i].trim() + "'>" + newtempValue[i] + ", </a>" + " ";
}
}
template += newtemplate + "<BR>" + " ";
}
}
return template;
}
function DisplayLotDispoLinks(data) {
var template = "";
if (data != null) {
var tempValue = data.split('~');
for (var i = 0; i < tempValue.length; i++) {
var value = tempValue[i];
if (value != null) {
var newtempValue = value.split(',');
var newtemplate = "";
for (var i = 0; i < newtempValue.length; i++) {
newtemplate += "<a href='/LotDisposition/Edit?IssueID=" + newtempValue[i] + "'> " + newtempValue[i] + ", </a>" + " ";
}
}
template += newtemplate + "<BR>" + " ";
}
}
return template;
}
$("#GetMeeting").on('click', function (e) {
e.preventDefault()
var meetingid = $("#MeetingList").data("kendoDropDownList").value();
window.location.href = "/ChangeControl/EditMeeting?meetingID=" + meetingid;
})
$("#PCRBList").on('click', function () {
var url = '@Url.Action("ChangeControlList", "Home")';
window.location = url;
})
function DownloadActionItemAttachment(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/DownloadActionItemFile?fileGuid=' + fileGUID + '&planNumber=' + "@Model.PlanNumber";
}
else {
alert("There is no Attachment to display ")
}
}
</script>

View File

@ -0,0 +1,491 @@
@model Fab2ApprovalSystem.Models.CCMeeting
@{
ViewBag.Title = "Meeting - ReadOnly";
}
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
<style>
table {
border-spacing: 5px;
padding: 5px;
border-color: white;
}
</style>
<body >
@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-4">
<div class="row">
<div class="col-sm-3">
</div>
<div class="col-sm-3">
</div>
<div class="col-sm-6">
</div>
</div>
</div>
<div class="col-sm-4 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 class="col-sm-4">
<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 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("50px");
// 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");
})
.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>
&nbsp;&nbsp;
</td>
<td>
<input type="checkbox" id="chkApproved" name="Approved" value="Approved" disabled /> <label for="chkApproved"></label>Approved
</td>
<td>
&nbsp;&nbsp;
</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).Width("100px");
columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px");
columns.Bound(a => a.LotDispoLinks).ClientTemplate("#=buildLotDispoLinks(LotDispoLinks)#").Width("100px");
})
//.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 }))
)
)
</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%;" })
</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");
//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>
<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);
})
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 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;
}
$("#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;
})
</script>

View File

@ -0,0 +1,106 @@
<div class="modal fade" id="ReAssignOwner" 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">&times;</button>
<h4 class="modal-title" id="myModalLabel">Re-Assign Owner From: <label class="bg-danger" id="ReAssignOwnerFromLabel">Me</label></h4>
</div>
<div class="modal-body">
<div class="control-group">
<div class="row">
<div class="col-sm-5">
<h4 class="modal-title" id="myModalLabel">Re-Assign Owner to:</h4>
<div id='lstReAssignOwner'>
</div>
</div>
<div class="col-sm-7">
<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">Cancel</button>
<button type="button" class="btn btn-primary" id="ConfirmOwnerReAssignment">Confirm Re-assignment</button>
</div>
</div>
</div>
</div>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("#lnkReassignOwner").click(function (e) {
$("#ReAssignOwnerFromLabel").text($("#txtOwner").val());
$("#comments").val("");
var dataAdapter = new $.jqx.dataAdapter({
datatype: "json",
datafields: [
{ name: "UserID" },
{ name: "FullName" }
],
id: 'id',
url: "/ChangeControl/GetAllUsersList",
});
$("#lstReAssignOwner").jqxListBox({
multipleextended: false,
theme: "arctic",
source: dataAdapter,
displayMember: "FullName",
valueMember: "UserID",
width: 200,
height: 200
});
$("#ReAssignOwner").modal('show');
});
$('#ConfirmOwnerReAssignment').on('click', function () {
if ($('#lstReAssignOwner').jqxListBox('getSelectedItem') == null) {
alert("You must select a new owner");
return;
}
if ($("#comments").val() == "") {
alert("Comments are required");
return;
}
$('#ConfirmOwnerReAssignment').attr("disabled", true);
$.ajax({
url: "/ChangeControl/ReAssignOwnerByAdmin",
type: "POST",
datatype: "json",
data: {
planNumber: $("#txtPlanNumber").val(),
comments: $("#comments").val(),
newOwnerId: $("#lstReAssignOwner").jqxListBox("getSelectedItem").value,
},
success: function (data) {
$("#ReAssignOwner").modal('hide');
var pn = $("#txtPlanNumber").val().replace(/[^0-9]/g, '');
var url = '@Url.Action("Edit", "ChangeControl", new { issueID = "__id__" })';
url = url.replace('amp;', '');
window.location.href = url.replace('__id__', pn);
},
error: function (result) {
$('#ConfirmOwnerReAssignment').attr("disabled", false);
alert("Server error while changing owner");
}
});
});
});
</script>