From 136ad32a41c31bf0851dbde1fff5cfa00da861c9 Mon Sep 17 00:00:00 2001 From: Oleksandr Bohuslavskyi Date: Tue, 22 Oct 2024 12:55:43 -0500 Subject: [PATCH] Emails for SubPlatforms, minor fixes. --- frontend/src/app/common/models/platform.ts | 14 ++++ .../add-new-platform.component.ts | 3 + .../add-sub-platform.component.html | 82 ++++++++++++++++++ .../add-sub-platform.component.ts | 16 ++++ .../edit-platform.component.html | 2 +- .../edit-platform/edit-platform.component.ts | 7 +- .../edit-sub-platform.component.html | 84 ++++++++++++++++++- .../edit-sub-platform.component.ts | 22 ++++- .../platform-management.component.html | 6 +- .../view-platform.component.html | 16 +++- 10 files changed, 241 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/common/models/platform.ts b/frontend/src/app/common/models/platform.ts index f87a5321..b1ebed9d 100644 --- a/frontend/src/app/common/models/platform.ts +++ b/frontend/src/app/common/models/platform.ts @@ -17,6 +17,7 @@ export interface Platform { secondaryTakedownRequestContactEmail: string; subsidiaries: Array; platformType: string; + updUserDisplayNm: string; } export interface UpdatePlatform { @@ -35,6 +36,10 @@ export interface UpdateSubPlatform { updDtm: string; isActive: boolean; managingOrganizationId: number; + primaryNoticeOfTakedownContactEmail: string; + primaryTakedownRequestContactEmail: string; + secondaryNoticeOfTakedownContactEmail: string; + secondaryTakedownRequestContactEmail: string; } export interface SubPlatform { @@ -43,10 +48,15 @@ export interface SubPlatform { organizationType: string; organizationCd: string; organizationNm: string; + primaryNoticeOfTakedownContactEmail: string; + primaryTakedownRequestContactEmail: string; + secondaryNoticeOfTakedownContactEmail: string; + secondaryTakedownRequestContactEmail: string; updDtm: string; isActive: boolean; updUserGuid: string; managingOrganizationId: number; + updUserDisplayNm: string; } export interface PlatformCreate { @@ -66,4 +76,8 @@ export interface SubPlatformCreate { managingOrganizationId: number; isActive: boolean; updDtm: string; + primaryNoticeOfTakedownContactEmail: string; + primaryTakedownRequestContactEmail: string; + secondaryNoticeOfTakedownContactEmail: string; + secondaryTakedownRequestContactEmail: string; } diff --git a/frontend/src/app/features/components/platform-management/add-new-platform/add-new-platform.component.ts b/frontend/src/app/features/components/platform-management/add-new-platform/add-new-platform.component.ts index cba28bc3..0b4ba117 100644 --- a/frontend/src/app/features/components/platform-management/add-new-platform/add-new-platform.component.ts +++ b/frontend/src/app/features/components/platform-management/add-new-platform/add-new-platform.component.ts @@ -9,6 +9,7 @@ import { GlobalLoaderService } from '../../../../common/services/global-loader.s import { OrganizationService } from '../../../../common/services/organization.service'; import { DropdownOption } from '../../../../common/models/dropdown-option'; import { RadioButtonModule } from 'primeng/radiobutton'; +import { Router } from '@angular/router'; @Component({ selector: 'app-add-new-platform', @@ -33,6 +34,7 @@ export class AddNewPlatformComponent implements OnInit { private fb: FormBuilder, private messageHandlerService: ErrorHandlingService, private loaderService: GlobalLoaderService, + private router: Router, private orgService: OrganizationService, ) { } @@ -68,6 +70,7 @@ export class AddNewPlatformComponent implements OnInit { onCancel(): void { this.myForm.reset(); this.platformStatusControl.setValue(true); + this.router.navigateByUrl(`/platform-management`); } public get organizationNmControl(): AbstractControl { diff --git a/frontend/src/app/features/components/platform-management/add-sub-platform/add-sub-platform.component.html b/frontend/src/app/features/components/platform-management/add-sub-platform/add-sub-platform.component.html index cd0bcb55..5045c360 100644 --- a/frontend/src/app/features/components/platform-management/add-sub-platform/add-sub-platform.component.html +++ b/frontend/src/app/features/components/platform-management/add-sub-platform/add-sub-platform.component.html @@ -42,6 +42,88 @@

Add New Platform

+
+
+
+
+ +
+
+ +
+
+ + + Email is Required + +
+
+
+
+
+
+ +
+
+ +
+
+ + + Email is Required + +
+
+
+
+
+
+
+
+ +
+
+ +
+
+ + + Email is Required + +
+
+
+
+
+
+ +
+
+ +
+
+ + + Email is Required + +
+
+
+
diff --git a/frontend/src/app/features/components/platform-management/add-sub-platform/add-sub-platform.component.ts b/frontend/src/app/features/components/platform-management/add-sub-platform/add-sub-platform.component.ts index b059f0f9..54388fdb 100644 --- a/frontend/src/app/features/components/platform-management/add-sub-platform/add-sub-platform.component.ts +++ b/frontend/src/app/features/components/platform-management/add-sub-platform/add-sub-platform.component.ts @@ -74,11 +74,27 @@ export class AddSubPlatformComponent implements OnInit { public get platformStatusControl(): AbstractControl { return this.myForm.controls['status']; } + public get primaryNoticeOfTakedownContactEmailControl(): AbstractControl { + return this.myForm.controls['primaryNoticeOfTakedownContactEmail']; + } + public get primaryTakedownRequestContactEmailControl(): AbstractControl { + return this.myForm.controls['primaryTakedownRequestContactEmail']; + } + public get secondaryNoticeOfTakedownContactEmailControl(): AbstractControl { + return this.myForm.controls['secondaryNoticeOfTakedownContactEmail']; + } + public get secondaryTakedownRequestContactEmailControl(): AbstractControl { + return this.myForm.controls['secondaryTakedownRequestContactEmail']; + } private initForm(): void { this.myForm = this.fb.group({ organizationNm: ['', [Validators.required]], organizationCd: ['', [Validators.required]], + primaryNoticeOfTakedownContactEmail: ['', [Validators.required, Validators.email]], + primaryTakedownRequestContactEmail: ['', [Validators.required, Validators.email]], + secondaryNoticeOfTakedownContactEmail: ['', [Validators.email]], + secondaryTakedownRequestContactEmail: ['', [Validators.email]], status: [{ value: true, disabled: true }, []], }); } diff --git a/frontend/src/app/features/components/platform-management/edit-platform/edit-platform.component.html b/frontend/src/app/features/components/platform-management/edit-platform/edit-platform.component.html index 60ee8e63..c09c53ff 100644 --- a/frontend/src/app/features/components/platform-management/edit-platform/edit-platform.component.html +++ b/frontend/src/app/features/components/platform-management/edit-platform/edit-platform.component.html @@ -148,7 +148,7 @@

Edit Platform

- +
Edit Subsidiary Platform
- + +
+
+ +
+
+ + + Email is Required + +
+
+
+
+
+
+ +
+
+ +
+
+ + + Email is Required + +
+
+
+
+
+
+
+
+ +
+
+ +
+
+ + + Email is Required + +
+
+
+
+
+
+ +
+
+ +
+
+ + + Email is Required + +
+
+
+
+
+
+
+
+
Manage Platforms - Platform Type Notice of Non-compliance Email @@ -153,10 +152,9 @@

Manage Platforms

{{subPlatform.organizationNm || '-'}} {{subPlatform.organizationCd || '-'}} - {{platform.platformType || '-'}} - {{platform.primaryNoticeOfTakedownContactEmail || '-'}} + {{subPlatform.primaryNoticeOfTakedownContactEmail || '-'}} - {{platform.primaryTakedownRequestContactEmail || '-'}} + {{subPlatform.primaryTakedownRequestContactEmail || '-'}} {{subPlatform.isActive?'Active':'Disabled'}} diff --git a/frontend/src/app/features/components/platform-management/view-platform/view-platform.component.html b/frontend/src/app/features/components/platform-management/view-platform/view-platform.component.html index 54c7dba6..d5512a5c 100644 --- a/frontend/src/app/features/components/platform-management/view-platform/view-platform.component.html +++ b/frontend/src/app/features/components/platform-management/view-platform/view-platform.component.html @@ -58,7 +58,7 @@

Detailed Platform Contact Information

Last Updated By: - {{platform.updUserGuid || '-'}} + {{platform.updUserDisplayNm || '-'}}
@@ -98,6 +98,18 @@

Detailed Platform Contact Information

{{sub.organizationCd || '-'}}
+
+ Email for Non-Compliance Notices: + + {{sub.primaryNoticeOfTakedownContactEmail || '-'}} + +
+
+ Email for Takedown Request Letters: + + {{sub.primaryTakedownRequestContactEmail || '-'}} + +
Platform Status: @@ -107,7 +119,7 @@

Detailed Platform Contact Information

Last Updated By: - {{sub.updUserGuid || '-'}} + {{sub.updUserDisplayNm || '-'}}