Merged PR 34240: Updates to PCR3 document section

Updates to PCR3 document section
This commit is contained in:
Tucker Chase (CSC FI SPS MESLEO)
2025-01-15 16:52:17 +01:00
parent b99b721458
commit 123bbdb9fe
8 changed files with 64 additions and 63 deletions

View File

@ -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"