Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIH-10160 Added new booking status to display in booking list and detail views #1270

Merged
merged 19 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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-created-booking">Confirmed</div>
<div *ngIf="hearing.hasBookingConfirmationFailed" id="lblFailedConfirmation" class="vh-status vh-created-confirmation-failed">
Failed
</div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.vh-sml {
font-size: smaller;
}

.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 {
background-color: #d4351c;
}

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

.vh-nojudge {
background: #d4351c;
color: #ffffff;
padding: 0px 4px;
}

.vh-col {
margin-left: 10px;
}

.govuk-hint {
margin-bottom: 0;
}

.vh-font-black {
color: #0b0c0c;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<span *ngIf="this.hasNoJudge" class="vh-sml vh-nojudge">NO JUDGE ASSIGNED</span>
<div class="vh-sml vh-col govuk-!-margin-top-2">{{ bookingDetails.StartTime | amLocal | amDateFormat : 'h:mm a' }}</div>
<div class="govuk-hint vh-sml vh-col vh-font-black">listed for {{ bookingDetails.DurationInHoursAndMinutes }}</div>
<div
*ngIf="statusMessage !== null"
class="vh-status"
[ngClass]="{
'vh-cancelled-booking': bookingDetails.isCancelled,
'vh-created-booking': bookingDetails.isCreated || bookingDetails.hasConfirmationWithNoJudge,
'vh-confirmation-failed': bookingDetails.hasBookingConfirmationFailed
}"
>
{{ this.statusMessage }}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Component, Input } from '@angular/core';
import { BookingsDetailsModel } from '../../common/model/bookings-list.model';
@Component({
selector: 'app-booking-status',
templateUrl: './booking-status.component.html',
styleUrls: ['./booking-status.component.css']
})
export class BookingStatusComponent {
@Input() bookingDetails: BookingsDetailsModel;
will-craig marked this conversation as resolved.
Show resolved Hide resolved

public get statusMessage(): string {
switch (this.bookingDetails.Status) {
case 'Created':
case 'hasConfirmationWithNoJudge':
return 'Confirmed';
case 'Cancelled':
return 'Cancelled';
case 'Failed':
return 'Failed';
default:
return null;
}
}

public get hasNoJudge(): boolean {
return this.bookingDetails.Status === 'BookedWithoutJudge' || this.bookingDetails.Status === 'ConfirmedWithoutJudge';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { CopySipComponent } from './copy-sip/copy-sip.component';
import { CopyConferencePhoneComponent } from './copy-conference-phone/copy-conference-phone.component';
import { CopyJoinLinkComponent } from './copy-join-link/copy-join-link.component';
import { NgSelectModule } from '@ng-select/ng-select';
import { BookingStatusComponent } from './booking-status/booking-status.component';

@NgModule({
imports: [SharedModule, BookingsListRoutingModule, PopupModule, MomentModule, NgSelectModule],
Expand All @@ -23,15 +24,17 @@ import { NgSelectModule } from '@ng-select/ng-select';
HearingDetailsComponent,
CopySipComponent,
CopyConferencePhoneComponent,
CopyJoinLinkComponent
CopyJoinLinkComponent,
BookingStatusComponent
],
providers: [],
exports: [
BookingsListComponent,
BookingDetailsComponent,
ParticipantDetailsComponent,
BookingParticipantListComponent,
HearingDetailsComponent
HearingDetailsComponent,
BookingStatusComponent
]
})
export class BookingsListModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,7 @@ <h1 class="govuk-heading-l">{{ title }}</h1>
>
<div class="govuk-grid-row vh-row vh-a" (click)="rowSelected(b, i)" [attr.id]="b + '_' + i">
<div class="govuk-grid-column-one-quarter">
<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>
<app-booking-status [bookingDetails]="detail"></app-booking-status>
</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 @@ -66,29 +66,6 @@ p {
text-decoration: none;
}

.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;
}

.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-row-cancelled {
background-color: lightgray;
padding-top: 3px;
Expand All @@ -114,12 +91,6 @@ p {
box-shadow: none;
}

.vh-nojudge {
background: govuk-colour('red');
color: govuk-colour('white');
padding: 0px 4px;
}

.vh-searchicon {
height: 12px;
margin-right: 6px;
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 {
will-craig marked this conversation as resolved.
Show resolved Hide resolved
return this.Status === 'BookedWithoutJudge';
}

public get hasConfirmationWithNoJudge(): boolean {
return this.Status === 'ConfirmedWithoutJudge';
}
}
17 changes: 5 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,12 @@
float: left;
}

.vh-created-booking {
background-color: #3868c2;
will-craig marked this conversation as resolved.
Show resolved Hide resolved
}

.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-btncancel {
Expand Down
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
Loading