Compare commits
6 Commits
origin/Pro
...
feature-13
Author | SHA1 | Date | |
---|---|---|---|
e020ec8c01 | |||
e68a1a4c3b | |||
7ddda56987 | |||
77f45fabb1 | |||
1b22ffa439 | |||
123bbdb9fe |
12
Fab2ApprovalMKLink/.vscode/mklink.md
vendored
12
Fab2ApprovalMKLink/.vscode/mklink.md
vendored
@ -35,3 +35,15 @@ mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\PdfGenerator" "L
|
||||
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Jobs" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Jobs"
|
||||
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\JobSchedules" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\JobSchedules"
|
||||
```
|
||||
|
||||
```bash 1734015544321 = 638696123443210000 = Thu Dec 12 2024 07:59:03 GMT-0700 (Mountain Standard Time)
|
||||
mklink /J ".vscode\.UserSecrets" "%AppData%\Microsoft\UserSecrets\f2da5035-aba9-4676-9f8d-d6689f84663d"
|
||||
mklink /J "DMO" "..\Fab2ApprovalSystem\DMO"
|
||||
mklink /J "Jobs" "..\Fab2ApprovalSystem\Jobs"
|
||||
mklink /J "JobSchedules" "..\Fab2ApprovalSystem\JobSchedules"
|
||||
mklink /J "Misc" "..\Fab2ApprovalSystem\Misc"
|
||||
mklink /J "Models" "..\Fab2ApprovalSystem\Models"
|
||||
mklink /J "PdfGenerator" "..\Fab2ApprovalSystem\PdfGenerator"
|
||||
mklink /J "Utilities" "..\Fab2ApprovalSystem\Utilities"
|
||||
mklink /J "ViewModels" "..\Fab2ApprovalSystem\ViewModels"
|
||||
```
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*vertical height between form-groups*/
|
||||
.my-form .form-group {
|
||||
/*vertical height between form-groups*/
|
||||
.my-form .form-group {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width:768px) {
|
||||
@media (min-width:768px) {
|
||||
.my-form .row {
|
||||
margin-left: -1px;
|
||||
margin-right: -1px;
|
||||
@ -12,7 +12,8 @@
|
||||
.my-form [class*="col-"] {
|
||||
padding: 0 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
@ -29,10 +30,10 @@ body {
|
||||
/*input,
|
||||
select
|
||||
{
|
||||
max-width: 280px;
|
||||
max-width: 280px;
|
||||
}*/
|
||||
|
||||
.row{
|
||||
.row {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px
|
||||
}
|
||||
@ -71,10 +72,10 @@ input[type="checkbox"].input-validation-error {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
background-color: #87b3de;
|
||||
background-image: -moz-linear-gradient(top,#87b3de, #4d79a5);
|
||||
background-image: -ms-linear-gradient(top,#87b3de, #4d79a5);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 50%, from( #87b3de), to(#4d79a5));
|
||||
background-image: -webkit-linear-gradient(top,#87b3de, #4d79a5);
|
||||
background-image: -moz-linear-gradient(top, #87b3de, #4d79a5);
|
||||
background-image: -ms-linear-gradient(top, #87b3de, #4d79a5);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 50%, from(#87b3de), to(#4d79a5));
|
||||
background-image: -webkit-linear-gradient(top, #87b3de, #4d79a5);
|
||||
background-image: -o-linear-gradient(top, #87b3de, #4d79a5);
|
||||
background-image: linear-gradient(top, #87b3de, #4d79a5);
|
||||
background-repeat: repeat-x;
|
||||
@ -89,7 +90,7 @@ input[type="checkbox"].input-validation-error {
|
||||
|
||||
.label-color {
|
||||
background-color: #e5e0e0;
|
||||
}
|
||||
}
|
||||
|
||||
.linkbutton {
|
||||
display: inline-block;
|
||||
@ -101,6 +102,17 @@ input[type="checkbox"].input-validation-error {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.linkbutton.edit {
|
||||
background: url('/Content/icons/edit.gif');
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
margin-top: 80px;
|
||||
}
|
||||
|
||||
.affix {
|
||||
position: fixed;
|
||||
top: 55px;
|
||||
left: 25px;
|
||||
}
|
@ -24,12 +24,9 @@ namespace Fab2ApprovalSystem.Controllers;
|
||||
|
||||
[Authorize]
|
||||
public class AccountController : Controller {
|
||||
private string _apiBaseUrl;
|
||||
|
||||
public AccountController()
|
||||
: this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()))) {
|
||||
_apiBaseUrl = Environment.GetEnvironmentVariable("FabApprovalApiBaseUrl") ??
|
||||
throw new ArgumentNullException("FabApprovalApiBaseUrl environment variable not found");
|
||||
}
|
||||
|
||||
public AccountController(UserManager<ApplicationUser> userManager) {
|
||||
@ -69,7 +66,7 @@ public class AccountController : Controller {
|
||||
bool isLoginValid;
|
||||
|
||||
HttpClient httpClient = HttpClientFactory.Create();
|
||||
httpClient.BaseAddress = new Uri(_apiBaseUrl);
|
||||
httpClient.BaseAddress = new Uri(GlobalVars.AppSettings.ApiBaseUrl);
|
||||
|
||||
LoginResult loginResult = await AccountDMO.LoginAsync(httpClient, model);
|
||||
|
||||
@ -121,7 +118,7 @@ public class AccountController : Controller {
|
||||
bool isLoginValid;
|
||||
|
||||
HttpClient httpClient = HttpClientFactory.Create();
|
||||
httpClient.BaseAddress = new Uri(_apiBaseUrl);
|
||||
httpClient.BaseAddress = new Uri(GlobalVars.AppSettings.ApiBaseUrl);
|
||||
|
||||
LoginResult loginResult = await AccountDMO.ExternalAuthSetupAsync(httpClient, authAttempt);
|
||||
|
||||
|
@ -48,60 +48,23 @@ 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 mrbUrl = $"{GlobalVars.AppSettings.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 mrbUrl = $"{GlobalVars.AppSettings.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]
|
||||
|
@ -953,8 +953,7 @@ public class ECNController : PdfViewController {
|
||||
} catch { }
|
||||
}
|
||||
|
||||
public void NotifyApproversForCancellation(int ecnNumber, byte currentStep, int documentType, string ecnTypeString) {
|
||||
ECN ecn = ecnDMO.GetECN(ecnNumber);
|
||||
public void NotifyApproversForCancellation(int ecnNumber, ECN ecn, byte currentStep, int documentType, string ecnTypeString) {
|
||||
string emailSentList = ECNHelper.NotifyApproversForCancellation(_AppSettings, ecnNumber, currentStep, documentType, ecnTypeString, ecn);
|
||||
try {
|
||||
EventLogDMO.Add(new WinEventLog() { IssueID = ecnNumber, UserID = @User.Identity.Name, DocumentType = ecnTypeString, OperationType = "Email", Comments = "Approvers for Step " + currentStep.ToString() + ":" + emailSentList });
|
||||
@ -977,10 +976,10 @@ public class ECNController : PdfViewController {
|
||||
} catch { }
|
||||
}
|
||||
|
||||
public void NotifyTECNCancellation(int ecnNumber, string ecnFolderPath) {
|
||||
public void NotifyTECNCancellation(int ecnNumber, string ecnFolderPath, string comments) {
|
||||
ECN ecn = ecnDMO.GetECN(ecnNumber);
|
||||
List<int> notificationUserList = ecnDMO.GetTECNNotificationUsers().ToList();
|
||||
string emailSentList = ECNHelper.NotifyTECNCancellation(_AppSettings, userDMO, ecnNumber, ecnFolderPath, ecn, notificationUserList);
|
||||
string emailSentList = ECNHelper.NotifyTECNCancellation(_AppSettings, userDMO, ecnNumber, ecnFolderPath, comments, ecn, notificationUserList);
|
||||
try {
|
||||
EventLogDMO.Add(new WinEventLog() { IssueID = ecnNumber, UserID = @User.Identity.Name, DocumentType = "E-TECN", OperationType = "Email", Comments = "Approvers for Cancellation :" + emailSentList });
|
||||
} catch { }
|
||||
@ -1157,22 +1156,24 @@ public class ECNController : PdfViewController {
|
||||
return Content(ecnDMO.PCRBExists(pcrb).ToString());
|
||||
}
|
||||
|
||||
public ActionResult CancelDocument(int ecnNumber, byte currentStep, int documentType, string ecnTypeString) {
|
||||
public ActionResult CancelDocument(int ecnNumber, byte currentStep, int documentType, string ecnTypeString, string comments = "") {
|
||||
ECN ecn = ecnDMO.GetECN(ecnNumber);
|
||||
bool lastApproverAndLastStep = false;
|
||||
if (ecn.IsTECN && ecn.SubmitedDate is not null && currentStep >= 1)
|
||||
Approve(ecnNumber, currentStep, comments, documentType, ecnTypeString);
|
||||
int appoverCount = ecnDMO.SubmitForCancellation(ecnNumber, (byte)GlobalVars.WorkFLowStepNumber.Step1, (int)Session[GlobalVars.SESSION_USERID], documentType, ecnTypeString, (int)GlobalVars.TECNExpirationCancellation.Cancellation);
|
||||
if (appoverCount > 0) {
|
||||
NotifyApproversForCancellation(ecnNumber, currentStep, documentType, ecnTypeString);
|
||||
} else // TODO Automatically close the
|
||||
{
|
||||
lastApproverAndLastStep = ApproveCancellation(ecnNumber, currentStep, "", documentType, ecnTypeString);
|
||||
NotifyApproversForCancellation(ecnNumber, ecn, currentStep, documentType, ecnTypeString);
|
||||
} else { // TODO Automatically close the
|
||||
lastApproverAndLastStep = ApproveCancellation(ecnNumber, currentStep, comments, documentType, ecnTypeString);
|
||||
}
|
||||
|
||||
if (!lastApproverAndLastStep) {
|
||||
try {
|
||||
lastApproverAndLastStep = true;
|
||||
|
||||
ECNPdf ecn = new ECNPdf();
|
||||
GenerateECNPdf(ecnNumber, out ecn);
|
||||
ECNPdf ecnPDF = new ECNPdf();
|
||||
GenerateECNPdf(ecnNumber, out ecnPDF);
|
||||
|
||||
string sourceDirectory = _AppSettings.AttachmentFolder + "ECN\\" + ecnNumber.ToString() + "\\";
|
||||
string outputFullFilePath = "";
|
||||
@ -1184,7 +1185,7 @@ public class ECNController : PdfViewController {
|
||||
|
||||
Zipper zip = new Zipper();
|
||||
zip.CreateZip(outputFullFilePath, sourceDirectory);
|
||||
NotifyTECNCancellation(ecnNumber, outputFullFilePath);
|
||||
NotifyTECNCancellation(ecnNumber, outputFullFilePath, comments);
|
||||
|
||||
} catch (Exception ex) {
|
||||
EventLogDMO.Add(new WinEventLog() { IssueID = ecnNumber, UserID = @User.Identity.Name, DocumentType = "TECN", OperationType = "Error", Comments = ex.Message });
|
||||
@ -1208,19 +1209,20 @@ public class ECNController : PdfViewController {
|
||||
public bool ApproveCancellation(int ecnNumber, byte currentStep, string comments, int documentType, string ecnTypeString) {
|
||||
bool lastApproverAndLastStep = false;
|
||||
bool lastStep = false;
|
||||
ECN ecn = ecnDMO.GetECN(ecnNumber);
|
||||
bool lastApprover = ecnDMO.ECNApproveCancelled_ExpiredDocument(ecnNumber, currentStep, comments, out lastStep, (int)Session[GlobalVars.SESSION_USERID], documentType);
|
||||
while (lastApprover && !lastStep) {
|
||||
currentStep++;
|
||||
lastApprover = ecnDMO.ECNApproveCancelled_ExpiredDocument(ecnNumber, currentStep, comments, out lastStep, (int)Session[GlobalVars.SESSION_USERID], documentType);
|
||||
NotifyApproversForCancellation(ecnNumber, currentStep, documentType, ecnTypeString);
|
||||
NotifyApproversForCancellation(ecnNumber, ecn, currentStep, documentType, ecnTypeString);
|
||||
}
|
||||
|
||||
if (lastApprover && lastStep) {
|
||||
try {
|
||||
lastApproverAndLastStep = true;
|
||||
|
||||
ECNPdf ecn = new ECNPdf();
|
||||
GenerateECNPdf(ecnNumber, out ecn);
|
||||
ECNPdf ecnPDF = new ECNPdf();
|
||||
GenerateECNPdf(ecnNumber, out ecnPDF);
|
||||
|
||||
string sourceDirectory = _AppSettings.AttachmentFolder + "ECN\\" + ecnNumber.ToString() + "\\";
|
||||
string outputFullFilePath = "";
|
||||
@ -1232,7 +1234,7 @@ public class ECNController : PdfViewController {
|
||||
|
||||
Zipper zip = new Zipper();
|
||||
zip.CreateZip(outputFullFilePath, sourceDirectory);
|
||||
NotifyTECNCancellation(ecnNumber, outputFullFilePath);
|
||||
NotifyTECNCancellation(ecnNumber, outputFullFilePath, comments);
|
||||
|
||||
} catch (Exception ex) {
|
||||
EventLogDMO.Add(new WinEventLog() { IssueID = ecnNumber, UserID = @User.Identity.Name, DocumentType = "TECN", OperationType = "Error", Comments = ex.Message });
|
||||
|
@ -79,9 +79,7 @@ public class MRBController : Controller {
|
||||
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=/mrb/{issueID}";
|
||||
string mrbUrl = $"{GlobalVars.AppSettings.WasmClientUrl}/redirect?jwt={encodedJwt}&refreshToken={encodedRefreshToken}&redirectPath=/mrb/{issueID}";
|
||||
|
||||
return Redirect(mrbUrl);
|
||||
}
|
||||
@ -104,9 +102,7 @@ public class MRBController : Controller {
|
||||
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=/mrb/{issueID}";
|
||||
string mrbUrl = $"{GlobalVars.AppSettings.WasmClientUrl}/redirect?jwt={encodedJwt}&refreshToken={encodedRefreshToken}&redirectPath=/mrb/{issueID}";
|
||||
|
||||
return Redirect(mrbUrl);
|
||||
}
|
||||
|
20
Fab2ApprovalSystem/Controllers/PCRBController.cs
Normal file
20
Fab2ApprovalSystem/Controllers/PCRBController.cs
Normal file
@ -0,0 +1,20 @@
|
||||
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 mrbUrl = $"{GlobalVars.AppSettings.WasmClientUrl}/redirect?jwt={encodedJwt}&refreshToken={encodedRefreshToken}&redirectPath=/pcrb/{issueID}";
|
||||
|
||||
return Redirect(mrbUrl);
|
||||
}
|
||||
}
|
@ -90,6 +90,7 @@ public class CorrectiveActionDMO {
|
||||
parameters.Add("@EscapePoint", model.EscapePoint);
|
||||
parameters.Add("@FollowUpDate", model.FollowUpDate);
|
||||
parameters.Add("@CASubmitted", model.CASubmitted);
|
||||
parameters.Add("@CAStandardType", model.CAStandardType);
|
||||
|
||||
db.Execute("_8DUpdateCorrectiveAction", parameters, commandType: CommandType.StoredProcedure);
|
||||
EventLogDMO.Add(new WinEventLog { UserID = "System", Comments = "Saved Corrective Action", DocumentType = "9", IssueID = model.CANo, OperationType = "Status", SysDocumentID = 1 });
|
||||
|
@ -15,6 +15,7 @@ using Fab2ApprovalSystem.ViewModels;
|
||||
namespace Fab2ApprovalSystem.DMO;
|
||||
|
||||
public class ECN_DMO {
|
||||
|
||||
private readonly IDbConnection db = new SqlConnection(GlobalVars.DB_CONNECTION_STRING);
|
||||
private readonly WorkflowDMO wfDMO = new();
|
||||
|
||||
@ -367,7 +368,7 @@ public class ECN_DMO {
|
||||
return ecnItem;
|
||||
}
|
||||
|
||||
internal ECN GetECN(int ecnNumber) {
|
||||
public ECN GetECN(int ecnNumber) {
|
||||
ECN ecnItem = new();
|
||||
DynamicParameters parameters = new();
|
||||
parameters.Add("@ECNNumber", value: ecnNumber);
|
||||
|
@ -6,6 +6,8 @@ Please review the cancelled TECN form in the attachment.
|
||||
<br/><br/>
|
||||
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||
<br/><br/>
|
||||
Comments: {5}
|
||||
<br/><br/>
|
||||
|
||||
If you have any questions or trouble logging on please contact a site administrator.
|
||||
<br/><br/>
|
||||
|
17
Fab2ApprovalSystem/EmailTemplates/TECNReturnedToProcess.txt
Normal file
17
Fab2ApprovalSystem/EmailTemplates/TECNReturnedToProcess.txt
Normal file
@ -0,0 +1,17 @@
|
||||
<font size="2" face="verdana">
|
||||
*****Please DO NOT reply to this email*****
|
||||
<br/><br/>
|
||||
{3}# {0} has been returned to process. Please remove posted TECN from point of use. The returned to process date is {4}
|
||||
Please review the returned to process TECN form in the attachment.
|
||||
<br/><br/>
|
||||
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||
<br/><br/>
|
||||
Comments: {5}
|
||||
<br/><br/>
|
||||
|
||||
If you have any questions or trouble logging on please contact a site administrator.
|
||||
<br/><br/>
|
||||
Thank you!
|
||||
|
||||
|
||||
</font>
|
@ -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" />
|
||||
@ -387,8 +388,10 @@
|
||||
<Content Include="Views\CorrectiveAction\_D7PAAttachment.cshtml" />
|
||||
<Content Include="Views\CorrectiveAction\Edit.cshtml" />
|
||||
<Content Include="Views\CorrectiveAction\ReadOnlyCA.cshtml" />
|
||||
<Content Include="Views\ECN\_ECNCancel.cshtml" />
|
||||
<Content Include="Views\ECN\_ECNLayout.cshtml" />
|
||||
<Content Include="Views\ECN\_ECNReassignOriginator.cshtml" />
|
||||
<Content Include="Views\ECN\_ECNReturnToProcess.cshtml" />
|
||||
<Content Include="Views\ECN\Acknowledge.cshtml" />
|
||||
<Content Include="Views\ECN\ECNApprovalPdf.cshtml" />
|
||||
<Content Include="Views\ECN\ECNPdf.cshtml" />
|
||||
@ -513,6 +516,7 @@
|
||||
<Content Include="EmailTemplates\TECNExpirationApproval.txt" />
|
||||
<Content Include="EmailTemplates\TECNExpired.txt" />
|
||||
<Content Include="EmailTemplates\TECNExtensionReject.txt" />
|
||||
<Content Include="EmailTemplates\TECNReturnedToProcess.txt" />
|
||||
<Content Include="EmailTemplates\WorkRequestApproval.txt" />
|
||||
<Content Include="EmailTemplates\WorkRequestAssigned.txt" />
|
||||
<Content Include="EmailTemplates\WorkRequestReAssigned.txt" />
|
||||
|
@ -126,7 +126,7 @@ public class ECNHelper {
|
||||
return emailSentList;
|
||||
}
|
||||
|
||||
public static string NotifyTECNCancellation(AppSettings appSettings, UserAccountDMO userDMO, int ecnNumber, string ecnFolderPath, ECN ecn, List<int> notificationUserList) {
|
||||
public static string NotifyTECNCancellation(AppSettings appSettings, UserAccountDMO userDMO, int ecnNumber, string ecnFolderPath, string comments, ECN ecn, List<int> notificationUserList) {
|
||||
string emailSentList = "";
|
||||
List<string> emailIst = MiscDMO.GetTECNCancelledApprovalNotifyList(ecnNumber).Distinct().ToList();
|
||||
foreach (int userId in notificationUserList) {
|
||||
@ -135,23 +135,27 @@ public class ECNHelper {
|
||||
emailIst.Add(email);
|
||||
}
|
||||
|
||||
string subject = string.Empty;
|
||||
string userEmail = string.Empty;
|
||||
string emailTemplate = "TECNCancelled.txt";
|
||||
if (ecn.CancellationApprovalDate == null) {
|
||||
subject = "TECN Cancellation Initiated Notice - " + ecnNumber + " for " + ecn.Title + ", Cancellation Initiated on:" + DateTime.Now;
|
||||
} else {
|
||||
subject = "TECN Cancellation Approved Notice - " + ecnNumber + " for " + ecn.Title + ", Cancelled:" + ecn.CancellationApprovalDate;
|
||||
}
|
||||
string subject;
|
||||
string emailTemplate;
|
||||
string senderName = "ECN";
|
||||
string userEmail = string.Empty;
|
||||
DateTime dateTime = ecn.CancellationApprovalDate is null ? DateTime.Now : ecn.CancellationApprovalDate.Value;
|
||||
if (ecn.ExpirationDate > DateTime.Today || ecn.ExtensionDate > DateTime.Today) {
|
||||
emailTemplate = "TECNCancelled.txt";
|
||||
subject = "TECN Cancellation Approved Notice - " + ecnNumber + " for " + ecn.Title + ", Cancelled:" + dateTime;
|
||||
} else {
|
||||
emailTemplate = "TECNReturnedToProcess.txt";
|
||||
subject = "TECN Return to Process Approved Notice - " + ecnNumber + " for " + ecn.Title + ", Returned:" + dateTime;
|
||||
}
|
||||
|
||||
EmailNotification en = new(appSettings, subject);
|
||||
string[] emailparams = new string[5];
|
||||
string[] emailparams = new string[6];
|
||||
emailparams[0] = ecnNumber.ToString();
|
||||
emailparams[1] = ecnNumber.ToString();
|
||||
emailparams[2] = GlobalVars.hostURL;
|
||||
emailparams[3] = "TECN";
|
||||
emailparams[4] = DateTime.Now.ToString();
|
||||
emailparams[5] = comments;
|
||||
|
||||
#if (DEBUG)
|
||||
userEmail = GlobalVars.SENDER_EMAIL;
|
||||
|
@ -8,7 +8,7 @@ namespace Fab2ApprovalSystem.Models;
|
||||
public class AppSettings {
|
||||
|
||||
public AppSettings(string adminNotificationRecepient,
|
||||
string? apiBaseUrl,
|
||||
string apiBaseUrl,
|
||||
string attachmentFolder,
|
||||
string? attachmentUrl,
|
||||
string caBlankFormsLocation,
|
||||
@ -46,6 +46,7 @@ public class AppSettings {
|
||||
string urls,
|
||||
int userId,
|
||||
bool userIsAdmin,
|
||||
string wasmClientUrl,
|
||||
string wsr_URL,
|
||||
string? workingDirectoryName) {
|
||||
AdminNotificationRecepient = adminNotificationRecepient;
|
||||
@ -88,11 +89,12 @@ public class AppSettings {
|
||||
UserId = userId;
|
||||
UserIsAdmin = userIsAdmin;
|
||||
WSR_URL = wsr_URL;
|
||||
WasmClientUrl = wasmClientUrl;
|
||||
WorkingDirectoryName = workingDirectoryName;
|
||||
}
|
||||
|
||||
public string AdminNotificationRecepient { get; }
|
||||
public string? ApiBaseUrl { get; }
|
||||
public string ApiBaseUrl { get; }
|
||||
public string AttachmentFolder { get; }
|
||||
public string? AttachmentUrl { get; }
|
||||
public string CABlankFormsLocation { get; }
|
||||
@ -130,6 +132,7 @@ public class AppSettings {
|
||||
public string URLs { get; }
|
||||
public int UserId { get; }
|
||||
public bool UserIsAdmin { get; }
|
||||
public string WasmClientUrl { get; }
|
||||
public string WSR_URL { get; }
|
||||
public string? WorkingDirectoryName { get; }
|
||||
|
||||
@ -211,12 +214,15 @@ public class AppSettings {
|
||||
throw new ArgumentNullException("SSRSPassword environment variable not found");
|
||||
string testEmailRecipients = ConfigurationManager.AppSettings["Test Email Recipients"] ??
|
||||
throw new ArgumentNullException("Test Email Recipients environment variable not found");
|
||||
string? apiBaseUrl = ConfigurationManager.AppSettings["FabApprovalApiBaseUrl"]?.ToString();
|
||||
string apiBaseUrl = Environment.GetEnvironmentVariable("FabApprovalApiBaseUrl") ??
|
||||
throw new ArgumentNullException("FabApprovalApiBaseUrl environment variable not found");
|
||||
string? attachmentUrl = ConfigurationManager.AppSettings["AttachmentUrl"]?.ToString();
|
||||
string? company = ConfigurationManager.AppSettings["Company"]?.ToString();
|
||||
string? smtpServer = ConfigurationManager.AppSettings["SMTP Server"]?.ToString();
|
||||
string? urls = ConfigurationManager.AppSettings["URLs"]?.ToString();
|
||||
string? workingDirectoryName = ConfigurationManager.AppSettings["WorkingDirectoryName"]?.ToString();
|
||||
string wasmClientUrl = Environment.GetEnvironmentVariable("FabApprovalWasmClientUrl") ??
|
||||
"https://localhost:7255";
|
||||
result = new(adminNotificationRecepient: adminNotificationRecepient,
|
||||
apiBaseUrl: apiBaseUrl,
|
||||
attachmentFolder: attachmentFolder,
|
||||
@ -256,6 +262,7 @@ public class AppSettings {
|
||||
urls: urls,
|
||||
userId: userId,
|
||||
userIsAdmin: Misc.GlobalVars.USER_ISADMIN,
|
||||
wasmClientUrl: wasmClientUrl,
|
||||
wsr_URL: Misc.GlobalVars.WSR_URL,
|
||||
workingDirectoryName: workingDirectoryName);
|
||||
return result;
|
||||
|
@ -231,6 +231,7 @@ public class CorrectiveAction {
|
||||
public DateTime? NextDueDate { get; set; }
|
||||
public DateTime? FollowUpDate { get; set; }
|
||||
public bool CASubmitted { get; set; }
|
||||
public string CAStandardType { get; set; }
|
||||
public DateTime? ClosedDate { get; set; }
|
||||
public CorrectiveAction() {
|
||||
TeamMemberIDs = new List<int>();
|
||||
|
@ -380,6 +380,43 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">CA Standard Type:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("CAStandardTypeList")
|
||||
|
||||
.DataTextField("Text")
|
||||
.DataValueField("Value")
|
||||
.BindTo(new List<SelectListItem>()
|
||||
{
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "IATF16949",
|
||||
Value = "IATF16949"
|
||||
},
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "ISO14001",
|
||||
Value = "ISO14001"
|
||||
},
|
||||
new SelectListItem()
|
||||
{
|
||||
Text = "ISO45001",
|
||||
Value = "ISO45001"
|
||||
}
|
||||
}
|
||||
)
|
||||
.OptionLabel("Select")
|
||||
.Value(Model.CAStandardType)
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
@ -2176,6 +2213,7 @@
|
||||
$('#txtApprovedDate').attr("disabled", true);
|
||||
$('#txtRelatedMRB').attr("disabled", true);
|
||||
$('#CATypeList').data("kendoDropDownList").enable(false);
|
||||
$('#CAStandardTypeList').data("kendoDropDownList").enable(false);
|
||||
$('#d0Comments').attr("disabled", true);
|
||||
}
|
||||
|
||||
@ -3689,6 +3727,7 @@
|
||||
TeamCaptainID: $("#TeamCaptainList").data("kendoDropDownList").value(),
|
||||
CASponsorID: $("#CASponsorList").data("kendoDropDownList").value(),
|
||||
CASubmitted: isCASubmitted,
|
||||
CAStandardType : $("#CAStandardTypeList").data("kendoDropDownList").value(),
|
||||
|
||||
//D0
|
||||
D0Comments : $("#d0Comments").val(),
|
||||
|
@ -325,6 +325,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label pull-right">CA Standard Type:</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
@Html.TextBoxFor(model => model.CAStandardType, new { id = "txtCAStandardType", @class = "k-textbox", Readonly = "Readonly", style = "background-color:lightblue" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
|
@ -86,30 +86,48 @@
|
||||
|
||||
if (Model.IsTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress
|
||||
&& !Model.ExpirationProcessed && !Model.Converted
|
||||
&& !Model.LockedForConversion
|
||||
&& (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today))
|
||||
&& !Model.LockedForConversion)
|
||||
{
|
||||
ViewBag.CanResubmit = "true";
|
||||
<input type="button" value="Change Type" class="btn btn-primary btn-xs" id="ReSubmitDocument" disabled="disabled" />
|
||||
if (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today)
|
||||
{
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="button" value="Return to Process" class="btn btn-primary btn-xs" id="ReturnToProcessDocument" />
|
||||
}
|
||||
}
|
||||
|
||||
else if (Model.IsTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress
|
||||
&& !Model.ExpirationProcessed
|
||||
&& Model.ConversionApprovalInProgress == false
|
||||
&& (Model.ExpirationDate >= DateTime.Today || Model.ExtensionDate >= DateTime.Today))
|
||||
&& Model.ConversionApprovalInProgress == false)
|
||||
{
|
||||
if (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today)
|
||||
{
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="button" value="Return to Process" class="btn btn-primary btn-xs" id="ReturnToProcessDocument" />
|
||||
}
|
||||
}
|
||||
|
||||
else if (Model.IsEmergencyTECN && !Model.CancellationInProgress && !Model.CancellationApproved && !Model.ExpirationInProgress
|
||||
&& !Model.ExpirationProcessed && !Model.Converted
|
||||
&& (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today))
|
||||
&& !Model.ExpirationProcessed && !Model.Converted)
|
||||
{
|
||||
ViewBag.CanResubmit = "true";
|
||||
<input type="button" value="Change Type" class="btn btn-primary btn-xs" id="ReSubmitDocument" disabled="disabled" />
|
||||
if (Model.ExpirationDate > DateTime.Today || Model.ExtensionDate > DateTime.Today)
|
||||
{
|
||||
<input type="button" value="Cancel Document" class="btn btn-primary btn-xs" id="CancelDocument" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="button" value="Return to Process" class="btn btn-primary btn-xs" id="ReturnToProcessDocument" />
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<input type="button" value="PRINT PDF" class="btn btn-primary btn-xs" id="PrintPDF" />
|
||||
@ -1251,6 +1269,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("_ECNCancel")
|
||||
@Html.Partial("_ECNReturnToProcess")
|
||||
|
||||
@Html.Partial("_ECNReassignOriginator")
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -2188,40 +2209,6 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#CancelDocument').on('click', function () {
|
||||
docType = 5;
|
||||
if (confirm("Are you sure you want to Cancel this document?")) {
|
||||
$.ajax({
|
||||
url: "/ECN/CancelDocument",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ecnNumber: $("#txtECNNumber").val(),
|
||||
currentStep: 1,
|
||||
documentType: docType,
|
||||
ecnTypeString: ecnTypeString
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
if (data == 'Redirect') {
|
||||
var url = '@Url.Action("ReadOnly", "ECN", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#txtECNNumber").val());
|
||||
|
||||
}
|
||||
else {
|
||||
// TODO alert an error message
|
||||
}
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Failed on Cancel" + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var returnNoOfDays = function () {
|
||||
//var start = new Date($('#txSubmitDate').val());
|
||||
var start = new Date();
|
||||
|
75
Fab2ApprovalSystem/Views/ECN/_ECNCancel.cshtml
Normal file
75
Fab2ApprovalSystem/Views/ECN/_ECNCancel.cshtml
Normal file
@ -0,0 +1,75 @@
|
||||
<div class="modal fade" id="Cancel" 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"><center>Has the process returned to the original state?</center></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="row">
|
||||
<div class="col-sm-13">
|
||||
<h4 class="modal-title">Comments (Required):</h4>
|
||||
<textarea class="form-control" rows="5" id="comments" style="resize: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmCancel">Confirm Cancel (Yes)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#CancelDocument").click(function (e) {
|
||||
|
||||
$("#comments").val("");
|
||||
|
||||
$("#Cancel").modal('show');
|
||||
});
|
||||
|
||||
$('#ConfirmCancel').on('click', function () {
|
||||
|
||||
if ($("#comments").val() == "") {
|
||||
alert("Comments are required");
|
||||
return;
|
||||
}
|
||||
|
||||
$('#ConfirmCancel').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/ECN/CancelDocument",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ecnNumber: $("#txtECNNumber").val(),
|
||||
currentStep: 1,
|
||||
documentType: 5,
|
||||
ecnTypeString: ecnTypeString,
|
||||
comments: $("#comments").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
$("#Cancel").modal('hide');
|
||||
|
||||
var url = '@Url.Action("ReadOnly", "ECN", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#txtECNNumber").val());
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
$('#ConfirmCancel').attr("disabled", false);
|
||||
alert("Server error while canceling document");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
75
Fab2ApprovalSystem/Views/ECN/_ECNReturnToProcess.cshtml
Normal file
75
Fab2ApprovalSystem/Views/ECN/_ECNReturnToProcess.cshtml
Normal file
@ -0,0 +1,75 @@
|
||||
<div class="modal fade" id="ReturnToProcess" 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"><center>Has the process returned to the original state?</center></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="row">
|
||||
<div class="col-sm-13">
|
||||
<h4 class="modal-title">Comments (Required):</h4>
|
||||
<textarea class="form-control" rows="5" id="ReturnToProcessComments" style="resize: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReturnToProcess">Confirm Return to Process (Yes)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#ReturnToProcessDocument").click(function (e) {
|
||||
|
||||
$("#ReturnToProcessComments").val("");
|
||||
|
||||
$("#ReturnToProcess").modal('show');
|
||||
});
|
||||
|
||||
$('#ConfirmReturnToProcess').on('click', function () {
|
||||
|
||||
if ($("#ReturnToProcessComments").val() == "") {
|
||||
alert("Comments are required");
|
||||
return;
|
||||
}
|
||||
|
||||
$('#ConfirmReturnToProcess').attr("disabled", true);
|
||||
|
||||
$.ajax({
|
||||
url: "/ECN/CancelDocument",
|
||||
type: "GET",
|
||||
datatype: "json",
|
||||
data: {
|
||||
ecnNumber: $("#txtECNNumber").val(),
|
||||
currentStep: 1,
|
||||
documentType: 5,
|
||||
ecnTypeString: ecnTypeString,
|
||||
comments: $("#ReturnToProcessComments").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
$("#ReturnToProcess").modal('hide');
|
||||
|
||||
var url = '@Url.Action("ReadOnly", "ECN", new { issueID = "__id__" })';
|
||||
url = url.replace('amp;', '');
|
||||
window.location.href = url.replace('__id__', $("#txtECNNumber").val());
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
$('#ConfirmReturnToProcess').attr("disabled", false);
|
||||
alert("Server error while ReturnToProcessing document");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
@ -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");
|
||||
|
@ -54,7 +54,7 @@ public class HomeControllerTests {
|
||||
|
||||
private static void GetMyOpenActionItems(ILogger? logger, AppSettings appSettings) {
|
||||
SetGlobalVars(logger, appSettings);
|
||||
LotDispositionDMO lotDispositionDMO = new(appSettings);
|
||||
LotDispositionDMO lotDispositionDMO = new();
|
||||
OpenActionItemViewModel[] openActionItemViewModels = lotDispositionDMO.GetMyOpenActionItems(appSettings.UserId).ToArray();
|
||||
if (openActionItemViewModels.Length == 0) { }
|
||||
}
|
||||
@ -76,7 +76,7 @@ public class HomeControllerTests {
|
||||
|
||||
private static void GetTaskList(ILogger? logger, AppSettings appSettings) {
|
||||
SetGlobalVars(logger, appSettings);
|
||||
LotDispositionDMO lotDispositionDMO = new(appSettings);
|
||||
LotDispositionDMO lotDispositionDMO = new();
|
||||
IssuesViewModel[] issuesViewModels = lotDispositionDMO.GetTaskList(appSettings.UserId).ToArray();
|
||||
if (issuesViewModels.Length == 0) { }
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ public class AdminDMOTests {
|
||||
AdminDMO adminDMO = new();
|
||||
// void AddNewTrainingGroup(string groupName);
|
||||
// void AddUserRoles(int subRole, string userids);
|
||||
// void AddUserToGroup(int userId, int groupId);
|
||||
// void DeleteFromGroup(int userId, int groupId);
|
||||
// void AddUserToGroup(appSettings.UserId, int groupId);
|
||||
// void DeleteFromGroup(appSettings.UserId, int groupId);
|
||||
// void DeleteTrainingGroup(int groupID);
|
||||
// adminDMO.DeleteUserFromAllTrainingGroups(appSettings.UserId);
|
||||
// void DeleteUserRoles(int subRole, string userids);
|
||||
|
@ -62,8 +62,8 @@ public class AuditDMOTests {
|
||||
// IEnumerable<int> GetAuditFindingCategoryIdsByFindingId(int auditFindingsID);
|
||||
// AuditFindings GetAuditFindingsByID(int auditFindingsID);
|
||||
// IEnumerable<AuditFindings> GetAuditFindingsList(int auditNo);
|
||||
// Audit GetAuditItem(int auditNo, int userID);
|
||||
// Audit GetAuditItemReadOnly(int auditNo, int userID);
|
||||
// Audit GetAuditItem(int auditNo, appSettings.UserId);
|
||||
// Audit GetAuditItemReadOnly(int auditNo, appSettings.UserId);
|
||||
Auditor[] auditors = auditDMO.GetAuditorList().ToArray();
|
||||
// IEnumerable<AuditReportAttachment> GetAuditReportAttachments(int auditNo);
|
||||
// C_8DAuditedStandard[] c_8DAuditedStandards = auditDMO.GetAuditStandardList().ToArray();
|
||||
@ -78,8 +78,8 @@ public class AuditDMOTests {
|
||||
// void InsertAuditReportAttachment(AuditReportAttachment attach);
|
||||
// void InsertCAFindings(CAFindings model);
|
||||
// int IsCAAssignedToAudit(int CANo, int auditNo);
|
||||
// void ReleaseLockOnDocument(int userID, int issueID);
|
||||
// void UpdateAudit(Audit audit, int userID);
|
||||
// void ReleaseLockOnDocument(appSettings.UserId, int issueID);
|
||||
// void UpdateAudit(Audit audit, appSettings.UserId);
|
||||
// void UpdateCAFindings(CAFindings model);
|
||||
if (auditDMO is null) { }
|
||||
#pragma warning restore IDE0059
|
||||
|
@ -53,12 +53,12 @@ public class ChangeControlDMOTests {
|
||||
private static void ChangeControlDMO(ILogger? logger, AppSettings appSettings) {
|
||||
#pragma warning disable IDE0059
|
||||
SetGlobalVars(logger, appSettings);
|
||||
ChangeControlDMO changeControlDMO = new(appSettings);
|
||||
ChangeControlDMO changeControlDMO = new();
|
||||
// IEnumerable<CCAttachment> GetCCAttachment(int planNumber);
|
||||
// IEnumerable<CCMeetingAttachment> GetMeetingAttachments(int meetingID);
|
||||
// IEnumerable<MeetingDecisionSummaryList> GetMeetingDecisionSummaryList(int planNumber);
|
||||
// IEnumerable<CCMeeting> GetMeetingList(int planNumber);
|
||||
// void ReassignOwner(int planNumber, int newOwnerID, string comments, int userID);
|
||||
// void ReassignOwner(int planNumber, int newOwnerID, string comments, appSettings.UserId);
|
||||
if (changeControlDMO is null) { }
|
||||
#pragma warning restore IDE0059
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ public class CorrectiveActionDMOTests {
|
||||
private static void CorrectiveActionDMO(ILogger? logger, AppSettings appSettings) {
|
||||
#pragma warning disable IDE0059
|
||||
SetGlobalVars(logger, appSettings);
|
||||
CorrectiveActionDMO correctiveActionDMO = new(appSettings);
|
||||
// void ApproveSection(int issueID, int userID, string DSection);
|
||||
CorrectiveActionDMO correctiveActionDMO = new();
|
||||
// void ApproveSection(int issueID, appSettings.UserId, string DSection);
|
||||
// void DeleteCAAttachment(int attachmentID);
|
||||
// void DeleteD3ContainmentActionItem(int d3ContainmentActionID);
|
||||
// void DeleteD5D6CorrectivetAction(int d5d6CAID);
|
||||
@ -67,8 +67,8 @@ public class CorrectiveActionDMOTests {
|
||||
// IEnumerable<CA_Attachment> GetCAAttachmentsList(int caNo, string section);
|
||||
CAD3D5D7Due[] cAD3D5D7Dues = correctiveActionDMO.GetCAD3D5D7Due().ToArray();
|
||||
// IEnumerable<CA_Attachment> GetCAFindingsItemAttachments(int caFindingsID);
|
||||
// CorrectiveAction GetCAItem(int caNo, int userID);
|
||||
// CorrectiveAction GetCAItemReadOnly(int caNo, int userID);
|
||||
// CorrectiveAction GetCAItem(int caNo, appSettings.UserId);
|
||||
// CorrectiveAction GetCAItemReadOnly(int caNo, appSettings.UserId);
|
||||
// IEnumerable<CASectionApproval> GetCASectionApprovalLog(int caNo);
|
||||
CASource[] cASources = correctiveActionDMO.GetCASourceList().ToArray();
|
||||
// IEnumerable<D3ContainmentAction> GetD3ContainmentActions(int caNo);
|
||||
@ -89,17 +89,17 @@ public class CorrectiveActionDMOTests {
|
||||
// void InsertD3ContainmentAction(D3ContainmentAction model);
|
||||
// void InsertD5D6CorrectivetAction(D5D6CorrectivetAction model);
|
||||
// void InsertD7PreventiveAction(D7PreventiveAction model);
|
||||
// bool IsAIAssignee(int userId, int caId);
|
||||
// bool IsAIAssignee(appSettings.UserId, int caId);
|
||||
// bool IsLastSectionApprover(int caNo, string dSection);
|
||||
// bool IsUserSectionApprover(int issueId, int userId);
|
||||
// void RejectSection(int issueID, int userID, string DSection, string comments);
|
||||
// void ReleaseLockOnDocument(int userID, int issueID);
|
||||
// bool IsUserSectionApprover(int issueId, appSettings.UserId);
|
||||
// void RejectSection(int issueID, appSettings.UserId, string DSection, string comments);
|
||||
// void ReleaseLockOnDocument(appSettings.UserId, int issueID);
|
||||
// DateTime SetCAComplete(int issueID);
|
||||
// DateTime SetCAD3DueDate(int issueID);
|
||||
// DateTime SetCAD5D7DueDate(int issueID);
|
||||
// void SetD3D5D7NotificationDate(int caNo, string section);
|
||||
// int StartApproval(int issueID, int userID, int worlflowNumber);
|
||||
// void StartSectionApproval(int issueID, int userID, string DSection);
|
||||
// int StartApproval(int issueID, appSettings.UserId, int worlflowNumber);
|
||||
// void StartSectionApproval(int issueID, appSettings.UserId, string DSection);
|
||||
// void UpdateCorrectiveAction(CorrectiveAction model);
|
||||
// void UpdateD3ContainmentAction(D3ContainmentAction model);
|
||||
// void UpdateD5D6CorrectivetAction(D5D6CorrectivetAction model);
|
||||
|
@ -58,30 +58,30 @@ public class EngChangeNoticeDMOTests {
|
||||
ECN_DMO ecnDMO = new();
|
||||
// void CancelECN(int? ecnNumber);
|
||||
// bool CanSubmitECN(int ecnNumber);
|
||||
// void DeleteDocument(int ecnNumber, int userid, string ecnTypeString);
|
||||
// void DeleteDocument(int ecnNumber, appSettings.UserId, string ecnTypeString);
|
||||
// void DeleteECNAttachment(int attachmentID);
|
||||
// bool ECNApproveCancelled_ExpiredDocument(int issueID, byte step, string comments, out bool lastStep, int userID, int documentType);
|
||||
// void ECNResetTECNAtRejection(int ecnNumber, int userID, int docType);
|
||||
// bool ECNApproveCancelled_ExpiredDocument(int issueID, byte step, string comments, out bool lastStep, appSettings.UserId, int documentType);
|
||||
// void ECNResetTECNAtRejection(int ecnNumber, appSettings.UserId, int docType);
|
||||
IssuesViewModel[] issuesViewModels = ecnDMO.GetAllTECNs().ToArray();
|
||||
// IEnumerable<ApprovalLogHistory> GetECNApprovalLogHistory(int ecnNumber);
|
||||
// IEnumerable<ECNAttachment> GetECNAttachments(int ecnNumber);
|
||||
IssuesViewModel[] issuesViewModelsB = ecnDMO.GetECN_TECNPendingApprovals(appSettings.UserId).ToArray();
|
||||
// string GetFileName(string attachmentID);
|
||||
// IEnumerable<IssuesViewModel> GetMyConvertedTECNsToECNs(int userID, int maxDays);
|
||||
// IEnumerable<IssuesViewModel> GetMyExpiredTECNs(int userID, int maxDays);
|
||||
// IEnumerable<IssuesViewModel> GetMyExpiringTECNs(int userID, int maxDays);
|
||||
// IEnumerable<IssuesViewModel> GetMyConvertedTECNsToECNs(appSettings.UserId, int maxDays);
|
||||
// IEnumerable<IssuesViewModel> GetMyExpiredTECNs(appSettings.UserId, int maxDays);
|
||||
// IEnumerable<IssuesViewModel> GetMyExpiringTECNs(appSettings.UserId, int maxDays);
|
||||
// List<string> GetRejectionOrginatorEmailList(int ecnNumber);
|
||||
int[] ints = ecnDMO.GetTECNNotificationUsers().ToArray();
|
||||
// void InsertECNAttachment(ECNAttachment attach);
|
||||
// int PCRBExists(int pcrb);
|
||||
// void ReassignOriginatorECN(int ecnNumber, int newOriginatorID, string comments, int userID);
|
||||
// void ReleaseLockOnDocument(int userID, int issueID);
|
||||
// int ReSubmitDocument(int issueID, int userID, int documentType, out int allowedITAR, string descriptionOfChange, string reasonForChange, string ecnTypeString, out int newECNNumber, int categoryId);
|
||||
// void ReassignOriginatorECN(int ecnNumber, int newOriginatorID, string comments, appSettings.UserId);
|
||||
// void ReleaseLockOnDocument(appSettings.UserId, int issueID);
|
||||
// int ReSubmitDocument(int issueID, appSettings.UserId, int documentType, out int allowedITAR, string descriptionOfChange, string reasonForChange, string ecnTypeString, out int newECNNumber, int categoryId);
|
||||
// void SaveAfterSubmitByApprover(int ecnNumber, string implementationDetails);
|
||||
// void SetToExecutionStep(int ecnNumber, int userid, int documentType, string ecnTypeString);
|
||||
// int SubmitDocument(int issueID, int userID, int documentType, out int allowedITAR);
|
||||
// int SubmitForCancellation(int issueID, byte currentStep, int userID, int documentType, string ecnType, int TECNOperationType);
|
||||
// int SubmitTECNExtensionDocument(int issueID, int userID, int documentType, DateTime extensionDate);
|
||||
// void SetToExecutionStep(int ecnNumber, appSettings.UserId, int documentType, string ecnTypeString);
|
||||
// int SubmitDocument(int issueID, appSettings.UserId, int documentType, out int allowedITAR);
|
||||
// int SubmitForCancellation(int issueID, byte currentStep, appSettings.UserId, int documentType, string ecnType, int TECNOperationType);
|
||||
// int SubmitTECNExtensionDocument(int issueID, appSettings.UserId, int documentType, DateTime extensionDate);
|
||||
// void TECNExtensionLog(int ecnNumber, DateTime extensionDate);
|
||||
// void UpdateECNType(int ecnNumber, string ecnType);
|
||||
if (ecnDMO is null) { }
|
||||
|
108
Fab2ApprovalTests/DMO/EngineeringChangeNoticeDMOTests.cs
Normal file
108
Fab2ApprovalTests/DMO/EngineeringChangeNoticeDMOTests.cs
Normal file
@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
using Fab2ApprovalSystem.DMO;
|
||||
using Fab2ApprovalSystem.Models;
|
||||
using Fab2ApprovalSystem.ViewModels;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Fab2ApprovalTests.DMO;
|
||||
|
||||
[TestClass]
|
||||
public class EngineeringChangeNoticeDMOTests {
|
||||
|
||||
#pragma warning disable CS8618
|
||||
|
||||
private static ILogger? _Logger;
|
||||
private static TestContext _TestContext;
|
||||
private static WebApplicationFactory<Fab2ApprovalMKLink.Program> _WebApplicationFactory;
|
||||
|
||||
#pragma warning restore
|
||||
|
||||
public static void SetGlobalVars(ILogger? logger, AppSettings appSettings) {
|
||||
logger?.LogDebug("Starting to set Fab2ApprovalSystem.Misc.GlobalVars");
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.AppSettings = appSettings;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.AttachmentUrl = appSettings.AttachmentUrl is null ? string.Empty : appSettings.AttachmentUrl;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.CA_BlankFormsLocation = appSettings.CABlankFormsLocation;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.DBConnection = appSettings.DBConnection;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.DB_CONNECTION_STRING = appSettings.DBConnectionString;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.hostURL = appSettings.HostURL;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.IS_INFINEON_DOMAIN = appSettings.IsInfineonDomain;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.MesaTemplateFiles = appSettings.MesaTemplateFiles;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.NDriveURL = appSettings.NDriveURL;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.SENDER_EMAIL = appSettings.SenderEmail;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.USER_ID = appSettings.UserId;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.USER_ISADMIN = appSettings.UserIsAdmin;
|
||||
Fab2ApprovalSystem.Misc.GlobalVars.WSR_URL = appSettings.WSR_URL;
|
||||
logger?.LogDebug("Finished setting Fab2ApprovalSystem.Misc.GlobalVars");
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitAsync(TestContext testContext) {
|
||||
_TestContext = testContext;
|
||||
_WebApplicationFactory = new WebApplicationFactory<Fab2ApprovalMKLink.Program>();
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
_Logger = serviceProvider.GetRequiredService<ILogger<Fab2ApprovalMKLink.Program>>();
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch() {
|
||||
try { throw new Exception(); } catch (Exception) { }
|
||||
}
|
||||
|
||||
private static void EngineeringChangeNoticeDMO(ILogger? logger, AppSettings appSettings, int maxDays, int ecnNumber) {
|
||||
#pragma warning disable IDE0059
|
||||
SetGlobalVars(logger, appSettings);
|
||||
ECN_DMO ecnDMO = new();
|
||||
ECN ecn = ecnDMO.GetECN(ecnNumber);
|
||||
// void CancelECN(int? ecnNumber);
|
||||
bool canSubmitECN = ecnDMO.CanSubmitECN(ecnNumber);
|
||||
// void DeleteDocument(int ecnNumber, appSettings.UserId, string ecnTypeString);
|
||||
// void DeleteECNAttachment(int attachmentID);
|
||||
// bool ECNApproveCancelled_ExpiredDocument(int issueID, byte step, string comments, out bool lastStep, appSettings.UserId, int documentType);
|
||||
// void ECNResetTECNAtRejection(int ecnNumber, appSettings.UserId, int docType);
|
||||
IssuesViewModel[] issuesViewModels = ecnDMO.GetAllTECNs().ToArray();
|
||||
ApprovalLogHistory[] approvalLogHistories = ecnDMO.GetECNApprovalLogHistory(ecnNumber).ToArray();
|
||||
ECNAttachment[] eCNAttachments = ecnDMO.GetECNAttachments(ecnNumber).ToArray();
|
||||
IssuesViewModel[] issuesViewModelsB = ecnDMO.GetECN_TECNPendingApprovals(appSettings.UserId).ToArray();
|
||||
// string GetFileName(string attachmentID);
|
||||
IssuesViewModel[] issuesViewModelsC = ecnDMO.GetMyConvertedTECNsToECNs(appSettings.UserId, maxDays).ToArray();
|
||||
IssuesViewModel[] issuesViewModelsD = ecnDMO.GetMyExpiredTECNs(appSettings.UserId, maxDays).ToArray();
|
||||
IssuesViewModel[] issuesViewModelsE = ecnDMO.GetMyExpiringTECNs(appSettings.UserId, maxDays).ToArray();
|
||||
// List<string> GetRejectionOrginatorEmailList(int ecnNumber);
|
||||
int[] ints = ecnDMO.GetTECNNotificationUsers().ToArray();
|
||||
// void InsertECNAttachment(ECNAttachment attach);
|
||||
// int PCRBExists(int pcrb);
|
||||
// void ReassignOriginatorECN(int ecnNumber, int newOriginatorID, string comments, appSettings.UserId);
|
||||
// void ReleaseLockOnDocument(appSettings.UserId, int issueID);
|
||||
// int ReSubmitDocument(int issueID, appSettings.UserId, int documentType, out int allowedITAR, string descriptionOfChange, string reasonForChange, string ecnTypeString, out int newECNNumber, int categoryId);
|
||||
// void SaveAfterSubmitByApprover(int ecnNumber, string implementationDetails);
|
||||
// void SetToExecutionStep(int ecnNumber, appSettings.UserId, int documentType, string ecnTypeString);
|
||||
// int SubmitDocument(int issueID, appSettings.UserId, int documentType, out int allowedITAR);
|
||||
// int SubmitForCancellation(int issueID, byte currentStep, appSettings.UserId, int documentType, string ecnType, int TECNOperationType);
|
||||
// int SubmitTECNExtensionDocument(int issueID, appSettings.UserId, int documentType, DateTime extensionDate);
|
||||
// void TECNExtensionLog(int ecnNumber, DateTime extensionDate);
|
||||
// void UpdateECNType(int ecnNumber, string ecnType);
|
||||
if (ecnDMO is null) { }
|
||||
#pragma warning restore IDE0059
|
||||
}
|
||||
|
||||
#if Release
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
[DataRow(1, 82700)]
|
||||
public void EngineeringChangeNoticeIsAttachedOnlyDMO(int maxDays, int ecnNumber) {
|
||||
_Logger?.LogInformation("Starting Web Application");
|
||||
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
|
||||
AppSettings? appSettings = serviceProvider?.GetRequiredService<AppSettings>();
|
||||
Assert.IsTrue(appSettings is not null);
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
EngineeringChangeNoticeDMO(_Logger, appSettings, maxDays, ecnNumber);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
@ -55,9 +55,9 @@ public class LotDispositionDMOTests {
|
||||
private static void LotDispositionDMO(ILogger? logger, AppSettings appSettings) {
|
||||
#pragma warning disable IDE0059
|
||||
SetGlobalVars(logger, appSettings);
|
||||
LotDispositionDMO lotDispositionDMO = new(appSettings);
|
||||
LotDispositionDMO lotDispositionDMO = new();
|
||||
// void DeleteAllLotDispoLot(int issueID);
|
||||
// void DeleteCADocument(int CANo, int userID, string caTypeString);
|
||||
// void DeleteCADocument(int CANo, appSettings.UserId, string caTypeString);
|
||||
// void DeleteLotDispoAttachment(int attachmentID);
|
||||
// void DeleteLotDispoLot(int lotID);
|
||||
AuditList[] auditLists = lotDispositionDMO.GetAuditList(appSettings.UserId).ToArray();
|
||||
@ -68,8 +68,8 @@ public class LotDispositionDMOTests {
|
||||
IssuesViewModel[] issuesViewModelsB = lotDispositionDMO.GetECNList(appSettings.UserId).ToArray();
|
||||
// string GetFileName(string attachmentID);
|
||||
// Attachment[] GetLotDispoAttachments(int issueID);
|
||||
// LotDisposition GetLotDispositionItem(int issueID, out int isITAR, int userID);
|
||||
// LotDisposition GetLotDispositionItemForRead(int issueID, out int isITAR, int userID);
|
||||
// LotDisposition GetLotDispositionItem(int issueID, out int isITAR, appSettings.UserId);
|
||||
// LotDisposition GetLotDispositionItemForRead(int issueID, out int isITAR, appSettings.UserId);
|
||||
IssuesViewModel[] issuesViewModelsC = lotDispositionDMO.GetLotDispositionList(appSettings.UserId).ToArray();
|
||||
// Lot[] GetLotDispositionLots(int issueID);
|
||||
// LotDispositionLotSummaryViewModel GetLotDispositionLotSummary(int issueID);
|
||||
@ -91,9 +91,9 @@ public class LotDispositionDMOTests {
|
||||
// int InsertLot(Lot lot, bool getLotInfo);
|
||||
// LotDisposition InsertLotDisposition(LotDisposition lotDispo);
|
||||
// void InsertLotDispositionAttachment(Attachment attach);
|
||||
// void ReleaseLockOnDocument(int userID, int issueID);
|
||||
// void ReleaseLockOnDocument(appSettings.UserId, int issueID);
|
||||
// Lot[] SearchLots(string searchText);
|
||||
// int SubmitDocument(int issueID, bool peRequired, bool mrbRequired, int userID);
|
||||
// int SubmitDocument(int issueID, bool peRequired, bool mrbRequired, appSettings.UserId);
|
||||
// void UpdateLotDispoLot(Lot lot);
|
||||
// void UpdateLotDisposition(LotDisposition lotDispo);
|
||||
// void UpdateLotScrapReleaseStatus(ScrapLot scrap);
|
||||
|
@ -53,17 +53,17 @@ public class LotTravelerDMOTests {
|
||||
private static void LotTravelerDMO(ILogger? logger, AppSettings appSettings) {
|
||||
#pragma warning disable IDE0059
|
||||
SetGlobalVars(logger, appSettings);
|
||||
LotTravelerDMO lotTravelerDMO = new(appSettings);
|
||||
LotTravelerDMO lotTravelerDMO = new();
|
||||
// int CanAddLocationOperation(LTLotTravelerHoldSteps model);
|
||||
// int CreateLotTravelerRevision(LTLotTravelerHoldSteps model, int userID);
|
||||
// void CreateTraveler(int ltLotID, int workRequestID, int UserID);
|
||||
// int CreateWorkRequestRevision(LTWorkRequest data, int userID);
|
||||
// int CreateLotTravelerRevision(LTLotTravelerHoldSteps model, appSettings.UserId);
|
||||
// void CreateTraveler(int ltLotID, int workRequestID, appSettings.UserId);
|
||||
// int CreateWorkRequestRevision(LTWorkRequest data, appSettings.UserId);
|
||||
// void DeleteLot(int ltLotID);
|
||||
// IEnumerable<LTLot> GetLotList(int workRequestID);
|
||||
// IEnumerable<LTLot> GetLotListBasedOnSWRNumber(int swrNumber);
|
||||
// IEnumerable<LotWithTraveler> GetLotsWithTraveler(int workRequestID);
|
||||
// LTLotTravelerHeaderViewModel GetLotTravelerHeaderForReadOnly(int ltLotID, int revisionNumber);
|
||||
// LTLotTravelerHeaderViewModel GetLotTravelerHeaderForUpdate(int ltLotID, int UserID);
|
||||
// LTLotTravelerHeaderViewModel GetLotTravelerHeaderForUpdate(int ltLotID, appSettings.UserId);
|
||||
// IEnumerable<LTLotTravelerHoldSteps> GetLotTravelerHolStepsByRevision(int ltLotID, int revisionNumber);
|
||||
// IEnumerable<RevisionHistory> GetLotTravelerRevisionHistory(int lotID);
|
||||
// IEnumerable<LTLotTravelerHoldSteps> GetLotTravHoldSteps(int ltLotID);
|
||||
@ -76,15 +76,15 @@ public class LotTravelerDMOTests {
|
||||
// IEnumerable<RevisionHistory> GetWorkReqRevisionHistory(int swrNumber);
|
||||
// List<Revision> GetWorkReqRevisions(int swrNumber);
|
||||
// void InsertLot(LTLot lot);
|
||||
// int InsertLotTravelerHoldStep(LTLotTravelerHoldSteps model, int userID);
|
||||
// void ReassignOriginator(int workRequestID, int newOriginatorID, string comments, int userID);
|
||||
// void ReleaseLockOnDocument(int userID, int workRequestID);
|
||||
// void ReleaseLockOnLotTravelerUpdateDoc(int userID, int ltLotID);
|
||||
// int InsertLotTravelerHoldStep(LTLotTravelerHoldSteps model, appSettings.UserId);
|
||||
// void ReassignOriginator(int workRequestID, int newOriginatorID, string comments, appSettings.UserId);
|
||||
// void ReleaseLockOnDocument(appSettings.UserId, int workRequestID);
|
||||
// void ReleaseLockOnLotTravelerUpdateDoc(appSettings.UserId, int ltLotID);
|
||||
// void RestoreLotTravToPrevRevision(int prevLotTravRevID, int newLotTravRevID);
|
||||
// int SubmitDocument(int workRequestID, int userID, int documentType, out int allowedITAR);
|
||||
// int UpdateLotTravelerHoldStep(LTLotTravelerHoldSteps model, int userID);
|
||||
// void UpdateLotTravlerExecution(int lotTravHoldStepID, string taskComments, bool CompletedFlag, int userID);
|
||||
// int UpdateRevisedLotTravelerHoldStep(LTLotTravelerHoldSteps model, int userID);
|
||||
// int SubmitDocument(int workRequestID, appSettings.UserId, int documentType, out int allowedITAR);
|
||||
// int UpdateLotTravelerHoldStep(LTLotTravelerHoldSteps model, appSettings.UserId);
|
||||
// void UpdateLotTravlerExecution(int lotTravHoldStepID, string taskComments, bool CompletedFlag, appSettings.UserId);
|
||||
// int UpdateRevisedLotTravelerHoldStep(LTLotTravelerHoldSteps model, appSettings.UserId);
|
||||
if (lotTravelerDMO is null) { }
|
||||
#pragma warning restore IDE0059
|
||||
}
|
||||
|
@ -54,9 +54,9 @@ public class PartsRequestDMOTests {
|
||||
private static void PartsRequestDMO(ILogger? logger, AppSettings appSettings) {
|
||||
#pragma warning disable IDE0059
|
||||
SetGlobalVars(logger, appSettings);
|
||||
PartsRequestDMO partsRequestDMO = new(appSettings);
|
||||
PartsRequestDMO partsRequestDMO = new();
|
||||
// void DeleteAttachment(int attachmentID);
|
||||
// void DeleteDocument(int prNumber, int userid);
|
||||
// void DeleteDocument(int prNumber, appSettings.UserId);
|
||||
// PartsRequest Get(int PRNumber);
|
||||
// IEnumerable<ApprovalLogHistory> GetApprovalLogHistory(int prNumber);
|
||||
// IEnumerable<PartsRequestAttachmentList> GetAttachments(int prNumber);
|
||||
@ -65,7 +65,7 @@ public class PartsRequestDMOTests {
|
||||
PartsRequestList[] partsRequestLists = partsRequestDMO.GetPartsRequestList().ToArray();
|
||||
// void Insert(PartsRequest pr);
|
||||
// void InsertAttachment(PartsRequestAttachment attach);
|
||||
// void Submit(int prNumber, int userID);
|
||||
// void Submit(int prNumber, appSettings.UserId);
|
||||
// void Update(PartsRequest pr);
|
||||
if (partsRequestDMO is null) { }
|
||||
#pragma warning restore IDE0059
|
||||
|
@ -60,8 +60,8 @@ public class TrainingDMOTests {
|
||||
// bool CheckTrainingStatus(int trainingAssignmentID);
|
||||
// bool CheckValidDocAck(int docAckId);
|
||||
// int Create(int issueId);
|
||||
// int CreateAssignment(int trainingId, int userId);
|
||||
// void DeleteAssignmentByUserId(int userId);
|
||||
// int CreateAssignment(int trainingId, appSettings.UserId);
|
||||
// void DeleteAssignmentByUserId(appSettings.UserId);
|
||||
// void DeleteTraining(int trainingId);
|
||||
// void DeleteTrainingAssignment(int trainingAssignmentId);
|
||||
// void DeleteTrainingDocAck(int trainingAssignmentId);
|
||||
@ -75,15 +75,15 @@ public class TrainingDMOTests {
|
||||
// List<int> GetTrainees(int groupId);
|
||||
// Training GetTraining(int trainingId);
|
||||
// List<TrainingAssignment> GetTrainingAssignments(int TrainingID);
|
||||
// List<TrainingAssignment> GetTrainingAssignmentsByUser(int TrainingID, int userID);
|
||||
// List<TrainingAssignment> GetTrainingAssignmentsByUserID(int userID);
|
||||
// List<TrainingAssignment> GetTrainingAssignmentsByUser(int TrainingID, appSettings.UserId);
|
||||
// List<TrainingAssignment> GetTrainingAssignmentsByUserID(appSettings.UserId);
|
||||
// TrainingGroup GetTrainingGroupByID(int groupId);
|
||||
// TrainingGroup[] trainingGroups = trainingDMO.GetTrainingGroups().ToArray();
|
||||
// int GetTrainingId(int issueId);
|
||||
// int GetTrainingIdByAssignment(int trainingAssignmentID);
|
||||
// Training[] trainingsC = trainingDMO.GetTrainings().ToArray();
|
||||
// bool IsUserAssigned(int userId, int trainingId);
|
||||
// bool isUserTrainingMember(int groupId, int userId);
|
||||
// bool IsUserAssigned(appSettings.UserId, int trainingId);
|
||||
// bool isUserTrainingMember(int groupId, appSettings.UserId);
|
||||
// void reOpenTraining(int trainingId);
|
||||
// void SetTrainingFlag(int ECNNumber);
|
||||
// void UpdateAssignmentStatus(int trainingAssignmentID);
|
||||
|
@ -50,22 +50,25 @@ public class WorkflowDMOTests {
|
||||
try { throw new Exception(); } catch (Exception) { }
|
||||
}
|
||||
|
||||
private static void WorkflowDMO(ILogger? logger, AppSettings appSettings) {
|
||||
private static void WorkflowDMO(ILogger? logger, AppSettings appSettings, int issueID, string comments, int documentType) {
|
||||
#pragma warning disable IDE0059
|
||||
bool isLastStep;
|
||||
SetGlobalVars(logger, appSettings);
|
||||
ECN_DMO ecnDMO = new();
|
||||
ECN ecn = ecnDMO.GetECN(issueID);
|
||||
WorkflowDMO workflowDMO = new();
|
||||
// string AddAdditionalApproval(int issueID, string userIDs, byte step, int documentType);
|
||||
// string AddEECNApproval(int ecnNumber, byte step, int documentType, string engUserIDs, string opUserIDs);
|
||||
// bool Approve(int issueID, byte step, string comments, out bool lastStep, int userID, int documentType, int workFlowNumber);
|
||||
bool check = workflowDMO.Approve(appSettings, issueID, ecn.CurrentStep, comments, out isLastStep, appSettings.UserId, documentType, ecn.WorkFlowNumber);
|
||||
// string DelegateDocumentApproval(int issueID, int delegateFromUser, int delegateToUser);
|
||||
// string GetApproversForCancelled_ExpiredTECNDocs(int ecnNumber);
|
||||
// string GetSubRoleItems(int issueID, int docType);
|
||||
// string GetSubRolesForPartsRequestNextStep(int prNumber);
|
||||
// WorkflowSteps GetWorkflowStep(int docTypeID, int wfNumber, int stepNumber);
|
||||
// string ReAssignApproval(int issueID, int assignedFromUser, int assignedToUser, byte step, int docType);
|
||||
// bool Recall(int issueID, byte step, string comments, int userID, int docType);
|
||||
// bool Reject(int issueID, byte step, string comments, int userID, int docType);
|
||||
// void RejectTECNExtension(int ecnNumber, byte step, string comments, int userID, int docType);
|
||||
// bool Recall(int issueID, byte step, string comments, appSettings.UserId, int docType);
|
||||
// bool Reject(int issueID, byte step, string comments, appSettings.UserId, int docType);
|
||||
// void RejectTECNExtension(int ecnNumber, byte step, string comments, appSettings.UserId, int docType);
|
||||
if (workflowDMO is null) { }
|
||||
#pragma warning restore IDE0059
|
||||
}
|
||||
@ -74,13 +77,14 @@ public class WorkflowDMOTests {
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void WorkflowDMOIsAttachedOnly() {
|
||||
[DataRow(82700, "comment", 3)]
|
||||
public void WorkflowDMOIsAttachedOnly(int issueID, string comments, int documentType) {
|
||||
_Logger?.LogInformation("Starting Web Application");
|
||||
IServiceProvider? serviceProvider = _WebApplicationFactory?.Services.CreateScope().ServiceProvider;
|
||||
AppSettings? appSettings = serviceProvider?.GetRequiredService<AppSettings>();
|
||||
Assert.IsTrue(appSettings is not null);
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
WorkflowDMO(_Logger, appSettings);
|
||||
WorkflowDMO(_Logger, appSettings, issueID, comments, documentType);
|
||||
_Logger?.LogInformation("{TestName} completed", _TestContext?.TestName);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public class CorrectiveActionTests {
|
||||
internal static void TestCorrectiveAction(ILogger? logger, AppSettings appSettings, int caNo) {
|
||||
SetGlobalVars(logger, appSettings);
|
||||
CorrectiveAction ca;
|
||||
CorrectiveActionDMO caDMO = new(appSettings);
|
||||
CorrectiveActionDMO caDMO = new();
|
||||
ca = caDMO.GetCAItemReadOnly(caNo, appSettings.UserId);
|
||||
if (ca is null)
|
||||
throw new Exception($"{nameof(ca)}");
|
||||
|
@ -30,4 +30,11 @@
|
||||
<ProjectReference Include="..\MesaFabApproval.Shared\MesaFabApproval.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="wwwroot\appsettings.Development.json">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -19,6 +19,7 @@
|
||||
@bind-Value="@document.DocNumbers"
|
||||
@bind-Text="@document.DocNumbers"
|
||||
Immediate
|
||||
Required
|
||||
AutoGrow
|
||||
AutoFocus />
|
||||
@if (DocNumberIsNA()) {
|
||||
@ -49,8 +50,8 @@
|
||||
</MudPaper>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
@if ((DocNumberIsNA() && !string.IsNullOrWhiteSpace(document.Comment)) ||
|
||||
(!DocNumberIsNA() && ecnNoIsValid)) {
|
||||
@if (!string.IsNullOrWhiteSpace(document.DocNumbers) && ((DocNumberIsNA() && !string.IsNullOrWhiteSpace(document.Comment)) ||
|
||||
(!DocNumberIsNA() && ecnNoIsValid))) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
Class="m1-auto"
|
||||
@ -111,6 +112,10 @@
|
||||
document.CompletedDate = DateTime.Now;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(document.DocNumbers)) {
|
||||
throw new Exception("Document Numbers cannot be empty");
|
||||
}
|
||||
|
||||
if (!DocNumberIsNA() && !ecnNoIsValid)
|
||||
throw new Exception($"{document.ECNNumber} is not a valid ECN#");
|
||||
if (DocNumberIsNA() && string.IsNullOrWhiteSpace(document.Comment))
|
||||
@ -135,7 +140,9 @@
|
||||
|
||||
private bool DocNumberIsNA() {
|
||||
if (document.DocNumbers.ToLower().Equals("na") ||
|
||||
document.DocNumbers.ToLower().Equals("n/a")) {
|
||||
document.DocNumbers.ToLower().Equals("n/a") ||
|
||||
document.DocNumbers.ToLower().Equals("n a") ||
|
||||
document.DocNumbers.ToLower().Equals("not applicable")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -236,13 +236,14 @@
|
||||
int currentStagePendingActionItemCount = currentStageActionItems.Where(a => a.ClosedStatus == false).Count();
|
||||
|
||||
bool allActionItemsComplete = current_i < 3 || actionItems.Where(a => a.ClosedStatus == false).Count() == 0;
|
||||
bool actionItemsAreComplete = actionItems.Where(a => a.ClosedStatus == false).Count() == 0;
|
||||
|
||||
bool attachmentsMissing = currentStageAttachments.Count() == 0;
|
||||
bool actionItemsIncomplete = current_i < 3 && currentStagePendingActionItemCount > 0;
|
||||
bool affectedDocumentsIncomplete = current_i == 3 && pcr3Documents.Where(d => d.CompletedByID <= 0).Count() > 0;
|
||||
bool approvalsIncomplete = currentStageApprovals.Count() > 0 && currentStagePendingApprovalsCount > 0;
|
||||
|
||||
<MudExpansionPanel Expanded="@(previousStageSubmitted && (attachmentsMissing || actionItemsIncomplete ||
|
||||
<MudExpansionPanel Class="m-2" Expanded="@(previousStageSubmitted && (attachmentsMissing || actionItemsIncomplete ||
|
||||
affectedDocumentsIncomplete || !currentStageSubmitted || approvalsIncomplete))">
|
||||
<TitleContent>
|
||||
<MudText Typo="Typo.h4" Align="Align.Center">@($"PCR {current_i}")</MudText>
|
||||
@ -495,7 +496,17 @@
|
||||
<MudTd DataLabel="Document Type">@context.DocType</MudTd>
|
||||
<MudTd DataLabel="Document Numbers">@context.DocNumbers</MudTd>
|
||||
<MudTd DataLabel="Comments">@context.Comment</MudTd>
|
||||
<MudTd DataLabel="ECN#">@context.GetEcnNumberString()</MudTd>
|
||||
<MudTd DataLabel="ECN#">
|
||||
@if (string.IsNullOrWhiteSpace(context.GetEcnNumberString())) {
|
||||
context.GetEcnNumberString();
|
||||
} else {
|
||||
<MudLink
|
||||
Href=@($"{config["OldFabApprovalUrl"]}/ECN/Edit?IssueID={context.GetEcnNumberString()}")
|
||||
Target="_blank">
|
||||
@context.GetEcnNumberString()
|
||||
</MudLink>
|
||||
}
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Closed Date">@(DateTimeUtilities.GetDateAsStringMaxDefault(context.CompletedDate))</MudTd>
|
||||
<MudTd DataLabel="Closed By">
|
||||
@(context.CompletedBy is null ? string.Empty : context.CompletedBy.GetFullName())
|
||||
@ -568,6 +579,11 @@
|
||||
|
||||
<MudDivider DividerType="DividerType.Middle" Class="my-1" />
|
||||
<MudText Typo="Typo.h5" Align="Align.Center">Approvers</MudText>
|
||||
@if (!actionItemsAreComplete && current_i == 3) {
|
||||
<MudText Align="Align.Center" Color="Color.Secondary" Typo="Typo.subtitle1">
|
||||
All actions must be completed before PCR3 is submitted for approval
|
||||
</MudText>
|
||||
}
|
||||
<MudTable Items="@approvals.Where(a => a.Step == current_i).OrderBy(a => a.CompletedDate)"
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"OldFabApprovalUrl": "https://mesaapproval-test.mes.infineon.com",
|
||||
"FabApprovalApiBaseUrl": "https://mesaapproval-test.mes.infineon.com:7114"
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"OldFabApprovalUrl": "https://mesaapproval-test.mes.infineon.com",
|
||||
"FabApprovalApiBaseUrl": "https://mesaapproval-test.mes.infineon.com:7114"
|
||||
"OldFabApprovalUrl": "https://mesaapproval.mes.infineon.com",
|
||||
"FabApprovalApiBaseUrl": "https://mesaapproval.mes.infineon.com:7114"
|
||||
}
|
@ -6,7 +6,7 @@ public class PCR3Document {
|
||||
public int ID { get; set; }
|
||||
public required int PlanNumber { get; set; }
|
||||
public required string DocType { get; set; }
|
||||
public string DocNumbers { get; set; } = "N/A";
|
||||
public string DocNumbers { get; set; } = string.Empty;
|
||||
public DateTime CompletedDate { get; set; } = DateTimeUtilities.MAX_DT;
|
||||
public int CompletedByID { get; set; } = 0;
|
||||
public User? CompletedBy { get; set; }
|
||||
|
@ -15,10 +15,11 @@ trigger:
|
||||
|
||||
variables:
|
||||
buildConfiguration: "Release"
|
||||
targetFrameworkVersion: 'v4.8'
|
||||
coreVersion: 'na'
|
||||
assemblyTitle: 'Fab2ApprovalSystem'
|
||||
architecture: 'x64'
|
||||
targetFrameworkVersion: "v4.8"
|
||||
coreVersion: "na"
|
||||
assemblyTitle: "Fab2ApprovalSystem"
|
||||
architecture: "x64"
|
||||
msBuild: "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe"
|
||||
|
||||
stages:
|
||||
- stage: Development
|
||||
@ -28,46 +29,18 @@ stages:
|
||||
demands: Fab2ApprovalSystem-Dev
|
||||
variables:
|
||||
ASPNETCORE_ENVIRONMENT: "Development"
|
||||
configuration: 'Debug'
|
||||
configuration: "Debug"
|
||||
jobs:
|
||||
- job: Debug
|
||||
steps:
|
||||
- script: |
|
||||
echo BuildId: $(Build.BuildId)
|
||||
echo Build reason: $(Build.Reason)
|
||||
echo Repo Id: $(Build.Repository.Id)
|
||||
echo Repo name: $(Build.Repository.Name)
|
||||
echo Source version: $(Build.SourceVersion)
|
||||
echo Core version: $(CoreVersion)
|
||||
echo Build configuration: $(BuildConfiguration)
|
||||
echo Configuration: $(Configuration)
|
||||
echo Target Framework version: $(TargetFrameworkVersion)
|
||||
echo Assembly title: $(AssemblyTitle)
|
||||
displayName: "Echo Check"
|
||||
set gitCommit=$(Build.SourceVersion)
|
||||
set gitCommitSeven=%gitCommit:~0,7%
|
||||
echo %gitCommitSeven%
|
||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||
echo $(GitCommitSeven)
|
||||
displayName: GitCommitSeven
|
||||
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(BuildConfiguration);TargetFrameworkVersion=$(TargetFrameworkVersion) /p:RestoreSources=D:/nupkg $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Restore"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(BuildConfiguration);TargetFrameworkVersion=$(TargetFrameworkVersion) $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Build"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(Configuration);TargetFrameworkVersion=$(TargetFrameworkVersion) /p:DebugSymbols=false /p:DeleteExistingFiles=true /p:DeployOnBuild=true /p:EnableUpdateAble=true /p:ExcludeApp_Data=true /p:LastUsedBuildConfiguration=$(BuildConfiguration) /p:LastUsedPlatform="Any CPU" /p:LaunchSiteAfterPublish=true /p:OutputPath="D:\$(TargetFrameworkVersion)\$(Build.Repository.Name)\$(Build.BuildId)\$(Configuration)" /p:PreCompileBeforePublish=true /p:PublishProvider=FileSystem /p:PublishUrl="D:/PublishUrl" /p:SiteUrlToLaunchAfterPublish="" /p:WDPMergeOption=DoNotMerge /p:WebPublishMethod=FileSystem $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Pack"
|
||||
- stage: Production
|
||||
displayName: Production
|
||||
pool:
|
||||
name: Mesa-FabApproval
|
||||
demands: Fab2ApprovalSystem
|
||||
variables:
|
||||
configuration: 'Release'
|
||||
ASPNETCORE_ENVIRONMENT: "Production"
|
||||
jobs:
|
||||
- job: Release
|
||||
steps:
|
||||
- script: |
|
||||
echo BuildId: $(Build.BuildId)
|
||||
echo Build reason: $(Build.Reason)
|
||||
@ -79,52 +52,63 @@ stages:
|
||||
echo Configuration: $(Configuration)
|
||||
echo Target Framework version: $(TargetFrameworkVersion)
|
||||
echo Assembly title: $(AssemblyTitle)
|
||||
echo MSBuild: $(msBuild)
|
||||
displayName: "Echo Check"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(BuildConfiguration);TargetFrameworkVersion=$(TargetFrameworkVersion) $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Restore"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(BuildConfiguration);TargetFrameworkVersion=$(TargetFrameworkVersion) $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Build"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(Configuration);TargetFrameworkVersion=$(TargetFrameworkVersion) /p:DebugSymbols=false /p:DeleteExistingFiles=true /p:DeployOnBuild=true /p:EnableUpdateAble=true /p:ExcludeApp_Data=true /p:LastUsedBuildConfiguration=$(BuildConfiguration) /p:LastUsedPlatform="Any CPU" /p:LaunchSiteAfterPublish=true /p:OutputPath="D:\$(TargetFrameworkVersion)\$(Build.Repository.Name)\$(Build.BuildId)\$(Configuration)" /p:PreCompileBeforePublish=true /p:PublishProvider=FileSystem /p:PublishUrl="D:/PublishUrl" /p:SiteUrlToLaunchAfterPublish="" /p:WDPMergeOption=DoNotMerge /p:WebPublishMethod=FileSystem $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Pack"
|
||||
- stage: Production_EC
|
||||
displayName: Production-EC
|
||||
pool:
|
||||
name: Mesa-FabApproval
|
||||
demands: Fab2ApprovalSystem-EC
|
||||
variables:
|
||||
ASPNETCORE_ENVIRONMENT: "Production"
|
||||
configuration: 'Release'
|
||||
jobs:
|
||||
- job: Release
|
||||
steps:
|
||||
- script: |
|
||||
echo BuildId: $(Build.BuildId)
|
||||
echo Build reason: $(Build.Reason)
|
||||
echo Repo Id: $(Build.Repository.Id)
|
||||
echo Repo name: $(Build.Repository.Name)
|
||||
echo Source version: $(Build.SourceVersion)
|
||||
echo Core version: $(CoreVersion)
|
||||
echo Build configuration: $(BuildConfiguration)
|
||||
echo Configuration: $(Configuration)
|
||||
echo Target Framework version: $(TargetFrameworkVersion)
|
||||
echo Assembly title: $(AssemblyTitle)
|
||||
displayName: "Echo Check"
|
||||
mklink /J ".vscode\.UserSecrets" "%AppData%\Microsoft\UserSecrets\f2da5035-aba9-4676-9f8d-d6689f84663d"
|
||||
mklink /J "DMO" "..\Fab2ApprovalSystem\DMO"
|
||||
mklink /J "Jobs" "..\Fab2ApprovalSystem\Jobs"
|
||||
mklink /J "JobSchedules" "..\Fab2ApprovalSystem\JobSchedules"
|
||||
mklink /J "Misc" "..\Fab2ApprovalSystem\Misc"
|
||||
mklink /J "Models" "..\Fab2ApprovalSystem\Models"
|
||||
mklink /J "PdfGenerator" "..\Fab2ApprovalSystem\PdfGenerator"
|
||||
mklink /J "Utilities" "..\Fab2ApprovalSystem\Utilities"
|
||||
mklink /J "ViewModels" "..\Fab2ApprovalSystem\ViewModels"
|
||||
workingDirectory: Fab2ApprovalMKLink
|
||||
displayName: "MKLink - Symbolic Link of Type Junction"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(BuildConfiguration);TargetFrameworkVersion=$(TargetFrameworkVersion) $(AssemblyTitle).csproj'
|
||||
- script: |
|
||||
dotnet user-secrets init
|
||||
dotnet user-secrets set BuildNumber $(Build.BuildId)
|
||||
dotnet user-secrets set GitCommitSeven $(GitCommitSeven)
|
||||
dotnet user-secrets list
|
||||
workingDirectory: Fab2ApprovalMKLink
|
||||
displayName: "MKLink - Safe storage of app secrets"
|
||||
|
||||
- script: dotnet build --configuration $(buildConfiguration)
|
||||
workingDirectory: Fab2ApprovalMKLink
|
||||
displayName: "MKLink - Build"
|
||||
|
||||
- script: dotnet build --configuration $(buildConfiguration)
|
||||
workingDirectory: Fab2ApprovalTests
|
||||
displayName: "Tests - Build"
|
||||
|
||||
- script: dotnet test --configuration $(buildConfiguration)
|
||||
workingDirectory: Fab2ApprovalTests
|
||||
displayName: "Tests - Test"
|
||||
|
||||
- script: dotnet clean --configuration $(buildConfiguration)
|
||||
workingDirectory: Fab2ApprovalTests
|
||||
displayName: "Tests - Clean"
|
||||
|
||||
- script: dotnet clean --configuration $(buildConfiguration)
|
||||
workingDirectory: Fab2ApprovalMKLink
|
||||
displayName: "MKLink - Clean"
|
||||
|
||||
- script: echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt
|
||||
workingDirectory: Fab2ApprovalMKLink
|
||||
displayName: "Force Fail"
|
||||
enabled: "false"
|
||||
|
||||
- script: '"$(msBuild)" /target:Restore /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(BuildConfiguration);TargetFrameworkVersion=$(TargetFrameworkVersion) /p:RestoreSources=D:/nupkg $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Restore"
|
||||
displayName: "Framework - Restore"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(BuildConfiguration);TargetFrameworkVersion=$(TargetFrameworkVersion) $(AssemblyTitle).csproj'
|
||||
- script: '"$(msBuild)" /target:Build /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(BuildConfiguration);TargetFrameworkVersion=$(TargetFrameworkVersion) $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Build"
|
||||
displayName: "Framework - Build"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(Configuration);TargetFrameworkVersion=$(TargetFrameworkVersion) /p:DebugSymbols=false /p:DeleteExistingFiles=true /p:DeployOnBuild=true /p:EnableUpdateAble=true /p:ExcludeApp_Data=true /p:LastUsedBuildConfiguration=$(BuildConfiguration) /p:LastUsedPlatform="Any CPU" /p:LaunchSiteAfterPublish=true /p:OutputPath="D:\$(TargetFrameworkVersion)\$(Build.Repository.Name)\$(Build.BuildId)\$(Configuration)" /p:PreCompileBeforePublish=true /p:PublishProvider=FileSystem /p:PublishUrl="D:/PublishUrl" /p:SiteUrlToLaunchAfterPublish="" /p:WDPMergeOption=DoNotMerge /p:WebPublishMethod=FileSystem $(AssemblyTitle).csproj'
|
||||
- script: '"$(msBuild)" /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(Configuration);TargetFrameworkVersion=$(TargetFrameworkVersion) /p:DebugSymbols=false /p:DeleteExistingFiles=true /p:DeployOnBuild=true /p:EnableUpdateAble=true /p:ExcludeApp_Data=true /p:LastUsedBuildConfiguration=$(BuildConfiguration) /p:LastUsedPlatform="Any CPU" /p:LaunchSiteAfterPublish=true /p:OutputPath="D:\$(TargetFrameworkVersion)\$(Build.Repository.Name)\$(Build.BuildId)\$(Configuration)" /p:PreCompileBeforePublish=true /p:PublishProvider=FileSystem /p:PublishUrl="D:/PublishUrl" /p:SiteUrlToLaunchAfterPublish="" /p:WDPMergeOption=DoNotMerge /p:WebPublishMethod=FileSystem $(AssemblyTitle).csproj'
|
||||
workingDirectory: Fab2ApprovalSystem
|
||||
displayName: "Framework Pack"
|
||||
|
||||
displayName: "Framework - Pack"
|
||||
|
Reference in New Issue
Block a user