@@ -513,15 +499,8 @@
$('#SaveOOOInfo').on('click', function () {
var tab = $('#currentTab').val();
var bfound = false;
- var delegate = "";
- var checkbox = $('#AddDelegate').is(":checked");
-
- if (checkbox === true) {
- delegate = $("#DelegateTo").data("kendoDropDownList").value();
- }
-
- if (userid == delegate) {
+ if (userid == $("#DelegateTo").data("kendoDropDownList").value()) {
alert('The OOO person cannot be same as the delegate to person');
return false;
}
@@ -603,15 +582,6 @@
//grid.removeRow($(element));
}
- function toggleDelegate() {
- var control = document.getElementById("DelegateControl");
- var label = document.getElementById("DelegateLabel");
-
- control.classList.toggle("hideControl");
- label.classList.toggle("hideControl");
- }
-
-
function showReAssignRole(_pendingApprovers, _closeDate, _issueID, _docType, _submitDate) {
//alert(_closeDate);;
//alert(_pendingApprovers);
diff --git a/Fab2ApprovalSystem/Views/Home/_HomeLayout.cshtml b/Fab2ApprovalSystem/Views/Home/_HomeLayout.cshtml
index 3d963bd..688ca94 100644
--- a/Fab2ApprovalSystem/Views/Home/_HomeLayout.cshtml
+++ b/Fab2ApprovalSystem/Views/Home/_HomeLayout.cshtml
@@ -148,7 +148,6 @@
-
*@
@@ -313,7 +312,6 @@
return false;
})
-
$('#SaveOOOInfo').on('click', function () {
var tab = $('#currentTab').val();
var bfound = false;
diff --git a/Fab2ApprovalSystem/Views/Manager/Index.cshtml b/Fab2ApprovalSystem/Views/Manager/Index.cshtml
new file mode 100644
index 0000000..de4ec07
--- /dev/null
+++ b/Fab2ApprovalSystem/Views/Manager/Index.cshtml
@@ -0,0 +1,594 @@
+@model IEnumerable
+
+@{
+ ViewBag.Title = "Index";
+}
+
+@{
+ Layout = "_ManagerLayout.cshtml";
+}
+
+
+
+
+
+
+
+ @(Html.Kendo().Grid()
+ .Name("userList")
+ .Columns(columns =>
+ {
+ columns.Bound(l => l.UserID).Visible(false);
+ columns.Bound(l => l.FirstName);
+ columns.Bound(l => l.LastName);
+ columns.Bound(l => l.Email);
+ columns.Bound(l => l.IsActive);
+ //columns.Template(@).ClientTemplate("");
+
+ columns.Bound(l => l.LastLogin).Format("{0:MM/dd/yy hh:mm:ss}");
+
+ // columns.Command(command => { command.Edit(); command.Destroy(); }).Width("200px");
+
+
+ columns.Bound(l => l.OOO);
+ columns.Bound(l => l.OOOStartDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
+ columns.Bound(l => l.OOOExpirationDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
+ columns.Bound(l => l.DelegatedTo).Visible(false);
+ columns.Bound(l => l.DelegatedToFullName);
+ columns.Bound(p => p.OOOStatusWithUserID).ClientTemplate("#=buildButtons(OOOStatusWithUserID)#").Width(120);
+ //columns.Template(p => { }).HeaderTemplate("").ClientTemplate(@"
+ //");
+ })
+ .HtmlAttributes(new { style = "height: 500px;" })
+ .Scrollable()
+ .Resizable(resize => resize.Columns(true))
+ .Groupable()
+ .Sortable()
+ .Filterable()
+ .Pageable(pageable => pageable
+ .Refresh(true)
+ .PageSizes(true)
+ .ButtonCount(5))
+ .DataSource(dataSource => dataSource
+
+ .Ajax().ServerOperation(false)
+ .Events(events => events.Error("error_handler"))
+ .Model(model =>
+ {
+ model.Id(l => l.UserID);
+ model.Field(p => p.UserID).Editable(false);
+ model.Field(l => l.LastLogin).Editable(false);
+ model.Field(l => l.OOO).Editable(false);
+ model.Field(l => l.OOOStartDate).Editable(false);
+ model.Field(l => l.OOOExpirationDate).Editable(false);
+ model.Field(l => l.DelegatedToFullName).Editable(false);
+
+
+ })
+ .PageSize(50)
+ .Read(read => read.Action("GetGridUserList", "Admin"))
+
+ )
+
+ )
+ @*@(Html.Kendo().Grid()
+ .Name("Grid")
+ .Columns(columns =>
+ {
+ columns.Bound(l => l.UserID).Visible(false);
+ columns.Bound(l => l.LoginID);
+ columns.Bound(l => l.FirstName);
+ columns.Bound(l => l.LastName);
+ columns.Bound(l => l.IsAdmin);
+ columns.Bound(l => l.LastLogin).Format("{0:MM/dd/yy hh:mm:ss}");
+ columns.Bound(l => l.OOO);
+ columns.Bound(l => l.OOOStartDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
+ columns.Bound(l => l.OOOExpirationDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
+ columns.Bound(l => l.DelegatedTo).Visible(false);
+ columns.Bound(l => l.DelegatedToFullName);
+ columns.Bound(p => p.OOOStatusWithUserID).ClientTemplate("#=buildButtons(OOOStatusWithUserID)#").Width(120);
+
+
+ })
+ .ToolBar(toolbar =>
+ {
+ toolbar.Create();
+ toolbar.Save();
+ })
+ .Editable(editable => editable.Mode(GridEditMode.InCell))
+ .Pageable()
+ .Navigatable()
+ .Sortable()
+ .Scrollable()
+ .DataSource(dataSource => dataSource
+ .Ajax()
+ .Batch(true)
+ .PageSize(20)
+ .ServerOperation(false)
+ //.Events(events => events.Error("error_handler"))
+ .Model(model => model.Id(p => p.UserID))
+ .Read(read => read.Action("GetGridUserList", "Admin"))
+ .Create(update => update.Action("InsertUser", "Admin"))
+ .Update(update => update.Action("BatchUpdateUser", "Admin"))
+ .Destroy(destroy => destroy.Action("DeleteUser", "Admin"))
+ )
+ )*@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
*Please assign a delegate if this user will be assigned tasks while Out of Office.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @(Html.Kendo().DropDownList()
+ .Name("DelegateTo")
+ .HtmlAttributes(new { style = "width: 250px" })
+ .DataTextField("FullName")
+ .DataValueField("UserID")
+ .DataSource(source =>
+ {
+ source.Read(read =>
+ {
+ read.Action("GetAllUserList", "Admin");
+ });
+ })
+
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+ @(Html.Kendo().DatePicker()
+ .Name("txtStartDate")
+ //.Value()
+ )
+
+
+
+
+
+
+ @(Html.Kendo().DatePicker()
+ .Name("txtEndDate")
+ //.Value()
+ )
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Fab2ApprovalSystem/Views/Manager/_ManagerLayout.cshtml b/Fab2ApprovalSystem/Views/Manager/_ManagerLayout.cshtml
new file mode 100644
index 0000000..eabf02c
--- /dev/null
+++ b/Fab2ApprovalSystem/Views/Manager/_ManagerLayout.cshtml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+ @ViewBag.Title - Mesa Approval
+ @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")
+
+
+ @*
+ *@
+ @Scripts.Render("~/bundles/bootstrap")
+ @*@Scripts.Render("~/Content/jqw/jq")*@
+
+
+
+
+
+
+
+
+
+
+ @if ((bool)@Session[GlobalVars.IS_ADMIN])
+ {
+ - @Html.ActionLink("Admin", "Index", "Admin")
+ }
+
+ @Html.Partial("_LoginPartial")
+
+
+
+ @(Html.Kendo().Menu()
+ .Name("menu")
+ .HtmlAttributes(new { style = "width:100%; font-size: 12px" })
+ .Items(menu =>
+ {
+ menu.Add().Text("Manage Users").Action("Index", "Manager");
+ }))
+
+ @RenderBody()
+ @*
*@
+
+
+
+
+
+ @RenderSection("scripts", required: false)
+
+