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:
@@ -12,8 +12,7 @@ const batchIntegrityRoutes: Routes = [
|
||||
path: '',
|
||||
component: BatchIntegrityReportComponent,
|
||||
canActivate: [
|
||||
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
|
||||
inject(AuthGuard).canActivate(route, state),
|
||||
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => inject(AuthGuard).canActivate(route, state),
|
||||
],
|
||||
data: {
|
||||
permission: 'Product Ledger',
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
<mat-cell *matCellDef="let row">
|
||||
<ul>
|
||||
<li *ngFor="let detail of row.details">
|
||||
<a [routerLink]="detail.url">{{ detail.type }}</a> on {{ detail.date }} of
|
||||
{{ detail.quantity }} @
|
||||
<a [routerLink]="detail.url">{{ detail.type }}</a> on {{ detail.date }} of {{ detail.quantity }} @
|
||||
{{ detail.price | currency: 'INR' }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -6,12 +6,7 @@ import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import {
|
||||
DateAdapter,
|
||||
MAT_DATE_FORMATS,
|
||||
MAT_DATE_LOCALE,
|
||||
MatNativeDateModule,
|
||||
} from '@angular/material/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatNativeDateModule } from '@angular/material/core';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatExpansionModule } from '@angular/material/expansion';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
@@ -11,10 +11,7 @@ describe('BatchIntegrityService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject(
|
||||
[BatchIntegrityReportService],
|
||||
(service: BatchIntegrityReportService) => {
|
||||
expect(service).toBeTruthy();
|
||||
},
|
||||
));
|
||||
it('should be created', inject([BatchIntegrityReportService], (service: BatchIntegrityReportService) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -22,8 +22,6 @@ export class BatchIntegrityReportService {
|
||||
const url = '/api/batch-integrity';
|
||||
return this.http
|
||||
.post<BatchIntegrity[]>(url, {})
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'batchIntegrity'))) as Observable<
|
||||
BatchIntegrity[]
|
||||
>;
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'batchIntegrity'))) as Observable<BatchIntegrity[]>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,7 @@ describe('BatchIntegrityResolverService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject(
|
||||
[BatchIntegrityResolverService],
|
||||
(service: BatchIntegrityResolverService) => {
|
||||
expect(service).toBeTruthy();
|
||||
},
|
||||
));
|
||||
it('should be created', inject([BatchIntegrityResolverService], (service: BatchIntegrityResolverService) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user