mesa-fab-approval/Fab2ApprovalSystem/Views/Home/LotDispositionList.cshtml
2025-05-28 13:34:48 -07:00

198 lines
10 KiB
Plaintext

@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 (GlobalVars.IsAdmin(Session))
{
@(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="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">&times;</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>