Skip to content

Commit cac1d11

Browse files
rhopmanadamsaghy
authored andcommitted
build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
1 parent 9d6cf15 commit cac1d11

File tree

1,812 files changed

+22524
-16870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,812 files changed

+22524
-16870
lines changed

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/dist
22
/node_modules
33
**/.git
4-
*.ts
4+
src/environments/.env.ts

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Mifos X Web App ![build](https://github.com/openMF/web-app/actions/workflows/build.yml/badge.svg) [Slack](https://app.slack.com/client/T0F5GHE8Y/CJJGJLN10)
1+
# Mifos X Web App ![build](https://github.com/openMF/web-app/actions/workflows/build.yml/badge.svg) [Slack](https://app.slack.com/client/T0F5GHE8Y/CJJGJLN10)
22

33
Mifos X Web App is the revamped version of the Mifos X Community App, an effective financial inclusion solution and the default web application built on top of the Mifos X platform for the Mifos User Community.
44

@@ -16,7 +16,7 @@ The latest code is continuously deployed at https://openmf.github.io/web-app/ wh
1616

1717
[`nodeJs`](https://nodejs.org/en/download/)
1818

19-
3. Install [angular-cli](https://github.com/angular/angular-cli) globally.
19+
2. Install [angular-cli](https://github.com/angular/angular-cli) globally.
2020

2121
```
2222
npm install -g @angular/[email protected]

cypress.config.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import { defineConfig } from "cypress";
1+
import { defineConfig } from 'cypress';
22

33
export default defineConfig({
4-
videosFolder: "cypress/videos",
5-
screenshotsFolder: "cypress/screenshots",
6-
fixturesFolder: "cypress/fixtures",
4+
videosFolder: 'cypress/videos',
5+
screenshotsFolder: 'cypress/screenshots',
6+
fixturesFolder: 'cypress/fixtures',
77

88
e2e: {
99
// We've imported your old cypress plugins here.
1010
// You may want to clean this up later by importing these.
1111
setupNodeEvents(on, config) {
12-
return require("./cypress/plugins/index.ts")(on, config);
12+
return require('./cypress/plugins/index.ts')(on, config);
1313
},
14-
baseUrl: "http://localhost:4200",
14+
baseUrl: 'http://localhost:4200'
1515
},
1616

1717
component: {
1818
devServer: {
19-
framework: "angular",
20-
bundler: "webpack",
19+
framework: 'angular',
20+
bundler: 'webpack'
2121
},
22-
specPattern: "**/*.cy.ts",
23-
},
22+
specPattern: '**/*.cy.ts'
23+
}
2424
});

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ services:
2424
- MIFOS_SUPPORTED_LANGUAGES=cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW
2525
- MIFOS_SESSION_IDLE_TIMEOUT=300000
2626
- MIFOS_OAUTH_SERVER_ENABLED=false
27-

e2e/src/login/login.e2e-spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ describe('app', () => {
2020
it('should login into the app', () => {
2121
page.validLogin();
2222
});
23-
2423
});

e2e/src/login/login.po.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { browser, element, by } from 'protractor';
55
* Login Page e2e page object
66
*/
77
export class LoginPage {
8-
98
/** username field */
109
usernameField = element(by.css('input[formControlName="username"]'));
1110
/** password field */
@@ -37,5 +36,4 @@ export class LoginPage {
3736
this.passwordField.sendKeys('123');
3837
this.loginButton.click();
3938
}
40-
4139
}

src/app/account-transfers/account-transfers-routing.module.ts

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ const routes: Routes = [
2626
children: [
2727
{
2828
path: 'create-standing-instructions',
29-
data: { title: 'Create Standing Instructions', breadcrumb: 'Create Standing Instructions', routeParamBreadcrumb: 'Create Standing Instructions' },
29+
data: {
30+
title: 'Create Standing Instructions',
31+
breadcrumb: 'Create Standing Instructions',
32+
routeParamBreadcrumb: 'Create Standing Instructions'
33+
},
3034
component: CreateStandingInstructionsComponent,
3135
resolve: {
3236
standingIntructionsTemplate: StandingInstructionsTemplateResolver
@@ -42,7 +46,11 @@ const routes: Routes = [
4246
},
4347
{
4448
path: 'list-standing-instructions',
45-
data: { title: 'List Standing Instructions', breadcrumb: 'List Standing Instructions', routeParamBreadcrumb: 'List Standing Instructions' },
49+
data: {
50+
title: 'List Standing Instructions',
51+
breadcrumb: 'List Standing Instructions',
52+
routeParamBreadcrumb: 'List Standing Instructions'
53+
},
4654
component: ListStandingInstructionsComponent,
4755
resolve: {
4856
standingIntructionsTemplate: StandingInstructionsTemplateResolver
@@ -71,29 +79,33 @@ const routes: Routes = [
7179
data: { title: 'View Standing Instructions', breadcrumb: 'view', routeParamBreadcrumb: false },
7280
component: ViewStandingInstructionsComponent,
7381
resolve: {
74-
standingInstructionsData: ViewStandingInstructionsResolver,
75-
},
82+
standingInstructionsData: ViewStandingInstructionsResolver
83+
}
7684
},
7785
{
7886
path: 'edit',
7987
data: { title: 'Edit Standing Instructions', breadcrumb: 'edit', routeParamBreadcrumb: false },
8088
component: EditStandingInstructionsComponent,
8189
resolve: {
82-
standingInstructionsDataAndTemplate: StandingInstructionsDataAndTemplateResolver,
83-
},
90+
standingInstructionsDataAndTemplate: StandingInstructionsDataAndTemplateResolver
91+
}
8492
},
8593
{
8694
path: 'list-account-transactions',
87-
data: { title: 'List Account Transactions', breadcrumb: 'List Account Transactions', routeParamBreadcrumb: 'List Account Transactions' },
95+
data: {
96+
title: 'List Account Transactions',
97+
breadcrumb: 'List Account Transactions',
98+
routeParamBreadcrumb: 'List Account Transactions'
99+
},
88100
component: ListTransactionsComponent,
89101
resolve: {
90102
listTransactionData: ListTransactionsResolver
91103
}
92-
},
104+
}
93105
]
94-
},
106+
}
95107
]
96-
},
108+
}
97109
];
98110
@NgModule({
99111
imports: [RouterModule.forChild(routes)],
@@ -108,5 +120,4 @@ const routes: Routes = [
108120
ViewAccountTransferResolver
109121
]
110122
})
111-
112-
export class AccountTransfersRoutingModule { }
123+
export class AccountTransfersRoutingModule {}

src/app/account-transfers/account-transfers.module.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ import { ViewAccountTransferComponent } from './view-account-transfer/view-accou
2121
* All components related to Account Transfers functions should be declared here.
2222
*/
2323
@NgModule({
24-
imports: [SharedModule, PipesModule, DirectivesModule, AccountTransfersRoutingModule],
24+
imports: [
25+
SharedModule,
26+
PipesModule,
27+
DirectivesModule,
28+
AccountTransfersRoutingModule
29+
],
2530
declarations: [
2631
ViewStandingInstructionsComponent,
2732
EditStandingInstructionsComponent,
@@ -31,6 +36,6 @@ import { ViewAccountTransferComponent } from './view-account-transfer/view-accou
3136
ListTransactionsComponent,
3237
ViewAccountTransferComponent
3338
],
34-
providers: [ ]
39+
providers: []
3540
})
36-
export class AccountTransfersModule { }
41+
export class AccountTransfersModule {}

src/app/account-transfers/account-transfers.service.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import { Observable } from 'rxjs';
1212
providedIn: 'root'
1313
})
1414
export class AccountTransfersService {
15-
16-
constructor(private http: HttpClient) { }
15+
constructor(private http: HttpClient) {}
1716

1817
/**
1918
* @params standingInstructionsId
@@ -33,10 +32,16 @@ export class AccountTransfersService {
3332
return this.http.put(`/standinginstructions/${standinginstructionsId}`, data, { params: httpParams });
3433
}
3534

36-
getStandingInstructionsTemplate(clientId: any, officeId: any, accountTypeId: string, formValue?: any): Observable<any> {
37-
let httpParams = new HttpParams().set('fromAccountType', accountTypeId)
38-
.set('fromClientId', clientId)
39-
.set('fromOfficeId', officeId);
35+
getStandingInstructionsTemplate(
36+
clientId: any,
37+
officeId: any,
38+
accountTypeId: string,
39+
formValue?: any
40+
): Observable<any> {
41+
let httpParams = new HttpParams()
42+
.set('fromAccountType', accountTypeId)
43+
.set('fromClientId', clientId)
44+
.set('fromOfficeId', officeId);
4045
if (formValue) {
4146
const propNames = Object.getOwnPropertyNames(formValue);
4247
for (let i = 0; i < propNames.length; i++) {
@@ -52,8 +57,7 @@ export class AccountTransfersService {
5257
}
5358

5459
newAccountTranferResource(id: any, accountTypeId: any, formValue?: any): Observable<any> {
55-
let httpParams = new HttpParams().set('fromAccountId', id)
56-
.set('fromAccountType', accountTypeId);
60+
let httpParams = new HttpParams().set('fromAccountId', id).set('fromAccountType', accountTypeId);
5761
if (formValue) {
5862
const propNames = Object.getOwnPropertyNames(formValue);
5963
for (let i = 0; i < propNames.length; i++) {
@@ -62,7 +66,6 @@ export class AccountTransfersService {
6266
}
6367
}
6468
return this.http.get(`/accounttransfers/template`, { params: httpParams });
65-
6669
}
6770

6871
createAccountTransfer(data: any): Observable<any> {
@@ -94,18 +97,17 @@ export class AccountTransfersService {
9497
return this.http.delete(`/standinginstructions/${id}`, { params: httpParams });
9598
}
9699

97-
98100
getStandingInstructionsTransactions(standingInstructionsId: any, dateFormat: any, locale: any) {
99-
const httpParams = new HttpParams().set('associations', 'transactions')
100-
.set('dateFormat', dateFormat)
101-
.set('limit', '14')
102-
.set('locale', locale)
103-
.set('offset', '0');
101+
const httpParams = new HttpParams()
102+
.set('associations', 'transactions')
103+
.set('dateFormat', dateFormat)
104+
.set('limit', '14')
105+
.set('locale', locale)
106+
.set('offset', '0');
104107
return this.http.get(`/standinginstructions/${standingInstructionsId}`, { params: httpParams });
105108
}
106109

107110
getViewAccountTransferDetails(transferId: any): Observable<any> {
108111
return this.http.get(`/accounttransfers/${transferId}`);
109112
}
110-
111113
}

src/app/account-transfers/common-resolvers/list-transactions.resolver.ts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,24 @@ import { SettingsService } from 'app/settings/settings.service';
1414
*/
1515
@Injectable()
1616
export class ListTransactionsResolver implements Resolve<Object> {
17+
/**
18+
* @param {AccountTransfersService} accountTransfersService Account Transfers service.
19+
* @param {SettingsService} settingsService Settings Service.
20+
*/
21+
constructor(
22+
private accountTransfersService: AccountTransfersService,
23+
private settingsService: SettingsService
24+
) {}
1725

18-
/**
19-
* @param {AccountTransfersService} accountTransfersService Account Transfers service.
20-
* @param {SettingsService} settingsService Settings Service.
21-
*/
22-
constructor(private accountTransfersService: AccountTransfersService,
23-
private settingsService: SettingsService) { }
24-
25-
/**
26-
* Returns the Standing Instructions Data.
27-
* @param {ActivatedRouteSnapshot} route Route Snapshot
28-
* @returns {Observable<any>}
29-
*/
30-
resolve(route: ActivatedRouteSnapshot): Observable<any> {
31-
const id = route.parent.paramMap.get('standingInstructionsId');
32-
const dateFormat = this.settingsService.dateFormat;
33-
const locale = this.settingsService.language.code;
34-
return this.accountTransfersService.getStandingInstructionsTransactions(id, dateFormat, locale);
35-
}
26+
/**
27+
* Returns the Standing Instructions Data.
28+
* @param {ActivatedRouteSnapshot} route Route Snapshot
29+
* @returns {Observable<any>}
30+
*/
31+
resolve(route: ActivatedRouteSnapshot): Observable<any> {
32+
const id = route.parent.paramMap.get('standingInstructionsId');
33+
const dateFormat = this.settingsService.dateFormat;
34+
const locale = this.settingsService.language.code;
35+
return this.accountTransfersService.getStandingInstructionsTransactions(id, dateFormat, locale);
36+
}
3637
}

0 commit comments

Comments
 (0)