initial add
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
@model Fab2ApprovalSystem.Models.ExternalLoginConfirmationViewModel
|
||||
@{
|
||||
ViewBag.Title = "Register";
|
||||
}
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<h3>Associate your @ViewBag.LoginProvider account.</h3>
|
||||
|
||||
@using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<h4>Association Form</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary(true)
|
||||
<p class="text-info">
|
||||
You've successfully authenticated with <strong>@ViewBag.LoginProvider</strong>.
|
||||
Please enter a user name for this site below and click the Register button to finish
|
||||
logging in.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => m.UserName)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Register" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
@{
|
||||
ViewBag.Title = "Login Failure";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<h3 class="text-error">Unsuccessful login with service.</h3>
|
68
Fab2ApprovalSystem/Views/Account/Login.cshtml
Normal file
68
Fab2ApprovalSystem/Views/Account/Login.cshtml
Normal file
@ -0,0 +1,68 @@
|
||||
@model Fab2ApprovalSystem.Models.LoginModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Mesa Approval System";
|
||||
}
|
||||
@if (GlobalVars.DBConnection == "PROD")
|
||||
{
|
||||
<h2>@ViewBag.Title (Production)</h2>
|
||||
}
|
||||
else if (GlobalVars.DBConnection == "TEST")
|
||||
{
|
||||
<h2><font color="RED">@ViewBag.Title - TEST ENVIRONMENT </font></h2>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h2><font color="Green">@ViewBag.Title - QUALITY ENVIRONMENT </font></h2>
|
||||
}
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<section id="loginForm">
|
||||
@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h3><font color="green">Use your Windows Account to log in</font></h3>
|
||||
<hr />
|
||||
@Html.ValidationSummary(true)
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.LoginID, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.LoginID, new { @class = "form-control", style = "width: 280px;" })
|
||||
@Html.ValidationMessageFor(m => m.LoginID)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.Password, new { @class = "form-control", style = "width: 280px;" })
|
||||
@Html.ValidationMessageFor(m => m.Password)
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
@Html.CheckBoxFor(m => m.RememberMe)
|
||||
@Html.LabelFor(m => m.RememberMe)
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Log in" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
@*<p>
|
||||
@Html.ActionLink("Register", "Register") if you don't have a local account.
|
||||
</p>*@
|
||||
}
|
||||
</section>
|
||||
</div>
|
||||
@*<div class="col-md-4">
|
||||
<section id="socialLoginForm">
|
||||
@Html.Partial("_ExternalLoginsListPartial", new { Action = "ExternalLogin", ReturnUrl = ViewBag.ReturnUrl })
|
||||
</section>
|
||||
</div>*@
|
||||
</div>
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
29
Fab2ApprovalSystem/Views/Account/Manage.cshtml
Normal file
29
Fab2ApprovalSystem/Views/Account/Manage.cshtml
Normal file
@ -0,0 +1,29 @@
|
||||
@using Fab2ApprovalSystem.Models;
|
||||
@using Microsoft.AspNet.Identity;
|
||||
@{
|
||||
ViewBag.Title = "Manage Account";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
<p class="text-success">@ViewBag.StatusMessage</p>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if (ViewBag.HasLocalPassword)
|
||||
{
|
||||
@Html.Partial("_ChangePasswordPartial")
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.Partial("_SetPasswordPartial")
|
||||
}
|
||||
|
||||
<section id="externalLogins">
|
||||
@Html.Action("RemoveAccountList")
|
||||
@Html.Partial("_ExternalLoginsListPartial", new { Action = "LinkLogin", ReturnUrl = ViewBag.ReturnUrl })
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
41
Fab2ApprovalSystem/Views/Account/Register.cshtml
Normal file
41
Fab2ApprovalSystem/Views/Account/Register.cshtml
Normal file
@ -0,0 +1,41 @@
|
||||
@model Fab2ApprovalSystem.Models.RegisterViewModel
|
||||
@{
|
||||
ViewBag.Title = "Register";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h4>Create a new account.</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary()
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.Password, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Register" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@model Fab2ApprovalSystem.Models.ManageUserViewModel
|
||||
|
||||
<p>You're logged in as <strong>@User.Identity.GetUserName()</strong>.</p>
|
||||
|
||||
@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h4>Change Password Form</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary()
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Change password" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
@using Microsoft.Owin.Security
|
||||
|
||||
<h4>Use another service to log in.</h4>
|
||||
<hr />
|
||||
@{
|
||||
var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
|
||||
if (loginProviders.Count() == 0)
|
||||
{
|
||||
<div>
|
||||
<p>There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=313242">this article</a>
|
||||
for details on setting up this ASP.NET application to support logging in via external services.</p>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
string action = Model.Action;
|
||||
string returnUrl = Model.ReturnUrl;
|
||||
using (Html.BeginForm(action, "Account", new { ReturnUrl = returnUrl }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="socialLoginList">
|
||||
<p>
|
||||
@foreach (AuthenticationDescription p in loginProviders)
|
||||
{
|
||||
<button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
@model ICollection<Microsoft.AspNet.Identity.UserLoginInfo>
|
||||
|
||||
@if (Model.Count > 0)
|
||||
{
|
||||
<h4>Registered Logins</h4>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach (var account in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>@account.LoginProvider</td>
|
||||
<td>
|
||||
@if (ViewBag.ShowRemoveButton)
|
||||
{
|
||||
using (Html.BeginForm("Disassociate", "Account"))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div>
|
||||
@Html.Hidden("loginProvider", account.LoginProvider)
|
||||
@Html.Hidden("providerKey", account.ProviderKey)
|
||||
<input type="submit" class="btn btn-default" value="Remove" title="Remove this @account.LoginProvider login from your account" />
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@:
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
32
Fab2ApprovalSystem/Views/Account/_SetPasswordPartial.cshtml
Normal file
32
Fab2ApprovalSystem/Views/Account/_SetPasswordPartial.cshtml
Normal file
@ -0,0 +1,32 @@
|
||||
@model Fab2ApprovalSystem.Models.ManageUserViewModel
|
||||
|
||||
<p class="text-info">
|
||||
You do not have a local username/password for this site. Add a local
|
||||
account so you can log in without an external login.
|
||||
</p>
|
||||
|
||||
@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<h4>Create Local Login</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary()
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Set password" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
368
Fab2ApprovalSystem/Views/Admin/AssignRoles.cshtml
Normal file
368
Fab2ApprovalSystem/Views/Admin/AssignRoles.cshtml
Normal file
@ -0,0 +1,368 @@
|
||||
@model IEnumerable<Fab2ApprovalSystem.Models.Role>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Roles Assignment";
|
||||
}
|
||||
@{
|
||||
Layout = "_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.base.css" type="text/css" />
|
||||
<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.energyblue.css" type="text/css" />
|
||||
<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.arctic.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxcore.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxdata.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxbuttons.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxscrollbar.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxlistbox.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxpanel.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxtree.js"></script>
|
||||
|
||||
@*<nav class="navbar navbar-default" role="navigation" style="font-size: 11px">
|
||||
<div class="container-fluid">
|
||||
|
||||
<ul class="nav navbar-nav" id="myTab">
|
||||
<li><a href=@Url.Action("Index", "Admin")>Manage Users</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>*@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="control-group">
|
||||
<label for="jqxTreeWidget">WorkFlow Roles</label>
|
||||
<div class="controls">
|
||||
<div id='jqxTreeWidget'>
|
||||
</div>
|
||||
</div>
|
||||
<input type="checkbox" id="chkShowInactive"/><label for="chkShowInactive">Show Inactive Roles?</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="control-group">
|
||||
<label for="lstUserRoles" id="selectionlog" style="font-size: 10px; font-family: Verdana; font-weight: bold; color:crimson">Current Users:</label>
|
||||
|
||||
<div class="controls">
|
||||
<div id='lstUserRoles'>
|
||||
</div>
|
||||
</div>
|
||||
<input style="margin-top: 20px;" type="button" id='jqxButtonRemove' value="Remove selected items" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="control-group">
|
||||
<label for="lstAllUsers">All Users</label>
|
||||
<div style="font-size: 10px; font-family: Verdana; font-weight: bold; color:crimson" ></div>
|
||||
<div class="controls">
|
||||
<div id='lstAllUsers'>
|
||||
</div>
|
||||
<input style="margin-top: 20px;" type="button" id='jqxButtonAdd' value="Add selected items" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
var currentSubRoleID;
|
||||
|
||||
$("#chkShowInactive").click(function () {
|
||||
LoadTree();
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
var url = "/Admin/GetAllUserList";
|
||||
var source =
|
||||
{
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'UserID' },
|
||||
{ name: 'FullName' }
|
||||
],
|
||||
id: 'id',
|
||||
url: url
|
||||
};
|
||||
var dataAdapter = new $.jqx.dataAdapter(source);
|
||||
// Create a jqxListBox
|
||||
$("#lstAllUsers").jqxListBox({
|
||||
multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "FullName", valueMember: "UserID", width: 200, height: 250
|
||||
});
|
||||
|
||||
|
||||
|
||||
// POPLUATE THE TREE
|
||||
LoadTree();
|
||||
|
||||
});
|
||||
|
||||
function LoadTree() {
|
||||
|
||||
var newurl = "/Admin/AllSubRoles";
|
||||
var newsource =
|
||||
{
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'id' },
|
||||
{ name: 'parentid' },
|
||||
{ name: 'text' },
|
||||
{ name: 'value' }
|
||||
],
|
||||
id: 'id',
|
||||
url: newurl,
|
||||
data: {
|
||||
showInactiveRoles: $("#chkShowInactive").is(":checked"),
|
||||
},
|
||||
async: false
|
||||
|
||||
|
||||
};
|
||||
|
||||
var newdataAdapter = new $.jqx.dataAdapter(newsource);
|
||||
|
||||
// perform Data Binding.
|
||||
newdataAdapter.dataBind();
|
||||
var records = newdataAdapter.getRecordsHierarchy('id', 'parentid', 'items', [{ name: 'text', map: 'label' }]);
|
||||
|
||||
$('#jqxTreeWidget').jqxTree({ theme: "arctic", source: records, height: '400px', width: '200px' })
|
||||
|
||||
.on('select', function (event) {
|
||||
var args = event.args;
|
||||
var item = $('#jqxTreeWidget').jqxTree('getItem', args.element);
|
||||
var parentitem = $('#jqxTreeWidget').jqxTree('getItem', item.parentElement);
|
||||
|
||||
if (parentitem != undefined) {
|
||||
//$("#selectionlog").children().remove();
|
||||
//$("#selectionlog").text('Current Users:' + parentitem.label + ' (' + item.label + ')');
|
||||
$("#selectionlog").text('Current Users:' + parentitem.label + ' (' + item.label + ')');
|
||||
|
||||
displayUserRoles(item.id);
|
||||
currentSubRoleID = item.id;
|
||||
|
||||
//alert(parentitem.label);
|
||||
}
|
||||
|
||||
});
|
||||
;
|
||||
// display an empty list box for the selected user roles Listbox.
|
||||
displayUserRoles(-1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onSelectRoles(e) {
|
||||
|
||||
|
||||
var data = $('#treeRoles').data('kendoTreeView').dataItem(e.node);
|
||||
|
||||
var parent = this.parent(e.node); // `this` refers to the treeview object
|
||||
if (parent.length) {
|
||||
var parentText = this.text(parent);
|
||||
$("#selectionlog").children().remove();
|
||||
$("#selectionlog").text(parentText + ' (' + data.text + ')');
|
||||
displayUserRoles(data.id);
|
||||
currentSubRoleID = data.id
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function displayUserRoles(id) {
|
||||
var url = "/Admin/GetAllUserListBySubRole?SubRole=" + id;
|
||||
var source =
|
||||
{
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'UserID' },
|
||||
{ name: 'FullName' }
|
||||
],
|
||||
id: 'id',
|
||||
url: url
|
||||
};
|
||||
var dataAdapter = new $.jqx.dataAdapter(source);
|
||||
// Create a jqxListBox
|
||||
$("#lstUserRoles").jqxListBox({
|
||||
multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "FullName", valueMember: "UserID", width: 200, height: 250
|
||||
});
|
||||
$("#lstUserRoles").on('select', function (event) {
|
||||
if (event.args) {
|
||||
var item = event.args.item;
|
||||
if (item) {
|
||||
var valueelement = $("<div></div>");
|
||||
valueelement.text("Value: " + item.value);
|
||||
var labelelement = $("<div></div>");
|
||||
labelelement.text("Label: " + item.label);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$("#jqxButtonAdd").jqxButton({
|
||||
theme: 'energyblue'
|
||||
});
|
||||
|
||||
$("#jqxButtonRemove").jqxButton({
|
||||
theme: 'energyblue'
|
||||
});
|
||||
|
||||
$('#jqxButtonAdd').on('click', function () {
|
||||
// get selected items.
|
||||
var bfound = false;
|
||||
var userids;
|
||||
var itemsToAdd = $('#lstAllUsers').jqxListBox('getSelectedItems');
|
||||
if (itemsToAdd.length > 0) {
|
||||
|
||||
for (var i = 0; i < itemsToAdd.length; i++) {
|
||||
|
||||
if (itemsToAdd[i].label != undefined) {
|
||||
|
||||
var tempvalue = itemsToAdd[i].value;
|
||||
var templabel = itemsToAdd[i].label;
|
||||
|
||||
//if (i < itemsToAdd.length - 1)
|
||||
//{
|
||||
// check if the item exists in the role seleced for the user
|
||||
var itemsAdded = $("#lstUserRoles").jqxListBox('getItems');
|
||||
for (var x = 0; x < itemsAdded.length; x++) {
|
||||
if (itemsAdded[x].label == templabel) {
|
||||
bfound = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
if (!bfound) {
|
||||
$("#lstUserRoles").jqxListBox('addItem', { label: templabel, value: tempvalue });
|
||||
if (userids == null)
|
||||
userids = tempvalue;
|
||||
else
|
||||
userids += "~" + tempvalue;
|
||||
}
|
||||
|
||||
bfound = false;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// add the selected item into the DB.
|
||||
|
||||
if (currentSubRoleID == undefined) {
|
||||
alert('Please select a SubRole to add the users to');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
if (userids != null) {
|
||||
//alert(currentSubRoleID);
|
||||
//alert("UserIds: " + userids);
|
||||
|
||||
AddRoles(currentSubRoleID, userids)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// unselect all the selected items
|
||||
$("#lstAllUsers").jqxListBox({ selectedIndex: -1 });
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#jqxButtonRemove').on('click', function () {
|
||||
// get items.
|
||||
var userids;
|
||||
var tempValue;
|
||||
var items = $("#lstUserRoles").jqxListBox('getSelectedItems');
|
||||
if (items.length > 0) {
|
||||
for (var i = items.length - 1; i >= 0; i--) {
|
||||
|
||||
tempValue = items[i].value;
|
||||
$("#lstUserRoles").jqxListBox('removeItem', tempValue);
|
||||
if (userids == null)
|
||||
userids = tempValue;
|
||||
else
|
||||
userids += "~" + tempValue;
|
||||
break;
|
||||
|
||||
};
|
||||
|
||||
if (currentSubRoleID == undefined) {
|
||||
alert('Please select a SubRole to delete the users from Role');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
if (userids != null) {
|
||||
//alert(currentSubRoleID);
|
||||
//alert("UserIds: " + userids);
|
||||
|
||||
DeleteRoles(currentSubRoleID, userids)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
var AddRoles = function (subRoleID, userids) {
|
||||
var urlString = '/Admin/AddUserRoles';
|
||||
//if (arrayOfValues.length == 0)
|
||||
// return false;
|
||||
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
|
||||
subRole: subRoleID,
|
||||
Users: userids
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
var DeleteRoles = function (subRoleID, userids) {
|
||||
var urlString = '/Admin/DeleteUserRoles';
|
||||
//if (arrayOfValues.length == 0)
|
||||
// return false;
|
||||
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
|
||||
subRole: subRoleID,
|
||||
Users: userids
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
68
Fab2ApprovalSystem/Views/Admin/Create.cshtml
Normal file
68
Fab2ApprovalSystem/Views/Admin/Create.cshtml
Normal file
@ -0,0 +1,68 @@
|
||||
@model Fab2ApprovalSystem.Models.LoginModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Add User";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="form-horizontal">
|
||||
<h4>Add User</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
@*<div class="form-group">
|
||||
@Html.LabelFor(model => model.UserID, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.UserID)
|
||||
@Html.ValidationMessageFor(model => model.UserID)
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LoginID, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.LoginID)
|
||||
@Html.ValidationMessageFor(model => model.LoginID)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.FirstName, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.FirstName)
|
||||
@Html.ValidationMessageFor(model => model.FirstName)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LastName, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.LastName)
|
||||
@Html.ValidationMessageFor(model => model.LastName)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.IsAdmin, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.IsAdmin)
|
||||
@Html.ValidationMessageFor(model => model.IsAdmin)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div>
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</div>
|
65
Fab2ApprovalSystem/Views/Admin/Details.cshtml
Normal file
65
Fab2ApprovalSystem/Views/Admin/Details.cshtml
Normal file
@ -0,0 +1,65 @@
|
||||
@model Fab2ApprovalSystem.Models.LoginModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>LoginModel</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
|
||||
<dd>
|
||||
@Html.HiddenFor(model => model.UserID)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LoginID)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LoginID)
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LastName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LastName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FullName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FullName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.IsAdmin)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.IsAdmin)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</p>
|
64
Fab2ApprovalSystem/Views/Admin/Edit.cshtml
Normal file
64
Fab2ApprovalSystem/Views/Admin/Edit.cshtml
Normal file
@ -0,0 +1,64 @@
|
||||
@model Fab2ApprovalSystem.Models.LoginModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="form-horizontal">
|
||||
<h4>LoginModel</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary(true)
|
||||
@Html.HiddenFor(model => model.UserID)
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LoginID, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.LoginID)
|
||||
@Html.ValidationMessageFor(model => model.LoginID)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.FirstName, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.FirstName)
|
||||
@Html.ValidationMessageFor(model => model.FirstName)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LastName, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.LastName)
|
||||
@Html.ValidationMessageFor(model => model.LastName)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.IsAdmin, new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.IsAdmin)
|
||||
@Html.ValidationMessageFor(model => model.IsAdmin)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div>
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</div>
|
@ -0,0 +1,3 @@
|
||||
@model DateTime?
|
||||
|
||||
@(Html.Kendo().DatePickerFor(m => m))
|
791
Fab2ApprovalSystem/Views/Admin/Index.cshtml
Normal file
791
Fab2ApprovalSystem/Views/Admin/Index.cshtml
Normal file
@ -0,0 +1,791 @@
|
||||
@model IEnumerable<Fab2ApprovalSystem.Models.LoginModel>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Index";
|
||||
}
|
||||
|
||||
@{
|
||||
Layout = "_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
||||
|
||||
<style>
|
||||
.k-grid-edit-row input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header .k-link {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.k-grid .k-edit-cell input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*InLine Edit Mode*/
|
||||
</style>
|
||||
|
||||
<div id="userListdiv" class="k-content">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LoginModel>()
|
||||
.Name("userList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.UserID).Visible(false);
|
||||
columns.Bound(l => l.LoginID);
|
||||
columns.Bound(l => l.FirstName);
|
||||
columns.Bound(l => l.LastName);
|
||||
columns.Bound(l => l.Email);
|
||||
columns.Bound(l => l.IsActive);
|
||||
//columns.Template(@<text></text>).ClientTemplate("<input type='checkbox' #= IsActive ? checked='checked':'' # class='chkbx' />");
|
||||
columns.Bound(l => l.IsAdmin);
|
||||
|
||||
|
||||
columns.Bound(l => l.LastLogin).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
|
||||
// columns.Command(command => { command.Edit(); command.Destroy(); }).Width("200px");
|
||||
|
||||
|
||||
columns.Bound(l => l.OOO);
|
||||
columns.Bound(l => l.OOOStartDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
|
||||
columns.Bound(l => l.OOOExpirationDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
|
||||
columns.Bound(l => l.DelegatedTo).Visible(false);
|
||||
columns.Bound(l => l.DelegatedToFullName);
|
||||
columns.Bound(p => p.OOOStatusWithUserID).ClientTemplate("#=buildButtons(OOOStatusWithUserID)#").Width(120);
|
||||
columns.Template(t => { }).ClientTemplate(@"<input type='button' value='Approval Groups' class='btn btn-primary btn-xs' onclick='ShowApprovalGroup(" + "#: UserID #" + ")'/>");
|
||||
columns.Template(t => { }).ClientTemplate(@"<input type='button' value='Tasks' class='btn btn-primary btn-xs' onclick='ShowUserTasks(" + "#: UserID #" + ")'/>");
|
||||
//columns.Template(p => { }).HeaderTemplate("").ClientTemplate(@"
|
||||
//<input type='button' value='Approval Groups' class='btn btn-primary btn-xs' onclick='ShowApprovalGroup(" + l => + ")'/>");
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
||||
<a href='javascript: void(0)' class='abutton edit' onclick='editRow(this)' title='button edit'>button edit</a>
|
||||
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRow(this, " + "#: UserID #" + ")' title='button delete'>button delete</a>");
|
||||
})
|
||||
.ToolBar(toolbar => toolbar.Create().Text("Add New User"))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 500px;" })
|
||||
.Scrollable()
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.Groupable()
|
||||
.Sortable()
|
||||
.Filterable()
|
||||
.Events(e => e.Edit("onEdit"))
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
|
||||
.Ajax().ServerOperation(false)
|
||||
.Events(events => events.Error("error_handler"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(l => l.UserID);
|
||||
model.Field(p => p.UserID).Editable(false);
|
||||
model.Field(l => l.LastLogin).Editable(false);
|
||||
model.Field(l => l.OOO).Editable(false);
|
||||
model.Field(l => l.OOOStartDate).Editable(false);
|
||||
model.Field(l => l.OOOExpirationDate).Editable(false);
|
||||
model.Field(l => l.DelegatedToFullName).Editable(false);
|
||||
|
||||
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetGridUserList", "Admin"))
|
||||
.Create(update => update.Action("InsertUser", "Admin"))
|
||||
.Update(update => update.Action("UpdateUser", "Admin"))
|
||||
.Destroy(destroy => destroy.Action("DeleteUser", "Admin"))
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
@*@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LoginModel>()
|
||||
.Name("Grid")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.UserID).Visible(false);
|
||||
columns.Bound(l => l.LoginID);
|
||||
columns.Bound(l => l.FirstName);
|
||||
columns.Bound(l => l.LastName);
|
||||
columns.Bound(l => l.IsAdmin);
|
||||
columns.Bound(l => l.LastLogin).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.OOO);
|
||||
columns.Bound(l => l.OOOStartDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
|
||||
columns.Bound(l => l.OOOExpirationDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
|
||||
columns.Bound(l => l.DelegatedTo).Visible(false);
|
||||
columns.Bound(l => l.DelegatedToFullName);
|
||||
columns.Bound(p => p.OOOStatusWithUserID).ClientTemplate("#=buildButtons(OOOStatusWithUserID)#").Width(120);
|
||||
|
||||
|
||||
})
|
||||
.ToolBar(toolbar =>
|
||||
{
|
||||
toolbar.Create();
|
||||
toolbar.Save();
|
||||
})
|
||||
.Editable(editable => editable.Mode(GridEditMode.InCell))
|
||||
.Pageable()
|
||||
.Navigatable()
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Batch(true)
|
||||
.PageSize(20)
|
||||
.ServerOperation(false)
|
||||
//.Events(events => events.Error("error_handler"))
|
||||
.Model(model => model.Id(p => p.UserID))
|
||||
.Read(read => read.Action("GetGridUserList", "Admin"))
|
||||
.Create(update => update.Action("InsertUser", "Admin"))
|
||||
.Update(update => update.Action("BatchUpdateUser", "Admin"))
|
||||
.Destroy(destroy => destroy.Action("DeleteUser", "Admin"))
|
||||
)
|
||||
)*@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal fade" id="OOODialog" 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">Out Of Office for user:</h4>*@
|
||||
<label style="color: #36940a; font-weight: bold; font-size: 16px; " id="currentUser"></label>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</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="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="UserApprovalGroupsDialog" 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">
|
||||
<input type="hidden" id="UserIDHidden" value="467" />
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
@*<h4 class="modal-title" id="myModalLabel">Out Of Office for user:</h4>*@
|
||||
<label style="color: #36940a; font-weight: bold; font-size: 16px; " id="currentUser"></label>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.UserSubRoles>()
|
||||
.Name("SubRoleList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.SubRoleID).Visible(false);
|
||||
columns.Bound(l => l.RoleName);
|
||||
columns.Bound(l => l.SubRoleName);
|
||||
})
|
||||
//.HtmlAttributes(new { style = "height: 500px;" })
|
||||
.Scrollable()
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.Groupable()
|
||||
.Sortable()
|
||||
.Filterable()
|
||||
.Events(e => e.Edit("onEdit"))
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
|
||||
.Ajax().ServerOperation(false)
|
||||
.Events(events => events.Error("error_handler"))
|
||||
.PageSize(20)
|
||||
.Read(read => read.Action("GetSubRoleListByUserId", "Admin").Data("GetUserID"))
|
||||
.Create(update => update.Action("InsertUser", "Admin"))
|
||||
.Update(update => update.Action("UpdateUser", "Admin"))
|
||||
.Destroy(destroy => destroy.Action("DeleteUser", "Admin"))
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
</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="ReAssignApprovalGroups" 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">Inactivate User</h4>
|
||||
<label style="color: #36940a; font-weight: bold; font-size: 16px; " id="currentUser"></label>
|
||||
<input type="hidden" id="DeletedUserIDHidden" value="467" />
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.UserSubRoles>()
|
||||
.Name("SubRoleListReAssign")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.SubRoleID).Visible(false);
|
||||
columns.Bound(l => l.RoleName);
|
||||
columns.Bound(l => l.SubRoleName);
|
||||
//columns.Command(command => command.Custom("Re-Assign").Click("ShowRoleUserSelector")).Width("100px");
|
||||
columns.Template(t => { }).ClientTemplate(@"<input type='button' value='Re-Assign' class='btn btn-primary btn-xs' onclick='ShowRoleUserSelector(" + "#: SubRoleID #" + ")'/>");
|
||||
})
|
||||
//.HtmlAttributes(new { style = "height: 400px;" })
|
||||
.Scrollable()
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.Groupable()
|
||||
.Sortable()
|
||||
.Filterable()
|
||||
.Events(e => e.Edit("onEdit"))
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
|
||||
.Ajax().ServerOperation(false)
|
||||
.Events(events => events.Error("error_handler"))
|
||||
.PageSize(20)
|
||||
.Read(read => read.Action("GetSubRoleListByUserId", "Admin").Data("GetDeletedUserID"))
|
||||
|
||||
)
|
||||
)
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-default" onclick="InactivateUser()">Submit Inactivation</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="UserAssignedTasksDialog" 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">
|
||||
<input type="hidden" id="TaskUserIDHidden" value="456" />
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
@*<h4 class="modal-title" id="myModalLabel">Out Of Office for user:</h4>*@
|
||||
<label style="color: #36940a; font-weight: bold; font-size: 16px; " id="currentUser"></label>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("UserTaskList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
//columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
//.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Groupable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetTaskListByUser", "Admin").Data("GetTaskListUserID")))
|
||||
// .ClientRowTemplate(" <tr class=#:ItemStatus == 2? 'red':'white'# data-uid='#= uid #'>" +
|
||||
// "<td> <a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a></td>" +
|
||||
// "<td>#: DocumentType #</td>" +
|
||||
// "<td>#: SubDoc #</td>" +
|
||||
// "<td>#:Originator #</td>" +
|
||||
// "<td>#: IssueDate #</td>" +
|
||||
// "<td>#:Title #</td>" +
|
||||
// "<td>#: LotNos #</td>" +
|
||||
// "<td>#:PendingApprovers #</td>" +
|
||||
// "<td>#:SubmitedDate #</td>" +
|
||||
// "<td>#: CloseDate #</td> " +
|
||||
// "<td>#: Item Status </td> " +
|
||||
// "<td><button class='btn btn-warning btn-xs' id='Delegate' name='Refresh' onclick='showReAssignRole("#=PendingApprovers#","#=CloseDate#","#=DocID#", "#=DocumentType#","#=SubmitedDate#");'>Delegate</buton></td>" +
|
||||
//"</tr>"
|
||||
//)
|
||||
|
||||
|
||||
)
|
||||
|
||||
</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="RoleReAssignPrompt" 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">
|
||||
<input type="hidden" value="" id="hiddenRoleId" />
|
||||
<input type="hidden" value="" id="hiddenIssueId" />
|
||||
<input type="hidden" value="" id="hiddenIssueType" />
|
||||
<input type="hidden" value="" id="RoleReAssignPromptDeletedUserHidden" />
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
@*<h4 class="modal-title" id="myModalLabel">Out Of Office for user:</h4>*@
|
||||
<label style="color: #36940a; font-weight: bold; font-size: 16px; " id="currentUser"></label>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@*@Html.DropDownList("selectedUserToReassign", new SelectList(ViewBag.AllActiveUsers, "UserID", "FullName"))*@
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("selectedUserToReassign")
|
||||
.BindTo(new SelectList(ViewBag.AllActiveUsers, "UserID", "FullName"))
|
||||
.OptionLabel("Select User")
|
||||
.HtmlAttributes(new { style = " font-size:10px" })
|
||||
|
||||
)
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="SubmitRoleAssignment()">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function error_handler(e) {
|
||||
alert("Error during the operation");
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
var userid = "";
|
||||
function onEdit(e) {
|
||||
|
||||
$(e.container).find("td:last").html("<a href='javascript: void(0)' class='abutton update' onclick='updateRow()' title='button update'>button update</a> " +
|
||||
"<a href='javascript: void(0)' class='abutton cancel' onclick='cancelRow()' title='button cancel'>button cancel</a>");
|
||||
}
|
||||
|
||||
function cancelRow() {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
grid.cancelRow();
|
||||
}
|
||||
|
||||
function editRow(element) {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
grid.editRow($(element).closest("tr"));
|
||||
}
|
||||
|
||||
function updateRow() {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
grid.saveRow();
|
||||
}
|
||||
|
||||
function deleteRow(element, userId) {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
|
||||
console.log(userId);
|
||||
|
||||
$("#DeletedUserIDHidden").val(userId);
|
||||
$("#SubRoleListReAssign").data("kendoGrid").dataSource.read();
|
||||
$("#ReAssignApprovalGroups").modal('show');
|
||||
//var ds = grid.dataSource;
|
||||
//var dataItem = grid.dataItem($(element.target).closest("tr"));
|
||||
//var rowViewIndex = $(element).closest("tr").index();
|
||||
//var index = ((ds.page() - 1) * ds.pageSize()) + rowViewIndex;
|
||||
|
||||
//var myRowData = $("#userList").data().kendoGrid.dataSource.at(index);
|
||||
//console.log(myRowData);
|
||||
|
||||
//grid.data.
|
||||
|
||||
//grid.removeRow($(element).closest("tr"));
|
||||
}
|
||||
|
||||
function createRow() {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
grid.addRow();
|
||||
}
|
||||
|
||||
function buildButtons(oooStatusWithUserID) {
|
||||
|
||||
var uid = oooStatusWithUserID.split('~')[0];
|
||||
var oooStatus = oooStatusWithUserID.split('~')[1];
|
||||
var userName = oooStatusWithUserID.split('~')[2];
|
||||
|
||||
var template = "";
|
||||
if (oooStatus == '0') {
|
||||
|
||||
template = "<input type='button' value='Set OOO ' class='btn btn-primary btn-xs' id='" + uid + "-" + userName + "'" + "onclick='SetOOOStatus(this)'/>";
|
||||
}
|
||||
else
|
||||
{
|
||||
template = "<input type='button' value='Expire OOO' class='btn btn-warning btn-xs' id='" + uid + "-" + userName + "'" + "onclick='Expire(this)'/>";
|
||||
}
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
function buildShowGroupsButton(UserID) {
|
||||
|
||||
var uid = oooStatusWithUserID.split('~')[0];
|
||||
|
||||
|
||||
var template = "";
|
||||
template = "<input type='button' value='Edit Approval Groups ' class='btn btn-primary btn-xs' id='" + UserID + "' " + "onclick='ShowApprovalGroup(this)'/>";
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
function SetOOOStatus(e) {
|
||||
$("#txtStartDate").val('');
|
||||
$("#txtEndDate").val('');
|
||||
|
||||
|
||||
id = e.id;
|
||||
userid = id.split('-')[0];
|
||||
var userName = id.split('-')[1];
|
||||
$('#currentUser').text("Out Of Office for user: " + userName);
|
||||
$("#OOODialog").modal('show');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$('#SaveOOOInfo').on('click', function () {
|
||||
var bfound = false;
|
||||
//var currentDate = new Date();
|
||||
|
||||
|
||||
if (userid == $("#DelegateTo").data("kendoDropDownList").value())
|
||||
{
|
||||
alert('The OOO person cannot be same as the delegate to person');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var fullDate = new Date()
|
||||
|
||||
//convert month to 2 digits
|
||||
var twoDigitMonth = ((fullDate.getMonth().length + 1) === 1) ? (fullDate.getMonth() + 1) : '0' + (fullDate.getMonth() + 1);
|
||||
|
||||
var tempCurrentDate = twoDigitMonth + "/" + fullDate.getDate() + "/" + fullDate.getFullYear();
|
||||
var arrCurrDate = tempCurrentDate.split('/');
|
||||
var currentDate = new Date(arrCurrDate[2], arrCurrDate[0] - 1, arrCurrDate[1]);
|
||||
|
||||
|
||||
if (!$("#txtStartDate").val() || !$("#txtEndDate").val()) {
|
||||
alert('Start or the End Date cannot be blank');
|
||||
return false;
|
||||
}
|
||||
|
||||
var stDateEntered = $("#txtStartDate").val();
|
||||
var arrStDate = stDateEntered.split('/');
|
||||
var stDate = new Date(arrStDate[2], arrStDate[0] - 1, arrStDate[1]);
|
||||
|
||||
var endDateEntered = $("#txtEndDate").val();
|
||||
var arrEndDate = endDateEntered.split('/');
|
||||
var endDate = new Date(arrEndDate[2], arrEndDate[0] - 1, arrEndDate[1]);
|
||||
|
||||
|
||||
if (stDate < currentDate) {
|
||||
alert("Start Date should be greater than the or equal to Current Date ");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (endDate <= stDate) {
|
||||
|
||||
alert("The End Date should be greater than the Start Date ");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#OOODialog").modal('hide');
|
||||
|
||||
var urlString = '/Admin/EnableOOOStatus';
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
oooUserID: userid,
|
||||
delegatedTo: $("#DelegateTo").data("kendoDropDownList").value(),
|
||||
startDate: $("#txtStartDate").val(),
|
||||
endDate: $("#txtEndDate").val(),
|
||||
},
|
||||
success: function (result) {
|
||||
if (result == "3") {
|
||||
alert('The user which you selected for Delegation is already a delegator for another user\n Please select a different user for Delgation')
|
||||
}
|
||||
else {
|
||||
var grid = $("#userList").data("kendoGrid");
|
||||
grid.dataSource.read();
|
||||
}
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
function Expire(e) {
|
||||
id = e.id;
|
||||
userid = id.split('-')[0];
|
||||
var userName = id.split('-')[1];
|
||||
|
||||
if (confirm('Are you sure you want to expire the OOO setting for user: ' + userName))
|
||||
{
|
||||
var urlString = '/Admin/ExpireOOOStatus';
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
oooUserID: userid
|
||||
},
|
||||
success: function (result) {
|
||||
var grid = $("#userList").data("kendoGrid");
|
||||
grid.dataSource.read();
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function ShowApprovalGroup(UserId) {
|
||||
|
||||
$("#UserIDHidden").val(UserId);
|
||||
$("#SubRoleList").data("kendoGrid").dataSource.read();
|
||||
$("#UserApprovalGroupsDialog").modal('show');
|
||||
}
|
||||
function ShowApprovalGroupReAssign(UserId) {
|
||||
|
||||
$("#DeletedUserIDHidden").val(UserId);
|
||||
$("#SubRoleListReAssign").data("kendoGrid").dataSource.read();
|
||||
$("#UserApprovalGroupsDialog").modal('show');
|
||||
}
|
||||
function GetUserID() {
|
||||
var userId = $("#UserIDHidden").val();
|
||||
return { userId : userId};
|
||||
}
|
||||
function GetDeletedUserID()
|
||||
{
|
||||
var userId = $("#DeletedUserIDHidden").val();
|
||||
return { userId: userId };
|
||||
}
|
||||
function ShowUserTasks(UserId) {
|
||||
$("#TaskUserIDHidden").val(UserId);
|
||||
$("#UserTaskList").data("kendoGrid").dataSource.read();
|
||||
$("#UserAssignedTasksDialog").modal('show');
|
||||
}
|
||||
function GetTaskListUserID() {
|
||||
var userId = $("#TaskUserIDHidden").val();
|
||||
return { userId: userId };
|
||||
}
|
||||
function ShowRoleUserSelector(SubRoleID) {
|
||||
var userBeingDeleted = $("#DeletedUserIDHidden").val()
|
||||
$("#hiddenRoleId").val(SubRoleID);
|
||||
$("#RoleReAssignPromptDeletedUserHidden").val(userBeingDeleted)
|
||||
$("#RoleReAssignPrompt").modal('show');
|
||||
}
|
||||
function SubmitRoleAssignment() {
|
||||
var userToAssign = $("#selectedUserToReassign").data("kendoDropDownList").value();
|
||||
var roleToAssign = $("#hiddenRoleId").val();
|
||||
var userBeingDeleted = $("#RoleReAssignPromptDeletedUserHidden").val();
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/Admin/ReplaceUserRoles",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
subRole: roleToAssign,
|
||||
users: userToAssign
|
||||
},
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
DeleteUserFromRole(roleToAssign, userBeingDeleted);
|
||||
$("#RoleReAssignPrompt").modal('hide');
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
function DeleteUserFromRole(subRoleId, userId) {
|
||||
$.ajax({
|
||||
url: "/Admin/DeleteUserRoles",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
subRole: subRoleId,
|
||||
users: userId
|
||||
},
|
||||
success: function (data) {
|
||||
$("#SubRoleListReAssign").data("kendoGrid").dataSource.read();
|
||||
return;
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
function InactivateUser() {
|
||||
if (confirm("Are you sure you wish to de-activate this user?")) {
|
||||
var userId = $("#DeletedUserIDHidden").val();
|
||||
$.ajax({
|
||||
url: "/Admin/DeleteUser",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
userId: userId
|
||||
},
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
$("#ReAssignApprovalGroups").modal('hide');
|
||||
$("#userList").data("kendoGrid").dataSource.read();
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,55 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Job Scheduler Configuration";
|
||||
Layout = "~/Views/Admin/_AdminLayout.cshtml";
|
||||
}
|
||||
<style>
|
||||
.settingSection {
|
||||
/*margin-left: 10px;*/
|
||||
background-color: white;
|
||||
padding: 10px;
|
||||
border-radius: 20px;
|
||||
margin-top: 10px;
|
||||
border: 10px solid #87b3de;
|
||||
|
||||
}
|
||||
</style>
|
||||
<h2>Job Scheduler Configuration</h2>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div id="TrainingReportNotification" class="settingSection col-sm-6">
|
||||
@{Html.RenderAction("TrainingReportConfig", "Admin");}
|
||||
</div>
|
||||
<div id="TECNExpirationNotification" class="settingSection col-sm-6">
|
||||
|
||||
@{Html.RenderAction("TECNNotificationConfig", "Admin");}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//function settingSectionScroll(headerId, settingSection) {
|
||||
// //var header = document.getElementById(headerId);
|
||||
// var tableOffset = $("#TrainingReportNotificationTable").offset().top;
|
||||
// var $header = $("#TrainingReportNotificationTable > thead").clone();
|
||||
// //var headerWidth = document.getElementById(headerId).offsetWidth;
|
||||
// var section = document.getElementById(settingSection);
|
||||
// //var sticky = header.offsetTop;
|
||||
// var $fixedHeader = $("#header-fixed").append($header);
|
||||
// var offset = $(this).scrollTop();
|
||||
// if (offset >= tableOffset && $fixedHeader.is(":hidden")) {
|
||||
// // header.classList.add("sticky");
|
||||
// //header.style.position = 'fixed';
|
||||
// $("#header-fixed").append($header);
|
||||
// $fixedHeader.show();
|
||||
// } else {
|
||||
// //header.classList.remove("sticky");
|
||||
// //header.style.position = 'static';
|
||||
// $fixedHeader.hide();
|
||||
// }
|
||||
//}
|
||||
</script>
|
13
Fab2ApprovalSystem/Views/Admin/ManageTrainingGroups.cshtml
Normal file
13
Fab2ApprovalSystem/Views/Admin/ManageTrainingGroups.cshtml
Normal file
@ -0,0 +1,13 @@
|
||||
@*//@model IEnumerable<Fab2ApprovalSystem.Models.TrainingGroup>
|
||||
//@using Fab2ApprovalSystem.Models.TrainingGroup;*@
|
||||
@{
|
||||
ViewBag.Title = "View";
|
||||
Layout = "~/Views/Admin/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2>Manage Training Groups</h2>
|
||||
<div id="GroupsDisplay">
|
||||
@{Html.RenderAction("TrainingGroups", "Admin");}
|
||||
</div>
|
||||
|
||||
|
104
Fab2ApprovalSystem/Views/Admin/TECNNotificationConfig.cshtml
Normal file
104
Fab2ApprovalSystem/Views/Admin/TECNNotificationConfig.cshtml
Normal file
@ -0,0 +1,104 @@
|
||||
@{IEnumerable<Fab2ApprovalSystem.Models.LoginModel> allUsers = ViewBag.AllUsers;}
|
||||
@{IEnumerable<Fab2ApprovalSystem.Models.LoginModel> TrainingReportUsers = ViewBag.CurrentReportUsers;}
|
||||
<style>
|
||||
#viewContainer {
|
||||
height: 600px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#TECNNotificationControls {
|
||||
background-color: white;
|
||||
z-index: 1000;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
#TECNNoticationTable {
|
||||
overflow-y: scroll;
|
||||
position: relative;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
<div id="viewContainer">
|
||||
<div id="TECNNotificationControls">
|
||||
<h4>TECN Expiration Notifications</h4>
|
||||
Add New User: @Html.DropDownList("TECNExpirationUserID", new SelectList(allUsers, "UserID", "FullName"))<input type="button" value="Add" id="TECNNotificationAddBtn" />
|
||||
</div>
|
||||
<div id="TECNNoticationTable">
|
||||
<table class="table" id="TECNExpirationConfigTable">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
@foreach (var item in TrainingReportUsers)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.FullName</td>
|
||||
<td><button type="button" class="btn btn-default" id="DeleteFromTECNExpirationGroup" onclick="DeleteFromTECNExpirationGroup('@item.UserID')">Delete</button></td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#TECNNotificationAddBtn').on('click', function () {
|
||||
var SelectedUser = document.getElementById('TECNExpirationUserID').value;
|
||||
var sendInfo = {
|
||||
userId: SelectedUser,
|
||||
};
|
||||
//alert(SelectedUser);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Admin/AddToTECNNotification",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(sendInfo),
|
||||
dataType: "html",
|
||||
success: function (r) {
|
||||
|
||||
alert(r);
|
||||
RefreshTECNExpirationData();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
function DeleteFromTECNExpirationGroup(userId) {
|
||||
var sendInfo = {
|
||||
userId: userId,
|
||||
};
|
||||
//alert(SelectedUser);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Admin/DeleteFromTECNNotification",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(sendInfo),
|
||||
dataType: "html",
|
||||
success: function (r) {
|
||||
|
||||
alert(r);
|
||||
RefreshTECNExpirationData();
|
||||
}
|
||||
});
|
||||
}
|
||||
function RefreshTECNExpirationData() {
|
||||
|
||||
//alert(SelectedGroup);
|
||||
var sendInfo = {
|
||||
|
||||
};
|
||||
//alert("we get here")
|
||||
$.ajax({
|
||||
url: '@Url.Action("TECNNotificationConfig", "Admin")',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
type: 'POST',
|
||||
data: JSON.stringify(sendInfo),
|
||||
//dataType: "html",
|
||||
success: function(data) {
|
||||
|
||||
//alert('add success');
|
||||
$("#TECNExpirationNotification").html(data);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
135
Fab2ApprovalSystem/Views/Admin/TrainingGroupPartial.cshtml
Normal file
135
Fab2ApprovalSystem/Views/Admin/TrainingGroupPartial.cshtml
Normal file
@ -0,0 +1,135 @@
|
||||
@model IEnumerable<Fab2ApprovalSystem.Models.TrainingGroupMember>
|
||||
@{IEnumerable<Fab2ApprovalSystem.Models.LoginModel> test = ViewBag.AllUsers;}
|
||||
@*<script src="~/Scripts/jquery.min.js"></script>*@
|
||||
<style>
|
||||
tr:nth-child(even) {
|
||||
background: #CCC
|
||||
}
|
||||
|
||||
tr:nth-child(odd) {
|
||||
background: #FFF
|
||||
}
|
||||
</style>
|
||||
<p>
|
||||
<input type="button" value="Add To Training Group" class="btn btn-success btn-xs" id="AddToGroupBtn" />
|
||||
</p>
|
||||
<div id="displayTable">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="filterableCol">
|
||||
Name:
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.FullName)
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<input type="button" class="btn btn-default" value="Delete" onclick="DeleteFromGroup('@item.UserID')" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal fade" id="AddToGroup" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg" style="width:500px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #fce0a3;">
|
||||
<h3 class="modal-title">Add To Training Group</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<p>New Group Name: </p>
|
||||
@Html.DropDownList("UserID", new SelectList(test, "UserID", "FullName"))
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #fce0a3; ">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" id="CloseAddToGroup">Save</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#displayTable').excelTableFilter();
|
||||
$('#CloseAddToGroup').on('click', function () {
|
||||
var SelectedUser = document.getElementById('UserID').value;
|
||||
var SelectedGroup = @ViewBag.TrainingGroupId;
|
||||
var sendInfo = {
|
||||
userId: SelectedUser,
|
||||
groupId: SelectedGroup
|
||||
|
||||
};
|
||||
//alert(SelectedUser);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Admin/AddToGroup",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(sendInfo),
|
||||
dataType: "json",
|
||||
success: function (r) {
|
||||
//var json = $.parseJSON(r);
|
||||
alert('Success');
|
||||
RefreshData();
|
||||
},
|
||||
error: function (req, status, error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
$("#AddToGroup").modal('hide');
|
||||
|
||||
})
|
||||
|
||||
$('#AddToGroupBtn').on('click', function () {
|
||||
$("#AddToGroup").modal('show');
|
||||
return false;
|
||||
})
|
||||
function DeleteFromGroup(userId) {
|
||||
var SelectedGroup = @ViewBag.TrainingGroupId;
|
||||
var sendInfo = {
|
||||
userId: userId,
|
||||
groupId: SelectedGroup
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: '@Url.Action("DeleteFromGroup", "Admin")',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
type: 'POST',
|
||||
data: JSON.stringify(sendInfo),
|
||||
dataType: "json",
|
||||
success: function() {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
RefreshData();
|
||||
}
|
||||
function RefreshData() {
|
||||
var SelectedGroup = @ViewBag.TrainingGroupId;
|
||||
//alert(SelectedGroup);
|
||||
var sendInfo = {
|
||||
TrainingGroupID: SelectedGroup
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: '@Url.Action("TrainingGroupPartial", "Admin")',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
type: 'POST',
|
||||
data: JSON.stringify(sendInfo),
|
||||
//dataType: "json",
|
||||
success: function(data) {
|
||||
|
||||
//alert('add success');
|
||||
$("#DataDisplay").html(data);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
118
Fab2ApprovalSystem/Views/Admin/TrainingGroups.cshtml
Normal file
118
Fab2ApprovalSystem/Views/Admin/TrainingGroups.cshtml
Normal file
@ -0,0 +1,118 @@
|
||||
@model IEnumerable<Fab2ApprovalSystem.Models.TrainingGroup>
|
||||
<style>
|
||||
tr:nth-child(even) {
|
||||
background: #CCC
|
||||
}
|
||||
|
||||
tr:nth-child(odd) {
|
||||
background: #FFF
|
||||
}
|
||||
</style>
|
||||
<p>
|
||||
<input type="button" value="Add Training Group" class="btn btn-success btn-xs" id="AddTrainingGroup" />
|
||||
</p>
|
||||
<div id="displayTable">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="filterableCol">
|
||||
Group Name:
|
||||
</th>
|
||||
<th>Actions:</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.TrainingGroupName)
|
||||
</td>
|
||||
<td>
|
||||
<a href="~/Admin/ViewTrainingGroup?TrainingGroupID=@item.TrainingGroupID" class="btn btn-default">View/Edit Group</a>
|
||||
@*<input type="button" class="btn btn-default" value="View/Edit Group" />*@
|
||||
<input type="button" class="btn btn-default" value="Delete" onclick="DeleteGroup('@item.TrainingGroupID')" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal fade" id="AddGroup" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg" style="width:500px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #fce0a3;">
|
||||
<h3 class="modal-title">Add Training Group</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<p>New Group Name: </p>
|
||||
<input type="text" id="GroupName" />
|
||||
<input type="button" value="Save" onclick="SaveGroup()" />
|
||||
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #fce0a3; ">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#displayTable').excelTableFilter();
|
||||
$(document).ready(function () {
|
||||
//RefreshGroups();
|
||||
});
|
||||
function SaveGroup() {
|
||||
groupName = document.getElementById('GroupName').value;
|
||||
alert('test');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Admin/AddNewTrainingGroup",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: '{"groupName":"' + groupName + '"}',
|
||||
dataType: "json",
|
||||
success: function () {
|
||||
RefreshGroups();
|
||||
},
|
||||
error: function (req, status, error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
$("#AddGroup").modal('hide');
|
||||
|
||||
}
|
||||
|
||||
$('#AddTrainingGroup').on('click', function () {
|
||||
$("#AddGroup").modal('show');
|
||||
return false;
|
||||
})
|
||||
function DeleteGroup(groupID) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Admin/DeleteTrainingGroup",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: '{"groupID":"' + groupID + '"}',
|
||||
dataType: "json",
|
||||
success: function () {
|
||||
RefreshGroups();
|
||||
},
|
||||
error: function (req, status, error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
function RefreshGroups() {
|
||||
$.ajax({
|
||||
url: '@Url.Action("TrainingGroups", "Admin")',
|
||||
type: 'POST',
|
||||
success: function(data) {
|
||||
if (data) { // check if data is defined
|
||||
$("#GroupsDisplay").html(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
119
Fab2ApprovalSystem/Views/Admin/TrainingReportConfig.cshtml
Normal file
119
Fab2ApprovalSystem/Views/Admin/TrainingReportConfig.cshtml
Normal file
@ -0,0 +1,119 @@
|
||||
@{IEnumerable<Fab2ApprovalSystem.Models.LoginModel> allUsers = ViewBag.AllUsers;}
|
||||
@{IEnumerable<Fab2ApprovalSystem.Models.LoginModel> TrainingReportUsers = ViewBag.CurrentReportUsers;}
|
||||
@*<div class="titlebar col-sm-3" id="trainingNotificationTitle">
|
||||
<div class="col-sm-1">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
|
||||
</div>
|
||||
|
||||
</div>*@
|
||||
<style>
|
||||
#viewContainer {
|
||||
height:600px;
|
||||
width:100%;
|
||||
}
|
||||
#TrainingReportControls{
|
||||
background-color:white;
|
||||
z-index:1000;
|
||||
width:inherit;
|
||||
}
|
||||
#TrainingReportNotificationTable{
|
||||
overflow-y:scroll;
|
||||
position:relative;
|
||||
height:500px;
|
||||
}
|
||||
</style>
|
||||
<div id="viewContainer">
|
||||
<div id="TrainingReportControls">
|
||||
|
||||
<h4>Training Report Notification</h4>
|
||||
|
||||
Add New User: @Html.DropDownList("TrainingReportUserID", new SelectList(allUsers, "UserID", "FullName"))<input type="button" value="Add" id="TrainingReportAddBtn" />
|
||||
|
||||
|
||||
</div>
|
||||
<div id="TrainingReportNotificationTable">
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in TrainingReportUsers)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.FullName</td>
|
||||
<td><button type="button" class="btn btn-default" id="DeleteFromTrainingReportGroup" onclick="DeleteFromTrainingReportGroup('@item.UserID')">Delete</button></td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#TrainingReportAddBtn').on('click', function () {
|
||||
var SelectedUser = document.getElementById('TrainingReportUserID').value;
|
||||
var sendInfo = {
|
||||
userId: SelectedUser,
|
||||
};
|
||||
//alert(SelectedUser);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Admin/AddToTrainingReport",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(sendInfo),
|
||||
dataType: "html",
|
||||
success: function (r) {
|
||||
|
||||
alert(r);
|
||||
RefreshTrainingReportData();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
function DeleteFromTrainingReportGroup(userId) {
|
||||
var sendInfo = {
|
||||
userId: userId,
|
||||
};
|
||||
//alert(SelectedUser);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/Admin/DeleteFromTrainingReport",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(sendInfo),
|
||||
dataType: "html",
|
||||
success: function (r) {
|
||||
|
||||
alert(r);
|
||||
RefreshTrainingReportData();
|
||||
}
|
||||
});
|
||||
}
|
||||
function RefreshTrainingReportData() {
|
||||
|
||||
//alert(SelectedGroup);
|
||||
var sendInfo = {
|
||||
|
||||
};
|
||||
//alert("we get here")
|
||||
$.ajax({
|
||||
url: '@Url.Action("TrainingReportConfig", "Admin")',
|
||||
|
||||
contentType: "application/json; charset=utf-8",
|
||||
type: 'POST',
|
||||
data: JSON.stringify(sendInfo),
|
||||
//dataType: "html",
|
||||
success: function(data) {
|
||||
|
||||
//alert('add success');
|
||||
$("#TrainingReportNotification").html(data);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
12
Fab2ApprovalSystem/Views/Admin/ViewTrainingGroup.cshtml
Normal file
12
Fab2ApprovalSystem/Views/Admin/ViewTrainingGroup.cshtml
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "ViewTrainingGroup";
|
||||
Layout = "~/Views/Admin/_AdminLayout.cshtml";
|
||||
}
|
||||
<script src="~/Scripts/excel-bootstrap-table-filter-bundle.js"></script>
|
||||
<script src="~/Scripts/moment.js"></script>
|
||||
<link rel="stylesheet" href="~/Content/excel-bootstrap-table-filter-style.css" />
|
||||
<h2>View/Edit Training Group</h2>
|
||||
<div id="DataDisplay">
|
||||
@{Html.RenderAction("TrainingGroupPartial", "Admin", new { groupID = Convert.ToInt32(ViewBag.TrainingGroupId) });}
|
||||
</div>
|
69
Fab2ApprovalSystem/Views/Admin/_AdminLayout.cshtml
Normal file
69
Fab2ApprovalSystem/Views/Admin/_AdminLayout.cshtml
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>@ViewBag.Title - Mesa Approval</title>
|
||||
@Styles.Render("~/Content/kendo/css")
|
||||
@Styles.Render("~/Content/css")
|
||||
@*@Styles.Render("~/Content/jqw/css")*@
|
||||
|
||||
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/kendo")
|
||||
|
||||
|
||||
@*<script src="~/Scripts/bootstrap.js"></script>
|
||||
<script src="~/Scripts/respond.js"></script>*@
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
@*@Scripts.Render("~/Content/jqw/jq")*@
|
||||
<script src="~/Scripts/excel-bootstrap-table-filter-bundle.js"></script>
|
||||
<script src="~/Scripts/moment.js"></script>
|
||||
<link rel="stylesheet" href="~/Content/excel-bootstrap-table-filter-style.css" />
|
||||
</head>
|
||||
<body class="navbar-inner">
|
||||
<div class=" navbar navbar-inverse navbar-fixed-top">
|
||||
<div >
|
||||
<div class="navbar-header">
|
||||
@if (Request.IsAuthenticated) {
|
||||
@*@Html.ActionLink("Home", "Index", "Home", new { tabName = "MyTasks" }, new { @class = "navbar-brand" })*@
|
||||
@Html.ActionLink("Home", "MyTasks", "Home", null, new { @class = "navbar-brand" })
|
||||
}
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
@if ((bool)@Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
<li>@Html.ActionLink("Admin", "Index", "Admin")</li>
|
||||
}
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@(Html.Kendo().Menu()
|
||||
.Name("menu")
|
||||
.HtmlAttributes(new { style = "width:100%; font-size: 12px" })
|
||||
.Items(menu =>
|
||||
{
|
||||
menu.Add().Text("Manage Users").Action("Index", "Admin");
|
||||
menu.Add().Text("Manage Roles").Action("AssignRoles", "Admin");
|
||||
menu.Add().Text("Manage Training Groups").Action("ManageTrainingGroups", "Admin");
|
||||
menu.Add().Text("View All ECN Trainings").Action("ViewTrainings", "Training");
|
||||
menu.Add().Text("Job Scheduler Configuration").Action("JobSchedulerConfiguration", "Admin");
|
||||
}))
|
||||
<div>
|
||||
@RenderBody()
|
||||
@*<hr />*@
|
||||
<footer >
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
1597
Fab2ApprovalSystem/Views/Audit/Edit.cshtml
Normal file
1597
Fab2ApprovalSystem/Views/Audit/Edit.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
689
Fab2ApprovalSystem/Views/Audit/ReadOnlyAudit.cshtml
Normal file
689
Fab2ApprovalSystem/Views/Audit/ReadOnlyAudit.cshtml
Normal file
@ -0,0 +1,689 @@
|
||||
@model Fab2ApprovalSystem.Models.Audit
|
||||
|
||||
@{
|
||||
ViewBag.Title = "ReadOnly";
|
||||
}
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-spacing: 5px;
|
||||
padding: 5px;
|
||||
border-color: white;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.k-header .k-link {
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.k-grid-edit-row input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header .k-link {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.k-grid .k-edit-cell input {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
||||
<body>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@*@Html.AntiForgeryToken()*@
|
||||
<div>
|
||||
<div class="panel panel-default center-block" data-spy="affix">
|
||||
<input type="button" value="Back to Audit List" class="btn btn-primary btn-xs" id="AuditList" />
|
||||
|
||||
</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">
|
||||
Audit
|
||||
</font>
|
||||
</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-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Audit #:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.AuditNo, "A" + "{0:00000}", new { id = "txtAuditNo", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<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.AuditTitle, new { id = "txtAuditTitle", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue; width=100%" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Audit Score:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.AuditScore, new { id = "txtAuditScore", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Audit Type:</label>
|
||||
</div>
|
||||
<div class="form-control-static col-sm-9">
|
||||
@(Html.Kendo().MultiSelect()
|
||||
.Name("AuditTypeIDs")
|
||||
.BindTo(new SelectList(ViewBag.AuditTypeList, "AuditTypeID", "AuditTypeName"))
|
||||
.Value(ViewBag.Nothing)
|
||||
.HtmlAttributes(new { style = "font-size:10px", Readonly = "Readonly" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Audit Date:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@(Html.Kendo().DatePickerFor(model => model.AuditDate)
|
||||
.Name("txtAuditDate")
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Auditors:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@(Html.Kendo().MultiSelect()
|
||||
.Name("AuditorIDs")
|
||||
.BindTo(new SelectList(ViewBag.AuditorList, "AuditorID", "AuditorName"))
|
||||
.HtmlAttributes(new { style = "font-size:10px", Readonly = "Readonly" })
|
||||
.Value(ViewBag.Nothing)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Audit Finding Categories:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.AuditFindingCategories, new { id = "txtAuditFindingCategories", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Audited Area:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@(Html.Kendo().MultiSelect()
|
||||
.Name("AuditedAreaIDs")
|
||||
.BindTo(new SelectList(ViewBag.AuditAreaList, "AuditedAreaID", "AuditedAreaName"))
|
||||
.Value(ViewBag.Nothing)
|
||||
.HtmlAttributes(new { style = "font-size:10px", Readonly = "Readonly" })
|
||||
)
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">#Major Non Conformities:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.NoOfMajorNonConformities, new { id = "txtNoOfMajorNonConformities", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">#Minor Non Conformities:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.NoOfMinorNonConformities, new { id = "txtNoOfMinorNonConformities", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Auditees:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextAreaFor(model => model.Auditees, 3, 6, new { id = "txtAuditees", @class = "k-textbox", Readonly = "Readonly", style = "font-size: 10px;width: 100%;" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Audit Status:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("AuditStatus")
|
||||
.DataTextField("Text")
|
||||
.DataValueField("Value")
|
||||
.BindTo(new List<SelectListItem>()
|
||||
{
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "Open",
|
||||
Value = "0"
|
||||
},
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "Closed",
|
||||
Value = "1"
|
||||
},
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "Cancelled",
|
||||
Value = "2"
|
||||
}
|
||||
}
|
||||
)
|
||||
.Value(Model.AuditStatus.ToString())
|
||||
.HtmlAttributes(new { Readonly = "Readonly" })
|
||||
)
|
||||
</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">
|
||||
Documents Attachments
|
||||
</font>
|
||||
</h5>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
|
||||
<div class="form-group">
|
||||
<div>
|
||||
@*@(Html.Kendo().Upload()
|
||||
.Name("AuditReportFiles")
|
||||
.Async(a => a
|
||||
.Save("AuditReportAttachSave", "Audit", new { auditNo = Model.AuditNo })
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events
|
||||
.Success("onFileUploadSuccess")
|
||||
.Upload("checkFileType")
|
||||
)
|
||||
)*@
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.AuditReportAttachment>()
|
||||
.Name("AuditReportAttachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.AuditNo).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("DownloadAttachment"));
|
||||
//columns.Command(command => command.Custom("Delete").Click("DeleteAttachment"));
|
||||
//columns.Command(command => command.Destroy());
|
||||
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:200px; 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("AuditReportAttachment_Read", "Audit", new { auditNo = Model.AuditNo }))
|
||||
//.Destroy(destroy => destroy.Action("AuditReportAttachment_Destroy", "Audit"))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
</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">
|
||||
Findings
|
||||
</font>
|
||||
</h5>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.AuditFindings>()
|
||||
.Name("AuditFindings")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.AuditNo).Visible(false);
|
||||
columns.Bound(a => a.CAOwner).Visible(false);
|
||||
columns.Bound(a => a.CANo).Visible(false);
|
||||
columns.Bound(a => a.AuditFindingCategoryID).Visible(false);
|
||||
columns.Bound(a => a.Title).Width("100px");
|
||||
columns.Bound(a => a.Findings).Width("250px");
|
||||
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px");
|
||||
columns.Bound(a => a.FindingType).Title("Type").Width("50px");
|
||||
columns.Bound(a => a.ViolatedClause).Width("250px");
|
||||
columns.Bound(a => a.FindingCategories).Title("Categories").Width("150px").Encoded(false).Width("300px");
|
||||
columns.Bound(a => a.CANoDisp).ClientTemplate("#=buildCALinks(CANo, CANoDisp)#").Width("100px");
|
||||
columns.Bound(a => a.CAStatus).Title("8D Status").Width("50px");
|
||||
columns.Bound(a => a.CAOwner).Title("8D Owner").Width("50px");
|
||||
|
||||
|
||||
columns.Command(command => command.Custom("View").Click("ViewAuditFindings")).Width("100px");
|
||||
//columns.Command(command => command.Custom("Delete").Click("DeletetAuditFindings")).Width("100px");
|
||||
|
||||
})
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:200px; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(20)
|
||||
.Read(read => read.Action("GetAuditFindingsList", "Audit", new { auditNo = Model.AuditNo }))
|
||||
)
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@*<div class="panel panel-default">
|
||||
<div class="panel-body bg-warning">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CAFindings>()
|
||||
.Name("CAFindings")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.ResponsibilityOwnerID).Visible(false);
|
||||
columns.Bound(a => a.CAFinding).Width("250px");
|
||||
columns.Bound(a => a.CorrectiveAction).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.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, AuditNo)#").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.AuditNo).DefaultValue(Model.AuditNo);
|
||||
|
||||
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetCAFindingsList", "Audit", new { auditNo = Model.AuditNo }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
|
||||
<div class="modal fade" id="AuditFindingsForm" tabindex="0" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" style="width: 1000px; font-size:11px">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Edit Audit Findings</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body ">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Findings(Major/Minor):</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBox("txtAuditFindings", null, new { @class = "k-textbox", style = "width:100%" , ReadOnly = "ReadOnly"})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Violated Clause:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBox("txtViolatedClause", null, new { @class = "k-textbox", style = "width:100%", ReadOnly = "ReadOnly" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Type:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("AuditFindingType")
|
||||
.DataTextField("Text")
|
||||
.DataValueField("Value")
|
||||
.BindTo(new List<SelectListItem>()
|
||||
{
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "Minor",
|
||||
Value = "Minor"
|
||||
},
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "Major",
|
||||
Value = "Major"
|
||||
}
|
||||
}
|
||||
)
|
||||
.Value(Model.AuditStatus.ToString())
|
||||
.HtmlAttributes(new { Readonly = "Readonly" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Corrective Action:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBox("txtCorrectiveAction", null, new { @class = "k-textbox", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Audit Find Categories:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@(Html.Kendo().MultiSelect()
|
||||
.Name("AuditFindingCategoryIDs")
|
||||
.BindTo(new SelectList(ViewBag.AuditFindingCategoryList, "AuditFindingCategoryID", "AuditFindingCategoryName"))
|
||||
.Value(ViewBag.Nothing)
|
||||
.HtmlAttributes(new { style = "font-size:11px", Readonly = "Readonly" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</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="timeout" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg" style="width:500px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #fce0a3;">
|
||||
<h3 class="modal-title">Page About To Timeout</h3>
|
||||
</div>
|
||||
<div class="modal-body" style="background-color: crimson; font-size: 20px; color:white">
|
||||
You will automatically be redirected to your Home Page in 1 minute.<br />
|
||||
To remain on this page please close this window or press the ESC key.
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #fce0a3; ">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var auditFindingOperation;
|
||||
var auditFindingsItemID ;
|
||||
|
||||
|
||||
|
||||
|
||||
function DownloadAttachment(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileGUID;
|
||||
var fileGUID = dataItem.FileGUID;
|
||||
|
||||
window.location = '/Audit/DownloadAuditReportAttachment?fileGuid=' + fileGUID + '&auditNo=' + @Model.AuditNo;
|
||||
//window.open('/LotDisposition/DownloadFile?attachmentID=' + attachmentID, '_blank');
|
||||
|
||||
}
|
||||
|
||||
function error_handler(e) {
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ViewAuditFindings(e)
|
||||
{
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
auditFindingsItemID = dataItem.ID;
|
||||
var findings = dataItem.Findings;
|
||||
var findingType = dataItem.FindingType;
|
||||
var violatedClause = dataItem.ViolatedClause;
|
||||
var caNO = dataItem.CANo;
|
||||
|
||||
|
||||
clearAuditFindingForm();
|
||||
|
||||
$("#txtAuditFindings").val(findings);
|
||||
$("#txtViolatedClause").val(violatedClause);
|
||||
$("#AuditFindingType").data("kendoDropDownList").value(findingType);
|
||||
$("#txtCorrectiveAction").val(caNO);
|
||||
|
||||
var tempAuditFindingCategory;
|
||||
//alert(dataItem.ResponsiblePerson);
|
||||
var data;
|
||||
var dataArray;
|
||||
|
||||
|
||||
$("#AuditFindingCategoryIDs").data("kendoMultiSelect").value("");
|
||||
|
||||
if (dataItem.AuditFindingCategoryID != null) {
|
||||
tempAuditFindingCategory = dataItem.AuditFindingCategoryID.split(',');
|
||||
|
||||
|
||||
var attValues = new Array();
|
||||
for (i in tempAuditFindingCategory) {
|
||||
attValues[i] = tempAuditFindingCategory[i]
|
||||
}
|
||||
}
|
||||
|
||||
$("#AuditFindingCategoryIDs").data("kendoMultiSelect").value(attValues);
|
||||
|
||||
e.preventDefault();
|
||||
$("#AuditFindingsForm").modal("show");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function clearAuditFindingForm() {
|
||||
$("#txtAuditFindings").val('');
|
||||
$("#txtViolatedClause").val('');
|
||||
$("#txtCorrectiveAction").val('');
|
||||
}
|
||||
|
||||
|
||||
$("#AuditList").on('click', function(){
|
||||
var url = '@Url.Action("AuditList", "Home")';
|
||||
window.location = url;
|
||||
})
|
||||
|
||||
function buildCALinks(CAs, CANoDisp) {
|
||||
|
||||
return "<a href='/CorrectiveAction/Edit?IssueID=" + CAs + "'> " + CANoDisp + ",</a>" + " ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function buildLinks(fileNames, auditNo) {
|
||||
var template = "";
|
||||
|
||||
//var fileName = 4;
|
||||
|
||||
//alert(workRequestID);
|
||||
|
||||
if (fileNames != null) {
|
||||
var tempValue = fileNames.split(',');
|
||||
for (var i = 0; i < tempValue.length; i++) {
|
||||
var tempValue2 = tempValue[i].split('~');
|
||||
|
||||
var fileName = tempValue2[0];
|
||||
var fileGuid = tempValue2[1];
|
||||
|
||||
var tempFile = fileName.split('.');
|
||||
var fileExtension = tempFile[tempFile.length - 1];
|
||||
|
||||
template += "<a href='/Audit/DownloadAuditReportAttachment?fileGuid=" + fileGuid + "&auditNo=" + @Model.AuditNo + "'>" + fileName + "</a><BR>" + " ";
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
function onFileUploadSuccess(e) {
|
||||
var grid = $("#AuditReportAttachments").data("kendoGrid");
|
||||
grid.dataSource.read($('#txtAuditNo').val());
|
||||
}
|
||||
|
||||
function checkFileType(e) {
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt|.slddrw|.sldprt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
136
Fab2ApprovalSystem/Views/Audit/_CAFindingsAttachment.cshtml
Normal file
136
Fab2ApprovalSystem/Views/Audit/_CAFindingsAttachment.cshtml
Normal file
@ -0,0 +1,136 @@
|
||||
@model Fab2ApprovalSystem.Models.CAFindings
|
||||
|
||||
@Html.HiddenFor(model => model.ID, new { id = "caFindingsID" })
|
||||
@Html.HiddenFor(model => model.AuditNo, new { id = "caFindingsAuditNo" })
|
||||
<div>
|
||||
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("CAFindings_Attachemnt")
|
||||
.Async(a => a
|
||||
.Save("SaveCAFindings_Attachemnt", "Audit")
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events.Upload("CAFindingsUploadData").Success("RefreshGrids").Error("CAFindingsFileUplaodError")
|
||||
)
|
||||
|
||||
)
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
|
||||
.Name("CAFindings_Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.CAFindingsID).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("DownloadAttachment"));
|
||||
columns.Command(command => command.Custom("Delete").Click("DeleteCAFindingsAttachment"));
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetCAFindingsItemAttachments", "Audit", new { caFindingsID = Model.ID }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var fileData;
|
||||
|
||||
|
||||
function RefreshGrids(e) {
|
||||
var grid = $("#CAFindings_Attachments").data("kendoGrid");
|
||||
grid.dataSource.read($("#caFindingsID").val());
|
||||
RefreshCAFindingsGrid();
|
||||
}
|
||||
|
||||
function CAFindingsUploadData(e) {
|
||||
fileData = e;
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt|.slddrw|.sldprt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
e.data = {
|
||||
caFindingsID: $("#caFindingsID").val(),
|
||||
auditNo: $("#caFindingsAuditNo").val()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function RefreshCAFindingsGrid() {
|
||||
var grid = $("#CAFindings").data("kendoGrid");
|
||||
grid.dataSource.read($('@Model.AuditNo').val());
|
||||
}
|
||||
|
||||
|
||||
function DeleteCAFindingsAttachment(e) {
|
||||
e.preventDefault();
|
||||
if (confirm("Are you sure you want to delete this Attachment?")) {
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileGUID;
|
||||
var attachmentID = dataItem.ID;
|
||||
|
||||
$.ajax({
|
||||
url: "/Audit/DeleteAuditReportAttachment",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
attachID: attachmentID
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
RefreshGrids();
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function CAFindingsFileUplaodError(e) {
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
2533
Fab2ApprovalSystem/Views/ChangeControl/Edit.cshtml
Normal file
2533
Fab2ApprovalSystem/Views/ChangeControl/Edit.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
1498
Fab2ApprovalSystem/Views/ChangeControl/EditMeeting.cshtml
Normal file
1498
Fab2ApprovalSystem/Views/ChangeControl/EditMeeting.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
1015
Fab2ApprovalSystem/Views/ChangeControl/EditMeetingUpdate.cshtml
Normal file
1015
Fab2ApprovalSystem/Views/ChangeControl/EditMeetingUpdate.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
@model DateTime?
|
||||
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("DueDate")
|
||||
.Value(Model == null ? DateTime.Now : @Model)
|
||||
.Format("M/d/yyyy")
|
||||
)
|
787
Fab2ApprovalSystem/Views/ChangeControl/ReadOnlyCC.cshtml
Normal file
787
Fab2ApprovalSystem/Views/ChangeControl/ReadOnlyCC.cshtml
Normal 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>
|
491
Fab2ApprovalSystem/Views/ChangeControl/ReadOnlyMeeting.cshtml
Normal file
491
Fab2ApprovalSystem/Views/ChangeControl/ReadOnlyMeeting.cshtml
Normal 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>
|
||||
|
||||
</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).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>
|
106
Fab2ApprovalSystem/Views/ChangeControl/_CCReassignOwner.cshtml
Normal file
106
Fab2ApprovalSystem/Views/ChangeControl/_CCReassignOwner.cshtml
Normal 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">×</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>
|
5056
Fab2ApprovalSystem/Views/CorrectiveAction/Edit.cshtml
Normal file
5056
Fab2ApprovalSystem/Views/CorrectiveAction/Edit.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
1755
Fab2ApprovalSystem/Views/CorrectiveAction/ReadOnlyCA.cshtml
Normal file
1755
Fab2ApprovalSystem/Views/CorrectiveAction/ReadOnlyCA.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,120 @@
|
||||
|
||||
@model Fab2ApprovalSystem.Models.D5D6CorrectivetAction
|
||||
|
||||
@Html.HiddenFor(model => model.ID, new { id = "d5d6ID" })
|
||||
@Html.HiddenFor(model => model.CANo, new { id = "CANo" })
|
||||
|
||||
<div>
|
||||
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("D5D6CA_Attachemnt")
|
||||
.Async(a => a
|
||||
.Save("SaveD5D6CA_Attachemnt", "CorrectiveAction")
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events.Upload("D5D6UploadData").Success("D5D6RefreshGrids")
|
||||
)
|
||||
|
||||
)
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
|
||||
.Name("D5D56CA_Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.D5D6CAID).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"));
|
||||
columns.Command(command => command.Custom("Delete").Click("DeleteD5D6CAAttachment"));
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetD5D6ItemAttachments", "CorrectiveAction", new { d5d6CAID = Model.ID }))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var fileData;
|
||||
|
||||
|
||||
function D5D6RefreshGrids(e) {
|
||||
var grid = $("#D5D56CA_Attachments").data("kendoGrid");
|
||||
grid.dataSource.read($("#d5d6ID").val());
|
||||
RefreshD5D6CAGrid();
|
||||
}
|
||||
|
||||
function D5D6UploadData(e) {
|
||||
fileData = e;
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt|.slddrw|.sldprt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
e.data = {
|
||||
d5d6CAID: $("#d5d6ID").val(),
|
||||
caNo: $("#CANo").val()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function RefreshD5D6CAGrid() {
|
||||
var grid = $("#D5D6CorrectivetActions").data("kendoGrid");
|
||||
grid.dataSource.read($('@Model.CANo').val());
|
||||
}
|
||||
|
||||
|
||||
function DeleteD5D6CAAttachment(e) {
|
||||
e.preventDefault();
|
||||
if (confirm("Are you sure you want to delete this Attachment?")) {
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileGUID;
|
||||
var attachmentID = dataItem.ID;
|
||||
|
||||
$.ajax({
|
||||
url: "/CorrectiveAction/DeleteCAAttachment",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
attachmentID: attachmentID
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
RefreshD5D6CAGrid();
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
136
Fab2ApprovalSystem/Views/CorrectiveAction/_D7PAAttachment.cshtml
Normal file
136
Fab2ApprovalSystem/Views/CorrectiveAction/_D7PAAttachment.cshtml
Normal file
@ -0,0 +1,136 @@
|
||||
|
||||
@model Fab2ApprovalSystem.Models.D7PreventiveAction
|
||||
|
||||
@Html.HiddenFor(model => model.ID, new { id = "d7ID" })
|
||||
@Html.HiddenFor(model => model.CANo, new { id = "d7CANo" })
|
||||
<div>
|
||||
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("D7PA_Attachemnt")
|
||||
.Async(a => a
|
||||
.Save("SaveD7PA_Attachemnt", "CorrectiveAction")
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events.Upload("D7UploadData").Success("D7RefreshGrids").Error("D7FileUplaodError")
|
||||
)
|
||||
|
||||
)
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
|
||||
.Name("D7PA_Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.D5D6CAID).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"));
|
||||
columns.Command(command => command.Custom("Delete").Click("DeleteD7PAAttachment"));
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetD7ItemAttachments", "CorrectiveAction", new { d7PAID = Model.ID }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var fileData;
|
||||
|
||||
|
||||
function D7RefreshGrids(e) {
|
||||
var grid = $("#D7PA_Attachments").data("kendoGrid");
|
||||
grid.dataSource.read($("#d7ID").val());
|
||||
RefreshD7PAGrid();
|
||||
}
|
||||
|
||||
function D7UploadData(e) {
|
||||
fileData = e;
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt|.slddrw|.sldprt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
e.data = {
|
||||
d7PAID: $("#d7ID").val(),
|
||||
caNo: $("#d7CANo").val()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function RefreshD7PAGrid() {
|
||||
var grid = $("#D7PreventiveActions").data("kendoGrid");
|
||||
grid.dataSource.read($('@Model.CANo').val());
|
||||
}
|
||||
|
||||
|
||||
function DeleteD7PAAttachment(e) {
|
||||
e.preventDefault();
|
||||
if (confirm("Are you sure you want to delete this Attachment?")) {
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileGUID;
|
||||
var attachmentID = dataItem.ID;
|
||||
|
||||
$.ajax({
|
||||
url: "/CorrectiveAction/DeleteCAAttachment",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
attachmentID: attachmentID
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
RefreshGrids();
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function D7FileUplaodError(e) {
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
</script>
|
1534
Fab2ApprovalSystem/Views/ECN/Acknowledge.cshtml
Normal file
1534
Fab2ApprovalSystem/Views/ECN/Acknowledge.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
47
Fab2ApprovalSystem/Views/ECN/ECNApprovalPdf.cshtml
Normal file
47
Fab2ApprovalSystem/Views/ECN/ECNApprovalPdf.cshtml
Normal file
@ -0,0 +1,47 @@
|
||||
@model Fab2ApprovalSystem.ViewModels.ECNPdf
|
||||
<table border="1">
|
||||
<tr bgcolor="#c4baba" color="#ffffff">
|
||||
<td>
|
||||
Full Name
|
||||
</td>
|
||||
<td>
|
||||
Role
|
||||
</td>
|
||||
<td>
|
||||
Approved/Denied
|
||||
</td>
|
||||
<td>
|
||||
Date Time
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@foreach (Fab2ApprovalSystem.ViewModels.ECNApprovalLog ecnApp in Model.Approvalog)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<font size="1">
|
||||
@ecnApp.FullName
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="1">
|
||||
@ecnApp.SubRole
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="1">
|
||||
@ecnApp.Operation
|
||||
</font>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<font size="1">
|
||||
@ecnApp.OperationTime
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
</table>
|
||||
|
497
Fab2ApprovalSystem/Views/ECN/ECNPdf.cshtml
Normal file
497
Fab2ApprovalSystem/Views/ECN/ECNPdf.cshtml
Normal file
@ -0,0 +1,497 @@
|
||||
@model Fab2ApprovalSystem.ViewModels.ECNPdf
|
||||
<table style="width:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<table cellpadding="3" cellspacing="3" border="1">
|
||||
<tr bgcolor="#c4baba" color="#000000">
|
||||
<td colspan="2">
|
||||
@Model.Title
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0">
|
||||
@if (@Model.ConvertedFromNumber != null)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
ECN# @Model.ECNNumber (Converted from TECN#:@Model.ConvertedFromNumber)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (@Model.ConvertedToNumber != null)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
ECN# @Model.ECNNumber (Converted to ECN#:@Model.ConvertedToNumber)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (@Model.ConvertedFromNumber == null && @Model.ConvertedToNumber == null)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
ECN# @Model.ECNNumber
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
Submit Date#:
|
||||
</font>
|
||||
<font size="1">
|
||||
@Model.SubmitedDate
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
Originator Name:
|
||||
</font>
|
||||
<font size="1">
|
||||
@Model.OriginatorName
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table border="0">
|
||||
@*<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
Affected Department:
|
||||
</font>
|
||||
<font size="1">
|
||||
@Model.AffectedDepartments
|
||||
</font>
|
||||
</td>
|
||||
|
||||
</tr>*@
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
Affected Area:
|
||||
</font>
|
||||
<font size="1">
|
||||
@Model.AffectedModules
|
||||
@*@Model.AffectedAreas*@
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
ITAR/EC:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.IsDocEC ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table border="1">
|
||||
<tr bgcolor="#c4baba" color="#000000">
|
||||
<td> ECN - TECN Details</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
ECN:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.IsECN ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
TECN:
|
||||
@(Model.IsTECN ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
Emergency:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.IsEmergencyTECN ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
Expiration Date:
|
||||
</font>
|
||||
<font size="1">
|
||||
|
||||
@Convert.ToString(string.Format("{0:MM/dd/yyyy}", Model.ExpirationDate))
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
Extension Date:
|
||||
</font>
|
||||
<font size="1">
|
||||
|
||||
@Convert.ToString(string.Format("{0:dd/MM/yyyy}", @Model.ExtensionDate))
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
Cancellation Date:
|
||||
</font>
|
||||
<font size="1">
|
||||
@Model.CancellationApprovalDate
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
# lots affected:
|
||||
</font>
|
||||
<font size="1">
|
||||
@Model.NumberOfLotsAffected
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
Recipe Or/And Flow Change:
|
||||
</font>
|
||||
<font size="1">
|
||||
@Model.RecipeChange
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
Affected product families:
|
||||
</font>
|
||||
<font size="1">
|
||||
@Model.AffectedProductFamilies
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td colspan="3" style="background-color:ActiveCaption">
|
||||
<font size="2">
|
||||
Affected Documents:
|
||||
</font>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach (string attachmentName in Model.Attachments)
|
||||
{
|
||||
<td colspan="3">
|
||||
<font size="1">
|
||||
@attachmentName
|
||||
</font>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table border="1" >
|
||||
<tr bgcolor="#c4baba" color="#000000">
|
||||
<td> Description of Change</td>
|
||||
<td> Reason for Change</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="1">
|
||||
@Html.Raw(@Model.DescriptionOfChange)
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="1">
|
||||
@Html.Raw(@Model.ReasonForChange)
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@*<tr>
|
||||
<td>
|
||||
|
||||
<table border="1">
|
||||
<tr bgcolor="#c4baba" color="#000000">
|
||||
<td colspan="3">Training Notification</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<font size="1">
|
||||
Training:
|
||||
@(Model.TrainingRequired ? "Yes" : "No")
|
||||
</font>
|
||||
|
||||
<font size="1">
|
||||
@(Model.TrainingBy.Length > 0 ? "(" + Model.TrainingBy + ")" : Model.TrainingBy)
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>*@
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<table border="1">
|
||||
<tr bgcolor="#c4baba" color="#000000">
|
||||
<td colspan="5">Systems</td>
|
||||
</tr>
|
||||
<tr style="display:block;">
|
||||
<td>
|
||||
<font size="2">
|
||||
PCRB:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.PCRBRequired ? "Yes": "No")
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
PCRB#:
|
||||
@Model.PCRBNumber
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
Metrology Change:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.MetrologyChangeRequired ? "Yes": "No")
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
SPC Change:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.SPCChangeRequired ? "Yes": "No")
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
FI Change:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.FIChangeRequired ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="2">
|
||||
OI Change:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.SPNChangeRequired ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="1">
|
||||
<tr bgcolor="#c4baba" color="#000000">
|
||||
<td colspan="4"> Change Impact</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
Impact On ESH:
|
||||
</font>
|
||||
<font size="1">
|
||||
@if (Model.ImpactOnEnvironment == 1)
|
||||
{
|
||||
@: Positive
|
||||
}
|
||||
else if (Model.ImpactOnEnvironment == 2)
|
||||
{
|
||||
@: Negative
|
||||
}
|
||||
else
|
||||
{
|
||||
@: N/A
|
||||
}
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="1">
|
||||
@Html.Raw(@Model.ImpactOnEnvironmentDescription)
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
Impact On Capacity:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.ImpactOnCapacity == 1 ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="1">
|
||||
@Html.Raw(@Model.ImpactOnCapacityDescription)
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
@*<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
RH(ITAR):
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.IsRH ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>*@
|
||||
</td>
|
||||
<td>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<font size="2">
|
||||
Material Consumption Change:
|
||||
</font>
|
||||
<font size="1">
|
||||
@(Model.MaterialConsumptionChangeRequired == 1 ? "Yes" : "No")
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<font size="1">
|
||||
@Html.Raw(@Model.MaterialConsumptionChangeDescription)
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="1">
|
||||
<tr bgcolor="#c4baba" color="#ffffff">
|
||||
<td>
|
||||
Full Name
|
||||
</td>
|
||||
<td>
|
||||
Role
|
||||
</td>
|
||||
<td>
|
||||
Approved/Denied
|
||||
</td>
|
||||
<td>
|
||||
Date Time
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@foreach (Fab2ApprovalSystem.ViewModels.ECNApprovalLog ecnApp in Model.Approvalog)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<font size="1">
|
||||
@ecnApp.FullName
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="1">
|
||||
@ecnApp.SubRole
|
||||
</font>
|
||||
</td>
|
||||
<td>
|
||||
<font size="1">
|
||||
@ecnApp.Operation
|
||||
</font>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<font size="1">
|
||||
@ecnApp.OperationTime
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table> <!--main table -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
203
Fab2ApprovalSystem/Views/ECN/ECNTrainingView.cshtml
Normal file
203
Fab2ApprovalSystem/Views/ECN/ECNTrainingView.cshtml
Normal file
@ -0,0 +1,203 @@
|
||||
@model Fab2ApprovalSystem.Models.ECN
|
||||
|
||||
|
||||
<h4>ECN# @Model.ECNNumber - @Model.Title</h4>
|
||||
@*<div>
|
||||
<p>Submitted: @Model.SubmitedDate</p>
|
||||
<p>Originator: @Model.OriginatorName</p>
|
||||
<p>Affected Areas: @Model.AreaIDs</p>
|
||||
</div>*@
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-info">
|
||||
<div class="panel-heading">
|
||||
<h6 style="font-weight:600"></h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal col-sm-3">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">ECN #:</label>
|
||||
<div class="col-sm-8">
|
||||
@Html.TextBoxFor(model => model.ECNNumber, new { id = "txtECNNumber", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Submit Date:</label>
|
||||
<div class="col-sm-8">
|
||||
@Html.TextBoxFor(model => model.SubmitedDate, new { id = "txSubmitDate", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Originator Name:</label>
|
||||
<div class="col-sm-8">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@if (Model.ConvertedFromNumber != null && Model.IsECN)
|
||||
{
|
||||
<div class="form-group">
|
||||
<font style="color:red; font-size:12px; font-weight:bold">
|
||||
<label class="control-label col-sm-4">Converted from TECN: </label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
<a style="color:red" href="Edit?IssueID=@Model.ConvertedFromNumber">@Model.ConvertedFromNumber</a>
|
||||
|
||||
</div>
|
||||
</font>
|
||||
|
||||
</div>
|
||||
}
|
||||
@if (Model.ConvertedFromNumber != null && Model.IsTECN)
|
||||
{
|
||||
<div class="form-group">
|
||||
<font style="color:red; font-size:12px; font-weight:bold">
|
||||
<label class="control-label col-sm-4">Converted from E-TECN: </label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
<a style="color:red" href="Edit?IssueID=@Model.ConvertedFromNumber">@Model.ConvertedFromNumber</a>
|
||||
|
||||
</div>
|
||||
</font>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.ConvertedToNumber != null && Model.IsEmergencyTECN)
|
||||
{
|
||||
<div class="form-group">
|
||||
<font style="color: red; font-size: 12px; font-weight: bold">
|
||||
<label class="control-label col-sm-4">Converted to TECN: </label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
<a style="color:red" href="Edit?IssueID=@Model.ConvertedToNumber">@Model.ConvertedToNumber</a>
|
||||
|
||||
</div>
|
||||
</font>
|
||||
</div>
|
||||
}
|
||||
@if (Model.ConvertedToNumber != null && Model.IsTECN)
|
||||
{
|
||||
<div class="form-group">
|
||||
<font style="color: red; font-size: 12px; font-weight: bold">
|
||||
<label class="control-label col-sm-4">Converted to ECN: </label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
<a style="color:red" href="Edit?IssueID=@Model.ConvertedToNumber">@Model.ConvertedToNumber</a>
|
||||
|
||||
</div>
|
||||
</font>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@*<div class="form-horizontal col-sm-3">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Converted from TECN: <a href="Edit?IssueID=@Model.ConvertedFromNumber">@Model.ConvertedFromNumber</a></label>
|
||||
|
||||
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="form-horizontal col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">ECN Title:</label>
|
||||
<div class="col-sm-6 col-sm-6">
|
||||
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", style = "width:100%", disabled = "disabled" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Approvers:</label>
|
||||
<div class="col-sm-6 col-sm-6">
|
||||
@(Html.Kendo().MultiSelect()
|
||||
.Name("DepartmentIDs")
|
||||
.BindTo(new SelectList(ViewBag.Departments, "DepartmentID", "DepartmentName"))
|
||||
.Value(ViewBag.Nothing)
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Affected Areas:</label>
|
||||
<div class="col-sm-6 col-sm-6">
|
||||
@(Html.Kendo().MultiSelect()
|
||||
.Name("ModuleIDs")
|
||||
.BindTo(new SelectList(ViewBag.AffectedModules, "ModuleID", "ModuleName"))
|
||||
.Value(ViewBag.Nothing)
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal col-sm-3">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Category:</label>
|
||||
<div class="col-sm-6 col-sm-6">
|
||||
@(Html.Kendo().DropDownListFor(model => model.CategoryID)
|
||||
.DataValueField("CategoryID")
|
||||
.DataTextField("CategoryName")
|
||||
.BindTo(ViewBag.Categories)
|
||||
.HtmlAttributes(new { disabled = "disabled" }))
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">ITAR/EC:</label>
|
||||
<div class="col-sm-6 col-sm-6">
|
||||
@Html.CheckBoxFor(model => model.IsDocEC, new { disabled = "disabled" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table-condensed" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-info" style="font-size: 11px">
|
||||
<div class="panel-heading">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h5 style="font-weight:600;background-color:transparent;">Description of Change </h5>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal col-sm-12">
|
||||
@Html.TextAreaFor(model => model.DescriptionOfChange, 15, 30, new { id = "txtDescriptionOfChange", @class = "form-control", style = "font-size: 11px;width: 100%;", disabled = "disabled" })
|
||||
</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">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h5 style="font-weight:600">Reason For Change </h5>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</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", style = "font-size: 11px;width: 100%;", disabled = "disabled" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
2974
Fab2ApprovalSystem/Views/ECN/Edit.cshtml
Normal file
2974
Fab2ApprovalSystem/Views/ECN/Edit.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
2307
Fab2ApprovalSystem/Views/ECN/EditApproval.cshtml
Normal file
2307
Fab2ApprovalSystem/Views/ECN/EditApproval.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
1690
Fab2ApprovalSystem/Views/ECN/ReadOnly.cshtml
Normal file
1690
Fab2ApprovalSystem/Views/ECN/ReadOnly.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
55
Fab2ApprovalSystem/Views/ECN/_ECNLayout.cshtml
Normal file
55
Fab2ApprovalSystem/Views/ECN/_ECNLayout.cshtml
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>@ViewBag.Title - Mesa Approval</title>
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/kendo")
|
||||
@Styles.Render("~/Content/kendo/css")
|
||||
@Styles.Render("~/Content/css")
|
||||
|
||||
@Scripts.Render("~/Content/jqw/jq")
|
||||
@Styles.Render("~/Content/jqw/css")
|
||||
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
|
||||
|
||||
</head>
|
||||
<body class="navbar-inner">
|
||||
<div class=" navbar navbar-inverse navbar-fixed-top">
|
||||
<div>
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
@*@Html.ActionLink("My Tasks", "Index", "Home", new { tabName = "MyTasks" }, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("All Tasks", "Index", "Home", new { tabName = "AllTasks" }, new { @class = "navbar-brand" })*@
|
||||
@Html.ActionLink("My Tasks", "MyTasks", "Home", null, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("All Documents", "AllDocuments", "Home", null, new { @class = "navbar-brand" })
|
||||
@*@Html.ActionLink("Special Work Request", "SpecialWorkRequestList", "Home", null, new { @class = "navbar-brand" })*@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse">
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@RenderBody()
|
||||
@*<hr />*@
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
104
Fab2ApprovalSystem/Views/ECN/_ECNReassignOriginator.cshtml
Normal file
104
Fab2ApprovalSystem/Views/ECN/_ECNReassignOriginator.cshtml
Normal file
@ -0,0 +1,104 @@
|
||||
<div class="modal fade" id="ReAssignOriginator" 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">Re-Assign Originator From: <label class="bg-danger" id="ReAssignOriginatorFromLabel">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 Originator to:</h4>
|
||||
<div id='lstReAssignOriginator'>
|
||||
</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="ConfirmOriginatorReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#lnkReassignOriginator").click(function (e) {
|
||||
|
||||
$("#ReAssignOriginatorFromLabel").text($("#txtOriginatorName").val());
|
||||
$("#comments").val("");
|
||||
|
||||
var dataAdapter = new $.jqx.dataAdapter({
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: "UserID" },
|
||||
{ name: "FullName" }
|
||||
],
|
||||
id: 'id',
|
||||
url: "/ECN/GetAllUsersList",
|
||||
});
|
||||
|
||||
$("#lstReAssignOriginator").jqxListBox({
|
||||
multipleextended: false,
|
||||
theme: "arctic",
|
||||
source: dataAdapter,
|
||||
displayMember: "FullName",
|
||||
valueMember: "UserID",
|
||||
width: 200,
|
||||
height: 200
|
||||
});
|
||||
|
||||
$("#ReAssignOriginator").modal('show');
|
||||
});
|
||||
|
||||
$('#ConfirmOriginatorReAssignment').on('click', function () {
|
||||
|
||||
if ($('#lstReAssignOriginator').jqxListBox('getSelectedItem') == null) {
|
||||
alert("You must select a new originator");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($("#comments").val() == "") {
|
||||
alert("Comments are required");
|
||||
return;
|
||||
}
|
||||
|
||||
$('#ConfirmOriginatorReAssignment').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/ECN/ReAssignOriginatorByAdmin",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ecnNumber: $("#txtECNNumber").val(),
|
||||
comments: $("#comments").val(),
|
||||
newOriginatorId: $("#lstReAssignOriginator").jqxListBox("getSelectedItem").value,
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
$("#ReAssignOriginator").modal('hide');
|
||||
|
||||
var url = '@Url.Action("Edit", "ECN", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#txtECNNumber").val());
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
$('#ConfirmOriginatorReAssignment').attr("disabled", false);
|
||||
alert("Server error while changing originator");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
7
Fab2ApprovalSystem/Views/Home/About.cshtml
Normal file
7
Fab2ApprovalSystem/Views/Home/About.cshtml
Normal file
@ -0,0 +1,7 @@
|
||||
@{
|
||||
ViewBag.Title = "About";
|
||||
}
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<h3>@ViewBag.Message</h3>
|
||||
|
||||
<p>Use this area to provide additional information.</p>
|
518
Fab2ApprovalSystem/Views/Home/AllDocuments.cshtml
Normal file
518
Fab2ApprovalSystem/Views/Home/AllDocuments.cshtml
Normal file
@ -0,0 +1,518 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="~/Scripts/js.cookie.js" />
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>@ViewBag.Title</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body onload="LoadState();" onunload="SaveData()">
|
||||
@*<body>*@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
|
||||
<label id="header" style="font-size: large; font-weight: bold; color: crimson; font-family: 'Times New Roman'">
|
||||
All Documents
|
||||
</label><br />
|
||||
<label id="headerID" style="font-size: small; font-weight: bold; color: blue; font-family: 'Times New Roman'">
|
||||
|
||||
</label>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="alltasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("alltasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=formatIssueID(IssueID, SubDoc)#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
||||
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRow(this)' title='button delete'>button delete</a>");
|
||||
//columns.Command(command => command.Destroy());
|
||||
})
|
||||
.Events(e => e.DataBound("onAllDocsDB"))
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
//.Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetDocuments", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("alltasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
})
|
||||
.Events(e => e.DataBound("onAllDocsDB"))
|
||||
//.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
// .Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetDocuments", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="OOODialog" 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">Out Of Office for user: @User.Identity.GetUserName()</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</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="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
//try {
|
||||
// var storTest = window['localStorage'];
|
||||
// storTest.setItem("", ".");
|
||||
// storTest.removeItem("");
|
||||
//}
|
||||
//catch (e) { alert("Please go away"); }
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
function SaveDataOld() {
|
||||
// alert("save");
|
||||
var grid = $("#alltasklist").data("kendoGrid");
|
||||
|
||||
var dataSource = grid.dataSource;
|
||||
|
||||
var state = {
|
||||
//page: dataSource.page(),
|
||||
filter: dataSource.filter()
|
||||
};
|
||||
var str = JSON.stringify(state);
|
||||
try
|
||||
{
|
||||
var ls;
|
||||
ls = localStorage;
|
||||
ls.setItem("alltasklistFilter", str);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
alert("Problem while storing the Grid Filter Settings");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function LoadStateOld () {
|
||||
//alert("load");
|
||||
var grid = $("#alltasklist").data("kendoGrid");
|
||||
|
||||
var dataSource = grid.dataSource;
|
||||
var ls;
|
||||
ls = localStorage;
|
||||
var state = ls.getItem("alltasklistFilter");
|
||||
state = JSON.parse(state);
|
||||
var options = grid.options;
|
||||
options.dataSource.filter = state.filter;
|
||||
//options.dataSource.page = state.page;
|
||||
grid.destroy();
|
||||
|
||||
$("#alltasklist")
|
||||
.empty()
|
||||
.kendoGrid(options);
|
||||
|
||||
displayfilter(state.filter)
|
||||
|
||||
}
|
||||
|
||||
function LoadState () {
|
||||
//alert("load");
|
||||
var grid = $("#alltasklist").data("kendoGrid");
|
||||
try
|
||||
{
|
||||
var dataSource = grid.dataSource;
|
||||
$.ajax({
|
||||
url: "/Home/LoadAllDocumentsFilter",
|
||||
datatype: "json",
|
||||
success: function (state) {
|
||||
//alert(state);
|
||||
state = JSON.parse(state);
|
||||
|
||||
var options = grid.options;
|
||||
//alert("Success");
|
||||
|
||||
//options.dataSource.page = state.page;
|
||||
//options.dataSource.pageSize = state.pageSize;
|
||||
//options.dataSource.sort = state.sort;
|
||||
options.dataSource.filter = state.filter;
|
||||
//options.dataSource.group = state.group;
|
||||
displayfilter(state.filter);
|
||||
|
||||
grid.destroy();
|
||||
|
||||
$("#alltasklist")
|
||||
.empty()
|
||||
.kendoGrid(options);
|
||||
|
||||
|
||||
},
|
||||
error: function(result)
|
||||
{
|
||||
//alert(result)
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
alert("Problems while filtering...")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function SaveData() {
|
||||
// alert("save");
|
||||
|
||||
var grid = $("#alltasklist").data("kendoGrid");
|
||||
|
||||
var dataSource = grid.dataSource;
|
||||
|
||||
var state = {
|
||||
//page: dataSource.page(),
|
||||
//pageSize: dataSource.pageSize(),
|
||||
//sort: dataSource.sort(),
|
||||
filter: dataSource.filter()
|
||||
//group: dataSource.group()
|
||||
};
|
||||
//var str = JSON.stringify(state);
|
||||
|
||||
$.ajax({
|
||||
url: "/Home/SaveAllDocumentsFilter",
|
||||
data: {
|
||||
data: JSON.stringify(state)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function displayfilter(filter)
|
||||
{
|
||||
// alert(filter);
|
||||
var currentFilter = filter; // get current filter
|
||||
//alert(currentFilter);
|
||||
// create HTML representation of the filter (this implementation works only for simple cases)
|
||||
if (currentFilter != null) {
|
||||
try {
|
||||
var filterHtml = "";
|
||||
currentFilter.filters.forEach(function (filter, index) {
|
||||
//filterHtml += "[Field: " + filter.field + "]" +
|
||||
// "[Operator: " + filter.operator + "]" +
|
||||
// "[Value: " + filter.value + "]";
|
||||
|
||||
filterHtml += "[" + filter.field + " " +
|
||||
filter.operator + " " +
|
||||
"'" + filter.value + "'] ";
|
||||
|
||||
//if (currentFilter.filters.length > 1 && index !== currentFilter.filters.length - 1) {
|
||||
// filterHtml += "[Logic: " + currentFilter.logic + "]/";
|
||||
|
||||
if (currentFilter.filters.length > 1 && index !== currentFilter.filters.length - 1) {
|
||||
filterHtml += " " + currentFilter.logic + " ";
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// display it somewhere
|
||||
$("#filter").html(filterHtml);
|
||||
if (filterHtml != '') {
|
||||
$("#headerID").text(" Filter = " + filterHtml)
|
||||
$("#headerID").css("color", "blue");
|
||||
}
|
||||
else {
|
||||
$("#headerID").text("");
|
||||
}
|
||||
}
|
||||
catch (ex) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function formatIssueID(num, docType) {
|
||||
|
||||
var length = 4;
|
||||
var numStr = num.toString();
|
||||
if (docType == 'ChangeControl') {
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
numStr = 'P' + numStr
|
||||
}
|
||||
|
||||
if (docType == 'PR') {
|
||||
length = 6;
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
numStr = 'PR' + numStr
|
||||
}
|
||||
|
||||
return numStr;
|
||||
}
|
||||
|
||||
|
||||
function onAllDocsDB(e) {
|
||||
var grid = $("#alltasklist").data("kendoGrid");
|
||||
|
||||
var dataSource = grid.dataSource;
|
||||
|
||||
var state = {
|
||||
//page: dataSource.page(),
|
||||
//pageSize: dataSource.pageSize(),
|
||||
//sort: dataSource.sort(),
|
||||
filter: dataSource.filter()
|
||||
}
|
||||
|
||||
|
||||
displayfilter(dataSource.filter());
|
||||
}
|
||||
</script>
|
||||
|
112
Fab2ApprovalSystem/Views/Home/AuditList.cshtml
Normal file
112
Fab2ApprovalSystem/Views/Home/AuditList.cshtml
Normal file
@ -0,0 +1,112 @@
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Audit List";
|
||||
}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
Audit List
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="auditListdiv" class="k-content" style="font-size: 11px">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.AuditList>()
|
||||
.Name("AuditList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.CorrectiveActions).Visible(false);
|
||||
columns.Bound(l => l.AuditNo)
|
||||
.ClientTemplate("<a href='/Audit/Edit?IssueID=#=AuditNo#'>#=formatIssueID(AuditNo)#</a>").Width("50px");
|
||||
|
||||
columns.Bound(l => l.AuditTitle).Width("100px");
|
||||
columns.Bound(l => l.AuditType).Width("250px");
|
||||
columns.Bound(l => l.Auditors).Width("100px");
|
||||
columns.Bound(l => l.AuditDate).Format("{0:MM/dd/yy}").Width("100px");
|
||||
columns.Bound(l => l.FindingCategories).Width("150px");
|
||||
columns.Bound(l => l.AuditedAreas).Width("100px");
|
||||
columns.Bound(a => a.CADisp).ClientTemplate("#=buildCALinks(CorrectiveActions, CADisp)#").Width("100px").Title("CA Links");
|
||||
columns.Bound(l => l.PendingCAOwners).Width("100px").Title("Open CA Owners");
|
||||
columns.Bound(l => l.PendingCAFindingsAIOwners).Width("100px").Title("Open AI Owners");
|
||||
columns.Bound(l => l.AuditScore).Width("100px");
|
||||
columns.Bound(l => l.AuditStatus).Width("100px");
|
||||
|
||||
})
|
||||
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height:700px; width:100%; font-size: 11px" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Resizable(r => r.Columns(true))
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.AuditNo);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetAuditList", "Home"))
|
||||
//.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function formatIssueID(num) {
|
||||
var length = 5;
|
||||
var numStr = num.toString();
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
|
||||
numStr = 'A' + numStr
|
||||
return numStr;
|
||||
}
|
||||
|
||||
|
||||
function buildCALinks(CAs, CADisp) {
|
||||
var template = "";
|
||||
if (CAs != null) {
|
||||
var tempValue = CAs.split(',');
|
||||
var tempValueDisp = CADisp.split(',');
|
||||
for (var i = 0; i < tempValue.length; i++) {
|
||||
template += "<a href='/CorrectiveAction/Edit?IssueID=" + tempValue[i] + "'> " + tempValueDisp[i] + ",</a>" + " ";
|
||||
}
|
||||
|
||||
}
|
||||
return template;
|
||||
|
||||
}
|
||||
|
||||
</script>
|
96
Fab2ApprovalSystem/Views/Home/ChangeControlList.cshtml
Normal file
96
Fab2ApprovalSystem/Views/Home/ChangeControlList.cshtml
Normal file
@ -0,0 +1,96 @@
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Change Control List";
|
||||
}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
PCRB List
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="specialRequestdiv" class="k-content" style="font-size: 11px">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.ChangeControlList>()
|
||||
.Name("PCRBList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
|
||||
columns.Bound(l => l.IssueID)
|
||||
.ClientTemplate("<a href='/ChangeControl/Edit?IssueID=#=IssueID#'>#=MesaIdTitle#</a>").Width("50px");
|
||||
columns.Bound(l => l.StartDate).Format("{0:MM/dd/yy}").Width("50px");
|
||||
columns.Bound(l => l.Owner).Width("50px");
|
||||
columns.Bound(l => l.Title).Width("150px");
|
||||
columns.Bound(l => l.ChangeLevel).Width("50px");
|
||||
columns.Bound(l => l.PCRBStatus).Width("50px");
|
||||
columns.Bound(l => l.StatusDate).Format("{0:MM/dd/yy}").Width("50px");
|
||||
columns.Bound(l => l.Generations).Title("Affected Generations").Width("100px");
|
||||
columns.Bound(l => l.ToolTypes).Title("Affected Tools").Width("100px");
|
||||
columns.Bound(l => l.Processes).Title("Affected Processes").Width("100px").Encoded(false);
|
||||
columns.Bound(l => l.ActionItemResponsibility).Title("Responsibility for open actions").Width("150px").HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
|
||||
})
|
||||
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height:700px; width:100%; font-size: 11px" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Resizable(r => r.Columns(true))
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetChangeControlList", "Home"))
|
||||
//.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function formatIssueID(num) {
|
||||
var length = 4;
|
||||
var numStr = num.toString();
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
|
||||
numStr = 'P' + numStr
|
||||
return numStr;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
17
Fab2ApprovalSystem/Views/Home/Contact.cshtml
Normal file
17
Fab2ApprovalSystem/Views/Home/Contact.cshtml
Normal file
@ -0,0 +1,17 @@
|
||||
@{
|
||||
ViewBag.Title = "Contact";
|
||||
}
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<h3>@ViewBag.Message</h3>
|
||||
|
||||
<address>
|
||||
One Microsoft Way<br />
|
||||
Redmond, WA 98052-6399<br />
|
||||
<abbr title="Phone">P:</abbr>
|
||||
425.555.0100
|
||||
</address>
|
||||
|
||||
<address>
|
||||
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
|
||||
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
|
||||
</address>
|
97
Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml
Normal file
97
Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml
Normal file
@ -0,0 +1,97 @@
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Corrective Action List";
|
||||
}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
Corrective Action List
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="auditListdiv" class="k-content" style="font-size: 11px">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CorrectiveAction>()
|
||||
.Name("CAList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
|
||||
columns.Bound(l => l.CANo)
|
||||
.ClientTemplate("<a href='/CorrectiveAction/Edit?IssueID=#=CANo#'>#=formatIssueID(CANo)#</a>").Width("50px");
|
||||
|
||||
columns.Bound(l => l.CASource).Width("100px");
|
||||
columns.Bound(l => l.RequestorName).Title("Requestor").Width("250px");
|
||||
columns.Bound(l => l.D1AssigneeName).Title("Assignee").Width("100px");
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy}").Width("100px");
|
||||
columns.Bound(l => l.CATitle).Width("150px");
|
||||
columns.Bound(l => l.StatusName).Width("50px");
|
||||
columns.Bound(l => l.PendingApprovers).Width("100px");
|
||||
columns.Bound(l => l.PendingAIOwners).Width("100px").Title("Action Item Owners");
|
||||
columns.Bound(l => l.D8DueDate).Format("{0:MM/dd/yy}").Width("100px");
|
||||
columns.Bound(l => l.ClosedDate).Format("{0:MM/dd/yy}").Width("100px");
|
||||
|
||||
})
|
||||
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height:700px; width:100%; font-size: 11px" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Resizable(r => r.Columns(true))
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.CANo);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetCorrectiveActionList", "Home"))
|
||||
//.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function formatIssueID(num) {
|
||||
var length = 5;
|
||||
var numStr = num.toString();
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
|
||||
numStr = 'C' + numStr
|
||||
return numStr;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
304
Fab2ApprovalSystem/Views/Home/ECNList.cshtml
Normal file
304
Fab2ApprovalSystem/Views/Home/ECNList.cshtml
Normal file
@ -0,0 +1,304 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="~/Scripts/js.cookie.js" />
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>@ViewBag.Title</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
@*<body>*@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
|
||||
<label id="header" style="font-size: large; font-weight: bold; color: crimson; font-family: 'Times New Roman'">
|
||||
ECN List
|
||||
</label><br />
|
||||
<label id="headerID" style="font-size: small; font-weight: bold; color: blue; font-family: 'Times New Roman'">
|
||||
|
||||
</label>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="ecnTasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("ecnTasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
||||
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRowECN(this)' title='button delete'>button delete</a>");
|
||||
|
||||
})
|
||||
//.Events(e => e.DataBound("onAllDocsDB"))
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
//.Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetECNList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("ecnTasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
})
|
||||
//.Events(e => e.DataBound("onAllDocsDB"))
|
||||
// .Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
// .Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetECNList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="OOODialog" 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">Out Of Office for user: @User.Identity.GetUserName()</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</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="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function deleteRowECN(element) {
|
||||
grid = $("#ecnTasklist").data("kendoGrid");
|
||||
grid.removeRow($(element).closest("tr"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
291
Fab2ApprovalSystem/Views/Home/ECN_TECN.cshtml
Normal file
291
Fab2ApprovalSystem/Views/Home/ECN_TECN.cshtml
Normal file
@ -0,0 +1,291 @@
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table cellspacing="50" cellpadding="50" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="25%" valign="middle">
|
||||
<ul class="nav navbar-nav" id="myTab">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="color:blue">View Options<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu" style="font-size: 11px">
|
||||
<li><a href="#" id="PendingApprovals">Pending Approvals</a></li>
|
||||
<li><a href="#" id="ExpiredTECNs">Expired TECNs in the last 7 days</a></li>
|
||||
<li><a href="#" id="TECNtoECN">TECN Converted to ECN in the last 7 days</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
@*<td>
|
||||
<label>@Html.RadioButton("ABC", "Pending") Pending Approvals</label>
|
||||
<label>@Html.RadioButton("ABC", "Expired") Expired TECNS</label>
|
||||
<label>@Html.RadioButton("ABC", "Converted") Converted TECNs</label>
|
||||
</td>*@
|
||||
<td width="50%" colspan="2" align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
@ViewBag.ViewOption
|
||||
</td>
|
||||
<td width="25%">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="pendingApprovals" class="k-content" style="font-size: 11px">
|
||||
@if (ViewBag.ViewOption == "Pending Approvals")
|
||||
{
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("myECN_TECN")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetECN_TECNsPendingApproval", "Home")))
|
||||
|
||||
)
|
||||
}
|
||||
@if (ViewBag.ViewOption == "Expired TECNs")
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("myECN_TECN")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetMyExpiredTECNs", "Home")))
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@if (ViewBag.ViewOption == "Converted TECNs")
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("myECN_TECN")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetMyConvertedTECNsToECNs", "Home")))
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var dataType = "";
|
||||
function AddtionalInfo(e)
|
||||
{
|
||||
e.data = {
|
||||
dataType: dataType
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
$("#PendingApprovals").on('click', function () {
|
||||
|
||||
var url = '@Url.Action("ECN_TECN", "Home", new { viewOption = "Pending Approvals" })';
|
||||
window.location.href(url);
|
||||
return false;
|
||||
})
|
||||
|
||||
$("#ExpiredTECNs").on('click', function () {
|
||||
|
||||
var url = '@Url.Action("ECN_TECN", "Home", new { viewOption = "Expired TECNs" })';
|
||||
window.location.href(url);
|
||||
|
||||
return false;
|
||||
|
||||
})
|
||||
|
||||
$("#TECNtoECN").on('click', function () {
|
||||
|
||||
var url = '@Url.Action("ECN_TECN", "Home", new { viewOption = "Converted TECNs" })';
|
||||
window.location.href(url);
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
})
|
||||
|
||||
</script>
|
43
Fab2ApprovalSystem/Views/Home/Edit.cshtml
Normal file
43
Fab2ApprovalSystem/Views/Home/Edit.cshtml
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
|
||||
@model Fab2ApprovalSystem.Models.TestModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
<fieldset>
|
||||
<legend>TestModel</legend>
|
||||
|
||||
|
||||
<div class="editor-label">
|
||||
@Html.LabelFor(model => model.Name)
|
||||
</div>
|
||||
<div class="editor-field">
|
||||
@Html.EditorFor(model => model.Name)
|
||||
@Html.ValidationMessageFor(model => model.Name)
|
||||
</div>
|
||||
<div>
|
||||
@(Html.Kendo().MultiSelectFor(model => model.Countries)
|
||||
.Placeholder("Select Countires")
|
||||
.BindTo(Fab2ApprovalSystem.Misc.DemoHelper.GetCountries()))
|
||||
</div>
|
||||
<p>
|
||||
<input type="submit" value="Save" />
|
||||
</p>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
<div>
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
684
Fab2ApprovalSystem/Views/Home/Index.cshtml
Normal file
684
Fab2ApprovalSystem/Views/Home/Index.cshtml
Normal file
@ -0,0 +1,684 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@model Fab2ApprovalSystem.Models.LotDisposition
|
||||
@{
|
||||
ViewBag.Title = "Home Page";
|
||||
}
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
||||
<style>
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
</style>
|
||||
<nav class="navbar navbar-default" role="navigation" style="font-size: 11px">
|
||||
|
||||
<div class="container-fluid">
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
|
||||
<ul class="nav navbar-nav" id="myTab">
|
||||
<li><a href=@Url.Action("Index", "Home", new {tabName = "MyTasks"})>My Tasks</a></li>
|
||||
<li><a href=@Url.Action("Index", "Home", new { tabName = "AllTasks" })>All Documents</a></li>
|
||||
@*<li><a href=@Url.Action("ViewMyTrainingAssignments", "Training", new { userID = (int)Session[GlobalVars.SESSION_USERID] })>My Training</a></li>*@
|
||||
@*<li><a href=@Url.Action("SpecialWorkRequestList", "Home", new { tabName = "AllTasks" })>Special Work Requests</a></li>*@
|
||||
@*<li><a href="file:////temirwfp001.irworld.irf.com/UserData/QA/CommonRO/Projects/AVI Tool/">AVI Tool</a></li>*@
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Create New<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu" style="font-size: 11px">
|
||||
<li><a href=@Url.Action("Create", "LotDisposition")>Lot Dispostion</a></li>
|
||||
<li><a href=@Url.Action("Create", "MRB")>MRB</a></li>
|
||||
<li><a href=@Url.Action("Create", "ECN")>ECN</a></li>
|
||||
@*<li><a href=@Url.Action("CreateWorkRequest", "LotTraveler")>Create Special Work Request</a></li>*@
|
||||
@*<li><a href="#">Another Doc</a></li>*@
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
@*<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search" style="font-size: 11px">
|
||||
</div>*@
|
||||
@if (!(bool)Session[GlobalVars.OOO])
|
||||
{
|
||||
<button class="btn btn-default btn-primary" data-toggle="modal" id="OOO">Out Of Office</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-default btn-warning" id="OOOExpire">Expire OOO Status</button>
|
||||
}
|
||||
@*<button type="submit" class="btn btn-primary" style="font-size: 11px">Submit</button>*@
|
||||
</form>
|
||||
|
||||
<!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
|
||||
@if (ViewBag.ActiveTabName == "MyTasks")
|
||||
{
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight:bold; color: crimson">
|
||||
My Tasks
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="mytasklistdiv" class="k-content" style="font-size: 11px">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("mytasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.ItemStatus);
|
||||
columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Groupable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetTaskList", "Home")))
|
||||
.ClientRowTemplate(" <tr class=#:ItemStatus == 2? 'red':'white'# data-uid='#= uid #'>" +
|
||||
"<td> <a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a></td>" +
|
||||
"<td>#: DocumentType #</td>" +
|
||||
"<td>#: SubDoc #</td>" +
|
||||
"<td>#:Originator #</td>" +
|
||||
"<td>#: IssueDate #</td>" +
|
||||
"<td>#:Title #</td>" +
|
||||
"<td>#: LotNos #</td>" +
|
||||
"<td>#:PendingApprovers #</td>" +
|
||||
"<td>#:SubmitedDate #</td>" +
|
||||
"<td>#: CloseDate #</td> " +
|
||||
"<td>#: Item Status </td> " +
|
||||
"<td><button class='btn btn-warning btn-xs' id='Delegate' name='Refresh' onclick='showReAssignRole("#=PendingApprovers#","#=CloseDate#","#=DocID#", "#=DocumentType#","#=SubmitedDate#");'>Delegate</buton></td>" +
|
||||
"</tr>"
|
||||
)
|
||||
|
||||
|
||||
)
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<input type="hidden" id="currentTab" value="@ViewBag.ActiveTabName" />
|
||||
@if (ViewBag.ActiveTabName == "AllTasks")
|
||||
{
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
@*<tr>
|
||||
<td style="font-size: 12px; font-weight: bold; color: royalblue">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="IncludeAllDocuments"> Include Closed Documents
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>*@
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
All Documents
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="alltasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("alltasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
||||
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRow(this)' title='button delete'>button delete</a>");
|
||||
//columns.Command(command => command.Destroy());
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetDocuments", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("alltasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetDocuments", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="modal fade" id="OOODialog" 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">Out Of Office for user: @User.Identity.GetUserName()</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</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="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var issueID="";
|
||||
var docType = "";
|
||||
var submitdate = "";
|
||||
var userName = "@Session[@GlobalVars.SESSION_USERNAME].ToString()";
|
||||
|
||||
$(document).ready(function () {
|
||||
})
|
||||
|
||||
@*$("#mytasklist").on("dblclick", "tr.k-state-selected", function (e) {
|
||||
var grid = $("#mytasklist").data("kendoGrid");
|
||||
var row = e.currentTarget;
|
||||
var issueID = row.cells[0].innerText; //
|
||||
|
||||
var url = '@Url.Action("Edit", "LotDisposition", new { issueID = "__id__" })';
|
||||
window.location.href = url.replace('__id__', issueID);
|
||||
})
|
||||
|
||||
$("#alltasklist").on("dblclick", "tr.k-state-selected", function (e) {
|
||||
var grid = $("#mytalltasklistasklist").data("kendoGrid");
|
||||
var row = e.currentTarget;
|
||||
var issueID = row.cells[0].innerText; //
|
||||
|
||||
var url = '@Url.Action("Edit", "LotDisposition", new { issueID = "__id__" })';
|
||||
window.location.href = url.replace('__id__', issueID);
|
||||
})*@
|
||||
|
||||
var userid = @Session[@GlobalVars.SESSION_USERID].ToString()
|
||||
|
||||
|
||||
$("#IncludeAllDocuments").on("click", function () {
|
||||
alert("clicked");
|
||||
})
|
||||
|
||||
|
||||
$('#OOO').on('click', function () {
|
||||
|
||||
|
||||
$("#OOODialog").modal('show');
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
$('#OOOExpire').on('click', function () {
|
||||
//alert('in');
|
||||
var tab = $('#currentTab').val();
|
||||
|
||||
var urlString = '@Url.Action("ExpireOOOStatus", "Home")'; // '/Home/ExpireOOOStatus';
|
||||
if (confirm('Are you sure you want to expire the OOO status')) {
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
tab: tab
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
|
||||
var url = '@Url.Action("Index", "Home", new { tabName = "rep" })';
|
||||
window.location.href(url.replace("rep", tab));
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result.responseText);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
$('#SaveOOOInfo').on('click', function () {
|
||||
var tab = $('#currentTab').val();
|
||||
var bfound = false;
|
||||
|
||||
if (userid == $("#DelegateTo").data("kendoDropDownList").value()) {
|
||||
alert('The OOO person cannot be same as the delegate to person');
|
||||
return false;
|
||||
}
|
||||
|
||||
var fullDate = new Date()
|
||||
|
||||
//convert month to 2 digits
|
||||
var twoDigitMonth = ((fullDate.getMonth().length + 1) === 1) ? (fullDate.getMonth() + 1) : '0' + (fullDate.getMonth() + 1);
|
||||
|
||||
var tempCurrentDate = twoDigitMonth + "/" + fullDate.getDate() + "/" + fullDate.getFullYear();
|
||||
var arrCurrDate = tempCurrentDate.split('/');
|
||||
var currentDate = new Date(arrCurrDate[2], arrCurrDate[0] - 1, arrCurrDate[1]);
|
||||
|
||||
|
||||
|
||||
|
||||
if (!$("#txtStartDate").val() || !$("#txtEndDate").val()) {
|
||||
alert('Start or the End Date cannot be blank');
|
||||
return false;
|
||||
}
|
||||
|
||||
var stDateEntered = $("#txtStartDate").val();
|
||||
var arrStDate = stDateEntered.split('/');
|
||||
var stDate = new Date(arrStDate[2], arrStDate[0] - 1, arrStDate[1]);
|
||||
|
||||
var endDateEntered = $("#txtEndDate").val();
|
||||
var arrEndDate = endDateEntered.split('/');
|
||||
var endDate = new Date(arrEndDate[2], arrEndDate[0] - 1, arrEndDate[1]);
|
||||
|
||||
if (stDate < currentDate) {
|
||||
alert("Start Date should be greater than or equal the Current Date ");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (endDate <= stDate) {
|
||||
|
||||
alert("The End Date should be greater than the Start Date ");
|
||||
return false;
|
||||
}
|
||||
$("#OOODialog").modal('hide');
|
||||
|
||||
//var urlString = '/Home/SetOOOStatus';
|
||||
var urlString = '@Url.Action("SetOOOStatus", "Home")';
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
//oooUserID: userids,
|
||||
delegatedTo: $("#DelegateTo").data("kendoDropDownList").value(),
|
||||
startDate: $("#txtStartDate").val(),
|
||||
endDate: $("#txtEndDate").val(),
|
||||
tab: tab
|
||||
},
|
||||
success: function (result) {
|
||||
if (result == "9") {
|
||||
alert('The user which you selected for Delegation has already been assigned to another user for Delegation\n Please select a different user for Delgation')
|
||||
}
|
||||
else {
|
||||
var url = '@Url.Action("Index", "Home", new { tabName = "rep" })';
|
||||
window.location.href(url.replace("rep", tab));
|
||||
}
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result.responseText);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
|
||||
function deleteRow(element) {
|
||||
grid = $("#alltasklist").data("kendoGrid");
|
||||
grid.removeRow($(element).closest("tr"));
|
||||
//grid.removeRow($(element));
|
||||
}
|
||||
|
||||
|
||||
function showReAssignRole(_pendingApprovers, _closeDate, _issueID, _docType, _submitDate) {
|
||||
//alert(_closeDate);;
|
||||
//alert(_pendingApprovers);
|
||||
if (_pendingApprovers.indexOf(userName) == -1)
|
||||
{
|
||||
alert("You are not one of the approvers for this document");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_submitDate == 'null')
|
||||
{
|
||||
alert("Cannot delegate the document as it has not been submitted yet");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_closeDate != 'null') {
|
||||
alert("Cannot delegate as the approval loop has already been closed");
|
||||
return;
|
||||
}
|
||||
|
||||
issueID = _issueID;
|
||||
docType = _docType;
|
||||
|
||||
submitdate = _submitDate;
|
||||
|
||||
$('#ReAssignApproverFromLabel').text(userName);
|
||||
// var searchText = ($("#txtSearch").val());
|
||||
var url = "/Home/GetAllUsersList";
|
||||
var source =
|
||||
{
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'UserID' },
|
||||
{ name: 'FullName' }
|
||||
],
|
||||
id: 'id',
|
||||
url: url,
|
||||
};
|
||||
var dataAdapter = new $.jqx.dataAdapter(source);
|
||||
// Create a jqxListBox
|
||||
$("#lstReAssignApproval").jqxListBox({
|
||||
multipleextended: false, theme: "arctic", source: dataAdapter, displayMember: "FullName", valueMember: "UserID", width: 200, height: 250
|
||||
});
|
||||
|
||||
$("#ReAssignApproval").modal('show');
|
||||
|
||||
|
||||
//alert(dataItem.FullName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#ConfirmReAssignment').on('click', function () {
|
||||
// get selected items.
|
||||
var bfound = false;
|
||||
var userids;
|
||||
var itemsToAdd = $('#lstReAssignApproval').jqxListBox('getSelectedItems');
|
||||
|
||||
if (itemsToAdd.length > 0) {
|
||||
for (var i = 0; i < itemsToAdd.length; i++) {
|
||||
if (itemsToAdd[i].label != undefined) {
|
||||
var tempvalue = itemsToAdd[i].value;
|
||||
var templabel = itemsToAdd[i].label;
|
||||
if (userids == null)
|
||||
userids = tempvalue;
|
||||
else
|
||||
userids += "~" + tempvalue;
|
||||
}
|
||||
};
|
||||
//
|
||||
|
||||
ReAssignApproval(userids);
|
||||
}
|
||||
$("#ReAssignApproval").modal('hide');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var ReAssignApproval = function (userids) {
|
||||
var urlString = '/Home/DelegateDocumentApproval';
|
||||
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
|
||||
issueID: issueID,
|
||||
delegateTo: userids,
|
||||
ecnTypeString: docType
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
var grid = $("#mytasklist").data("kendoGrid");
|
||||
grid.dataSource.read();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
300
Fab2ApprovalSystem/Views/Home/LotDispositionList.cshtml
Normal file
300
Fab2ApprovalSystem/Views/Home/LotDispositionList.cshtml
Normal file
@ -0,0 +1,300 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="~/Scripts/js.cookie.js" />
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>@ViewBag.Title</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
@*<body>*@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
|
||||
<label id="header" style="font-size: large; font-weight: bold; color: crimson; font-family: 'Times New Roman'">
|
||||
Lot Disposition
|
||||
</label><br />
|
||||
<label id="headerID" style="font-size: small; font-weight: bold; color: blue; font-family: 'Times New Roman'">
|
||||
|
||||
</label>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="LotDispoTasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("LotDispoTasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
||||
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRow(this)' title='button delete'>button delete</a>");
|
||||
|
||||
})
|
||||
//.Events(e => e.DataBound("onAllDocsDB"))
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
//.Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetLotDispositionList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("LotDispoTasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
})
|
||||
//.Events(e => e.DataBound("onAllDocsDB"))
|
||||
// .Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
// .Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetLotDispositionList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="OOODialog" 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">Out Of Office for user: @User.Identity.GetUserName()</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</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="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
417
Fab2ApprovalSystem/Views/Home/MRBList.cshtml
Normal file
417
Fab2ApprovalSystem/Views/Home/MRBList.cshtml
Normal file
@ -0,0 +1,417 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="~/Scripts/js.cookie.js" />
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>@ViewBag.Title</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
@*<body>*@
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%" border="0">
|
||||
<tr>
|
||||
<td width="30%"> </td>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson" width="30%">
|
||||
<label id="header" style="font-size: large; font-weight: bold; color: crimson; font-family: 'Times New Roman'">
|
||||
MRB
|
||||
</label>
|
||||
</td>
|
||||
<td width="40%">
|
||||
<table style="width: 100%" class="pull-right" border="0">
|
||||
<tr>
|
||||
<td class="pull-right"></td>
|
||||
<td class="pull-right">
|
||||
<table class="pull-right">
|
||||
<tr>
|
||||
<td class="pull-right">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("AddQDBFlag")
|
||||
.Messages(m => m.Select("Add QDB Flag"))
|
||||
.Async(a => a.Save("ImportAddQDBFlag", "MRB", new { operation = "A" }).AutoUpload(true))
|
||||
.ShowFileList(false)
|
||||
.Events(events => events.Error("onLotUploadError").Upload("onLotUpload").Success("onSuccess"))
|
||||
|
||||
)
|
||||
}
|
||||
</td>
|
||||
<td class="pull-right">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("RemoveQDBFlag")
|
||||
.Messages(m => m.Select("Remove QDB Flag"))
|
||||
.Async(a => a.Save("ImportRemoveQDBFlag", "MRB", new { operation = "R" }).AutoUpload(true))
|
||||
.ShowFileList(false)
|
||||
.Events(events => events.Error("onLotUploadError").Upload("onLotUpload").Success("onSuccess"))
|
||||
|
||||
)
|
||||
}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="mrbTasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("mrbTasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
||||
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRow(this)' title='button delete'>button delete</a>");
|
||||
|
||||
})
|
||||
//.Events(e => e.DataBound("onAllDocsDB"))
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
//.Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetMRBList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("mrbTasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
})
|
||||
//.Events(e => e.DataBound("onAllDocsDB"))
|
||||
// .Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
// .Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetMRBList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="OOODialog" 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">Out Of Office for user: @User.Identity.GetUserName()</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</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="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
//$('#SendMRBSPNFlag').on('click', function () {
|
||||
// if (confirm('Are you sure you want to send the MRB Flag to SPN')) {
|
||||
// $('#pleaseWaitDialog').modal('show');
|
||||
// $.ajax({
|
||||
// url: "/MRB/SendSPN_MRB_HoldFlag",
|
||||
// type: "GET",
|
||||
// datatype: "json",
|
||||
// data: {
|
||||
// mrbNumber: $("#txtMRBNumber").val()
|
||||
// },
|
||||
// success: function (data) {
|
||||
// $('#pleaseWaitDialog').modal('hide');
|
||||
// if (data.Error) {
|
||||
// alert(data.Message);
|
||||
// }
|
||||
// },
|
||||
// error: function () {
|
||||
// alert("Failed ");
|
||||
// $('#pleaseWaitDialog').modal('hide');
|
||||
// }
|
||||
|
||||
// });
|
||||
// }
|
||||
// return false
|
||||
//});
|
||||
|
||||
|
||||
function onFileUploadSuccess(e) {
|
||||
|
||||
}
|
||||
|
||||
function checkFileType(e) {
|
||||
var files = e.files;
|
||||
|
||||
if (confirm("Are you sure you want to set the QDB Flag"))
|
||||
{
|
||||
e.preventDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt|.slddrw|.sldprt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function onLotUploadError(e) {
|
||||
//alert("Please make sure the 'Name of the Sheet' in the excel file which you are trying to use, is called 'Sheet1'");
|
||||
if (e.XMLHttpRequest.responseText != '')
|
||||
alert(e.XMLHttpRequest.responseText);
|
||||
|
||||
}
|
||||
|
||||
function onLotUpload(e) {
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
if (this.extension.toLowerCase() != ".xls" && this.extension.toLowerCase() != ".xlsx") {
|
||||
alert("Only an excel file can be used to import Lots!")
|
||||
e.preventDefault();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
function onSuccess(e)
|
||||
{
|
||||
alert("Operation completed");
|
||||
}
|
||||
|
||||
</script>
|
682
Fab2ApprovalSystem/Views/Home/MyTasks.cshtml
Normal file
682
Fab2ApprovalSystem/Views/Home/MyTasks.cshtml
Normal file
@ -0,0 +1,682 @@
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="panel panel-default">
|
||||
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<row>
|
||||
<div class="col-sm-6 k-content" id="mytasklistdiv" class="k-content" style="font-size: 11px">
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
My Tasks
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("mytasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=formatIssueID(IssueID, DocumentType)#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
//columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
//columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
//columns.Bound(l => l.LotNos);
|
||||
//columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.ItemStatus);
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 350px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Events(e => e.Error("MyTasksErrorHandler"))
|
||||
.Read(read => read.Action("GetTaskList", "Home")))
|
||||
.ClientRowTemplate(" <tr class=#:ItemStatus == 2? 'red':'white'# data-uid='#= uid #'>" +
|
||||
"<td> <a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=formatIssueID(IssueID, DocumentType)#</a></td>" +
|
||||
"<td>#: DocumentType #</td>" +
|
||||
//"<td>#: SubDoc #</td>" +
|
||||
"<td>#:Originator #</td>" +
|
||||
//"<td>#: IssueDate #</td>" +
|
||||
"<td>#:Title #</td>" +
|
||||
"<td>#:ItemStatus #</td>" +
|
||||
//"<td>#: LotNos #</td>" +
|
||||
//"<td>#:PendingApprovers #</td>" +
|
||||
"<td>#=FormatDate(SubmitedDate)#</td>" +
|
||||
//"<td>#: CloseDate #</td> " +
|
||||
"<td><button class='btn btn-warning btn-xs' id='Delegate' name='Refresh' onclick='showReAssignRole("#=PendingApprovers#","#=CloseDate#","#=DocID#", "#=DocumentType#","#=SubmitedDate#");'>Delegate</buton></td>" +
|
||||
"</tr>"
|
||||
)
|
||||
|
||||
|
||||
)
|
||||
</div>
|
||||
<div class="col-sm-6 k-content" id="myInboxListtdiv" style="font-size: 11px">
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
My Open Action Items
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.OpenActionItemViewModel>()
|
||||
.Name("myInbox")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
// .ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=formatIssueID(IssueID, DocumentType)#</a>");
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=formatIssueID(IssueID, DocumentType, pcrMesaID)#</a>");
|
||||
//columns.Bound(l => l.pcrMesaID);
|
||||
columns.Bound(l => l.DocumentTypeDisplay);
|
||||
|
||||
//columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
//columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.AssignedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Bound(l => l.LotNos);
|
||||
//columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.DueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 350px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Events(e => e.Error("MyTasksErrorHandler"))
|
||||
.Read(read => read.Action("GetMyOpenActionItems", "Home"))
|
||||
// .ClientRowTemplate(" <tr class=#:ItemStatus == 2? 'red':'white'# data-uid='#= uid #'>" +
|
||||
// "<td> <a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=formatIssueID(IssueID, DocumentType)#</a></td>" +
|
||||
// "<td>#: DocumentType #</td>" +
|
||||
// "<td>#:Originator #</td>" +
|
||||
// "<td>#=FormatDate(AssignedDate)#</td>" +
|
||||
// "<td>#=FormatDate(DueDate)#</td>" +
|
||||
//"</tr>"
|
||||
)
|
||||
)
|
||||
</div>
|
||||
|
||||
</row>
|
||||
</div>
|
||||
<div id="mytasklistdiv" class="k-content" style="font-size: 11px">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@if (Convert.ToBoolean(Session[GlobalVars.CAN_CREATE_PARTS_REQUEST]) && !Convert.ToBoolean(Session[GlobalVars.IS_ADMIN]))
|
||||
{
|
||||
<br /><br />
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
My New/Repair Spare Parts Requests
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="k-content" style="font-size: 11px">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.MyPartsRequestList>()
|
||||
.Name("myPartsRequests")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.PRNumber).Template(@<text> @Html.ActionLink(@item.PRNumber.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/PartsRequest/Edit?IssueID=#=PRNumber#'>#=formatIssueID(PRNumber, 'PartsRequest')#</a>");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.Requestor);
|
||||
columns.Bound(l => l.TechLead);
|
||||
columns.Bound(l => l.SubmitDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Status);
|
||||
columns.Bound(l => l.WorkFlowStepName);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 250px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetMyPartsRequestsList", "Home")))
|
||||
|
||||
)
|
||||
</div>
|
||||
}
|
||||
|
||||
<br /><br />
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
All TECNs
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="k-content" style="font-size: 11px">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("all_TECN")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.ExpirationDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 350px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetAllTECNs", "Home")))
|
||||
|
||||
|
||||
)
|
||||
|
||||
</div>
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
Pending Approvals originated by me
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="k-content" style="font-size: 11px">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("myECN_TECNPending")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 350px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetECN_TECNsPendingApproval", "Home")))
|
||||
|
||||
)
|
||||
</div>
|
||||
<br /><br />
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
Expiring TECNs in the NEXT 7 days originated my me
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="k-content" style="font-size: 11px">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("myECN_TECNExpiring")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 350px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetMyExpiringTECNs", "Home")))
|
||||
|
||||
)
|
||||
</div>
|
||||
<br /><br />
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
Expired TECNs in the LAST 7 days originated by me
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="k-content" style="font-size: 11px">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("myECN_TECNExpired")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 350px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetMyExpiredTECNs", "Home")))
|
||||
|
||||
)
|
||||
|
||||
</div>
|
||||
<br /><br />
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
TECNs converted to ECNs in the LAST 7 days originated by me
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="k-content" style="font-size: 11px">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("myECN_TECNConverted")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy: hh:mm:ss}"); ;
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" });
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Command(command => command.Custom("Re-Assign").Click("showReAssignRole")).Width("100px");
|
||||
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.HtmlAttributes(new { style = "height: 350px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetMyConvertedTECNsToECNs", "Home")))
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function MyTasksErrorHandler(e) {
|
||||
alert("Error while loading the Task List");
|
||||
|
||||
}
|
||||
|
||||
function FormatDate(sdate)
|
||||
{
|
||||
if (sdate != null) {
|
||||
var d = new Date(sdate);
|
||||
var str = $.datepicker.formatDate('yy-mm-dd', d);
|
||||
|
||||
|
||||
return (d.getMonth() + 1) + '/' + d.getDate() + '/' + d.getFullYear();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function formatIssueID(num, docType, mesaPCRBId) {
|
||||
var length = 5;
|
||||
var numStr = num.toString();
|
||||
|
||||
if (docType == 'CorrectiveAction')
|
||||
{
|
||||
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
|
||||
numStr = 'C' + numStr
|
||||
}
|
||||
|
||||
if (docType == 'ChangeControl' && mesaPCRBId != "")
|
||||
{
|
||||
return mesaPCRBId;
|
||||
//var url = "/ChangeControl/GetPCRBMesaTitle";
|
||||
////Console.Log();
|
||||
//console.log(num + " " + docType)
|
||||
//$.ajax({
|
||||
// url: url,
|
||||
// type: "GET",
|
||||
// dataType: "html",
|
||||
// data: {
|
||||
// issueID: num
|
||||
// },
|
||||
// success: function (data) {
|
||||
|
||||
// return data;
|
||||
// console.log(numStr);
|
||||
|
||||
// },
|
||||
// error: function (result) {
|
||||
// console.log("Failed " + result);
|
||||
// }
|
||||
//});
|
||||
}
|
||||
|
||||
if (docType == 'Audit')
|
||||
{
|
||||
var length = 5;
|
||||
var numStr = num.toString();
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
|
||||
numStr = 'A' + numStr
|
||||
|
||||
}
|
||||
|
||||
if (docType == 'PartsRequest')
|
||||
{
|
||||
var length = 6;
|
||||
var numStr = num.toString();
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
|
||||
numStr = 'PR' + numStr
|
||||
|
||||
}
|
||||
|
||||
|
||||
return numStr;
|
||||
}
|
||||
|
||||
</script>
|
59
Fab2ApprovalSystem/Views/Home/OutOfOffice.cshtml
Normal file
59
Fab2ApprovalSystem/Views/Home/OutOfOffice.cshtml
Normal file
@ -0,0 +1,59 @@
|
||||
@model Fab2ApprovalSystem.ViewModels.OOOViewModel
|
||||
@{
|
||||
ViewBag.Title = "OutOfOffice";
|
||||
}
|
||||
@{
|
||||
Layout = "_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2>OutOfOffice</h2>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 11px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal col-sm-4">
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Issue #</label>
|
||||
@*<div class="col-sm-4 col-sm-4">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("OOOUser")
|
||||
.BindTo(new SelectList(ViewBag.Owners, "UserID", "FullName"))
|
||||
.Value(Model.OOOUser.ToString())
|
||||
)
|
||||
</div>*@
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form-horizontal col-sm-4">
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Issue #</label>
|
||||
@*<div class="col-sm-4 col-sm-4">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegatedToUser")
|
||||
.BindTo(new SelectList(ViewBag.Owners, "UserID", "FullName"))
|
||||
.Value(Model.DelegatedToUser.ToString())
|
||||
)
|
||||
</div>*@
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
@*<div class="form-horizontal col-sm-4">
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Issue #</label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("OwnerID")
|
||||
.BindTo(new SelectList(ViewBag.Owners, "UserID", "FullName"))
|
||||
.Value(Model.OOOUser.ToString())
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
97
Fab2ApprovalSystem/Views/Home/PartsRequestList.cshtml
Normal file
97
Fab2ApprovalSystem/Views/Home/PartsRequestList.cshtml
Normal file
@ -0,0 +1,97 @@
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
@{
|
||||
ViewBag.Title = "New/Repair Spare Parts Request List";
|
||||
}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
@ViewBag.Title
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="npListdiv" class="k-content" style="font-size: 11px">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.PartsRequestList>()
|
||||
.Name("PartsRequestList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.PRNumber)
|
||||
.ClientTemplate("<a href='/PartsRequest/Edit?IssueID=#=PRNumber#'>#=formatIssueID(PRNumber)#</a>").Width("100px");
|
||||
columns.Bound(l => l.Title).Width("250px");
|
||||
columns.Bound(l => l.Originator).Width("125px");
|
||||
columns.Bound(l => l.Requestor).Width("125px");
|
||||
columns.Bound(l => l.TechLead).Width("125px");
|
||||
columns.Bound(l => l.Status).Width("100px");
|
||||
columns.Bound(l => l.PendingApprovers);
|
||||
|
||||
if (Convert.ToBoolean(ViewBag.CanDeletePR))
|
||||
{
|
||||
columns.Template(@<text></text>).ClientTemplate(@"<a class=""k-grid-delete abutton delete"" href=""\#"">Delete</a>").Width(30);
|
||||
}
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height:700px; width:100%; font-size: 11px" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Resizable(r => r.Columns(true))
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
))
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.PRNumber);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetPartsRequestList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeletePR", "Home"))
|
||||
.Events(events => events.Error("errorHandler"))
|
||||
)
|
||||
)
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function formatIssueID(num) {
|
||||
var length = 6;
|
||||
var numStr = num.toString();
|
||||
while (numStr.length < length) {
|
||||
numStr = '0' + numStr;
|
||||
}
|
||||
|
||||
numStr = 'PR' + numStr
|
||||
return numStr;
|
||||
}
|
||||
function errorHandler(e, status) {
|
||||
$("#PartsRequestList").data("kendoGrid").cancelChanges();
|
||||
if (e.errorThrown != null) {
|
||||
alert("Error: " + e.errorThrown);
|
||||
} else {
|
||||
alert("Server error");
|
||||
}
|
||||
}
|
||||
</script>
|
441
Fab2ApprovalSystem/Views/Home/SpecialWorkRequestList.cshtml
Normal file
441
Fab2ApprovalSystem/Views/Home/SpecialWorkRequestList.cshtml
Normal file
@ -0,0 +1,441 @@
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Special Work Request";
|
||||
}
|
||||
|
||||
@*<h2>Work Request / LotTravelers</h2>*@
|
||||
<body onload="LoadSWRFilter();" onunload="SaveSWRFilter()">
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
Work Requests/Lot Travelers
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<label id="headerID" style="font-size: small; font-weight: bold; color: blue; font-family: 'Times New Roman'">
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="specialRequestdiv" class="k-content" style="font-size: 11px">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("WorkRequests")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
})
|
||||
.Events(e => e.DataBound("onWorkRequestsDB"))
|
||||
.ClientDetailTemplateId("template")
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height:700px; width:100%; font-size: 11px" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetWorkRequests", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script id="template" type="text/kendo-tmpl">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTLot>()
|
||||
.Name("Lots_#=IssueID#")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.WorkRequestID).Visible(false);
|
||||
columns.Bound(a => a.LotNumber).Width("50px"); ;
|
||||
columns.Bound(a => a.WIPPartNumber).Width("50px"); ;
|
||||
columns.Bound(a => a.WaferQty).Width("50px"); ;
|
||||
columns.Bound(a => a.PartDescription).Width("150px"); ;
|
||||
columns.Bound(a => a.Process).Width("50px"); ;
|
||||
columns.Bound(a => a.Location).Width("50px"); ;
|
||||
columns.Bound(a => a.Operation).Width("50px"); ;
|
||||
columns.Bound(a => a.LotStatus).Width("25px"); ;
|
||||
columns.Bound(a => a.LotTravelerCurrentRevision).Width("50px");
|
||||
columns.Bound(a => a.TravelerStatus).Width("50px");
|
||||
columns.Bound(a => a.UploadedByName).Width("50px");
|
||||
@*columns.Bound(a => a.ID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='http://10.72.100.74/user/wsr2/wsr_lot.php?lot=\\#=LotNumber\\#' target='_blank'>View</a>").Title("History").Width("50px");
|
||||
|
||||
columns.Bound(p => p.ButtonAttrib).ClientTemplate("\\#=buildUpdateCreateButtons(ButtonAttrib)\\#").Width("50px").Title("");
|
||||
columns.Bound(p => p.ButtonAttrib).ClientTemplate("\\#=buildUpdateDeleteExecuteButtons(ButtonAttrib)\\#").Width("50px").Title("");*@
|
||||
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:200px; width:100%; font-size: 10px" })
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(20)
|
||||
.Read(read => read.Action("GetLotList", "Home", new { workRequestID = "#=IssueID#" }))
|
||||
)
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.ToClientTemplate()
|
||||
)
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function buildUpdateCreateButtons(data) {
|
||||
//alert(approvalid + ' ');
|
||||
var ltLotID;
|
||||
var workRequestID;
|
||||
var travelerGenerated;
|
||||
|
||||
var temp = data.split('~');
|
||||
travelerGenerated = temp[0];
|
||||
ltLotID = temp[1];
|
||||
workRequestID = temp[2];
|
||||
//alert(data);
|
||||
|
||||
var template = "";
|
||||
if (travelerGenerated == 'True') {
|
||||
template += '<input type="button" value="Update Traveler" class="btn btn-warning btn-xs" id="UpdateTravlerID" onclick="DisplayLotTravlerForUpdate(\'' + ltLotID + '\')" style="font-size: 10px;"/>';
|
||||
|
||||
}
|
||||
else {
|
||||
template += '<input type="button" value="Create Traveler" class="btn btn-warning btn-xs" id="CreateTravelerID" onclick="CreateTraveler(\'' + ltLotID + '\', \'' + workRequestID + '\')" style="font-size: 10px"/>';
|
||||
}
|
||||
//alert(template);
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
function buildUpdateDeleteExecuteButtons(data) {
|
||||
//alert(approvalid + ' ');
|
||||
var ltLotID;
|
||||
var workRequestID;
|
||||
var travelerGenerated;
|
||||
|
||||
var temp = data.split('~');
|
||||
travelerGenerated = temp[0];
|
||||
ltLotID = temp[1];
|
||||
workRequestID = temp[2];
|
||||
|
||||
var template = "";
|
||||
if (travelerGenerated == 'True') {
|
||||
template += '<input type="button" value="Execute Traveler" class="btn btn-warning btn-xs" id="ExecTravelerID" onclick="DisplayLotTravlerForExecute(\'' + ltLotID + '\')" style="font-size: 10px"/>';
|
||||
}
|
||||
else {
|
||||
template += '<input type="button" value="Delete Lot" class="btn btn-warning btn-xs" id="DeleteLotID" onclick="DeleteLot(\'' + ltLotID + '\')" style="font-size: 10px"/>';
|
||||
}
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
function DisplayLotTravlerForUpdate(ltLotID) {
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/LotTraveler/DisplayLotTraveler",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: {
|
||||
ltLotID: ltLotID
|
||||
},
|
||||
success: function (data) {
|
||||
if (data == 'Update') {
|
||||
var url = '@Url.Action("LotTravelerUpdate", "LotTraveler", new { ltLotID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', ltLotID);
|
||||
}
|
||||
else {
|
||||
|
||||
var url = '@Url.Action("LotTravelerReadonly", "LotTraveler", new { ltLotID = "__id__", revisionNumber = "__revID__" })';
|
||||
var temp = data.split('~');
|
||||
|
||||
url = url.replace('__revID__', temp[1])
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', ltLotID);
|
||||
}
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function DisplayLotTravlerForExecute(ltLotID) {
|
||||
|
||||
@*var url = '@Url.Action("LotTravelerExecute", "LotTraveler", new { ltLotID = "__id__" })';
|
||||
window.location.href = url.replace('__id__', ltLotID);*@
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/LotTraveler/DisplayLotTravelerForExecute",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: {
|
||||
ltLotID: ltLotID
|
||||
},
|
||||
success: function (data) {
|
||||
if (data == 'Execute') {
|
||||
var url = '@Url.Action("LotTravelerExecute", "LotTraveler", new { ltLotID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', ltLotID);
|
||||
}
|
||||
else {
|
||||
|
||||
var url = '@Url.Action("LotTravelerReadonly", "LotTraveler", new { ltLotID = "__id__", revisionNumber = "__revID__" })';
|
||||
var temp = data.split('~');
|
||||
|
||||
url = url.replace('__revID__', temp[1])
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', ltLotID);
|
||||
}
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function CreateTraveler(ltLotID, workRequestID) {
|
||||
$.ajax({
|
||||
url: "/LotTraveler/CreateTaveler",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: {
|
||||
ltLotID: ltLotID,
|
||||
workRequestID: workRequestID
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
var grid = $("#Lots").data("kendoGrid");
|
||||
grid.dataSource.read(workRequestID);
|
||||
|
||||
alert("Lot Traveler Created!")
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function DeleteLot(ltLotID) {
|
||||
if (confirm("Are you sure you want to proceed with the DELETE operation")) {
|
||||
$.ajax({
|
||||
url: "/LotTraveler/DeleteLot",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: {
|
||||
ltLotID: ltLotID
|
||||
},
|
||||
success: function () {
|
||||
|
||||
var grid = $("#Lots").data("kendoGrid");
|
||||
grid.dataSource.read(workRequestID);
|
||||
|
||||
alert("Lot Deleted")
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function LoadSWRFilter() {
|
||||
//alert("load");
|
||||
var grid = $("#WorkRequests").data("kendoGrid");
|
||||
|
||||
var dataSource = grid.dataSource;
|
||||
$.ajax({
|
||||
url: "/Home/LoadSWRFilter",
|
||||
success: function (state) {
|
||||
//alert(state);
|
||||
state = JSON.parse(state);
|
||||
|
||||
var options = grid.options;
|
||||
|
||||
|
||||
//options.dataSource.page = state.page;
|
||||
//options.dataSource.pageSize = state.pageSize;
|
||||
//options.dataSource.sort = state.sort;
|
||||
options.dataSource.filter = state.filter;
|
||||
//options.dataSource.group = state.group;
|
||||
displaySWRfilter(state.filter);
|
||||
|
||||
grid.destroy();
|
||||
|
||||
$("#WorkRequests")
|
||||
.empty()
|
||||
.kendoGrid(options);
|
||||
|
||||
|
||||
},
|
||||
erro: function (result) {
|
||||
alert("Failed")
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function SaveSWRFilter() {
|
||||
// alert("save");
|
||||
var grid = $("#WorkRequests").data("kendoGrid");
|
||||
|
||||
var dataSource = grid.dataSource;
|
||||
|
||||
var state = {
|
||||
//page: dataSource.page(),
|
||||
//pageSize: dataSource.pageSize(),
|
||||
//sort: dataSource.sort(),
|
||||
filter: dataSource.filter()
|
||||
//group: dataSource.group()
|
||||
};
|
||||
var str = JSON.stringify(state);
|
||||
|
||||
$.ajax({
|
||||
url: "/Home/SaveSWRFilter",
|
||||
data: {
|
||||
data: JSON.stringify(state)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function displaySWRfilter(filter) {
|
||||
|
||||
var currentFilter = filter; // get current filter
|
||||
|
||||
// create HTML representation of the filter (this implementation works only for simple cases)
|
||||
var filterHtml = "";
|
||||
if (currentFilter != null) {
|
||||
currentFilter.filters.forEach(function (filter, index) {
|
||||
|
||||
filterHtml += "[" + filter.field + " " +
|
||||
filter.operator + " " +
|
||||
"'" + filter.value + "'] ";
|
||||
|
||||
if (currentFilter.filters.length > 1 && index !== currentFilter.filters.length - 1) {
|
||||
filterHtml += " " + currentFilter.logic + " ";
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// display it somewhere
|
||||
$("#filter").html(filterHtml);
|
||||
if (filterHtml != '') {
|
||||
$("#headerID").text(" Filter = " + filterHtml)
|
||||
$("#headerID").css("color", "blue");
|
||||
}
|
||||
else {
|
||||
$("#headerID").text("");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function onWorkRequestsDB(e) {
|
||||
var grid = $("#WorkRequests").data("kendoGrid");
|
||||
|
||||
var dataSource = grid.dataSource;
|
||||
|
||||
var state = {
|
||||
//page: dataSource.page(),
|
||||
//pageSize: dataSource.pageSize(),
|
||||
//sort: dataSource.sort(),
|
||||
filter: dataSource.filter()
|
||||
}
|
||||
|
||||
|
||||
displaySWRfilter(dataSource.filter());
|
||||
}
|
||||
|
||||
|
||||
</script>
|
224
Fab2ApprovalSystem/Views/Home/TrainingList.cshtml
Normal file
224
Fab2ApprovalSystem/Views/Home/TrainingList.cshtml
Normal file
@ -0,0 +1,224 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="~/Scripts/js.cookie.js" />
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>@ViewBag.Title</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
@*<body>*@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
|
||||
<label id="header" style="font-size: large; font-weight: bold; color: crimson; font-family: 'Times New Roman'">
|
||||
Training List
|
||||
</label><br />
|
||||
<label id="headerID" style="font-size: small; font-weight: bold; color: blue; font-family: 'Times New Roman'">
|
||||
|
||||
</label>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="traininglistdiv" class="k-content" style="font-size: 11px;">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Training>()
|
||||
.Name("Traininglist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
|
||||
columns.Bound(l => l.TrainingID);
|
||||
//columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.Status);
|
||||
})
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.TrainingID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
//.Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetTrainingList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="modal fade" id="OOODialog" 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">Out Of Office for user: @User.Identity.GetUserName()</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@@*
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</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="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" 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">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
505
Fab2ApprovalSystem/Views/Home/_HomeLayout.cshtml
Normal file
505
Fab2ApprovalSystem/Views/Home/_HomeLayout.cshtml
Normal file
@ -0,0 +1,505 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>@ViewBag.Title - Mesa Approval</title>
|
||||
@Styles.Render("~/Content/kendo/css")
|
||||
@Styles.Render("~/Content/css")
|
||||
@Styles.Render("~/Content/jqw/css")
|
||||
|
||||
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/kendo")
|
||||
|
||||
|
||||
@*<script src="~/Scripts/bootstrap.js"></script>
|
||||
<script src="~/Scripts/respond.js"></script>*@
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
@Scripts.Render("~/Content/jqw/jq")
|
||||
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
||||
<style>
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.k-menu .k-link
|
||||
{
|
||||
color: crimson;
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="navbar-inner">
|
||||
<div class=" navbar navbar-inverse navbar-fixed-top">
|
||||
<div>
|
||||
<div class="navbar-header">
|
||||
@if (Request.IsAuthenticated)
|
||||
{
|
||||
@*@Html.ActionLink("Home", "Index", "Home", new { tabName = "MyTasks" }, new { @class = "navbar-brand" })*@
|
||||
@Html.ActionLink("Home", "MyTasks", "Home", null, new { @class = "navbar-brand" })
|
||||
}
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>@Html.ActionLink("Reports", "Index", "Reports")</li>
|
||||
@if ((bool)@Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
<li>@Html.ActionLink("Admin", "Index", "Admin")</li>
|
||||
}
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="navbar navbar-default" role="navigation" style="font-size: 11px">
|
||||
|
||||
<div class="container-fluid">
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
|
||||
<ul class="nav navbar-nav" id="myTab">
|
||||
@*<li><a href=@Url.Action("SpecialWorkRequest", "Home", new { tabName = "AllTasks" })>Special Work Requests</a></li>*@
|
||||
@*<li><a href="file:////temirwfp001.irworld.irf.com/UserData/QA/CommonRO/Projects/AVI Tool/">AVI Tool</a></li>*@
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Create New<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu" style="font-size: 11px">
|
||||
@*<li><a href=@Url.Action("Create", "LotDisposition")>Lot Dispostion</a></li>*@
|
||||
<li><a href=@Url.Action("Create", "MRB")>MRB</a></li>
|
||||
<li><a href=@Url.Action("Create", "ECN")>ECN/TECN</a></li>
|
||||
@*<li><a href=@Url.Action("CreateWorkRequest", "LotTraveler")>Create Special Work Request</a></li>*@
|
||||
<li><a href=@Url.Action("Create", "ChangeControl")>Create PCR</a></li>
|
||||
<li><a href=@Url.Action("Create", "Audit")>Create Audit</a></li>
|
||||
<li><a href=@Url.Action("Create", "CorrectiveAction")>Create Corrective Action</a></li>
|
||||
@*@if (Convert.ToBoolean(Session[GlobalVars.CAN_CREATE_PARTS_REQUEST]))
|
||||
{
|
||||
<li><a href=@Url.Action("Create", "PartsRequest")>Create New/Repair Spare Parts Request</a></li>
|
||||
}*@
|
||||
@*<li><a href="#">Another Doc</a></li>*@
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
@*<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search" style="font-size: 11px">
|
||||
</div>*@
|
||||
@if (!(bool)Session[GlobalVars.OOO])
|
||||
{
|
||||
<button class="btn btn-default btn-primary" data-toggle="modal" id="OOO">Out Of Office</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-default btn-warning" id="OOOExpire">Expire OOO Status</button>
|
||||
}
|
||||
@*<button type="submit" class="btn btn-primary" style="font-size: 11px">Submit</button>*@
|
||||
</form>
|
||||
|
||||
<!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
@(Html.Kendo().Menu()
|
||||
.Name("menu")
|
||||
.HtmlAttributes(new { style = "width:100%; font-size: 12px" })
|
||||
.Items(menu =>
|
||||
{
|
||||
menu.Add().Text("My Inbox").Action("MyTasks", "Home");
|
||||
menu.Add().Text("My Training").Action("ViewMyTrainingAssignments", "Training");
|
||||
menu.Add().Text("Training Reports").Action("TrainingReports", "Training");
|
||||
menu.Add().Text("All Documents").Action("AllDocuments", "Home");
|
||||
//menu.Add().Text("Special Work Requests").Action("SpecialWorkRequestList", "Home");
|
||||
menu.Add().Text("PCRB").Action("ChangeControlList", "Home");
|
||||
menu.Add().Text("MRB").Action("MRBList", "Home");
|
||||
//menu.Add().Text("LotDisposition").Action("LotDispositionList", "Home");
|
||||
menu.Add().Text("ECN").Action("ECNList", "Home");
|
||||
menu.Add().Text("Audit").Action("AuditList", "Home");
|
||||
menu.Add().Text("Corrective Action").Action("CorrectiveActionList", "Home");
|
||||
//menu.Add().Text("New/Repair Spare Parts").Action("PartsRequestList", "Home");
|
||||
}))
|
||||
<div>
|
||||
@RenderBody()
|
||||
@*<hr />*@
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<div class="modal fade" id="OOODialog" 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">Out Of Office for user: @User.Identity.GetUserName()</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</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="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var issueID="";
|
||||
var docType = "";
|
||||
var submitdate = "";
|
||||
var userName = "@Session[@GlobalVars.SESSION_USERNAME].ToString()";
|
||||
|
||||
$(document).ready(function () {
|
||||
})
|
||||
|
||||
@*$("#mytasklist").on("dblclick", "tr.k-state-selected", function (e) {
|
||||
var grid = $("#mytasklist").data("kendoGrid");
|
||||
var row = e.currentTarget;
|
||||
var issueID = row.cells[0].innerText; //
|
||||
|
||||
var url = '@Url.Action("Edit", "LotDisposition", new { issueID = "__id__" })';
|
||||
window.location.href = url.replace('__id__', issueID);
|
||||
})
|
||||
|
||||
$("#alltasklist").on("dblclick", "tr.k-state-selected", function (e) {
|
||||
var grid = $("#mytalltasklistasklist").data("kendoGrid");
|
||||
var row = e.currentTarget;
|
||||
var issueID = row.cells[0].innerText; //
|
||||
|
||||
var url = '@Url.Action("Edit", "LotDisposition", new { issueID = "__id__" })';
|
||||
window.location.href = url.replace('__id__', issueID);
|
||||
})*@
|
||||
|
||||
var userid = @Session[@GlobalVars.SESSION_USERID].ToString()
|
||||
|
||||
|
||||
$("#IncludeAllDocuments").on("click", function () {
|
||||
alert("clicked");
|
||||
})
|
||||
|
||||
|
||||
$('#OOO').on('click', function () {
|
||||
|
||||
|
||||
$("#OOODialog").modal('show');
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
$('#OOOExpire').on('click', function () {
|
||||
//alert('in');
|
||||
var tab = $('#currentTab').val();
|
||||
|
||||
var urlString = '@Url.Action("ExpireOOOStatus", "Home")'; // '/Home/ExpireOOOStatus';
|
||||
|
||||
if (confirm('Are you sure you want to expire the OOO status')) {
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
tab: tab
|
||||
},
|
||||
success: function (result) {
|
||||
var urlString = '@Url.Action("MyTasks", "Home")'
|
||||
window.location.href = urlString;
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
$('#SaveOOOInfo').on('click', function () {
|
||||
var tab = $('#currentTab').val();
|
||||
var bfound = false;
|
||||
|
||||
if (userid == $("#DelegateTo").data("kendoDropDownList").value()) {
|
||||
alert('The OOO person cannot be same as the delegate to person');
|
||||
return false;
|
||||
}
|
||||
|
||||
var fullDate = new Date()
|
||||
|
||||
//convert month to 2 digits
|
||||
var twoDigitMonth = ((fullDate.getMonth().length + 1) === 1) ? (fullDate.getMonth() + 1) : '0' + (fullDate.getMonth() + 1);
|
||||
|
||||
var tempCurrentDate = twoDigitMonth + "/" + fullDate.getDate() + "/" + fullDate.getFullYear();
|
||||
var arrCurrDate = tempCurrentDate.split('/');
|
||||
var currentDate = new Date(arrCurrDate[2], arrCurrDate[0] - 1, arrCurrDate[1]);
|
||||
|
||||
|
||||
|
||||
|
||||
if (!$("#txtStartDate").val() || !$("#txtEndDate").val()) {
|
||||
alert('Start or the End Date cannot be blank');
|
||||
return false;
|
||||
}
|
||||
|
||||
var stDateEntered = $("#txtStartDate").val();
|
||||
var arrStDate = stDateEntered.split('/');
|
||||
var stDate = new Date(arrStDate[2], arrStDate[0] - 1, arrStDate[1]);
|
||||
|
||||
var endDateEntered = $("#txtEndDate").val();
|
||||
var arrEndDate = endDateEntered.split('/');
|
||||
var endDate = new Date(arrEndDate[2], arrEndDate[0] - 1, arrEndDate[1]);
|
||||
|
||||
if (stDate < currentDate) {
|
||||
alert("Start Date should be greater than or equal the Current Date ");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (endDate <= stDate) {
|
||||
|
||||
alert("The End Date should be greater than the Start Date ");
|
||||
return false;
|
||||
}
|
||||
$("#OOODialog").modal('hide');
|
||||
|
||||
//var urlString = '/Home/SetOOOStatus';
|
||||
var urlString = '@Url.Action("SetOOOStatus", "Home")';
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
//oooUserID: userids,
|
||||
delegatedTo: $("#DelegateTo").data("kendoDropDownList").value(),
|
||||
startDate: $("#txtStartDate").val(),
|
||||
endDate: $("#txtEndDate").val(),
|
||||
tab: tab
|
||||
},
|
||||
success: function (result) {
|
||||
if (result == "9") {
|
||||
alert('The user which you selected for Delegation has already been assigned to another user for Delegation\n Please select a different user for Delgation')
|
||||
}
|
||||
else {
|
||||
//var url = '@Url.Action("Index", "Home", new { tabName = "rep" })';
|
||||
var url = '@Url.Action("MyTasks", "Home")';
|
||||
window.location.href = url;
|
||||
}
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result.responseText);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
|
||||
function deleteRow(element) {
|
||||
grid = $("#alltasklist").data("kendoGrid");
|
||||
grid.removeRow($(element).closest("tr"));
|
||||
}
|
||||
|
||||
|
||||
function showReAssignRole(_pendingApprovers, _closeDate, _issueID, _docType, _submitDate) {
|
||||
//alert(_closeDate);;
|
||||
//alert(_pendingApprovers);
|
||||
if (_pendingApprovers.indexOf(userName) == -1)
|
||||
{
|
||||
alert("You are not one of the approvers for this document");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_submitDate == 'null')
|
||||
{
|
||||
alert("Cannot delegate the document as it has not been submitted yet");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_closeDate != 'null') {
|
||||
alert("Cannot delegate as the approval loop has already been closed");
|
||||
return;
|
||||
}
|
||||
|
||||
issueID = _issueID;
|
||||
docType = _docType;
|
||||
|
||||
submitdate = _submitDate;
|
||||
|
||||
$('#ReAssignApproverFromLabel').text(userName);
|
||||
// var searchText = ($("#txtSearch").val());
|
||||
var url = "/Home/GetAllUsersList";
|
||||
var source =
|
||||
{
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'UserID' },
|
||||
{ name: 'FullName' }
|
||||
],
|
||||
id: 'id',
|
||||
url: url,
|
||||
};
|
||||
var dataAdapter = new $.jqx.dataAdapter(source);
|
||||
// Create a jqxListBox
|
||||
$("#lstReAssignApproval").jqxListBox({
|
||||
multipleextended: false, theme: "arctic", source: dataAdapter, displayMember: "FullName", valueMember: "UserID", width: 200, height: 250
|
||||
});
|
||||
|
||||
$("#ReAssignApproval").modal('show');
|
||||
|
||||
|
||||
//alert(dataItem.FullName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#ConfirmReAssignment').on('click', function () {
|
||||
// get selected items.
|
||||
var bfound = false;
|
||||
var userids;
|
||||
var itemsToAdd = $('#lstReAssignApproval').jqxListBox('getSelectedItems');
|
||||
|
||||
if (itemsToAdd.length > 0) {
|
||||
for (var i = 0; i < itemsToAdd.length; i++) {
|
||||
if (itemsToAdd[i].label != undefined) {
|
||||
var tempvalue = itemsToAdd[i].value;
|
||||
var templabel = itemsToAdd[i].label;
|
||||
if (userids == null)
|
||||
userids = tempvalue;
|
||||
else
|
||||
userids += "~" + tempvalue;
|
||||
}
|
||||
};
|
||||
//
|
||||
|
||||
ReAssignApproval(userids);
|
||||
}
|
||||
$("#ReAssignApproval").modal('hide');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var ReAssignApproval = function (userids) {
|
||||
var urlString = '/Home/DelegateDocumentApproval';
|
||||
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
|
||||
issueID: issueID,
|
||||
delegateTo: userids,
|
||||
ecnTypeString: docType
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
var grid = $("#mytasklist").data("kendoGrid");
|
||||
grid.dataSource.read();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
799
Fab2ApprovalSystem/Views/LotDisposition/Create.cshtml
Normal file
799
Fab2ApprovalSystem/Views/LotDisposition/Create.cshtml
Normal file
@ -0,0 +1,799 @@
|
||||
@model Fab2ApprovalSystem.Models.LotDisposition
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Create";
|
||||
var val = Json.Encode(Model);
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.base.css" type="text/css" />
|
||||
<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.energyblue.css" type="text/css" />
|
||||
<link rel="stylesheet" href="~/Scripts/jqwidgets/styles/jqx.arctic.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxcore.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxdata.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxbuttons.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxscrollbar.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxlistbox.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxpanel.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/jqwidgets/jqxtree.js"></script>
|
||||
|
||||
@*<button class="btn btn-primary btn-lg" data-toggle="modal" id="lotAddFormButton">
|
||||
Launch demo modal
|
||||
</button>*@
|
||||
|
||||
|
||||
|
||||
@using (Html.BeginForm(new { id = "formCreate" }))
|
||||
{
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Title:</label>
|
||||
<div class="col-sm-4 col-md-6">
|
||||
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Originator:</label>
|
||||
<div class="col-sm-8 col-md-4">
|
||||
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("OriginatorID")
|
||||
.BindTo(new SelectList(ViewBag.OriginatorList, "OriginatorID", "OriginatorName"))
|
||||
.Value(@Session[GlobalVars.SESSION_USERID].ToString())
|
||||
|
||||
)
|
||||
@*@Html.TextBoxFor(model => model.OriginatorID, new { id = @GlobalVars.USER_ID, Value = @Session[GlobalVars.SESSION_USERNAME].ToString();, @class = "k-textbox" })*@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-horizontal col-sm-4">
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-sm-4">Issue Date</label>
|
||||
<div class="col-sm-4">
|
||||
@Html.TextBoxFor(model => model.IssueDate, new { @class = "form-control" })
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-sm-4">Issue #</label>
|
||||
<div class="col-sm-4">
|
||||
@Html.TextBoxFor(model => model.IssueID, new { @class = "form-control" })
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">PE Required</label>
|
||||
<div class="col-sm-4">
|
||||
@Html.RadioButtonFor(model => model.PERequired, 1) Yes
|
||||
@Html.RadioButtonFor(model => model.PERequired, 0) No
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="panel panel-default">
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="form-horizontal col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Affected Department:</label>
|
||||
<div class="col-sm-8 col-md-6">
|
||||
|
||||
|
||||
@(Html.Kendo().MultiSelect()
|
||||
.Name("DepartmentIDs")
|
||||
.BindTo(new SelectList(ViewBag.deps, "DepartmentID", "DepartmentName"))
|
||||
//.Value(ViewBag.selectedDeps)
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Responsibility:</label>
|
||||
<div class="col-sm-8 col-sm-6">
|
||||
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("Responsibility")
|
||||
.BindTo(new SelectList(ViewBag.ResponsibilityList, "ResponsibilityID", "ResponsibilityName"))
|
||||
.Value("Model.ResponsibilityID")
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Issue:</label>
|
||||
<div class="col-sm-8 col-sm-4">
|
||||
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("Issue")
|
||||
.BindTo(new SelectList(ViewBag.ResponsibilityIssueList, "ResponsibilityIssueID", "Issue"))
|
||||
.Value("Model.ResponsibilityIssueID")
|
||||
|
||||
)
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" >SPN Scrap Code:</label>
|
||||
<div class="col-sm-8 col-md-6">
|
||||
@Html.TextBoxFor(model => model.SPNScrapCode, new { id = "txtSPNScrapCode", @class = "k-textbox" })
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class="control-label">Issue Description:</label>
|
||||
@Html.TextAreaFor(model => model.IssueDescription, 3, 15, new { id = "txtIssueDescription", @class = "form-control" })
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class=" control-label">Reason For Disposition:</label>
|
||||
@Html.TextAreaFor(model => model.ReasonForDisposition, 3, 15, new { id = "txtReasonForDisposition", @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<button class="btn btn-default btn-sm" data-toggle="modal" id="showLotSearchFormButton">
|
||||
Search Lots
|
||||
</button>
|
||||
|
||||
<button class="btn btn-default btn-sm" data-toggle="modal" id="lotAddFormButton">
|
||||
Add Lot
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-md-offset-0">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Lot>()
|
||||
.Name("Lots")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.LotID).Visible(false);
|
||||
columns.Bound(l => l.LotStatusOptionID).Visible(false);
|
||||
columns.Bound(l => l.LotNumber).Width("8%");
|
||||
columns.Bound(l => l.WipPartNo).Width("12%");
|
||||
columns.Bound(l => l.LotStatusOption).ClientTemplate("#=LotStatusOption.LotStatusOption#").Width("10%");
|
||||
//columns.Bound(l => l.LotStatusOptionName).Width("10%");
|
||||
columns.Bound(l => l.WaferCount);
|
||||
columns.Bound(l => l.DiePartNo);
|
||||
columns.Bound(l => l.DieCount);
|
||||
columns.Bound(l => l.NewPartNo);
|
||||
columns.Bound(l => l.TotalCost);
|
||||
columns.Bound(l => l.ProductFamily);
|
||||
columns.Bound(l => l.Gen);
|
||||
columns.Bound(l => l.Hexsize);
|
||||
columns.Bound(l => l.Voltage);
|
||||
columns.Bound(l => l.Location);
|
||||
//columns.Command(command => command.Custom("Lot Hstory").Click("showDetails"));
|
||||
columns.Command(command => command.Destroy()).Width(90);
|
||||
})
|
||||
|
||||
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.Pageable()
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
//.Filterable()
|
||||
.HtmlAttributes(new { style = "height:250px; width:100%; font-size: 11px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(true)
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.Error("error_handler"))
|
||||
|
||||
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.LotID);
|
||||
model.Field(p => p.LotID).Editable(false);
|
||||
model.Field(p => p.TotalCost).Editable(false);
|
||||
//model.Field(p => p.LotStatusOption).DefaultValue(
|
||||
// ViewData["DefaultLotStatusOptions"] as Fab2ApprovalSystem.Models.LotStatusOptionViewModel);
|
||||
})
|
||||
.PageSize(20)
|
||||
.Read(read => read.Action("EditingCustom_Read", "LotDisposition", new { issueID = -1 }))
|
||||
.Create(create => create.Action("EditingCustom_Create", "LotDisposition"))
|
||||
.Update(update => update.Action("EditingCustom_Update", "LotDisposition"))
|
||||
.Destroy(destroy => destroy.Action("EditingCustom_Destroy", "LotDisposition"))
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-offset-0">
|
||||
<input type="submit" value="Save" class="btn btn-primary btn-sm" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
}
|
||||
<!-- Button trigger modal -->
|
||||
<!-- Modal -->
|
||||
|
||||
<div class="modal fade" id="LotSearchForm" tabindex="0" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog custom-class">
|
||||
<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">Lot Search</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<table cellpadding="10" cellspacing="2">
|
||||
|
||||
<tr>
|
||||
<td valign="top" colspan="2">
|
||||
<div class="row-fluid">
|
||||
<div class="controls span4">
|
||||
@Html.Label("By Lot")
|
||||
@Html.RadioButton("Category", "Lot", false)
|
||||
@Html.Label("By Location")
|
||||
@Html.RadioButton("Category", "Lot", false)
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td valign="top" colspan="2">
|
||||
<div class="row-fluid">
|
||||
<div class="controls span4">
|
||||
@Html.TextBox("txtSearch", null, new { @class = "k-textbox" })
|
||||
<input style="margin-top: 20px;" type="button" id='jqxButtonSearchLots' value="Search Lots" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
||||
<div id='content'>
|
||||
<div id='lstSearchedLots'>
|
||||
</div>
|
||||
<div>
|
||||
<input style="margin-top: 20px;" type="button" id='jqxButtonAddLots' value="Add Lots" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td valign="top">
|
||||
|
||||
<div id='content1'>
|
||||
<div id='lstSelectedLots'>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<input style="margin-top: 20px;" type="button" id='jqxButtonRemoveLots' value="Remove Lots" />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="submit">Save changes</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="LotAddForm" 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">Enter Lot Information:</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="LotNumber">Lot Number:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="LotNumber" placeholder="LotNumber">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="LotDescription">Lot Description:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="LotDescription" placeholder="LotDescription">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="NewPartNo">New Part#:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="NewPartNo" placeholder="NewPartNo">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="WipPartNo">WIP Part No:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="WipPartNo" placeholder="WipPartNo">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="DiePartNo">DiePart#:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="DiePartNo" placeholder="DiePartNo">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="ProductFamily">Product Family:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="ProductFamily" placeholder="ProductFamily">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="Gen">Gen:</label>
|
||||
<div class="controls">
|
||||
<input type="number" class="form-control" id="Gen" placeholder="Gen">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="Channel">Channel:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="Channel" placeholder="Channel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="Hexsize">Hexsize:</label>
|
||||
<div class="controls">
|
||||
<input type="number" class="form-control" id="Hexsize" placeholder="Hexsize">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="Location">Location:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" id="Location" placeholder="Location">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="WaferCount">Wafer Count:</label>
|
||||
<div class="controls">
|
||||
<input type="number" class="form-control" id="DieCount" placeholder="DieCount">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="control-group">
|
||||
<label for="DieCount">Die Count:</label>
|
||||
<div class="controls">
|
||||
<input type="number" class="form-control" id="DieCount" placeholder="DieCount">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="control-group">
|
||||
<label for="Voltage">Voltage:</label>
|
||||
<div class="controls">
|
||||
<input type="number" class="form-control" id="Voltage" placeholder="Voltage">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="control-group">
|
||||
<label for="TotalCost">Total Cost:</label>
|
||||
<div class="controls">
|
||||
<input type="number" class="form-control" id="TotalCost" placeholder="TotalCost">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Lot Staus Options:</label>
|
||||
<br />
|
||||
<label class="radio-inline">
|
||||
<input type="radio" class="radioBtnClass" name="LotStatusOptionID" id="LotStatusOptionID" value="1~Release" checked>
|
||||
Release
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" class="radioBtnClass" name="LotStatusOptionID" id="LotStatusOptionID" value="2~Scrap">
|
||||
Scrap
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" class="radioBtnClass" name="LotStatusOptionID" id="LotStatusOptionID" value="3~M_Suffix">
|
||||
M_Suffix
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="submitLotAdd">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
//$("#Lots").kendoGrid({
|
||||
// dataSource: {
|
||||
// transport: {
|
||||
// read: { url: "/Api/Home", type: "GET" },
|
||||
// destroy: { url: "/Api/Home", type: "DELETE" }
|
||||
// },
|
||||
// schema: {
|
||||
// model: {
|
||||
// id: "LotID",
|
||||
// fields: {
|
||||
// LotID: { editable: false },
|
||||
// LotNumber: { editable: false },
|
||||
// WipPartNo: { editable: true },
|
||||
// LotStatusOption: { editable: true },
|
||||
// WaferCount: { editable: false }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// sort: [{ field: "Title", dir: "asc" }],
|
||||
// serverPaging: true,
|
||||
// serverFiltering: true,
|
||||
// serverSorting: true,
|
||||
// pageSize: 15
|
||||
// },
|
||||
// columns: [
|
||||
// { field: "LotID", title: "LotID#", width: "45px" },
|
||||
// { field: "LotNumber", title: "Lot#", width: "70px" },
|
||||
// { field: "WipPartNo", title: "Title", width: "170px" },
|
||||
// { field: "WipPartNo", title: "WipPart#", width: "65px" },
|
||||
// { field: "LotStatusOption", title: "LotStatus", width: "70px" },
|
||||
// { field: "WaferCount", title: "WaferCount", width: "130px" },
|
||||
// { command: ["edit", "destroy"], title: " ", width: "172px" }],
|
||||
|
||||
// pageable: true,
|
||||
// sortable: true,
|
||||
// scrollable: true,
|
||||
// filterable: false
|
||||
//});
|
||||
|
||||
|
||||
$("#showLotSearchFormButton").on('click', function () {
|
||||
$("#LotSearchForm").modal('show');
|
||||
return false;
|
||||
})
|
||||
|
||||
$("#lotAddFormButton").on('click', function () {
|
||||
$("#LotAddForm").modal('show');
|
||||
return false;
|
||||
})
|
||||
|
||||
$("#submitLotAdd").on('click', function () {
|
||||
var lotStatusOptionData = $('input:radio[name=LotStatusOptionID]:checked').val().split('~');
|
||||
var lotStatusOptionID = lotStatusOptionData[0];
|
||||
var lotStatusOptionName = lotStatusOptionData[1];
|
||||
|
||||
$.ajax({
|
||||
url: '/LotDisposition/AddLot',
|
||||
type: "Post",
|
||||
dataType: "json",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(
|
||||
{
|
||||
IssueID: $("#txtIssueID").val(),
|
||||
LotNumber: $("#LotNumber").val(),
|
||||
IssueID: $("#IssueID").val(),
|
||||
Description: $("#Description").val(),
|
||||
NewPartNo: $("#NewPartNo").val(),
|
||||
WipPartNo: $("#WipPartNo").val(),
|
||||
DiePartNo: $("#DiePartNo").val(),
|
||||
ProductFamily: $("#ProductFamily").val(),
|
||||
Gen: $("#Gen").val(),
|
||||
Channel: $("#Channel").val(),
|
||||
Hexsize: $("#Hexsize").val(),
|
||||
Voltage: $("#Voltage").val(),
|
||||
WaferCount: $("#WaferCount").val(),
|
||||
DieCount: $("#DieCount").val(),
|
||||
Location: $("#Location").val(),
|
||||
TotalCost: $("#TotalCost").val(),
|
||||
LotStatusOptionID: lotStatusOptionID,
|
||||
LotStatusOptionName: lotStatusOptionName
|
||||
|
||||
}),
|
||||
success: function (result) {
|
||||
|
||||
//alert("success " + result.LotNumber);
|
||||
|
||||
var vgrid = $("#Lots").data("kendoGrid");
|
||||
//Selecting dataSource
|
||||
var datasource = vgrid.dataSource;
|
||||
var newRecord = result;
|
||||
//Inserting new row
|
||||
datasource.insert(newRecord);
|
||||
$("#LotAddForm").modal('hide');
|
||||
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert("Failed " + errorThrown);
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
//
|
||||
displayEmptySelectedLotsList();
|
||||
//
|
||||
displayEmptySearchedLotsList();
|
||||
|
||||
function error_handler(e) {
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$("#jqxButtonSearchLots").jqxButton({
|
||||
theme: 'energyblue'
|
||||
});
|
||||
|
||||
$("#jqxButtonAddLots").jqxButton({
|
||||
theme: 'energyblue'
|
||||
});
|
||||
|
||||
$("#jqxButtonRemoveLots").jqxButton({
|
||||
theme: 'energyblue'
|
||||
});
|
||||
|
||||
// REGION SERACH LOTS MODAL DIALOG
|
||||
|
||||
$("#jqxButtonSearchLots").on('click', function displayLots() {
|
||||
var searchText = ($("#txtSearch").val());
|
||||
var url = "/LotDisposition/SearchLots?searchText=" + searchText + "&searchBy=LotNo";
|
||||
var source =
|
||||
{
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'LotNumber' }
|
||||
],
|
||||
id: 'id',
|
||||
url: url,
|
||||
};
|
||||
var dataAdapter = new $.jqx.dataAdapter(source);
|
||||
// Create a jqxListBox
|
||||
$("#lstSearchedLots").jqxListBox({
|
||||
multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "LotNumber", valueMember: "LotNumber", width: 200, height: 250
|
||||
});
|
||||
$("#lstSearchedLots").on('select', function (event) {
|
||||
if (event.args) {
|
||||
var item = event.args.item;
|
||||
if (item) {
|
||||
var valueelement = $("<div></div>");
|
||||
valueelement.text("Value: " + item.value);
|
||||
var labelelement = $("<div></div>");
|
||||
labelelement.text("Label: " + item.label);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#jqxButtonAddLots').on('click', function () {
|
||||
// get selected items.
|
||||
var bfound = false;
|
||||
var lots;
|
||||
var itemsToAdd = $('#lstSearchedLots').jqxListBox('getSelectedItems');
|
||||
if (itemsToAdd.length > 0) {
|
||||
|
||||
for (var i = 0; i < itemsToAdd.length; i++) {
|
||||
|
||||
if (itemsToAdd[i].label != undefined) {
|
||||
|
||||
var tempvalue = itemsToAdd[i].value;
|
||||
var templabel = itemsToAdd[i].label;
|
||||
|
||||
//if (i < itemsToAdd.length - 1)
|
||||
//{
|
||||
// check if the item exists in the seleced lots list
|
||||
var itemsAdded = $("#lstSelectedLots").jqxListBox('getItems');
|
||||
if (itemsAdded != undefined) {
|
||||
for (var x = 0; x < itemsAdded.length; x++) {
|
||||
if (itemsAdded[x].label == templabel) {
|
||||
bfound = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
if (!bfound) {
|
||||
$("#lstSelectedLots").jqxListBox('addItem', { label: templabel, value: tempvalue });
|
||||
if (lots == null)
|
||||
lots = tempvalue;
|
||||
else
|
||||
lots += "~" + tempvalue;
|
||||
}
|
||||
|
||||
bfound = false;
|
||||
}
|
||||
else {
|
||||
alert(templabel)
|
||||
$("#lstSelectedLots").jqxListBox('addItem', { label: templabel, value: tempvalue });
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
// unselect all the selected items
|
||||
$("#lstSearchedLots").jqxListBox({ selectedIndex: -1 });
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#jqxButtonRemoveLots').on('click', function () {
|
||||
// get items.
|
||||
var userids;
|
||||
var items = $("#lstSelectedLots").jqxListBox('getSelectedItems');
|
||||
if (items != undefined) {
|
||||
for (var i = items.length - 1; i >= 0; i--) {
|
||||
$("#lstSelectedLots").jqxListBox('removeItem', items[i].value);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function displayEmptySelectedLotsList() {
|
||||
//var url = "/LotDisposition/SearchLots?searchText=" + searchText + "&searchBy=LotNo";
|
||||
var source =
|
||||
{
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'LotNo' }
|
||||
],
|
||||
id: 'id'
|
||||
//url: url
|
||||
};
|
||||
var dataAdapter = new $.jqx.dataAdapter(source);
|
||||
// Create a jqxListBox
|
||||
$("#lstSelectedLots").jqxListBox({
|
||||
multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "LotNo", valueMember: "LotNo", width: 200, height: 250
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function displayEmptySearchedLotsList() {
|
||||
var source =
|
||||
{
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: 'LotNo' }
|
||||
],
|
||||
id: 'id'
|
||||
//url: url
|
||||
};
|
||||
var dataAdapter = new $.jqx.dataAdapter(source);
|
||||
// Create a jqxListBox
|
||||
$("#lstSearchedLots").jqxListBox({
|
||||
multipleextended: true, theme: "arctic", source: dataAdapter, displayMember: "LotNo", valueMember: "LotNo", width: 200, height: 250
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showDetails(e) {
|
||||
|
||||
alert('hello');
|
||||
//e.preventDefault();
|
||||
//var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
2521
Fab2ApprovalSystem/Views/LotDisposition/Edit.cshtml
Normal file
2521
Fab2ApprovalSystem/Views/LotDisposition/Edit.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
1162
Fab2ApprovalSystem/Views/LotDisposition/EditStep.cshtml
Normal file
1162
Fab2ApprovalSystem/Views/LotDisposition/EditStep.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
@model Fab2ApprovalSystem.ViewModels.LotStatusOptionViewModel
|
||||
|
||||
@(Html.Kendo().DropDownListFor(m => m)
|
||||
.DataValueField("LotStatusOption")
|
||||
.DataTextField("LotStatusOption")
|
||||
.BindTo((System.Collections.IEnumerable)ViewData["LotStatusOptions"])
|
||||
|
||||
)
|
9
Fab2ApprovalSystem/Views/LotDisposition/Error.cshtml
Normal file
9
Fab2ApprovalSystem/Views/LotDisposition/Error.cshtml
Normal file
@ -0,0 +1,9 @@
|
||||
@model System.Web.Mvc.HandleErrorInfo
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
683
Fab2ApprovalSystem/Views/LotDisposition/ReadOnly.cshtml
Normal file
683
Fab2ApprovalSystem/Views/LotDisposition/ReadOnly.cshtml
Normal file
@ -0,0 +1,683 @@
|
||||
@model Fab2ApprovalSystem.Models.LotDisposition
|
||||
|
||||
|
||||
@{
|
||||
ViewBag.Title = "LotDisposition";
|
||||
}
|
||||
|
||||
@{
|
||||
Layout = "_LotDispositionLayout.cshtml";
|
||||
}
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
|
||||
@*<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<label for="Remarks">Enter Remarks Here...</label>
|
||||
@Html.TextAreaFor(model => model.IssueDescription, new { style = "width:90%;" })
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<input type="hidden" id="currentStep" value="@Model.CurrentStep"/>
|
||||
<input type="hidden" id="environment" value="@GlobalVars.DBConnection" />
|
||||
|
||||
<div class="panel panel-default" 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">
|
||||
Lot Disposition
|
||||
</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.CloseDate == null)
|
||||
{
|
||||
if (Model.RecordLockByName == null)
|
||||
{
|
||||
<h5>
|
||||
<font style="color:red">
|
||||
Mode: [Readonly]
|
||||
</font>
|
||||
</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5>
|
||||
<font style="color:red">
|
||||
Mode: [Readonly] - Locked for Editing by <font style="color: green; font-weight:bold; font-style:italic">@Model.RecordLockByName</font>
|
||||
</font>
|
||||
</h5>
|
||||
|
||||
}
|
||||
}
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 11px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal col-sm-4">
|
||||
<fieldset disabled>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Issue #</label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
@Html.TextBoxFor(model => model.IssueID, new { id = "txtIssueID", @class = "k-textbox", @readonly = "readonly" })
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="form-group">
|
||||
<fieldset disabled>
|
||||
<label class="control-label col-sm-4">Issue Date:</label>
|
||||
<div class="col-sm-8 col-sm-6">
|
||||
@Html.TextBoxFor(model => model.IssueDate, new { id = "txtIssueDate", @class = "k-textbox", @readonly = "readonly" })
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Affected Department:</label>
|
||||
<div class="col-sm-8 col-sm-8">
|
||||
|
||||
|
||||
@(Html.Kendo().MultiSelect()
|
||||
.Name("DepartmentIDs")
|
||||
.BindTo(new SelectList(ViewBag.deps, "DepartmentID", "DepartmentName"))
|
||||
.Value(ViewBag.Nothing)
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="form-group">
|
||||
<label class="control-label col-sm-4">MRB</label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
@Html.EditorFor(model => model.MRBRequired, new { @readonly = "readonly" })
|
||||
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-horizontal col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Title:</label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", @readonly = "readonly" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Responsibility:</label>
|
||||
<div class="col-sm-8 col-sm-6">
|
||||
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("Responsibility")
|
||||
.BindTo(new SelectList(ViewBag.ResponsibilityList, "ResponsibilityID", "ResponsibilityName"))
|
||||
.Value(Model.ResponsibilityID.ToString())
|
||||
.HtmlAttributes(new { @readonly = "readonly" })
|
||||
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Issue:</label>
|
||||
<div class="col-sm-8 col-sm-4">
|
||||
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("Issue")
|
||||
.BindTo(new SelectList(ViewBag.ResponsibilityIssueList, "ResponsibilityIssueID", "Issue"))
|
||||
.Value(Model.ResponsibilityIssueID.ToString())
|
||||
.CascadeFrom("ResponsibilityID")
|
||||
.HtmlAttributes(new { @readonly = "readonly" })
|
||||
)
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">CA#</label>
|
||||
<div class="col-sm-4 col-sm-6">
|
||||
@Html.TextBoxFor(model => model.CANo, new { @class = "k-textbox", @readonly = "readonly" })
|
||||
<a href='http://SQDS.IRF.COM/CAPA8D.aspx?Operation=MODIFY&DocumentID=@Model.CANo' target='_blank'>View CA</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Originator:</label>
|
||||
<div class="col-sm-8 col-sm-4">
|
||||
|
||||
@*@(Html.Kendo().DropDownList()
|
||||
.Name("OriginatorID")
|
||||
.BindTo(new SelectList(ViewBag.OriginatorList, "OriginatorID", "OriginatorName"))
|
||||
)*@
|
||||
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "OriginatorName", @class = "k-textbox", @readonly = "readonly" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">SPN Scrap Code:</label>
|
||||
<div class="col-sm-8 col-sm-6">
|
||||
@Html.TextBoxFor(model => model.SPNScrapCode, new { id = "txtSPNScrapCode", @class = "k-textbox", @readonly = "readonly" })
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">PE Required</label>
|
||||
<div class="col-sm-4 col-sm-4">
|
||||
@Html.EditorFor(model => model.PERequired)
|
||||
@Html.ValidationMessageFor(model => model.PERequired)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 11px">
|
||||
<div class="panel-body bg-warning">
|
||||
|
||||
|
||||
<div class=" col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Issue Description:</label>
|
||||
<div>
|
||||
@Html.TextAreaFor(model => model.IssueDescription, 12, 30, new { id = "txtIssueDescription", @class = "form-control", style = "font-size: 11px" , @readonly = "readonly" })
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Reason For Disposition:</label>
|
||||
<div>
|
||||
@Html.TextAreaFor(model => model.ReasonForDisposition, 12, 30, new { id = "txtReasonForDisposition", @class = "form-control", style = "font-size: 11px", @readonly = "readonly" })
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<div>
|
||||
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("files")
|
||||
.Async(a => a
|
||||
.Save("AttachSave", "LotDisposition", new { issueID = Model.IssueID })
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events
|
||||
.Success("onFileUploadSuccess")
|
||||
.Upload("checkFileType")
|
||||
)
|
||||
)
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Attachment>()
|
||||
.Name("Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.AttachmentID).Visible(false);
|
||||
columns.Bound(a => a.IssueID).Visible(false);
|
||||
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>);
|
||||
//.ClientTemplate("<a href='"+ GlobalVars.AttachmentUrl + "LotDisposition/#=FileName#' target='_blank'>#=FileName#</a>");
|
||||
columns.Bound(a => a.FullName);
|
||||
columns.Bound(a => a.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
//columns.Command(command => { command.Destroy(); });
|
||||
columns.Command(command => command.Custom("View").Click("DownloadAttachment"));
|
||||
|
||||
|
||||
})
|
||||
//.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:150px; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.AttachmentID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("Attachment_Read", "LotDisposition", new { issueID = Model.IssueID }))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-heading" style="height: 60px">
|
||||
@*<button class="btn btn-default btn-sm" data-toggle="modal" id="showLotSearchFormButton">
|
||||
Search Lots
|
||||
</button>*@
|
||||
<table class="pull-right">
|
||||
<tr>
|
||||
<td>
|
||||
<label style="color: #36940a; font-weight: bold; font-size: 12px" class="pull-right" id="ReleaseSummary">
|
||||
Release Summary: [Cost:] [Wafers:][Die:]
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label style="color: crimson; font-weight: bold; font-size: 12px" class="pull-right" id="ScrapSummary">
|
||||
Scrap Summary: [Cost:][Wafers:][Die:]
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@*<label style="color: #1050e8; font-weight: bold; font-size: 11px" class="pull-right" id="LotSummary">
|
||||
Release Summary: [Cost:] [Wafers:][Die:]
|
||||
Scrap Summary: [Cost:][Wafers:][Die:]
|
||||
</label>*@
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Lot>()
|
||||
.Name("Lots")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.LotID).Visible(false);
|
||||
columns.Bound(l => l.ReleaseCount).Visible(false);
|
||||
columns.Bound(l => l.ScrapCount).Visible(false);
|
||||
columns.Bound(l => l.LotStatusOptionID).Visible(false);
|
||||
columns.Bound(l => l.LotNumber);
|
||||
columns.Bound(l => l.DieLotNumber);
|
||||
columns.Bound(p => p.MRBsLinkedToLot).ClientTemplate("#=buildLinks(MRBsLinkedToLot)#");
|
||||
columns.Bound(l => l.WipPartNo);
|
||||
columns.Bound(l => l.LotStatusOption).ClientTemplate("#=LotStatusOption.LotStatusOption#");
|
||||
columns.Bound(l => l.WaferCount);
|
||||
columns.Bound(l => l.DiePartNo);
|
||||
columns.Bound(l => l.DieCount);
|
||||
columns.Bound(l => l.NewPartNo);
|
||||
columns.Bound(l => l.TotalCost);
|
||||
columns.Bound(l => l.ProductFamily);
|
||||
columns.Bound(l => l.Gen);
|
||||
columns.Bound(l => l.Hexsize);
|
||||
columns.Bound(l => l.Voltage);
|
||||
columns.Bound(l => l.Location);
|
||||
columns.Bound(l => l.QualityCode);
|
||||
columns.Command(command => command.Custom("Select Wafers").Click("showReadOnlyScrapReleaseForm")).Width("110px");
|
||||
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='http://" + GlobalVars.WSR_URL + "/user/wsr2/wsr_lot.php?lot=#=LotNumber#' target='_blank'>View</a>").Title("History");
|
||||
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='http://" + GlobalVars.WSR_URL + "/user/probe/wafyld.php?lot=#=LotNumber#' target='_blank'>View</a>").Title("Probe Results");
|
||||
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='http://" + GlobalVars.WSR_URL + "/user/probe/allmaps.php?lot=#=LotNumber#' target='_blank'>View</a>").Title("Wafer Maps");
|
||||
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='http://" + GlobalVars.WSR_URL + "/user/yieldchart/form.php' target='_blank'>View</a>").Title("Yield/Param Trends");
|
||||
columns.Bound(l => l.LotID).Template(@<text> @Html.ActionLink(@item.LotNumber.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='file://///10.72.6.201/Images/#=LotNumber#' + lot' target='_blank'>Show</a>").Title("AVI");
|
||||
//columns.Bound(l => l.MRBsLinkedToLot).Width("100px");
|
||||
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:250px; width:100%; font-size: 10px"})
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.RequestEnd("RefreshLotSummary"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.LotID);
|
||||
model.Field(p => p.LotID).Editable(false);
|
||||
model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
.PageSize(20)
|
||||
.Read(read => read.Action("EditingCustom_Read", "LotDisposition", new { issueID = Model.IssueID })))
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ApprovalID).Visible(false);
|
||||
columns.Bound(a => a.FullName);
|
||||
columns.Bound(a => a.RoleName);
|
||||
columns.Bound(a => a.SubRoleName);
|
||||
columns.Bound(a => a.Status);
|
||||
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ;
|
||||
columns.Bound(a => a.CompletedDate).Format("{0:MM/dd/yy hh:mm:ss}"); ;
|
||||
columns.Bound(a => a.Comments);
|
||||
|
||||
})
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:200px; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ApprovalID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetApproversList", "LotDisposition", new { issueID = Model.IssueID, step = Model.CurrentStep }))
|
||||
)
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
if(Model.CloseDate != null)
|
||||
{
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-heading" style="height: 43px">
|
||||
<button class="k-textbox" data-toggle="modal" id="AddComments">
|
||||
Add Comments
|
||||
</button>
|
||||
@*<label style="color: #1050e8; font-weight: bold; font-size: 11px" class="pull-right" id="LotSummary">
|
||||
Release Summary: [Cost:] [Wafers:][Die:]
|
||||
Scrap Summary: [Cost:][Wafers:][Die:]
|
||||
</label>*@
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Comments>()
|
||||
.Name("Comments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.IssueID).Visible(false);
|
||||
columns.Bound(a => a.UserName).Width("200px");
|
||||
columns.Bound(a => a.UserComments);
|
||||
columns.Bound(a => a.TimeStamp).Format("{0:MM/dd/yy hh:mm:ss}").Width("200px");
|
||||
})
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:200px; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetComments", "LotDisposition", new { issueID = Model.IssueID}))
|
||||
)
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="modal fade" id="LotStatusReadOnlyForm" data-url='@Url.Action("LotStatusDetail")' tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-body" id="lotReadOnlyScrapContainer">
|
||||
@Html.Partial("_ScrapReleaseReadOnly", Model.Lot.ScrapLotWafer)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
<!-- Button trigger modal -->
|
||||
<!-- Modal -->
|
||||
|
||||
|
||||
<div class="modal fade" id="CommentsWin" 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">Comments:</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" rows="5" id="UserComments"></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="InsertComments">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var errorCodeDisplayed = false;
|
||||
var isDirty = 'false';
|
||||
var connection = $("#environment").val();
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#AddComments').on('click', function () {
|
||||
$('#InsertComments').attr("disabled", false);
|
||||
$("#Comments").val("");
|
||||
$("#CommentsWin").modal('show');
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
$('#InsertComments').on('click', function () {
|
||||
|
||||
$('#InsertComments').attr("disabled", true);
|
||||
$.ajax({
|
||||
url: "/LotDisposition/InsertComments",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
issueID: $("#txtIssueID").val(),
|
||||
Comments: $("#UserComments").val()
|
||||
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
var grid = $("#Comments").data("kendoGrid");
|
||||
grid.dataSource.read($('#txtIssueID').val());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#CommentsWin").modal('hide');
|
||||
|
||||
})
|
||||
|
||||
|
||||
//
|
||||
function showReadOnlyScrapReleaseForm(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var issueID = $("#txtIssueID").val();
|
||||
var lotNumber = dataItem.LotNumber;
|
||||
var waferCount = dataItem.WaferCount;
|
||||
var dieCount = dataItem.DieCount
|
||||
|
||||
if (dataItem.Location != 'QDB' && dataItem.Location != 'EDB') {
|
||||
if (dieCount > 0) {
|
||||
alert("You cannot set Status for each wafer if it is a Die lot.\n Please set the status from the dropdown menu available for each lot");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var url = $('#LotStatusReadOnlyForm').data('url');
|
||||
//url = url + '?issueID=' + issueID + '&lotNumber=' + lotNumber + '&waferCount=' + waferCount;
|
||||
url = url + '?issueID=' + issueID + '&lotNumber=' + lotNumber + '&readonlyView=true';
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
success: function (data) {
|
||||
$('#lotReadOnlyScrapContainer').html(data);
|
||||
$("#LotStatusReadOnlyForm").modal('show');
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//$.get(url, function (data) {
|
||||
// //alert('inside');
|
||||
// $('#lotScrapContainer').html(data);
|
||||
// $("#LotStatusForm").modal('show');
|
||||
// //return false;
|
||||
|
||||
//});
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function RefreshLotSummary() {
|
||||
|
||||
$.ajax({
|
||||
url: "/LotDisposition/GetLotDispositionLotSummary",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
issueID: $("#txtIssueID").val()
|
||||
},
|
||||
success: function (data) {
|
||||
//alert(data.ScrapCost)
|
||||
$('#ReleaseSummary').text('Release Summary: [Cost:' + data.ReleaseCost + '][Wafers:' + data.ReleaseWaferCount + '][Die:' + data.ReleaseDieCount + ']');
|
||||
$('#ScrapSummary').text('Scrap Summary: [Cost:' + data.ScrapCost + '] [Wafers:' + data.ScrapWaferCount + '][Die:' + data.ScrapDieCount + ']');
|
||||
//$('#ScrapSummary').text();
|
||||
//$('#ScrapSummary').val('GOOD');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function DownloadAttachment(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileName;
|
||||
var attachmentID = dataItem.AttachmentID;
|
||||
|
||||
window.location = '/LotDisposition/DownloadFile?attachmentID=' + attachmentID;
|
||||
|
||||
}
|
||||
|
||||
function onFileUploadSuccess(e) {
|
||||
var grid = $("#Attachments").data("kendoGrid");
|
||||
grid.dataSource.read($('#txtIssueID').val());
|
||||
}
|
||||
|
||||
|
||||
function checkFileType(e) {
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt|.slddrw|.sldprt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(document).ajaxComplete(function (event, request, settings) {
|
||||
//alert(request.status)
|
||||
if (request.status == 401 && errorCodeDisplayed == false) {
|
||||
errorCodeDisplayed = true;
|
||||
alert("You session has timed out.\nChanges will not be saved")
|
||||
var url = '@Url.Action("Login", "Account")';
|
||||
window.location.href(url);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function buildLinks(MRBLinkedToLot) {
|
||||
var template = "";
|
||||
var mrb = "";
|
||||
if (MRBLinkedToLot != null) {
|
||||
var tempValue = MRBLinkedToLot.split(',');
|
||||
for (var i = 0; i < tempValue.length; i++) {
|
||||
mrb = "";
|
||||
if (tempValue[i] != '') {
|
||||
MRB_Dispo = tempValue[i].split('_');
|
||||
mrb = MRB_Dispo[0];
|
||||
}
|
||||
template += "<a href='@GlobalVars.hostURL" + "/MRB/Edit?IssueID=" + mrb + "'>" + tempValue[i] + "</a>" + ", ";
|
||||
}
|
||||
|
||||
}
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
281
Fab2ApprovalSystem/Views/LotDisposition/TestView.cshtml
Normal file
281
Fab2ApprovalSystem/Views/LotDisposition/TestView.cshtml
Normal file
@ -0,0 +1,281 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "TestView";
|
||||
}
|
||||
|
||||
<h2>TestView</h2>
|
||||
|
||||
@*<style>
|
||||
body {
|
||||
font-size: 90.5%;
|
||||
}
|
||||
|
||||
label, input {
|
||||
display: block;
|
||||
}
|
||||
|
||||
input.text {
|
||||
margin-bottom: 12px;
|
||||
width: 95%;
|
||||
padding: .4em;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.2em;
|
||||
margin: .6em 0;
|
||||
}
|
||||
|
||||
div#users-contain {
|
||||
width: 350px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
div#users-contain table {
|
||||
margin: 1em 0;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div#users-contain table td, div#users-contain table th {
|
||||
border: 1px solid #eee;
|
||||
padding: .6em 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-state-error {
|
||||
padding: .3em;
|
||||
}
|
||||
|
||||
.validateTips {
|
||||
border: 1px solid transparent;
|
||||
padding: 0.3em;
|
||||
}
|
||||
</style>*@
|
||||
|
||||
|
||||
|
||||
|
||||
@*<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar">Help1</span>
|
||||
<span class="icon-bar">Help2</span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Brand</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-left" role="search">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="#">Link</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</nav>*@
|
||||
|
||||
|
||||
<div id="dialog-form" title="Search Lots">
|
||||
<form>
|
||||
<fieldset>
|
||||
<label for="name">Name</label>
|
||||
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all">
|
||||
<label for="email">Email</label>
|
||||
<input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all">
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
@*$("#Create").click(function () {
|
||||
//getting json data from kendo Grid
|
||||
var gridData = $("#Lots").data("kendoGrid").dataSource.data();
|
||||
|
||||
//var model = @Html.Raw(Json.Encode(Model))
|
||||
|
||||
var originatorID = $("#OriginatorID").data("kendoDropDownList").value();
|
||||
var title = $("#txtTitle").val();
|
||||
alert(title);
|
||||
|
||||
$.ajax({
|
||||
type: "post"
|
||||
, url: "/LotDisposition/CreateNew"
|
||||
//, data: JSON.stringify({ lots: gridData, lotdispo: model })
|
||||
, data: '{lotdispo:' + JSON.stringify(model) + '}'
|
||||
|
||||
,contentType: 'application/json; charset=utf-8'
|
||||
, success: function (result) {
|
||||
alert(result.count + " record(s) found");
|
||||
}
|
||||
});
|
||||
});*@
|
||||
|
||||
//$("#refresh").click(function () {
|
||||
// alert("click");
|
||||
// var grid = $("#Lots").data("kendoGrid");
|
||||
// //grid.dataSource.read(1);
|
||||
// grid.dataSource.create();
|
||||
|
||||
//});
|
||||
|
||||
|
||||
@*$("#refresh").click(function () {
|
||||
//getting json data from kendo Grid
|
||||
var gridData = $("#Lots").data("kendoGrid").dataSource.data();
|
||||
var modelData=@Html.Raw(val)
|
||||
|
||||
$.ajax({
|
||||
type: "POST"
|
||||
, url: "/LotDisposition/SaveGridData"
|
||||
, data: JSON.stringify({ lots: gridData, lotdispo: modelData })
|
||||
, contentType: "application/json"
|
||||
, success: function (result) {
|
||||
alert(result.count + " record(s) found");
|
||||
}
|
||||
});
|
||||
|
||||
//var vgrid = $("#Lots").data("kendoGrid");
|
||||
//var datasource = vgrid.dataSource;
|
||||
//var newRecord = { LotNumber: "A123456.1", LotStatusOption: null, WipPartNo: "PN123456", DiePartNo: 1234 };
|
||||
////Inserting new row
|
||||
//datasource.insert(newRecord);
|
||||
|
||||
});*@
|
||||
|
||||
|
||||
$("#dialog-form").dialog({
|
||||
autoOpen: false,
|
||||
show: {
|
||||
effect: "blind",
|
||||
duration: 500
|
||||
},
|
||||
hide: {
|
||||
effect: "explode",
|
||||
duration: 1000
|
||||
},
|
||||
height: 300,
|
||||
width: 350,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Create an account": function () {
|
||||
var bValid = true;
|
||||
// allFields.removeClass("ui-state-error");
|
||||
$(this).dialog("close");
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
// allFields.val("").removeClass("ui-state-error")
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#create-user")
|
||||
.button()
|
||||
.click(function () {
|
||||
$("#dialog-form").dialog("open");
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#submit").on('click', function () {
|
||||
$('#myModal').modal('hide');
|
||||
});
|
||||
$('form').submit(function (e) {
|
||||
e.preventDefault();
|
||||
var gridData = $("#Lots").data("kendoGrid").dataSource.data();
|
||||
var originatorID = $("#OriginatorID").data("kendoDropDownList").value();
|
||||
var issueNumber = $("#txtIssueNumber").val();
|
||||
var peRequired = $("#PERequired").val();
|
||||
var title = $("#txtTitle").val();
|
||||
var departmentids = $("#DepartmentIDs").data("kendoMultiSelect").value();
|
||||
var scrapID = $("#ScrapID").data("kendoDropDownList").value();
|
||||
var responsibilityAreaID = $("#ResponsibilityAreaID").data("kendoDropDownList").value();
|
||||
var spnScrapCode = $("#txtSPNScrapCode").val();
|
||||
var issueDescription = $("#txtIssueDescription").val();
|
||||
var reasonForDisposition = $("#txtReasonForDisposition").val();
|
||||
|
||||
//alert(spnScrapCode);
|
||||
|
||||
$.ajax({
|
||||
//url: '/LotDisposition/Create',
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(
|
||||
{
|
||||
Lots: gridData,
|
||||
Title: title,
|
||||
OriginatorID: originatorID,
|
||||
//IssueNumber: issueNumber,
|
||||
PERequired: peRequired,
|
||||
DepartmentIds: departmentids,
|
||||
ScrapID: scrapID,
|
||||
ResponsibilityAreaID: responsibilityAreaID,
|
||||
SPNScrapCode: spnScrapCode,
|
||||
IssueDescription: issueDescription,
|
||||
ReasonForDisposition: reasonForDisposition
|
||||
|
||||
}),
|
||||
success: function (result) {
|
||||
|
||||
alert("success " + result.UserName);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert("Failed " + jqXHR.responseText);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
@ -0,0 +1,60 @@
|
||||
@model Fab2ApprovalSystem.Models.Attachment
|
||||
|
||||
@{
|
||||
ViewBag.Title = "_DocumentAttachment";
|
||||
}
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.Attachment>()
|
||||
.Name("Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.AttachmentID).Visible(false);
|
||||
columns.Bound(l => l.IssueID).Visible(false);
|
||||
columns.Bound(l => l.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/UserUploads/#=FileName#' target='_blank'>#=FileName#</a>")
|
||||
.Title("Test");
|
||||
columns.Bound(l => l.FullName);
|
||||
columns.Bound(l => l.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => { command.Destroy(); });
|
||||
})
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:150px; 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.AttachmentID);
|
||||
})
|
||||
.PageSize(4)
|
||||
.Read(read => read.Action("Attachment_Read", "LotDisposition"))
|
||||
.Destroy(destroy => destroy.Action("Attachment_Destroy", "LotDisposition"))
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("files")
|
||||
.Async(a => a
|
||||
.Save("AttachSave", "LotDisposition")
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events
|
||||
.Success("onSuccess")
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>@ViewBag.Title - Mesa Fab2Approval</title>
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/kendo")
|
||||
@Styles.Render("~/Content/kendo/css")
|
||||
@Styles.Render("~/Content/css")
|
||||
|
||||
@Scripts.Render("~/Content/jqw/jq")
|
||||
@Styles.Render("~/Content/jqw/css")
|
||||
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
|
||||
|
||||
</head>
|
||||
<body class="navbar-inner">
|
||||
<div class=" navbar navbar-inverse navbar-fixed-top">
|
||||
<div>
|
||||
<div class="navbar-header">
|
||||
@*@Html.ActionLink("My Tasks", "Index", "Home", new { tabName = "MyTasks" }, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("All Tasks", "Index", "Home", new { tabName = "AllTasks" }, new { @class = "navbar-brand" })*@
|
||||
@Html.ActionLink("My Tasks", "MyTasks", "Home", null, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("All Documents", "AllDocuments", "Home", null, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("Special Work Request", "SpecialWorkRequestList", "Home", null, new { @class = "navbar-brand" })
|
||||
|
||||
|
||||
<a href="file:////@GlobalVars.NDriveURL/UserData/QA/CommonRO/Projects/AVI Tool/" class="navbar-brand"> AVI Tool</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse">
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@RenderBody()
|
||||
@*<hr />*@
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
1236
Fab2ApprovalSystem/Views/LotDisposition/_ScrapRelease.cshtml
Normal file
1236
Fab2ApprovalSystem/Views/LotDisposition/_ScrapRelease.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
1058
Fab2ApprovalSystem/Views/LotDisposition/_ScrapReleaseReadOnly.cshtml
Normal file
1058
Fab2ApprovalSystem/Views/LotDisposition/_ScrapReleaseReadOnly.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
2574
Fab2ApprovalSystem/Views/LotTraveler/Edit.cshtml
Normal file
2574
Fab2ApprovalSystem/Views/LotTraveler/Edit.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
761
Fab2ApprovalSystem/Views/LotTraveler/LotTravelerExecute.cshtml
Normal file
761
Fab2ApprovalSystem/Views/LotTraveler/LotTravelerExecute.cshtml
Normal file
@ -0,0 +1,761 @@
|
||||
@model Fab2ApprovalSystem.Models.LTLotTravelerHeaderViewModel
|
||||
@{
|
||||
ViewBag.Title = "LotTraveler - Execute";
|
||||
}
|
||||
@{
|
||||
Layout = "_LotTravelerLayout.cshtml";
|
||||
}
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<style>
|
||||
.k-header .k-link {
|
||||
text-align: center;
|
||||
}
|
||||
.k-grid tbody tr td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body onload="StartTimers();" onmousemove="ResetTimers();" onkeydown="ResetTimers();">
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<input type="hidden" id="LTWorkRequestID" value="@Model.LTWorkRequestID" />
|
||||
<input type="hidden" id="ReturnURL" value="@Url.Action("LotTravelerExecute", "LotTraveler", new { ltLotID = Model.ID })" />
|
||||
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
<label id="RevNumber" style="font-size: large; font-weight: bold; color: blue; font-family: 'Times New Roman';">
|
||||
Fab2 Electronic Lot Traveler - Lot# @Model.LotNumber Rev @Model.LotTravCurrentRevision [Mode : Execution]
|
||||
</label>
|
||||
</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-12">
|
||||
<input type="button" value="Print PDF" class="btn btn-warning btn-xs" id="PrintTravelerPDF" style="font-size: 10px" />
|
||||
<input type="button" value="Back to Work Request" class="btn btn-warning btn-xs" id="BackToRequestID" style="font-size: 10px" />
|
||||
|
||||
<label class="control-label">Lot Numbers:</label>
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("LotList")
|
||||
.BindTo(new SelectList(ViewBag.LotList, "LotID", "LotNumber"))
|
||||
.OptionLabel("Select")
|
||||
)
|
||||
<input type="button" value="Display Traveler" class="btn btn-warning btn-xs" id="GetTraveler" style="font-size: 10px" />
|
||||
|
||||
<label class="control-label">Revisions:</label>
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("Revisions")
|
||||
.BindTo(new SelectList(ViewBag.LotTravRevisionList, "ID", "RevisionNumber"))
|
||||
.OptionLabel("Select")
|
||||
)
|
||||
<input type="button" value="Display Revision" class="btn btn-warning btn-xs" id="GetRevision" style="font-size: 10px" />
|
||||
|
||||
<input type="button" value="Revision History" class="btn btn-warning btn-xs" id="RevisionHistoryData" style="font-size: 10px" />
|
||||
</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">SWR #:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.SWRNumber, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Last Update:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.LastUpdate, new { id = "txtLastUpdate", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<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 { @class = "k-textbox", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Status:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.Status, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Originator:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.Originator, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Updated By:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.LastUpdatedBy, new { id = "txtUpdatedBy", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">WIP PN#:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.WIPPartNumber, new { @class = "k-textbox", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Part Desc:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.PartDescription, new { @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">Base Flow:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.BaseFlow, new { id = "txtProcessFlow", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">ITAR:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.IsITAR, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-1">
|
||||
<label class="control-label pull-right">Purpose Of Lot/Change Description:</label>
|
||||
</div>
|
||||
<div class="col-sm-11">
|
||||
@Html.TextAreaFor(model => model.PurposeOfRequest, 5, 100, new { @class = "k-textbox", Readonly = "Readonly", style = "width:100%" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<!-- NEW PANEL ===============================================================-->
|
||||
<div class="panel-body bg-info">
|
||||
<h5>
|
||||
<font style="color:crimson; font-weight:bold">
|
||||
OLHold Steps - Completed
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-danger" id="aSection2" role="button" data-toggle="collapse" href="#collapseSection2" aria-expanded="true" aria-controls="collapseExample">
|
||||
Expand/Collpase
|
||||
</a>
|
||||
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSection2">
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTLotTravelerHoldSteps>()
|
||||
.Name("CompletedTasks")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.LotTravelerRevisionID).Visible(false);
|
||||
columns.Bound(a => a.Location).Width("50px");
|
||||
columns.Bound(a => a.Operation).Width("50px");
|
||||
columns.Bound(a => a.OperationDescription).Width("100px");
|
||||
columns.Bound(a => a.ChangeInstructions).ClientTemplate("#=changeNewLine(ChangeInstructions)#").Width("250px");
|
||||
columns.Bound(a => a.FileNames).ClientTemplate("#=buildLinks(FileNames, SWRNumber)#").Width("100px");
|
||||
columns.Bound(a => a.ExecutionTaskComments).ClientTemplate("#=changeNewLine(ExecutionTaskComments)#").Width("250px");
|
||||
columns.Bound(a => a.SignedOffByName).Width("50px");
|
||||
columns.Bound(a => a.SignOffTime).Format("{0:MM/dd/yy hh:mm:ss}").Width("50px");
|
||||
columns.Bound(a => a.Completed).ClientTemplate("<input type='checkbox' disabled #= Completed ? checked='checked':'' # class='chkbx' />").Width("50px");
|
||||
})
|
||||
.Resizable(e => e.Columns(true))
|
||||
.Events(e => e.DataBound("onHoldStepsDataBound"))
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:250; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetLotTravHoldStepsCompleted", "LotTraveler", new { LotID = Model.ID }))
|
||||
)
|
||||
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<!-- NEW PANEL ===============================================================-->
|
||||
<div class="panel-body bg-info">
|
||||
|
||||
<h5>
|
||||
<font style="color:crimson; font-weight:bold">
|
||||
OLHold Steps - Pending
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-danger" id="aSection3" role="button" data-toggle="collapse" href="#collapseSection3" aria-expanded="true" aria-controls="collapseExample">
|
||||
Expand/Collpase
|
||||
</a>
|
||||
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSection3">
|
||||
<div class="panel-body bg-info">
|
||||
<div class="pull-left">
|
||||
<button class="btn btn-warning btn-xs" data-toggle="modal" id="UploadWRAttachment" style="font-size:x-small">
|
||||
Upload Files
|
||||
</button>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTLotTravelerHoldSteps>()
|
||||
.Name("PendingTasks")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.LotTravelerRevisionID).Visible(false);
|
||||
columns.Bound(a => a.Location).Width("50px");
|
||||
columns.Bound(a => a.Operation).Width("50px");
|
||||
columns.Bound(a => a.OperationDescription).Width("100px");
|
||||
columns.Bound(a => a.ChangeInstructions).ClientTemplate("#=changeNewLine(ChangeInstructions)#").Width("250px");
|
||||
columns.Bound(a => a.FileNames).ClientTemplate("#=buildLinks(FileNames, SWRNumber)#").Width("100px");
|
||||
columns.Bound(a => a.ExecutionTaskComments).ClientTemplate("#=changeNewLine(ExecutionTaskComments)#").Width("250px");
|
||||
columns.Bound(a => a.SignedOffByName).Width("50px");
|
||||
columns.Bound(a => a.SignOffTime).Format("{0:MM/dd/yy hh:mm:ss}").Width("50px");
|
||||
columns.Bound(a => a.Completed).ClientTemplate("<input type='checkbox' disabled #= Completed ? checked='checked':'' # class='chkbx' />").Width("50px");
|
||||
columns.Command(c => c.Custom("Edit").Click("ExecuteHoldStep")).Width("50px");
|
||||
})
|
||||
.Resizable(e => e.Columns(true))
|
||||
.Events(e => e.DataBound("onHoldStepsDataBound"))
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:250; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetLotTravHoldStepsPending", "LotTraveler", new { LotID = Model.ID }))
|
||||
)
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="modal fade" id="timeout" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg" style="width:500px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #fce0a3;">
|
||||
<h3 class="modal-title">Page About To Timeout</h3>
|
||||
</div>
|
||||
<div class="modal-body" style="background-color: crimson; font-size: 20px; color:white">
|
||||
You will be automatically be redirected to Special Request List page in 1 minute.<br />
|
||||
To remain on this page please close this window or press the ESC key.
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #fce0a3; ">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="AddTaskCommentsForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" style="width: 800px">
|
||||
<div class="modal-header" style="background-color: #fce0a3;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Execute Tasks/Comments:</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="background-color: #a5c9eb; font-size: 12px">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="control-group">
|
||||
<label for="BaseFlow">Base Flow:</label>
|
||||
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
||||
<input type="text" class="form-control" id="txtBaseFlow" readonly="Readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="control-group">
|
||||
<label for="Location">Location:</label>
|
||||
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
||||
<input type="text" class="form-control" id="txtLocation" readonly="Readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="control-group">
|
||||
<label for="Operation">Operation:</label>
|
||||
<div class="controls k-textbox" style="width:100px; font-size: 10px">
|
||||
<input type="text" class="form-control" id="txtOperation" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<label for="Description">Description:</label>
|
||||
<div class="controls k-textbox" style="width:365px; font-size: 10px">
|
||||
<input type="text" class="form-control" id="txtOperationDesc" style="font-size: 10px" readonly="Readonly">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="control-group">
|
||||
<div class="col-sm-12">
|
||||
<label for="Instructions">Instructions:</label>
|
||||
<textarea class="form-control" rows="15" id="txtChangeInstructions" style="font-size: 10px" readonly="Readonly"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="control-group">
|
||||
<div class="col-sm-12">
|
||||
<label for="txtTaskComments">Tasks/Comments:</label>
|
||||
<textarea class="form-control" rows="5" id="txtTaskComments" style="font-size: 10px"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="control-group">
|
||||
<div class="col-sm-12">
|
||||
<label for="Instructions">Completed:</label>
|
||||
<input type="checkbox" id="taskCompletedFlag" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #fce0a3; ">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" id="SaveTaskCommentsHoldStep">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="RevisionHistoryWin" 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">
|
||||
<h4 class="modal-title" id="myModalLabel">Revision History</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.RevisionHistory>()
|
||||
.Name("RevisionHistory")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.RevisionedBy);
|
||||
columns.Bound(a => a.Comments);
|
||||
columns.Bound(a => a.RevisionCreateDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 12px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetLotTravelerRevisionHistory", "LotTraveler", new { lotID = Model.ID }))
|
||||
)
|
||||
)
|
||||
</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="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-12">
|
||||
<label for="WRAttachmentComments">Comments:</label>
|
||||
<textarea class="form-control" rows="3" id="WRAttachmentComments"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="control-group">
|
||||
<label for="DocumentType">Document Type:</label>
|
||||
<div class="controls" style="width:200px; font-size: 10px">
|
||||
<div id="ex" class="k-content">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("WRAttachDocType")
|
||||
.DataTextField("Text")
|
||||
.DataValueField("Value")
|
||||
.BindTo(new List<SelectListItem>() {
|
||||
new SelectListItem() {
|
||||
Text = "Select",
|
||||
Value = "Select"
|
||||
},
|
||||
|
||||
new SelectListItem() {
|
||||
Text = "Instructions",
|
||||
Value = "Instructions"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Traveler",
|
||||
Value = "Traveler"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Other",
|
||||
Value = "Other"
|
||||
}
|
||||
|
||||
})
|
||||
.Value("1")
|
||||
.HtmlAttributes(new { style = "width:100px;" })
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-8">
|
||||
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("files")
|
||||
.Async(a => a
|
||||
.Save("AttachSaveWorkRequest", "LotTraveler", new { workRequestID = Model.LTWorkRequestID, currentRevision = Model.WorkReqRevision, swrNo = Model.SWRNumber })
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.Events(events => events.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>
|
||||
</body>
|
||||
|
||||
@Html.Partial("_LTReassignOriginator")
|
||||
|
||||
<script type="text/javascript">
|
||||
var holdStepOperation;
|
||||
var currentHoldStepID;
|
||||
var currentLotTravRevisionID;
|
||||
var newSession = true;
|
||||
$(document).ready(function () {
|
||||
$('#collapseSection3').collapse({
|
||||
toggle: true
|
||||
})
|
||||
|
||||
$("#files").on('click', function (e) {
|
||||
|
||||
if ($("#WRAttachDocType").data("kendoDropDownList").value() == "Select" ||
|
||||
$("#WRAttachmentComments").val() == '') {
|
||||
|
||||
alert('Document Type and Comments both needs to filled in before uploading a a file')
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
function onHoldStepsDataBound(arg) {
|
||||
var myElem = document.getElementById('trParentHeader');
|
||||
if (myElem == null) {
|
||||
$("#HoldSteps").find("th.k-header").parent().before("<tr id='trParentHeader'> <th align='center' colspan='3' class='k-header' style='color:red'></th> <th align='center' colspan='2' class='k-header' style='font-size:12px;color:red'><strong>Change Instructions/File </strong></th> </th> <th align='center' colspan='4' class='k-header' style='font-size:12px;color:red'><strong>Execution </strong></th></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
function buildLinks(fileNames, swrNumber) {
|
||||
var template = "";
|
||||
|
||||
//var fileName = 4;
|
||||
|
||||
//alert(workRequestID);
|
||||
|
||||
if (fileNames != null) {
|
||||
var tempValue = fileNames.split(',');
|
||||
for (var i = 0; i < tempValue.length; i++) {
|
||||
var tempValue2 = tempValue[i].split('~');
|
||||
|
||||
var fileName = tempValue2[0];
|
||||
var fileGuid = tempValue2[1];
|
||||
|
||||
var tempFile = fileName.split('.');
|
||||
var fileExtension = tempFile[tempFile.length - 1];
|
||||
|
||||
//template += "<a href='@GlobalVars.AttachmentUrl" + "LotTraveler/" + swrNumber + "/" + fileGuid + "." + fileExtension + "'>" + fileName + "</a><BR>" + " ";
|
||||
|
||||
template += "<a href='/LotTraveler/DownloadFile?fileGuid=" + fileGuid + "&swrNumber=" + @Model.SWRNumber + "&typeOfDoc=2" + "'>" + fileName + "</a><BR>" + " ";
|
||||
}
|
||||
|
||||
}
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
$("#GetRevision").on('click', function (e) {
|
||||
|
||||
e.preventDefault();
|
||||
var revid = $("#Revisions").data("kendoDropDownList").text();
|
||||
|
||||
var url = '@Url.Action("LotTravelerReadonly", "LotTraveler", new { ltLotID = "__id__", revisionNumber = "__revID__" })';
|
||||
url = url.replace('__revID__', revid);
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', '@Model.ID');
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
$("#GetTraveler").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var lotid = $("#LotList").data("kendoDropDownList").value();
|
||||
|
||||
var url = '@Url.Action("LotTravelerUpdate", "LotTraveler", new { ltLotID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', lotid);
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
function ExecuteHoldStep(e) {
|
||||
e.preventDefault();
|
||||
holdStepOperation = "Update";
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
currentHoldStepID = dataItem.ID;
|
||||
currentLotTravRevisionID = dataItem.LotTravelerRevisionID
|
||||
|
||||
$("#txtBaseFlow").val($("#txtProcessFlow").val());
|
||||
$("#txtLocation").val(dataItem.Location);
|
||||
$("#txtOperation").val(dataItem.Operation);
|
||||
$("#txtOperationDesc").val(dataItem.OperationDescription);
|
||||
$("#txtChangeInstructions").val(dataItem.ChangeInstructions);
|
||||
$("#taskCompletedFlag").attr('checked', false);
|
||||
$("#txtTaskComments").val('');
|
||||
|
||||
$("#AddTaskCommentsForm").modal('show');
|
||||
|
||||
}
|
||||
|
||||
|
||||
$("#SaveTaskCommentsHoldStep").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var completedFlag;
|
||||
if ($("#taskCompletedFlag").is(":checked"))
|
||||
completedFlag = true;
|
||||
else
|
||||
completedFlag = false;
|
||||
|
||||
var urlString = "/LotTraveler/UpdateLotTravlerExecution"
|
||||
$.ajax({
|
||||
url: urlString,
|
||||
type: "POST",
|
||||
data: {
|
||||
currentHoldStepID: currentHoldStepID,
|
||||
taskComments: $("#txtTaskComments").val(),
|
||||
taskcompleted: completedFlag
|
||||
|
||||
},
|
||||
success: function (data) {
|
||||
$("#AddTaskCommentsForm").modal('hide');
|
||||
|
||||
var grid = $("#PendingTasks").data("kendoGrid");
|
||||
grid.dataSource.read('@Model.ID');
|
||||
|
||||
var grid = $("#CompletedTasks").data("kendoGrid");
|
||||
grid.dataSource.read('@Model.ID');
|
||||
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
function changeNewLine(text) {
|
||||
if (text != null) {
|
||||
var regexp = new RegExp('\n', 'g');
|
||||
return text.replace(regexp, '<br>');
|
||||
}
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
function checkBoxTemplate(dataVal) {
|
||||
'<input type="checkbox" #= dataVal ? \'checked="checked"\' : "" # class="chkbx" />'
|
||||
}
|
||||
|
||||
|
||||
$("#PrintTravelerPDF").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var url = '@Url.Action("DisplayLotTravlerPdf", "LotTraveler", new { ltLotID = "__id__", revisionNumber = "__revid__" })';
|
||||
url = url.replace("__revid__", '@Model.LotTravCurrentRevision')
|
||||
url = url.replace('amp;', '');
|
||||
window.open(url.replace('__id__', '@Model.ID', '_blank'));
|
||||
})
|
||||
|
||||
|
||||
$("#BackToRequestID").on('click', function (e) {
|
||||
|
||||
e.preventDefault();
|
||||
var url = '@Url.Action("Edit", "LotTraveler", new { IssueID = "__id__"})';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#LTWorkRequestID").val());
|
||||
})
|
||||
|
||||
$('#RevisionHistoryData').on('click', function () {
|
||||
$("#RevisionHistoryWin").modal('show');
|
||||
return false;
|
||||
})
|
||||
|
||||
$(window).bind("beforeunload", function (e) {
|
||||
//return confirm("Do you really want to close?");
|
||||
var url;
|
||||
$.ajax({
|
||||
url: "/LotTraveler/ReleaseLockOnLotTravelerUpdateDoc",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
lotID: ("@Model.ID")
|
||||
},
|
||||
success: function () {
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
$("#UploadWRAttachment").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$("#WinAttachDocuments").modal('show');
|
||||
})
|
||||
|
||||
function UploadAdditionalData(e)
|
||||
{
|
||||
fileData = e;
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
e.data = {
|
||||
comments: $("#WRAttachmentComments").val(),
|
||||
docType : $("#WRAttachDocType").data("kendoDropDownList").value()
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@*function IdleTimeout() {
|
||||
//window.location = logoutUrl;
|
||||
var url = '@Url.Action("SpecialWorkRequest", "Home")';
|
||||
window.location.href = url;
|
||||
|
||||
}*@
|
||||
|
||||
</script>
|
169
Fab2ApprovalSystem/Views/LotTraveler/LotTravelerPDF.cshtml
Normal file
169
Fab2ApprovalSystem/Views/LotTraveler/LotTravelerPDF.cshtml
Normal file
@ -0,0 +1,169 @@
|
||||
@model Fab2ApprovalSystem.ViewModels.LotTravelerPdf
|
||||
@{
|
||||
ViewBag.Title = "LotTravelerPDF";
|
||||
}
|
||||
|
||||
<table width="100%" border="1" style="font-size:6px;">
|
||||
<tr style="color:black; font-family:'Times New Roman'">
|
||||
<td colspan="7" align="center" style="font-size: 10px; font-weight: bold; background-color: #e5e0e0">
|
||||
Fab2 Electronic Lot Traveler - Lot# @Model.LotNumber
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Version
|
||||
</td>
|
||||
<td>
|
||||
<font style="font-style:italic">
|
||||
Rev @Model.LotTravCurrentRevision
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
SWR#
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.SWRNumber
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Title
|
||||
</td>
|
||||
<td colspan="5">
|
||||
@Model.Title
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Originator
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.Originator
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Last Update
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.LastUpdate
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Updated By
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.LastUpdatedBy
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
WIP PN#
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.WIPPartNumber
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Description
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.PartDescription
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Base Flow
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.BaseFlow
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Purpose of Lot / Change Description
|
||||
</td>
|
||||
<td colspan="4">
|
||||
@Html.Raw(@Model.PurposeOfRequest)
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Status
|
||||
</td>
|
||||
<td >
|
||||
Approved
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
ITAR
|
||||
</td>
|
||||
<td >
|
||||
@(Model.IsITAR ? "Yes" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table width="100%" border="1">
|
||||
<tr bgcolor="#e5e0e0" style="font-weight: bold; font-size: 5px;">
|
||||
<td>
|
||||
Location
|
||||
</td>
|
||||
<td>
|
||||
Operation
|
||||
</td>
|
||||
<td colspan="2">
|
||||
Description
|
||||
</td>
|
||||
<td colspan="3">
|
||||
Instruction Details
|
||||
</td>
|
||||
<td colspan="3">
|
||||
File Names
|
||||
</td>
|
||||
|
||||
<td colspan="3">
|
||||
Tasks/Comments
|
||||
</td>
|
||||
<td>
|
||||
Signed-Off By
|
||||
</td>
|
||||
<td>
|
||||
Signed-Off Time
|
||||
</td>
|
||||
<td>
|
||||
Completed
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@foreach (Fab2ApprovalSystem.Models.LTLotTravelerHoldSteps task in Model.Tasklist)
|
||||
{
|
||||
<tr style="font-size: 5px;">
|
||||
<td>
|
||||
@task.Location
|
||||
</td>
|
||||
<td>
|
||||
@task.Operation
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@task.OperationDescription
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@Html.Raw(@task.ChangeInstructions)
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@Html.Raw(@task.FileNames)
|
||||
</td>
|
||||
|
||||
<td colspan="3">
|
||||
@Html.Raw(@task.ExecutionTaskComments)
|
||||
</td>
|
||||
<td>
|
||||
@task.SignedOffByName
|
||||
</td>
|
||||
<td>
|
||||
@task.SignOffTime
|
||||
</td>
|
||||
<td>
|
||||
@(task.Completed ? "Yes" : "No")
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
|
||||
|
||||
</table>
|
453
Fab2ApprovalSystem/Views/LotTraveler/LotTravelerReadOnly.cshtml
Normal file
453
Fab2ApprovalSystem/Views/LotTraveler/LotTravelerReadOnly.cshtml
Normal file
@ -0,0 +1,453 @@
|
||||
@model Fab2ApprovalSystem.Models.LTLotTravelerHeaderViewModel
|
||||
@{
|
||||
ViewBag.Title = "LotTraveler - Readonly";
|
||||
}
|
||||
@{
|
||||
Layout = "_LotTravelerLayout.cshtml";
|
||||
}
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<style>
|
||||
.k-header .k-link {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<input type="hidden" id="LTWorkRequestID" value="@Model.LTWorkRequestID" />
|
||||
<input type="hidden" id="ReturnURL" value="@Url.Action("LotTravelerReadonly", "LotTraveler", new { ltLotID = Model.ID, revisionNumber = Model.LotTravCurrentRevision })" />
|
||||
|
||||
@Html.AntiForgeryToken()
|
||||
<div class="panel panel-default" 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-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
<font style="color:crimson">
|
||||
<label id="RevNumber" style="font-size: large; font-weight: bold; color: blue; ">
|
||||
Fab2 Electronic Lot Traveler - Lot# @Model.LotNumber
|
||||
Rev @Model.LotTravCurrentRevision
|
||||
[Mode : Readonly]
|
||||
</label>
|
||||
@*<font style="color: blue; font-weight:bold">@Model.LotNumber</font> <font style="color: green; font-weight:bold; font-style:italic">Rev @Model.LotTravCurrentRevision</font><font style="color: red; font-weight:bold;" > [Mode : Readonly]</font>*@
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<input type="button" value="Print PDF" class="btn btn-warning btn-xs" id="PrintTravelerPDF" style="font-size: 10px" />
|
||||
<input type="button" value="Back to Work Request" class="btn btn-warning btn-xs" id="BackToRequestID" style="font-size: 10px" />
|
||||
|
||||
<label class="control-label">Lot Numbers:</label>
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("LotList")
|
||||
.BindTo(new SelectList(ViewBag.LotList, "LotID", "LotNumber"))
|
||||
.OptionLabel("Select")
|
||||
)
|
||||
<input type="button" value="Display Traveler" class="btn btn-warning btn-xs" id="GetTraveler" style="font-size: 10px" />
|
||||
|
||||
<label class="control-label">Revisions:</label>
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("Revisions")
|
||||
.BindTo(new SelectList(ViewBag.LotTravRevisionList, "ID", "RevisionNumber"))
|
||||
.OptionLabel("Select")
|
||||
)
|
||||
<input type="button" value="Display Revision" class="btn btn-warning btn-xs" id="GetRevision" style="font-size: 10px" />
|
||||
|
||||
<input type="button" value="Revision History" class="btn btn-warning btn-xs" id="RevisionHistoryData" style=" font-size: 10px" />
|
||||
</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">SWR #:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.SWRNumber, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Last Update:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.LastUpdate, new { id = "txtLastUpdate", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<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 { @class = "k-textbox", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Closed Reason:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.TravelerClosedReason, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Closed By:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.TravelerClosedBy, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Closed Date:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.TravelerClosedDate, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Originator:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.Originator, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Updated By:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.LastUpdatedBy, new { id = "txtUpdatedBy", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">WIP PN#:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.WIPPartNumber, new { @class = "k-textbox", Readonly = "Readonly"})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">Part Desc:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.PartDescription, new { @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">Base Flow:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.BaseFlow, new { id = "txtProcessFlow", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">ITAR:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.IsITAR, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-1">
|
||||
<label class="control-label pull-right">Purpose Of Lot/Change Description:</label>
|
||||
</div>
|
||||
<div class="col-sm-11">
|
||||
@Html.TextAreaFor(model => model.PurposeOfRequest, 5, 100, new { @class = "k-textbox", Readonly = "Readonly", style = "width:100%" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<!-- NEW PANEL ===============================================================-->
|
||||
<div class="panel-body bg-info">
|
||||
<h5>
|
||||
<font style="color:crimson; font-weight:bold">
|
||||
OLHold Steps
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-danger" id="aSection2" role="button" data-toggle="collapse" href="#collapseSection2" aria-expanded="true" aria-controls="collapseExample">
|
||||
Expand/Collpase
|
||||
</a>
|
||||
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="collapse" id="collapseSection2">
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTLotTravelerHoldSteps>()
|
||||
.Name("HoldSteps")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.LotTravelerRevisionID).Visible(false);
|
||||
columns.Bound(a => a.Location).Width("50px");
|
||||
columns.Bound(a => a.Operation).Width("50px");
|
||||
columns.Bound(a => a.OperationDescription).Width("100px");
|
||||
columns.Bound(a => a.ChangeInstructions).ClientTemplate("#=changeNewLine(ChangeInstructions)#").Width("250px");
|
||||
columns.Bound(a => a.FileNames).ClientTemplate("#=buildLinks(FileNames, SWRNumber)#").Width("100px");
|
||||
columns.Bound(a => a.ExecutionTaskComments).ClientTemplate("#=changeNewLine(ExecutionTaskComments)#").Width("250px");
|
||||
columns.Bound(a => a.SignedOffByName).Width("50px");
|
||||
columns.Bound(a => a.SignOffTime).Format("{0:MM/dd/yy hh:mm:ss}").Width("50px");
|
||||
columns.Bound(a => a.Completed).ClientTemplate("<input type='checkbox' disabled #= Completed ? checked='checked':'' # class='chkbx' />").Width("50px");
|
||||
})
|
||||
.Resizable(e => e.Columns(true))
|
||||
.Events(e => e.DataBound("onHoldStepsDataBound"))
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:250; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetLotTravHoldStepsByRevision", "LotTraveler", new { LotID = Model.ID, revisionNumber = Model.LotTravCurrentRevision }))
|
||||
)
|
||||
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="modal fade" id="RevisionHistoryWin" 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">
|
||||
<h4 class="modal-title" id="myModalLabel">Revision History</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.RevisionHistory>()
|
||||
.Name("RevisionHistory")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.RevisionedBy);
|
||||
columns.Bound(a => a.Comments);
|
||||
columns.Bound(a => a.RevisionCreateDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 12px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetLotTravelerRevisionHistory", "LotTraveler", new { lotID = Model.ID }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("_LTReassignOriginator")
|
||||
|
||||
<script type="text/javascript">
|
||||
var holdStepOperation;
|
||||
var currentHoldStepID;
|
||||
var currentLotTravRevisionID;
|
||||
var newSession = true;
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
$('#collapseSection2').collapse({
|
||||
toggle: true
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
function onHoldStepsDataBound(arg) {
|
||||
var myElem = document.getElementById('trParentHeader');
|
||||
if (myElem == null) {
|
||||
$("#HoldSteps").find("th.k-header").parent().before("<tr id='trParentHeader'> <th align='center' colspan='3' class='k-header' style='color:red'></th> <th align='center' colspan='2' class='k-header' style='font-size:12px;color:red'><strong>Change Instructions/File </strong></th> </th> <th align='center' colspan='4' class='k-header' style='font-size:12px;color:red'><strong>Execution </strong></th></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
function buildLinks(fileNames, swrNumber) {
|
||||
var template = "";
|
||||
|
||||
//var fileName = 4;
|
||||
|
||||
//alert(workRequestID);
|
||||
|
||||
if (fileNames != null) {
|
||||
var tempValue = fileNames.split(',');
|
||||
for (var i = 0; i < tempValue.length; i++) {
|
||||
var tempValue2 = tempValue[i].split('~');
|
||||
|
||||
var fileName = tempValue2[0];
|
||||
var fileGuid = tempValue2[1];
|
||||
|
||||
var tempFile = fileName.split('.');
|
||||
var fileExtension = tempFile[tempFile.length - 1];
|
||||
|
||||
//template += "<a href='@GlobalVars.AttachmentUrl" + "LotTraveler/" + swrNumber + "/" + fileGuid + "." + fileExtension + "'>" + fileName + "</a><BR>" + " ";
|
||||
template += "<a href='/LotTraveler/DownloadFile?fileGuid=" + fileGuid + "&swrNumber=" + @Model.SWRNumber + "&typeOfDoc=2" + "'>" + fileName + "</a><BR>" + " ";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
$("#GetRevision").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var revid = $("#Revisions").data("kendoDropDownList").text();
|
||||
if (revid != "Select") {
|
||||
|
||||
var url = "@Html.Raw(@Url.Action("LotTravelerReadonly", "LotTraveler", new { ltLotID = "__id__", revisionNumber = "__revID__" }))";
|
||||
url = url.replace('__revID__', revid);
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', '@Model.ID');
|
||||
}
|
||||
else {
|
||||
alert('Please select a Revision Number');
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
$("#GetTraveler").on('click', function () {
|
||||
|
||||
var lotid = $("#LotList").data("kendoDropDownList").value();
|
||||
|
||||
var url = "@Html.Raw(@Url.Action("LotTravelerUpdate", "LotTraveler", new { ltLotID = "__id__" }))";
|
||||
//url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', lotid);
|
||||
|
||||
|
||||
})
|
||||
|
||||
$("#PrintTravelerPDF").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var url = "@Html.Raw(@Url.Action("DisplayLotTravlerPdf", "LotTraveler", new { ltLotID = "__id__", revisionNumber = "__revid__" }))";
|
||||
url = url.replace("__revid__", '@Model.LotTravCurrentRevision')
|
||||
window.open(url.replace('__id__', '@Model.ID', '_blank'));
|
||||
})
|
||||
|
||||
|
||||
$("#BackToRequestID").on('click', function (e) {
|
||||
|
||||
e.preventDefault();
|
||||
var url = "@Html.Raw(@Url.Action("Edit", "LotTraveler", new { IssueID = "__id__"}))";
|
||||
|
||||
window.location.href = url.replace('__id__', $("#LTWorkRequestID").val());
|
||||
})
|
||||
|
||||
$('#RevisionHistoryData').on('click', function () {
|
||||
$("#RevisionHistoryWin").modal('show');
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
function changeNewLine(text) {
|
||||
if (text != null) {
|
||||
var regexp = new RegExp('\n', 'g');
|
||||
return text.replace(regexp, '<br>');
|
||||
}
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
1291
Fab2ApprovalSystem/Views/LotTraveler/LotTravelerUpdate.cshtml
Normal file
1291
Fab2ApprovalSystem/Views/LotTraveler/LotTravelerUpdate.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
1561
Fab2ApprovalSystem/Views/LotTraveler/WorkRequestApproval.cshtml
Normal file
1561
Fab2ApprovalSystem/Views/LotTraveler/WorkRequestApproval.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
426
Fab2ApprovalSystem/Views/LotTraveler/WorkRequestPDF.cshtml
Normal file
426
Fab2ApprovalSystem/Views/LotTraveler/WorkRequestPDF.cshtml
Normal file
@ -0,0 +1,426 @@
|
||||
@model Fab2ApprovalSystem.ViewModels.WorkRequestPdf
|
||||
|
||||
@{
|
||||
ViewBag.Title = "WorkRequestPDF";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<table width="100%" border="1" style="font-size:6px;">
|
||||
<tr style="color:black; font-family:'Times New Roman'">
|
||||
<td colspan="10" align="center" style="font-size: 10px; font-weight: bold; background-color: #e5e0e0">
|
||||
Fab2 Lot Traveler Special Request - SWR# @Model.SWRNumber
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Version
|
||||
</td>
|
||||
<td>
|
||||
<font style="font-style:italic">
|
||||
Rev @Model.Revision
|
||||
</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12" bgcolor="#e5e0e0" style="font-size: 8px; font-weight: bold">
|
||||
Section 1:Work Request
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
SWR#
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@Model.SWRNumber
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Title
|
||||
</td>
|
||||
<td colspan="7">
|
||||
@Model.Title
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Originator
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@Model.OriginatorName
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Last Lot Type
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@Model.LotType
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
PCRB#
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@Model.PCRBNumber
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Submit Date
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@Model.SubmitedDate
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Affected Departments
|
||||
</td>
|
||||
<td colspan="7">
|
||||
@Model.AffectedDepartments
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Status
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@(Model.Status == 1 ? "Approved" : "Pending")
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Affected Modules
|
||||
</td>
|
||||
<td colspan="7">
|
||||
@Model.AffectedModules
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
ITAR
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@(Model.IsITAR ? "Yes" : "No")
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Engineering Lot Start Required
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@(Model.EngLotStartRequired == 1 ? "Yes": "No")
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Lot Type Conversion
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@(Model.LotTypeConversion == 1 ? "Yes": "No")
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Qual Lot
|
||||
</td>
|
||||
<td>
|
||||
@(Model.QualLot == 1 ? "Yes" : "No")
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Purpose of Lot / Change Description
|
||||
</td>
|
||||
<td colspan="11">
|
||||
@Html.Raw(@Model.PurposeOfRequest)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<table width="100%" border="1" style="font-size:6px;">
|
||||
<tr>
|
||||
<td colspan="9" bgcolor="#e5e0e0" style="font-size: 8px; font-weight: bold">
|
||||
Section 1-A:Engineering Wafer Lot Start
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
WIP Lot#
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.LotNumber
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Start Date
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.PlannedLotStartDate
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Sch. Close Date
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.PlannedScheduledCloseDate
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Lot Start Charge Dept#
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.ChargeDepartment
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Allocation to Use
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.AllocationToUse
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Predicted Cycle Time
|
||||
</td>
|
||||
<td >
|
||||
@Model.PredictedCyleTime
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Days
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="1" style="font-size:6px;">
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
Starting Material
|
||||
</td>
|
||||
<td>
|
||||
Total Qty: @Model.TotalQty
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td width="10%" bgcolor="#e5e0e0">WIP PN#</td>
|
||||
<td width="30%" bgcolor="#e5e0e0">Description</td>
|
||||
<td width="10%" bgcolor="#e5e0e0">EPI Silicon Part#</td>
|
||||
<td width="10%" bgcolor="#e5e0e0">Qty</td>
|
||||
<td width="20%" bgcolor="#e5e0e0">Supplier</td>
|
||||
<td width="20%" bgcolor="#e5e0e0">Source</td>
|
||||
</tr>
|
||||
@foreach (Fab2ApprovalSystem.Models.LTMaterial material in Model.LTMaterial)
|
||||
{
|
||||
<tr>
|
||||
<td width="10%">
|
||||
@material.WIPPartNumber
|
||||
</td>
|
||||
<td width="30%">
|
||||
@Model.PartDescription
|
||||
</td>
|
||||
<td width="10%">
|
||||
@material.EPISiliconPartNumber
|
||||
</td>
|
||||
<td width="10%">
|
||||
@material.Quantity
|
||||
</td>
|
||||
<td width="20%">
|
||||
@material.Supplier
|
||||
</td>
|
||||
<td width="20%">
|
||||
@material.Source
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<table border="1" width="100%" style="font-size:6px;">
|
||||
<tr>
|
||||
<td width="10%" colspan="7" bgcolor="#e5e0e0">
|
||||
Lot Start Check List
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
OnHand/Existing
|
||||
</td>
|
||||
<td>
|
||||
Silicon:
|
||||
@(Model.SiliconOnHand ? "Yes" : "No")
|
||||
</td>
|
||||
<td>
|
||||
Reticle Set:
|
||||
@(Model.ReticleOnHand ? "Yes" : "No")
|
||||
|
||||
</td>
|
||||
<td>
|
||||
SPN transfer:
|
||||
@(Model.SPNTransferOnHand ? "Yes" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
Probe Card:
|
||||
@(Model.ProbeCardOnHand ? "Yes" : "No")
|
||||
</td>
|
||||
<td>
|
||||
Probe Recipe:
|
||||
@(Model.ProbeRecipeOnHand ? "Yes" : "No")
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Process Change Details:
|
||||
@(Model.ProcessChangeDetailsOnHand ? "Yes" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Comments
|
||||
</td>
|
||||
<td colspan="6">
|
||||
@Model.LotStartCheckListComments
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" width="100%" style="font-size:6px;">
|
||||
<tr>
|
||||
<td colspan="6" bgcolor="#e5e0e0">
|
||||
Lot Start in SPN
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
SIGNON
|
||||
</td>
|
||||
<td colspan="2">
|
||||
SURP
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
WIP AREA
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.WIPArea
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
VERB
|
||||
</td>
|
||||
<td colspan="2">
|
||||
START
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Start Date
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.PlannedLotStartDate
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
WIP Lot#
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.LotNumber
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
WIP PN#
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.WIPPartNumber
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Type
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.LotType
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Process Flow
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.ProcessFlow
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Start Qty
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@Model.StartQty
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
Qual Lot
|
||||
</td>
|
||||
<td colspan="2">
|
||||
@(Model.QualLot == 1 ? "Y" : "")
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#e5e0e0">
|
||||
VERB
|
||||
</td>
|
||||
<td bgcolor="#e5e0e0">
|
||||
COMMENT
|
||||
</td>
|
||||
<td colspan="4">
|
||||
@Model.VerbComment
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="e5e0e0" colspan="3">
|
||||
Record Silicon Lot #s in SPN and tape tags to Traveler
|
||||
</td>
|
||||
<td colspan="3">
|
||||
@(Model.RecordSiliconLotInSPNTapeTagTotrav == 1 ? "Yes" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="e5e0e0">
|
||||
Silicon Lot#s: Cassette 1
|
||||
</td>
|
||||
<td colspan="4">
|
||||
@Model.SiliconLotNoCassette1
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
<table width="100%" border="1" style="font-size:6px;">
|
||||
<tr width="100%">
|
||||
<td colspan="6" bgcolor="#e5e0e0" style="font-size: 8px; font-weight: bold">
|
||||
Section 2: OLHOLD and Engineering Deviation Specified by Originator
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td width="10%" bgcolor="#e5e0e0">Base Flow</td>
|
||||
<td width="10%" bgcolor="#e5e0e0">Locn</td>
|
||||
<td width="10%" bgcolor="#e5e0e0">Operation</td>
|
||||
<td width="40%" bgcolor="#e5e0e0">Description</td>
|
||||
<td width="10%" bgcolor="#e5e0e0">Change Instuctions</td>
|
||||
<td width="10%" bgcolor="#e5e0e0">File Names</td>
|
||||
</tr>
|
||||
@foreach (Fab2ApprovalSystem.Models.LTHoldStep holStep in Model.LTHoldStep)
|
||||
{
|
||||
<tr>
|
||||
<td width="10%">
|
||||
@holStep.BaseFlow
|
||||
</td>
|
||||
<td width="10%">
|
||||
@holStep.Location
|
||||
</td>
|
||||
<td width="10%">
|
||||
@holStep.Operation
|
||||
</td>
|
||||
<td width="20%">
|
||||
@Html.Raw(@holStep.OperationDescription)
|
||||
</td>
|
||||
<td width="40%">
|
||||
@Html.Raw(@holStep.ChangeInstructions)
|
||||
</td>
|
||||
<td width="10%">
|
||||
@holStep.FileNames
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</table>
|
1964
Fab2ApprovalSystem/Views/LotTraveler/WorkRequestReadOnly.cshtml
Normal file
1964
Fab2ApprovalSystem/Views/LotTraveler/WorkRequestReadOnly.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
3314
Fab2ApprovalSystem/Views/LotTraveler/WorkRequestRevision.cshtml
Normal file
3314
Fab2ApprovalSystem/Views/LotTraveler/WorkRequestRevision.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
208
Fab2ApprovalSystem/Views/LotTraveler/_HoldStepAttachments.cshtml
Normal file
208
Fab2ApprovalSystem/Views/LotTraveler/_HoldStepAttachments.cshtml
Normal file
@ -0,0 +1,208 @@
|
||||
@model Fab2ApprovalSystem.Models.LTHoldStep
|
||||
|
||||
@Html.HiddenFor(model => model.LTWorkRequestID, new { id = "workRequestID" })
|
||||
@Html.HiddenFor(model => model.ID, new { id = "holdStepID" })
|
||||
@Html.HiddenFor(model => model.SWRNumber, new { id = "swrNumber" })
|
||||
@Html.HiddenFor(model => model.Revision, new { id = "currentRevision" })
|
||||
@Html.HiddenFor(model => model.currentStep, new { id = "currentStep" })
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="control-group">
|
||||
<label for="DocumentType">Document Type:</label>
|
||||
<div class="controls" style="width:200px; font-size: 10px">
|
||||
<div id="ex" class="k-content">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("HoldStepAttachDocType")
|
||||
.DataTextField("Text")
|
||||
.DataValueField("Value")
|
||||
.BindTo(new List<SelectListItem>() {
|
||||
new SelectListItem() {
|
||||
Text = "Select",
|
||||
Value = "Select"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Instructions",
|
||||
Value = "Instructions"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Traveler",
|
||||
Value = "Traveler"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Other",
|
||||
Value = "Other"
|
||||
}
|
||||
|
||||
})
|
||||
.Value("1")
|
||||
.HtmlAttributes(new { style= "width:100px;" })
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<div class="control-group">
|
||||
@if (@Model.currentStep != 3)
|
||||
{
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("HoldStepAttachment")
|
||||
.Async(a => a
|
||||
.Save("HoldStepAttachSave", "LotTraveler")
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events.Success("SetDocType").Upload("UploadData")
|
||||
)
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label for="HoldStepAttachmentComments">Comments:</label>
|
||||
<textarea class="form-control" rows="3" id="HoldStepAttachmentComments"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!--.Save("AttachSave", "LotTraveler", new { holdStepID = Model.ID, currentRevision = Model.Revision, swrNo = Model.SWRNumber })-->
|
||||
<div class="row">
|
||||
@if (@Model.currentStep != 3)
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTWorkRequestAttachment>()
|
||||
.Name("HoldStepAttachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.LTHoldStepID).Visible(false);
|
||||
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>).Width("100px");
|
||||
//.ClientTemplate("<a href='" + GlobalVars.AttachmentUrl + "LotTraveler/#=SWRNumber#/#=FileGUID#.#=FileExtension#' target='_blank'>#=FileName#</a>");
|
||||
columns.Bound(a => a.DocType);
|
||||
columns.Bound(a => a.UploadedByName);
|
||||
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(c => c.Destroy());
|
||||
columns.Command(c => c.Custom("View").Click("DownloadAttachment")).Width("100px");
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetHoldStepAttachments", "LotTraveler", new { holdStepID = Model.ID }))
|
||||
.Destroy(destroy => destroy.Action("DeleteHoldStepAttachment", "LotTraveler"))
|
||||
)
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTWorkRequestAttachment>()
|
||||
.Name("HoldStepAttachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.LTHoldStepID).Visible(false);
|
||||
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>).Width("100px");
|
||||
//.ClientTemplate("<a href='" + GlobalVars.AttachmentUrl + "LotTraveler/#=SWRNumber#/Rev#=Revision#/#=FileGUID#.#=FileExtension#' target='_blank'>#=FileName#</a>");
|
||||
columns.Bound(a => a.DocType);
|
||||
columns.Bound(a => a.UploadedByName);
|
||||
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(c => c.Custom("View").Click("DownloadAttachment")).Width("100px"); ;
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetHoldStepAttachments", "LotTraveler", new { holdStepID = Model.ID }))
|
||||
)
|
||||
)
|
||||
}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#HoldStepAttachment").on('click', function (e) {
|
||||
|
||||
if ($("#HoldStepAttachDocType").data("kendoDropDownList").value() == "Select" ||
|
||||
$("#HoldStepAttachmentComments").val() == '') {
|
||||
|
||||
alert('Document Type and Comments both needs to filled in before uploading a a file')
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function SetDocType(e) {
|
||||
var grid = $("#HoldStepAttachments").data("kendoGrid");
|
||||
grid.dataSource.read($("#holdStepID").val());
|
||||
|
||||
RefreshHoldStepGrid();
|
||||
RefreshWorkReqAttachmentsGrid();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function UploadData(e)
|
||||
{
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt|.slddrw|.sldprt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
e.data = {
|
||||
holdStepID: $("#holdStepID").val(),
|
||||
currentRevision: $("#currentRevision").val(),
|
||||
swrNo: $("#swrNumber").val(),
|
||||
docType: $("#HoldStepAttachDocType").data("kendoDropDownList").value(),
|
||||
comments: $("#HoldStepAttachmentComments").val()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function RefreshHoldStepGrid()
|
||||
{
|
||||
var grid = $("#HoldSteps").data("kendoGrid");
|
||||
grid.dataSource.read($("#workRequestID").val());
|
||||
}
|
||||
|
||||
|
||||
function DownloadAttachment(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileGUID = dataItem.FileGUID;
|
||||
var attachmentID = dataItem.AttachmentID;
|
||||
|
||||
window.location = '/LotTraveler/DownloadFile?fileGuid=' + fileGUID + '&swrNumber=' + "@Model.SWRNumber" + "&typeOfDoc=1";
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
@ -0,0 +1,226 @@
|
||||
@model Fab2ApprovalSystem.Models.LTHoldStep
|
||||
|
||||
@Html.HiddenFor(model => model.LTWorkRequestID, new { id = "workRequestID" })
|
||||
@Html.HiddenFor(model => model.ID, new { id = "holdStepID" })
|
||||
@Html.HiddenFor(model => model.SWRNumber, new { id = "swrNumber" })
|
||||
@Html.HiddenFor(model => model.Revision, new { id = "currentRevision" })
|
||||
@Html.HiddenFor(model => model.currentStep, new { id = "currentStep" })
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="control-group">
|
||||
<label for="DocumentType">Document Type:</label>
|
||||
<div class="controls" style="width:200px; font-size: 10px">
|
||||
<div id="ex" class="k-content">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("HoldStepAttachDocType")
|
||||
.DataTextField("Text")
|
||||
.DataValueField("Value")
|
||||
.BindTo(new List<SelectListItem>() {
|
||||
new SelectListItem() {
|
||||
Text = "Select",
|
||||
Value = "Select"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Instructions",
|
||||
Value = "Instructions"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Traveler",
|
||||
Value = "Traveler"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Other",
|
||||
Value = "Other"
|
||||
}
|
||||
|
||||
})
|
||||
.Value("1")
|
||||
.HtmlAttributes(new { style = "width:100px;" })
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<div class="control-group">
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("HoldStepAttachment")
|
||||
.Async(a => a
|
||||
.Save("HoldStepAttachSaveRev", "LotTraveler")
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events.Success("SetDocType").Upload("UploadData")
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label for="HoldStepAttachmentComments">Comments:</label>
|
||||
<textarea class="form-control" rows="3" id="HoldStepAttachmentComments"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!--.Save("AttachSave", "LotTraveler", new { holdStepID = Model.ID, currentRevision = Model.Revision, swrNo = Model.SWRNumber })-->
|
||||
<div class="row">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTWorkRequestAttachment>()
|
||||
.Name("HoldStepAttachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.LTHoldStepID).Visible(false);
|
||||
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>).Width("100px");
|
||||
//.ClientTemplate("<a href='" + GlobalVars.AttachmentUrl + "LotTraveler/#=SWRNumber#/Rev#=Revision#/#=FileGUID#.#=FileExtension#' target='_blank'>#=FileName#</a>");
|
||||
columns.Bound(a => a.DocType);
|
||||
columns.Bound(a => a.UploadedByName);
|
||||
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(c => c.Custom("View").Click("DownloadAttachment")).Width("100px"); ;
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetHoldStepAttachments", "LotTraveler", new { holdStepID = Model.ID }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var fileData;
|
||||
|
||||
$("#HoldStepAttachment").on('click', function (e) {
|
||||
|
||||
if ($("#HoldStepAttachDocType").data("kendoDropDownList").value() == "Select" ||
|
||||
$("#HoldStepAttachmentComments").val() == '') {
|
||||
|
||||
alert('Document Type and Comments both needs to filled in before uploading a a file')
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function SetDocType(e) {
|
||||
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
|
||||
if (model == "true") {
|
||||
$.ajax({
|
||||
url: '/LotTraveler/GetRevisedWrkReqIDFromHoldStepID',
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: { prevHoldStepID: parseInt($("#holdStepID").val()) },
|
||||
|
||||
success: function (data) {
|
||||
$("#AddHoldStepAttachmentFormRevision").modal('hide');
|
||||
var url = '@Url.Action("WorkRequestRevision", "LotTraveler", new { workRequestID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', parseInt(data));
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
var grid = $("#HoldStepAttachments").data("kendoGrid");
|
||||
grid.dataSource.read($("#holdStepID").val());
|
||||
|
||||
RefreshHoldStepGrid();
|
||||
RefreshWorkReqAttachmentsGrid();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function UploadData(e) {
|
||||
fileData = e;
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//var baseFlowLocation = $("#BaseFlowLocations").data("kendoDropDownList").value();
|
||||
//var baseFlowOperation = $("#BaseFlowOperations").data("kendoDropDownList").text();
|
||||
//var baseFlowOperDesc = $("#txtOperationDesc").val();
|
||||
//var changeInstructions = $("#ChangeInstructions").val();
|
||||
|
||||
|
||||
|
||||
//var data = ReturnModelObject();
|
||||
////data.LTHoldStep = holdStepItem;
|
||||
//data.RevisionComments = $("#revisionHoldStepComments").val();
|
||||
|
||||
e.data = {
|
||||
workRequestID: $("#workRequestID").val(),
|
||||
holdStepID: $("#holdStepID").val(),
|
||||
currentRevision: $("#currentRevision").val(),
|
||||
swrNo: $("#swrNumber").val(),
|
||||
docType: $("#HoldStepAttachDocType").data("kendoDropDownList").value(),
|
||||
revComments: $("#revisionHoldStepAttComments").val(),
|
||||
comments: $("#HoldStepAttachmentComments").val()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function RefreshHoldStepGrid() {
|
||||
var grid = $("#HoldSteps").data("kendoGrid");
|
||||
grid.dataSource.read($("#workRequestID").val());
|
||||
}
|
||||
|
||||
function RefreshWorkReqAttachmentsGrid() {
|
||||
var grid = $("#WorkRequestAttachments").data("kendoGrid");
|
||||
grid.dataSource.read($("@Model.ID").val());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//$("#submitHoldStepAttRevComments").on('click', function () {
|
||||
|
||||
|
||||
|
||||
// $.ajax({
|
||||
// url: '/LotTraveler/HoldStepAttachSave',
|
||||
// type: "POST",
|
||||
// contentType: "application/json; charset=utf-8",
|
||||
// data: { HoldStepAttachment: fileData, holdStepID: $("#holdStepID").val(), currentRevision: $("#currentRevision").val(), swrNo: $("#swrNumber").val(), docType: $("#docType").data("kendoDropDownList").value() },
|
||||
// //data: JSON.stringify(fileData),
|
||||
// success: function (data) {
|
||||
// $("#WinHoldStepAttRevComments").modal('hide');
|
||||
|
||||
|
||||
// }
|
||||
// })
|
||||
//})
|
||||
|
||||
function DownloadAttachment(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileGUID = dataItem.FileGUID;
|
||||
var attachmentID = dataItem.AttachmentID;
|
||||
|
||||
window.location = '/LotTraveler/DownloadFile?fileGuid=' + fileGUID + '&swrNumber=' + "@Model.SWRNumber" + "&typeOfDoc=1";
|
||||
|
||||
}
|
||||
|
||||
</script>
|
@ -0,0 +1,110 @@
|
||||
<div class="modal fade" id="ReAssignOriginator" 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">Re-Assign Originator From: <label class="bg-danger" id="ReAssignOriginatorFromLabel">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 Originator to:</h4>
|
||||
<div id='lstReAssignOriginator'>
|
||||
</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="ConfirmOriginatorReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#lnkReassignOriginator").click(function (e) {
|
||||
|
||||
if ($("#Originator").length > 0)
|
||||
$("#ReAssignOriginatorFromLabel").text($("#Originator").val());
|
||||
else
|
||||
$("#ReAssignOriginatorFromLabel").text($("#txtOriginatorName").val());
|
||||
|
||||
$("#comments").val("");
|
||||
|
||||
var dataAdapter = new $.jqx.dataAdapter({
|
||||
datatype: "json",
|
||||
datafields: [
|
||||
{ name: "UserID" },
|
||||
{ name: "FullName" }
|
||||
],
|
||||
id: 'id',
|
||||
url: "/LotTraveler/GetAllUsersList",
|
||||
});
|
||||
|
||||
$("#lstReAssignOriginator").jqxListBox({
|
||||
multipleextended: false,
|
||||
theme: "arctic",
|
||||
source: dataAdapter,
|
||||
displayMember: "FullName",
|
||||
valueMember: "UserID",
|
||||
width: 200,
|
||||
height: 200
|
||||
});
|
||||
|
||||
$("#ReAssignOriginator").modal('show');
|
||||
});
|
||||
|
||||
$('#ConfirmOriginatorReAssignment').on('click', function () {
|
||||
|
||||
if ($('#lstReAssignOriginator').jqxListBox('getSelectedItem') == null) {
|
||||
alert("You must select a new originator");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($("#comments").val() == "") {
|
||||
alert("Comments are required");
|
||||
return;
|
||||
}
|
||||
|
||||
$('#ConfirmOriginatorReAssignment').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/LotTraveler/ReAssignOriginatorByAdmin",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
workRequestID: $("#LTWorkRequestID").val(),
|
||||
comments: $("#comments").val(),
|
||||
newOriginatorId: $("#lstReAssignOriginator").jqxListBox("getSelectedItem").value,
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
$("#ReAssignOriginator").modal('hide');
|
||||
|
||||
var url = '@Url.Action("Edit", "LotTraveler", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
if ($("#ReturnURL").length > 0)
|
||||
url = $("#ReturnURL").val();
|
||||
window.location.href = url.replace('__id__', $("#LTWorkRequestID").val());
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
$('#ConfirmOriginatorReAssignment').attr("disabled", false);
|
||||
alert("Server error while changing originator");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
@ -0,0 +1,230 @@
|
||||
@model Fab2ApprovalSystem.Models.LTLotTravelerHoldSteps
|
||||
|
||||
@Html.HiddenFor(model => model.LTLotID, new { id = "LotID" })
|
||||
@Html.HiddenFor(model => model.ID, new { id = "ltHoldStepID" })
|
||||
@Html.HiddenFor(model => model.SWRNumber, new { id = "swrNumber" })
|
||||
@Html.HiddenFor(model => model.CurrentRevision, new { id = "currentRevision" })
|
||||
@Html.HiddenFor(model => model.WorkRequestID, new { id = "workRequestID" })
|
||||
@*@Html.HiddenFor(model => model.currentStep, new { id = "currentStep" })*@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="control-group">
|
||||
<label for="BaseFlow">Document Type:</label>
|
||||
<div class="controls" style="width:200px; font-size: 10px">
|
||||
<div id="ex" class="k-content">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("docType")
|
||||
.DataTextField("Text")
|
||||
.DataValueField("Value")
|
||||
.BindTo(new List<SelectListItem>() {
|
||||
new SelectListItem() {
|
||||
Text = "Instructions",
|
||||
Value = "Instructions"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Traveler",
|
||||
Value = "Traveler"
|
||||
},
|
||||
new SelectListItem() {
|
||||
Text = "Other",
|
||||
Value = "Other"
|
||||
}
|
||||
|
||||
})
|
||||
.Value("1")
|
||||
.HtmlAttributes(new { style = "width:100px;" })
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<div class="control-group">
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("LotTravHoldStepAttachment")
|
||||
.Async(a => a
|
||||
.Save("LotTravHoldStepAttachSaveRev", "LotTraveler")
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events.Success("SetDocType").Upload("UploadData")
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--.Save("AttachSave", "LotTraveler", new { ltHoldStepID = Model.ID, currentRevision = Model.Revision, swrNo = Model.SWRNumber })-->
|
||||
<div class="row">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LTLotTravAttachment>()
|
||||
.Name("LTHoldStepAttachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.LTLotTravHoldStepID).Visible(false);
|
||||
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>).Width("100px");
|
||||
//.ClientTemplate("<a href='" + GlobalVars.AttachmentUrl + "LotTraveler/#=SWRNumber#/Rev#=Revision#/#=FileGUID#.#=FileExtension#' target='_blank'>#=FileName#</a>");
|
||||
|
||||
columns.Bound(a => a.DocType);
|
||||
columns.Bound(a => a.UploadedByName);
|
||||
columns.Bound(a => a.UploadTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(c => c.Custom("View").Click("DownloadAttachment")).Width("100px");
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetLTHoldStepAttachments", "LotTraveler", new { ltHoldStepID = Model.ID }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var fileData;
|
||||
function SetDocType(e) {
|
||||
|
||||
//alert(newSession);
|
||||
if (newSession) {
|
||||
newSession = false;
|
||||
|
||||
grid = $("#HoldSteps").data("kendoGrid");
|
||||
grid.dataSource.read($("#LotID").val());
|
||||
|
||||
$("#AddLTHoldStepAttachmentFormRevision").modal('hide');
|
||||
|
||||
// update the header and the Revision
|
||||
var urlString = '/LotTraveler/GetLotTravelerHeader'
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
type: "GET",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: { ltLotID: $("#LotID").val() },
|
||||
success: function (data) {
|
||||
// update the header and the Revision
|
||||
//alert(data.LastUpdate);
|
||||
$("#txtUpdatedBy").val(data.LastUpdatedBy);
|
||||
$("#txtLastUpdate").val((formatJSONDate(data.LastUpdate)))
|
||||
$("#RevNumber").text("Fab2 Electronic Lot Traveler - Lot#" + data.LotNumber + " Rev " + data.LotTravCurrentRevision)
|
||||
$("#RevNumber").css("color", "blue");
|
||||
|
||||
|
||||
var url = "/LotTraveler/GetLotTravRevisions";
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ltLotID: $("#LotID").val()
|
||||
},
|
||||
success: function (data) {
|
||||
$("#Revisions").data("kendoDropDownList").dataSource.data(data);
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
var grid = $("#LTHoldStepAttachments").data("kendoGrid");
|
||||
grid.dataSource.read($("#ltHoldStepID").val());
|
||||
|
||||
grid = $("#HoldSteps").data("kendoGrid");
|
||||
grid.dataSource.read($("#workRequestID").val());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function UploadData(e) {
|
||||
fileData = e;
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
e.data = {
|
||||
// workRequestID: $("#workRequestID").val(),
|
||||
ltHoldStepID: $("#ltHoldStepID").val(),
|
||||
currentWRRevision: $("#currentRevision").val(),
|
||||
swrNo: $("#swrNumber").val(),
|
||||
docType: $("#docType").data("kendoDropDownList").value(),
|
||||
revComments: $("#revisionHoldStepAttComments").val()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function RefreshHoldStepGrid() {
|
||||
var grid = $("#HoldSteps").data("kendoGrid");
|
||||
grid.dataSource.read($("#ltHoldStepID").val());
|
||||
}
|
||||
|
||||
@*function RefreshWorkReqAttachmentsGrid() {
|
||||
var grid = $("#WorkRequestAttachments").data("kendoGrid");
|
||||
grid.dataSource.read($("@Model.ID").val());
|
||||
|
||||
|
||||
}*@
|
||||
|
||||
|
||||
function DownloadAttachment(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileGUID = dataItem.FileGUID;
|
||||
var attachmentID = dataItem.AttachmentID;
|
||||
|
||||
window.location = '/LotTraveler/DownloadFile?fileGuid=' + fileGUID + '&swrNumber=' + "@Model.SWRNumber" + "&typeOfDoc=1";
|
||||
|
||||
}
|
||||
|
||||
|
||||
//$("#submitHoldStepAttRevComments").on('click', function () {
|
||||
|
||||
|
||||
|
||||
// $.ajax({
|
||||
// url: '/LotTraveler/HoldStepAttachSave',
|
||||
// type: "POST",
|
||||
// contentType: "application/json; charset=utf-8",
|
||||
// data: { HoldStepAttachment: fileData, ltHoldStepID: $("#ltHoldStepID").val(), currentRevision: $("#currentRevision").val(), swrNo: $("#swrNumber").val(), docType: $("#docType").data("kendoDropDownList").value() },
|
||||
// //data: JSON.stringify(fileData),
|
||||
// success: function (data) {
|
||||
// $("#WinHoldStepAttRevComments").modal('hide');
|
||||
|
||||
|
||||
// }
|
||||
// })
|
||||
//})
|
||||
|
||||
</script>
|
@ -0,0 +1,61 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "_LotTravelerLayout";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>@ViewBag.Title - Fab2Approval</title>
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/kendo")
|
||||
@Styles.Render("~/Content/kendo/css")
|
||||
@Styles.Render("~/Content/css")
|
||||
|
||||
@Scripts.Render("~/Content/jqw/jq")
|
||||
@Styles.Render("~/Content/jqw/css")
|
||||
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
|
||||
|
||||
</head>
|
||||
<body class="navbar-inner">
|
||||
<div class=" navbar navbar-inverse navbar-fixed-top">
|
||||
<div>
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
@*@Html.ActionLink("My Tasks", "Index", "Home", new { tabName = "MyTasks" }, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("All Tasks", "Index", "Home", new { tabName = "AllTasks" }, new { @class = "navbar-brand" })*@
|
||||
@Html.ActionLink("My Tasks", "MyTasks", "Home", null, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("All Documents", "AllDocuments", "Home", null, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("Special Work Request", "SpecialWorkRequestList", "Home",null, new { @class = "navbar-brand" })
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse">
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@RenderBody()
|
||||
@*<hr />*@
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
2558
Fab2ApprovalSystem/Views/MRB/CopyOfEdit.cshtml
Normal file
2558
Fab2ApprovalSystem/Views/MRB/CopyOfEdit.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
2598
Fab2ApprovalSystem/Views/MRB/Edit.cshtml
Normal file
2598
Fab2ApprovalSystem/Views/MRB/Edit.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
@model Fab2ApprovalSystem.ViewModels.CloseToQDBOptionViewModel
|
||||
|
||||
@(Html.Kendo().DropDownListFor(m => m)
|
||||
.DataValueField("CloseToQDBOptionID")
|
||||
.DataTextField("CloseToQDBOption")
|
||||
.BindTo((System.Collections.IEnumerable)ViewData["CloseToQDBOptions"])
|
||||
|
||||
)
|
3
Fab2ApprovalSystem/Views/MRB/EditorTemplates/Date.cshtml
Normal file
3
Fab2ApprovalSystem/Views/MRB/EditorTemplates/Date.cshtml
Normal file
@ -0,0 +1,3 @@
|
||||
@model DateTime?
|
||||
|
||||
@(Html.Kendo().DatePickerFor(m => m))
|
30
Fab2ApprovalSystem/Views/MRB/MRBPdf.cshtml
Normal file
30
Fab2ApprovalSystem/Views/MRB/MRBPdf.cshtml
Normal file
@ -0,0 +1,30 @@
|
||||
@model Fab2ApprovalSystem.Models.MRB
|
||||
|
||||
<table cellpadding="3" cellspacing="3" border="1">
|
||||
<tr bgcolor="#777777" color="#ffffff">
|
||||
<td width="20%" align="center">
|
||||
Name
|
||||
</td>
|
||||
<td width="50%" align="center">
|
||||
Address
|
||||
</td>
|
||||
<td width="30%" align="center">
|
||||
Place
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
@Model.MRBNumber
|
||||
</td>
|
||||
<td>
|
||||
@Model.IssueStartDate
|
||||
</td>
|
||||
<td>
|
||||
@Model.Title
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</table>
|
268
Fab2ApprovalSystem/Views/MRB/_DispositionType.cshtml
Normal file
268
Fab2ApprovalSystem/Views/MRB/_DispositionType.cshtml
Normal file
@ -0,0 +1,268 @@
|
||||
|
||||
<div class="modal fade" id="DispositionForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" style="width: 600px">
|
||||
<div class="modal-header" style="background-color: #e4daa1; font-size: 15px;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Disposition:</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="background-color: #75adc6; font-size: 12px;">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table class="table-condensed" border="0" width="100%">
|
||||
|
||||
<tr>
|
||||
<td width="25%">
|
||||
<label for="DispoType">Disposition Type:</label>
|
||||
</td>
|
||||
<td width="75%">
|
||||
@Html.TextBox("txtDispoType", null, new { @class = "k-textbox", style = "width:100%" })
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">
|
||||
<label for="DispoDescription">Dispo Description:</label>
|
||||
</td>
|
||||
<td width="75%">
|
||||
@Html.TextBox("txtDispoName", null, new { @class = "k-textbox", style = "width:100%" })
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">
|
||||
<label for="dropCloseToQDB">MRB Flag to SPN:</label>
|
||||
</td>
|
||||
<td width="75%">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("dropCloseToQDB")
|
||||
.DataTextField("Text")
|
||||
.DataValueField("Value")
|
||||
.BindTo(new List<SelectListItem>()
|
||||
{
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "Yes",
|
||||
Value = "1"
|
||||
},
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "No",
|
||||
Value = "0"
|
||||
}
|
||||
}
|
||||
)
|
||||
.Value("0")
|
||||
)
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">
|
||||
<label for="txtDispositonNotes">Dispositon Notes:</label>
|
||||
</td>
|
||||
<td width="75%">
|
||||
@Html.TextArea("txtDispositonNotes", "", 5, 20, new { @class = "k-textbox", style = "width:100%" })
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #e4daa1; font-size: 15px;">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" id="SaveDisposition">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
var dispositionOperation = "Edit";
|
||||
var dispositionID;
|
||||
function EditDisposition(e) {
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
dispositionID = dataItem.DispositionID;
|
||||
var mrbNumber = dataItem.MRBNumber;
|
||||
var dispositionType = dataItem.DispositionType;
|
||||
var dispositionName = dataItem.DispositionName;
|
||||
var closeToQDBOptionString = dataItem.CloseToQDBOptionString;
|
||||
var dispositionNotes = dataItem.DispositionNotes
|
||||
|
||||
dispositionOperation = 'Edit';
|
||||
clearDispositionForm();
|
||||
// if the dispotype is only between A and I then execute the if clause
|
||||
var result = /^[A-Ia-i]/.test(dispositionType);
|
||||
if (result) {
|
||||
$('#txtDispoType').attr("disabled", true);
|
||||
$("#txtDispoName").attr("disabled", true);
|
||||
//$("#dropCloseToQDB").data("kendoDropDownList").enable(false);
|
||||
|
||||
}
|
||||
else {
|
||||
$('#txtDispoType').attr("disabled", false);
|
||||
$("#txtDispoName").attr("disabled", false);
|
||||
//$("#dropCloseToQDB").data("kendoDropDownList").enable(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$("#txtDispoType").val(dispositionType);
|
||||
$("#txtDispoName").val(dispositionName);
|
||||
$("#dropCloseToQDB").data("kendoDropDownList").text(closeToQDBOptionString);
|
||||
$("#txtDispositonNotes").val(dispositionNotes)
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
$("#DispositionForm").modal("show");
|
||||
}
|
||||
|
||||
$('#SaveDisposition').on('click', function () {
|
||||
var objectData = ReturnDispositionObject();
|
||||
|
||||
|
||||
var url = "";
|
||||
|
||||
if (dispositionOperation == 'Add') {
|
||||
url = "/MRB/InsertDisposition";
|
||||
if (checkIfDispositionTypeExists(objectData.DispositionType))
|
||||
return;
|
||||
}
|
||||
else {
|
||||
url = "/MRB/UpdateDisposition";
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(objectData),
|
||||
success: function (objdata) {
|
||||
var grid = $("#Dispositions").data("kendoGrid");
|
||||
grid.dataSource.read($("@Model.MRBNumber").val());
|
||||
$("#DispositionForm").modal("hide");
|
||||
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
$("#DispositionForm").modal("hide");
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
function ReturnDispositionObject() {
|
||||
var closeToQDBOption = {
|
||||
CloseToQDBOptionID: $("#dropCloseToQDB").data("kendoDropDownList").value(),
|
||||
CloseToQDBOption: $("#dropCloseToQDB").data("kendoDropDownList").text()
|
||||
};
|
||||
if (dispositionOperation == 'Add') {
|
||||
var objectData = {
|
||||
DispositionID: 0,
|
||||
MRBNumber: "@Model.MRBNumber",
|
||||
DispositionType: $("#txtDispoType").val().toUpperCase().trim(),
|
||||
DispositionName: $("#txtDispoName").val(),
|
||||
DispositionNotes: $("#txtDispositonNotes").val(),
|
||||
CloseToQDBOption: closeToQDBOption
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
var objectData = {
|
||||
DispositionID: dispositionID,
|
||||
MRBNumber: "@Model.MRBNumber",
|
||||
DispositionType: $("#txtDispoType").val().toUpperCase().trim(),
|
||||
DispositionName: $("#txtDispoName").val(),
|
||||
DispositionNotes: $("#txtDispositonNotes").val(),
|
||||
CloseToQDBOption: closeToQDBOption
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return objectData;
|
||||
}
|
||||
|
||||
function DeleteDisposition(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var dispositionType = dataItem.DispositionType;
|
||||
var dispositionID = dataItem.DispositionID;
|
||||
|
||||
// if the dispotype is only between A and I then execute the if clause
|
||||
var result = /^[A-Ia-i]/.test(dispositionType);
|
||||
if (result) {
|
||||
alert('Cannot delete the default Disposition')
|
||||
}
|
||||
else {
|
||||
e.preventDefault();
|
||||
if (confirm("Are you sure you want to delete this Disposition?")) {
|
||||
|
||||
$.ajax({
|
||||
url: "/MRB/DeleteDisposition", //TODO
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
DispositionID: dispositionID
|
||||
},
|
||||
success: function (data) {
|
||||
var grid = $("#Dispositions").data("kendoGrid");
|
||||
grid.dataSource.read($('@Model.MRBNumber').val());
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$('#AddDisposition').on('click', function () {
|
||||
|
||||
// enable all the controls
|
||||
$('#txtDispoType').attr("disabled", false);
|
||||
$("#txtDispoName").attr("disabled", false);
|
||||
$("#dropCloseToQDB").data("kendoDropDownList").enable(true);
|
||||
|
||||
dispositionOperation = 'Add';
|
||||
clearDispositionForm();
|
||||
|
||||
$("#DispositionForm").modal("show");
|
||||
e.preventDefault();
|
||||
})
|
||||
|
||||
function clearDispositionForm() {
|
||||
$("#txtDispoType").val("");
|
||||
$("#txtDispoName").val("");
|
||||
$("#dropCloseToQDB").data("kendoDropDownList").text("No");
|
||||
$("#txtDispositonNotes").val("");
|
||||
}
|
||||
|
||||
|
||||
function checkIfDispositionTypeExists(dispositionType) {
|
||||
var dispositionGrid = $("#Dispositions").data("kendoGrid");
|
||||
|
||||
var i;
|
||||
//Getting grid items
|
||||
var items = dispositionGrid.dataSource.data();
|
||||
for (i = 0; i < items.length; i++) {
|
||||
var item = items[i];
|
||||
|
||||
if (item.DispositionType == dispositionType) {
|
||||
alert("Disposition Type already exist");
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
</script>
|
58
Fab2ApprovalSystem/Views/MRB/_MRBLayout.cshtml
Normal file
58
Fab2ApprovalSystem/Views/MRB/_MRBLayout.cshtml
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>@ViewBag.Title - Mesa Approval</title>
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/kendo")
|
||||
@Styles.Render("~/Content/kendo/css")
|
||||
@Styles.Render("~/Content/css")
|
||||
|
||||
@Scripts.Render("~/Content/jqw/jq")
|
||||
@Styles.Render("~/Content/jqw/css")
|
||||
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
|
||||
|
||||
</head>
|
||||
<body class="navbar-inner">
|
||||
<div class=" navbar navbar-inverse navbar-fixed-top">
|
||||
<div>
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
@*@Html.ActionLink("My Tasks", "Index", "Home", new { tabName = "MyTasks" }, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("All Tasks", "Index", "Home", new { tabName = "AllTasks" }, new { @class = "navbar-brand" })*@
|
||||
@Html.ActionLink("My Tasks", "MyTasks", "Home", null, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("All Documents", "AllDocuments", "Home", null, new { @class = "navbar-brand" })
|
||||
@Html.ActionLink("Special Work Request", "SpecialWorkRequestList", "Home", null, new { @class = "navbar-brand" })
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse">
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@RenderBody()
|
||||
@*<hr />*@
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
369
Fab2ApprovalSystem/Views/PartsRequest/Edit.cshtml
Normal file
369
Fab2ApprovalSystem/Views/PartsRequest/Edit.cshtml
Normal file
@ -0,0 +1,369 @@
|
||||
@model Fab2ApprovalSystem.Models.PartsRequest
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Parts Request - Edit";
|
||||
}
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-spacing: 5px;
|
||||
padding: 5px;
|
||||
border-color: white;
|
||||
border-color: white;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.k-header .k-link {
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.k-grid-edit-row input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header .k-link {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.k-grid .k-edit-cell input {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
|
||||
<div>
|
||||
<div class="panel panel-default center-block" data-spy="affix">
|
||||
<input type="button" value="Back to List" class="btn btn-primary btn-xs" id="PRList" />
|
||||
<input type="button" value="Save" class="btn btn-primary btn-xs" id="SavePR" />
|
||||
<input type="button" value="Submit" class="btn btn-primary btn-xs" id="SubmitPR" />
|
||||
|
||||
<input type="button" value="Approval Log History" class="btn btn-primary btn-xs" id="ApprovalLogHistoryData" />
|
||||
</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">
|
||||
New/Repair Spare Parts Request
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label for="txtPRNumber" class="control-label pull-right">Request #:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.PRNumber, @Functions.ReturnPartsRequestNoStringFormat(@Model.PRNumber),
|
||||
new { id = "txtPRNumber", @class = "k-textbox form-control", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label for="txtTitle" class="control-label pull-right">Title:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox form-control" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Submit Date:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.SubmitDate, "{0:MM/dd/yyyy}", new { id = "txSubmitDate", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Tech Lead:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("TechLeadID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.OptionLabel("Select")
|
||||
.Value(Model.TechLeadID.ToString())
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Originator:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("OriginatorID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.Value(Model.OriginatorID.ToString())
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Requestor:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("RequestorID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.OptionLabel("Select")
|
||||
.Value(Model.RequestorID.ToString())
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Status:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.Status, new { id = "txtStatus", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Attached Documents:</label>
|
||||
<div>
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("files")
|
||||
.Async(a => a
|
||||
.Save("AttachSave", "PartsRequest", new { PRNumber = Model.PRNumber })
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events
|
||||
.Success("OnFileUploadSuccess")
|
||||
.Upload("CheckFileType")
|
||||
)
|
||||
)
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.PartsRequestAttachmentList>()
|
||||
.Name("Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.AttachmentID).Visible(false);
|
||||
columns.Bound(a => a.PRNumber).Visible(false);
|
||||
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>);
|
||||
columns.Bound(a => a.FullName);
|
||||
columns.Bound(a => a.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("View").Click("DownloadAttachment"));
|
||||
columns.Command(command => command.Custom("Delete").Click("DeleteAttachment"));
|
||||
})
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:100px; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.Error("ErrorHandler"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.AttachmentID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("Attachment_Read", "PartsRequest", new { PRNumber = Model.PRNumber }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal col-sm-12">
|
||||
@Html.TextAreaFor(model => model.Description, 10, 60, new {
|
||||
id = "txtDescription",
|
||||
@class = "form-control",
|
||||
style = "font-size: 11px;width: 100%;" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("_ApproversListPartial")
|
||||
|
||||
}
|
||||
|
||||
@Html.Partial("_ApprovalLogPartial")
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#PRList").on('click', function () {
|
||||
var url = '@Url.Action("PartsRequestList", "Home")';
|
||||
window.location = url;
|
||||
});
|
||||
|
||||
$("#SavePR").on('click', function (e) {
|
||||
SaveData(false);
|
||||
});
|
||||
|
||||
$("#SubmitPR").on('click', function (e) {
|
||||
SaveData(true);
|
||||
});
|
||||
|
||||
function GetPRNumber() {
|
||||
return $('#txtPRNumber').val().substr(2);
|
||||
}
|
||||
|
||||
function ReloadUI() {
|
||||
var url = '@Url.Action("Edit", "PartsRequest", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', GetPRNumber());
|
||||
}
|
||||
|
||||
function DownloadAttachment(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileName;
|
||||
var attachmentID = dataItem.AttachmentID;
|
||||
|
||||
window.location = '/PartsRequest/DownloadFile?attachmentID=' + attachmentID + '&prNumber=' + "@Model.PRNumber";
|
||||
|
||||
}
|
||||
|
||||
function DeleteAttachment(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if (confirm("Are you sure you want to delete this attachment?")) {
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileName;
|
||||
var attachmentID = dataItem.AttachmentID;
|
||||
|
||||
$.ajax({
|
||||
url: "/PartsRequest/DeleteAttachment",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
attachmentID: attachmentID,
|
||||
fileName: fileName,
|
||||
prNumber: GetPRNumber(),
|
||||
},
|
||||
success: function (data) {
|
||||
var grid = $("#Attachments").data("kendoGrid");
|
||||
grid.dataSource.read();
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
DisplayAPIError("Delete Attachment", xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CheckFileType(e) {
|
||||
var files = e.files;
|
||||
$.each(files, function () {
|
||||
|
||||
if (!this.extension.toLowerCase().match(/^(.doc|.docx|.ppt|.pptx|.xls|.xlsx|.xlsm|.pdf|.gif|.jpeg|.jpg|.bmp|.png|.txt)$/)) {
|
||||
alert("Only Word/PowerPoint/Excel/PDF/Image/Text files can be uploaded!")
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function OnFileUploadSuccess(e) {
|
||||
var grid = $("#Attachments").data("kendoGrid");
|
||||
grid.dataSource.read();
|
||||
}
|
||||
|
||||
function ErrorHandler(e) {
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
function SaveData(submitAfterSave) {
|
||||
|
||||
$.ajax({
|
||||
url: '/PartsRequest/Edit',
|
||||
type: "POST",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(
|
||||
{
|
||||
PRNumber: GetPRNumber(),
|
||||
Title: $("#txtTitle").val(),
|
||||
RequestorID: $("#RequestorID").data("kendoDropDownList").value(),
|
||||
TechLeadID: $("#TechLeadID").data("kendoDropDownList").value(),
|
||||
Description: $("#txtDescription").val(),
|
||||
}),
|
||||
success: function (result) {
|
||||
if (submitAfterSave == true) {
|
||||
Submit();
|
||||
} else {
|
||||
alert("Data Saved");
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
DisplayAPIError("Save", xhr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function Submit() {
|
||||
|
||||
$.ajax({
|
||||
url: "/PartsRequest/Submit",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
prNumber: GetPRNumber(),
|
||||
},
|
||||
success: function (data) {
|
||||
alert('Request submitted');
|
||||
ReloadUI();
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
DisplayAPIError("Submit", xhr);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
368
Fab2ApprovalSystem/Views/PartsRequest/EditApproval.cshtml
Normal file
368
Fab2ApprovalSystem/Views/PartsRequest/EditApproval.cshtml
Normal file
@ -0,0 +1,368 @@
|
||||
@model Fab2ApprovalSystem.Models.PartsRequest
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Parts Request - Approval";
|
||||
}
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-spacing: 5px;
|
||||
padding: 5px;
|
||||
border-color: white;
|
||||
border-color: white;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.k-header .k-link {
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.k-grid-edit-row input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header .k-link {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.k-grid .k-edit-cell input {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<input type="hidden" id="currentStep" value="@Model.CurrentStep" />
|
||||
|
||||
<div>
|
||||
<div class="panel panel-default center-block" data-spy="affix">
|
||||
<input type="button" value="Back to List" class="btn btn-primary btn-xs" id="PRList" />
|
||||
|
||||
@if (Convert.ToBoolean(ViewBag.IsApprover))
|
||||
{
|
||||
<input type="button" value="Approve" class="btn btn-success btn-xs" id="ApproveDocument" />
|
||||
|
||||
if (Convert.ToBoolean(ViewBag.AllowReject))
|
||||
{
|
||||
<input type="button" value="Reject" class="btn btn-warning btn-xs" id="RejectDocument" />
|
||||
}
|
||||
}
|
||||
|
||||
<input type="button" value="Approval Log History" class="btn btn-primary btn-xs" id="ApprovalLogHistoryData" />
|
||||
</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">
|
||||
New/Repair Spare Parts Request
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label for="txtPRNumber" class="control-label pull-right">Request #:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.PRNumber, @Functions.ReturnPartsRequestNoStringFormat(@Model.PRNumber),
|
||||
new { id = "txtPRNumber", @class = "k-textbox form-control", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label for="txtTitle" class="control-label pull-right">Title:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox form-control", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Submit Date:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.SubmitDate, "{0:MM/dd/yyyy}", new { id = "txSubmitDate", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Tech Lead:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("TechLeadID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.OptionLabel("Select")
|
||||
.Value(Model.TechLeadID.ToString())
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Originator:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("OriginatorID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.Value(Model.OriginatorID.ToString())
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Requestor:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("RequestorID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.OptionLabel("Select")
|
||||
.Value(Model.RequestorID.ToString())
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Status:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.Status, new { id = "txtStatus", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Attached Documents:</label>
|
||||
<div>
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.PartsRequestAttachmentList>()
|
||||
.Name("Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.AttachmentID).Visible(false);
|
||||
columns.Bound(a => a.PRNumber).Visible(false);
|
||||
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>);
|
||||
columns.Bound(a => a.FullName);
|
||||
columns.Bound(a => a.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("View").Click("DownloadAttachment"));
|
||||
})
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:100px; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.Error("ErrorHandler"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.AttachmentID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("Attachment_Read", "PartsRequest", new { PRNumber = Model.PRNumber }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal col-sm-12">
|
||||
@Html.TextAreaFor(model => model.Description, 10, 60, new {
|
||||
id = "txtDescription",
|
||||
@class = "form-control",
|
||||
style = "font-size: 11px;width: 100%;",
|
||||
disabled = "disabled" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("_ApproversListPartial")
|
||||
|
||||
}
|
||||
|
||||
<div class="modal fade" id="ApprovalComments" 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">Enter Approval Comments:</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" rows="3" id="approvalComments"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="submitApprovalComments">Confirm Approval</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="RejectComments" 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">Enter Reject Comments:</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea class="form-control" rows="3" id="rejectComments"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="submitRejectComments">Confirm Reject</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("_ApprovalLogPartial")
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#PRList").on('click', function () {
|
||||
var url = '@Url.Action("PartsRequestList", "Home")';
|
||||
window.location = url;
|
||||
});
|
||||
|
||||
function ReloadUI() {
|
||||
var url = '@Url.Action("EditApproval", "PartsRequest", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', GetPRNumber());
|
||||
}
|
||||
|
||||
function GetPRNumber() {
|
||||
return $('#txtPRNumber').val().substr(2);
|
||||
}
|
||||
|
||||
function ErrorHandler(e) {
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
function DownloadAttachment(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileName;
|
||||
var attachmentID = dataItem.AttachmentID;
|
||||
|
||||
window.location = '/PartsRequest/DownloadFile?attachmentID=' + attachmentID + '&prNumber=' + "@Model.PRNumber";
|
||||
|
||||
}
|
||||
|
||||
$('#ApproveDocument').on('click', function () {
|
||||
|
||||
$('#submitApprovalComments').attr("disabled", false);
|
||||
$("#ApprovalComments").modal('show');
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
$('#submitApprovalComments').on('click', function () {
|
||||
|
||||
$('#submitApprovalComments').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/PartsRequest/Approve",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
prNumber: GetPRNumber(),
|
||||
currentStep: $("#currentStep").val(),
|
||||
comments: $("#approvalComments").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
$("#ApprovalComments").modal('hide');
|
||||
if (data != "OK") {
|
||||
alert(data);
|
||||
}
|
||||
ReloadUI();
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
$('#submitApprovalComments').attr("disabled", false);
|
||||
DisplayAPIError("Approval. Please approve the document again.", xhr);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#RejectDocument').on('click', function () {
|
||||
$('#RejectDocument').attr("disabled", false);
|
||||
$("#RejectComments").modal('show');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#submitRejectComments').on('click', function () {
|
||||
$('#RejectDocument').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/PartsRequest/Reject",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
prNumber: GetPRNumber(),
|
||||
currentStep: $("#currentStep").val(),
|
||||
comments: $("#rejectComments").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
$("#RejectComments").modal('hide');
|
||||
if (data != "OK") {
|
||||
alert(data);
|
||||
}
|
||||
ReloadUI();
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
$('#submitRejectComments').attr("disabled", false);
|
||||
DisplayAPIError("Reject. Please reject the document again.", xhr);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
254
Fab2ApprovalSystem/Views/PartsRequest/ReadOnly.cshtml
Normal file
254
Fab2ApprovalSystem/Views/PartsRequest/ReadOnly.cshtml
Normal file
@ -0,0 +1,254 @@
|
||||
@model Fab2ApprovalSystem.Models.PartsRequest
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Parts Request - Read Only";
|
||||
}
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-spacing: 5px;
|
||||
padding: 5px;
|
||||
border-color: white;
|
||||
border-color: white;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.k-header .k-link {
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.k-grid-edit-row input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header .k-link {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.k-grid .k-edit-cell input {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<input type="hidden" id="currentStep" value="@Model.CurrentStep" />
|
||||
|
||||
<div>
|
||||
<div class="panel panel-default center-block" data-spy="affix">
|
||||
<input type="button" value="Back to List" class="btn btn-primary btn-xs" id="PRList" />
|
||||
|
||||
<input type="button" value="Approval Log History" class="btn btn-primary btn-xs" id="ApprovalLogHistoryData" />
|
||||
</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">
|
||||
New/Repair Spare Parts Request
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label for="txtPRNumber" class="control-label pull-right">Request #:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.PRNumber, @Functions.ReturnPartsRequestNoStringFormat(@Model.PRNumber),
|
||||
new { id = "txtPRNumber", @class = "k-textbox form-control", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label for="txtTitle" class="control-label pull-right">Title:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox form-control", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Submit Date:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.SubmitDate, "{0:MM/dd/yyyy}", new { id = "txSubmitDate", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Tech Lead:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("TechLeadID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.OptionLabel("Select")
|
||||
.Value(Model.TechLeadID.ToString())
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Originator:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("OriginatorID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.Value(Model.OriginatorID.ToString())
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Requestor:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("RequestorID")
|
||||
.BindTo(new SelectList(ViewBag.UserList, "UserID", "FullName"))
|
||||
.OptionLabel("Select")
|
||||
.Value(Model.RequestorID.ToString())
|
||||
.HtmlAttributes(new { disabled = "disabled" })
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="col-xs-4">
|
||||
<label class="control-label pull-right">Status:</label>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
@Html.TextBoxFor(model => model.Status, new { id = "txtStatus", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Attached Documents:</label>
|
||||
<div>
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.PartsRequestAttachmentList>()
|
||||
.Name("Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.AttachmentID).Visible(false);
|
||||
columns.Bound(a => a.PRNumber).Visible(false);
|
||||
columns.Bound(a => a.FileName).Template(@<text> @Html.ActionLink(@item.FileName.ToString(), null)</text>);
|
||||
columns.Bound(a => a.FullName);
|
||||
columns.Bound(a => a.UploadDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("View").Click("DownloadAttachment"));
|
||||
})
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:100px; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.Error("ErrorHandler"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.AttachmentID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("Attachment_Read", "PartsRequest", new { PRNumber = Model.PRNumber }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-horizontal col-sm-12">
|
||||
@Html.TextAreaFor(model => model.Description, 10, 60, new {
|
||||
id = "txtDescription",
|
||||
@class = "form-control",
|
||||
style = "font-size: 11px;width: 100%;",
|
||||
disabled = "disabled" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("_ApproversListPartial")
|
||||
|
||||
}
|
||||
|
||||
@Html.Partial("_ApprovalLogPartial")
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#PRList").on('click', function () {
|
||||
var url = '@Url.Action("PartsRequestList", "Home")';
|
||||
window.location = url;
|
||||
});
|
||||
|
||||
function ReloadUI() {
|
||||
var url = '@Url.Action("EditApproval", "PartsRequest", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', GetPRNumber());
|
||||
}
|
||||
|
||||
function GetPRNumber() {
|
||||
return $('#txtPRNumber').val().substr(2);
|
||||
}
|
||||
|
||||
function ErrorHandler(e) {
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
function DownloadAttachment(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileName;
|
||||
var attachmentID = dataItem.AttachmentID;
|
||||
|
||||
window.location = '/PartsRequest/DownloadFile?attachmentID=' + attachmentID + '&prNumber=' + "@Model.PRNumber";
|
||||
|
||||
}
|
||||
|
||||
</script>
|
@ -0,0 +1,50 @@
|
||||
<div class="modal fade" id="ApprovalLogHistoryDialog" 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">
|
||||
<h4 class="modal-title" id="myModalLabel">Approval Log History</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.ApprovalLogHistory>()
|
||||
.Name("ApprovalLogHistory")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ApprovalLogID).Visible(false);
|
||||
columns.Bound(a => a.FullName);
|
||||
columns.Bound(a => a.SubRole);
|
||||
columns.Bound(a => a.Operation);
|
||||
columns.Bound(a => a.OperationTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
})
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 12px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ApprovalLogID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("ApprovalLogHistory_Read", "PartsRequest", new { prNumber = Model.PRNumber }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#ApprovalLogHistoryData').on('click', function () {
|
||||
$("#ApprovalLogHistory").data('kendoGrid').dataSource.read();
|
||||
$("#ApprovalLogHistoryDialog").modal('show');
|
||||
return false;
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user