build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
+2
-3
@@ -8,9 +8,8 @@ describe('CreateEnityDataTableChecksComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CreateEnityDataTableChecksComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [CreateEnityDataTableChecksComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+23
-12
@@ -15,7 +15,6 @@ import { OrganizationService } from 'app/organization/organization.service';
|
||||
styleUrls: ['./create-enity-data-table-checks.component.scss']
|
||||
})
|
||||
export class CreateEnityDataTableChecksComponent implements OnInit {
|
||||
|
||||
/** Create Entity Datatable Checks form. */
|
||||
createEntityForm: UntypedFormGroup;
|
||||
/** Entity Datatable Checks data. */
|
||||
@@ -36,11 +35,13 @@ export class CreateEnityDataTableChecksComponent implements OnInit {
|
||||
* @param {OrganizationService} organizationService Organization Service.
|
||||
* @param {Router} router Router.
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private organizationService: OrganizationService,
|
||||
private router: Router) {
|
||||
this.route.data.subscribe((data: {dataTableEntity: any}) => {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private organizationService: OrganizationService,
|
||||
private router: Router
|
||||
) {
|
||||
this.route.data.subscribe((data: { dataTableEntity: any }) => {
|
||||
this.createEntityData = data.dataTableEntity;
|
||||
this.entityTypes = [
|
||||
{ name: 'Client', value: this.createEntityData.entities[0] },
|
||||
@@ -61,9 +62,18 @@ export class CreateEnityDataTableChecksComponent implements OnInit {
|
||||
*/
|
||||
setCreateEntityDataTableForm() {
|
||||
this.createEntityForm = this.formBuilder.group({
|
||||
'entity': ['', Validators.required],
|
||||
'status': ['', Validators.required],
|
||||
'datatableName': ['', Validators.required]
|
||||
entity: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
status: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
datatableName: [
|
||||
'',
|
||||
Validators.required
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -95,9 +105,11 @@ export class CreateEnityDataTableChecksComponent implements OnInit {
|
||||
this.createEntityForm.removeControl('productId');
|
||||
break;
|
||||
}
|
||||
default : {
|
||||
default: {
|
||||
this.entityType = 'm_savings_account';
|
||||
this.dataTableList = this.createEntityData.datatables.filter((data: any) => data.entity === 'm_savings_account');
|
||||
this.dataTableList = this.createEntityData.datatables.filter(
|
||||
(data: any) => data.entity === 'm_savings_account'
|
||||
);
|
||||
this.statusList = this.createEntityData.statusSavings;
|
||||
this.createEntityForm.addControl('productId', new UntypedFormControl('', Validators.required));
|
||||
break;
|
||||
@@ -114,5 +126,4 @@ export class CreateEnityDataTableChecksComponent implements OnInit {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-2
@@ -13,7 +13,6 @@ import { OrganizationService } from '../organization.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class EntityDataTableChecksTemplateResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {OrganizationService} organizationService Organization service.
|
||||
*/
|
||||
@@ -26,5 +25,4 @@ export class EntityDataTableChecksTemplateResolver implements Resolve<Object> {
|
||||
resolve(): Observable<any> {
|
||||
return this.organizationService.getEntityDataTableChecksTemplate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('EntityDataTableChecksComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EntityDataTableChecksComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [EntityDataTableChecksComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+24
-14
@@ -21,11 +21,17 @@ import { DeleteDialogComponent } from '../../shared/delete-dialog/delete-dialog.
|
||||
styleUrls: ['./entity-data-table-checks.component.scss']
|
||||
})
|
||||
export class EntityDataTableChecksComponent implements OnInit {
|
||||
|
||||
/** Entity Data Table Checks data. */
|
||||
entityDataTableChecksData: any;
|
||||
/** Columns to be displayed in entity data table checks table. */
|
||||
displayedColumns: string[] = ['entity', 'productName', 'datatableName', 'status', 'systemDefined', 'actions'];
|
||||
displayedColumns: string[] = [
|
||||
'entity',
|
||||
'productName',
|
||||
'datatableName',
|
||||
'status',
|
||||
'systemDefined',
|
||||
'actions'
|
||||
];
|
||||
/** Data source for entity data table checks table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
/** Corresponding values for Entity */
|
||||
@@ -59,10 +65,12 @@ export class EntityDataTableChecksComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {MatDialog} dialog Dialog reference.
|
||||
*/
|
||||
constructor(private organizationService: OrganizationService,
|
||||
private route: ActivatedRoute,
|
||||
private dialog: MatDialog) {
|
||||
this.route.data.subscribe(( data: { entityDataTableChecks: any }) => {
|
||||
constructor(
|
||||
private organizationService: OrganizationService,
|
||||
private route: ActivatedRoute,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
this.route.data.subscribe((data: { entityDataTableChecks: any }) => {
|
||||
this.entityDataTableChecksData = data.entityDataTableChecks.pageItems;
|
||||
});
|
||||
}
|
||||
@@ -105,8 +113,10 @@ export class EntityDataTableChecksComponent implements OnInit {
|
||||
this.dataSource.sort = this.sort;
|
||||
this.dataSource.sortingDataAccessor = (item, property) => {
|
||||
switch (property) {
|
||||
case 'status': return item.status.value;
|
||||
default: return item[property];
|
||||
case 'status':
|
||||
return item.status.value;
|
||||
default:
|
||||
return item[property];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -121,13 +131,13 @@ export class EntityDataTableChecksComponent implements OnInit {
|
||||
});
|
||||
deleteEntityDataTableCheckDialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response.delete) {
|
||||
this.organizationService.deleteEntityDataTableCheck(entityDataTableCheckId)
|
||||
.subscribe(() => {
|
||||
this.entityDataTableChecksData = this.entityDataTableChecksData.filter((entityDataTableChecks: any) => entityDataTableChecks.id !== entityDataTableCheckId);
|
||||
this.dataSource.data = this.entityDataTableChecksData;
|
||||
});
|
||||
this.organizationService.deleteEntityDataTableCheck(entityDataTableCheckId).subscribe(() => {
|
||||
this.entityDataTableChecksData = this.entityDataTableChecksData.filter(
|
||||
(entityDataTableChecks: any) => entityDataTableChecks.id !== entityDataTableCheckId
|
||||
);
|
||||
this.dataSource.data = this.entityDataTableChecksData;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import { OrganizationService } from '../organization.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class EntityDataTableChecksResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {OrganizationService} organizationService Organization service.
|
||||
*/
|
||||
@@ -26,5 +25,4 @@ export class EntityDataTableChecksResolver implements Resolve<Object> {
|
||||
resolve(): Observable<any> {
|
||||
return this.organizationService.getEntityDataTableChecks();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user