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
@@ -1,18 +1,14 @@
<div class="container">
<mat-card>
<form [formGroup]="reportForm" (ngSubmit)="submit()">
<mat-card-content>
<div fxLayout="row wrap" fxLayout.lt-md="column" fxLayoutGap="4%">
<mat-form-field fxFlex="30%">
<mat-label>{{ 'labels.inputs.Report Name' | translate }}</mat-label>
<input matInput required formControlName="reportName">
<input matInput required formControlName="reportName" />
<mat-error *ngIf="reportForm.controls.reportName.hasError('required')">
{{ 'labels.inputs.Report Name' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Report Name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
@@ -20,34 +16,34 @@
<mat-label>{{ 'labels.inputs.Report Type' | translate }}</mat-label>
<mat-select required formControlName="reportType">
<mat-option *ngFor="let allowedReportType of reportData.allowedReportTypes" [value]="allowedReportType">
{{ allowedReportType | translateKey:'text'}}
{{ allowedReportType | translateKey: 'text' }}
</mat-option>
</mat-select>
<mat-error *ngIf="reportForm.controls.reportType.hasError('required')">
{{ 'labels.inputs.Report Type' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Report Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="30%">
<mat-label>{{ 'labels.inputs.Report Sub Type' | translate }}</mat-label>
<mat-select formControlName="reportSubType">
<mat-option *ngFor="let allowedReportSubType of reportData.allowedReportSubTypes"
[value]="allowedReportSubType">
{{ allowedReportSubType | translateKey:'text'}}
<mat-option
*ngFor="let allowedReportSubType of reportData.allowedReportSubTypes"
[value]="allowedReportSubType"
>
{{ allowedReportSubType | translateKey: 'text' }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div fxLayout="row wrap" fxLayout.lt-md="column" fxLayoutGap="4%">
<mat-form-field fxFlex="40%">
<mat-label>{{ 'labels.inputs.Report Category' | translate }}</mat-label>
<mat-select formControlName="reportCategory">
<mat-option *ngFor="let reportCategoryType of reportCategoryTypeOptions"
[value]="reportCategoryType">
{{ reportCategoryType | translateKey:'catalogs' }}
<mat-option *ngFor="let reportCategoryType of reportCategoryTypeOptions" [value]="reportCategoryType">
{{ reportCategoryType | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
@@ -57,11 +53,9 @@
{{ 'labels.inputs.User Report (UI)' | translate }}
</mat-checkbox>
</div>
</div>
<div fxLayout="column">
<mat-form-field fxFlex="98%">
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
@@ -69,71 +63,97 @@
<mat-form-field fxFlex="98%">
<mat-label> {{ 'labels.inputs.SQL' | translate }}</mat-label>
<textarea matInput required formControlName="reportSql" cdkTextareaAutosize cdkAutosizeMinRows="6"></textarea>
<textarea
matInput
required
formControlName="reportSql"
cdkTextareaAutosize
cdkAutosizeMinRows="6"
></textarea>
<mat-error *ngIf="reportForm.controls.reportSql.hasError('required')">
{{ 'labels.inputs.SQL' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.SQL' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
</div>
<br>
<br />
<div fxLayout="row wrap" fxLayoutGap="60%" fxLayout.lt-md="column">
<p fxFlex="20%" class="mat-title">{{ 'labels.inputs.Report Parameters' | translate }}</p>
<button mat-raised-button fxFlex="20%" type="button" *ngIf="!reportData.coreReport" color="primary"
(click)="addReportParameter()">
<button
mat-raised-button
fxFlex="20%"
type="button"
*ngIf="!reportData.coreReport"
color="primary"
(click)="addReportParameter()"
>
<fa-icon icon="plus" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Add Report Parameter' | translate }}
</button>
</div>
<table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="parameterName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.buttons.Parameters' | translate }} </th>
<td mat-cell *matCellDef="let reportParameter"> {{ reportParameter.parameterName }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.buttons.Parameters' | translate }}</th>
<td mat-cell *matCellDef="let reportParameter">{{ reportParameter.parameterName }}</td>
</ng-container>
<ng-container matColumnDef="parameterNamePassed">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.Parameter Name Passed to Pentaho' | translate }} </th>
<td mat-cell *matCellDef="let reportParameter"> {{ reportParameter.reportParameterName }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>
{{ 'labels.inputs.Parameter Name Passed to Pentaho' | translate }}
</th>
<td mat-cell *matCellDef="let reportParameter">{{ reportParameter.reportParameterName }}</td>
</ng-container>
<ng-container matColumnDef="actions">
<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 reportParameter" fxLayoutGap="15%">
<button *ngIf="!reportData.coreReport" type="button" fxFlex="8%" color="primary" mat-icon-button
(click)="editReportParameter(reportParameter)">
<button
*ngIf="!reportData.coreReport"
type="button"
fxFlex="8%"
color="primary"
mat-icon-button
(click)="editReportParameter(reportParameter)"
>
<fa-icon icon="edit" size="lg"></fa-icon>
</button>
<button *ngIf="!reportData.coreReport" type="button" fxFlex="8%" color="warn" mat-icon-button
(click)="deleteReportParameter(reportParameter)">
<button
*ngIf="!reportData.coreReport"
type="button"
fxFlex="8%"
color="warn"
mat-icon-button
(click)="deleteReportParameter(reportParameter)"
>
<fa-icon icon="trash" size="lg"></fa-icon>
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</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"
[disabled]="(!reportForm.valid || reportForm.pristine) && !isReportParametersChanged" *mifosxHasPermission="'UPDATE_REPORT'">{{'labels.buttons.Submit' | translate }}</button>
<button type="button" mat-raised-button [routerLink]="['../']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button
mat-raised-button
color="primary"
[disabled]="(!reportForm.valid || reportForm.pristine) && !isReportParametersChanged"
*mifosxHasPermission="'UPDATE_REPORT'"
>
{{ 'labels.buttons.Submit' | translate }}
</button>
</mat-card-actions>
</form>
</mat-card>
</div>