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('EditEmailComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditEmailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [EditEmailComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -15,7 +15,6 @@ import { SystemService } from 'app/system/system.service';
|
||||
styleUrls: ['./edit-email.component.scss']
|
||||
})
|
||||
export class EditEmailComponent implements OnInit {
|
||||
|
||||
/** Password input field type. */
|
||||
passwordInputType: string;
|
||||
/** Email Configuration data */
|
||||
@@ -30,10 +29,12 @@ export class EditEmailComponent 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: { emailConfiguration: any }) => {
|
||||
this.emailConfigurationData = data.emailConfiguration;
|
||||
});
|
||||
@@ -52,13 +53,34 @@ export class EditEmailComponent implements OnInit {
|
||||
*/
|
||||
setEmailConfigurationForm() {
|
||||
this.emailConfigurationForm = this.formBuilder.group({
|
||||
'username': [this.emailConfigurationData[0].value, Validators.required],
|
||||
'password': [this.emailConfigurationData[1].value, Validators.required],
|
||||
'host': [this.emailConfigurationData[2].value, Validators.required],
|
||||
'port': [this.emailConfigurationData[3].value, Validators.required],
|
||||
'useTLS': [this.emailConfigurationData[4].value, Validators.required],
|
||||
'fromEmail': [this.emailConfigurationData[5].value, Validators.required],
|
||||
'fromName': [this.emailConfigurationData[6].value, Validators.required]
|
||||
username: [
|
||||
this.emailConfigurationData[0].value,
|
||||
Validators.required
|
||||
],
|
||||
password: [
|
||||
this.emailConfigurationData[1].value,
|
||||
Validators.required
|
||||
],
|
||||
host: [
|
||||
this.emailConfigurationData[2].value,
|
||||
Validators.required
|
||||
],
|
||||
port: [
|
||||
this.emailConfigurationData[3].value,
|
||||
Validators.required
|
||||
],
|
||||
useTLS: [
|
||||
this.emailConfigurationData[4].value,
|
||||
Validators.required
|
||||
],
|
||||
fromEmail: [
|
||||
this.emailConfigurationData[5].value,
|
||||
Validators.required
|
||||
],
|
||||
fromName: [
|
||||
this.emailConfigurationData[6].value,
|
||||
Validators.required
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,5 +95,4 @@ export class EditEmailComponent implements OnInit {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ describe('EmailComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EmailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [EmailComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -13,11 +13,13 @@ import { MatTableDataSource } from '@angular/material/table';
|
||||
styleUrls: ['./email.component.scss']
|
||||
})
|
||||
export class EmailComponent implements OnInit {
|
||||
|
||||
/** Email configuration data. */
|
||||
emailConfigurationData: any;
|
||||
/** Columns to be displayed in Email configuration table. */
|
||||
displayedColumns: string[] = ['name', 'value'];
|
||||
displayedColumns: string[] = [
|
||||
'name',
|
||||
'value'
|
||||
];
|
||||
/** Data source for Email configuration table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
|
||||
@@ -48,5 +50,4 @@ export class EmailComponent implements OnInit {
|
||||
this.dataSource = new MatTableDataSource(this.emailConfigurationData);
|
||||
this.dataSource.sort = this.sort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import { SystemService } from '../../system.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class EmailConfigurationResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {SystemService} systemService System service.
|
||||
*/
|
||||
@@ -26,5 +25,4 @@ export class EmailConfigurationResolver implements Resolve<Object> {
|
||||
resolve(): Observable<any> {
|
||||
return this.systemService.getExternalConfiguration('SMTP');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user