Last active
November 23, 2020 18:56
-
-
Save chasebaker21/6bd196852a927813802307f6eabfb542 to your computer and use it in GitHub Desktop.
Project Modal Set up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, Inject } from '@angular/core'; | |
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; | |
import { FormGroup, FormBuilder, FormArray, FormControl } from '@angular/forms'; | |
@Component({ | |
selector: 'app-project-modal', | |
templateUrl: './project-modal.component.html', | |
styleUrls: ['./project-modal.component.scss'] | |
}) | |
export class ProjectInputModalComponent implements OnInit { | |
taskForm: FormGroup; | |
dayOfWeek: string; | |
timesheetHours: number; | |
projectDesc: string; | |
client: string; | |
enteredHours: number = 0; | |
hoursExceedTimesheet: boolean = false; | |
tasks = []; | |
storageKey: string; | |
taskSeq: number = 0; | |
taskData: any; | |
taskDate: Date; | |
constructor( | |
public dialogRef: MatDialogRef<ProjectInputModalComponent>, | |
@Inject(MAT_DIALOG_DATA) public data: any, | |
private fb: FormBuilder, | |
) { } | |
ngOnInit(): void { | |
this.setDataFromParent(); | |
this.createForm(); | |
this.patchValues(); | |
this.checkForData(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment