Fix: Raw material cost detail report borked on sort at the end as order was not in RawMaterialCost schema. Although it is not needed in the frontend, added it as optional.
This commit is contained in:
1 parent
ccf2f704b6
commit
158f3e0e36
33 files changed
+70
-41
No files matched your search
@@ -56,28 +56,38 @@ export class SettingsService {
|
||||
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>>;
|
||||
.post<Record<string, never>>(`${url}/${date}`, {})
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'rebaseDatabase'))) as Observable<
|
||||
Record<string, never>
|
||||
>;
|
||||
}
|
||||
|
||||
setMaintenance(enable: boolean): Observable<{ enabled: boolean; user: string }> {
|
||||
const url = '/api/maintenance';
|
||||
return this.http
|
||||
.post<{ enabled: boolean; user: string }>(url, { enabled: enable })
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'setMaintenance'))) as Observable<{ enabled: boolean; user: string }>;
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'setMaintenance'))) as Observable<{
|
||||
enabled: boolean;
|
||||
user: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
getMaintenance(): Observable<{ enabled: boolean; user: string }> {
|
||||
const url = '/api/maintenance';
|
||||
return this.http
|
||||
.get<{ enabled: boolean; user: string }>(url)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'getMaintenance'))) as Observable<{ enabled: boolean; user: string }>;
|
||||
.get<{ enabled: boolean; user: string }>(url)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'getMaintenance'))) as Observable<{
|
||||
enabled: boolean;
|
||||
user: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
checkDatabaseIntegrity(): Observable<{ 'attendanceCount': number }> {
|
||||
checkDatabaseIntegrity(): Observable<{ attendanceCount: number }> {
|
||||
const url = '/api/db-integrity';
|
||||
return this.http
|
||||
.post<{ 'attendanceCount': number }>(url, {})
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'checkDatabaseIntegrity'))) as Observable<{ 'attendanceCount': number }>;
|
||||
.post<{ attendanceCount: number }>(url, {})
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'checkDatabaseIntegrity'))) as Observable<{
|
||||
attendanceCount: number;
|
||||
}>;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user