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:
tanshu committed 2023-08-04 21:00:26 +05:30
1 parent af27bf74ef
commit ac868257b7
194 files changed
+513 -1580

No files matched your search

+4 -12
View File
@@ -20,36 +20,28 @@ export class SettingsService {
const url = '/api/lock-information';
return this.http
.get<[LockInfo]>(url)
.pipe(catchError(this.log.handleError(serviceName, 'getLockInformation'))) as Observable<
[LockInfo]
>;
.pipe(catchError(this.log.handleError(serviceName, 'getLockInformation'))) as Observable<[LockInfo]>;
}
setLockInformation(lockInformation: LockInfo): Observable<LockInfo[]> {
const url = '/api/lock-information';
return this.http
.post<LockInfo[]>(url, lockInformation)
.pipe(catchError(this.log.handleError(serviceName, 'setLockInformation'))) as Observable<
LockInfo[]
>;
.pipe(catchError(this.log.handleError(serviceName, 'setLockInformation'))) as Observable<LockInfo[]>;
}
deleteLockInformation(id: string): Observable<LockInfo[]> {
const url = '/api/lock-information';
return this.http
.delete<LockInfo[]>(`${url}/${id}`)
.pipe(catchError(this.log.handleError(serviceName, 'deleteLockInformation'))) as Observable<
LockInfo[]
>;
.pipe(catchError(this.log.handleError(serviceName, 'deleteLockInformation'))) as Observable<LockInfo[]>;
}
rebaseDatabase(date: string): Observable<Record<string, never>> {
const url = '/api/rebase';
return this.http
.post<Record<string, never>>(`${url}/${date}`, {})
.pipe(catchError(this.log.handleError(serviceName, 'rebaseDatabase'))) as Observable<
Record<string, never>
>;
.pipe(catchError(this.log.handleError(serviceName, 'rebaseDatabase'))) as Observable<Record<string, never>>;
}
setMaintenance(enable: boolean): Observable<{ enabled: boolean; user: string }> {