Skip to content

Instantly share code, notes, and snippets.

@chasebaker21
Created November 19, 2020 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chasebaker21/dd87ed94646e1efc32b63810a2206fb2 to your computer and use it in GitHub Desktop.
Save chasebaker21/dd87ed94646e1efc32b63810a2206fb2 to your computer and use it in GitHub Desktop.
// sends data to project input dialog modal
// when closed the projectForm updates the day selected tasks
openProjectInputDialog(day: string, index: number, taskData: any, clientName: string, project: string, date: Date) {
const dialogRef = this.dialog.open(ProjectInputModalComponent, {
data: {
dayOfWeek: day,
taskData: taskData,
client: clientName,
currentProject: project,
date: date
}
});
dialogRef.afterClosed().subscribe(results => {
if (results) {
let dayOfWeek = results.event;
this.tasksForm = results.data;
this.projectForm.get("projectTime").value[index].hoursHashMap[dayOfWeek] = this.tasksForm.value;
this.project.emit(this.projectForm);
}
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment