Added manager view for setting OOO status for employees. The OOO status for the employees will reflect on the training report as well.
This commit is contained in:
@ -123,6 +123,7 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
Session[GlobalVars.SESSION_USERID] = user.UserID;
|
||||
Session[GlobalVars.SESSION_USERNAME] = user.FullName;
|
||||
Session[GlobalVars.IS_ADMIN] = user.IsAdmin;
|
||||
Session[GlobalVars.IS_MANAGER] = user.IsManager;
|
||||
Session[GlobalVars.OOO] = user.OOO;
|
||||
Session[GlobalVars.CAN_CREATE_PARTS_REQUEST] = user.IsAdmin || PartsRequestController.CanCreatePartsRequest(user.UserID);
|
||||
|
||||
|
37
Fab2ApprovalSystem/Controllers/ManagerController.cs
Normal file
37
Fab2ApprovalSystem/Controllers/ManagerController.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Fab2ApprovalSystem.DMO;
|
||||
using Fab2ApprovalSystem.Misc;
|
||||
|
||||
namespace Fab2ApprovalSystem.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
[SessionExpireFilter]
|
||||
public class ManagerController : Controller
|
||||
{
|
||||
UserAccountDMO userDMO = new UserAccountDMO();
|
||||
AdminDMO adminDMO = new AdminDMO();
|
||||
TrainingDMO trainingDMO = new TrainingDMO();
|
||||
LotDispositionDMO ldDMO = new LotDispositionDMO();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ActionResult Index()
|
||||
{
|
||||
|
||||
if ((bool)Session[GlobalVars.IS_MANAGER])
|
||||
{
|
||||
var model = userDMO.GetAllUsers();
|
||||
ViewBag.AllActiveUsers = userDMO.GetAllActiveUsers();
|
||||
return View(model);
|
||||
}
|
||||
else
|
||||
return Content("Not Autthorized");
|
||||
}
|
||||
}
|
||||
}
|
@ -737,7 +737,7 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
emailBody += "<tr><td>" + assignment.FullName + "</td><td>" + DateAssigned + "</td>";
|
||||
|
||||
if (userDMO.GetUserByID(assignment.UserID).OOO)
|
||||
emailBody += "<td>X</td>";
|
||||
emailBody += "<td style=\"text-align:center;\">X</td>";
|
||||
else
|
||||
emailBody += "<td></td>";
|
||||
|
||||
|
Reference in New Issue
Block a user