feature: removed angular materials and implemented new deposit modal
This commit is contained in:
parent
0100df89f5
commit
604d593fdc
10 changed files with 66 additions and 48 deletions
|
@ -1,17 +1,10 @@
|
|||
import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, EventEmitter, inject, Input, OnInit, Output} from '@angular/core';
|
||||
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
import { loadStripe, Stripe } from '@stripe/stripe-js';
|
||||
import { DepositService } from '../../service/deposit.service';
|
||||
import { debounceTime } from 'rxjs';
|
||||
import { environment } from '../../../environments/environment';
|
||||
import { NgIf } from '@angular/common';
|
||||
import {
|
||||
MatDialogActions,
|
||||
MatDialogContent,
|
||||
MatDialogRef,
|
||||
MatDialogTitle,
|
||||
} from '@angular/material/dialog';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-deposit',
|
||||
|
@ -19,20 +12,17 @@ import { MatButton } from '@angular/material/button';
|
|||
imports: [
|
||||
ReactiveFormsModule,
|
||||
NgIf,
|
||||
MatDialogTitle,
|
||||
MatDialogContent,
|
||||
MatDialogActions,
|
||||
MatButton,
|
||||
],
|
||||
templateUrl: './deposit.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class DepositComponent implements OnInit {
|
||||
@Input() isOpen: boolean = false;
|
||||
@Output() close = new EventEmitter<void>();
|
||||
protected form!: FormGroup;
|
||||
protected errorMsg = '';
|
||||
private stripe: Stripe | null = null;
|
||||
private service: DepositService = inject(DepositService);
|
||||
public dialogRef: MatDialogRef<DepositComponent> = inject(MatDialogRef<DepositComponent>);
|
||||
|
||||
async ngOnInit() {
|
||||
this.form = new FormGroup({
|
||||
|
@ -63,7 +53,7 @@ export class DepositComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
public closeDialog(): void {
|
||||
this.dialogRef.close();
|
||||
public closeModal() {
|
||||
this.close.emit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue