diff --git a/frontend/src/app/features/components/listings-table/listings-table.component.html b/frontend/src/app/features/components/listings-table/listings-table.component.html index 6f73b554..2a21ec26 100644 --- a/frontend/src/app/features/components/listings-table/listings-table.component.html +++ b/frontend/src/app/features/components/listings-table/listings-table.component.html @@ -36,6 +36,12 @@

Individual Listings

Send Takedown Request +
+ +
diff --git a/frontend/src/app/features/components/listings-table/listings-table.component.scss b/frontend/src/app/features/components/listings-table/listings-table.component.scss index f7c3186a..316c191b 100644 --- a/frontend/src/app/features/components/listings-table/listings-table.component.scss +++ b/frontend/src/app/features/components/listings-table/listings-table.component.scss @@ -112,8 +112,14 @@ } .actions { + display: flex; + width: 100%; padding-bottom: 12px; + &.left-alignment { + justify-content: end; + } + button { margin-right: 6px; } diff --git a/frontend/src/app/features/components/listings-table/listings-table.component.ts b/frontend/src/app/features/components/listings-table/listings-table.component.ts index c158a1e8..65585cd3 100644 --- a/frontend/src/app/features/components/listings-table/listings-table.component.ts +++ b/frontend/src/app/features/components/listings-table/listings-table.component.ts @@ -29,6 +29,7 @@ import { RadioButtonModule } from 'primeng/radiobutton'; import { FilterPersistenceService } from '../../../common/services/filter-persistence.service'; import { OrganizationService } from '../../../common/services/organization.service'; import { UrlProtocolPipe } from '../../../common/pipes/url-protocol.pipe'; +import { ListingDetails } from '../../../common/models/listing-details'; @Component({ selector: 'app-listings-table', @@ -76,6 +77,10 @@ export class ListingsTableComponent implements OnInit { readonly addressLowScore = Number.parseInt(environment.ADDRESS_SCORE); + get listingsSelected(): number { + return Object.keys(this.selectedListings).length; + } + constructor( private listingService: ListingDataService, private userService: UserDataService, @@ -179,6 +184,15 @@ export class ListingsTableComponent implements OnInit { this.router.navigate(['/bulk-takedown-request'], { queryParams: { returnUrl: this.getUrlFromState() } }); } + onContactHost(): void { + this.searchStateService.selectedListings = Object.values( + this.selectedListings, + ) as unknown as Array; + this.router.navigate(['/send-compliance-order'], { + queryParams: { returnUrl: this.getUrlFromState() }, + }); + } + onPageChange(value: any): void { this.currentPage.pageSize = value.rows; this.currentPage.pageNumber = value.page + 1;