Skip to content

Commit

Permalink
Added new booking status' display to booking list and detial views
Browse files Browse the repository at this point in the history
  • Loading branch information
will-craig committed Sep 15, 2023
1 parent 87a69ee commit 7c6be8f
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 63 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,4 @@ jasmine-tests

.env
.angular/
/AdminWebsite/AdminWebsite/ClientApp/karma.conf.js
6 changes: 3 additions & 3 deletions AdminWebsite/AdminWebsite.AcceptanceTests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@
},
"BookingsApi.Client": {
"type": "Transitive",
"resolved": "1.44.57",
"contentHash": "TcoiHRRew9LRr6eXlNOjRIna8/9vigUTVdCXI2xwr6gnWbMUhq9D0Xfl9kBD+hhW8ATPKL7x9NIcv+fxqf6wJw==",
"resolved": "1.47.1-pr-0720-0003",
"contentHash": "xxk51jERKtcoNU8L1iLENJLJJFD1Hwxffwo1gbsyZLzhVVx5MmRKS+ypFy/wzkk9zhP3mHZsCPYG2HuAgl4q8g==",
"dependencies": {
"Microsoft.AspNetCore.Mvc.Core": "2.2.5"
}
Expand Down Expand Up @@ -2632,7 +2632,7 @@
"adminwebsite": {
"type": "Project",
"dependencies": {
"BookingsApi.Client": "[1.44.57, )",
"BookingsApi.Client": "[1.47.1-pr-0720-0003, )",
"FluentValidation.AspNetCore": "[10.4.0, )",
"LaunchDarkly.ServerSdk": "[7.0.3, )",
"MicroElements.Swashbuckle.FluentValidation": "[5.7.0, )",
Expand Down
6 changes: 3 additions & 3 deletions AdminWebsite/AdminWebsite.IntegrationTests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@
},
"BookingsApi.Client": {
"type": "Transitive",
"resolved": "1.44.57",
"contentHash": "TcoiHRRew9LRr6eXlNOjRIna8/9vigUTVdCXI2xwr6gnWbMUhq9D0Xfl9kBD+hhW8ATPKL7x9NIcv+fxqf6wJw==",
"resolved": "1.47.1-pr-0720-0003",
"contentHash": "xxk51jERKtcoNU8L1iLENJLJJFD1Hwxffwo1gbsyZLzhVVx5MmRKS+ypFy/wzkk9zhP3mHZsCPYG2HuAgl4q8g==",
"dependencies": {
"Microsoft.AspNetCore.Mvc.Core": "2.2.5"
}
Expand Down Expand Up @@ -2064,7 +2064,7 @@
"adminwebsite": {
"type": "Project",
"dependencies": {
"BookingsApi.Client": "[1.44.57, )",
"BookingsApi.Client": "[1.47.1-pr-0720-0003, )",
"FluentValidation.AspNetCore": "[10.4.0, )",
"LaunchDarkly.ServerSdk": "[7.0.3, )",
"MicroElements.Swashbuckle.FluentValidation": "[5.7.0, )",
Expand Down
6 changes: 3 additions & 3 deletions AdminWebsite/AdminWebsite.UnitTests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
},
"BookingsApi.Client": {
"type": "Transitive",
"resolved": "1.44.57",
"contentHash": "TcoiHRRew9LRr6eXlNOjRIna8/9vigUTVdCXI2xwr6gnWbMUhq9D0Xfl9kBD+hhW8ATPKL7x9NIcv+fxqf6wJw==",
"resolved": "1.47.1-pr-0720-0003",
"contentHash": "xxk51jERKtcoNU8L1iLENJLJJFD1Hwxffwo1gbsyZLzhVVx5MmRKS+ypFy/wzkk9zhP3mHZsCPYG2HuAgl4q8g==",
"dependencies": {
"Microsoft.AspNetCore.Mvc.Core": "2.2.5"
}
Expand Down Expand Up @@ -1938,7 +1938,7 @@
"adminwebsite": {
"type": "Project",
"dependencies": {
"BookingsApi.Client": "[1.44.57, )",
"BookingsApi.Client": "[1.47.1-pr-0720-0003, )",
"FluentValidation.AspNetCore": "[10.4.0, )",
"LaunchDarkly.ServerSdk": "[7.0.3, )",
"MicroElements.Swashbuckle.FluentValidation": "[5.7.0, )",
Expand Down
2 changes: 1 addition & 1 deletion AdminWebsite/AdminWebsite/AdminWebsite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BookingsApi.Client" Version="1.44.57" />
<PackageReference Include="BookingsApi.Client" Version="1.47.1-pr-0720-0003" />
<PackageReference Include="LaunchDarkly.ServerSdk" Version="7.0.3" />
<PackageReference Include="MicroElements.Swashbuckle.FluentValidation" Version="5.7.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.51.0" />
Expand Down
26 changes: 13 additions & 13 deletions AdminWebsite/AdminWebsite/ClientApp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion AdminWebsite/AdminWebsite/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"eslint-plugin-import": "^2.27.5",
"jasmine-core": "~3.7.1",
"jasmine-spec-reporter": "~6.0.0",
"karma": "^6.4.1",
"karma": "^6.4.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "^2.0.3",
"karma-jasmine": "~4.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ <h1 class="govuk-heading-l" id="hearingNumber">{{ hearing.HearingCaseNumber }}</
<div *ngIf="hearing.isCancelled" id="lblCancelled" class="vh-cancelled-booking">{{ hearing.Status }}</div>
<div *ngIf="hearing.isCancelled" id="lblCancelledDetails" class="vh-cancelled-reason">{{ hearing.CancelReason }}</div>
</div>
<div *ngIf="hearing.isCreated" id="lblCreated" class="vh-created-booking">Confirmed</div>
<div *ngIf="hearing.hasBookingConfirmationFailed" id="lblFailedConfirmation" class="vh-created-confirmation-failed">Failed</div>
<div *ngIf="hearing.isCreated" id="lblCreated" class="vh-status vh-status vh-created-booking">Confirmed</div>
<div *ngIf="hearing.hasBookingConfirmationFailed" id="lblFailedConfirmation" class="vh-status vh-created-confirmation-failed">Failed</div>
<div *ngIf="hearing.hasBookingWithNoJudge" id="vh-confirmed-with-no-judge" class="vh-status vh-created-booking-with-no-judge">No Judge</div>
<div *ngIf="hearing.hasConfirmationWithNoJudge" id="vh-booked-with-no-judge" class="vh-status vh-confirmed-booking-with-no-judge">Confirmed No Judge</div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ <h1 class="govuk-heading-l">{{ title }}</h1>
<span *ngIf="!detail?.JudgeName && ejudFeatureFlag" class="vh-sml vh-nojudge">NO JUDGE ASSIGNED</span>
<div class="vh-sml vh-col govuk-!-margin-top-2">{{ detail.StartTime | amLocal | amDateFormat : 'h:mm a' }}</div>
<div class="govuk-hint vh-sml vh-col vh-font-black">listed for {{ detail.DurationInHoursAndMinutes }}</div>
<div *ngIf="detail.isCancelled" class="vh-cancelled-booking">{{ detail.Status }}</div>
<div *ngIf="detail.isCreated" class="vh-created-booking">Confirmed</div>
<div *ngIf="detail.hasBookingConfirmationFailed" class="vh-confirmation-failed">Failed</div>
<div *ngIf="detail.isCancelled" class="vh-status vh-cancelled-booking">{{ detail.Status }}</div>
<div *ngIf="detail.isCreated" class="vh-status vh-created-booking">Confirmed</div>
<div *ngIf="detail.hasBookingConfirmationFailed" class="vh-status vh-confirmation-failed">Failed</div>
<div *ngIf="detail.hasBookingWithNoJudge" class="vh-status vh-created-booking-no-judge">No Judge</div>
<div *ngIf="detail.hasConfirmationWithNoJudge" class="vh-status vh-confirmed-booking-no-judge ">Confirmed No Judge</div>
</div>
<div class="govuk-grid-column-one-quarter">
<div class="vh-sml">{{ detail.HearingCaseNumber }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@ p {
font-weight: normal;
text-decoration: none;
}
.vh-status {
color: #ffffff;
margin-left: 9px;
padding-top: 3px;
padding-bottom: 3px;
width: 50%;
font-weight: 200;
text-align: center;
}

.vh-cancelled-booking,
.vh-confirmation-failed {
color: #ffffff;
background-color: #d4351c;
margin-left: 9px;
padding-top: 3px;
padding-bottom: 3px;
width: 50%;
font-weight: 200;
text-align: center;
background-color: #d4351c;
}

.vh-created-booking {
color: #ffffff;
background-color: #3868c2;
margin-left: 9px;
padding-top: 3px;
padding-bottom: 3px;
width: 50%;
font-weight: 200;
text-align: center;

.vh-created-booking{
background-color: #3868c2;
}
.vh-confirmed-booking-no-judge,
.vh-created-booking-no-judge{
background-color: #d53880;
}

.vh-row-cancelled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,12 @@ export class BookingsDetailsModel {
public get hasBookingConfirmationFailed(): boolean {
return this.Status === 'Failed';
}

public get hasBookingWithNoJudge(): boolean {
return this.Status === 'BookedWithoutJudge';
}

public get hasConfirmationWithNoJudge(): boolean {
return this.Status === 'ConfirmedWithoutJudge';
}
}
22 changes: 10 additions & 12 deletions AdminWebsite/AdminWebsite/ClientApp/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@
float: left;
}

.vh-created-booking {
.vh-status{
color: #ffffff;
background-color: #3868c2;
padding-top: 7px;
padding-bottom: 7px;
width: 10%;
Expand All @@ -143,18 +142,17 @@
float: left;
}

.vh-created-booking {
background-color: #3868c2;
}

.vh-created-confirmation-failed {
color: #ffffff;
background-color: #d4351c;
padding-top: 7px;
padding-bottom: 7px;
width: 10%;
font-weight: 300;
text-align: center;
margin-top: 1px;
font-size: 18px;
font-family: 'nta', Arial, sans-serif;
float: left;
}

.vh-created-booking-with-no-judge,
.vh-confirmed-booking-with-no-judge{
background-color: #d53880;
}

.vh-btncancel {
Expand Down
4 changes: 3 additions & 1 deletion AdminWebsite/AdminWebsite/Contracts/Enums/BookingStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ public enum BookingStatus
Booked = 1,
Created = 2,
Cancelled = 3,
Failed = 4
Failed = 4,
BookedWithoutJudge = 5,
ConfirmedWithoutJudge = 6
}
6 changes: 3 additions & 3 deletions AdminWebsite/AdminWebsite/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"BookingsApi.Client": {
"type": "Direct",
"requested": "[1.44.57, )",
"resolved": "1.44.57",
"contentHash": "TcoiHRRew9LRr6eXlNOjRIna8/9vigUTVdCXI2xwr6gnWbMUhq9D0Xfl9kBD+hhW8ATPKL7x9NIcv+fxqf6wJw==",
"requested": "[1.47.1-pr-0720-0003, )",
"resolved": "1.47.1-pr-0720-0003",
"contentHash": "xxk51jERKtcoNU8L1iLENJLJJFD1Hwxffwo1gbsyZLzhVVx5MmRKS+ypFy/wzkk9zhP3mHZsCPYG2HuAgl4q8g==",
"dependencies": {
"Microsoft.AspNetCore.Mvc.Core": "2.2.5"
}
Expand Down
2 changes: 1 addition & 1 deletion charts/vh-admin-web/values.dev.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ java:
AZUREAD__REDIRECTURI: https://${SERVICE_FQDN}/home
DOM1__POSTLOGOUTREDIRECTURI: https://${SERVICE_FQDN}/logout
DOM1__REDIRECTURI: https://${SERVICE_FQDN}/home
DOM1__REDIRECTURI: https://${SERVICE_FQDN}/home
VHSERVICES__BOOKINGSAPIURL: https://vh-bookings-api-pr-720.dev.platform.hmcts.net/

0 comments on commit 7c6be8f

Please sign in to comment.