From a9d17d7e4f19e1543ea1179702dde8cc60fed186 Mon Sep 17 00:00:00 2001 From: Oleksandr Bohuslavskyi Date: Wed, 27 Nov 2024 17:07:37 -0600 Subject: [PATCH] DSS-1043: revert takedown request editor --- .../bulk-takedown-request.component.html | 30 +++++++------------ .../bulk-takedown-request.component.ts | 14 +++------ .../delisting-request.component.html | 27 +++++------------ .../delisting-request.component.ts | 6 ---- 4 files changed, 21 insertions(+), 56 deletions(-) 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 d7de89dc..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 @@ -116,29 +116,19 @@

Takedown Requests for each platform are aggregated into a CSV file and sent
- +
- - - - - - - - - - - - - {{(commentControl.getRawValue() - || '').length}}/2000 + + {{textarea.value.length}}/2000
-
- Details of the +
+ Details of the request are required
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 dfc76a6e..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 @@ -18,7 +18,6 @@ import { validateEmailListString } from '../../../common/consts/validators.const import { ErrorHandlingService } from '../../../common/services/error-handling.service'; import { GlobalLoaderService } from '../../../common/services/global-loader.service'; import { ListingTableRow } from '../../../common/models/listing-table-row'; -import { EditorModule, EditorTextChangeEvent } from 'primeng/editor'; @Component({ selector: 'app-bulk-takedown-request', @@ -34,7 +33,6 @@ import { EditorModule, EditorTextChangeEvent } from 'primeng/editor'; DialogModule, ChipsModule, ReactiveFormsModule, - EditorModule, ], templateUrl: './bulk-takedown-request.component.html', styleUrl: './bulk-takedown-request.component.scss' @@ -64,7 +62,7 @@ export class BulkTakedownRequestComponent implements OnInit { public get isWithStandardDetailControl(): AbstractControl { return this.myForm.controls['isWithStandardDetail']; } - public get commentControl(): AbstractControl { + public get customDetailTxtControl(): AbstractControl { return this.myForm.controls['customDetailTxt']; } @@ -95,10 +93,6 @@ export class BulkTakedownRequestComponent implements OnInit { }); } - onEditorChanged(_: EditorTextChangeEvent): void { - this.commentControl.updateValueAndValidity(); - } - onSort(property: keyof ListingDetails): void { if (this.sort) { if (this.sort.prop === property) { @@ -155,11 +149,11 @@ export class BulkTakedownRequestComponent implements OnInit { onWithStandardDetailChanged(value: CheckboxChangeEvent): void { if (value.checked) - this.commentControl.removeValidators([Validators.required]); + this.customDetailTxtControl.removeValidators([Validators.required]); else - this.commentControl.addValidators([Validators.required]); + this.customDetailTxtControl.addValidators([Validators.required]); - this.commentControl.updateValueAndValidity(); + this.customDetailTxtControl.updateValueAndValidity(); this.myForm.updateValueAndValidity(); } diff --git a/frontend/src/app/features/components/delisting-request/delisting-request.component.html b/frontend/src/app/features/components/delisting-request/delisting-request.component.html index 7ec0071d..5fa1855f 100644 --- a/frontend/src/app/features/components/delisting-request/delisting-request.component.html +++ b/frontend/src/app/features/components/delisting-request/delisting-request.component.html @@ -85,28 +85,15 @@

Add Details of your request

- +
- - - - - - - - - - - - - {{(customDetailTxtControl.getRawValue() - || '').length}}/2000 + + {{textarea.value.length}}/2000
diff --git a/frontend/src/app/features/components/delisting-request/delisting-request.component.ts b/frontend/src/app/features/components/delisting-request/delisting-request.component.ts index c6076423..3bc588a0 100644 --- a/frontend/src/app/features/components/delisting-request/delisting-request.component.ts +++ b/frontend/src/app/features/components/delisting-request/delisting-request.component.ts @@ -22,7 +22,6 @@ import { InputNumberModule } from 'primeng/inputnumber'; import { GlobalLoaderService } from '../../../common/services/global-loader.service'; import { forkJoin } from 'rxjs'; import { ErrorHandlingService } from '../../../common/services/error-handling.service'; -import { EditorModule, EditorTextChangeEvent } from 'primeng/editor'; @Component({ selector: 'app-delisting-request', @@ -41,7 +40,6 @@ import { EditorModule, EditorTextChangeEvent } from 'primeng/editor'; TooltipModule, ButtonModule, ToastModule, - EditorModule, ], templateUrl: './delisting-request.component.html', styleUrl: './delisting-request.component.scss' @@ -153,10 +151,6 @@ export class DelistingRequestComponent implements OnInit { } } - onEditorChanged(_: EditorTextChangeEvent): void { - this.customDetailTxtControl.updateValueAndValidity(); - } - onPreviewClose(): void { this.isPreviewVisible = false; }