Skip to content

Commit

Permalink
Merge pull request #354 from ucdavis/JCS/AwardStatus
Browse files Browse the repository at this point in the history
Jcs/award status
  • Loading branch information
jSylvestre authored May 8, 2024
2 parents 5dc0049 + 6eb3cb6 commit 9c5b4e5
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Finjector.Core/Finjector.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AggieEnterpriseApi" Version="0.2.219" />
<PackageReference Include="AggieEnterpriseApi" Version="0.2.222" />
<PackageReference Include="ietws" Version="0.2.22" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.24" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.24">
Expand Down
1 change: 1 addition & 0 deletions Finjector.Core/Models/AeDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public class PpmDetails
public string? ProjectCompletionDate { get; set; } = string.Empty;

public string? ProjectStatus { get; set; } = string.Empty;
public string? AwardStatus { get; set; } = string.Empty;

public string? ProjectTypeName { get; set; } = string.Empty;

Expand Down
19 changes: 18 additions & 1 deletion Finjector.Core/Services/AggieEnterpriseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ public async Task<AeDetails> GetAeDetailsAsync(string segmentString)
SetGlSegmentDetails(aeDetails, glSegments, data);
SetGlOrgApprovers(aeDetails, data);

aeDetails.SegmentDetails = aeDetails.SegmentDetails.OrderBy(s => s.Order).ToList();

return aeDetails;
}
if(aeDetails.ChartStringType == FinancialChartStringType.Ppm)
Expand Down Expand Up @@ -140,6 +142,7 @@ public async Task<AeDetails> GetAeDetailsAsync(string segmentString)
await SetPpmPostingSegmentDetails(aeDetails, data);
SetPpmDetails(aeDetails, data, ppmSegments);

aeDetails.SegmentDetails = aeDetails.SegmentDetails.OrderBy(s => s.Order).ToList();

return aeDetails;
}
Expand Down Expand Up @@ -401,6 +404,7 @@ private async Task SetExtraPpmSegmentDetails(AeDetails aeDetails, IDisplayDetail
});
}


if (!string.IsNullOrWhiteSpace(data.PpmSegmentStringValidate.Segments.FundingSource))
{
aeDetails.SegmentDetails.Add(new SegmentDetails
Expand Down Expand Up @@ -440,6 +444,16 @@ private async Task SetAwardSpecificPpmGlInfo(AeDetails aeDetails, IDisplayDetail
if (awardResult != null) //&& awardResult.EligibleForUse
{
awardDetail.Name = awardResult.Name;

if(!string.IsNullOrWhiteSpace( awardResult.AwardStatus?.ToString()))
{
if(aeDetails.PpmDetails == null)
{
aeDetails.PpmDetails = new PpmDetails();
}
aeDetails.PpmDetails.AwardStatus = awardResult.AwardStatus.ToString();
}

if (awardResult.GlFundCode != null)
{
var segment = new SegmentDetails
Expand Down Expand Up @@ -589,7 +603,10 @@ private async Task SetPpmPostingSegmentDetails(AeDetails aeDetails, IDisplayDeta

private void SetPpmDetails(AeDetails aeDetails, IDisplayDetailsPpmResult data, PpmSegments ppmSegments)
{
aeDetails.PpmDetails = new PpmDetails();
if (aeDetails.PpmDetails == null) //We might set this if there is an award
{
aeDetails.PpmDetails = new PpmDetails();
}

var entity = data.PpmProjectByNumber?.LegalEntityCode ?? "0000";
var fund = data.PpmTaskByProjectNumberAndTaskNumber?.GlPostingFundCode ?? "00000";
Expand Down
10 changes: 10 additions & 0 deletions Finjector.Web/ClientApp/src/components/Details/PpmDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ const PpmDetailsPage: React.FC<PpmDetailsProps> = ({ details }) => {
</CopyToClipboardHover>
}
/>
{details.awardStatus && (
<DetailsRow
headerColText="Award Status"
column2={
<CopyToClipboardHover value={details.awardStatus} id="awardStatus">
{details.awardStatus}
</CopyToClipboardHover>
}
/>
)}
<DetailsRow
headerColText="POETAF String"
column2={
Expand Down
1 change: 1 addition & 0 deletions Finjector.Web/ClientApp/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export interface PpmDetails {
projectStartDate: string;
projectCompletionDate: string;
projectStatus: string;
awardStatus?: string;
projectTypeName: string;
poetString: string;
glRevenueTransferString: string;
Expand Down
2 changes: 1 addition & 1 deletion Finjector.Web/Finjector.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AggieEnterpriseApi" Version="0.2.219" />
<PackageReference Include="AggieEnterpriseApi" Version="0.2.222" />
<PackageReference Include="Ietws" Version="0.2.22" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="6.0.0" />
Expand Down

0 comments on commit 9c5b4e5

Please sign in to comment.