build: Use prettier for html
Stop ignoring html files in prettier and fix existing issues.
This commit is contained in:
@@ -1,53 +1,70 @@
|
||||
<div class="container space">
|
||||
|
||||
<div class="mat-elevation-z8">
|
||||
<div *ngIf="!isBusinessDateEnabled">
|
||||
<p>{{'labels.text.Business Date functionality is not enabled' | translate}}: <code>{{configurationName}}</code></p>
|
||||
<p>
|
||||
{{ 'labels.text.Business Date functionality is not enabled' | translate }}: <code>{{ configurationName }}</code>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="isBusinessDateEnabled">
|
||||
|
||||
<mat-card>
|
||||
<form [formGroup]="businessDateForm">
|
||||
<mat-card-content>
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" class="space">
|
||||
<div fxFlex="50%">
|
||||
<span fxFlex="40%" class="date-type">{{'labels.inputs.User date format' | translate}}: </span>
|
||||
<span fxFlex="60%" class="date-value">{{userDateFormat}}</span>
|
||||
<span fxFlex="40%" class="date-type">{{ 'labels.inputs.User date format' | translate }}: </span>
|
||||
<span fxFlex="60%" class="date-value">{{ userDateFormat }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Business Date -->
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<div fxFlex="50%" *ngIf="!isEditInProgress">
|
||||
<span fxFlex="40%" class="date-type">{{'labels.inputs.Business Date' | translate}}: </span>
|
||||
<span fxFlex="60%" class="date-value">{{businessDate | dateFormat}}</span>
|
||||
<span fxFlex="40%" class="date-type">{{ 'labels.inputs.Business Date' | translate }}: </span>
|
||||
<span fxFlex="60%" class="date-value">{{ businessDate | dateFormat }}</span>
|
||||
</div>
|
||||
|
||||
<mat-form-field (click)="businessDatePicker.open()" *ngIf="isEditInProgress && (dateIndex === 0)">
|
||||
<mat-label>{{'labels.inputs.Business Date' | translate}}</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="businessDatePicker"
|
||||
formControlName="businessDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="businessDatePicker">
|
||||
</mat-datepicker-toggle>
|
||||
<mat-form-field (click)="businessDatePicker.open()" *ngIf="isEditInProgress && dateIndex === 0">
|
||||
<mat-label>{{ 'labels.inputs.Business Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="businessDatePicker"
|
||||
formControlName="businessDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="businessDatePicker"> </mat-datepicker-toggle>
|
||||
<mat-datepicker #businessDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="businessDateForm.controls.businessDate.hasError('required')">
|
||||
{{'labels.inputs.Business Date' | translate}} {{ "labels.commons.is" | translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
|
||||
{{ 'labels.inputs.Business Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayoutGap="2%" fxFlex="22%" class="options-wrapper">
|
||||
<span *ngIf="isEditInProgress && (dateIndex === 0)">
|
||||
<button mat-raised-button color="primary" [disabled]="businessDateForm.pristine" (click)="submit()"
|
||||
*mifosxHasPermission="'UPDATE_BUSINESSDATE'">
|
||||
{{'labels.buttons.Submit' | translate}}
|
||||
<span *ngIf="isEditInProgress && dateIndex === 0">
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
[disabled]="businessDateForm.pristine"
|
||||
(click)="submit()"
|
||||
*mifosxHasPermission="'UPDATE_BUSINESSDATE'"
|
||||
>
|
||||
{{ 'labels.buttons.Submit' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button (click)="editInProgressToggle(0)">
|
||||
{{'labels.buttons.Cancel' | translate}}
|
||||
{{ 'labels.buttons.Cancel' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
<button type="button" color="primary" *ngIf="!isEditInProgress" mat-icon-button matTooltip="{{ 'tooltips.Edit the Business Date' | translate}}"
|
||||
matTooltipPosition="above" (click)="editInProgressToggle(0)">
|
||||
<button
|
||||
type="button"
|
||||
color="primary"
|
||||
*ngIf="!isEditInProgress"
|
||||
mat-icon-button
|
||||
matTooltip="{{ 'tooltips.Edit the Business Date' | translate }}"
|
||||
matTooltipPosition="above"
|
||||
(click)="editInProgressToggle(0)"
|
||||
>
|
||||
<fa-icon icon="edit" size="lg"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
@@ -56,34 +73,51 @@
|
||||
<!-- COB Date -->
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<div fxFlex="50%" *ngIf="!isEditInProgress">
|
||||
<span fxFlex="40%" class="date-type">{{'labels.inputs.COB Date' | translate}}: </span>
|
||||
<span fxFlex="60%" class="date-value">{{cobDate | dateFormat}}</span>
|
||||
<span fxFlex="40%" class="date-type">{{ 'labels.inputs.COB Date' | translate }}: </span>
|
||||
<span fxFlex="60%" class="date-value">{{ cobDate | dateFormat }}</span>
|
||||
</div>
|
||||
|
||||
<mat-form-field (click)="cobDatePicker.open()" *ngIf="isEditInProgress && (dateIndex === 1)">
|
||||
<mat-label>{{'labels.inputs.COB Date' | translate}}</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="cobDatePicker"
|
||||
formControlName="businessDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="cobDatePicker">
|
||||
</mat-datepicker-toggle>
|
||||
<mat-form-field (click)="cobDatePicker.open()" *ngIf="isEditInProgress && dateIndex === 1">
|
||||
<mat-label>{{ 'labels.inputs.COB Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="cobDatePicker"
|
||||
formControlName="businessDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="cobDatePicker"> </mat-datepicker-toggle>
|
||||
<mat-datepicker #cobDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="businessDateForm.controls.cobDate.hasError('required')">
|
||||
{{'labels.inputs.COB Date' | translate}} {{ "labels.commons.is" | translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
|
||||
{{ 'labels.inputs.COB Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayoutGap="4%" fxFlex="22%" class="options-wrapper">
|
||||
<span *ngIf="isEditInProgress && (dateIndex === 1)">
|
||||
<button mat-stroked-button color="primary" [disabled]="businessDateForm.pristine" (click)="submit()"
|
||||
*mifosxHasPermission="'UPDATE_BUSINESSDATE'">
|
||||
{{'labels.buttons.Submit' | translate}}
|
||||
<span *ngIf="isEditInProgress && dateIndex === 1">
|
||||
<button
|
||||
mat-stroked-button
|
||||
color="primary"
|
||||
[disabled]="businessDateForm.pristine"
|
||||
(click)="submit()"
|
||||
*mifosxHasPermission="'UPDATE_BUSINESSDATE'"
|
||||
>
|
||||
{{ 'labels.buttons.Submit' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
<button mat-button *ngIf="isEditInProgress && (dateIndex === 1)" (click)="editInProgressToggle(1)">
|
||||
{{'labels.buttons.Cancel' | translate}}
|
||||
<button mat-button *ngIf="isEditInProgress && dateIndex === 1" (click)="editInProgressToggle(1)">
|
||||
{{ 'labels.buttons.Cancel' | translate }}
|
||||
</button>
|
||||
<button type="button" color="primary" *ngIf="!isEditInProgress" mat-icon-button matTooltip="{{ 'tooltips.Edit the COB Date' | translate}}"
|
||||
matTooltipPosition="above" (click)="editInProgressToggle(1)">
|
||||
<button
|
||||
type="button"
|
||||
color="primary"
|
||||
*ngIf="!isEditInProgress"
|
||||
mat-icon-button
|
||||
matTooltip="{{ 'tooltips.Edit the COB Date' | translate }}"
|
||||
matTooltipPosition="above"
|
||||
(click)="editInProgressToggle(1)"
|
||||
>
|
||||
<fa-icon icon="edit" size="lg"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<mat-card class="configurations-card">
|
||||
<mat-card-content>
|
||||
<mat-tab-group #tabGroup mat-align-tabs="center">
|
||||
<mat-tab label="{{'labels.inputs.Global Configurations' | translate}}">
|
||||
<mat-tab label="{{ 'labels.inputs.Global Configurations' | translate }}">
|
||||
<mifosx-global-configurations-tab></mifosx-global-configurations-tab>
|
||||
</mat-tab>
|
||||
<mat-tab label="{{'labels.inputs.Business Date' | translate}}" *ngIf="isBusinessDateEnabled">
|
||||
<mat-tab label="{{ 'labels.inputs.Business Date' | translate }}" *ngIf="isBusinessDateEnabled">
|
||||
<mifosx-business-date-tab></mifosx-business-date-tab>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
+20
-21
@@ -1,52 +1,51 @@
|
||||
<div class="container space">
|
||||
|
||||
<mat-card>
|
||||
|
||||
<form [formGroup]="configurationForm" (ngSubmit)="submit()">
|
||||
|
||||
<mat-card-content>
|
||||
|
||||
<div fxLayout="column">
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{'labels.inputs.Configuration Name' | translate}}</mat-label>
|
||||
<input matInput required formControlName="name">
|
||||
<mat-label>{{ 'labels.inputs.Configuration Name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="name" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{'labels.inputs.Description' | translate}}</mat-label>
|
||||
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
|
||||
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{'labels.inputs.Number Value' | translate}}</mat-label>
|
||||
<input matInput type="number" formControlName="value">
|
||||
<mat-label>{{ 'labels.inputs.Number Value' | translate }}</mat-label>
|
||||
<input matInput type="number" formControlName="value" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{'labels.inputs.String Value' | translate}}</mat-label>
|
||||
<input matInput formControlName="stringValue">
|
||||
<mat-label>{{ 'labels.inputs.String Value' | translate }}</mat-label>
|
||||
<input matInput formControlName="stringValue" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="configurationDatePicker.open()">
|
||||
<mat-label>{{'labels.inputs.Date Value' | translate}}</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="configurationDatePicker" formControlName="dateValue">
|
||||
<mat-label>{{ 'labels.inputs.Date Value' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="configurationDatePicker"
|
||||
formControlName="dateValue"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="configurationDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #configurationDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</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 type="button" mat-raised-button [routerLink]="['../..']">
|
||||
{{ 'labels.buttons.Cancel' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button color="primary" [disabled]="configurationForm.pristine || !configurationForm.valid">
|
||||
{{'labels.buttons.Submit' | translate}} </button>
|
||||
{{ 'labels.buttons.Submit' | translate }}
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
|
||||
</form>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
|
||||
+60
-31
@@ -1,52 +1,59 @@
|
||||
<div class="container">
|
||||
|
||||
<div #filter fxLayout="row">
|
||||
<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 #configurationsTable class="mat-elevation-z8">
|
||||
|
||||
<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 configuration"> {{ configuration.name }}
|
||||
<fa-icon *ngIf="configuration.description" icon="question-circle" matTooltip="{{ configuration.description | translate }}" matTooltipPosition="right"></fa-icon>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let configuration">
|
||||
{{ configuration.name }}
|
||||
<fa-icon
|
||||
*ngIf="configuration.description"
|
||||
icon="question-circle"
|
||||
matTooltip="{{ configuration.description | translate }}"
|
||||
matTooltipPosition="right"
|
||||
></fa-icon>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="enabled">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.Status' | translate}} </th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Status' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let configuration">
|
||||
<mat-slide-toggle [(ngModel)]="configuration.enabled" name="{{configuration.name}}" (click)="toggleStatus(configuration)">
|
||||
<mat-slide-toggle
|
||||
[(ngModel)]="configuration.enabled"
|
||||
name="{{ configuration.name }}"
|
||||
(click)="toggleStatus(configuration)"
|
||||
>
|
||||
<div [className]="configuration.enabled ? 'enabled' : 'disabled'">
|
||||
<span *ngIf="configuration.enabled">{{'labels.inputs.Enabled' | translate}}</span>
|
||||
<span *ngIf="!configuration.enabled">{{'labels.inputs.Disabled' | translate}}</span>
|
||||
<span *ngIf="configuration.enabled">{{ 'labels.inputs.Enabled' | translate }}</span>
|
||||
<span *ngIf="!configuration.enabled">{{ 'labels.inputs.Disabled' | translate }}</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</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 configuration"> {{ configuration.value }}</td>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Value' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let configuration">{{ configuration.value }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="stringValue">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.String Value' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let configuration"> {{ configuration.stringValue }}</td>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.String Value' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let configuration">{{ configuration.stringValue }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="dateValue">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.Date Value' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let configuration"> {{ configuration.dateValue | dateFormat }}</td>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Date Value' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let configuration">{{ configuration.dateValue | dateFormat }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="edit">
|
||||
<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 configuration">
|
||||
<button mat-button color="primary" [routerLink]="[configuration.id, 'edit']">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
@@ -55,30 +62,52 @@
|
||||
</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>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ng-template #templateFilter let-data let-popover="popover">
|
||||
<h4>{{'labels.heading.Search bar to filter configurations' | translate}}</h4>
|
||||
<h4>{{ 'labels.heading.Search bar to filter configurations' | translate }}</h4>
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">{{'labels.buttons.Close' | translate}}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();previousStep()">{{'labels.buttons.Back' | translate}}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateConfigurationsTable, configurationsTable, 'top', true)">{{'labels.buttons.Next' | translate}}</button>
|
||||
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
|
||||
{{ 'labels.buttons.Close' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close(); previousStep()">
|
||||
{{ 'labels.buttons.Back' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
(click)="popover.close(); showPopover(templateConfigurationsTable, configurationsTable, 'top', true)"
|
||||
>
|
||||
{{ 'labels.buttons.Next' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #templateConfigurationsTable let-data let-popover="popover">
|
||||
<h4 class="mw300">{{'labels.heading.Global Configuration options' | translate}}: <a href="https://mifosforge.jira.com/wiki/spaces/docs/pages/67895362/Global+Configuration" target="_blank">{{'labels.inputs.Global Configurations' | translate}}</a></h4>
|
||||
<h4 class="mw300">
|
||||
{{ 'labels.heading.Global Configuration options' | translate }}:
|
||||
<a href="https://mifosforge.jira.com/wiki/spaces/docs/pages/67895362/Global+Configuration" target="_blank">{{
|
||||
'labels.inputs.Global Configurations' | translate
|
||||
}}</a>
|
||||
</h4>
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">{{'labels.buttons.Close' | translate}}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateFilter, filter, 'bottom', true)">{{'labels.buttons.Back' | translate}}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();nextStep()">{{'labels.buttons.Next' | translate}}</button>
|
||||
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
|
||||
{{ 'labels.buttons.Close' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
(click)="popover.close(); showPopover(templateFilter, filter, 'bottom', true)"
|
||||
>
|
||||
{{ 'labels.buttons.Back' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close(); nextStep()">
|
||||
{{ 'labels.buttons.Next' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
Reference in New Issue
Block a user