Removed timezone information from columns. Time will be stored in UTC coordinates.

Moved to Sqlalchemy 1.4 model and SessionFuture.

Upgraded to Angular 12

Upgraded the python dependencies
This commit is contained in:
2021-09-06 20:36:36 +05:30
parent 0bd6f8eb03
commit 350edf7126
129 changed files with 2720 additions and 3027 deletions

View File

@ -67,9 +67,9 @@ export class EmployeeBenefitsComponent implements OnInit, AfterViewInit {
}),
});
// Setup Employee Autocomplete
this.employees = ((this.form.get('addRow') as FormControl).get(
'employee',
) as FormControl).valueChanges.pipe(
this.employees = (
(this.form.get('addRow') as FormControl).get('employee') as FormControl
).valueChanges.pipe(
startWith(null),
map((x) => (x !== null && x.length >= 1 ? x : null)),
debounceTime(150),

View File

@ -106,9 +106,11 @@ export class IncentiveComponent implements OnInit {
}
change(row: Incentive, i: number) {
row.points = +(((this.form.get('incentives') as FormArray).get(`${i}`) as FormGroup).get(
'points',
) as FormControl).value;
row.points = +(
((this.form.get('incentives') as FormArray).get(`${i}`) as FormGroup).get(
'points',
) as FormControl
).value;
((this.form.get('incentives') as FormArray).get(`${i}`) as FormGroup).setValue({
points: `${row.points}`,
});

View File

@ -74,9 +74,9 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
narration: '',
});
// Listen to Batch Autocomplete Change
this.batches = ((this.form.get('addRow') as FormControl).get(
'batch',
) as FormControl).valueChanges.pipe(
this.batches = (
(this.form.get('addRow') as FormControl).get('batch') as FormControl
).valueChanges.pipe(
startWith('null'),
debounceTime(150),
distinctUntilChanged(),

View File

@ -71,9 +71,9 @@ export class JournalComponent implements OnInit, AfterViewInit, OnDestroy {
});
this.accBal = null;
// Setup Account Autocomplete
this.accounts = ((this.form.get('addRow') as FormControl).get(
'account',
) as FormControl).valueChanges.pipe(
this.accounts = (
(this.form.get('addRow') as FormControl).get('account') as FormControl
).valueChanges.pipe(
startWith(null),
map((x) => (x !== null && x.length >= 1 ? x : null)),
debounceTime(150),

View File

@ -74,9 +74,9 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
});
this.accBal = null;
// Listen to Account Autocomplete Change
this.accounts = ((this.form.get('addRow') as FormControl).get(
'account',
) as FormControl).valueChanges.pipe(
this.accounts = (
(this.form.get('addRow') as FormControl).get('account') as FormControl
).valueChanges.pipe(
startWith(null),
map((x) => (x !== null && x.length >= 1 ? x : null)),
debounceTime(150),

View File

@ -51,8 +51,8 @@ export class ProductService {
.pipe(catchError(this.log.handleError(serviceName, 'delete'))) as Observable<Product>;
}
autocomplete(query: string): Observable<Product[]> {
const options = { params: new HttpParams().set('q', query) };
autocomplete(query: string, extended: boolean = false): Observable<Product[]> {
const options = { params: new HttpParams().set('q', query).set('e', extended.toString()) };
return this.http
.get<Product[]>(`${url}/query`, options)
.pipe(catchError(this.log.handleError(serviceName, 'autocomplete'))) as Observable<Product[]>;

View File

@ -83,9 +83,9 @@ export class PurchaseReturnComponent implements OnInit, AfterViewInit, OnDestroy
switchMap((x) => (x === null ? observableOf([]) : this.accountSer.autocomplete(x))),
);
// Listen to Batch Autocomplete Change
this.batches = ((this.form.get('addRow') as FormControl).get(
'batch',
) as FormControl).valueChanges.pipe(
this.batches = (
(this.form.get('addRow') as FormControl).get('batch') as FormControl
).valueChanges.pipe(
startWith(''),
debounceTime(150),
distinctUntilChanged(),

View File

@ -87,9 +87,9 @@ export class PurchaseComponent implements OnInit, AfterViewInit, OnDestroy {
switchMap((x) => (x === null ? observableOf([]) : this.accountSer.autocomplete(x))),
);
// Listen to Product Autocomplete Change
this.products = ((this.form.get('addRow') as FormControl).get(
'product',
) as FormControl).valueChanges.pipe(
this.products = (
(this.form.get('addRow') as FormControl).get('product') as FormControl
).valueChanges.pipe(
startWith(null),
map((x) => (x !== null && x.length >= 1 ? x : null)),
debounceTime(150),

View File

@ -73,9 +73,9 @@ export class ReceiptComponent implements OnInit, AfterViewInit, OnDestroy {
});
this.accBal = null;
// Listen to Account Autocomplete Change
this.accounts = ((this.form.get('addRow') as FormControl).get(
'account',
) as FormControl).valueChanges.pipe(
this.accounts = (
(this.form.get('addRow') as FormControl).get('account') as FormControl
).valueChanges.pipe(
startWith(null),
map((x) => (x !== null && x.length >= 1 ? x : null)),
debounceTime(150),

View File

@ -17,11 +17,8 @@ export class UnpostedDataSource extends DataSource<Unposted> {
}
connect(): Observable<Unposted[]> {
const dataMutations: (
| Observable<Unposted[]>
| EventEmitter<PageEvent>
| EventEmitter<Sort>
)[] = [observableOf(this.data)];
const dataMutations: (Observable<Unposted[]> | EventEmitter<PageEvent> | EventEmitter<Sort>)[] =
[observableOf(this.data)];
if (this.paginator) {
dataMutations.push((this.paginator as MatPaginator).page);
}