Skip to content

Commit c8d857f

Browse files
steinwindeCraig-Rosarioalberto-art3chJose Alberto Hernandezmagyari-adam
authored
Merging all changes in main branch of the last weeks into dev branch (#2444)
* fixed identities tab * fix: Loan Product capitalized income form validation * Loan account with Capitalized Income transaction * fix: Use first API url from url list * Loan Product with Capitalized Income GL accounting mappings * fix: Loan Product capitalized income with Income Type * Loan account details - income capitalization type * fix: Loan Product Cash accounting view * fix: Loan Id updated in Loan views after url changed * fix: Charge management minimum and maximum cap values validation * build(deps-dev): bump http-proxy-middleware from 2.0.7 to 2.0.9 (#2421) Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9. - [Release notes](https://github.com/chimurai/http-proxy-middleware/releases) - [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md) - [Commits](chimurai/http-proxy-middleware@v2.0.7...v2.0.9) --- updated-dependencies: - dependency-name: http-proxy-middleware dependency-version: 2.0.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: Improve contributing guidelines (#2440) The CONTRIBUTING.md file has been updated to clarify that we use the dev branch for development. In addition to that, I have slightly shortened and restructured the text. FIXES: WEB-165 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Craig-Rosario <[email protected]> Co-authored-by: Jose Alberto Hernandez <[email protected]> Co-authored-by: Jose Alberto Hernandez <[email protected]> Co-authored-by: adam.magyari <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent b61d9e3 commit c8d857f

File tree

60 files changed

+560
-266
lines changed

Some content is hidden

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

60 files changed

+560
-266
lines changed

CONTRIBUTING.md

+50-46
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,52 @@
11
# Getting Started
22

33
- View the [README](./README.md) or [watch this video](https://youtu.be/OnxxC3K2oro) to get your development environment up and running.
4-
- Learn how to [format pull requests](#submitting-a-pull-request).
5-
- Read how to [rebase/merge upstream branches](#configuring-remotes).
6-
- Understand our [commit message conventions](./.github/COMMIT_MESSAGE.md).
7-
- Sign our [Mifos CLA](http://mifos.org/about-us/financial-legal/mifos-contributor-agreement/).
8-
- Follow our [code of conduct](https://mifos.org/resources/community/code-of-conduct/).
9-
- [Find a Jira ticket to work on](https://mifosforge.jira.com/browse/WEB) and start smashing!
10-
- [Ask a question on Slack](https://app.slack.com/client/T0F5GHE8Y/CJJGJLN10).
4+
- Sign the [Contribution License Agreement](http://mifos.org/about-us/financial-legal/mifos-contributor-agreement/).
5+
- Always follow the [code of conduct](https://mifos.org/resources/community/code-of-conduct/) - this is important to us. We are proud to be open, tolerant and providing a positive environment.
6+
- Introduce yourself or ask a question on the [#webapp channel on Slack](https://app.slack.com/client/T0F5GHE8Y/CJJGJLN10).
7+
- Find a [Jira](https://mifosforge.jira.com/browse/WEB) ticket to work on and start smashing!
8+
- Sign up to the [mailing list](https://sourceforge.net/projects/mifos/lists/mifos-developer).
119
- Learn more at our [getting started guide](https://mifosforge.jira.com/wiki/spaces/RES/pages/464322561/New+Contributor+Getting+Started+Guide).
1210
- Have a look at our [Wiki](https://github.com/openMF/web-app/wiki).
1311

14-
Please outline the change you wish to make via a Jira ticket _before_ you start contributing. And please do not create Jira tickets for general support questions, as we want to keep Jira for bug reports and feature requests. If you have got any questions, the quickest way to get an answer is to join the above Slack channel. You can also write an email on our [mailing list](https://sourceforge.net/projects/mifos/lists/mifos-developer). Mifos has quite a few active repositories, and each has its own Slack channel to direct questions to.
12+
Tips for working with the web app repository:
1513

16-
Mifos is an inclusive community, committed to creating a safe, positive environment. Read the above Code of Conduct, and please follow it in all your interactions with the project.
14+
- Learn how to [format pull requests](#submitting-a-pull-request).
15+
- Read how to [rebase/merge upstream branches](#configuring-remotes).
16+
- Understand our [commit message conventions](./.github/COMMIT_MESSAGE.md).
1717

18-
## Submitting or Requesting an Issue/Enhancement
18+
## Our processes
1919

20-
### Best Practices for reporting or requesting for Issues/Enhancements:
20+
### Reporting or requesting Issues/Enhancements
2121

22-
- Before you submit an issue, please search Jira. Maybe an issue for your problem already exists, and the discussion might inform you of workarounds readily available.
23-
- Include screenshots if any (specially for UI related issues).
22+
- Before you submit an issue in Jira, please browse existing issues or ask on Slack. Maybe an issue for your problem already exists, or the discussion might inform you of workarounds readily available.
23+
- Include screenshots if helpful (specially for UI related issues).
2424
- For UI enhancements include mockups to provide a clear idea to the reader.
2525

26-
### Best Practices for getting assigned to work on an Issue/Enhancement:
26+
### Getting assigned and working on an Issue/Enhancement
2727

28-
- If you would like to work on an issue, make sure it is not assigned to someone else.
29-
- If you don't work on a Jira ticket, please unassign yourself.
30-
- Please be sure that you are able to reproduce the issue, before working on it. If not, please ask for clarification by commenting or asking the issue creator.
28+
- Always outline the change you wish to make via a Jira ticket _before_ contributing.
29+
- Do not create Jira tickets for support questions. Jira is for bug reports and feature requests. (If you have questions, ask in the above Slack channel or write an email on the named mailing list.)
30+
- If you would like to work on a Jira issue, make sure it is not assigned to someone else. (We do not appreciate pull requests for issues that are assigned to someone else or do not refer to a Jira ticket.)
31+
- If you want to take over a ticket, ask the assignee in a comment (utilizing the "@" prefix), if you can. Wait 3 days, before you assign the ticket to yourself.
32+
- If you don't work on a Jira ticket, unassign yourself.
3133

32-
**Note:** Please do not work on an issue which is assigned to someone else. We don't encourage creating multiple pull requests for the same issue. Also, please allow the assigned person at least 3 days to work on an issue. If there is no progress after this deadline, comment on the issue asking the contributor whether he/she is still working on it. Only if there is no reply after a couple of days, assign the ticket to you and work on it.
34+
## Jira
3335

34-
### Jira ticket life cycle
36+
Our Jira tickets follow the following life cycle:
3537

36-
- To Do: The issue is not prioritized yet. Make sure it make sense working on it by asking in Slack.
38+
- To Do: The issue is not prioritized yet. Make sure it makes sense working on it by asking in Slack.
3739
- On Deck: The issue can be worked on, but work hasn't been started. Often the issue has already someone assigned to it.
3840
- In Progress: The issue is being worked on.
3941
- In Review: There is a Pull Request on GitHub or the ticket is on hold, because someone needs to review made changes.
4042
- Done: The Pull Request got merged on GitHub.
4143
- Canceled: The ticket is unnecessary and for some reason (probably in the comments) work on it became unnecessary.
4244

43-
## Submitting a Pull Request
45+
Updating the Jira ticket is the responsibility of the person working on it. Make in particular sure the Status field is up-to-date.
4446

45-
### Best Practices to send Pull Requests:
47+
## Git and Github
48+
49+
### Best Practices to send Pull Requests
4650

4751
- Fork the [project](https://github.com/openMF/web-app) on GitHub
4852
- Clone the project locally into your system.
@@ -51,10 +55,10 @@ Mifos is an inclusive community, committed to creating a safe, positive environm
5155
git clone https://github.com/your-username/web-app.git
5256
```
5357

54-
- Make sure you are in the `main` branch.
58+
- We use the `main` branch for releases, hotfixes and special purposes. All regular work on releases flows into the `dev` branch.
5559

5660
```
57-
git checkout main
61+
git checkout dev
5862
```
5963

6064
- Create a new branch with a meaningful name before adding and committing your changes.
@@ -63,7 +67,7 @@ git checkout main
6367
git checkout -b branch-name
6468
```
6569

66-
- Add the files you changed. (avoid using `git add .`)
70+
- Add the files you changed. (Better don't use `git add .`)
6771

6872
```
6973
git add file-name
@@ -81,7 +85,7 @@ git commit
8185
git commit --amend
8286
```
8387

84-
- Squash multiple commits to a single commit. (example: squash last two commits done on this branch into one)
88+
- Squash multiple commits to a single commit. (Example: squash last two commits done on this branch into one.)
8589

8690
```
8791
git rebase --interactive HEAD~2
@@ -90,7 +94,7 @@ git rebase --interactive HEAD~2
9094
- Push this branch to your remote repository on GitHub.
9195

9296
```
93-
git push origin branch-name
97+
git push --set-upstream origin branch-name
9498
```
9599

96100
- If any of the squashed commits have already been pushed to your remote repository, you need to do a force push.
@@ -99,13 +103,13 @@ git push origin branch-name
99103
git push origin remote-branch-name --force
100104
```
101105

102-
- Follow the Pull request template and submit a pull request with a motive for your change and the method you used to achieve it to be merged with the `main` branch.
103-
- If you can, please submit the pull request with the fix or improvements including tests.
104-
- During review, if you are requested to make changes, rebase your branch and squash the multiple commits into one again. Once you push these changes, the pull request will edit automatically.
106+
- Follow the Pull request template and submit a pull request with a motive for your change and the method you used to achieve it to be merged with the `dev` branch.
107+
- If possible, please submit the pull request along with tests.
108+
- During review, if you are requested to make changes, rebase your branch and squash commits into one again. Once you push these changes, the pull request will edit automatically.
105109

106-
## Configuring remotes
110+
### Configuring remotes
107111

108-
When a repository is cloned, it has a default remote called `origin` that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you should add another remote called `upstream`.
112+
When a repository is cloned, it has a default remote called `origin` that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you can add another remote called `upstream`.
109113

110114
1. Set the `upstream`.
111115

@@ -122,18 +126,18 @@ git remote add upstream https://github.com/openMF/web-app.git
122126
> upstream https://github.com/openMF/web-app.git (push)
123127
```
124128

125-
3. To update your local copy with remote changes, run the following: (This will give you an exact copy of the current remote. You should not have any local changes on your main branch, if you do, use rebase instead.)
129+
3. To update your local copy with remote changes, run the following: (This will give you an exact copy of the current remote. You should not have any local changes on your dev branch, if you do, use rebase instead.)
126130

127131
```
128132
git fetch upstream
129-
git checkout main
130-
git merge upstream/main
133+
git checkout dev
134+
git merge upstream/dev
131135
```
132136

133-
4. Push these merged changes to the main branch on your fork. Ensure to pull in upstream changes regularly to keep your forked repository up to date.
137+
4. Push these merged changes to the dev branch on your fork. (Ensure to pull in upstream changes regularly to keep your forked repository up to date. Or you use the "Sync fork" button on top of the Github page of your fork, followed by `git pull`.)
134138

135139
```
136-
git push origin main
140+
git push origin dev
137141
```
138142

139143
5. Switch to the branch you are using for some piece of work.
@@ -145,7 +149,7 @@ git checkout branch-name
145149
6. Rebase your branch, which means, take in all latest changes and replay your work in the branch on top of this - this produces cleaner versions/history.
146150

147151
```
148-
git rebase main
152+
git rebase dev
149153
```
150154

151155
7. Push the final changes when you're ready.
@@ -154,20 +158,20 @@ git rebase main
154158
git push origin branch-name
155159
```
156160

157-
## After your Pull Request is merged
161+
### After your Pull Request is merged
158162

159-
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository.
163+
After your pull request is merged, you can safely delete your branch and pull the changes from the dev (upstream) repository.
160164

161165
1. Delete the remote branch on GitHub.
162166

163167
```
164168
git push origin --delete branch-name
165169
```
166170

167-
2. Checkout the main branch.
171+
2. Checkout the dev branch.
168172

169173
```
170-
git checkout main
174+
git checkout dev
171175
```
172176

173177
3. Delete the local branch.
@@ -176,14 +180,14 @@ git checkout main
176180
git branch -D branch-name
177181
```
178182

179-
4. Update your main branch with the latest upstream version.
183+
4. Update your dev branch with the latest upstream version.
180184

181185
```
182-
git pull upstream main
186+
git pull upstream dev
183187
```
184188

185-
## Skipping a Travis CI Build
189+
### Skipping a Travis CI Build
186190

187191
If running a build is not required for a particular commit (in some cases like an update to README.md), add [ci skip] or [skip ci] to the git commit message. Commits that have [ci skip] or [skip ci] anywhere in the commit messages are ignored by Travis CI.
188192

189-
That's it! Thank you for your contribution!
193+
**_Thank you for contributing!_**

package-lock.json

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/accounting/chart-of-accounts/gl-account-tree.service.ts

-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export class GlAccountTreeService {
9292
// and rest as children to respective parent nodes.
9393
for (const glAccount of glAccountData) {
9494
if (glAccount.parentId === 0) {
95-
console.log(glAccount.type.value);
9695
if (glAccount.type.value === 'ASSET') {
9796
glAccountTree[0].children[0].children.push(glAccounts[glAccount.id]);
9897
} else if (glAccount.type.value === 'EQUITY') {

src/app/accounting/financial-activity-mappings/edit-financial-activity-mapping/edit-financial-activity-mapping.component.ts

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export class EditFinancialActivityMappingComponent implements OnInit {
4646
) {
4747
this.route.data.subscribe((data: { financialActivityAccountAndTemplate: any }) => {
4848
this.financialActivityAccountId = data.financialActivityAccountAndTemplate.id;
49-
console.log(data.financialActivityAccountAndTemplate.financialActivityData);
5049
this.financialActivityId = data.financialActivityAccountAndTemplate.financialActivityData.id;
5150
this.glAccountId = data.financialActivityAccountAndTemplate.glAccountData.id;
5251
this.glAccountOptions = data.financialActivityAccountAndTemplate.glAccountOptions;

src/app/clients/clients-view/identities-tab/identities-tab.component.html

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
<div class="tab-container mat-typography">
2-
<h3>{{ 'labels.heading.Identities' | translate }}</h3>
2+
<div class="header-row" fxLayout="row" fxLayoutAlign="space-between">
3+
<h3 class="mat-subheading-2">
4+
{{ 'labels.heading.Identities' | translate }}
5+
</h3>
36

4-
<button
5-
mat-raised-button
6-
class="f-right"
7-
color="primary"
8-
(click)="addIdentifier()"
9-
*mifosxHasPermission="'CREATE_CLIENTIDENTIFIER'"
10-
>
11-
<fa-icon icon="plus" class="m-r-10"></fa-icon> {{ 'labels.buttons.Add' | translate }}
12-
</button>
7+
<button
8+
mat-raised-button
9+
color="primary"
10+
(click)="addIdentifier()"
11+
*mifosxHasPermission="'CREATE_CLIENTIDENTIFIER'"
12+
>
13+
<fa-icon icon="plus" class="m-r-10"></fa-icon>
14+
{{ 'labels.buttons.Add' | translate }}
15+
</button>
16+
</div>
1317

14-
<table mat-table #identifiersTable [dataSource]="clientIdentities">
18+
<table mat-table #identifiersTable [dataSource]="clientIdentities" [ngStyle]="{ 'margin-top': '3%' }">
1519
<ng-container matColumnDef="id">
1620
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Id' | translate }}</th>
1721
<td mat-cell *matCellDef="let identity">{{ identity.id }}</td>

src/app/clients/clients-view/identities-tab/identities-tab.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
margin: 1%;
44

55
h3 {
6-
margin: 1% auto;
6+
margin: 0;
77
}
88

99
table {

src/app/core/utils/accounting.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class Accounting {
4141
'ACCRUAL (UPFRONT)'
4242
].includes(value)) {
4343
return 'Accrual (upfront)';
44-
} else if (value === 'CASH BASED') {
44+
} else if (value.startsWith('CASH')) {
4545
return 'Cash';
4646
} else if (value === 'NONE') {
4747
return 'NONE';

src/app/deposits/fixed-deposits/fixed-deposit-account-stepper/fixed-deposit-account-terms-step/fixed-deposit-account-terms-step.component.ts

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export class FixedDepositAccountTermsStepComponent implements OnInit, OnChanges
6868
depositPeriod: this.fixedDepositsAccountTemplate.depositPeriod,
6969
depositPeriodFrequencyId: this.fixedDepositsAccountTemplate.depositPeriodFrequency.id
7070
});
71-
console.log(this.fixedDepositAccountTermsForm.value);
7271
}
7372
}
7473

src/app/loans/common-resolvers/loan-action-button.resolver.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ export class LoanActionButtonResolver implements Resolve<Object> {
3131
return this.loansService.getLoanActionTemplate(loanId, 'repayment');
3232
} else if (loanActionButton === 'Goodwill Credit') {
3333
return this.loansService.getLoanActionTemplate(loanId, 'goodwillCredit');
34-
}
35-
if (loanActionButton === 'Interest Payment Waiver') {
34+
} else if (loanActionButton === 'Interest Payment Waiver') {
3635
return this.loansService.getLoanActionTemplate(loanId, 'interestPaymentWaiver');
3736
} else if (loanActionButton === 'Payout Refund') {
3837
return this.loansService.getLoanActionTemplate(loanId, 'payoutRefund');
@@ -74,6 +73,8 @@ export class LoanActionButtonResolver implements Resolve<Object> {
7473
return this.loansService.getLoanForeclosureActionTemplate(loanId);
7574
} else if (loanActionButton === 'Charge-Off') {
7675
return this.loansService.getLoanActionTemplate(loanId, 'charge-off');
76+
} else if (loanActionButton === 'Capitalized Income') {
77+
return this.loansService.getLoanActionTemplate(loanId, 'capitalizedIncome');
7778
} else {
7879
return undefined;
7980
}

src/app/loans/loans-view/account-details/account-details.component.html

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ <h3>{{ 'labels.heading.Loan Details' | translate }}</h3>
9494
<span fxFlex="50%"> {{ loanDetails.capitalizedIncomeStrategy?.value | translateKey: 'catalogs' }} </span>
9595
</div>
9696

97+
<div fxFlexFill *ngIf="loanDetails.enableIncomeCapitalization">
98+
<span fxFlex="50%"> {{ 'labels.inputs.Income capitalization type' | translate }}</span>
99+
<span fxFlex="50%"> {{ loanDetails.capitalizedIncomeType?.value | translateKey: 'catalogs' }} </span>
100+
</div>
101+
97102
<div fxFlexFill>
98103
<span fxFlex="50%"> {{ 'labels.inputs.Grace: On Principal Payment' | translate }}</span>
99104
<span fxFlex="50%"> {{ loanDetails.graceOnPrincipalPayment }} </span>

src/app/loans/loans-view/datatable-tab/datatable-tab.component.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ActivatedRoute } from '@angular/router';
66
templateUrl: './datatable-tab.component.html',
77
styleUrls: ['./datatable-tab.component.scss']
88
})
9-
export class DatatableTabComponent {
9+
export class DatatableTabComponent implements OnInit {
1010
entityId: string;
1111
/** Loan Datatable */
1212
entityDatatable: any = null;
@@ -25,4 +25,10 @@ export class DatatableTabComponent {
2525
this.multiRowDatatableFlag = this.entityDatatable.columnHeaders[0].columnName === 'id' ? true : false;
2626
});
2727
}
28+
29+
ngOnInit() {
30+
this.route.parent.parent.params.subscribe((params) => {
31+
this.entityId = params['loanId'];
32+
});
33+
}
2834
}

src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<mifosx-foreclosure [dataObject]="actionButtonData" *ngIf="actions['Foreclosure']"></mifosx-foreclosure>
88
<mifosx-prepay-loan [dataObject]="actionButtonData" *ngIf="actions['Prepay Loan']"></mifosx-prepay-loan>
99
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Make Repayment']"></mifosx-make-repayment>
10+
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Capitalized Income']"></mifosx-make-repayment>
1011
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Goodwill Credit']"></mifosx-make-repayment>
1112
<mifosx-make-repayment
1213
[dataObject]="actionButtonData"

src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export class LoanAccountActionsComponent {
5151
'Re-Amortize': boolean;
5252
'Interest Payment Waiver': boolean;
5353
'Add Interest Pause': boolean;
54+
'Capitalized Income': boolean;
5455
} = {
5556
Close: false,
5657
'Undo Approval': false,
@@ -86,7 +87,8 @@ export class LoanAccountActionsComponent {
8687
'Re-Age': false,
8788
'Re-Amortize': false,
8889
'Interest Payment Waiver': false,
89-
'Add Interest Pause': false
90+
'Add Interest Pause': false,
91+
'Capitalized Income': false
9092
};
9193

9294
actionButtonData: any;

src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</mat-error>
2222
</mat-form-field>
2323

24-
<div fxLayout="row wrap" class="content">
24+
<div fxLayout="row wrap" class="content" *ngIf="showDetails()">
2525
<div fxFlex="50%" class="mat-body-strong">
2626
{{ 'Principal' | translate }}
2727
</div>

0 commit comments

Comments
 (0)