Skip to content

Commit 78fa5dd

Browse files
authored
Merge pull request #648 from bcgov/release
Release
2 parents 3e73405 + 6018e83 commit 78fa5dd

12 files changed

+157
-48
lines changed

frontend/src/app/common/layout/layout.component.scss

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
}
1717
}
1818
}
19+
.content {
20+
width: 100%;
21+
}
1922
}
2023

2124
.header {
@@ -105,8 +108,54 @@
105108
z-index: 10;
106109
}
107110

108-
@media print {
111+
@media only screen and (max-width: 1500px) {
109112
.content {
110-
width: 100%;
113+
width: calc(100% - 148px);
114+
}
115+
116+
.header {
117+
.header-menu {
118+
padding: 0 100px;
119+
}
120+
}
121+
122+
.footer {
123+
font-size: 12px;
124+
}
125+
}
126+
127+
@media only screen and (max-width: 1550px) {
128+
.content {
129+
width: calc(100% - 200px);
130+
}
131+
132+
.footer {
133+
font-size: 14px;
134+
}
135+
}
136+
137+
@media only screen and (max-width: 1100px) {
138+
.header {
139+
.header-top {
140+
padding: 0 84px;
141+
142+
.tile-container {
143+
.main-title {
144+
font-size: 18px;
145+
}
146+
}
147+
}
148+
149+
.header-menu {
150+
padding: 0 16px;
151+
}
152+
}
153+
154+
.content {
155+
width: calc(100% - 0px);
156+
}
157+
158+
.footer {
159+
font-size: 10px;
111160
}
112161
}

frontend/src/app/features/components/compliance-notice/compliance-notice.component.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<div class="title">Send Notice of Non-Compliance</div>
22
<p-messages [(value)]="messages" [enableService]="false" [closable]="false"></p-messages>
3-
<div *ngIf="!hideForm" class="sub-title">Complete the following fields to send a Notice of Non-Compliance with a local
3+
<div class="sub-title">Complete the following fields to send a Notice of Non-Compliance with a local
44
government short-term rental (STR) business licence requirement to an STR Host and Platform Representative. All
55
fields are required except where stated.</div>
66

7-
<form *ngIf="!hideForm" [formGroup]="myForm" (ngSubmit)="onPreview()">
7+
<form [formGroup]="myForm" (ngSubmit)="onPreview()">
88
<div class="form-group-row">
99
<div class="form-group-row-col">
1010
<label for="platformId">Select a Platform Representative for</label>
@@ -140,6 +140,4 @@
140140
<button pButton id="submit-dialog-btn" (click)="onSubmit(textarea.value,textarea)">Submit</button>
141141
<button pButton id="cancel-dialog-btn" class="outline-btn" (click)="onPreviewClose()">Cancel</button>
142142
</div>
143-
</p-dialog>
144-
<button *ngIf="hideForm" pButton id="return-home-btn" name="return-home-btn" (click)="onReturnHome()">Return
145-
Home</button>
143+
</p-dialog>

frontend/src/app/features/components/compliance-notice/compliance-notice.component.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { MessagesModule } from 'primeng/messages';
2020
import { Router } from '@angular/router';
2121
import { InputNumberModule } from 'primeng/inputnumber';
2222
import { GlobalLoaderService } from '../../../common/services/global-loader.service';
23+
import { ErrorHandlingService } from '../../../common/services/error-handling.service';
2324

2425
@Component({
2526
selector: 'app-compliance-notice',
@@ -48,7 +49,6 @@ export class ComplianceNoticeComponent implements OnInit {
4849
platformOptions = new Array<DropdownOption>();
4950

5051
isPreviewVisible = false;
51-
hideForm = false;
5252
previewText = 'No preview'
5353

5454
messages = new Array<Message>();
@@ -84,6 +84,7 @@ export class ComplianceNoticeComponent implements OnInit {
8484
private router: Router,
8585
private loaderService: GlobalLoaderService,
8686
private cd: ChangeDetectorRef,
87+
private messageService: ErrorHandlingService,
8788
) { }
8889

8990
ngOnInit(): void {
@@ -137,7 +138,7 @@ export class ComplianceNoticeComponent implements OnInit {
137138
this.delistingService.createComplianceNotice(model)
138139
.subscribe({
139140
next: (_) => {
140-
this.showSuccessMessage();
141+
this.messageService.showSuccess('Your Notice of Non-Compliance was Successfully Submitted!');
141142
},
142143
error: (error) => {
143144
this.showErrors(error);
@@ -175,15 +176,6 @@ export class ComplianceNoticeComponent implements OnInit {
175176
commentTextArea.value = '';
176177
}
177178

178-
onReturnHome(): void {
179-
this.router.navigateByUrl('/');
180-
}
181-
182-
showSuccessMessage(): void {
183-
this.hideForm = true;
184-
this.messages = [{ severity: 'success', summary: '', detail: 'Your Notice of Non-Compliance was Successfully Submitted!' }];
185-
}
186-
187179
private prepareFormModel(form: FormGroup): ComplianceNotice {
188180
const model: ComplianceNotice = Object.assign({}, form.value);
189181

frontend/src/app/features/components/delisting-request/delisting-request.component.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="title">Send Takedown Request</div>
22
<p-messages [(value)]="messages" [enableService]="false" [closable]="false"></p-messages>
3-
<div *ngIf="!hideForm" class="sub-title">Complete the following fields to send a Takedown Request to an STR Platform
3+
<div class="sub-title">Complete the following fields to send a Takedown Request to an STR Platform
44
representative.
55
<br>
66
<br>
@@ -9,7 +9,7 @@
99
where stated.
1010
</div>
1111

12-
<form *ngIf="!hideForm" [formGroup]="myForm" (ngSubmit)="onPreview()">
12+
<form [formGroup]="myForm" (ngSubmit)="onPreview()">
1313
<div class="form-group-row">
1414
<div class="form-group-row-col">
1515
<label for="platformId">Select a Platform Representative for</label>
@@ -114,6 +114,4 @@ <h4>Add Details of your request</h4>
114114
<button pButton name="cancel-dialog-btn" id="cancel-dialog-btn" class="outline-btn"
115115
(click)="onPreviewClose()">Cancel</button>
116116
</div>
117-
</p-dialog>
118-
<button *ngIf="hideForm" pButton id="return-home-btn" name="return-home-btn" (click)="onReturnHome()">Return
119-
Home</button>
117+
</p-dialog>

frontend/src/app/features/components/delisting-request/delisting-request.component.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { Router } from '@angular/router';
2121
import { InputNumberModule } from 'primeng/inputnumber';
2222
import { GlobalLoaderService } from '../../../common/services/global-loader.service';
2323
import { forkJoin } from 'rxjs';
24+
import { ErrorHandlingService } from '../../../common/services/error-handling.service';
2425

2526
@Component({
2627
selector: 'app-delisting-request',
@@ -50,7 +51,6 @@ export class DelistingRequestComponent implements OnInit {
5051
initiatorsOptions = new Array<DropdownOption>();
5152

5253
isPreviewVisible = false;
53-
hideForm = false;
5454
previewText = 'No preview'
5555

5656
messages = new Array<Message>();
@@ -80,6 +80,7 @@ export class DelistingRequestComponent implements OnInit {
8080
private router: Router,
8181
private loaderService: GlobalLoaderService,
8282
private cd: ChangeDetectorRef,
83+
private messageService: ErrorHandlingService,
8384
) { }
8485

8586
ngOnInit(): void {
@@ -134,7 +135,8 @@ export class DelistingRequestComponent implements OnInit {
134135
this.delistingService.createDelistingRequest(this.prepareFormModel(this.myForm))
135136
.subscribe({
136137
next: (_) => {
137-
this.showSuccessMessage();
138+
this.messageService.showSuccess('Your Takedown Request was Successfully Submitted!');
139+
this.myForm.reset();
138140
},
139141
error: (error) => {
140142
this.showErrors(error);
@@ -153,15 +155,6 @@ export class DelistingRequestComponent implements OnInit {
153155
this.isPreviewVisible = false;
154156
}
155157

156-
onReturnHome(): void {
157-
this.router.navigateByUrl('/');
158-
}
159-
160-
showSuccessMessage(): void {
161-
this.hideForm = true;
162-
this.messages = [{ severity: 'success', summary: '', detail: 'Your Takedown Request was Successfully Submitted!' }];
163-
}
164-
165158
onWithStandardDetailChanged(value: CheckboxChangeEvent): void {
166159
if (value.checked)
167160
this.customDetailTxtControl.removeValidators([Validators.required]);

frontend/src/app/features/components/listings-table/aggregated-listings-table/aggregated-listings-table.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ <h2 class="title">Aggregated Listings</h2>
1717
Filter Listings
1818
</button>
1919

20-
<button *ngIf="isFilterSet" pButton id="filter-clear-btn" icon="pi pi-filter-slash" class="p-button-link red"
21-
(click)="onClearFilters()">
20+
<button *ngIf="isFilterSet" pButton id="filter-clear-btn" icon="pi pi-filter-slash"
21+
class="filter-clear-btn p-button-link red" (click)="onClearFilters()">
2222
Clear Filters
2323
</button>
2424
</div>
2525
<div class="legend-container">
26-
<button pButton id="view-more-history-btn" class="p-button-link" (click)="showLegend()">
26+
<button pButton id="view-more-history-btn" class="p-button-link legend-open-btn" (click)="showLegend()">
2727
<i class="pi pi-question-circle"></i>&nbsp;Legend
2828
</button>
2929
</div>
@@ -224,7 +224,7 @@ <h2 class="title">Aggregated Listings</h2>
224224
</ng-template>
225225
</p-table>
226226

227-
<p-paginator class="listings-paginator" *ngIf="currentPage" (onPageChange)="onPageChange($event)"
227+
<p-paginator #paginator class="listings-paginator" *ngIf="currentPage" (onPageChange)="onPageChange($event)"
228228
[rows]="currentPage.pageSize || 25" [totalRecords]="currentPage.totalCount || 0" [showPageLinks]="false"
229229
[showCurrentPageReport]="true" [showFirstLastIcon]="true" [rowsPerPageOptions]="[10, 25, 50, 100]"
230230
[currentPageReportTemplate]="'Rows per page: {rows} &nbsp; {first}-{last} of {totalRecords}'"></p-paginator>

frontend/src/app/features/components/listings-table/aggregated-listings-table/aggregated-listings-table.component.scss

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,4 +325,70 @@
325325
display: flex;
326326
gap: 8px;
327327
}
328+
}
329+
330+
@media only screen and (max-width: 1500px) {
331+
:host {
332+
padding: 0 10px 10px 10px;
333+
334+
h2 {
335+
margin-left: 10px;
336+
font-size: 1.125em;
337+
}
338+
339+
input.search-input {
340+
width: 250px;
341+
}
342+
343+
.filter-open-btn,
344+
.filter-clear-btn,
345+
.legend-open-btn {
346+
padding: 0.5rem .75rem;
347+
font-size: .75rem !important;
348+
}
349+
350+
th {
351+
font-size: 12px !important;
352+
padding: 0.25rem 0.125rem;
353+
354+
td,
355+
tr {
356+
font-size: 9px !important;
357+
padding: 0.25rem 0.125rem;
358+
}
359+
}
360+
}
361+
}
362+
363+
@media only screen and (max-width: 1100px) {
364+
:host {
365+
padding: 0 10px 10px 10px;
366+
367+
h2 {
368+
margin-left: 10px;
369+
font-size: 1.125em;
370+
}
371+
372+
input.search-input {
373+
width: 250px;
374+
}
375+
376+
.filter-open-btn,
377+
.filter-clear-btn,
378+
.legend-open-btn {
379+
padding: 0.5rem .75rem;
380+
font-size: .75rem !important;
381+
}
382+
383+
th {
384+
font-size: 12px !important;
385+
padding: 0.25rem 0.125rem;
386+
387+
td,
388+
tr {
389+
font-size: 9px !important;
390+
padding: 0.25rem 0.125rem;
391+
}
392+
}
393+
}
328394
}

frontend/src/app/features/components/listings-table/aggregated-listings-table/aggregated-listings-table.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { CommonModule } from '@angular/common';
2-
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
2+
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
33
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
44
import { AccordionModule } from 'primeng/accordion';
55
import { ButtonModule } from 'primeng/button';
66
import { CheckboxModule } from 'primeng/checkbox';
77
import { DialogModule } from 'primeng/dialog';
88
import { DropdownModule } from 'primeng/dropdown';
99
import { InputTextModule } from 'primeng/inputtext';
10-
import { PaginatorModule } from 'primeng/paginator';
10+
import { Paginator, PaginatorModule } from 'primeng/paginator';
1111
import { PanelModule } from 'primeng/panel';
1212
import { RadioButtonModule } from 'primeng/radiobutton';
1313
import { SidebarModule } from 'primeng/sidebar';
@@ -55,6 +55,7 @@ import { ListingDetails } from '../../../../common/models/listing-details';
5555
styleUrl: './aggregated-listings-table.component.scss'
5656
})
5757
export class AggregatedListingsTableComponent implements OnInit {
58+
@ViewChild("paginator") paginator!: Paginator;
5859

5960
selectedListings: { [key: string]: ListingTableRow } = {};
6061
aggregatedListings = new Array<AggregatedListingTableRow>();
@@ -146,7 +147,7 @@ export class AggregatedListingsTableComponent implements OnInit {
146147
group.listings.forEach(l => {
147148
l.selected = true;
148149
this.selectedListings[l.rentalListingId] = l;
149-
})
150+
});
150151
} else {
151152
group.listings.forEach(l => {
152153
l.selected = false;
@@ -184,7 +185,7 @@ export class AggregatedListingsTableComponent implements OnInit {
184185
this.sort = { prop: property, dir: 'asc' };
185186
}
186187

187-
this.getListings(this.currentPage.pageNumber);
188+
this.paginator.changePage(0);
188189
}
189190

190191
unselectAll(): void {

frontend/src/app/features/components/listings-table/listings-table.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ <h2 class="title">Listings</h2>
223223
</tr>
224224
</ng-template>
225225
</p-table>
226-
<p-paginator #pagingRef class="listings-paginator" *ngIf="currentPage" (onPageChange)="onPageChange($event)"
226+
<p-paginator #paginator class="listings-paginator" *ngIf="currentPage" (onPageChange)="onPageChange($event)"
227227
[rows]="currentPage.pageSize || 25" [totalRecords]="currentPage.totalCount || 0" [showPageLinks]="false"
228228
[showCurrentPageReport]="true" [showFirstLastIcon]="true" [rowsPerPageOptions]="[10, 25, 50, 100]"
229229
[currentPageReportTemplate]="'Rows per page: {rows} &nbsp; {first}-{last} of {totalRecords}'"></p-paginator>

frontend/src/app/features/components/listings-table/listings-table.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import { FilterPersistenceService } from '../../../common/services/filter-persis
5454
styleUrl: './listings-table.component.scss'
5555
})
5656
export class ListingsTableComponent implements OnInit {
57-
@ViewChild('pagingRef') pagingRef!: Paginator;
57+
@ViewChild("paginator") paginator!: Paginator;
5858

5959
selectedListings = []
6060
listings = new Array<ListingTableRow>();
@@ -155,7 +155,7 @@ export class ListingsTableComponent implements OnInit {
155155
this.sort = { prop: property, dir: 'asc' };
156156
}
157157

158-
this.getListings(this.currentPage.pageNumber);
158+
this.paginator.changePage(0);
159159
}
160160

161161
unselectAll(): void {
@@ -317,7 +317,6 @@ export class ListingsTableComponent implements OnInit {
317317
next: (res: PagingResponse<ListingTableRow>) => {
318318
this.currentPage = res.pageInfo;
319319
this.listings = res.sourceList;
320-
this.pagingRef.updateFirst();
321320
},
322321
complete: () => {
323322
this.loaderService.loadingEnd();

0 commit comments

Comments
 (0)