Skip to content

Commit e6193b3

Browse files
DSS-836: FE Print detailed listing page
1 parent 9f5820e commit e6193b3

File tree

5 files changed

+50
-10
lines changed

5 files changed

+50
-10
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<div class="main-title">Short-Term Rental Data Portal</div>
66
</div>
77
<div *ngIf="userDataService.currentUser" class="user-container">
8-
{{userDataService.currentUser.displayName || 'Unknown User'}} <button pButton icon="pi pi-angle-down"
9-
(click)="op.toggle($event)"></button>
8+
{{userDataService.currentUser.displayName || 'Unknown User'}} <button pButton class="do-not-print-it"
9+
icon="pi pi-angle-down" (click)="op.toggle($event)"></button>
1010
<p-overlayPanel #op>
1111
<button pButton [iconPos]="'right'" class="p-button-transparent" icon="pi pi-sign-out"
1212
(click)="logout()">Logout</button>
1313
</p-overlayPanel>
1414
</div>
1515
</div>
16-
<div class="header-menu">
16+
<div class="header-menu do-not-print-it">
1717
<div class="menu-container">
1818
<p-menubar [model]="items"></p-menubar>
1919
</div>
@@ -23,7 +23,7 @@
2323
<div class="content">
2424
<router-outlet />
2525
</div>
26-
<div class="footer">
26+
<div class="footer do-not-print-it">
2727
<div class="cc">© 2024 Government of British Columbia.</div>
2828
</div>
2929

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
align-items: center;
77
}
88

9+
@media print {
10+
.header {
11+
.header-top {
12+
padding: 0 !important;
13+
14+
.logo-container {
15+
display: none !important;
16+
}
17+
}
18+
}
19+
}
20+
921
.header {
1022
width: 100%;
1123
position: sticky;
@@ -91,4 +103,10 @@
91103
position: sticky;
92104
bottom: 0;
93105
z-index: 10;
106+
}
107+
108+
@media print {
109+
.content {
110+
width: 100%;
111+
}
94112
}

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ <h2>Detailed Listing Information for</h2>
44

55
<a target="_blank" class="listing-url-lnk"
66
[href]="listing.platformListingUrl">{{listing.platformListingNo}}</a>&nbsp; <i
7-
class="pi pi-external-link"></i>
7+
class="pi pi-external-link do-not-print-it"></i>
88
</div>
99
<div class="legend-container">
10-
<button pButton id="view-more-history-btn" class="p-button-link" (click)="showLegend()">
10+
<button pButton id="view-more-history-btn" class="p-button-link do-not-print-it" (click)="showLegend()">
1111
<i class="pi pi-question-circle"></i>&nbsp;Legend
1212
</button>
1313
</div>
@@ -21,10 +21,10 @@ <h2>Detailed Listing Information for</h2>
2121
</div>
2222
</div>
2323
<div class="column">
24-
<button *ngIf="!isCEU" pButton (click)="sendNoticeOfNonCompliance()" class="p-button-outlined ">
24+
<button *ngIf="!isCEU" pButton (click)="sendNoticeOfNonCompliance()" class="p-button-outlined do-not-print-it">
2525
<span class="nonc-icon"></span> Send Notice Of
2626
Non-Compliance </button>
27-
<button *ngIf="!isCEU" pButton (click)="sendTakedownRequest()" class="p-button-outlined"><span
27+
<button *ngIf="!isCEU" pButton (click)="sendTakedownRequest()" class="p-button-outlined do-not-print-it"><span
2828
class="tdr-icon"></span> Send
2929
Takedown
3030
Request</button>
@@ -290,7 +290,8 @@ <h2>Detailed Listing Information for</h2>
290290
<ng-template #changed>
291291
<strong>Business Licence Information was removed from this listing.</strong>
292292
</ng-template>
293-
<button pButton (click)="showBlMatchPopup()" class="p-button-link">Click here to link this listing
293+
<button pButton (click)="showBlMatchPopup()" class="p-button-link do-not-print-it">Click here to link
294+
this listing
294295
to a business licence record</button>
295296

296297
</div>
@@ -421,7 +422,8 @@ <h2>Detailed Listing Information for</h2>
421422
<div class="spacer-hr">
422423
</div>
423424
<div class="row">
424-
<button pButton (click)="showBlUnlinkPopup()" class="p-button-link">Click here to unlink this
425+
<button pButton (click)="showBlUnlinkPopup()" class="p-button-link do-not-print-it">Click here to
426+
unlink this
425427
listing from this business licence record</button>
426428
</div>
427429
</ng-template>

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
display: flex;
66
flex-direction: column;
77

8+
@media print {
9+
.content {
10+
display: block !important;
11+
padding: 0 !important;
12+
13+
.main-block,
14+
.sidebar {
15+
padding: 0 !important;
16+
display: block !important;
17+
width: 100% !important;
18+
}
19+
}
20+
}
21+
822
.message {
923
margin-top: 12px;
1024
padding: 16px;

frontend/src/styles.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
font-weight: 400;
2929
}
3030

31+
@media print {
32+
.do-not-print-it {
33+
display: none !important;
34+
}
35+
}
36+
3137
body {
3238
margin: 0;
3339

0 commit comments

Comments
 (0)