-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start date and end date added to Service Message Banner (#458)
* Start date and end date added to Service Message * version number change * removed commented lines of code * removed translation from component * version number changed * unit test text changed * version updated * error handling message added * banner message errors modified * version number amended * error reworked and unit test * version change * AC04 AC05 AC06 and unit test covered * version number changed * error bug fix * version text change * message error bug fixes * version change * reworked greater than dates * unit test and version update * Update to release version number --------- Co-authored-by: RiteshHMCTS <74713687+RiteshHMCTS@users.noreply.github.com> Co-authored-by: Ritesh Dsouza <ritesh.dsouza@HMCTS.net> Co-authored-by: Josh <josh.glasgow@hmcts.net>
- Loading branch information
1 parent
8ae32ef
commit 0136a45
Showing
10 changed files
with
302 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
projects/exui-common-lib/src/lib/components/service-message/service-message.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.govuk-link--no-visited-state { | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
projects/exui-common-lib/src/lib/components/service-message/service-message.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
import { Component, EventEmitter, Input, Output } from '@angular/core'; | ||
import { ServiceMessages } from '../../models/service-message.model'; | ||
|
||
@Component({ | ||
selector: 'xuilib-service-message', | ||
templateUrl: './service-message.component.html' | ||
templateUrl: './service-message.component.html', | ||
styleUrls: ['./service-message.component.scss'] | ||
}) | ||
export class ServiceMessageComponent { | ||
@Input() public message: string; | ||
@Input() public key: string; | ||
@Output() public hideMessage = new EventEmitter<string>(); | ||
@Input() public message_en: string; | ||
@Input() public message_cy?: string; | ||
@Input() public key: ServiceMessages; | ||
@Output() public hideMessage = new EventEmitter<ServiceMessages>(); | ||
constructor() { } | ||
|
||
public onHideMessageEvent(key: string) { | ||
public onHideMessageEvent(key: ServiceMessages) { | ||
this.hideMessage.emit(key); | ||
} | ||
} |
22 changes: 19 additions & 3 deletions
22
projects/exui-common-lib/src/lib/components/service-messages/service-messages.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
<div *ngIf="filteredMessages?.size > 0" class="govuk-width-container govuk-!-margin-top-6"> | ||
<xuilib-service-message *ngFor="let message of filteredMessages | keyvalue" [key]="message.key" | ||
[message]="message.value | rpxTranslate" (hideMessage)="hideMessage($event)"></xuilib-service-message> | ||
<div *ngIf="isBannerError" class="govuk-width-container govuk-!-margin-top-6"> | ||
<div class="hmcts-banner hmcts-banner--warning" *ngFor="let errMsg of bannerErrorMsgs"> | ||
<svg class="hmcts-banner__icon" fill="currentColor" role="presentation" focusable="false" | ||
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25"> | ||
<path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z" /> | ||
</svg> | ||
<div class="hmcts-banner__message"> | ||
<span class="hmcts-banner__assistive">{{'Warning' | rpxTranslate}}</span> | ||
<h2 class="govuk-heading-s">Error:</h2> | ||
<p [innerHTML]="errMsg.message"></p> | ||
</div> | ||
</div> | ||
</div> | ||
<div *ngIf="filteredMessages?.length > 0" class="govuk-width-container govuk-!-margin-top-6"> | ||
<xuilib-service-message *ngFor="let message of filteredMessages" [key]="message" | ||
[message_en]="message?.message_en | rpxTranslate" | ||
[message_cy]="message?.message_cy | rpxTranslate" | ||
(hideMessage)="hideMessage($event)"> | ||
</xuilib-service-message> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.