build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
@@ -8,9 +8,8 @@ describe('EditSmsComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditSMSComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [EditSMSComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -15,7 +15,6 @@ import { SystemService } from 'app/system/system.service';
|
||||
styleUrls: ['./edit-sms.component.scss']
|
||||
})
|
||||
export class EditSMSComponent implements OnInit {
|
||||
|
||||
/** SMS Configuration data */
|
||||
smsConfigurationData: any;
|
||||
/** SMS Configuration Form */
|
||||
@@ -28,10 +27,12 @@ export class EditSMSComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private systemService: SystemService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private systemService: SystemService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
this.route.data.subscribe((data: { smsConfiguration: any }) => {
|
||||
this.smsConfigurationData = data.smsConfiguration;
|
||||
});
|
||||
@@ -49,10 +50,22 @@ export class EditSMSComponent implements OnInit {
|
||||
*/
|
||||
setSMSConfigurationForm() {
|
||||
this.smsConfigurationForm = this.formBuilder.group({
|
||||
'host_name': [this.smsConfigurationData[0].value, Validators.required],
|
||||
'port_number': [this.smsConfigurationData[1].value, Validators.required],
|
||||
'end_point': [this.smsConfigurationData[2].value, Validators.required],
|
||||
'tenant_app_key': [this.smsConfigurationData[3].value, Validators.required]
|
||||
host_name: [
|
||||
this.smsConfigurationData[0].value,
|
||||
Validators.required
|
||||
],
|
||||
port_number: [
|
||||
this.smsConfigurationData[1].value,
|
||||
Validators.required
|
||||
],
|
||||
end_point: [
|
||||
this.smsConfigurationData[2].value,
|
||||
Validators.required
|
||||
],
|
||||
tenant_app_key: [
|
||||
this.smsConfigurationData[3].value,
|
||||
Validators.required
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -67,5 +80,4 @@ export class EditSMSComponent implements OnInit {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ describe('SmsComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SMSComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [SMSComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -13,11 +13,13 @@ import { MatTableDataSource } from '@angular/material/table';
|
||||
styleUrls: ['./sms.component.scss']
|
||||
})
|
||||
export class SMSComponent implements OnInit {
|
||||
|
||||
/** SMS configuration data. */
|
||||
smsConfigurationData: any;
|
||||
/** Columns to be displayed in SMS configuration table. */
|
||||
displayedColumns: string[] = ['name', 'value'];
|
||||
displayedColumns: string[] = [
|
||||
'name',
|
||||
'value'
|
||||
];
|
||||
/** Data source for SMS configuration table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
|
||||
@@ -29,10 +31,10 @@ export class SMSComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data.subscribe((data: {smsConfiguration: any}) => {
|
||||
this.route.data.subscribe((data: { smsConfiguration: any }) => {
|
||||
this.smsConfigurationData = data.smsConfiguration;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the SMS Configuration table.
|
||||
@@ -48,5 +50,4 @@ export class SMSComponent implements OnInit {
|
||||
this.dataSource = new MatTableDataSource(this.smsConfigurationData);
|
||||
this.dataSource.sort = this.sort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import { SystemService } from '../../system.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class SMSConfigurationResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {SystemService} systemService System service.
|
||||
*/
|
||||
@@ -26,5 +25,4 @@ export class SMSConfigurationResolver implements Resolve<Object> {
|
||||
resolve(): Observable<any> {
|
||||
return this.systemService.getExternalConfiguration('SMS');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user