Merging with development
This commit is contained in:
commit
2cf6566641
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -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);
|
||||
|
||||
|
@ -321,6 +321,25 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
|
||||
return View(ca);
|
||||
|
||||
}
|
||||
public void ReleaseLockOnDocumentAdmin(int issueID)
|
||||
{
|
||||
try
|
||||
{
|
||||
caDMO.ReleaseLockOnDocument(-1, issueID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Functions.WriteEvent(@User.Identity.Name + "\r\n ReleaseLockOnDocument CA\r\n" + issueID.ToString() + "\r\n" + e.Message, System.Diagnostics.EventLogEntryType.Error);
|
||||
}
|
||||
catch { }
|
||||
caDMO.ReleaseLockOnDocument(-1, issueID);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
@ -334,6 +353,10 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
return Json(caDMO.GetCAAttachmentsList(caNo, Functions.CASectionMapper(GlobalVars.CASection.D2)).ToDataSourceResult(request));
|
||||
}
|
||||
|
||||
public ActionResult Attachment_Read([DataSourceRequest] DataSourceRequest request, int caNO)
|
||||
{
|
||||
return Json(caDMO.GetCAAttachmentsList(caNO, "Main").ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -405,14 +428,14 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
/// <param name="D2Files"></param>
|
||||
/// <param name="caNo"></param>
|
||||
/// <returns></returns>
|
||||
public ActionResult D2FilesAttachSave(IEnumerable<HttpPostedFileBase> D2Files, int caNo)
|
||||
public ActionResult AttachSave(IEnumerable<HttpPostedFileBase> files, int caNo)
|
||||
{
|
||||
try
|
||||
{
|
||||
// The Name of the Upload component is "files"
|
||||
if (D2Files != null)
|
||||
if (files != null)
|
||||
{
|
||||
foreach (var file in D2Files)
|
||||
foreach (var file in files)
|
||||
{
|
||||
// Some browsers send file names with full path.
|
||||
// We are only interested in the file name.
|
||||
@ -439,8 +462,7 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
FileGUID = guid,
|
||||
FileName = fileName,
|
||||
UploadedByID = (int)Session[GlobalVars.SESSION_USERID],
|
||||
Section = Functions.CASectionMapper(GlobalVars.CASection.D2)
|
||||
|
||||
Section = Functions.CASectionMapper(GlobalVars.CASection.Main)
|
||||
};
|
||||
|
||||
|
||||
|
@ -405,10 +405,28 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
ldDMO.DeleteLotDisposition(issue.IssueID);
|
||||
else if (dType == GlobalVars.DocumentType.ECN)
|
||||
ecnDMO.DeleteDocument(issue.IssueID, int.Parse(Session[GlobalVars.SESSION_USERID].ToString()), "ECN");
|
||||
else if (dType == GlobalVars.DocumentType.CorrectiveAction)
|
||||
ldDMO.DeleteCADocument(issue.IssueID, int.Parse(Session[GlobalVars.SESSION_USERID].ToString()), "Corrective Action");
|
||||
|
||||
|
||||
return Json(new[] { issue }.ToDataSourceResult(request, ModelState));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="ca"></param>
|
||||
/// <returns></returns>
|
||||
[AcceptVerbs(HttpVerbs.Post)]
|
||||
public ActionResult DeleteCAItem([DataSourceRequest] DataSourceRequest request, CorrectiveAction ca)
|
||||
{
|
||||
ldDMO.DeleteCADocument(ca.CANo, int.Parse(Session[GlobalVars.SESSION_USERID].ToString()), "Corrective Action");
|
||||
|
||||
|
||||
return Json(new[] { ca }.ToDataSourceResult(request, ModelState));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
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");
|
||||
}
|
||||
}
|
||||
}
|
@ -726,7 +726,7 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
emailBody += "<h3>" + training.ECN + " - " + ecnTitle + "</h3>";
|
||||
|
||||
emailBody += "<table>";
|
||||
emailBody += "<tr><th>Name</th><th>Date Assigned</th></tr>";
|
||||
emailBody += "<tr><th>Name</th><th>Date Assigned</th><th>Out of Office</th></tr>";
|
||||
List<TrainingAssignment> openAssignments = trainingDMO.GetOpenAssignmentsByTrainingID(training.TrainingID);
|
||||
foreach (TrainingAssignment assignment in openAssignments)
|
||||
{
|
||||
@ -734,7 +734,14 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
|
||||
string DateAssigned = assignmentDate.HasValue ? assignmentDate.Value.ToString("MM/dd/yyyy") : "<not available>";
|
||||
|
||||
emailBody += "<tr><td>" + assignment.FullName + "</td><td>" + DateAssigned + "</td></tr>";
|
||||
emailBody += "<tr><td>" + assignment.FullName + "</td><td>" + DateAssigned + "</td>";
|
||||
|
||||
if (userDMO.GetUserByID(assignment.UserID).OOO)
|
||||
emailBody += "<td style=\"text-align:center;\">X</td>";
|
||||
else
|
||||
emailBody += "<td></td>";
|
||||
|
||||
emailBody += "</tr>";
|
||||
|
||||
}
|
||||
emailBody += "</table>";
|
||||
|
@ -325,7 +325,6 @@ namespace Fab2ApprovalSystem.DMO
|
||||
/// <returns></returns>
|
||||
public IEnumerable<CA_Attachment> GetCAAttachmentsList(int caNo, string section)
|
||||
{
|
||||
|
||||
var parameters = new DynamicParameters();
|
||||
parameters.Add("@CANo", caNo);
|
||||
parameters.Add("@Section", section);
|
||||
@ -885,6 +884,7 @@ namespace Fab2ApprovalSystem.DMO
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public IEnumerable<IssuesViewModel> GetECNList()
|
||||
{
|
||||
var parameters = new DynamicParameters();
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
@ -489,6 +489,16 @@ namespace Fab2ApprovalSystem.DMO
|
||||
|
||||
}
|
||||
|
||||
public void DeleteCADocument(int CANo, int userID, string caTypeString)
|
||||
{
|
||||
var parameters = new DynamicParameters();
|
||||
parameters.Add("@UserID", userID);
|
||||
parameters.Add("@CANo", CANo);
|
||||
parameters.Add("@CAType", caTypeString);
|
||||
|
||||
this.db.Execute("_8DDeleteCADocument", parameters, commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@ -1413,4 +1423,4 @@ namespace Fab2ApprovalSystem.DMO
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -100,6 +100,7 @@
|
||||
<Compile Include="Controllers\ChangeControlController.cs" />
|
||||
<Compile Include="Controllers\CorrectiveActionController.cs" />
|
||||
<Compile Include="Controllers\ECNController.cs" />
|
||||
<Compile Include="Controllers\ManagerController.cs" />
|
||||
<Compile Include="Controllers\PartsRequestController.cs" />
|
||||
<Compile Include="Controllers\ReportsController.cs" />
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
@ -1847,6 +1848,8 @@
|
||||
<Content Include="Views\Admin\JobSchedulerConfiguration.cshtml" />
|
||||
<Content Include="Views\Admin\TrainingReportConfig.cshtml" />
|
||||
<Content Include="Views\Admin\TECNNotificationConfig.cshtml" />
|
||||
<Content Include="Views\Manager\Index.cshtml" />
|
||||
<Content Include="Views\Manager\_ManagerLayout.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
@ -359,6 +359,9 @@ namespace Fab2ApprovalSystem.Misc
|
||||
{
|
||||
switch (casection)
|
||||
{
|
||||
case GlobalVars.CASection.Main:
|
||||
return "Main";
|
||||
|
||||
case GlobalVars.CASection.D1:
|
||||
return "D1";
|
||||
|
||||
|
@ -14,6 +14,7 @@ namespace Fab2ApprovalSystem.Misc
|
||||
public const string SESSION_USERID = "UserID";
|
||||
public const string ECN_VIEW_OPTION = "ECN_ViewOption";
|
||||
public const string IS_ADMIN = "IsAdmin";
|
||||
public const string IS_MANAGER = "IsManager";
|
||||
public const string OOO = "OOO";
|
||||
public const string SUCCESS = "Success";
|
||||
public const string CAN_CREATE_PARTS_REQUEST = "CanCreatePartsRequest";
|
||||
@ -107,7 +108,7 @@ namespace Fab2ApprovalSystem.Misc
|
||||
|
||||
public enum CASection
|
||||
{
|
||||
D1, D2, D3, D4, D5,D6, D7, D8, CF
|
||||
Main, D1, D2, D3, D4, D5,D6, D7, D8, CF
|
||||
}
|
||||
|
||||
|
||||
|
@ -23,6 +23,7 @@ namespace Fab2ApprovalSystem.Models
|
||||
public string FullName { get; set; }
|
||||
|
||||
public bool IsAdmin { get; set; }
|
||||
public bool IsManager { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public DateTime? LastLogin { get; set; }
|
||||
|
||||
|
@ -213,6 +213,7 @@ namespace Fab2ApprovalSystem.Models
|
||||
public DateTime? ApprovedDate { get; set; }
|
||||
public bool RecordLockIndicator { get; set; }
|
||||
public int RecordLockedBy { get; set; }
|
||||
public string RecordLockByName { get; set; }
|
||||
public bool RecordLocked { get; set; }
|
||||
public DateTime RecordLockedDate { get; set; }
|
||||
public DateTime LastUpdateDate { get; set; }
|
||||
|
@ -28,6 +28,10 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hiddenDelegate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*InLine Edit Mode*/
|
||||
</style>
|
||||
|
||||
@ -44,7 +48,7 @@
|
||||
columns.Bound(l => l.IsActive);
|
||||
//columns.Template(@<text></text>).ClientTemplate("<input type='checkbox' #= IsActive ? checked='checked':'' # class='chkbx' />");
|
||||
columns.Bound(l => l.IsAdmin);
|
||||
|
||||
columns.Bound(l => l.IsManager);
|
||||
|
||||
columns.Bound(l => l.LastLogin).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
|
||||
@ -160,8 +164,22 @@
|
||||
</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="AssignDelegate">Assign Delegate?</label>
|
||||
<input type="checkbox" name="AssignDelegate" id="AssignDelegate" value="false" onclick="toggleDelegate()" />
|
||||
<p>*Please assign a delegate if this user will be assigned tasks while Out of Office.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row hiddenDelegate" id="delegateLabel">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@ -173,7 +191,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row hiddenDelegate" id="delegateControl">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@ -465,6 +483,10 @@
|
||||
|
||||
<script>
|
||||
|
||||
function toggleDelegate() {
|
||||
document.getElementById("delegateControl").classList.toggle("hiddenDelegate");
|
||||
document.getElementById("delegateLabel").classList.toggle("hiddenDelegate");
|
||||
}
|
||||
|
||||
function error_handler(e) {
|
||||
alert("Error during the operation");
|
||||
@ -577,10 +599,16 @@
|
||||
$('#SaveOOOInfo').on('click', function () {
|
||||
var bfound = false;
|
||||
//var currentDate = new Date();
|
||||
|
||||
var delegate = "";
|
||||
var isChecked = $("#AssignDelegate").is(":checked");
|
||||
|
||||
if (userid == $("#DelegateTo").data("kendoDropDownList").value())
|
||||
{
|
||||
if (isChecked === true)
|
||||
delegate = $("#DelegateTo").data("kendoDropDownList").value();
|
||||
|
||||
else
|
||||
delegate = "0";
|
||||
|
||||
if (userid == delegate) {
|
||||
alert('The OOO person cannot be same as the delegate to person');
|
||||
return false;
|
||||
}
|
||||
@ -594,7 +622,7 @@
|
||||
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');
|
||||
@ -615,7 +643,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (endDate <= stDate) {
|
||||
|
||||
alert("The End Date should be greater than the Start Date ");
|
||||
@ -630,7 +658,7 @@
|
||||
url: urlString,
|
||||
data: {
|
||||
oooUserID: userid,
|
||||
delegatedTo: $("#DelegateTo").data("kendoDropDownList").value(),
|
||||
delegatedTo: delegate,
|
||||
startDate: $("#txtStartDate").val(),
|
||||
endDate: $("#txtEndDate").val(),
|
||||
},
|
||||
|
@ -431,6 +431,57 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Affected Documents:</label>
|
||||
<div class="col-sm-12">
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("files")
|
||||
.Async(a => a
|
||||
.Save("AttachSave", "CorrectiveAction", new { caNo = Model.CANo })
|
||||
.AutoUpload(true)
|
||||
)
|
||||
.ShowFileList(false)
|
||||
.Events(events => events
|
||||
.Success("onFileUploadSuccess")
|
||||
.Upload("CheckFileType")
|
||||
.Error("onFileUploadError")
|
||||
)
|
||||
)
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
|
||||
.Name("Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.CANo).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.FileName);
|
||||
columns.Bound(a => a.UploadedByName);
|
||||
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("View").Click("DownloadCAAttachment"));
|
||||
columns.Command(command => command.Custom("Delete").Click("DeleteCAAttachment"));
|
||||
|
||||
})
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 10px", Readonly = "Readonly" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.Error("error_handler"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("Attachment_Read", "CorrectiveAction", new { caNO = Model.CANo }))
|
||||
.Destroy(destroy => destroy.Action("DeleteCAAttachment", "CorrectionAction"))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="D0ScrollPoint"></div>
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
@ -2733,7 +2784,7 @@
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
$('#CATypeList').on('change', function () {
|
||||
HideAllSections();
|
||||
|
||||
@ -3245,7 +3296,7 @@
|
||||
$('#cover-spin').show(0);
|
||||
var data = ReturnModelObject();
|
||||
var confirmationMessage = "Submit " + section + " completion for approval?";
|
||||
|
||||
|
||||
if (!confirm(confirmationMessage)) {
|
||||
$('#' + section + 'Completed').prop('checked', false);
|
||||
if (section == 'D5D6D7') {
|
||||
@ -3317,7 +3368,7 @@
|
||||
else {
|
||||
alert(result);
|
||||
if (result.indexOf("Validation initiated") >= 0) {
|
||||
|
||||
|
||||
var url = '@Url.Action("Edit", "CorrectiveAction", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', "@Model.CANo");
|
||||
@ -3399,7 +3450,7 @@
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
@ -3906,16 +3957,46 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onFileUploadSuccess(e) {
|
||||
//alert(e.message);
|
||||
var grid = $("#Attachments").data("kendoGrid");
|
||||
grid.dataSource.read($('#txtCANo').val());
|
||||
}
|
||||
function onFileUploadError(e) {
|
||||
alert("Error Uploading File!!! Please Try Again...");
|
||||
var grid = $("#Attachments").data("kendoGrid");
|
||||
grid.dataSource.read($('#txtCANo').val());
|
||||
}
|
||||
|
||||
function onD4FileUploadSuccess(e) {
|
||||
var grid = $("#D4Attachments").data("kendoGrid");
|
||||
grid.dataSource.read("@Model.CANo");
|
||||
}
|
||||
|
||||
function DeleteCAAttachment(e) {
|
||||
e.preventDefault();
|
||||
if (confirm("Are you sure you want to delete this Attachment?")) {
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
var fileName = dataItem.FileGUID;
|
||||
var attachmentID = dataItem.ID;
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/CorrectiveAction/DeleteCAAttachment",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
attachmentID: attachmentID
|
||||
},
|
||||
success: function (data) {
|
||||
var grid = $("#Attachments").data("kendoGrid");
|
||||
grid.dataSource.read("@Model.CANo");
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function DeleteD2CAAttachment(e) {
|
||||
e.preventDefault();
|
||||
@ -4116,7 +4197,7 @@
|
||||
var grid = $("#D5D6CorrectivetActions").data("kendoGrid");
|
||||
grid.dataSource.read($("@Model.CANo").val());
|
||||
$("#D5D6CorrectiveActionForm").modal("hide");
|
||||
|
||||
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
|
@ -44,16 +44,64 @@
|
||||
<div class="panel panel-default center-block" data-spy="affix">
|
||||
<input type="button" value="Back to CA List" class="btn btn-primary btn-xs" id="CAList" />
|
||||
<input type="button" value="Section Approval Log" class="btn btn-primary btn-xs" id="ShowSectionApprovalLog" />
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
{
|
||||
<input type="button" value="Unlock Document" class="btn btn-primary btn-xs" id="UnlockDocumentBtn" onclick="UnlockDocument()" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default center-block" style="font-size: 10px">
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
<font style="color: crimson; font-size:24px;font-weight: bolder">
|
||||
Corrective Action
|
||||
</font>
|
||||
<div class="col-sm-4">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 text-center">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<font style="color: crimson; font-size:24px;font-weight: bolder">
|
||||
Corrective Action
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 text-right">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<font style="color:crimson">
|
||||
@if (Model.RecordLockByName == null)
|
||||
{
|
||||
<h4>
|
||||
<font style="color:red">
|
||||
Mode: [Readonly]
|
||||
</font>
|
||||
</h4>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4>
|
||||
<font style="color:red">
|
||||
Mode: [Readonly] - Locked for Editing by <font style="color: green; font-weight:bold; font-style:italic">@Model.RecordLockByName</font>
|
||||
</font>
|
||||
</h4>
|
||||
|
||||
}
|
||||
</font>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -318,6 +366,46 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Affected Documents:</label>
|
||||
<div class="col-sm-12">
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
|
||||
.Name("Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.CANo).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.FileName);
|
||||
columns.Bound(a => a.UploadedByName);
|
||||
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("View").Click("DownloadCAAttachment"));
|
||||
//columns.Command(command => command.Custom("Delete").Click("DeleteD4CAAttachment"));
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 10px", Readonly = "Readonly" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.Error("error_handler"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("Attachment_Read", "CorrectiveAction", new { caNO = Model.CANo }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
<div class="panel-body bg-danger">
|
||||
@ -1201,285 +1289,285 @@
|
||||
</div>
|
||||
</div>*@
|
||||
@*<div class="panel panel-default">
|
||||
<div class="panel-body bg-danger">
|
||||
<h5>
|
||||
<font style="color: crimson; font-weight: bold">
|
||||
D4
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-info" id="SectionD4" role="button" data-toggle="collapse" href="#collapseSectionD4" aria-expanded="true" aria-controls="collapseSectionD4">
|
||||
Collapse
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSectionD4">
|
||||
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="panel-body bg-danger">
|
||||
<h5>
|
||||
<font style="color: crimson; font-weight: bold">
|
||||
D4
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-info" id="SectionD4" role="button" data-toggle="collapse" href="#collapseSectionD4" aria-expanded="true" aria-controls="collapseSectionD4">
|
||||
Collapse
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSectionD4">
|
||||
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<label class="control-label ">D4 Completed:</label>
|
||||
@Html.CheckBoxFor(model => model.D4Completed, new { disabled = "disabled" })
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label pull-left">Root Cause 1:</label>
|
||||
@Html.TextAreaFor(model => model.D4RootCause1, 5, 30, new { id = "txtD4RootCause1", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<label class="control-label ">D4 Completed:</label>
|
||||
@Html.CheckBoxFor(model => model.D4Completed, new { disabled = "disabled" })
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label pull-left">Root Cause 1:</label>
|
||||
@Html.TextAreaFor(model => model.D4RootCause1, 5, 30, new { id = "txtD4RootCause1", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label pull-left">Root Cause 2:</label>
|
||||
@Html.TextAreaFor(model => model.D4RootCause2, 5, 30, new { id = "txtD4RootCause2", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label pull-left">Root Cause 3:</label>
|
||||
@Html.TextAreaFor(model => model.D4RootCause3, 5, 30, new { id = "txtD4RootCause3", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label pull-left">Root Cause4:</label>
|
||||
@Html.TextAreaFor(model => model.D4RootCause4, 5, 30, new { id = "txtD4RootCause4", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label pull-left">Root Cause 2:</label>
|
||||
@Html.TextAreaFor(model => model.D4RootCause2, 5, 30, new { id = "txtD4RootCause2", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label pull-left">Root Cause 3:</label>
|
||||
@Html.TextAreaFor(model => model.D4RootCause3, 5, 30, new { id = "txtD4RootCause3", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label pull-left">Root Cause4:</label>
|
||||
@Html.TextAreaFor(model => model.D4RootCause4, 5, 30, new { id = "txtD4RootCause4", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
|
||||
<div class="col-sm-6" style="font-size: 10px">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12">
|
||||
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
|
||||
.Name("D4Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.CANo).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.FileName);
|
||||
columns.Bound(a => a.UploadedByName);
|
||||
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("View").Click("DownloadCAAttachment"));
|
||||
|
||||
|
||||
})
|
||||
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 10px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.Error("error_handler"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetD4AttachmentList", "CorrectiveAction", new { caNO = Model.CANo }))
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6" style="font-size: 10px">
|
||||
<div class="row">
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
//D5-D6 =============================================================================
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body bg-danger">
|
||||
<h5>
|
||||
<font style="color: crimson; font-weight: bold">
|
||||
Corrective Action D5/D6
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-info" id="SectionD5D6" role="button" data-toggle="collapse" href="#collapseSectionD5D6" aria-expanded="true" aria-controls="collapseSectionD5D6">
|
||||
Collapse
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSectionD5D6">
|
||||
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label ">D5 Completed:</label>
|
||||
@Html.CheckBoxFor(model => model.D5Completed, new { disabled = "disabled" })
|
||||
</td>
|
||||
<td>
|
||||
<label class="control-label ">D6 Validated:</label>
|
||||
@Html.CheckBoxFor(model => model.D6Validated, new { disabled = "disabled" })
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CA_Attachment>()
|
||||
.Name("D4Attachments")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.CANo).Visible(false);
|
||||
columns.Bound(a => a.FileGUID).Visible(false);
|
||||
columns.Bound(a => a.FileName);
|
||||
columns.Bound(a => a.UploadedByName);
|
||||
columns.Bound(a => a.UploadDateTime).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Command(command => command.Custom("View").Click("DownloadCAAttachment"));
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.D5D6CorrectivetAction>()
|
||||
.Name("D5D6CorrectivetActions")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.ResponsibilityOwnerID).Visible(false);
|
||||
columns.Bound(a => a.ImprovementID).Visible(false);
|
||||
columns.Bound(a => a.CorrectiveAction).Width("500px");
|
||||
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px");
|
||||
columns.Bound(a => a.CARequired).Width("50px").Title("Choose");
|
||||
columns.Bound(a => a.Result).Width("100px");
|
||||
columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px");
|
||||
columns.Bound(a => a.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, CANo)#").Width("100px");
|
||||
columns.Bound(a => a.ResponsibilityOwnerName).Width("100px");
|
||||
columns.Bound(a => a.ECD).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(a => a.ImplementedDate).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(a => a.Improvement).Width("150px").Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
//.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:300px; width:100%; font-size: 10px" })
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Events(events => events.Error("error_handler"))
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetD4AttachmentList", "CorrectiveAction", new { caNO = Model.CANo }))
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
model.Field(a => a.CANo).DefaultValue(Model.CANo);
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetD5D6CorrectivetActionList", "CorrectiveAction", new { caNo = Model.CANo }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
//D5-D6 =============================================================================
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body bg-danger">
|
||||
<h5>
|
||||
<font style="color: crimson; font-weight: bold">
|
||||
Corrective Action D5/D6
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-info" id="SectionD5D6" role="button" data-toggle="collapse" href="#collapseSectionD5D6" aria-expanded="true" aria-controls="collapseSectionD5D6">
|
||||
Collapse
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSectionD5D6">
|
||||
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label ">D5 Completed:</label>
|
||||
@Html.CheckBoxFor(model => model.D5Completed, new { disabled = "disabled" })
|
||||
</td>
|
||||
<td>
|
||||
<label class="control-label ">D6 Validated:</label>
|
||||
@Html.CheckBoxFor(model => model.D6Validated, new { disabled = "disabled" })
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
//D7 =============================================================================
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body bg-danger">
|
||||
<h5>
|
||||
<font style="color: crimson; font-weight: bold">
|
||||
Preventive Action D7
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-info" id="SectionD7" role="button" data-toggle="collapse" href="#collapseSectionD7" aria-expanded="true" aria-controls="collapseSectionD7">
|
||||
Collapse
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="collapse" id="collapseSectionD7">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.D5D6CorrectivetAction>()
|
||||
.Name("D5D6CorrectivetActions")
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<label class="control-label ">D7 Completed:</label>
|
||||
@Html.CheckBoxFor(model => model.D7Completed, new { disabled = "disabled" })
|
||||
</div>
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.D7PreventiveAction>()
|
||||
.Name("D7PreventiveActions")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.ResponsibilityOwnerID).Visible(false);
|
||||
columns.Bound(a => a.ImprovementID).Visible(false);
|
||||
columns.Bound(a => a.CorrectiveAction).Width("500px");
|
||||
columns.Bound(a => a.PreventiveAction).Width("250px");
|
||||
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px");
|
||||
columns.Bound(a => a.CARequired).Width("50px").Title("Choose");
|
||||
columns.Bound(a => a.Result).Width("100px");
|
||||
columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px");
|
||||
columns.Bound(a => a.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, CANo)#").Width("100px");
|
||||
columns.Bound(a => a.ResponsibilityOwnerName).Width("100px");
|
||||
columns.Bound(a => a.ECD).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(a => a.ImplementedDate).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(a => a.Improvement).Width("150px").Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
|
||||
})
|
||||
//.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
model.Field(a => a.CANo).DefaultValue(Model.CANo);
|
||||
//.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
model.Field(a => a.CANo).DefaultValue(Model.CANo);
|
||||
|
||||
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetD5D6CorrectivetActionList", "CorrectiveAction", new { caNo = Model.CANo }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
//D7 =============================================================================
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body bg-danger">
|
||||
<h5>
|
||||
<font style="color: crimson; font-weight: bold">
|
||||
Preventive Action D7
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-info" id="SectionD7" role="button" data-toggle="collapse" href="#collapseSectionD7" aria-expanded="true" aria-controls="collapseSectionD7">
|
||||
Collapse
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSectionD7">
|
||||
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<label class="control-label ">D7 Completed:</label>
|
||||
@Html.CheckBoxFor(model => model.D7Completed, new { disabled = "disabled" })
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetD7PreventiveActionList", "CorrectiveAction", new { caNo = Model.CANo }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.D7PreventiveAction>()
|
||||
.Name("D7PreventiveActions")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(a => a.ID).Visible(false);
|
||||
columns.Bound(a => a.ResponsibilityOwnerID).Visible(false);
|
||||
columns.Bound(a => a.PreventiveAction).Width("250px");
|
||||
columns.Bound(a => a.AssignedDate).Format("{0:MM/dd/yy}").Width("50px");
|
||||
columns.Bound(a => a.Result).Width("100px");
|
||||
columns.Bound(a => a.ECNLinks).ClientTemplate("#=buildECNLinks(ECNLinks)#").Width("100px");
|
||||
columns.Bound(a => a.AttachmentLinks).ClientTemplate("#=buildLinks(AttachmentLinks, CANo)#").Width("100px");
|
||||
columns.Bound(a => a.ResponsibilityOwnerName).Width("100px");
|
||||
columns.Bound(a => a.ECD).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(a => a.ImplementedDate).Width("100px").Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
|
||||
})
|
||||
//.ToolBar(toolbar => toolbar.Create().Text("Add Item"))
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.HtmlAttributes(new { style = "height:125; width:100%; font-size: 11px" })
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
//.Batch(false)
|
||||
.ServerOperation(false)
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.ID);
|
||||
model.Field(a => a.CANo).DefaultValue(Model.CANo);
|
||||
|
||||
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetD7PreventiveActionList", "CorrectiveAction", new { caNo = Model.CANo }))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body bg-danger">
|
||||
<h5>
|
||||
<font style="color: crimson; font-weight: bold">
|
||||
D8
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-info" id="SectionD8" role="button" data-toggle="collapse" href="#collapseSectionD8" aria-expanded="true" aria-controls="collapseSectionD8">
|
||||
Collapse
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSectionD8">
|
||||
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<label class="control-label ">D8 Completed:</label>
|
||||
@Html.CheckBoxFor(model => model.D8Completed, new { disabled = "disabled" })
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body bg-danger">
|
||||
<h5>
|
||||
<font style="color: crimson; font-weight: bold">
|
||||
D8
|
||||
</font>
|
||||
<a class="btn btn-xs pull-right alert-info" id="SectionD8" role="button" data-toggle="collapse" href="#collapseSectionD8" aria-expanded="true" aria-controls="collapseSectionD8">
|
||||
Collapse
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapseSectionD8">
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">
|
||||
<font style="color: black; font-size:12px;font-weight: bolder">
|
||||
How we recognized the team:
|
||||
</font>
|
||||
@Html.TextAreaFor(model => model.D8TeamRecognition, 3, 100, new { id = "txtD8TeamRecognition", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<font style="color: black; font-size:12px;font-weight: bolder">
|
||||
Lessons Leanred:
|
||||
</font>
|
||||
@Html.TextAreaFor(model => model.D8LessonsLearned, 3, 100, new { id = "txtD8LessonsLearned", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<label class="control-label ">D8 Completed:</label>
|
||||
@Html.CheckBoxFor(model => model.D8Completed, new { disabled = "disabled" })
|
||||
</div>
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-left">
|
||||
<font style="color: black; font-size:12px;font-weight: bolder">
|
||||
How we recognized the team:
|
||||
</font>
|
||||
@Html.TextAreaFor(model => model.D8TeamRecognition, 3, 100, new { id = "txtD8TeamRecognition", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<font style="color: black; font-size:12px;font-weight: bolder">
|
||||
Lessons Leanred:
|
||||
</font>
|
||||
@Html.TextAreaFor(model => model.D8LessonsLearned, 3, 100, new { id = "txtD8LessonsLearned", @class = "k-textbox", style = "font-size: 10px;width: 100%;", Readonly = "Readonly" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
</div>*@
|
||||
|
||||
<div class="panel panel-default" style="font-size: 10px">
|
||||
@if (Model.ApprovalStatus != 0)
|
||||
@ -1519,7 +1607,6 @@
|
||||
)
|
||||
.Resizable(resize => resize.Columns(true))
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1539,15 +1626,15 @@
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" id="SectionApprovalLog" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #e4daa1; font-size: 15px;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Section Approval Log:</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="SectionApprovalLogContainer" style="background-color: #75adc6; font-size: 12px;">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CASectionApproval>()
|
||||
<div class="modal fade" id="SectionApprovalLog" tabindex="0" role="dialog" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #e4daa1; font-size: 15px;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Section Approval Log:</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="SectionApprovalLogContainer" style="background-color: #75adc6; font-size: 12px;">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.CASectionApproval>()
|
||||
.Name("SectionApprovalList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
@ -1577,13 +1664,13 @@
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #e4daa1; font-size: 15px;">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="background-color: #e4daa1; font-size: 15px;">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
@ -1616,7 +1703,7 @@
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
$("#CAList").on('click', function () {
|
||||
var url = '@Url.Action("CorrectiveActionList", "Home")';
|
||||
@ -1641,7 +1728,25 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
function UnlockDocument() {
|
||||
$.ajax({
|
||||
url: "/CorrectiveAction/ReleaseLockOnDocumentAdmin",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
issueID: ("@Model.CANo")
|
||||
},
|
||||
success: function () {
|
||||
alert('Document Unlocked!');
|
||||
var url = '@Url.Action("ReadOnlyCA", "CorrectiveAction", new { caNo = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', @Model.CANo);
|
||||
},
|
||||
error: function (result) {
|
||||
alert("ReleaseLockOnDocument - Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1659,7 +1764,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1674,11 +1779,6 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function buildLinks(fileNames, caNo) {
|
||||
var template = "";
|
||||
|
||||
@ -1748,7 +1848,7 @@
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
@ -153,6 +153,12 @@
|
||||
<div class="col-sm-6">
|
||||
@Html.TextBoxFor(model => model.Title, new { id = "txtTitle", @class = "k-textbox", style = "width:100%" })
|
||||
</div>
|
||||
<div class="col-sm-6 col-sm-offset-4" style="color: red;">
|
||||
*(DO NOT USE Rev I, O, Q, S, X, and Z)
|
||||
</div>
|
||||
<div class="col-sm-6 col-sm-offset-4" style="color: red;">
|
||||
Revision Y is followed by AA. YY is followed by AAA
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Approvers:</label>
|
||||
@ -164,7 +170,7 @@
|
||||
.Value(ViewBag.Nothing)
|
||||
)
|
||||
</div>
|
||||
<div class="col-sm-6" style="left:40%;color:red;">
|
||||
<div class="col-sm-6 col-sm-offset-4" style="color:red;">
|
||||
Add minimum of Quality, Si Production, and Dept Specfic
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@using Microsoft.AspNet.Identity
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
@ -163,110 +163,6 @@
|
||||
|
||||
</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">
|
||||
@ -498,6 +394,13 @@
|
||||
return numStr;
|
||||
}
|
||||
|
||||
function toggleDelegate() {
|
||||
var control = document.getElementById("DelegateControl");
|
||||
var label = document.getElementById("DelegateLabel");
|
||||
|
||||
control.classList.toggle("hideControl");
|
||||
label.classList.toggle("hideControl");
|
||||
}
|
||||
|
||||
function onAllDocsDB(e) {
|
||||
var grid = $("#alltasklist").data("kendoGrid");
|
||||
|
@ -1,4 +1,4 @@
|
||||
@{
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
@ -25,18 +25,20 @@
|
||||
{
|
||||
|
||||
columns.Bound(l => l.CANo)
|
||||
.ClientTemplate("<a href='/CorrectiveAction/Edit?IssueID=#=CANo#'>#=formatIssueID(CANo)#</a>").Width("50px");
|
||||
.ClientTemplate("<a href='/CorrectiveAction/Edit?IssueID=#=CANo#'>#=formatIssueID(CANo)#</a>");
|
||||
|
||||
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");
|
||||
columns.Bound(l => l.CASource);
|
||||
columns.Bound(l => l.RequestorName).Title("Requestor");
|
||||
columns.Bound(l => l.D1AssigneeName).Title("Assignee");
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy}");
|
||||
columns.Bound(l => l.CATitle);
|
||||
columns.Bound(l => l.StatusName);
|
||||
columns.Bound(l => l.PendingApprovers);
|
||||
columns.Bound(l => l.PendingAIOwners).Title("Action Item Owners");
|
||||
columns.Bound(l => l.D8DueDate).Format("{0:MM/dd/yy}");
|
||||
columns.Bound(l => l.ClosedDate).Format("{0:MM/dd/yy}");
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"<a href='javascript: void(0)' class='abutton delete' onclick='deleteRowCA(this)' title='button delete'>button delete</a>");
|
||||
|
||||
})
|
||||
|
||||
@ -68,14 +70,14 @@
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.CANo);
|
||||
{
|
||||
model.Id(p => p.CANo);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetCorrectiveActionList", "Home"))
|
||||
//.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteCAItem", "Home"))
|
||||
)
|
||||
)
|
||||
</div>
|
||||
@ -93,5 +95,8 @@
|
||||
return numStr;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
function deleteRowCA(element) {
|
||||
grid = $("#CAList").data("kendoGrid");
|
||||
grid.removeRow($(element).closest("tr"));
|
||||
}
|
||||
</script>
|
||||
|
@ -163,109 +163,6 @@
|
||||
|
||||
</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">
|
||||
|
@ -13,6 +13,10 @@
|
||||
.hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.hideControl {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<nav class="navbar navbar-default" role="navigation" style="font-size: 11px">
|
||||
|
||||
@ -301,8 +305,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="row hideControl" id="DelegateLabel">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@ -314,7 +317,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row hideControl" id="DelegateControl">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@ -370,12 +373,12 @@
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<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">
|
||||
@ -547,7 +550,7 @@
|
||||
url: urlString,
|
||||
data: {
|
||||
//oooUserID: userids,
|
||||
delegatedTo: $("#DelegateTo").data("kendoDropDownList").value(),
|
||||
delegatedTo: delegate,
|
||||
startDate: $("#txtStartDate").val(),
|
||||
endDate: $("#txtEndDate").val(),
|
||||
tab: tab
|
||||
@ -579,7 +582,6 @@
|
||||
//grid.removeRow($(element));
|
||||
}
|
||||
|
||||
|
||||
function showReAssignRole(_pendingApprovers, _closeDate, _issueID, _docType, _submitDate) {
|
||||
//alert(_closeDate);;
|
||||
//alert(_pendingApprovers);
|
||||
|
@ -1,4 +1,4 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@using Microsoft.AspNet.Identity
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
@ -164,110 +164,7 @@
|
||||
|
||||
</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">
|
||||
@ -297,4 +194,4 @@
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
@ -202,109 +202,6 @@
|
||||
|
||||
</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">
|
||||
|
@ -89,109 +89,6 @@
|
||||
|
||||
</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">
|
||||
|
@ -59,6 +59,10 @@
|
||||
{
|
||||
<li>@Html.ActionLink("Admin", "Index", "Admin")</li>
|
||||
}
|
||||
@if ((bool)@Session[GlobalVars.IS_MANAGER])
|
||||
{
|
||||
<li>@Html.ActionLink("Manager", "Index", "Manager")</li>
|
||||
}
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
@ -148,7 +152,6 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
@ -217,12 +220,12 @@
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<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">
|
||||
@ -313,7 +316,6 @@
|
||||
return false;
|
||||
})
|
||||
|
||||
|
||||
$('#SaveOOOInfo').on('click', function () {
|
||||
var tab = $('#currentTab').val();
|
||||
var bfound = false;
|
||||
|
589
Fab2ApprovalSystem/Views/Manager/Index.cshtml
Normal file
589
Fab2ApprovalSystem/Views/Manager/Index.cshtml
Normal file
@ -0,0 +1,589 @@
|
||||
@model IEnumerable<Fab2ApprovalSystem.Models.LoginModel>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Index";
|
||||
}
|
||||
|
||||
@{
|
||||
Layout = "_ManagerLayout.cshtml";
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="/Content/kendo/kendo.blueopal.min.css" />
|
||||
<link rel="stylesheet" href="~/Content/kendogridcustom.css" />
|
||||
|
||||
<style>
|
||||
.k-grid-edit-row input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header .k-link {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.k-grid .k-grid-header .k-header {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.k-grid .k-edit-cell input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hiddenDelegate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*InLine Edit Mode*/
|
||||
</style>
|
||||
|
||||
<div id="userListdiv" class="k-content">
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.Models.LoginModel>()
|
||||
.Name("userList")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.UserID).Visible(false);
|
||||
columns.Bound(l => l.FirstName);
|
||||
columns.Bound(l => l.LastName);
|
||||
columns.Bound(l => l.Email);
|
||||
columns.Bound(l => l.IsActive);
|
||||
//columns.Template(@<text></text>).ClientTemplate("<input type='checkbox' #= IsActive ? checked='checked':'' # class='chkbx' />");
|
||||
|
||||
columns.Bound(l => l.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(@"
|
||||
//<input type='button' value='Approval Groups' class='btn btn-primary btn-xs' onclick='ShowApprovalGroup(" + l => + ")'/>");
|
||||
})
|
||||
.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<Fab2ApprovalSystem.Models.LoginModel>()
|
||||
.Name("Grid")
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(l => l.UserID).Visible(false);
|
||||
columns.Bound(l => l.LoginID);
|
||||
columns.Bound(l => l.FirstName);
|
||||
columns.Bound(l => l.LastName);
|
||||
columns.Bound(l => l.IsAdmin);
|
||||
columns.Bound(l => l.LastLogin).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.OOO);
|
||||
columns.Bound(l => l.OOOStartDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
|
||||
columns.Bound(l => l.OOOExpirationDate).Format("{0:MM/dd/yy hh:mm:ss}").Width("150px");
|
||||
columns.Bound(l => l.DelegatedTo).Visible(false);
|
||||
columns.Bound(l => l.DelegatedToFullName);
|
||||
columns.Bound(p => p.OOOStatusWithUserID).ClientTemplate("#=buildButtons(OOOStatusWithUserID)#").Width(120);
|
||||
|
||||
|
||||
})
|
||||
.ToolBar(toolbar =>
|
||||
{
|
||||
toolbar.Create();
|
||||
toolbar.Save();
|
||||
})
|
||||
.Editable(editable => editable.Mode(GridEditMode.InCell))
|
||||
.Pageable()
|
||||
.Navigatable()
|
||||
.Sortable()
|
||||
.Scrollable()
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Batch(true)
|
||||
.PageSize(20)
|
||||
.ServerOperation(false)
|
||||
//.Events(events => events.Error("error_handler"))
|
||||
.Model(model => model.Id(p => p.UserID))
|
||||
.Read(read => read.Action("GetGridUserList", "Admin"))
|
||||
.Create(update => update.Action("InsertUser", "Admin"))
|
||||
.Update(update => update.Action("BatchUpdateUser", "Admin"))
|
||||
.Destroy(destroy => destroy.Action("DeleteUser", "Admin"))
|
||||
)
|
||||
)*@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal fade" id="OOODialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
@*<h4 class="modal-title" id="myModalLabel">Out Of Office for user:</h4>*@
|
||||
<label style="color: #36940a; font-weight: bold; font-size: 16px; " id="currentUser"></label>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="AssignDelegate">Assign Delegate?</label>
|
||||
<input type="checkbox" name="AssignDelegate" id="AssignDelegate" value="false" onclick="toggleDelegate()"/>
|
||||
<p>*Please assign a delegate if this user will be assigned tasks while Out of Office.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row hiddenDelegate" id="delegateLabel">
|
||||
<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 hiddenDelegate" id="delegateControl">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" id="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function toggleDelegate() {
|
||||
document.getElementById("delegateControl").classList.toggle("hiddenDelegate");
|
||||
document.getElementById("delegateLabel").classList.toggle("hiddenDelegate");
|
||||
}
|
||||
|
||||
function error_handler(e) {
|
||||
alert("Error during the operation");
|
||||
if (e.errors) {
|
||||
var message = "Errors:\n";
|
||||
$.each(e.errors, function (key, value) {
|
||||
if ('errors' in value) {
|
||||
$.each(value.errors, function () {
|
||||
message += this + "\n";
|
||||
});
|
||||
}
|
||||
});
|
||||
alert(message);
|
||||
}
|
||||
}
|
||||
|
||||
var userid = "";
|
||||
function onEdit(e) {
|
||||
|
||||
$(e.container).find("td:last").html("<a href='javascript: void(0)' class='abutton update' onclick='updateRow()' title='button update'>button update</a> " +
|
||||
"<a href='javascript: void(0)' class='abutton cancel' onclick='cancelRow()' title='button cancel'>button cancel</a>");
|
||||
}
|
||||
|
||||
function cancelRow() {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
grid.cancelRow();
|
||||
}
|
||||
|
||||
function editRow(element) {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
grid.editRow($(element).closest("tr"));
|
||||
}
|
||||
|
||||
function updateRow() {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
grid.saveRow();
|
||||
}
|
||||
|
||||
function deleteRow(element, userId) {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
|
||||
console.log(userId);
|
||||
|
||||
$("#DeletedUserIDHidden").val(userId);
|
||||
$("#SubRoleListReAssign").data("kendoGrid").dataSource.read();
|
||||
$("#ReAssignApprovalGroups").modal('show');
|
||||
//var ds = grid.dataSource;
|
||||
//var dataItem = grid.dataItem($(element.target).closest("tr"));
|
||||
//var rowViewIndex = $(element).closest("tr").index();
|
||||
//var index = ((ds.page() - 1) * ds.pageSize()) + rowViewIndex;
|
||||
|
||||
//var myRowData = $("#userList").data().kendoGrid.dataSource.at(index);
|
||||
//console.log(myRowData);
|
||||
|
||||
//grid.data.
|
||||
|
||||
//grid.removeRow($(element).closest("tr"));
|
||||
}
|
||||
|
||||
function createRow() {
|
||||
grid = $("#userList").data("kendoGrid");
|
||||
grid.addRow();
|
||||
}
|
||||
|
||||
function buildButtons(oooStatusWithUserID) {
|
||||
|
||||
var uid = oooStatusWithUserID.split('~')[0];
|
||||
var oooStatus = oooStatusWithUserID.split('~')[1];
|
||||
var userName = oooStatusWithUserID.split('~')[2];
|
||||
|
||||
var template = "";
|
||||
if (oooStatus == '0') {
|
||||
|
||||
template = "<input type='button' value='Set OOO ' class='btn btn-primary btn-xs' id='" + uid + "-" + userName + "'" + "onclick='SetOOOStatus(this)'/>";
|
||||
}
|
||||
else
|
||||
{
|
||||
template = "<input type='button' value='Expire OOO' class='btn btn-warning btn-xs' id='" + uid + "-" + userName + "'" + "onclick='Expire(this)'/>";
|
||||
}
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
function buildShowGroupsButton(UserID) {
|
||||
|
||||
var uid = oooStatusWithUserID.split('~')[0];
|
||||
|
||||
|
||||
var template = "";
|
||||
template = "<input type='button' value='Edit Approval Groups ' class='btn btn-primary btn-xs' id='" + UserID + "' " + "onclick='ShowApprovalGroup(this)'/>";
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
function SetOOOStatus(e) {
|
||||
$("#txtStartDate").val('');
|
||||
$("#txtEndDate").val('');
|
||||
|
||||
|
||||
id = e.id;
|
||||
userid = id.split('-')[0];
|
||||
var userName = id.split('-')[1];
|
||||
$('#currentUser').text("Out Of Office for user: " + userName);
|
||||
$("#OOODialog").modal('show');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$('#SaveOOOInfo').on('click', function () {
|
||||
var bfound = false;
|
||||
//var currentDate = new Date();
|
||||
var delegate = "";
|
||||
var isChecked = $("#AssignDelegate").is(":checked");
|
||||
|
||||
if (isChecked === true)
|
||||
delegate = $("#DelegateTo").data("kendoDropDownList").value();
|
||||
|
||||
else
|
||||
delegate = "0";
|
||||
|
||||
if (userid == delegate)
|
||||
{
|
||||
alert('The OOO person cannot be same as the delegate to person');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var fullDate = new Date()
|
||||
|
||||
//convert month to 2 digits
|
||||
var twoDigitMonth = ((fullDate.getMonth().length + 1) === 1) ? (fullDate.getMonth() + 1) : '0' + (fullDate.getMonth() + 1);
|
||||
|
||||
var tempCurrentDate = twoDigitMonth + "/" + fullDate.getDate() + "/" + fullDate.getFullYear();
|
||||
var arrCurrDate = tempCurrentDate.split('/');
|
||||
var currentDate = new Date(arrCurrDate[2], arrCurrDate[0] - 1, arrCurrDate[1]);
|
||||
|
||||
|
||||
if (!$("#txtStartDate").val() || !$("#txtEndDate").val()) {
|
||||
alert('Start or the End Date cannot be blank');
|
||||
return false;
|
||||
}
|
||||
|
||||
var stDateEntered = $("#txtStartDate").val();
|
||||
var arrStDate = stDateEntered.split('/');
|
||||
var stDate = new Date(arrStDate[2], arrStDate[0] - 1, arrStDate[1]);
|
||||
|
||||
var endDateEntered = $("#txtEndDate").val();
|
||||
var arrEndDate = endDateEntered.split('/');
|
||||
var endDate = new Date(arrEndDate[2], arrEndDate[0] - 1, arrEndDate[1]);
|
||||
|
||||
|
||||
if (stDate < currentDate) {
|
||||
alert("Start Date should be greater than the or equal to Current Date ");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (endDate <= stDate) {
|
||||
|
||||
alert("The End Date should be greater than the Start Date ");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#OOODialog").modal('hide');
|
||||
|
||||
var urlString = '/Admin/EnableOOOStatus';
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
oooUserID: userid,
|
||||
delegatedTo: delegate,
|
||||
startDate: $("#txtStartDate").val(),
|
||||
endDate: $("#txtEndDate").val(),
|
||||
},
|
||||
success: function (result) {
|
||||
if (result == "3") {
|
||||
alert('The user which you selected for Delegation is already a delegator for another user\n Please select a different user for Delgation')
|
||||
}
|
||||
else {
|
||||
var grid = $("#userList").data("kendoGrid");
|
||||
grid.dataSource.read();
|
||||
}
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
function Expire(e) {
|
||||
id = e.id;
|
||||
userid = id.split('-')[0];
|
||||
var userName = id.split('-')[1];
|
||||
|
||||
if (confirm('Are you sure you want to expire the OOO setting for user: ' + userName))
|
||||
{
|
||||
var urlString = '/Admin/ExpireOOOStatus';
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: urlString,
|
||||
data: {
|
||||
oooUserID: userid
|
||||
},
|
||||
success: function (result) {
|
||||
var grid = $("#userList").data("kendoGrid");
|
||||
grid.dataSource.read();
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function ShowApprovalGroup(UserId) {
|
||||
|
||||
$("#UserIDHidden").val(UserId);
|
||||
$("#SubRoleList").data("kendoGrid").dataSource.read();
|
||||
$("#UserApprovalGroupsDialog").modal('show');
|
||||
}
|
||||
function ShowApprovalGroupReAssign(UserId) {
|
||||
|
||||
$("#DeletedUserIDHidden").val(UserId);
|
||||
$("#SubRoleListReAssign").data("kendoGrid").dataSource.read();
|
||||
$("#UserApprovalGroupsDialog").modal('show');
|
||||
}
|
||||
function GetUserID() {
|
||||
var userId = $("#UserIDHidden").val();
|
||||
return { userId : userId};
|
||||
}
|
||||
function GetDeletedUserID()
|
||||
{
|
||||
var userId = $("#DeletedUserIDHidden").val();
|
||||
return { userId: userId };
|
||||
}
|
||||
function ShowUserTasks(UserId) {
|
||||
$("#TaskUserIDHidden").val(UserId);
|
||||
$("#UserTaskList").data("kendoGrid").dataSource.read();
|
||||
$("#UserAssignedTasksDialog").modal('show');
|
||||
}
|
||||
function GetTaskListUserID() {
|
||||
var userId = $("#TaskUserIDHidden").val();
|
||||
return { userId: userId };
|
||||
}
|
||||
function ShowRoleUserSelector(SubRoleID) {
|
||||
var userBeingDeleted = $("#DeletedUserIDHidden").val()
|
||||
$("#hiddenRoleId").val(SubRoleID);
|
||||
$("#RoleReAssignPromptDeletedUserHidden").val(userBeingDeleted)
|
||||
$("#RoleReAssignPrompt").modal('show');
|
||||
}
|
||||
function SubmitRoleAssignment() {
|
||||
var userToAssign = $("#selectedUserToReassign").data("kendoDropDownList").value();
|
||||
var roleToAssign = $("#hiddenRoleId").val();
|
||||
var userBeingDeleted = $("#RoleReAssignPromptDeletedUserHidden").val();
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/Admin/ReplaceUserRoles",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
subRole: roleToAssign,
|
||||
users: userToAssign
|
||||
},
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
DeleteUserFromRole(roleToAssign, userBeingDeleted);
|
||||
$("#RoleReAssignPrompt").modal('hide');
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
function DeleteUserFromRole(subRoleId, userId) {
|
||||
$.ajax({
|
||||
url: "/Admin/DeleteUserRoles",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
subRole: subRoleId,
|
||||
users: userId
|
||||
},
|
||||
success: function (data) {
|
||||
$("#SubRoleListReAssign").data("kendoGrid").dataSource.read();
|
||||
return;
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
function InactivateUser() {
|
||||
if (confirm("Are you sure you wish to de-activate this user?")) {
|
||||
var userId = $("#DeletedUserIDHidden").val();
|
||||
$.ajax({
|
||||
url: "/Admin/DeleteUser",
|
||||
type: "POST",
|
||||
datatype: "json",
|
||||
data: {
|
||||
userId: userId
|
||||
},
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
$("#ReAssignApprovalGroups").modal('hide');
|
||||
$("#userList").data("kendoGrid").dataSource.read();
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed " + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
65
Fab2ApprovalSystem/Views/Manager/_ManagerLayout.cshtml
Normal file
65
Fab2ApprovalSystem/Views/Manager/_ManagerLayout.cshtml
Normal file
@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>@ViewBag.Title - Mesa Approval</title>
|
||||
@Styles.Render("~/Content/kendo/css")
|
||||
@Styles.Render("~/Content/css")
|
||||
@*@Styles.Render("~/Content/jqw/css")*@
|
||||
|
||||
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/kendo")
|
||||
|
||||
|
||||
@*<script src="~/Scripts/bootstrap.js"></script>
|
||||
<script src="~/Scripts/respond.js"></script>*@
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
@*@Scripts.Render("~/Content/jqw/jq")*@
|
||||
<script src="~/Scripts/excel-bootstrap-table-filter-bundle.js"></script>
|
||||
<script src="~/Scripts/moment.js"></script>
|
||||
<link rel="stylesheet" href="~/Content/excel-bootstrap-table-filter-style.css" />
|
||||
</head>
|
||||
<body class="navbar-inner">
|
||||
<div class=" navbar navbar-inverse navbar-fixed-top">
|
||||
<div >
|
||||
<div class="navbar-header">
|
||||
@if (Request.IsAuthenticated) {
|
||||
@*@Html.ActionLink("Home", "Index", "Home", new { tabName = "MyTasks" }, new { @class = "navbar-brand" })*@
|
||||
@Html.ActionLink("Home", "MyTasks", "Home", null, new { @class = "navbar-brand" })
|
||||
}
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
@if ((bool)@Session[GlobalVars.IS_MANAGER])
|
||||
{
|
||||
<li>@Html.ActionLink("Manager", "Index", "Manager")</li>
|
||||
}
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@(Html.Kendo().Menu()
|
||||
.Name("menu")
|
||||
.HtmlAttributes(new { style = "width:100%; font-size: 12px" })
|
||||
.Items(menu =>
|
||||
{
|
||||
menu.Add().Text("Manage Users").Action("Index", "Manager");
|
||||
}))
|
||||
<div>
|
||||
@RenderBody()
|
||||
@*<hr />*@
|
||||
<footer >
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user