Fix: FormArrays were not getting cleared and were basically fucking the whole thing up.
Fix: EmployeeAttendance was borking because the inital employee was null.
This commit is contained in:
@ -57,7 +57,7 @@ export class AttendanceComponent implements OnInit {
|
||||
this.info = data.info;
|
||||
this.attendanceTypes = data.attendanceTypes;
|
||||
this.form.controls.date.setValue(moment(this.info.date, 'DD-MMM-YYYY').toDate());
|
||||
this.form.controls.attendances.reset();
|
||||
this.form.controls.attendances.clear();
|
||||
this.info.body.forEach((x) =>
|
||||
this.form.controls.attendances.push(
|
||||
new FormGroup({
|
||||
|
||||
Reference in New Issue
Block a user