Skip to content

Commit

Permalink
Added component to booking-details page
Browse files Browse the repository at this point in the history
  • Loading branch information
will-craig committed Sep 26, 2023
1 parent b8a85b7 commit dd4eb80
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@
color: #ffffff;
background-color: #d4351c;
}

.vh-booking-detail-status {
width: 25%;
padding-top: 7px;
padding-bottom: 7px;
float: left;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@
<div class="vh-title">
<h1 class="govuk-heading-l" id="hearingNumber">{{ hearing.HearingCaseNumber }}</h1>
</div>
<div *ngIf="hearing.isCancelled" id="lblCancelled" class="vh-cancelled-booking">{{ hearing.Status }}</div>
<div class="vh-booking-detail-status">
<app-booking-status [bookingDetails]="hearing"></app-booking-status>
</div>
<div *ngIf="hearing.isCancelled" id="lblCancelledDetails" class="vh-cancelled-reason">{{ hearing.CancelReason }}</div>
</div>
<div *ngIf="hearing.isCreated || hearing.hasConfirmationWithNoJudge" 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
@@ -1,6 +1,8 @@
<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="this.showTime">
<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>
<div
*ngIf="statusMessage !== null"
class="vh-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { BookingsDetailsModel } from '../../common/model/bookings-list.model';
})
export class BookingStatusComponent {
@Input() bookingDetails: BookingsDetailsModel;
@Input() showTime = false;

public get statusMessage(): string {
switch (this.bookingDetails.Status) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +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">
<app-booking-status [bookingDetails]="detail"></app-booking-status>
<app-booking-status [bookingDetails]="detail" [showTime]="true"></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 @@ -103,3 +103,10 @@ p {
.ng-select.custom ::ng-deep .ng-placeholder {
color: govuk-colour('black');
}

.vh-booking-detail-status {
width: 90%;
padding-top: 7px;
padding-bottom: 7px;
float: left;
}

0 comments on commit dd4eb80

Please sign in to comment.