build: Run stylelint and prettier during build (#2239)

Stylelint and prettier checks are added to the build workflow, to maintain formatting consistency.

Existing issues are fixed.
This commit is contained in:
Ralph Hopman
2025-01-29 04:51:17 -06:00
committed by GitHub
parent 06693a65f0
commit 43d2a29c4d
8 changed files with 72 additions and 57 deletions
+6
View File
@@ -37,6 +37,12 @@ jobs:
- name: Run eslint - name: Run eslint
run: npx ng lint run: npx ng lint
- name: Run stylelint
run: npx stylelint "src/**/*.scss"
- name: Run prettier
run: npx prettier . --check
- name: Run build - name: Run build
run: npm run build:prod run: npm run build:prod
+1 -3
View File
@@ -226,16 +226,14 @@ MIFOS_DISPLAY_BACKEND_INFO=false
For more information look the env.sample file in the root directory of the project For more information look the env.sample file in the root directory of the project
# Jira Links # Jira Links
Jira Board Link: [Kanban Board] Jira Board Link: [Kanban Board]
https://mifosforge.jira.com/jira/your-work https://mifosforge.jira.com/jira/your-work
Jira Web App Project Link: Jira Web App Project Link:
https://mifosforge.jira.com/jira/software/c/projects/WEB/boards/62 https://mifosforge.jira.com/jira/software/c/projects/WEB/boards/62
## Want to help? [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/openMF/web-app/issues) ## Want to help? [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/openMF/web-app/issues)
Want to file a bug, request a feature, contribute some code, or improve documentation? Excellent! Read up on our guidelines for [contributing](.github/CONTRIBUTING.md) and then check out one of our [issues](https://github.com/openMF/web-app/issues). Make sure you follow the guidelines before sending a contribution! Want to file a bug, request a feature, contribute some code, or improve documentation? Excellent! Read up on our guidelines for [contributing](.github/CONTRIBUTING.md) and then check out one of our [issues](https://github.com/openMF/web-app/issues). Make sure you follow the guidelines before sending a contribution!
@@ -1,6 +1,5 @@
<div class="container"> <div class="container">
<div *ngFor="let loanTermVariation of loanTermVariationsData"> <div *ngFor="let loanTermVariation of loanTermVariationsData">
<h3 class="m-t-20">{{ 'labels.heading.' + loanTermVariation.label | translate }}</h3> <h3 class="m-t-20">{{ 'labels.heading.' + loanTermVariation.label | translate }}</h3>
<table mat-table [dataSource]="loanTermVariation.data"> <table mat-table [dataSource]="loanTermVariation.data">
<ng-container matColumnDef="row"> <ng-container matColumnDef="row">
@@ -32,12 +31,24 @@
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th> <th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let item"> <td mat-cell *matCellDef="let item">
<span *ngIf="allowActions(item.termType.value)"> <span *ngIf="allowActions(item.termType.value)">
<button class="button" mat-icon-button color="primary" matTooltip="{{ 'tooltips.Edit' | translate }}" <button
matTooltipPosition="right" (click)="manageRequest(item, 'Edit')"> class="button"
mat-icon-button
color="primary"
matTooltip="{{ 'tooltips.Edit' | translate }}"
matTooltipPosition="right"
(click)="manageRequest(item, 'Edit')"
>
<fa-icon icon="edit" size="lg"></fa-icon> <fa-icon icon="edit" size="lg"></fa-icon>
</button> </button>
<button class="button" mat-icon-button color="warn" matTooltip="{{ 'tooltips.Delete' | translate }}" <button
matTooltipPosition="left" (click)="manageRequest(item, 'Delete')"> class="button"
mat-icon-button
color="warn"
matTooltip="{{ 'tooltips.Delete' | translate }}"
matTooltipPosition="left"
(click)="manageRequest(item, 'Delete')"
>
<fa-icon icon="trash" size="lg"></fa-icon> <fa-icon icon="trash" size="lg"></fa-icon>
</button> </button>
</span> </span>
@@ -48,5 +59,4 @@
<tr mat-row *matRowDef="let row; columns: loanDTermVariationsColumns"></tr> <tr mat-row *matRowDef="let row; columns: loanDTermVariationsColumns"></tr>
</table> </table>
</div> </div>
</div> </div>
@@ -52,7 +52,7 @@ export class LoanTermVariationsTabComponent {
) { ) {
this.interestPausesData = []; this.interestPausesData = [];
this.clientId = this.route.parent.parent.snapshot.paramMap.get('clientId'); this.clientId = this.route.parent.parent.snapshot.paramMap.get('clientId');
this.route.data.subscribe((data: { loanDetailsData: any; }) => { this.route.data.subscribe((data: { loanDetailsData: any }) => {
this.loanId = data.loanDetailsData.id; this.loanId = data.loanDetailsData.id;
this.loanTermVariationsData = []; this.loanTermVariationsData = [];
data.loanDetailsData.loanTermVariations?.forEach((item: any) => { data.loanDetailsData.loanTermVariations?.forEach((item: any) => {
@@ -99,68 +99,68 @@ export class LoanTermVariationsTabComponent {
if (this.deleteInstallmentData.length > 0) { if (this.deleteInstallmentData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Delete Installment", label: 'Delete Installment',
"data": this.deleteInstallmentData data: this.deleteInstallmentData
}); });
} }
if (this.dueDateData.length > 0) { if (this.dueDateData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Due Date", label: 'Due Date',
"data": this.dueDateData data: this.dueDateData
}); });
} }
if (this.emiAmountData.length > 0) { if (this.emiAmountData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "EMI Amount", label: 'EMI Amount',
"data": this.emiAmountData data: this.emiAmountData
}); });
} }
if (this.extendRepaymentPeriodData.length > 0) { if (this.extendRepaymentPeriodData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Extend Repayment Period", label: 'Extend Repayment Period',
"data": this.extendRepaymentPeriodData data: this.extendRepaymentPeriodData
}); });
} }
if (this.graceOnInterestData.length > 0) { if (this.graceOnInterestData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Grace On Interest", label: 'Grace On Interest',
"data": this.graceOnInterestData data: this.graceOnInterestData
}); });
} }
if (this.graceOnPrincipalData.length > 0) { if (this.graceOnPrincipalData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Grace On Principal", label: 'Grace On Principal',
"data": this.graceOnPrincipalData data: this.graceOnPrincipalData
}); });
} }
if (this.insertInstallmentData.length > 0) { if (this.insertInstallmentData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Insert Installment", label: 'Insert Installment',
"data": this.insertInstallmentData data: this.insertInstallmentData
}); });
} }
if (this.interestPausesData.length > 0) { if (this.interestPausesData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Interest Pauses", label: 'Interest Pauses',
"data": this.interestPausesData data: this.interestPausesData
}); });
} }
if (this.interestRateData.length > 0) { if (this.interestRateData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Interest Rate", label: 'Interest Rate',
"data": this.interestRateData data: this.interestRateData
}); });
} }
if (this.interestRateFromInstallmentData.length > 0) { if (this.interestRateFromInstallmentData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Interest Rate From Installment", label: 'Interest Rate From Installment',
"data": this.interestRateFromInstallmentData data: this.interestRateFromInstallmentData
}); });
} }
if (this.principalAmountData.length > 0) { if (this.principalAmountData.length > 0) {
this.loanTermVariationsData.push({ this.loanTermVariationsData.push({
"label": "Principal Amount", label: 'Principal Amount',
"data": this.principalAmountData data: this.principalAmountData
}); });
} }
}); });
@@ -241,6 +241,6 @@ export class LoanTermVariationsTabComponent {
} }
allowActions(termType: string): boolean { allowActions(termType: string): boolean {
return (termType === 'interestPause') return termType === 'interestPause';
} }
} }
+2 -1
View File
@@ -1141,7 +1141,8 @@
"successfully select option": "con successo. Seleziona una delle opzioni seguenti per procedere ulteriormente.", "successfully select option": "con successo. Seleziona una delle opzioni seguenti per procedere ulteriormente.",
"Map Charge-off reasons to Expense accounts": "Associa i motivi di addebito ai conti spese", "Map Charge-off reasons to Expense accounts": "Associa i motivi di addebito ai conti spese",
"Interest Rate From Installment": "Tasso di interesse dalla rata", "Interest Rate From Installment": "Tasso di interesse dalla rata",
"Due Date": "Scadenza", "Delete Installment": "Elimina rata", "Due Date": "Scadenza",
"Delete Installment": "Elimina rata",
"EMI Amount": "Importo EMI", "EMI Amount": "Importo EMI",
"Extend Repayment Period": "Estendere il periodo di rimborso", "Extend Repayment Period": "Estendere il periodo di rimborso",
"Grace On Interest": "Grazia sugli interessi", "Grace On Interest": "Grazia sugli interessi",