Added PCRB controller for my task links

This commit is contained in:
Chase Tucker 2025-01-15 14:54:22 -07:00
parent 1b22ffa439
commit 77f45fabb1
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,22 @@
using System;
using System.Web.Mvc;
using Fab2ApprovalSystem.Misc;
namespace Fab2ApprovalSystem.Controllers;
[Authorize]
[SessionExpireFilter]
public class PCRBController : Controller {
public ActionResult Edit(int issueID) {
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}";
return Redirect(mrbUrl);
}
}

View File

@ -179,7 +179,7 @@
<LastGenOutput>FabApproval.Designer.cs</LastGenOutput>
</EntityDeploy>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="Models\FabApproval.Context.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@ -255,6 +255,7 @@
<Compile Include="Controllers\TrainingController.cs" />
<Compile Include="Controllers\WebAPIController.cs" />
<Compile Include="Controllers\WorkflowController.cs" />
<Compile Include="Controllers\PCRBController.cs" />
<Compile Include="DMO\AccountDMO.cs" />
<Compile Include="DMO\AdminDMO.cs" />
<Compile Include="DMO\ApprovalLogDMO.cs" />