Chore: Reformatted everthing

Fix: Product ledger was not totalling.
This is because for some reason, pydantic was sending the data as string when the field was nullable
This commit is contained in:
2023-08-04 21:00:26 +05:30
parent af27bf74ef
commit ac868257b7
194 changed files with 513 additions and 1580 deletions
@@ -75,12 +75,8 @@ export class EmployeeDetailComponent implements OnInit, AfterViewInit {
points: this.item.points || '',
isActive: this.item.isActive,
costCentre: this.item.costCentre.id ?? '',
joiningDate: this.item.joiningDate
? moment(this.item.joiningDate, 'DD-MMM-YYYY').toDate()
: new Date(),
leavingDate: this.item.isActive
? null
: moment(this.item.leavingDate, 'DD-MMM-YYYY').toDate(),
joiningDate: this.item.joiningDate ? moment(this.item.joiningDate, 'DD-MMM-YYYY').toDate() : new Date(),
leavingDate: this.item.isActive ? null : moment(this.item.leavingDate, 'DD-MMM-YYYY').toDate(),
});
}
@@ -138,9 +134,7 @@ export class EmployeeDetailComponent implements OnInit, AfterViewInit {
this.item.isActive = formValue.isActive ?? true;
this.item.costCentre.id = formValue.costCentre ?? '';
this.item.joiningDate = moment(formValue.joiningDate).format('DD-MMM-YYYY');
this.item.leavingDate = this.item.isActive
? null
: moment(formValue.leavingDate).format('DD-MMM-YYYY');
this.item.leavingDate = this.item.isActive ? null : moment(formValue.leavingDate).format('DD-MMM-YYYY');
return this.item;
}
}