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

EMBCESSMOD-5104: fix for householdmember and pets tab validation #2011

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ inputs.REGISTRY }}/${{ inputs.IMAGE_NAME }}
images: ${{ inputs.REGISTRY }}${{ inputs.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
Expand Down
Original file line number Diff line number Diff line change
@@ -1,189 +1,181 @@
<div class="row">
<div class="col-12 content-container">
<form [formGroup]="animalsForm">
<p id="hasPets-radio-group-label" class="no-margin requiredField">
Do you have any pets that live in the same household with you?
</p>
<div class="row">
<div class="col-12 content-container">
<form [formGroup]="animalsForm">
<p id="hasPets-radio-group-label" class="no-margin requiredField">
Do you have any pets that live in the same household with you?
</p>

<mat-radio-group
aria-labelledby="hasPets-radio-group-label"
formControlName="hasPets"
class="primary-radio-group"
required
(change)="hasPetsChange($event)"
<mat-radio-group
aria-labelledby="hasPets-radio-group-label"
formControlName="hasPets"
class="primary-radio-group"
required
(change)="hasPetsChange($event)"
>
<mat-radio-button
class="primary-radio-button"
*ngFor="let option of radioOption"
[value]="option.value"
>
<mat-radio-button
class="primary-radio-button"
*ngFor="let option of radioOption"
[value]="option.value"
>
{{ option.name }}
</mat-radio-button>
<mat-error
class="custom-mat-error"
*ngIf="
animalsFormControl?.hasPets.touched &&
animalsFormControl?.hasPets.invalid &&
animalsFormControl?.hasPets.hasError('required')
"
>
Confirm to have pets is required
</mat-error>
</mat-radio-group>
{{ option.name }}
</mat-radio-button>
<mat-error
class="custom-mat-error"
*ngIf="
animalsFormControl?.hasPets.touched &&
animalsFormControl?.hasPets.invalid &&
animalsFormControl?.hasPets.hasError('required')
"
>
Confirm to have pets is required
</mat-error>
</mat-radio-group>

<div class="row" *ngIf="petSource.getValue().length > 0">
<div class="col-8">
<div class="col-4">
<button
class="animal-button"
mat-button
type="button"
(click)="addPets()"
>
+ Add More Pets
</button>
</div>
<div class="row" *ngIf="petSource.getValue().length > 0">
<div class="col-8">
<div class="col-4">
<button
class="animal-button"
mat-button
type="button"
(click)="addPets()"
>
+ Add More Pets
</button>
</div>

<mat-table class="bottom-space-large" [dataSource]="petSource">
<ng-container matColumnDef="type">
<mat-header-cell *matHeaderCellDef>Pet Type</mat-header-cell>
<mat-cell
[ngClass]="element.type.length >= 40 ? 'wrapText' : ''"
*matCellDef="let element"
>
<span class="mobile-label">Pet Type:</span>
{{ element.type }}
</mat-cell>
</ng-container>
<mat-table class="bottom-space-large" [dataSource]="petSource">
<ng-container matColumnDef="type">
<mat-header-cell *matHeaderCellDef>Pet Type</mat-header-cell>
<mat-cell
[ngClass]="element.type.length >= 40 ? 'wrapText' : ''"
*matCellDef="let element"
>
<span class="mobile-label">Pet Type:</span>
{{ element.type }}
</mat-cell>
</ng-container>

<ng-container matColumnDef="quantity">
<mat-header-cell *matHeaderCellDef> How Many </mat-header-cell>
<mat-cell *matCellDef="let element">
<span class="mobile-label">How Many:</span>
{{ element.quantity }}
</mat-cell>
</ng-container>
<ng-container matColumnDef="quantity">
<mat-header-cell *matHeaderCellDef> How Many </mat-header-cell>
<mat-cell *matCellDef="let element">
<span class="mobile-label">How Many:</span>
{{ element.quantity }}
</mat-cell>
</ng-container>

<ng-container matColumnDef="buttons">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let element; let index = index">
<button
class="edit-image"
mat-icon-button
aria-label="Edit"
(click)="editRow(element, index)"
*ngIf="!showPetsForm"
>
<img src="/assets/images/edit.svg" height="35" width="35" />
<img
src="/assets/images/edit_onhover.svg"
height="35"
width="35"
/>
</button>
<ng-container matColumnDef="buttons">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let element; let index = index">
<button
class="edit-image"
mat-icon-button
aria-label="Edit"
(click)="editRow(element, index)"
*ngIf="!showPetsForm"
>
<img src="/assets/images/edit.svg" height="35" width="35" />
<img
src="/assets/images/edit_onhover.svg"
height="35"
width="35"
/>
</button>

<button
class="delete-image"
mat-icon-button
aria-label="Remove"
(click)="deleteRow(index)"
*ngIf="!showPetsForm"
>
<img
src="/assets/images/delete.svg"
height="35"
width="35"
/>
<img
src="/assets/images/delete_onhover.svg"
height="35"
width="35"
/>
</button>
</mat-cell>
</ng-container>
<button
class="delete-image"
mat-icon-button
aria-label="Remove"
(click)="deleteRow(index)"
*ngIf="!showPetsForm"
>
<img src="/assets/images/delete.svg" height="35" width="35" />
<img
src="/assets/images/delete_onhover.svg"
height="35"
width="35"
/>
</button>
</mat-cell>
</ng-container>

<mat-header-row
*matHeaderRowDef="displayedColumns"
></mat-header-row>
<mat-row
*matRowDef="let row; columns: displayedColumns"
></mat-row>
</mat-table>
</div>
<mat-header-row
*matHeaderRowDef="displayedColumns"
></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
</div>
</div>

<div *ngIf="showPetsForm">
<app-pet-form [petForm]="petFormGroup"></app-pet-form>
<div *ngIf="showPetsForm">
<app-pet-form [petForm]="petFormGroup"></app-pet-form>

<div class="row bottom-space-large">
<div class="col-md-3">
<button
class="button-s details-button"
mat-button
type="button"
(click)="cancel()"
>
Cancel
</button>
</div>
<div class="row bottom-space-large">
<div class="col-md-3">
<button
class="button-s details-button"
mat-button
type="button"
(click)="cancel()"
>
Cancel
</button>
</div>

<div class="col-md-3 form-btns">
<button
class="animal-button details-button save-button"
mat-button
type="button"
(click)="save()"
>
Save
</button>
</div>
<div class="col-md-3 form-btns">
<button
class="animal-button details-button save-button"
mat-button
type="button"
(click)="save()"
>
Save
</button>
</div>
</div>
</form>

</div>
</form>

<div class="animal-notes">
<div class="row">
<div class="col-md-1 image-col">
<img
class="img-align"
src="/assets/images/wizard/livestock.svg"
width="52"
height="55"
/>
</div>
<div class="col-md-11">
<p class="primary-paragraph">
<b>Livestock:</b> Relocation planning should be considered to help
ensure producers are as prepared as possible for a range of
emergencies that may require the relocation of their livestock.
Further information and support may be available through the
Ministry of Agriculture.
</p>
</div>
<div class="animal-notes">
<div class="row">
<div class="col-md-1 image-col">
<img
class="img-align"
src="/assets/images/wizard/livestock.svg"
width="52"
height="55"
/>
</div>
<div class="row">
<div class="col-md-1 image-col">
<img
class="img-align"
src="/assets/images/wizard/farm.svg"
width="50"
height="58"
/>
</div>
<div class="col-md-11">
<p>
<b>Hobby Farms:</b> If you are a non-farm business owner of
livestock or pets, ensure you have the appropriate evacuation plan
in place to care for your hobby farm animals during an emergency
event. Further information and support may be available from your
Local Authority or First Nation and through the Canadian Disaster
Animal Response Team (CDART).
</p>
</div>
<div class="col-md-11">
<p class="primary-paragraph">
<b>Livestock:</b> Relocation planning should be considered to help
ensure producers are as prepared as possible for a range of
emergencies that may require the relocation of their livestock.
Further information and support may be available through the
Ministry of Agriculture.
</p>
</div>
</div>
<div class="row">
<div class="col-md-1 image-col">
<img
class="img-align"
src="/assets/images/wizard/farm.svg"
width="50"
height="58"
/>
</div>
<div class="col-md-11">
<p>
<b>Hobby Farms:</b> If you are a non-farm business owner of
livestock or pets, ensure you have the appropriate evacuation plan
in place to care for your hobby farm animals during an emergency
event. Further information and support may be available from your
Local Authority or First Nation and through the Canadian Disaster
Animal Response Team (CDART).
</p>
</div>
</div>
</div>
</div>

</div>
Loading