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

@@ -32,10 +32,7 @@ export class ClientDetailComponent implements OnInit, AfterViewInit {
private ser: ClientService,
) {
this.form = new FormGroup({
code: new FormControl<number | string>(
{ value: '(Auto)', disabled: true },
{ nonNullable: true },
),
code: new FormControl<number | string>({ value: '(Auto)', disabled: true }, { nonNullable: true }),
name: new FormControl<string | null>(null),
enabled: new FormControl<boolean>(false, { nonNullable: true }),
otp: new FormControl<number | null>(null),
@@ -8,8 +8,7 @@ import { map } from 'rxjs/operators';
import { Client } from '../client';
/** 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 ClientListDataSource extends DataSource<Client> {
constructor(
public data: Client[],
@@ -14,8 +14,7 @@ const clientRoutes: Routes = [
path: '',
component: ClientListComponent,
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 clientRoutes: Routes = [
path: ':id',
component: ClientDetailComponent,
canActivate: [
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) =>
inject(AuthGuard).canActivate(route, state),
(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => inject(AuthGuard).canActivate(route, state),
],
data: {
permission: 'Cost Centres',