build: Use prettier for html

Stop ignoring html files in prettier and fix existing issues.
This commit is contained in:
Ralph Hopman
2024-12-19 09:36:50 +01:00
committed by Adam Saghy
parent c5fc3925fb
commit 2ec9ba81d6
651 changed files with 28935 additions and 20624 deletions
+15 -15
View File
@@ -1,38 +1,38 @@
<div class="container">
<div fxLayout="row" fxLayoutGap="20px">
<mat-form-field fxFlex>
<mat-label>{{'labels.inputs.Filter' | translate }}</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)">
<mat-label>{{ 'labels.inputs.Filter' | translate }}</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" />
</mat-form-field>
</div>
<div class="mat-elevation-z8">
<table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="reportName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.name" | translate}} </th>
<td mat-cell *matCellDef="let report"> {{ report.reportName }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let report">{{ report.reportName }}</td>
</ng-container>
<ng-container matColumnDef="reportType">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Type" | translate}} </th>
<td mat-cell *matCellDef="let report"> {{'labels.text.' + report.reportType | translate}} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Type' | translate }}</th>
<td mat-cell *matCellDef="let report">{{ 'labels.text.' + report.reportType | translate }}</td>
</ng-container>
<ng-container matColumnDef="reportCategory">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Category" | translate}} </th>
<td mat-cell *matCellDef="let report"> {{'labels.text.' + report.reportCategory | translate}} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Category' | translate }}</th>
<td mat-cell *matCellDef="let report">{{ 'labels.text.' + report.reportCategory | translate }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row" [routerLink]="['/reports','run', row.reportName]" [queryParams]="{ type: row.reportType, id: row.id }"></tr>
<tr
mat-row
*matRowDef="let row; columns: displayedColumns"
class="select-row"
[routerLink]="['/reports', 'run', row.reportName]"
[queryParams]="{ type: row.reportType, id: row.id }"
></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
</div>
@@ -1,10 +1,14 @@
<div class="m-b-20" fxLayoutAlign="end">
<mat-button-toggle-group aria-label="Select Chart Type">
<mat-button-toggle value="Bar" (click) = "setBarChart(inputData)">{{"labels.buttons.Bar Chart" | translate}}</mat-button-toggle>
<mat-button-toggle value="Pie" (click) = "setPieChart(inputData)">{{"labels.buttons.Pie Chart" | translate}}</mat-button-toggle>
<mat-button-toggle-group aria-label="Select Chart Type">
<mat-button-toggle value="Bar" (click)="setBarChart(inputData)">{{
'labels.buttons.Bar Chart' | translate
}}</mat-button-toggle>
<mat-button-toggle value="Pie" (click)="setPieChart(inputData)">{{
'labels.buttons.Pie Chart' | translate
}}</mat-button-toggle>
</mat-button-toggle-group>
</div>
<div [ngStyle]="{'display': (hideOutput) ? 'none' : 'block'}">
<div [ngStyle]="{ display: hideOutput ? 'none' : 'block' }">
<canvas id="output"></canvas>
</div>
@@ -1 +1 @@
<iframe *ngIf = "!hideOutput" [src]="pentahoUrl" frameborder="0" width=100% height="750px;"></iframe>
<iframe *ngIf="!hideOutput" [src]="pentahoUrl" frameborder="0" width="100%" height="750px;"></iframe>
@@ -1,52 +1,53 @@
<div class="container input">
<mat-card *ngIf="!isCollapsed">
<form [formGroup]="reportForm">
<mat-card-content fxLayout="column">
<ng-container *ngFor="let param of paramData" [ngSwitch]="param.displayType">
<ng-container *ngIf="reportForm.contains(param.name)">
<mat-form-field fxFlex *ngSwitchCase="'text'">
<mat-label>{{param.label}}</mat-label>
<input matInput required [formControlName]="param.name">
<mat-label>{{ param.label }}</mat-label>
<input matInput required [formControlName]="param.name" />
<mat-error *ngIf="reportForm.controls[param.name].hasError('required')">
{{param.label}} {{ "labels.commons.is" | translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
{{ param.label }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex *ngSwitchCase="'date'" (click)="runReportDatePicker.open()">
<mat-label>{{param.label}}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="runReportDatePicker" required
[formControlName]="param.name">
<mat-label>{{ param.label }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="runReportDatePicker"
required
[formControlName]="param.name"
/>
<mat-datepicker-toggle matSuffix [for]="runReportDatePicker"></mat-datepicker-toggle>
<mat-datepicker #runReportDatePicker></mat-datepicker>
<mat-error *ngIf="reportForm.controls[param.name].hasError('required')">
{{param.label}} {{ "labels.commons.is" | translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
{{ param.label }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex *ngSwitchCase="'select'">
<mat-label>{{param.label}}</mat-label>
<mat-label>{{ param.label }}</mat-label>
<mat-select required [formControlName]="param.name">
<mat-option *ngFor="let option of param.selectOptions" [value]="option">
{{option.name}}
{{ option.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="reportForm.controls[param.name].hasError('required')">
{{param.label}} {{ "labels.commons.is" | translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
{{ param.label }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
</ng-container>
</ng-container>
<mat-form-field fxFlex>
<mat-label>{{"labels.inputs.Decimal Places" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Decimal Places' | translate }}</mat-label>
<mat-select [formControl]="decimalChoice">
<mat-option value="0">0</mat-option>
<mat-option value="1">1</mat-option>
@@ -57,50 +58,59 @@
</mat-form-field>
<mat-form-field fxFlex *ngIf="isPentahoReport()">
<mat-label>{{'labels.inputs.Output Type' | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Output Type' | translate }}</mat-label>
<mat-select required formControlName="outputType">
<mat-option *ngFor="let option of outputTypeOptions" [value]="option.value">
{{ "labels.inputs." + option.name | translate}}
{{ 'labels.inputs.' + option.name | translate }}
</mat-option>
</mat-select>
<mat-error *ngIf="reportForm.controls['outputType'].hasError('required')">
{{ "labels.text.Report Output Type" | translate }} {{ "labels.commons.is" | translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
{{ 'labels.text.Report Output Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<div fxFlex="98%" *ngIf="exportToS3Allowed" >
<div fxFlex="98%" *ngIf="exportToS3Allowed">
<mat-checkbox labelPosition="after" formControlName="exportOutputToS3">
{{ "labels.text.Export output data to S3 repository" | translate }} [{{exportToS3Repository}}]
{{ 'labels.text.Export output data to S3 repository' | translate }} [{{ exportToS3Repository }}]
</mat-checkbox>
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['/reports']">{{"labels.buttons.Cancel" | translate}}</button>
<button mat-raised-button color="primary" [disabled]="!reportForm.valid || isProcessing" id="runreport" (click)="run()">
<fa-icon icon="file-export" class="m-r-10"></fa-icon>
{{"labels.buttons.Run Report" | translate}}
<button type="button" mat-raised-button [routerLink]="['/reports']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button *ngIf="isTableReport()" mat-raised-button color="primary" [disabled]="!reportForm.valid || isProcessing" (click)="runReportAndExport($event)">
<button
mat-raised-button
color="primary"
[disabled]="!reportForm.valid || isProcessing"
id="runreport"
(click)="run()"
>
<fa-icon icon="file-export" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Run Report' | translate }}
</button>
<button
*ngIf="isTableReport()"
mat-raised-button
color="primary"
[disabled]="!reportForm.valid || isProcessing"
(click)="runReportAndExport($event)"
>
<fa-icon icon="download" class="m-r-10"></fa-icon>
{{"labels.buttons.Run and Download Report" | translate}}
{{ 'labels.buttons.Run and Download Report' | translate }}
</button>
</mat-card-actions>
</form>
</mat-card>
</div>
<div class="container output" *ngIf="isCollapsed">
<mat-card>
<div class="m-b-20">
<button mat-raised-button color="primary" (click)="isCollapsed = false">
{{'labels.buttons.Parameters' | translate}}
{{ 'labels.buttons.Parameters' | translate }}
</button>
</div>
@@ -109,7 +119,5 @@
<mifosx-chart *ngIf="!hideChart" [dataObject]="dataObject"></mifosx-chart>
<mifosx-pentaho *ngIf="!hidePentaho" [dataObject]="dataObject"></mifosx-pentaho>
</div>
</mat-card>
</div>
@@ -1,31 +1,39 @@
<div class="container">
<div *ngIf="!hideOutput && !toBeExportedToRepo">
<div class="m-b-10" *ngIf="dataObject.report.type === 'Table'" fxLayoutGap="25px" fxLayoutAlign="end">
<button mat-raised-button color="primary" (click)="exportFile()" [disabled]="notExistsReportData"
matToolTip="{{'labels.text.Export the data to CSV file' | translate}}">
{{'labels.buttons.Export CSV' | translate}}
<button
mat-raised-button
color="primary"
(click)="exportFile()"
[disabled]="notExistsReportData"
matToolTip="{{ 'labels.text.Export the data to CSV file' | translate }}"
>
{{ 'labels.buttons.Export CSV' | translate }}
</button>
<button mat-raised-button color="primary" (click)="exportToXLS()" [disabled]="notExistsReportData"
matToolTip="{{'labels.text.Export the data to XLS file' | translate}}">
{{'labels.buttons.Export XLS' | translate}}
<button
mat-raised-button
color="primary"
(click)="exportToXLS()"
[disabled]="notExistsReportData"
matToolTip="{{ 'labels.text.Export the data to XLS file' | translate }}"
>
{{ 'labels.buttons.Export XLS' | translate }}
</button>
</div>
<div class="table-output" [hidden]="notExistsReportData">
<table id="report-table" mat-table [dataSource]="dataSource">
<div *ngFor="let column of displayedColumns index as i">
<div *ngFor="let column of displayedColumns; index as i">
<ng-container [matColumnDef]="column">
<th mat-header-cell *matHeaderCellDef>{{column}}</th>
<th mat-header-cell *matHeaderCellDef>{{ column }}</th>
<td mat-cell *matCellDef="let param">
<span *ngIf="isDecimal(i)">{{toDecimal(param.row[i])}}</span>
<span *ngIf="!isDecimal(i)">{{param.row[i]}}</span>
<span *ngIf="isDecimal(i)">{{ toDecimal(param.row[i]) }}</span>
<span *ngIf="!isDecimal(i)">{{ param.row[i] }}</span>
</td>
</ng-container>
</div>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" class="select-row"></tr>
</table>
<mat-paginator [pageSizeOptions]="[100, 200, 300]" showFirstLastButtons></mat-paginator>
</div>
@@ -33,7 +41,7 @@
<div class="alert" [hidden]="!notExistsReportData">
<div class="message">
<i class="fa fa-exclamation-circle alert-check"></i>
{{'labels.text.No report data was generated' | translate}}
{{ 'labels.text.No report data was generated' | translate }}
</div>
</div>
</div>
@@ -41,7 +49,7 @@
<div class="alert" *ngIf="!hideOutput && toBeExportedToRepo">
<div class="message">
<i class="fa fa-exclamation-circle alert-check"></i>
{{'labels.text.The report request' | translate}}
{{ 'labels.text.The report request' | translate }}
</div>
</div>
@@ -51,7 +59,7 @@
<div class="back-button" *ngIf="!hideOutput">
<button type="button" color="primary" mat-raised-button [routerLink]="['../..']">
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>{{"labels.buttons.Back" | translate}}</button>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>{{ 'labels.buttons.Back' | translate }}
</button>
</div>
</div>
@@ -1,79 +1,73 @@
<div class="container form">
<mat-card *ngIf="isCollapsed">
<form [formGroup]="xbrlForm" (ngSubmit)="runreport()">
<mat-card-content fxLayout="column">
<mat-form-field fxFlex (click)="startDatePicker.open()">
<mat-label>{{"labels.inputs.Start Date" | translate}}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="startDatePicker" formControlName="startDate">
<mat-label>{{ 'labels.inputs.Start Date' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="startDatePicker"
formControlName="startDate"
/>
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
<mat-datepicker #startDatePicker></mat-datepicker>
</mat-form-field>
<mat-form-field fxFlex (click)="endDatePicker.open()">
<mat-label>{{"labels.inputs.End Date" | translate}}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="endDatePicker" formControlName="endDate">
<mat-label>{{ 'labels.inputs.End Date' | translate }}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="endDatePicker" formControlName="endDate" />
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
<mat-datepicker #endDatePicker></mat-datepicker>
</mat-form-field>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../']">{{"labels.buttons.Cancel" | translate}}</button>
<button mat-raised-button color="primary" id="runreport">{{"labels.buttons.Run Report" | translate}}</button>
<button type="button" mat-raised-button [routerLink]="['../']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button mat-raised-button color="primary" id="runreport">{{ 'labels.buttons.Run Report' | translate }}</button>
</mat-card-actions>
</form>
</mat-card>
</div>
<div class="container">
<mat-card *ngIf="!isCollapsed">
<button mat-raised-button color="primary" (click)="isCollapsed = !isCollapsed">
{{"labels.buttons.Parameters" | translate}}
{{ 'labels.buttons.Parameters' | translate }}
</button>
<div class="m-t-20">
<table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.name" | translate}} </th>
<td mat-cell *matCellDef="let entry"> {{ entry.name }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let entry">{{ entry.name }}</td>
</ng-container>
<ng-container matColumnDef="dimension">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Dimension" | translate}} </th>
<td mat-cell *matCellDef="let entry"> {{ entry.dimension }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Dimension' | translate }}</th>
<td mat-cell *matCellDef="let entry">{{ entry.dimension }}</td>
</ng-container>
<ng-container matColumnDef="value">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Value" | translate}} </th>
<td mat-cell *matCellDef="let entry"> <input [formControl]="entry.value"></td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Value' | translate }}</th>
<td mat-cell *matCellDef="let entry"><input [formControl]="entry.value" /></td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" class="select-row"></tr>
</table>
<div class="container m-t-20" fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px">
<button type="button" mat-raised-button [routerLink]="['../']">{{"labels.buttons.Cancel" | translate}}</button>
<button type="button" mat-raised-button [routerLink]="['../']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<a [href]="submit()" download="file.xml">
<button mat-raised-button color="primary">{{"labels.buttons.Submit" | translate}}</button>
<button mat-raised-button color="primary">{{ 'labels.buttons.Submit' | translate }}</button>
</a>
</div>
</div>
</mat-card>
</div>
+45 -47
View File
@@ -1,61 +1,59 @@
<mat-card class="container">
<div *ngIf="XBRLSuccess">
<h1><strong>{{"labels.heading.Saved Successfully" | translate}}</strong></h1>
<h1>
<strong>{{ 'labels.heading.Saved Successfully' | translate }}</strong>
</h1>
</div>
<div *ngIf="!XBRLSuccess">
<mat-tab-group (selectedTabChange)="filterTaxonomiesBy($event.index)">
<mat-tab label="Portfolio"></mat-tab>
<mat-tab label="BalanceSheet"></mat-tab>
<mat-tab label="Incomes"></mat-tab>
<mat-tab label="Expenses"></mat-tab>
</mat-tab-group>
<mat-tab-group (selectedTabChange)="filterTaxonomiesBy($event.index)">
<mat-tab label="Portfolio"></mat-tab>
<mat-tab label="BalanceSheet"></mat-tab>
<mat-tab label="Incomes"></mat-tab>
<mat-tab label="Expenses"></mat-tab>
</mat-tab-group>
<div class="table-container">
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="info">
<td mat-cell *matCellDef="let mixtaxonomy">
<fa-icon icon="question-circle" [matTooltip]="mixtaxonomy.description"></fa-icon>
</td>
</ng-container>
<div class="table-container">
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="name">
<td mat-cell *matCellDef="let mixtaxonomy">{{ mixtaxonomy.name }}</td>
</ng-container>
<ng-container matColumnDef="info">
<td mat-cell *matCellDef="let mixtaxonomy">
<fa-icon icon="question-circle" [matTooltip]="mixtaxonomy.description"></fa-icon>
</td>
</ng-container>
<ng-container matColumnDef="dimension">
<td mat-cell *matCellDef="let mixtaxonomy">{{ mixtaxonomy.dimension }}</td>
</ng-container>
<ng-container matColumnDef="name">
<td mat-cell *matCellDef="let mixtaxonomy"> {{ mixtaxonomy.name }} </td>
</ng-container>
<ng-container matColumnDef="mapping">
<td mat-cell *matCellDef="let mixtaxonomy">
<input [formControl]="mixtaxonomy.mapping" [matAutocomplete]="glAccountAutocomplete" />
</td>
</ng-container>
<ng-container matColumnDef="dimension">
<td mat-cell *matCellDef="let mixtaxonomy"> {{ mixtaxonomy.dimension }} </td>
</ng-container>
<tr mat-row *matRowDef="let row; columns: displayedColumns" class="select-row"></tr>
</table>
</div>
<ng-container matColumnDef="mapping">
<td mat-cell *matCellDef="let mixtaxonomy"> <input [formControl]="mixtaxonomy.mapping" [matAutocomplete]="glAccountAutocomplete"></td>
</ng-container>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row"></tr>
</table>
</div>
<div class="container m-t-20" fxLayout="row" fxLayoutAlign="center" fxLayoutGap="20px">
<button mat-raised-button color="primary" [routerLink]="['./report']">
<fa-icon icon="cog" class="m-r-10"></fa-icon>
{{"labels.buttons.Generate Report" | translate}}
</button>
<button mat-raised-button color="accent" (click)="submit()">
<fa-icon icon="download" class="m-r-10"></fa-icon>
{{"labels.buttons.Save Changes" | translate}}
</button>
</div>
<mat-autocomplete autoActiveFirstOption #glAccountAutocomplete="matAutocomplete">
<mat-option *ngFor="let glAccount of filteredGlAccounts" [value]="'{' + glAccount.glCode + '}'">
{{ glAccount.name + ' (' + glAccount.glCode + ')' }}
</mat-option>
</mat-autocomplete>
<div class="container m-t-20" fxLayout="row" fxLayoutAlign="center" fxLayoutGap="20px">
<button mat-raised-button color="primary" [routerLink]="['./report']">
<fa-icon icon="cog" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Generate Report' | translate }}
</button>
<button mat-raised-button color="accent" (click)="submit()">
<fa-icon icon="download" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Save Changes' | translate }}
</button>
</div>
<mat-autocomplete autoActiveFirstOption #glAccountAutocomplete="matAutocomplete">
<mat-option *ngFor="let glAccount of filteredGlAccounts" [value]="'{' + glAccount.glCode + '}'">
{{ glAccount.name + ' (' + glAccount.glCode + ')' }}
</mat-option>
</mat-autocomplete>
</div>
</mat-card>