PCRB follow up client side logic
This commit is contained in:
@ -6,20 +6,22 @@
|
||||
|
||||
<MudPaper Class="p-2 m-2 d-flex flex-row justify-content-between">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ChevronLeft"
|
||||
Variant="Variant.Outlined"
|
||||
Color="Color.Dark"
|
||||
OnClick="@ReturnToAllPcrbs"
|
||||
Size="Size.Large" />
|
||||
Variant="Variant.Outlined"
|
||||
Color="Color.Dark"
|
||||
OnClick="@ReturnToAllPcrbs"
|
||||
Size="Size.Large" />
|
||||
<MudText Typo="Typo.h3" Align="Align.Center">PCRB @planNumber</MudText>
|
||||
<MudPaper Height="100%" Width="0.1%" Square="true" />
|
||||
</MudPaper>
|
||||
|
||||
@if (pcrb is not null) {
|
||||
<MudTimeline Class="mt-2 pt-2" TimelineOrientation="TimelineOrientation.Horizontal"
|
||||
TimelinePosition="TimelinePosition.Bottom">
|
||||
TimelinePosition="TimelinePosition.Bottom">
|
||||
@for (int i = 0; i < PCRB.Stages.Length; i++) {
|
||||
Color color;
|
||||
if (pcrb.CurrentStep > i || pcrb.CurrentStep == (PCRB.Stages.Length - 1)) {
|
||||
if (pcrb.CurrentStep > i ||
|
||||
(i == (int)PCRB.StagesEnum.Complete && pcrb.CurrentStep == (int)PCRB.StagesEnum.Complete) ||
|
||||
(i == (int)PCRB.StagesEnum.Closed && pcrb.CurrentStep == (int)PCRB.StagesEnum.Closed)) {
|
||||
color = Color.Success;
|
||||
} else if (pcrb.CurrentStep == i) {
|
||||
color = Color.Info;
|
||||
@ -35,14 +37,14 @@
|
||||
}
|
||||
</MudTimeline>
|
||||
|
||||
bool pcrbIsSubmitted = pcrb.CurrentStep > 0 && pcrb.InsertTimeStamp > DateTimeUtilities.MIN_DT;
|
||||
bool pcrbIsComplete = pcrb.ClosedDate < DateTimeUtilities.MAX_DT && pcrb.CurrentStep == (PCRB.Stages.Length - 1);
|
||||
bool pcrbIsSubmitted = pcrb.CurrentStep > (int)PCRB.StagesEnum.Draft && pcrb.InsertTimeStamp > DateTimeUtilities.MIN_DT;
|
||||
bool pcrbIsComplete = pcrb.ClosedDate < DateTimeUtilities.MAX_DT && pcrb.CurrentStep >= (int)PCRB.StagesEnum.Complete;
|
||||
bool userIsOriginator = pcrb.OwnerID == authStateProvider.CurrentUser?.UserID;
|
||||
bool userIsAdmin = authStateProvider.CurrentUser is null ? false : authStateProvider.CurrentUser.IsAdmin;
|
||||
bool userIsApprover = UserIsApprover();
|
||||
|
||||
@if ((!pcrbIsSubmitted && !string.IsNullOrWhiteSpace(pcrb.Title) && (userIsOriginator || userIsAdmin)) ||
|
||||
(!pcrbIsSubmitted && pcrb.PlanNumber > 0 && (userIsOriginator || userIsAdmin))) {
|
||||
(!pcrbIsSubmitted && pcrb.PlanNumber > 0 && (userIsOriginator || userIsAdmin))) {
|
||||
<MudPaper Outlined="true"
|
||||
Class="p-2 m-2 d-flex flex-wrap gap-3 justify-content-center align-content-center"
|
||||
Elevation="10">
|
||||
@ -61,9 +63,9 @@
|
||||
}
|
||||
@if (!pcrbIsSubmitted && pcrb.PlanNumber > 0 && (userIsOriginator || userIsAdmin)) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Secondary"
|
||||
Disabled="@deleteInProcess"
|
||||
OnClick=DeletePCRB>
|
||||
Color="Color.Secondary"
|
||||
Disabled="@deleteInProcess"
|
||||
OnClick=DeletePCRB>
|
||||
@if (deleteInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Processing</MudText>
|
||||
@ -91,114 +93,114 @@
|
||||
}
|
||||
|
||||
<MudPaper Outlined="true"
|
||||
Class="p-2 m-2 d-flex flex-wrap gap-3 justify-content-center align-content-start"
|
||||
Elevation="10">
|
||||
Class="p-2 m-2 d-flex flex-wrap gap-3 justify-content-center align-content-start"
|
||||
Elevation="10">
|
||||
<MudTextField @bind-Value=pcrb.PlanNumber
|
||||
Text="@pcrb.PlanNumber.ToString()"
|
||||
T="int"
|
||||
Disabled="true"
|
||||
Label="Change#"
|
||||
Required
|
||||
Variant="Variant.Outlined" />
|
||||
Text="@pcrb.PlanNumber.ToString()"
|
||||
T="int"
|
||||
Disabled="true"
|
||||
Label="Change#"
|
||||
Required
|
||||
Variant="Variant.Outlined" />
|
||||
<MudTextField @bind-Value=pcrb.Title
|
||||
Text="@pcrb.Title"
|
||||
Disabled="@(pcrbIsSubmitted)"
|
||||
T="string"
|
||||
AutoGrow
|
||||
AutoFocus
|
||||
Immediate
|
||||
Clearable
|
||||
Required
|
||||
Variant="Variant.Outlined"
|
||||
Label="Project Name" />
|
||||
Text="@pcrb.Title"
|
||||
Disabled="@(pcrbIsSubmitted)"
|
||||
T="string"
|
||||
AutoGrow
|
||||
AutoFocus
|
||||
Immediate
|
||||
Clearable
|
||||
Required
|
||||
Variant="Variant.Outlined"
|
||||
Label="Project Name" />
|
||||
<MudSelect T="User"
|
||||
Label="Originator"
|
||||
Variant="Variant.Outlined"
|
||||
Required
|
||||
Clearable
|
||||
AnchorOrigin="Origin.BottomCenter"
|
||||
ToStringFunc="@UserToNameConverter"
|
||||
Disabled=@(pcrbIsSubmitted)
|
||||
@bind-Value=@selectedOwner>
|
||||
Label="Originator"
|
||||
Variant="Variant.Outlined"
|
||||
Required
|
||||
Clearable
|
||||
AnchorOrigin="Origin.BottomCenter"
|
||||
ToStringFunc="@UserToNameConverter"
|
||||
Disabled=@(pcrbIsSubmitted)
|
||||
@bind-Value=@selectedOwner>
|
||||
@foreach (User user in allActiveUsers.OrderBy(u => u.LastName)) {
|
||||
<MudSelectItem T="User" Value="@(user)" />
|
||||
}
|
||||
</MudSelect>
|
||||
<MudSelect T="string"
|
||||
Variant="Variant.Outlined"
|
||||
Required
|
||||
Clearable
|
||||
AnchorOrigin="Origin.BottomCenter"
|
||||
Disabled="@pcrbIsSubmitted"
|
||||
@bind-Value="@pcrb.ChangeLevel"
|
||||
Text="@pcrb.ChangeLevel"
|
||||
Label="Change Level">
|
||||
Variant="Variant.Outlined"
|
||||
Required
|
||||
Clearable
|
||||
AnchorOrigin="Origin.BottomCenter"
|
||||
Disabled="@pcrbIsSubmitted"
|
||||
@bind-Value="@pcrb.ChangeLevel"
|
||||
Text="@pcrb.ChangeLevel"
|
||||
Label="Change Level">
|
||||
<MudSelectItem Value="@("Global - Class 1")" />
|
||||
<MudSelectItem Value="@("Other Site + Mesa - Class 2")" />
|
||||
<MudSelectItem Value="@("Mesa - Class 3")" />
|
||||
</MudSelect>
|
||||
<MudSelect T="string"
|
||||
Variant="Variant.Outlined"
|
||||
Required
|
||||
Clearable
|
||||
AnchorOrigin="Origin.BottomCenter"
|
||||
Disabled="@pcrbIsSubmitted"
|
||||
@bind-Value="@pcrb.Type"
|
||||
Text="@pcrb.Type"
|
||||
Label="Change Type">
|
||||
Variant="Variant.Outlined"
|
||||
Required
|
||||
Clearable
|
||||
AnchorOrigin="Origin.BottomCenter"
|
||||
Disabled="@pcrbIsSubmitted"
|
||||
@bind-Value="@pcrb.Type"
|
||||
Text="@pcrb.Type"
|
||||
Label="Change Type">
|
||||
<MudSelectItem Value="@("Cost Savings")" />
|
||||
<MudSelectItem Value="@("Process Efficiency")" />
|
||||
<MudSelectItem Value="@("Process Improvement")" />
|
||||
<MudSelectItem Value="@("Business Continuity")" />
|
||||
</MudSelect>
|
||||
<MudCheckBox Disabled="@pcrbIsSubmitted"
|
||||
Color="Color.Tertiary"
|
||||
@bind-Value=pcrb.IsITAR
|
||||
Label="Export Controlled"
|
||||
LabelPosition="LabelPosition.Start" />
|
||||
Color="Color.Tertiary"
|
||||
@bind-Value=pcrb.IsITAR
|
||||
Label="Export Controlled"
|
||||
LabelPosition="LabelPosition.Start" />
|
||||
<MudTextField Disabled="true"
|
||||
T="string"
|
||||
Value="@DateTimeUtilities.GetDateAsStringMinDefault(pcrb.InsertTimeStamp)"
|
||||
Label="Submit Date"
|
||||
Variant="Variant.Outlined" />
|
||||
T="string"
|
||||
Value="@DateTimeUtilities.GetDateAsStringMinDefault(pcrb.InsertTimeStamp)"
|
||||
Label="Submit Date"
|
||||
Variant="Variant.Outlined" />
|
||||
<MudTextField Disabled="true"
|
||||
T="string"
|
||||
Value="@DateTimeUtilities.GetDateAsStringMinDefault(pcrb.LastUpdateDate)"
|
||||
Label="Last Update"
|
||||
Variant="Variant.Outlined" />
|
||||
T="string"
|
||||
Value="@DateTimeUtilities.GetDateAsStringMinDefault(pcrb.LastUpdateDate)"
|
||||
Label="Last Update"
|
||||
Variant="Variant.Outlined" />
|
||||
<MudTextField Disabled="true"
|
||||
T="string"
|
||||
Value="@DateTimeUtilities.GetDateAsStringMaxDefault(pcrb.ClosedDate)"
|
||||
Label="Complete Date"
|
||||
Variant="Variant.Outlined" />
|
||||
T="string"
|
||||
Value="@DateTimeUtilities.GetDateAsStringMaxDefault(pcrb.ClosedDate)"
|
||||
Label="Complete Date"
|
||||
Variant="Variant.Outlined" />
|
||||
</MudPaper>
|
||||
|
||||
<MudPaper Outlined="true"
|
||||
Class="p-2 m-2 d-flex flex-wrap gap-3 justify-content-center align-content-start"
|
||||
Elevation="10">
|
||||
Class="p-2 m-2 d-flex flex-wrap gap-3 justify-content-center align-content-start"
|
||||
Elevation="10">
|
||||
<MudTextField @bind-Value=pcrb.ChangeDescription
|
||||
Text="@pcrb.ChangeDescription"
|
||||
Disabled="@(pcrbIsSubmitted)"
|
||||
T="string"
|
||||
AutoGrow
|
||||
Immediate
|
||||
Clearable
|
||||
Required
|
||||
Variant="Variant.Outlined"
|
||||
Label="Description Of Change" />
|
||||
Text="@pcrb.ChangeDescription"
|
||||
Disabled="@(pcrbIsSubmitted)"
|
||||
T="string"
|
||||
AutoGrow
|
||||
Immediate
|
||||
Clearable
|
||||
Required
|
||||
Variant="Variant.Outlined"
|
||||
Label="Description Of Change" />
|
||||
<MudTextField @bind-Value=pcrb.ReasonForChange
|
||||
Text="@pcrb.ReasonForChange"
|
||||
Disabled="@(pcrbIsSubmitted)"
|
||||
T="string"
|
||||
AutoGrow
|
||||
Immediate
|
||||
Clearable
|
||||
Required
|
||||
Variant="Variant.Outlined"
|
||||
Label="Reason For Change" />
|
||||
Text="@pcrb.ReasonForChange"
|
||||
Disabled="@(pcrbIsSubmitted)"
|
||||
T="string"
|
||||
AutoGrow
|
||||
Immediate
|
||||
Clearable
|
||||
Required
|
||||
Variant="Variant.Outlined"
|
||||
Label="Reason For Change" />
|
||||
</MudPaper>
|
||||
|
||||
@if (pcrb.PlanNumber > 0 && pcrb.CurrentStep > 0) {
|
||||
@if (pcrb.PlanNumber > 0 && pcrb.CurrentStep > (int)PCRB.StagesEnum.Draft) {
|
||||
<MudExpansionPanels MultiExpansion="true">
|
||||
@for (int i = 1; i < 4; i++) {
|
||||
int current_i = i;
|
||||
@ -229,7 +231,7 @@
|
||||
int currentStagePendingApprovalsCount = currentStageApprovals.Where(a => a.ItemStatus == 0 && a.AssignedDate > DateTimeUtilities.MIN_DT).Count();
|
||||
int currentStageApprovedApprovalsCount = currentStageApprovals.Where(a => a.ItemStatus == 1).Count();
|
||||
int currentStageDeniedApprovalsCount = currentStageApprovals.Where(a => a.ItemStatus == -1).Count();
|
||||
|
||||
|
||||
bool currentStageApproved = currentStageApprovedApprovalsCount >= 4 && currentStageUnsubmittedApprovalCount == 0 &&
|
||||
currentStagePendingApprovalsCount == 0;
|
||||
bool currentStageSubmitted = (currentStageApprovals.Count() > 0 && currentStagePendingApprovalsCount > 0 &&
|
||||
@ -260,7 +262,7 @@
|
||||
<TitleContent>
|
||||
<MudText Typo="Typo.h4" Align="Align.Center">@($"PCR {current_i}")</MudText>
|
||||
@if (previousStageSubmitted && (attachmentsMissing || actionItemsIncomplete ||
|
||||
affectedDocumentsIncomplete || approvalsIncomplete)) {
|
||||
affectedDocumentsIncomplete || approvalsIncomplete)) {
|
||||
StringBuilder sb = new();
|
||||
int missingSectionCount = 0;
|
||||
sb.Append("Incomplete sections: ");
|
||||
@ -299,31 +301,31 @@
|
||||
</TitleContent>
|
||||
<ChildContent>
|
||||
<MudPaper Outlined="true"
|
||||
Class="p-2 m-2 d-flex flex-column justify-start">
|
||||
|
||||
Class="p-2 m-2 d-flex flex-column justify-start">
|
||||
|
||||
<MudText Typo="Typo.h5" Align="Align.Center">Supporting Documents</MudText>
|
||||
|
||||
|
||||
<MudTable Items="@attachments.Where(a => a.Step == current_i)"
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
<ToolBarContent>
|
||||
<MudStack Row="true" Justify="Justify.Center" Spacing="1" Style="width: 100%">
|
||||
@if (pcrb.ClosedDate >= DateTimeUtilities.MAX_DT && previousStageSubmitted && !currentStageSubmitted) {
|
||||
@if (current_i == 1) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
Href="https://plm.intra.infineon.com/Windchill/netmarkets/jsp/ext/infineon/dcoidreleased.jsp?obid=OR:wt.doc.WTDocument:1477717325"
|
||||
Target="_blank">
|
||||
Color="Color.Tertiary"
|
||||
Href="https://plm.intra.infineon.com/Windchill/netmarkets/jsp/ext/infineon/dcoidreleased.jsp?obid=OR:wt.doc.WTDocument:1477717325"
|
||||
Target="_blank">
|
||||
Download PCRB Template
|
||||
</MudButton>
|
||||
}
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => UploadAttachment(current_i))"
|
||||
Disabled="@attachmentUploadInProcess"
|
||||
StartIcon="@Icons.Material.Filled.AttachFile">
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => UploadAttachment(current_i))"
|
||||
Disabled="@attachmentUploadInProcess"
|
||||
StartIcon="@Icons.Material.Filled.AttachFile">
|
||||
@if (attachmentUploadInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Processing</MudText>
|
||||
@ -354,8 +356,8 @@
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="File Name">
|
||||
<a href="@(@$"{config["FabApprovalApiBaseUrl"]}/pcrb/attachmentFile?path={context.Path}&fileName={context.FileName}")"
|
||||
download="@(context.FileName)"
|
||||
target="_top">
|
||||
download="@(context.FileName)"
|
||||
target="_top">
|
||||
@context.FileName
|
||||
</a>
|
||||
</MudTd>
|
||||
@ -364,9 +366,9 @@
|
||||
@if (pcrb.ClosedDate >= DateTimeUtilities.MAX_DT && previousStageSubmitted && !currentStageSubmitted) {
|
||||
<MudTd Style="text-align:center;">
|
||||
<MudButton Color="Color.Secondary"
|
||||
Variant="Variant.Filled"
|
||||
Disabled="@deleteAttachmentInProcess"
|
||||
OnClick="@((e) => DeleteAttachment(context))">
|
||||
Variant="Variant.Filled"
|
||||
Disabled="@deleteAttachmentInProcess"
|
||||
OnClick="@((e) => DeleteAttachment(context))">
|
||||
@if (deleteAttachmentInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Deleting</MudText>
|
||||
@ -389,24 +391,24 @@
|
||||
</MudText>
|
||||
}
|
||||
<MudTable Items="@actionItems.Where(a => a.Step == current_i)"
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
<ToolBarContent>
|
||||
<MudStack Row="true" Justify="Justify.Center" Spacing="1" Style="width: 100%">
|
||||
@if (previousStageSubmitted && !currentStageSubmitted) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => CreateNewActionItem(current_i))">
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => CreateNewActionItem(current_i))">
|
||||
<MudText>New Action Item</MudText>
|
||||
</MudButton>
|
||||
}
|
||||
@if (currentStagePendingActionItemCount > 0) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
Disabled="@processing"
|
||||
OnClick="@((e) => CloseAllActionItems(current_i))">
|
||||
Color="Color.Tertiary"
|
||||
Disabled="@processing"
|
||||
OnClick="@((e) => CloseAllActionItems(current_i))">
|
||||
<MudText>Complete All Actions</MudText>
|
||||
</MudButton>
|
||||
}
|
||||
@ -448,14 +450,14 @@
|
||||
@if (pcrb.ClosedDate >= DateTimeUtilities.MAX_DT && context.ClosedByID == 0) {
|
||||
<MudTd Style="text-align:center;">
|
||||
<MudButton Color="Color.Tertiary"
|
||||
Variant="Variant.Filled"
|
||||
OnClick="@((e) => UpdateActionItem(context))">
|
||||
Variant="Variant.Filled"
|
||||
OnClick="@((e) => UpdateActionItem(context))">
|
||||
<MudText>Update</MudText>
|
||||
</MudButton>
|
||||
@if (!currentStageSubmitted) {
|
||||
<MudButton Color="Color.Secondary"
|
||||
Variant="Variant.Filled"
|
||||
OnClick="@((e) => DeleteActionItem(context))">
|
||||
Variant="Variant.Filled"
|
||||
OnClick="@((e) => DeleteActionItem(context))">
|
||||
<MudText>Delete</MudText>
|
||||
</MudButton>
|
||||
}
|
||||
@ -468,10 +470,10 @@
|
||||
|
||||
<MudText Typo="Typo.h5" Align="Align.Center">Affected Documents</MudText>
|
||||
<MudTable Items="@pcr3Documents"
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
<HeaderContent>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortBy="new Func<PCR3Document, object>(x=>x.DocType)">
|
||||
@ -513,8 +515,8 @@
|
||||
context.GetEcnNumberString();
|
||||
} else {
|
||||
<MudLink
|
||||
Href=@($"{config["OldFabApprovalUrl"]}/ECN/Edit?IssueID={context.GetEcnNumberString()}")
|
||||
Target="_blank">
|
||||
Href=@($"{config["OldFabApprovalUrl"]}/ECN/Edit?IssueID={context.GetEcnNumberString()}")
|
||||
Target="_blank">
|
||||
@context.GetEcnNumberString()
|
||||
</MudLink>
|
||||
}
|
||||
@ -526,8 +528,8 @@
|
||||
@if (pcrb.ClosedDate >= DateTimeUtilities.MAX_DT && !currentStageSubmitted) {
|
||||
<MudTd Style="text-align:center;">
|
||||
<MudButton Color="Color.Tertiary"
|
||||
Variant="Variant.Filled"
|
||||
OnClick="@((e) => UpdatePCR3Document(context))">
|
||||
Variant="Variant.Filled"
|
||||
OnClick="@((e) => UpdatePCR3Document(context))">
|
||||
<MudText>Update</MudText>
|
||||
</MudButton>
|
||||
</MudTd>
|
||||
@ -539,23 +541,23 @@
|
||||
<MudDivider DividerType="DividerType.Middle" Class="my-1" />
|
||||
<MudText Typo="Typo.h5" Align="Align.Center">Attendees</MudText>
|
||||
<MudTable Items="@attendees.Where(a => a.Step == current_i)"
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
<ToolBarContent>
|
||||
@if (pcrb.ClosedDate >= DateTimeUtilities.MAX_DT && !currentStageSubmitted) {
|
||||
<MudStack Row="true" Justify="Justify.Center" Spacing="1" Style="width: 100%">
|
||||
<MudButton Color="Color.Tertiary"
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
OnClick="@((e) => AddAttendee(current_i))">
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
OnClick="@((e) => AddAttendee(current_i))">
|
||||
<MudText>Add Attendee</MudText>
|
||||
</MudButton>
|
||||
<MudButton Color="Color.Tertiary"
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
OnClick="@((e) => MarkAllAttended(current_i))">
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
OnClick="@((e) => MarkAllAttended(current_i))">
|
||||
<MudText>Mark All Attended</MudText>
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
@ -577,9 +579,9 @@
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Attended?">
|
||||
<MudIconButton Disabled="@(pcrb.ClosedDate < DateTimeUtilities.MAX_DT || currentStageSubmitted)"
|
||||
Icon="@(context.Attended ? Icons.Material.Filled.CheckBox : Icons.Material.Filled.CheckBoxOutlineBlank)"
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => MarkAttended(context))" />
|
||||
Icon="@(context.Attended ? Icons.Material.Filled.CheckBox : Icons.Material.Filled.CheckBoxOutlineBlank)"
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => MarkAttended(context))" />
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
@ -592,33 +594,33 @@
|
||||
</MudText>
|
||||
}
|
||||
<MudTable Items="@approvals.Where(a => a.Step == current_i).OrderBy(a => a.CompletedDate)"
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
<ToolBarContent>
|
||||
@if (pcrb.ClosedDate >= DateTimeUtilities.MAX_DT && previousStageApproved) {
|
||||
<MudStack Row="true" Justify="Justify.Center" Spacing="1" Style="width: 100%">
|
||||
@if (!currentStageSubmitted) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => AddApprover(current_i))">
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => AddApprover(current_i))">
|
||||
<MudText>Add Approver</MudText>
|
||||
</MudButton>
|
||||
}
|
||||
@if (previousStageSubmitted && !currentStageSubmitted && currentStageAttachments.Count() > 0 &&
|
||||
!affectedDocumentsIncomplete && allActionItemsComplete &&
|
||||
!previousStageHasOpenGatedActionItems && atLeastOneAttendeeAttended) {
|
||||
!affectedDocumentsIncomplete && allActionItemsComplete &&
|
||||
!previousStageHasOpenGatedActionItems && atLeastOneAttendeeAttended) {
|
||||
@if (submitInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Submitting</MudText>
|
||||
} else {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
Disabled="@submitInProcess"
|
||||
OnClick="@((e) => SubmitForApproval(current_i))">
|
||||
<MudText>Submit For Approval</MudText>
|
||||
</MudButton>
|
||||
Color="Color.Tertiary"
|
||||
Disabled="@submitInProcess"
|
||||
OnClick="@((e) => SubmitForApproval(current_i))">
|
||||
<MudText>Submit For Approval</MudText>
|
||||
</MudButton>
|
||||
}
|
||||
}
|
||||
</MudStack>
|
||||
@ -652,31 +654,31 @@
|
||||
<MudTd DataLabel="Disposition Date">@DateTimeUtilities.GetDateAsStringMaxDefault(context.CompletedDate)</MudTd>
|
||||
<MudTd DataLabel="Comments">@context.Comments</MudTd>
|
||||
@if (pcrb.ClosedDate >= DateTimeUtilities.MAX_DT && (currentStageUnsubmittedApprovalCount > 0 ||
|
||||
currentStagePendingApprovalsCount > 0)) {
|
||||
currentStagePendingApprovalsCount > 0)) {
|
||||
<MudTd Style="text-align:center;">
|
||||
@if (context.ItemStatus == 0 && userIsAdmin) {
|
||||
<MudButton Color="Color.Warning"
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
OnClick="@((e) => UpdateApproval(context))">
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
OnClick="@((e) => UpdateApproval(context))">
|
||||
<MudText>Update</MudText>
|
||||
</MudButton>
|
||||
}
|
||||
@if ((current_i < 3 || pcr3Documents.Where(d=>d.CompletedByID == 0).Count() == 0) &&
|
||||
(authStateProvider.CurrentUser is not null && context.UserID == authStateProvider.CurrentUser.UserID) &&
|
||||
context.ItemStatus == 0 && context.AssignedDate > DateTimeUtilities.MIN_DT) {
|
||||
(authStateProvider.CurrentUser is not null && context.UserID == authStateProvider.CurrentUser.UserID) &&
|
||||
context.ItemStatus == 0 && context.AssignedDate > DateTimeUtilities.MIN_DT) {
|
||||
<MudButton Color="Color.Tertiary"
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
Disabled="@processing"
|
||||
OnClick="@((e) => ApprovePCR(current_i))">
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
Disabled="@processing"
|
||||
OnClick="@((e) => ApprovePCR(current_i))">
|
||||
<MudText>Approve</MudText>
|
||||
</MudButton>
|
||||
<MudButton Color="Color.Secondary"
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
Disabled="@processing"
|
||||
OnClick="@((e) => DenyPCR(current_i))">
|
||||
Variant="Variant.Filled"
|
||||
Class="m-1"
|
||||
Disabled="@processing"
|
||||
OnClick="@((e) => DenyPCR(current_i))">
|
||||
<MudText>Deny</MudText>
|
||||
</MudButton>
|
||||
}
|
||||
@ -688,6 +690,195 @@
|
||||
</ChildContent>
|
||||
</MudExpansionPanel>
|
||||
}
|
||||
|
||||
@if (pcrb.FollowUps.Count() > 0) {
|
||||
<MudExpansionPanel Class="m-2" Expanded=@(pcrb.CurrentStep == (int)PCRB.StagesEnum.FollowUp &&
|
||||
!pcrb.FollowUps.First().IsComplete)>
|
||||
<TitleContent>
|
||||
<MudText Typo="Typo.h4" Align="Align.Center">Follow Up</MudText>
|
||||
</TitleContent>
|
||||
<ChildContent>
|
||||
<MudPaper Outlined="true"
|
||||
Class="p-2 m-2 d-flex flex-column justify-start gap-2">
|
||||
<MudPaper Outlined="true"
|
||||
Class="p-1"
|
||||
Elevation="15">
|
||||
<MudText Typo="Typo.h5" Align="Align.Center">Supporting Documents</MudText>
|
||||
<MudTable Items="@attachments.Where(a => a.Step == 5)"
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
SortLabel="Sort By"
|
||||
Hover="true">
|
||||
<ToolBarContent>
|
||||
<MudStack Row="true" Justify="Justify.Center" Spacing="1" Style="width: 100%">
|
||||
@if (!pcrb.FollowUps.First().IsComplete && !pcrb.FollowUps.First().IsPendingApproval) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
OnClick="@((e) => UploadAttachment(5))"
|
||||
Disabled="@attachmentUploadInProcess"
|
||||
StartIcon="@Icons.Material.Filled.AttachFile">
|
||||
@if (attachmentUploadInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Processing</MudText>
|
||||
}
|
||||
else {
|
||||
<MudText>Upload Document</MudText>
|
||||
}
|
||||
</MudButton>
|
||||
}
|
||||
@if (!pcrb.FollowUps.First().IsPendingApproval && !pcrb.FollowUps.First().IsComplete &&
|
||||
attachments.Where(a => a.Step == 5).Count() > 0 &&
|
||||
approvals.Where(a => a.Step == 5 &&
|
||||
a.UserID == authStateProvider.CurrentUser.UserID &&
|
||||
a.ItemStatus == 0).Count() > 0) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
OnClick="SubmitFollowUpForApproval"
|
||||
Disabled="@followUpSubmitInProcess">
|
||||
@if (followUpSubmitInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Processing</MudText>
|
||||
}
|
||||
else {
|
||||
<MudText>Submit For Closure</MudText>
|
||||
}
|
||||
</MudButton>
|
||||
}
|
||||
@if (pcrb.FollowUps.First().IsPendingApproval && !pcrb.FollowUps.First().IsComplete &&
|
||||
attachments.Where(a => a.Step == 5).Count() > 0 &&
|
||||
approvals.Where(a => a.Step == 5 &&
|
||||
a.UserID == authStateProvider.CurrentUser.UserID).Count() > 0)
|
||||
{
|
||||
@if (userIsQA) {
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Tertiary"
|
||||
OnClick="ApproveFollowUp"
|
||||
Disabled="@followUpApproveInProcess">
|
||||
@if (followUpApproveInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Processing</MudText>
|
||||
} else {
|
||||
<MudText>Close</MudText>
|
||||
}
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Secondary"
|
||||
OnClick="@((e) => DenyFollowUp("Reject"))"
|
||||
Disabled="@followUpDenyInProcess">
|
||||
@if (followUpDenyInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Processing</MudText>
|
||||
} else {
|
||||
<MudText>Reject</MudText>
|
||||
}
|
||||
</MudButton>
|
||||
} else
|
||||
{
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Secondary"
|
||||
OnClick="@((e) => DenyFollowUp("Recall"))"
|
||||
Disabled="@followUpDenyInProcess">
|
||||
@if (followUpDenyInProcess) {
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Processing</MudText>
|
||||
} else {
|
||||
<MudText>Recall</MudText>
|
||||
}
|
||||
</MudButton>
|
||||
}
|
||||
}
|
||||
</MudStack>
|
||||
</ToolBarContent>
|
||||
<HeaderContent>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortBy="new Func<PCRBAttachment, object>(x=>x.FileName)">
|
||||
File Name
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortBy="new Func<PCRBAttachment, object>(x=>x.UploadedBy is null ? string.Empty : x.UploadedBy.LastName)">
|
||||
Uploaded By
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortBy="new Func<PCRBAttachment, object>(x=>x.UploadDateTime)">
|
||||
Uploaded Date
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="File Name">
|
||||
<a href="@(@$"{config["FabApprovalApiBaseUrl"]}/pcrb/attachmentFile?path={context.Path}&fileName={context.FileName}")"
|
||||
download="@(context.FileName)"
|
||||
target="_top">
|
||||
@context.FileName
|
||||
</a>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Uploaded By">@(context.UploadedBy is null ? string.Empty : context.UploadedBy.GetFullName())</MudTd>
|
||||
<MudTd DataLabel="Uploaded Date">@context.UploadDateTime.ToString("yyyy-MM-dd HH:mm")</MudTd>
|
||||
@if (!pcrb.FollowUps.First().IsComplete && !pcrb.FollowUps.First().IsPendingApproval)
|
||||
{
|
||||
<MudTd Style="text-align:center;">
|
||||
<MudButton Color="Color.Secondary"
|
||||
Variant="Variant.Filled"
|
||||
Disabled="@deleteAttachmentInProcess"
|
||||
OnClick="@((e) => DeleteAttachment(context))">
|
||||
@if (deleteAttachmentInProcess)
|
||||
{
|
||||
<MudProgressCircular Class="m-1" Size="Size.Small" Indeterminate="true" />
|
||||
<MudText>Deleting</MudText>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudText>Delete</MudText>
|
||||
}
|
||||
</MudButton>
|
||||
</MudTd>
|
||||
}
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
</MudPaper>
|
||||
<MudPaper Outlined="true"
|
||||
Class="p-2 d-flex flex-column flex-wrap">
|
||||
<MudText Typo="Typo.h5" Align="Align.Center">Follow Up Date</MudText>
|
||||
<MudDatePicker Label="Follow Up Date"
|
||||
Date="pcrb.FollowUps.First().FollowUpDate"
|
||||
MinDate="@(pcrb.ClosedDate)"
|
||||
Color="@Color.Tertiary"
|
||||
Disabled="@(!userIsQA ||
|
||||
pcrb.FollowUps.Count() == 0 ||
|
||||
pcrb.FollowUps.First().IsComplete ||
|
||||
pcrb.FollowUps.First().IsPendingApproval)"
|
||||
Rounded="true"
|
||||
Error="false"
|
||||
Elevation="6"
|
||||
DateChanged="UpdateFollowUpDate"
|
||||
Variant="Variant.Outlined" />
|
||||
</MudPaper>
|
||||
@if (followUpComments.Count() > 0) {
|
||||
<MudPaper Outlined="true" Class="p-1" Elevation="15">
|
||||
<MudText Typo="Typo.h5" Align="Align.Center">Revision Comments</MudText>
|
||||
<MudTable Items="@followUpComments"
|
||||
Class="m-2"
|
||||
Striped="true"
|
||||
Hover="true">
|
||||
<HeaderContent>
|
||||
<MudTh>Date</MudTh>
|
||||
<MudTh>User</MudTh>
|
||||
<MudTh>Comment</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="Date">@context.CommentDate.ToString("MM/dd/yyyy hh:mm")</MudTd>
|
||||
<MudTd DataLabel="User">@(context.User?.GetFullName() ?? string.Empty)</MudTd>
|
||||
<MudTd DataLabel="Comment">@context.Comment</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
</MudPaper>
|
||||
}
|
||||
</MudPaper>
|
||||
</ChildContent>
|
||||
</MudExpansionPanel>
|
||||
}
|
||||
</MudExpansionPanels>
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user