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
@@ -17,11 +17,7 @@ export class EmployeeAttendanceService {
private log: ErrorLoggerService,
) {}
get(
id: string | null,
startDate: string | null,
finishDate: string | null,
): Observable<EmployeeAttendance> {
get(id: string | null, startDate: string | null, finishDate: string | null): Observable<EmployeeAttendance> {
const getUrl: string = id === null ? url : `${url}/${id}`;
const options = { params: new HttpParams() };
if (startDate !== null) {
@@ -32,9 +28,7 @@ export class EmployeeAttendanceService {
}
return this.http
.get<EmployeeAttendance>(getUrl, options)
.pipe(
catchError(this.log.handleError(serviceName, `get id=${id}`)),
) as Observable<EmployeeAttendance>;
.pipe(catchError(this.log.handleError(serviceName, `get id=${id}`))) as Observable<EmployeeAttendance>;
}
save(employeeAttendance: EmployeeAttendance): Observable<EmployeeAttendance> {
@@ -44,8 +38,6 @@ export class EmployeeAttendanceService {
const { id } = employeeAttendance.employee;
return this.http
.post<EmployeeAttendance>(`${url}/${id}`, employeeAttendance)
.pipe(
catchError(this.log.handleError(serviceName, 'save')),
) as Observable<EmployeeAttendance>;
.pipe(catchError(this.log.handleError(serviceName, 'save'))) as Observable<EmployeeAttendance>;
}
}