File tree Expand file tree Collapse file tree
src/DfE.ExternalApplications.Web Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010 <ItemGroup >
1111 <PackageReference Include =" DfE.CoreLibs.Caching" Version =" 1.0.10" />
12+ <PackageReference Include =" DfE.CoreLibs.Contracts" Version =" 1.0.36" />
1213 <PackageReference Include =" GovUK.Dfe.ExternalApplications.Api.Client" Version =" 0.1.13" />
1314 <PackageReference Include =" GovUk.Frontend.AspNetCore" Version =" 3.2.2" />
1415 <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.3" />
Original file line number Diff line number Diff line change 33@using DfE .CoreLibs .Contracts .ExternalApplications .Models .Response
44@using GovUk .Frontend .AspNetCore .TagHelpers
55@using Microsoft .AspNetCore .Authorization
6+ @using System .ComponentModel ;
67@addTagHelper *, DfE.CoreLibs.Security
78@model DfE .ExternalApplications .Web .Pages .Applications .DashboardModel
89@inject IAuthorizationService AuthService
6162 var statusClass = app .CalculatedStatus == ApplicationStatus .Submitted ? " govuk-tag--green" :
6263 app .CalculatedStatus == ApplicationStatus .InProgress ? " govuk-tag--blue" : " govuk-tag--grey" ;
6364
65+ var appStatusInfo = @app .CalculatedStatus .GetType ().GetField (@app .CalculatedStatus .ToString ());
66+ var descriptionAttributes = (DescriptionAttribute [])appStatusInfo ! .GetCustomAttributes (typeof (DescriptionAttribute ), false );
67+ var appStatusDescription = descriptionAttributes .Length > 0 ? descriptionAttributes [0 ].Description : @app .CalculatedStatus .ToString ();
68+
6469 <tr class =" govuk-table__row" >
6570 <td class =" govuk-table__cell" >@app.ApplicationReference </td >
6671 <td class =" govuk-table__cell" >@app.DateCreated.ToString( " d MMMM yyyy" )</td >
6974 </td >
7075 <td class =" govuk-table__cell" >
7176 <strong class =" govuk-tag @statusClass" >
72- @app.CalculatedStatus
77+ @appStatusDescription
7378 </strong >
7479 </td >
7580 <td class =" govuk-table__cell" >
Original file line number Diff line number Diff line change @@ -180,10 +180,10 @@ public string GetTaskStatusDisplayText(Domain.Models.TaskStatus status)
180180 return status switch
181181 {
182182 Domain . Models . TaskStatus . Completed => "Completed" ,
183- Domain . Models . TaskStatus . InProgress => "In Progress " ,
184- Domain . Models . TaskStatus . NotStarted => "Not Started " ,
185- Domain . Models . TaskStatus . CannotStartYet => "Cannot Start Yet " ,
186- _ => "Not Started "
183+ Domain . Models . TaskStatus . InProgress => "In progress " ,
184+ Domain . Models . TaskStatus . NotStarted => "Not started " ,
185+ Domain . Models . TaskStatus . CannotStartYet => "Cannot start yet " ,
186+ _ => "Not started "
187187 } ;
188188 }
189189
You can’t perform that action at this time.
0 commit comments