Blacked and isorted the python files

Prettied and eslinted the typescript/html files
This commit is contained in:
2020-10-11 10:56:29 +05:30
parent b31db593c2
commit d677cfb1ea
505 changed files with 7559 additions and 5649 deletions
@@ -2,7 +2,6 @@ import { DataSource } from '@angular/cdk/collections';
import { Observable, of as observableOf } from 'rxjs';
export class ReasonDatasource extends DataSource<string> {
constructor(private data: string[]) {
super();
}
@@ -11,6 +10,5 @@ export class ReasonDatasource extends DataSource<string> {
return observableOf(this.data);
}
disconnect() {
}
disconnect() {}
}
@@ -4,17 +4,28 @@
<mat-table [dataSource]="dataSource">
<!-- Reason Column -->
<ng-container matColumnDef="reason">
<mat-cell *matCellDef="let row" (click)="select(row)">{{row}}</mat-cell>
<mat-cell *matCellDef="let row" (click)="select(row)">{{ row }}</mat-cell>
<mat-footer-cell *matFooterCellDef>
<mat-form-field fxFlex>
<mat-label>Reason</mat-label>
<input type="text" matInput #son placeholder="Reason" formControlName="son" autocomplete="off"
(focus)="select(son.value) && son.select()" (input)="select(son.value)">
<input
type="text"
matInput
#son
placeholder="Reason"
formControlName="son"
autocomplete="off"
(focus)="select(son.value) && son.select()"
(input)="select(son.value)"
/>
</mat-form-field>
</mat-footer-cell>
</ng-container>
<mat-row *matRowDef="let row; columns: displayedColumns;" [class.selected]="row === selected"></mat-row>
<mat-row
*matRowDef="let row; columns: displayedColumns"
[class.selected]="row === selected"
></mat-row>
<mat-footer-row *matFooterRowDef="displayedColumns"></mat-footer-row>
</mat-table>
</form>
@@ -8,9 +8,8 @@ describe('VoidReasonComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ReasonComponent ]
})
.compileComponents();
declarations: [ReasonComponent],
}).compileComponents();
}));
beforeEach(() => {
@@ -1,12 +1,13 @@
import { Component, ElementRef, Inject, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { ReasonDatasource } from './reason-datasource';
import { FormBuilder, FormGroup } from "@angular/forms";
@Component({
selector: 'app-reason',
templateUrl: './reason.component.html',
styleUrls: ['./reason.component.css']
styleUrls: ['./reason.component.css'],
})
export class ReasonComponent {
@ViewChild('son', { static: true }) son: ElementRef;
@@ -19,13 +20,13 @@ export class ReasonComponent {
constructor(
public dialogRef: MatDialogRef<ReasonComponent>,
@Inject(MAT_DIALOG_DATA) private data:{ title: string, reasons: string[]},
private fb: FormBuilder
@Inject(MAT_DIALOG_DATA) private data: { title: string; reasons: string[] },
private fb: FormBuilder,
) {
this.reasons = data.reasons || [];
this.title = data.title;
this.form = this.fb.group({
son: ''
son: '',
});
this.dataSource = new ReasonDatasource(this.reasons);
}