From 4de1023624c83e71e5410980f990551c9f0af330 Mon Sep 17 00:00:00 2001 From: Oleksandr Bohuslavskyi Date: Fri, 18 Oct 2024 16:33:27 -0500 Subject: [PATCH] DSS-936: Unblock takedowns for inactive listings (cherry picked from commit b53a7eca5ac360d3ea1f58c780abb595884d010e) --- .../bulk-compliance-notice.component.html | 11 +++-------- .../bulk-compliance-notice.component.ts | 14 +------------- .../bulk-takedown-request.component.html | 12 +++--------- .../bulk-takedown-request.component.ts | 12 +----------- 4 files changed, 8 insertions(+), 41 deletions(-) diff --git a/frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.html b/frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.html index 3dd3ecca..8814cf60 100644 --- a/frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.html +++ b/frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.html @@ -3,13 +3,9 @@

Complete the following fields to send Notices of Non-Compliance to STR Hosts

All fields are required except where stated.

- +
Included Listings -
Notices of Non-Compliance and - Takedown Requests cannot be sent - for inactive listings as they are no longer available on the platform.
@@ -18,8 +14,7 @@

All fields are required except where stated.

- + All fields are required except where stated. - + {{ listing.offeringOrganizationNm }} diff --git a/frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.ts b/frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.ts index 857563be..81d3e7b6 100644 --- a/frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.ts +++ b/frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.ts @@ -45,7 +45,6 @@ export class BulkComplianceNoticeComponent implements OnInit { listings!: Array; returnUrl!: string; myForm!: FormGroup; - containsDisabledItems = false; extendedListings = new Array(); @@ -53,7 +52,6 @@ export class BulkComplianceNoticeComponent implements OnInit { showPreviewDialog = false; submissionArray!: Array; - selectedListings!: Array; addressWarningScoreLimit = Number.parseInt(environment.ADDRESS_SCORE); sort!: { prop: string, dir: 'asc' | 'desc' } @@ -84,12 +82,10 @@ export class BulkComplianceNoticeComponent implements OnInit { else { this.returnUrl = param['returnUrl']; this.listings = [...this.searchStateService.selectedListings]; - this.containsDisabledItems = this.listings.some(l => l.listingStatusType !== 'I') this.extendedListings = this.listings.map((listing) => ({ ...listing, sendNoticeToHosts: (listing as any).hasAtLeastOneValidHostEmail })); this.searchStateService.selectedListings = new Array(); - this.selectedListings = this.extendedListings.filter(l => l.listingStatusType !== 'I') - ; + this.selectedListings = this.extendedListings; this.initForm(); this.cloakParams(); @@ -151,14 +147,6 @@ export class BulkComplianceNoticeComponent implements OnInit { this.showPreviewDialog = false; } - onListingSelected(e: any): void { - if (e.checked) { - this.selectedListings = this.listings.filter(l => l.listingStatusType !== 'I'); - } else { - this.selectedListings = []; - } - } - private sendPreview(): void { const formValues = this.myForm.value; this.submissionArray = this.selectedListings.map((x: ListingDetailsWithHostCheckboxExtension | any) => ({ diff --git a/frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.html b/frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.html index a9d92337..3094dd9b 100644 --- a/frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.html +++ b/frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.html @@ -6,13 +6,9 @@

Takedown Requests for each platform are aggregated into a CSV file and sent
- +
Included Listings -
Notices of Non-Compliance and - Takedown Requests cannot be sent - for inactive listings as they are no longer available on the platform.
@@ -21,8 +17,7 @@

Takedown Requests for each platform are aggregated into a CSV file and sent - + Takedown Requests for each platform are aggregated into a CSV file and sent - + {{ listing.offeringOrganizationNm }} diff --git a/frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.ts b/frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.ts index 918aca9d..09c8f740 100644 --- a/frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.ts +++ b/frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.ts @@ -41,7 +41,6 @@ export class BulkTakedownRequestComponent implements OnInit { listings!: Array; returnUrl!: string; myForm!: FormGroup; - containsDisabledItems = false; previewText = ''; showPreviewDialog = false; @@ -87,22 +86,13 @@ export class BulkTakedownRequestComponent implements OnInit { this.returnUrl = param['returnUrl']; this.listings = [...this.searchStateService.selectedListings]; this.searchStateService.selectedListings = new Array(); - this.selectedListings = this.listings.filter(l => l.listingStatusType !== 'I'); - this.containsDisabledItems = this.listings.some(l => l.listingStatusType !== 'I') + this.selectedListings = this.listings; this.initForm(); this.cloakParams(); } }); } - onListingSelected(e: any): void { - if (e.checked) { - this.selectedListings = this.listings.filter(l => l.listingStatusType !== 'I'); - } else { - this.selectedListings = []; - } - } - onSort(property: keyof ListingDetails): void { if (this.sort) { if (this.sort.prop === property) {