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:
@@ -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>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user