Moved the batch integrity report from settings to its own report in products with permission of product ledger.

It also automatically fixes the issue prices.
This commit is contained in:
tanshu committed 2021-09-24 14:40:51 +05:30
1 parent b1557bef88
commit 6d0d95070b
27 files changed
+613 -200

No files matched your search

+2 -12
View File
@@ -6,7 +6,6 @@ import { catchError } from 'rxjs/operators';
import { ErrorLoggerService } from '../core/error-logger.service';
import { Product } from '../core/product';
import { BatchDate, IntegrityBatch } from './integrity-batch';
import { LockInfo } from './lock-info';
const serviceName = 'SettingsService';
@@ -83,21 +82,12 @@ export class SettingsService {
}>;
}
checkDatabaseIntegrity(): Observable<{
attendanceCount: number;
batches: IntegrityBatch[];
batchDates: BatchDate[];
}> {
checkDatabaseIntegrity(): Observable<{ attendanceCount: number }> {
const url = '/api/db-integrity';
return this.http
.post<{ attendanceCount: number; batches: IntegrityBatch[]; batchDates: BatchDate[] }>(
url,
{},
)
.post<{ attendanceCount: number }>(url, {})
.pipe(catchError(this.log.handleError(serviceName, 'checkDatabaseIntegrity'))) as Observable<{
attendanceCount: number;
batches: IntegrityBatch[];
batchDates: BatchDate[];
}>;
}
}