From b91f8a1ab56fa6f874f12f164cda8233631acf66 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 7 Sep 2021 10:21:45 +0300 Subject: [PATCH] Delete old verification component --- verification/verification.component.ts | 71 -------------------------- verification/verification.module.ts | 11 ---- 2 files changed, 82 deletions(-) delete mode 100644 verification/verification.component.ts delete mode 100644 verification/verification.module.ts diff --git a/verification/verification.component.ts b/verification/verification.component.ts deleted file mode 100644 index 6df0e063..00000000 --- a/verification/verification.component.ts +++ /dev/null @@ -1,71 +0,0 @@ -import {Component, Input, OnInit} from "@angular/core"; -import {FormBuilder, FormControl, Validators} from "@angular/forms"; -import {UserRegistryService} from "../services/user-registry.service"; - -@Component({ - selector: 'verification', - template: ` -
-
- -
- You have been invited to join {{name}} as Manager;
- Fill in the verification code, sent to your email, to accept the invitation request. -
-
- -
-
- - -
-
- -
- You are now manager of {{name}}. -
-
- -
- You have been refused to be manager of {{name}}. -
-
-
- ` -}) -export class VerificationComponent implements OnInit { - - @Input() - public name: string; - @Input() - public invitation; - public code: FormControl; - public loading = false; - public state: 'default' | 'verified' | 'refused' | 'error' = 'default'; - - constructor(private fb: FormBuilder, - private userRegistryService: UserRegistryService) { - } - - ngOnInit() { - this.code = this.fb.control('', [Validators.required, Validators.pattern('^[+0-9]{6}$')]); - } - - verify() { - this.loading = true; - this.userRegistryService.verify(this.invitation.id, this.code.value).subscribe(() => { - this.state = 'verified'; - this.loading = false; - }); - } - - reject() { - this.loading = true; - this.userRegistryService.deleteVerification(this.invitation.id).subscribe(() => { - this.state = 'refused'; - this.loading = false; - }); - } -} diff --git a/verification/verification.module.ts b/verification/verification.module.ts deleted file mode 100644 index 0fe79210..00000000 --- a/verification/verification.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {NgModule} from "@angular/core"; -import {CommonModule} from "@angular/common"; -import {VerificationComponent} from "./verification.component"; -import {ReactiveFormsModule} from "@angular/forms"; - -@NgModule({ - imports: [CommonModule, ReactiveFormsModule], - declarations: [VerificationComponent], - exports: [VerificationComponent] -}) -export class VerificationModule {}