Merged PR 34240: Updates to PCR3 document section
Updates to PCR3 document section
This commit is contained in:
@ -48,60 +48,27 @@ public class ChangeControlController : Controller {
|
||||
}
|
||||
|
||||
public ActionResult Edit(int issueID) {
|
||||
int isITARCompliant = 1;
|
||||
ChangeControlViewModel cc = new ChangeControlViewModel();
|
||||
cc = ccDMO.GetChangeControlRead(issueID, out isITARCompliant, (int)Session[GlobalVars.SESSION_USERID]);
|
||||
string jwt = Session["JWT"].ToString();
|
||||
string encodedJwt = System.Net.WebUtility.UrlEncode(jwt);
|
||||
string refreshToken = Session["RefreshToken"].ToString();
|
||||
string encodedRefreshToken = System.Net.WebUtility.UrlEncode(refreshToken);
|
||||
string wasmClientUrl = Environment.GetEnvironmentVariable("FabApprovalWasmClientUrl") ??
|
||||
"https://localhost:7255";
|
||||
string mrbUrl = $"{wasmClientUrl}/redirect?jwt={encodedJwt}&refreshToken={encodedRefreshToken}&redirectPath=/pcrb/{issueID}";
|
||||
|
||||
List<ApproversListViewModel> userList = MiscDMO.GetApproversListByDocument(cc.PlanNumber, cc.CurrentStep, (int)GlobalVars.DocumentType.ChangeControl);
|
||||
ApproversListViewModel appUser = userList.Find(delegate (ApproversListViewModel al) { return al.UserID == (int)Session[GlobalVars.SESSION_USERID]; });
|
||||
if (appUser != null) {
|
||||
ViewBag.IsApprover = "true";
|
||||
}
|
||||
// TODO locked functionality
|
||||
|
||||
if (isITARCompliant == 0) // not ITAR Compliant
|
||||
{
|
||||
return View("UnAuthorizedAccess");
|
||||
} else {
|
||||
if ((int)Session[GlobalVars.SESSION_USERID] == cc.OwnerID)
|
||||
ViewBag.IsOriginator = "true";
|
||||
else
|
||||
ViewBag.IsOriginator = "false";
|
||||
|
||||
if ((cc.RecordLockIndicator && cc.RecordLockedBy != (int)Session[GlobalVars.SESSION_USERID]) ||
|
||||
cc.ClosedDate != null) {
|
||||
return RedirectToAction("ReadOnlyCC", new { issueID = issueID });
|
||||
} else {
|
||||
cc = ccDMO.GetChangeControl(issueID, out isITARCompliant, (int)Session[GlobalVars.SESSION_USERID]);
|
||||
ViewBag.Attendees = ccDMO.GetUsers();
|
||||
ViewBag.Generations = ccDMO.GetGenerations();
|
||||
ViewBag.PartNumbers = ccDMO.GetPartNumbers();
|
||||
ViewBag.Processes = ccDMO.GetProcesses();
|
||||
ViewBag.Logistics = ccDMO.GetLogistics();
|
||||
ViewBag.AIResponsibles = ccDMO.GetActionItemResponsible();
|
||||
ViewBag.Sites = ccDMO.GetSites();
|
||||
return View(cc);
|
||||
}
|
||||
}
|
||||
return Redirect(mrbUrl);
|
||||
}
|
||||
|
||||
public ActionResult ReadOnlyCC(int issueID) {
|
||||
int isITARCompliant = 1;
|
||||
ChangeControlViewModel cc = new ChangeControlViewModel();
|
||||
cc = ccDMO.GetChangeControlRead(issueID, out isITARCompliant, (int)Session[GlobalVars.SESSION_USERID]);
|
||||
// TODO locked functionality
|
||||
string jwt = Session["JWT"].ToString();
|
||||
string encodedJwt = System.Net.WebUtility.UrlEncode(jwt);
|
||||
string refreshToken = Session["RefreshToken"].ToString();
|
||||
string encodedRefreshToken = System.Net.WebUtility.UrlEncode(refreshToken);
|
||||
string wasmClientUrl = Environment.GetEnvironmentVariable("FabApprovalWasmClientUrl") ??
|
||||
"https://localhost:7255";
|
||||
string mrbUrl = $"{wasmClientUrl}/redirect?jwt={encodedJwt}&refreshToken={encodedRefreshToken}&redirectPath=/pcrb/{issueID}";
|
||||
|
||||
if (isITARCompliant == 0) // not ITAR Compliant
|
||||
{
|
||||
return View("UnAuthorizedAccess");
|
||||
} else {
|
||||
ViewBag.MeetingList = ccDMO.GetMeetingList(issueID);
|
||||
ViewBag.Generations = ccDMO.GetGenerations();
|
||||
ViewBag.PartNumbers = ccDMO.GetPartNumbers();
|
||||
ViewBag.Processes = ccDMO.GetProcesses();
|
||||
ViewBag.Logistics = ccDMO.GetLogistics();
|
||||
return View(cc);
|
||||
}
|
||||
return Redirect(mrbUrl);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
@ -92,15 +92,15 @@
|
||||
"https://localhost:7255";
|
||||
string mrbUrl = wasmClientUrl + "/redirect?jwt=" + encodedJwt + "&refreshToken=" + encodedRefreshToken + "&redirectPath=/mrb/new";
|
||||
<li><a href="@mrbUrl">Create MRB</a></li>
|
||||
@*string pcrbUrl = wasmClientUrl + "/redirect?jwt=" + encodedJwt + "&refreshToken=" + encodedRefreshToken + "&redirectPath=/pcrb/new";
|
||||
<li><a href="@pcrbUrl">Create PCRB</a></li>*@
|
||||
string pcrbUrl = wasmClientUrl + "/redirect?jwt=" + encodedJwt + "&refreshToken=" + encodedRefreshToken + "&redirectPath=/pcrb/new";
|
||||
<li><a href="@pcrbUrl">Create PCRB</a></li>
|
||||
} else {
|
||||
string wasmClientUrl = Environment.GetEnvironmentVariable("FabApprovalWasmClientUrl") ??
|
||||
"https://localhost:7255";
|
||||
string mrbUrl = wasmClientUrl + "/redirect?redirectPath=/mrb/new";
|
||||
<li><a href="@mrbUrl">Create MRB</a></li>
|
||||
@*string pcrbUrl = wasmClientUrl + "/redirect?redirectPath=/pcrb/new";
|
||||
<li><a href="@pcrbUrl">Create PCRB</a></li>*@
|
||||
string pcrbUrl = wasmClientUrl + "/redirect?redirectPath=/pcrb/new";
|
||||
<li><a href="@pcrbUrl">Create PCRB</a></li>
|
||||
}
|
||||
@*<li><a href=@Url.Action("CreateWorkRequest", "LotTraveler")>Create Special Work Request</a></li>*@
|
||||
@*<li><a href=@Url.Action("Create", "ChangeControl")>Create PCR</a></li>*@
|
||||
@ -152,8 +152,8 @@
|
||||
"https://localhost:7255";
|
||||
string mrbUrl = wasmClientUrl + "/redirect?jwt=" + encodedJwt + "&refreshToken=" + encodedRefreshToken + "&redirectPath=/mrb/all";
|
||||
menu.Add().Text("MRB").Url(mrbUrl);
|
||||
//string pcrbUrl = wasmClientUrl + "/redirect?jwt=" + encodedJwt + "&refreshToken=" + encodedRefreshToken + "&redirectPath=/pcrb/all";
|
||||
//menu.Add().Text("PCRB").Url(pcrbUrl);
|
||||
string pcrbUrl = wasmClientUrl + "/redirect?jwt=" + encodedJwt + "&refreshToken=" + encodedRefreshToken + "&redirectPath=/pcrb/all";
|
||||
menu.Add().Text("PCRB").Url(pcrbUrl);
|
||||
//menu.Add().Text("Special Work Requests").Action("SpecialWorkRequestList", "Home");
|
||||
//menu.Add().Text("PCRB").Action("ChangeControlList", "Home");
|
||||
//menu.Add().Text("MRB").Action("MRBList", "Home");
|
||||
|
Reference in New Issue
Block a user