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('AmazonS3Component', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AmazonS3Component ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [AmazonS3Component]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -13,11 +13,13 @@ import { ActivatedRoute } from '@angular/router';
|
||||
styleUrls: ['./amazon-s3.component.scss']
|
||||
})
|
||||
export class AmazonS3Component implements OnInit {
|
||||
|
||||
/** Amazon S3 configuration data. */
|
||||
amazonS3ConfigurationData: any;
|
||||
/** Columns to be displayed in Amazon S3 configuration table. */
|
||||
displayedColumns: string[] = ['name', 'value'];
|
||||
displayedColumns: string[] = [
|
||||
'name',
|
||||
'value'
|
||||
];
|
||||
/** Data source for Amazon S3 configuration table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
|
||||
@@ -56,5 +58,4 @@ export class AmazonS3Component implements OnInit {
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import { SystemService } from '../../system.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class AmazonS3ConfigurationResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {SystemService} systemService System service.
|
||||
*/
|
||||
@@ -26,5 +25,4 @@ export class AmazonS3ConfigurationResolver implements Resolve<Object> {
|
||||
resolve(): Observable<any> {
|
||||
return this.systemService.getExternalConfiguration('S3');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('EditAmazonS3Component', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditAmazonS3Component ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [EditAmazonS3Component]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+18
-9
@@ -15,7 +15,6 @@ import { SystemService } from 'app/system/system.service';
|
||||
styleUrls: ['./edit-amazon-s3.component.scss']
|
||||
})
|
||||
export class EditAmazonS3Component implements OnInit {
|
||||
|
||||
/** Amazon S3 Configuration data */
|
||||
amazonS3ConfigurationData: any;
|
||||
/** Amazon S3 Configuration Form */
|
||||
@@ -32,10 +31,12 @@ export class EditAmazonS3Component 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: { amazonS3Configuration: any }) => {
|
||||
this.amazonS3ConfigurationData = data.amazonS3Configuration;
|
||||
});
|
||||
@@ -55,9 +56,18 @@ export class EditAmazonS3Component implements OnInit {
|
||||
*/
|
||||
createAmazonS3ConfigurationForm() {
|
||||
this.amazonS3ConfigurationForm = this.formBuilder.group({
|
||||
's3_bucket_name': [this.amazonS3ConfigurationData[1].value, Validators.required],
|
||||
's3_access_key': [this.amazonS3ConfigurationData[0].value, Validators.required],
|
||||
's3_secret_key': [this.amazonS3ConfigurationData[2].value, Validators.required]
|
||||
s3_bucket_name: [
|
||||
this.amazonS3ConfigurationData[1].value,
|
||||
Validators.required
|
||||
],
|
||||
s3_access_key: [
|
||||
this.amazonS3ConfigurationData[0].value,
|
||||
Validators.required
|
||||
],
|
||||
s3_secret_key: [
|
||||
this.amazonS3ConfigurationData[2].value,
|
||||
Validators.required
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -72,5 +82,4 @@ export class EditAmazonS3Component implements OnInit {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ describe('ExternalServicesComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ExternalServicesComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [ExternalServicesComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -6,22 +6,21 @@ import { Component } from '@angular/core';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'mifosx-external-services',
|
||||
templateUrl: './external-services.component.html',
|
||||
templateUrl: './external-services.component.html'
|
||||
})
|
||||
export class ExternalServicesComponent {
|
||||
// Initialize an array of 4 boolean values, all set to false
|
||||
arrowBooleans: boolean[] = new Array(4).fill(false);
|
||||
|
||||
constructor() { }
|
||||
constructor() {}
|
||||
|
||||
/**
|
||||
* Popover function
|
||||
* @param arrowNumber - The index of the boolean value to toggle.
|
||||
*/
|
||||
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
arrowBooleansToggle(arrowNumber: number) {
|
||||
// Toggle the boolean value at the given index
|
||||
this.arrowBooleans[arrowNumber] = !this.arrowBooleans[arrowNumber];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('EditNotificationComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditNotificationComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [EditNotificationComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+18
-9
@@ -15,7 +15,6 @@ import { SystemService } from 'app/system/system.service';
|
||||
styleUrls: ['./edit-notification.component.scss']
|
||||
})
|
||||
export class EditNotificationComponent implements OnInit {
|
||||
|
||||
/** Notification Configuration data */
|
||||
notificationConfigurationData: any;
|
||||
/** Notification Configuration Form */
|
||||
@@ -28,10 +27,12 @@ export class EditNotificationComponent 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: { notificationConfiguration: any }) => {
|
||||
this.notificationConfigurationData = data.notificationConfiguration;
|
||||
});
|
||||
@@ -49,9 +50,18 @@ export class EditNotificationComponent implements OnInit {
|
||||
*/
|
||||
setNotificationConfigurationForm() {
|
||||
this.notificationConfigurationForm = this.formBuilder.group({
|
||||
'server_key': [this.notificationConfigurationData[0].value, Validators.required],
|
||||
'gcm_end_point': [this.notificationConfigurationData[1].value, Validators.required],
|
||||
'fcm_end_point': [this.notificationConfigurationData[2].value, Validators.required]
|
||||
server_key: [
|
||||
this.notificationConfigurationData[0].value,
|
||||
Validators.required
|
||||
],
|
||||
gcm_end_point: [
|
||||
this.notificationConfigurationData[1].value,
|
||||
Validators.required
|
||||
],
|
||||
fcm_end_point: [
|
||||
this.notificationConfigurationData[2].value,
|
||||
Validators.required
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -66,5 +76,4 @@ export class EditNotificationComponent implements OnInit {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ describe('NotificationComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ NotificationComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [NotificationComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -13,11 +13,13 @@ import { MatTableDataSource } from '@angular/material/table';
|
||||
styleUrls: ['./notification.component.scss']
|
||||
})
|
||||
export class NotificationComponent implements OnInit {
|
||||
|
||||
/** Notification configuration data. */
|
||||
notificationConfigurationData: any;
|
||||
/** Columns to be displayed in Notification configuration table. */
|
||||
displayedColumns: string[] = ['name', 'value'];
|
||||
displayedColumns: string[] = [
|
||||
'name',
|
||||
'value'
|
||||
];
|
||||
/** Data source for Notification configuration table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
|
||||
@@ -56,5 +58,4 @@ export class NotificationComponent implements OnInit {
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import { SystemService } from '../../system.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class NotificationConfigurationResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {SystemService} systemService System service.
|
||||
*/
|
||||
@@ -26,5 +25,4 @@ export class NotificationConfigurationResolver implements Resolve<Object> {
|
||||
resolve(): Observable<any> {
|
||||
return this.systemService.getExternalConfiguration('NOTIFICATION');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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