NET8
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
@if ((bool)@Session[GlobalVars.IS_ADMIN])
|
||||
@if (@GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
<li>@Html.ActionLink("Admin", "Index", "Admin")</li>
|
||||
}
|
||||
|
@ -144,7 +144,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.OwnerName, new { id = "txtOwner", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOwner" class="linkbutton edit" title="Re-assign Owner"></a>
|
||||
}
|
||||
@ -200,7 +200,7 @@
|
||||
<label class="control-label pull-right">Export Control:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@if (ViewBag.IsOriginator == "true" || ((bool)Session[GlobalVars.IS_ADMIN]))
|
||||
@if (ViewBag.IsOriginator == "true" || (GlobalVars.IsAdmin(Session)))
|
||||
{
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("IsITAR")
|
||||
|
@ -329,7 +329,7 @@
|
||||
columns.Bound(a => a.Gating).Width("50px");
|
||||
columns.Bound(a => a.DueDate).Width("50px").Format("{0:MM/dd/yy}").Width("150px");
|
||||
|
||||
if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
columns.Command(c => c.Custom("Edit").Click("EditMeetingActionItem")).Width("70px");
|
||||
|
||||
//columns.Command(c => c.Destroy()).Width("40px");
|
||||
|
@ -128,7 +128,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.OwnerName, new { id = "txtOwner", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOwner" class="linkbutton edit" title="Re-assign Owner"></a>
|
||||
}
|
||||
|
@ -1465,7 +1465,7 @@
|
||||
Additional Approvers
|
||||
</button>
|
||||
}
|
||||
else if ((((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))) && Model.ClosedDate == null)
|
||||
else if (((GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))) && Model.ClosedDate == null)
|
||||
{
|
||||
<button class="k-textbox" data-toggle="modal" id="additionalApprovers">
|
||||
Additional Approvers
|
||||
@ -1475,7 +1475,7 @@
|
||||
</div>
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
@if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
@ -2180,7 +2180,7 @@
|
||||
var currentD5D6AttachmentLinks;
|
||||
var currentD7AttachmentLinks;
|
||||
var currentRejectingSection = '';
|
||||
var currentUserId = @((int)Session[GlobalVars.SESSION_USERID])
|
||||
var currentUserId = @(GlobalVars.GetUserId(Session))
|
||||
var currentRequestor = @(Model.RequestorID);
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
<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)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<input type="button" value="Unlock Document" class="btn btn-primary btn-xs" id="UnlockDocumentBtn" onclick="UnlockDocument()" />
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
<input type="button" value="Approval Log History" class="btn btn-primary btn-xs" id="ApprovalLogHistoryData" />
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<input type="button" value="Unlock Document" class="btn btn-primary btn-xs" id="UnlockDocumentBtn" onclick="UnlockDocument()" />
|
||||
}
|
||||
@ -137,7 +137,7 @@
|
||||
<label class="control-label col-sm-4">Originator Name:</label>
|
||||
<div class="col-sm-8">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
@ -892,9 +892,9 @@
|
||||
<div class="col-sm-offset-0">
|
||||
|
||||
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
|
@ -31,7 +31,7 @@
|
||||
<label class="control-label col-sm-4">Originator Name:</label>
|
||||
<div class="col-sm-8">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
|
@ -90,7 +90,7 @@
|
||||
<label class="control-label col-sm-4">Originator Name:</label>
|
||||
<div class="col-sm-8">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
@ -785,9 +785,9 @@
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
|
@ -173,7 +173,7 @@
|
||||
<label class="control-label col-sm-4">Originator Name:</label>
|
||||
<div class="col-sm-6 col-sm-8">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
@ -367,7 +367,7 @@
|
||||
@if (
|
||||
(ViewBag.IsOriginator == "true" && Model.IsTECN && Model.CloseDate != null && !Model.ExpirationProcessed && !Model.ExpirationInProgress && !Model.CancellationApproved && !Model.CancellationInProgress && Model.ConversionApprovalInProgress == false && (Model.ExpirationDate >= DateTime.Today || Model.ExtensionDate >= DateTime.Today))
|
||||
||
|
||||
(Model.IsTECN && (bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated) && Model.CloseDate != null && !Model.ExpirationProcessed && !Model.ExpirationInProgress && !Model.CancellationApproved && !Model.CancellationInProgress && Model.ConversionApprovalInProgress == false && (Model.ExpirationDate >= DateTime.Today || Model.ExtensionDate >= DateTime.Today))
|
||||
(Model.IsTECN && GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated) && Model.CloseDate != null && !Model.ExpirationProcessed && !Model.ExpirationInProgress && !Model.CancellationApproved && !Model.CancellationInProgress && Model.ConversionApprovalInProgress == false && (Model.ExpirationDate >= DateTime.Today || Model.ExtensionDate >= DateTime.Today))
|
||||
)
|
||||
{
|
||||
@(Html.Kendo().DatePickerFor(model => model.ExtensionDate)
|
||||
@ -980,7 +980,7 @@
|
||||
Additional Approvers
|
||||
</button>
|
||||
}
|
||||
else if ((ViewBag.IsOriginator == "true" || ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))) && Model.CloseDate == null)
|
||||
else if ((ViewBag.IsOriginator == "true" || (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))) && Model.CloseDate == null)
|
||||
{
|
||||
<button class="k-textbox" data-toggle="modal" id="additionalApprovers">
|
||||
Additional Approvers
|
||||
@ -994,9 +994,9 @@
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
|
@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
<input type="button" value="Approval Log History" class="btn btn-primary btn-xs" id="ApprovalLogHistoryData" />
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<input type="button" value="Unlock Document" class="btn btn-primary btn-xs" id="UnlockDocumentBtn" onclick="UnlockDocument()" />
|
||||
}
|
||||
@ -149,7 +149,7 @@
|
||||
<label class="control-label col-sm-4">Originator Name:</label>
|
||||
<div class="col-sm-8">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", disabled = "disabled", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
@ -895,9 +895,9 @@
|
||||
<div class="col-sm-offset-0">
|
||||
|
||||
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
@ -999,7 +999,7 @@
|
||||
@{
|
||||
if (ViewBag.TrainingID != 0)
|
||||
{
|
||||
Html.RenderAction("ViewTrainingPartial", "Training", new { trainingId = Convert.ToInt32(ViewBag.TrainingID), userID = Convert.ToInt32((int)Session[GlobalVars.SESSION_USERID]) });
|
||||
Html.RenderAction("ViewTrainingPartial", "Training", new { trainingId = Convert.ToInt32(ViewBag.TrainingID), userID = Convert.ToInt32(GlobalVars.GetUserId(Session)) });
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<div id="alltasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("alltasklist")
|
||||
|
@ -38,7 +38,7 @@
|
||||
columns.Bound(l => l.D8DueDate).Format("{0:MM/dd/yy}");
|
||||
columns.Bound(l => l.NextDueDate).Format("{0:MM/dd/yy}");
|
||||
columns.Bound(l => l.ClosedDate).Format("{0:MM/dd/yy}");
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
if (GlobalVars.IsAdmin(Session))
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"<a href='javascript: void(0)' class='abutton delete' onclick='deleteRowCA(this)' title='button delete'>button delete</a>");
|
||||
|
||||
})
|
||||
|
@ -33,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<div id="ecnTasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("ecnTasklist")
|
||||
|
@ -26,7 +26,7 @@
|
||||
<ul class="nav navbar-nav" id="myTab">
|
||||
<li><a href=@Url.Action("Index", "Home", new {tabName = "MyTasks"})>My Tasks</a></li>
|
||||
<li><a href=@Url.Action("Index", "Home", new { tabName = "AllTasks" })>All Documents</a></li>
|
||||
@*<li><a href=@Url.Action("ViewMyTrainingAssignments", "Training", new { userID = (int)Session[GlobalVars.SESSION_USERID] })>My Training</a></li>*@
|
||||
@*<li><a href=@Url.Action("ViewMyTrainingAssignments", "Training", new { userID = GlobalVars.GetUserId(Session) })>My Training</a></li>*@
|
||||
@*<li><a href=@Url.Action("SpecialWorkRequestList", "Home", new { tabName = "AllTasks" })>Special Work Requests</a></li>*@
|
||||
@*<li><a href="file:////temirwfp001.irworld.irf.com/UserData/QA/CommonRO/Projects/AVI Tool/">AVI Tool</a></li>*@
|
||||
<li class="dropdown">
|
||||
@ -44,7 +44,7 @@
|
||||
@*<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search" style="font-size: 11px">
|
||||
</div>*@
|
||||
@if (!(bool)Session[GlobalVars.OOO])
|
||||
@if (!GlobalVars.IsOOO(Session))
|
||||
{
|
||||
<button class="btn btn-default btn-primary" data-toggle="modal" id="OOO">Out Of Office</button>
|
||||
}
|
||||
@ -170,7 +170,7 @@
|
||||
</div>
|
||||
|
||||
<div id="alltasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("alltasklist")
|
||||
@ -427,7 +427,7 @@
|
||||
var issueID="";
|
||||
var docType = "";
|
||||
var submitdate = "";
|
||||
var userName = "@Session[@GlobalVars.SESSION_USERNAME].ToString()";
|
||||
var userName = '@GlobalVars.GetUserName(Session)';
|
||||
|
||||
$(document).ready(function () {
|
||||
})
|
||||
@ -450,7 +450,7 @@
|
||||
window.location.href = url.replace('__id__', issueID);
|
||||
})*@
|
||||
|
||||
var userid = @Session[@GlobalVars.SESSION_USERID].ToString()
|
||||
var userid = @GlobalVars.GetUserId(Session);
|
||||
|
||||
|
||||
$("#IncludeAllDocuments").on("click", function () {
|
||||
|
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<div id="LotDispoTasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("LotDispoTasklist")
|
||||
|
@ -32,7 +32,7 @@
|
||||
<table class="pull-right">
|
||||
<tr>
|
||||
<td class="pull-right">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("AddQDBFlag")
|
||||
@ -45,7 +45,7 @@
|
||||
}
|
||||
</td>
|
||||
<td class="pull-right">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
@(Html.Kendo().Upload()
|
||||
.Name("RemoveQDBFlag")
|
||||
@ -72,7 +72,7 @@
|
||||
</div>
|
||||
|
||||
<div id="mrbTasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("mrbTasklist")
|
||||
|
@ -175,7 +175,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
@if (Convert.ToBoolean(Session[GlobalVars.CAN_CREATE_PARTS_REQUEST]) && !Convert.ToBoolean(Session[GlobalVars.IS_ADMIN]))
|
||||
@if (GlobalVars.GetCanCreatePartsRequest(Session) && !GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
<br /><br />
|
||||
<div class="panel-heading" style="background-color:beige">
|
||||
|
@ -55,11 +55,11 @@
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
@*<li>@Html.ActionLink("Reports", "Index", "Reports")</li>*@
|
||||
@if ((bool)@Session[GlobalVars.IS_ADMIN])
|
||||
@if (@GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
<li>@Html.ActionLink("Admin", "Index", "Admin")</li>
|
||||
}
|
||||
@if ((bool)@Session[GlobalVars.IS_MANAGER])
|
||||
@if (GlobalVars.IsManager(Session))
|
||||
{
|
||||
<li>@Html.ActionLink("Manager", "Index", "Manager")</li>
|
||||
}
|
||||
@ -83,10 +83,10 @@
|
||||
@*<li><a href=@Url.Action("Create", "LotDisposition")>Lot Dispostion</a></li>*@
|
||||
@*<li><a href=@Url.Action("Create", "MRB")>Create MRB</a></li>*@
|
||||
<li><a href=@Url.Action("Create", "ECN")>Create ECN/TECN</a></li>
|
||||
@if (!string.IsNullOrWhiteSpace(Session["JWT"].ToString())) {
|
||||
string jwt = Session["JWT"].ToString();
|
||||
@if (!string.IsNullOrWhiteSpace(GlobalVars.GetJWT(Session))) {
|
||||
string jwt = GlobalVars.GetJWT(Session);
|
||||
string encodedJwt = System.Net.WebUtility.UrlEncode(jwt);
|
||||
string refreshToken = Session["RefreshToken"].ToString();
|
||||
string refreshToken = GlobalVars.GetRefreshToken(Session);
|
||||
string encodedRefreshToken = System.Net.WebUtility.UrlEncode(refreshToken);
|
||||
string wasmClientUrl = Environment.GetEnvironmentVariable("FabApprovalWasmClientUrl") ??
|
||||
"https://localhost:7255";
|
||||
@ -106,7 +106,7 @@
|
||||
@*<li><a href=@Url.Action("Create", "ChangeControl")>Create PCR</a></li>*@
|
||||
<li><a href=@Url.Action("Create", "Audit")>Create Audit</a></li>
|
||||
<li><a href=@Url.Action("Create", "CorrectiveAction")>Create Corrective Action</a></li>
|
||||
@*@if (Convert.ToBoolean(Session[GlobalVars.CAN_CREATE_PARTS_REQUEST]))
|
||||
@*@if (GlobalVars.GetCanCreatePartsRequest(Session))
|
||||
{
|
||||
<li><a href=@Url.Action("Create", "PartsRequest")>Create New/Repair Spare Parts Request</a></li>
|
||||
}*@
|
||||
@ -118,7 +118,7 @@
|
||||
@*<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="Search" style="font-size: 11px">
|
||||
</div>*@
|
||||
@if (!(bool)Session[GlobalVars.OOO])
|
||||
@if (!GlobalVars.IsOOO(Session))
|
||||
{
|
||||
<button class="btn btn-default btn-primary" data-toggle="modal" id="OOO">Out Of Office</button>
|
||||
}
|
||||
@ -144,9 +144,9 @@
|
||||
menu.Add().Text("My Training").Action("ViewMyTrainingAssignments", "Training");
|
||||
menu.Add().Text("Training Reports").Action("TrainingReports", "Training");
|
||||
menu.Add().Text("All Documents").Action("AllDocuments", "Home");
|
||||
string jwt = Session["JWT"].ToString();
|
||||
string jwt = GlobalVars.GetJWT(Session);
|
||||
string encodedJwt = System.Net.WebUtility.UrlEncode(jwt);
|
||||
string refreshToken = Session["RefreshToken"].ToString();
|
||||
string refreshToken = GlobalVars.GetRefreshToken(Session);
|
||||
string encodedRefreshToken = System.Net.WebUtility.UrlEncode(refreshToken);
|
||||
string wasmClientUrl = Environment.GetEnvironmentVariable("FabApprovalWasmClientUrl") ??
|
||||
"https://localhost:7255";
|
||||
@ -279,7 +279,7 @@
|
||||
var issueID="";
|
||||
var docType = "";
|
||||
var submitdate = "";
|
||||
var userName = "@Session[@GlobalVars.SESSION_USERNAME].ToString()";
|
||||
var userName = '@GlobalVars.GetUserName(Session)';
|
||||
|
||||
$(document).ready(function () {
|
||||
})
|
||||
@ -302,7 +302,7 @@
|
||||
window.location.href = url.replace('__id__', issueID);
|
||||
})*@
|
||||
|
||||
var userid = @Session[@GlobalVars.SESSION_USERID].ToString()
|
||||
var userid = @GlobalVars.GetUserId(Session);
|
||||
|
||||
|
||||
$("#IncludeAllDocuments").on("click", function () {
|
||||
|
@ -41,10 +41,10 @@
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("OriginatorID")
|
||||
.BindTo(new SelectList(ViewBag.OriginatorList, "OriginatorID", "OriginatorName"))
|
||||
.Value(@Session[GlobalVars.SESSION_USERID].ToString())
|
||||
.Value(@GlobalVars.GetUserIdValue(Session))
|
||||
|
||||
)
|
||||
@*@Html.TextBoxFor(model => model.OriginatorID, new { id = @GlobalVars.USER_ID, Value = @Session[GlobalVars.SESSION_USERNAME].ToString();, @class = "k-textbox" })*@
|
||||
@*@Html.TextBoxFor(model => model.OriginatorID, new { id = @GlobalVars.USER_ID, Value = @GlobalVars.GetUserName(Session);, @class = "k-textbox" })*@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -478,9 +478,9 @@
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
|
@ -421,7 +421,7 @@
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
@if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
|
@ -133,7 +133,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
@ -901,9 +901,9 @@
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
|
@ -125,7 +125,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.Originator, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
|
@ -166,7 +166,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.Originator, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
|
@ -146,7 +146,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.Originator, new { @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
|
@ -152,7 +152,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
@ -818,7 +818,7 @@
|
||||
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
@if (((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated)))
|
||||
@if ((GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated)))
|
||||
{
|
||||
<button class="btn btn-warning btn-xs" data-toggle="modal" id="additionalApprovers" style="font-size:x-small">
|
||||
Additional Approvers
|
||||
@ -839,9 +839,9 @@
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
|
@ -196,7 +196,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.OriginatorName, new { id = "txtOriginatorName", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="javascript:undefined" id="lnkReassignOriginator" class="linkbutton edit" title="Re-assign Originator"></a>
|
||||
}
|
||||
|
@ -929,9 +929,9 @@
|
||||
|
||||
<div class="panel-body bg-warning">
|
||||
<div class="col-sm-offset-0">
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.ApproversListViewModel>()
|
||||
.Name("ApproversList")
|
||||
@ -1711,7 +1711,7 @@
|
||||
|
||||
$("#UploadWRAttchmentRev").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
wrAttachmentOperation = "Add";
|
||||
if (model == "true") {
|
||||
$("#WinWorkReqAttRevComments").modal('show');
|
||||
@ -1787,7 +1787,7 @@
|
||||
data.RevisionComments = $("#revisionWRAttachComments").val();
|
||||
|
||||
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
if (model == "true") {
|
||||
var urlString = '/LotTraveler/UpdateWorkRequestAttachmentRevision';
|
||||
$.ajax({
|
||||
@ -1851,7 +1851,7 @@
|
||||
|
||||
function on_WorkReqAttachmentsGridSuccess() {
|
||||
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
|
||||
if (model == "true") {
|
||||
$.ajax({
|
||||
@ -1887,7 +1887,7 @@
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
currentWrkReqAttachID = dataItem.ID;
|
||||
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
|
||||
if (model == "true") {
|
||||
$("#WinWorkReqAttRevComments").modal('show');
|
||||
@ -1910,7 +1910,7 @@
|
||||
|
||||
if (confirm("Do you really wish to delete the attachment record")) {
|
||||
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
if (model == "true") {
|
||||
$("#WinWorkReqAttRevComments").modal('show');
|
||||
}
|
||||
@ -2009,7 +2009,7 @@
|
||||
|
||||
if (confirm("Do you really wish to delete the record?")) {
|
||||
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
if (model == "true") {
|
||||
$("#WinHoldStepRevisionComments").modal("show");
|
||||
}
|
||||
@ -2180,7 +2180,7 @@
|
||||
else {
|
||||
// save
|
||||
$("#AddHoldStepForm").modal('hide');
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
if (model == "true") {
|
||||
$("#WinHoldStepRevisionComments").modal("show");
|
||||
}
|
||||
@ -2451,7 +2451,7 @@
|
||||
|
||||
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
|
||||
currentHoldStepID = dataItem.ID;
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
|
||||
if (model == "true") {
|
||||
$("#WinHoldStepAttRevComments").modal('show');
|
||||
@ -2769,7 +2769,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var model = '@Session["CreateNewRevision"]';
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
|
||||
$('#submitRevisionComments').attr("disabled", false);
|
||||
|
||||
@ -2919,7 +2919,7 @@
|
||||
|
||||
if (confirm("Do you really wish to delete?")) {
|
||||
|
||||
var model = '@Session["CreateNewRevision"]';
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
if (model == "true")
|
||||
$("#WinEPIRevisionComments").modal('show');
|
||||
else {
|
||||
@ -2968,7 +2968,7 @@
|
||||
var Quantity = $("#txtEPiQuantity").val();
|
||||
|
||||
$("#EPIForm").modal('hide');
|
||||
var model = '@Session["CreateNewRevision"]';
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
|
||||
if (model == "true")
|
||||
$("#WinEPIRevisionComments").modal('show');
|
||||
|
@ -118,7 +118,7 @@
|
||||
|
||||
function SetDocType(e) {
|
||||
|
||||
var model = "@Session["CreateNewRevision"]";
|
||||
var model = '@GlobalVars.GetCreateNewRevision(Session)';
|
||||
|
||||
if (model == "true") {
|
||||
$.ajax({
|
||||
|
@ -464,7 +464,7 @@
|
||||
</td>
|
||||
<td width="33%">
|
||||
<div class="text-center">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
@if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
<a class="k-button" href="javascript: void(0)" id="addMRBFlagAndHoldToSPN" style="padding-left: 10px;">
|
||||
Add MRB Flag/Hold to SPN
|
||||
|
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
@if ((bool)@Session[GlobalVars.IS_MANAGER])
|
||||
@if (@GlobalVars.IsManager(Session))
|
||||
{
|
||||
<li>@Html.ActionLink("Manager", "Index", "Manager")</li>
|
||||
}
|
||||
|
@ -42,8 +42,8 @@
|
||||
@*<li>@Html.ActionLink("Home", "Index", "Home")</li>
|
||||
<li>@Html.ActionLink("About", "About", "Home")</li>
|
||||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>*@
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null) {
|
||||
if ((bool)Session[GlobalVars.IS_ADMIN] && (Request.IsAuthenticated))
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session)) {
|
||||
if (GlobalVars.IsAdmin(Session) && (Request.IsAuthenticated))
|
||||
{
|
||||
<li>@Html.ActionLink("Admin", "Index", "Admin")</li>
|
||||
}
|
||||
|
@ -74,12 +74,12 @@ else
|
||||
}
|
||||
</style>
|
||||
<div id="cover-spin"></div>
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="/Training/ViewTrainings" class="btn btn-primary">Back To Trainings</a>
|
||||
}
|
||||
@Html.ActionLink("Go to ECN", "ReadOnly", "ECN", new { IssueID = Convert.ToInt32(ViewBag.ECNNumber) }, new { @class = "btn btn-primary" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<button class="btn btn-primary" id="openAddUserBtn">Add User</button>
|
||||
<button class="btn btn-primary" id="openAddGroupBtn">Add Group</button>
|
||||
@ -98,7 +98,7 @@ else
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.status)
|
||||
</th>
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<th>
|
||||
|
||||
@ -130,7 +130,7 @@ else
|
||||
<td>Incomplete</td>
|
||||
}
|
||||
<td>
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null && item.status != true)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session) && item.status != true)
|
||||
{
|
||||
|
||||
<button class="btn btn-primary" onclick="DeleteAssignment(@item.ID)">Delete</button>
|
||||
@ -138,7 +138,7 @@ else
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null && item.status != true)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session) && item.status != true)
|
||||
{
|
||||
|
||||
<button id="ReminderButton" class="btn btn-primary" onclick="SendReminder(@item.UserID, @item.ID, @Convert.ToInt32(ViewBag.ECNNumber))">Remind</button>
|
||||
|
@ -18,7 +18,7 @@
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
if (item.UserID.ToString() == Session[GlobalVars.SESSION_USERID].ToString() || Session[GlobalVars.IS_ADMIN] != null)
|
||||
if (item.UserID.ToString() == GlobalVars.GetUserIdValue(Session) || GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -137,7 +137,7 @@
|
||||
<td>
|
||||
@Html.ActionLink("View", "ViewTrainingAssignments", new { trainingID = item.TrainingID }, new { @class = "btn btn-primary" })
|
||||
</td>
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN] == true)
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
<td>
|
||||
@Html.ActionLink("Delete", "DeleteTrainingByID", new { trainingId = item.TrainingID }, new { @class = "btn btn-primary" })
|
||||
|
Reference in New Issue
Block a user