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:
@@ -77,6 +77,7 @@ export class IncentiveComponent implements OnInit {
|
||||
loadVoucher(voucher: Voucher) {
|
||||
this.voucher = voucher;
|
||||
this.form.controls.date.setValue(moment(this.voucher.date, 'DD-MMM-YYYY').toDate());
|
||||
this.form.controls.incentives.clear();
|
||||
this.voucher.incentives.forEach((x) =>
|
||||
this.form.controls.incentives.push(
|
||||
new FormGroup({
|
||||
|
||||
Reference in New Issue
Block a user