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:
2023-08-04 21:00:26 +05:30
parent af27bf74ef
commit ac868257b7
194 changed files with 513 additions and 1580 deletions
@@ -12,10 +12,7 @@ describe('ProductGroupListResolver', () => {
});
});
it('should be created', inject(
[ProductGroupListResolver],
(service: ProductGroupListResolver) => {
expect(service).toBeTruthy();
},
));
it('should be created', inject([ProductGroupListResolver], (service: ProductGroupListResolver) => {
expect(service).toBeTruthy();
}));
});
@@ -8,8 +8,7 @@ import { map } from 'rxjs/operators';
import { ProductGroup } from '../../core/product-group';
/** Simple sort comparator for example ID/Name columns (for client-side sorting). */
const compare = (a: string | number, b: string | number, isAsc: boolean) =>
(a < b ? -1 : 1) * (isAsc ? 1 : -1);
const compare = (a: string | number, b: string | number, isAsc: boolean) => (a < b ? -1 : 1) * (isAsc ? 1 : -1);
export class ProductGroupListDataSource extends DataSource<ProductGroup> {
constructor(
public data: ProductGroup[],
@@ -14,8 +14,7 @@ const productGroupRoutes: Routes = [
path: '',
component: ProductGroupListComponent,
canActivate: [
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
inject(AuthGuard).canActivate(route, state),
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => inject(AuthGuard).canActivate(route, state),
],
data: {
permission: 'Cost Centres',
@@ -28,8 +27,7 @@ const productGroupRoutes: Routes = [
path: 'new',
component: ProductGroupDetailComponent,
canActivate: [
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
inject(AuthGuard).canActivate(route, state),
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => inject(AuthGuard).canActivate(route, state),
],
data: {
permission: 'Cost Centres',
@@ -42,8 +40,7 @@ const productGroupRoutes: Routes = [
path: ':id',
component: ProductGroupDetailComponent,
canActivate: [
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
inject(AuthGuard).canActivate(route, state),
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => inject(AuthGuard).canActivate(route, state),
],
data: {
permission: 'Cost Centres',
@@ -22,9 +22,7 @@ export class ProductGroupService {
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
return this.http
.get<ProductGroup>(getUrl)
.pipe(
catchError(this.log.handleError(serviceName, `get id=${id}`)),
) as Observable<ProductGroup>;
.pipe(catchError(this.log.handleError(serviceName, `get id=${id}`))) as Observable<ProductGroup>;
}
list(): Observable<ProductGroup[]> {