Skip to content

Commit 7940e6a

Browse files
Sai Krishna MetpalliSai Krishna Metpalli
authored andcommitted
Revert "Merge pull request #932 from bcgov/feature/DSS-1154"
This reverts commit bc8552d, reversing changes made to b6d8c06.
1 parent 504f529 commit 7940e6a

File tree

10 files changed

+33
-36
lines changed

10 files changed

+33
-36
lines changed

frontend/nginx.local.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ http {
7979
# See https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
8080
# See https://content-security-policy.com/nonce/
8181
# See https://angular.io/guide/security#content-security-policy
82-
add_header content-security-policy "default-src 'self'; style-src 'self' 'nonce-$cspNonce' ; script-src 'self' 'nonce-$cspNonce'; font-src 'self'; frame-src loginproxy.gov.bc.ca dev.loginproxy.gov.bc.ca test.loginproxy.gov.bc.ca; connect-src 'self' loginproxy.gov.bc.ca dev.loginproxy.gov.bc.ca test.loginproxy.gov.bc.ca server.arcgisonline.com; img-src 'self' https://tile.openstreetmap.org data: server.arcgisonline.com www.w3.org; frame-ancestors https://loginproxy.gov.bc.ca https://dev.loginproxy.gov.bc.ca https://test.loginproxy.gov.bc.ca; object-src 'none'; base-uri 'self'; form-action 'self';";
82+
add_header content-security-policy "default-src 'self'; style-src 'self' 'nonce-$cspNonce' 'unsafe-inline'; script-src 'self' 'nonce-$cspNonce'; font-src 'self'; frame-src loginproxy.gov.bc.ca dev.loginproxy.gov.bc.ca test.loginproxy.gov.bc.ca; connect-src 'self' loginproxy.gov.bc.ca dev.loginproxy.gov.bc.ca test.loginproxy.gov.bc.ca server.arcgisonline.com; img-src 'self' https://tile.openstreetmap.org data: server.arcgisonline.com www.w3.org; frame-ancestors https://loginproxy.gov.bc.ca https://dev.loginproxy.gov.bc.ca https://test.loginproxy.gov.bc.ca; object-src 'none'; base-uri 'self'; form-action 'self';";
8383

8484
include /nginx/nginx.conf;
8585

frontend/src/app/app.config.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { APP_INITIALIZER, ApplicationConfig, CSP_NONCE, importProvidersFrom } from '@angular/core';
1+
import { APP_INITIALIZER, ApplicationConfig, CSP_NONCE } from '@angular/core';
22
import { provideRouter } from '@angular/router';
33

44
import { routes } from './app.routes';
5-
import { KeycloakAngularModule, KeycloakService } from 'keycloak-angular';
5+
import { KeycloakService } from 'keycloak-angular';
66
import { environment } from '../environments/environment';
77
import { provideAnimations } from '@angular/platform-browser/animations';
88
import { provideHttpClient, withInterceptors } from '@angular/common/http';
@@ -17,12 +17,6 @@ export const appConfig: ApplicationConfig = {
1717
provideAnimations(),
1818
provideHttpClient(withInterceptors([authInterceptor, errorInterceptor])),
1919
provideRouter(routes),
20-
// Provide CSP_NONCE first so it can be injected by other providers
21-
{
22-
provide: CSP_NONCE,
23-
useFactory: () => document.querySelector('meta[name="csp-nonce"]')?.getAttribute('content'),
24-
},
25-
// Use standard PrimeNG provider
2620
providePrimeNG({
2721
theme: {
2822
preset: Aura,
@@ -33,15 +27,18 @@ export const appConfig: ApplicationConfig = {
3327
}
3428
}
3529
}),
36-
// Use modern provider pattern for Keycloak
37-
importProvidersFrom(KeycloakAngularModule),
30+
KeycloakService,
3831
{
3932
provide: APP_INITIALIZER,
4033
useFactory: initializeKeycloak,
4134
multi: true,
4235
deps: [KeycloakService],
4336
},
4437
MessageService,
38+
{
39+
provide: CSP_NONCE,
40+
useValue: document.querySelector('meta[name="csp-nonce"]')?.getAttribute('content'),
41+
},
4542
],
4643
}
4744

frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h4>Takedown Requests for each platform are aggregated into a CSV file and sent
1616
size="small" [(selection)]="selectedListings">
1717
<ng-template pTemplate="header">
1818
<tr>
19-
<th class="width-4rem" aria-labelledby="selectAll_checkbox_header">
19+
<th style="width: 4rem" aria-labelledby="selectAll_checkbox_header">
2020
<p-tableHeaderCheckbox id="selectAll_checkbox_header"
2121
ariaLabel="'Select or Deselect All'"></p-tableHeaderCheckbox>
2222
</th>
@@ -142,8 +142,8 @@ <h4>Takedown Requests for each platform are aggregated into a CSV file and sent
142142
(click)="submit()">Review</button>
143143
<button pButton id="cancel-btn" class="outline-btn" (click)="cancel()">Cancel</button>
144144
</div>
145-
<p-dialog class="preview-dialog width-50vw" header="Send Takedown Request" [(visible)]="showPreviewDialog" [modal]="true"
146-
[draggable]="false" [resizable]="false">
145+
<p-dialog class="preview-dialog" header="Send Takedown Request" [(visible)]="showPreviewDialog" [modal]="true"
146+
[style]="{ width: '50vw' }" [draggable]="false" [resizable]="false">
147147

148148
<div class="note">
149149
<div class="title">

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
</form>
130130

131131
<p-dialog [modal]="true" id="preview-dialog" [closable]="false" header="Notice of Non-Compliance"
132-
[(visible)]="isPreviewVisible" class="width-50vw">
132+
[(visible)]="isPreviewVisible" [style]="{width: '50vw'}">
133133
<p [innerText]="previewText"> </p>
134134
<div class="spacer-hr"></div>
135135
<div class="comment-section">
@@ -139,7 +139,7 @@
139139
</div>
140140
<div class="form-group-row-col">
141141
<p-editor appendTo="body" id="comment" name="comment" [(ngModel)]="comment"
142-
placeholder="Enter Additional Comment Here..." class="height-320px">
142+
placeholder="Enter Additional Comment Here..." [style]="{ height: '320px' }">
143143
<ng-template pTemplate="header">
144144
<span class="ql-formats">
145145
<button type="button" class="ql-bold" aria-label="Bold"></button>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ <h4>Add Details of your request</h4>
115115
</form>
116116

117117
<p-dialog [modal]="true" id="preview-dialog" [closable]="false" header="Takedown Request" [(visible)]="isPreviewVisible"
118-
class="width-50vw">
118+
[style]="{width: '50vw'}">
119119
<p [innerText]="previewText">
120120
</p>
121121
<div class="actions">

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ <h2 class="title">Aggregated Listings</h2>
6161

6262
<ng-template pTemplate="header">
6363
<tr>
64-
<th [ariaLabel]="'expand-listing'" class="width-2rem"> </th>
64+
<th [ariaLabel]="'expand-listing'" style="width: 2rem"> </th>
6565
<th class="sortable-header" id="primaryHostNm_header"
6666
[class.sorted]="this.sort && this.sort.prop === 'effectiveHostNm'"
6767
(click)="onSort('effectiveHostNm')">Primary Host Name
@@ -253,7 +253,7 @@ <h2 class="title">Aggregated Listings</h2>
253253
</p-paginator>
254254
</p-panel>
255255

256-
<p-dialog header="Legend" class="width-50vw" [modal]="true" [(visible)]="isLegendShown">
256+
<p-dialog header="Legend" [modal]="true" [(visible)]="isLegendShown" [style]="{width: '50vw'}">
257257
<span>
258258
<strong>Status:</strong> Status of the listing using the following categories:
259259
<ul class="statuses">

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@ <h2>Detailed Listing Information for</h2>
470470
</div>
471471
</div>
472472

473-
<p-dialog header="Match a Business Licence to Listing" class="bl-match-popup width-50vw" [modal]="true" [closable]="false"
474-
[(visible)]="isMatchBlShown">
473+
<p-dialog header="Match a Business Licence to Listing" class="bl-match-popup" [modal]="true" [closable]="false"
474+
[(visible)]="isMatchBlShown" [style]="{width: '50vw'}">
475475
<div class="search-label"><strong>Enter a Business Licence Number</strong></div>
476476
<div class="search-row">
477477
<input pInputText type="text" class="full-width-text-field" [(ngModel)]="searchBlText"
@@ -502,8 +502,8 @@ <h2>Detailed Listing Information for</h2>
502502
</ng-template>
503503
</p-dialog>
504504

505-
<p-dialog header="Unlink a business licence from Listing" class="bl-unlink-popup width-50vw" [modal]="true" [closable]="false"
506-
[(visible)]="isUnlinkBlShow">
505+
<p-dialog header="Unlink a business licence from Listing" class="bl-unlink-popup" [modal]="true" [closable]="false"
506+
[(visible)]="isUnlinkBlShow" [style]="{width: '50vw'}">
507507
<div class="search-label" *ngIf="this.listing && this.listing.bizLicenceInfo"><strong>Are you sure you want to
508508
unlink business
509509
licence number
@@ -518,7 +518,7 @@ <h2>Detailed Listing Information for</h2>
518518
</ng-template>
519519
</p-dialog>
520520

521-
<p-dialog header="Legend" class="width-50vw" [modal]="true" [(visible)]="isLegendShown">
521+
<p-dialog header="Legend" [modal]="true" [(visible)]="isLegendShown" [style]="{width: '50vw'}">
522522
<span>
523523
<strong>Status:</strong> Status of the listing using the following categories:
524524
<ul class="statuses">
@@ -578,8 +578,8 @@ <h2>Detailed Listing Information for</h2>
578578
</p>
579579
</p-dialog>
580580

581-
<p-dialog header="Suggest a New Address" class="address-change-popup width-50vw" [modal]="true" [closable]="false"
582-
[(visible)]="isEditAddressShown">
581+
<p-dialog header="Suggest a New Address" class="address-change-popup" [modal]="true" [closable]="false"
582+
[(visible)]="isEditAddressShown" [style]="{width: '50vw'}">
583583
<div class="content" *ngIf="listing">
584584
<div class="message warn" *ngIf="isJurisdictionDifferent">
585585
<div class="header">

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ <h2 class="title">Individual Listings</h2>
6161
[tableStyle]="{ 'min-width': '50rem' }" [selectionPageOnly]="true">
6262
<ng-template pTemplate="header">
6363
<tr>
64-
<th [ariaLabel]="'select-listing'" class="width-4rem">
64+
<th [ariaLabel]="'select-listing'" style="width: 4rem">
6565
<p-tableHeaderCheckbox inputId="select-all-chb"></p-tableHeaderCheckbox>
6666
</th>
6767
<th class="sortable-header" id="status_header"
@@ -102,7 +102,7 @@ <h2 class="title">Individual Listings</h2>
102102
*ngIf="this.sort && this.sort.prop === 'registrationNumber' && this.sort.dir === 'asc'"></i>
103103
</th>
104104

105-
<th class="text-align-center">Details</th>
105+
<th style="text-align: center;">Details</th>
106106

107107
<th class="sortable-header" id="addressNormalized_header"
108108
[class.sorted]="this.sort && this.sort.prop === 'matchAddressTxt'"
@@ -250,7 +250,7 @@ <h2 class="title">Individual Listings</h2>
250250
[currentPageReportTemplate]="'Rows per page: {rows} &nbsp; {first}-{last} of {totalRecords}'"></p-paginator>
251251
</p-panel>
252252

253-
<p-dialog header="Legend" class="width-50vw" [modal]="true" [(visible)]="isLegendShown"
253+
<p-dialog header="Legend" [modal]="true" [(visible)]="isLegendShown" ess [style]="{width: '50vw'}"
254254
[closeOnEscape]="true">
255255
<span>
256256
<strong>Status:</strong> Status of the listing using the following categories:

frontend/src/app/features/components/manage-jurisdictions/manage-jurisdictions.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ <h2>Manage Jurisdictions</h2>
77
[tableStyle]="{ 'min-width': '60rem' }" size="small">
88
<ng-template pTemplate="header">
99
<tr class="header-panel">
10-
<th class="width-4rem"></th>
11-
<th class="width-24rem sortable-header" id="organizationNm_header"
10+
<th style="width: 4rem"></th>
11+
<th style="width: 24rem" class="sortable-header" id="organizationNm_header"
1212
[class.sorted]="this.sort && this.sort.prop === 'organizationNm'"
1313
(click)="onSort('organizationNm')">Local Government Name
1414
<i class="pi pi-angle-down"
@@ -40,13 +40,13 @@ <h2>Manage Jurisdictions</h2>
4040
<i class="pi pi-angle-up"
4141
*ngIf="this.sort && this.sort.prop === 'businessLicenceFormatTxt' && this.sort.dir === 'asc'"></i>
4242
</th>
43-
<th *ngIf="canEdit" class="width-19rem">Update Local Government Information</th>
43+
<th *ngIf="canEdit" style="width: 19rem">Update Local Government Information</th>
4444
</tr>
4545
</ng-template>
4646

4747
<ng-template pTemplate="body" let-jurisdiction let-index="rowIndex" let-expanded="expanded">
4848
<tr>
49-
<td class="width-4rem">
49+
<td style="width: 4rem">
5050
<button [disabled]="!jurisdiction.jurisdictions || !jurisdiction.jurisdictions.length"
5151
[pRowTogglerDisabled]="!jurisdiction.jurisdictions || !jurisdiction.jurisdictions.length"
5252
pButton [pTooltip]="(!jurisdiction.jurisdictions || !jurisdiction.jurisdictions.length)?
@@ -58,7 +58,7 @@ <h2>Manage Jurisdictions</h2>
5858
<td>{{jurisdiction.localGovernmentTypeNm || '-'}}</td>
5959
<td>{{jurisdiction.organizationCd || '-'}}</td>
6060
<td>{{jurisdiction.businessLicenceFormatTxt || '-'}} </td>
61-
<td *ngIf="canEdit" class="text-align-center">
61+
<td *ngIf="canEdit" style="text-align: center">
6262
<a id="lg-edit-{{index}}-icon"
6363
[routerLink]="'/update-local-government-information/'+jurisdiction.organizationId">
6464
<span class="edit-icon"></span>
@@ -143,7 +143,7 @@ <h2>Manage Jurisdictions</h2>
143143
<td>{{jurisdiction.isStraaExempt?'Yes':'No'}} </td>
144144
<td>{{jurisdiction.isBusinessLicenceRequired?'Yes':'No'}} </td>
145145
<td>{{jurisdiction.isActive?'Yes':'No'}} </td>
146-
<td *ngIf="canEdit" class="text-align-center">
146+
<td *ngIf="canEdit" style="text-align: center">
147147
<a id="jurisdiction-edit-{{index}}-icon"
148148
[routerLink]="'/update-jurisdiction-information/'+jurisdiction.organizationId">
149149
<span class="edit-icon"></span>

frontend/src/app/features/components/roles-list/role-details/role-details.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ <h2 class="header" *ngIf="role && !isEdit && !isCreate">Short Term Rental Platfo
5151
Role</button>
5252
</div>
5353

54-
<p-confirmDialog class="width-50vw"></p-confirmDialog>
54+
<p-confirmDialog [style]="{width: '50vw'}"></p-confirmDialog>

0 commit comments

Comments
 (0)