Merged PR 34240: Updates to PCR3 document section
Updates to PCR3 document section
This commit is contained in:
@ -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"
|
||||
}
|
Reference in New Issue
Block a user