initial add
This commit is contained in:
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>
|
Reference in New Issue
Block a user