Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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