Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// creates a form after checking the tasks length in order to start setting
// the taskSeq number properly
createForm() {
if (this.tasks.length === 0) {
this.taskSeq = 1;
}
this.taskForm = this.fb.group({
comments: new FormControl(null),
day: new FormControl(null),
hours: new FormControl(null),
oldHours: new FormControl(null),
open: new FormControl(null),
tasks: this.fb.array([
this.fb.group({
taskDesc: '',
taskSeq: this.taskSeq,
hours: 0,
comments: '',
statusReportFlag: true,
taskCategoryId: 0
})
])
})
this.onChanges();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment