2020-11-25 08:57:17 +01:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2021-02-08 12:47:07 +01:00
|
|
|
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
2021-02-17 13:49:04 +01:00
|
|
|
import {CustomErrorStateMatcher} from '@app/_helpers';
|
2020-11-25 08:57:17 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-export-accounts',
|
|
|
|
templateUrl: './export-accounts.component.html',
|
|
|
|
styleUrls: ['./export-accounts.component.scss']
|
|
|
|
})
|
|
|
|
export class ExportAccountsComponent implements OnInit {
|
2021-02-08 12:47:07 +01:00
|
|
|
exportForm: FormGroup;
|
|
|
|
matcher = new CustomErrorStateMatcher();
|
|
|
|
submitted: boolean = false;
|
2020-11-25 08:57:17 +01:00
|
|
|
|
2021-02-08 12:47:07 +01:00
|
|
|
constructor(
|
|
|
|
private formBuilder: FormBuilder
|
|
|
|
) { }
|
2020-11-25 08:57:17 +01:00
|
|
|
|
|
|
|
ngOnInit(): void {
|
2021-02-08 12:47:07 +01:00
|
|
|
this.exportForm = this.formBuilder.group({
|
|
|
|
accountType: ['', Validators.required],
|
|
|
|
transfers: ['']
|
|
|
|
});
|
2020-11-25 08:57:17 +01:00
|
|
|
}
|
|
|
|
|
2021-02-08 12:47:07 +01:00
|
|
|
get exportFormStub(): any { return this.exportForm.controls; }
|
|
|
|
|
|
|
|
export(): void {
|
|
|
|
this.submitted = true;
|
|
|
|
if (this.exportForm.invalid) { return; }
|
|
|
|
this.submitted = false;
|
|
|
|
}
|
2020-11-25 08:57:17 +01:00
|
|
|
}
|