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,7 +1,5 @@
<div class="container">
<mat-horizontal-stepper class="mat-elevation-z8" labelPosition="bottom" #smsCampaignStepper>
<ng-template matStepperIcon="number">
<fa-icon icon="pencil-alt" size="sm"></fa-icon>
</ng-template>
@@ -23,19 +21,16 @@
</ng-template>
<mat-step [stepControl]="smsCampaignForm">
<ng-template matStepLabel>{{ 'labels.inputs.CAMPAIGN' | translate }}</ng-template>
<mifosx-sms-campaign-step
<mifosx-sms-campaign-step
[smsCampaignTemplate]="smsCampaignTemplate"
(templateParameters)="setParameters($event)"
>
</mifosx-sms-campaign-step>
</mat-step>
<mat-step>
<ng-template matStepLabel>{{ 'labels.inputs.MESSAGE' | translate }}</ng-template>
<mifosx-campaign-message-step
@@ -43,21 +38,17 @@
[smsCampaignFormValid]="smsCampaignForm.valid"
>
</mifosx-campaign-message-step>
</mat-step>
<mat-step state="preview" *ngIf="smsCampaignForm.valid" completed>
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
<mifosx-campaign-preview-step
<mifosx-campaign-preview-step
[smsCampaignTemplate]="smsCampaignTemplate"
[campaign]="smsCampaign" (submitEvent)="submit()"
[campaign]="smsCampaign"
(submitEvent)="submit()"
>
</mifosx-campaign-preview-step>
</mat-step>
</mat-horizontal-stepper>
</div>
@@ -1,7 +1,5 @@
<div class="container">
<mat-horizontal-stepper class="mat-elevation-z8" labelPosition="bottom" #smsCampaignStepper>
<ng-template matStepperIcon="number">
<fa-icon icon="pencil-alt" size="sm"></fa-icon>
</ng-template>
@@ -23,43 +21,36 @@
</ng-template>
<mat-step completed>
<ng-template matStepLabel>{{ 'labels.inputs.CAMPAIGN' | translate }}</ng-template>
<mifosx-edit-sms-campaign-step
<mifosx-edit-sms-campaign-step
[smsCampaign]="smsCampaign"
[smsCampaignTemplate]="smsCampaignTemplate"
(templateParameters)="setParameters($event)"
>
</mifosx-edit-sms-campaign-step>
</mat-step>
<mat-step>
<ng-template matStepLabel>{{ 'labels.inputs.MESSAGE' | translate }}</ng-template>
<mifosx-campaign-message-step
<mifosx-campaign-message-step
[templateParameters]="templateParameters"
[editCampaignMessage]="smsCampaign.campaignMessage"
>
</mifosx-campaign-message-step>
</mat-step>
<mat-step state="preview" completed>
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
<mifosx-campaign-preview-step
[campaign]="smsCampaign"
[editedCampaignMessage]="campaignMessage"
[smsCampaignTemplate]="smsCampaignTemplate" (submitEvent)="submit()"
[smsCampaignTemplate]="smsCampaignTemplate"
(submitEvent)="submit()"
>
</mifosx-campaign-preview-step>
</mat-step>
</mat-horizontal-stepper>
</div>
@@ -1,15 +1,19 @@
<div fxLayout="column">
<mat-form-field fxFlex="98%">
<mat-label>{{'labels.inputs.Campaign Message' | translate }}</mat-label>
<mat-label>{{ 'labels.inputs.Campaign Message' | translate }}</mat-label>
<textarea matInput [formControl]="message"></textarea>
</mat-form-field>
<h3 fxFlex="98%" class="mat-h3">{{'labels.heading.Template Parameters' | translate }}</h3>
<h3 fxFlex="98%" class="mat-h3">{{ 'labels.heading.Template Parameters' | translate }}</h3>
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutAlign="center">
<button mat-stroked-button color="primary" class="parameter"
*ngFor="let label of parameterLabels" (click)="addText(label)">
<button
mat-stroked-button
color="primary"
class="parameter"
*ngFor="let label of parameterLabels"
(click)="addText(label)"
>
{{ label }}
</button>
</div>
@@ -17,12 +21,11 @@
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{'labels.buttons.Previous' | translate }}
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext [disabled]="!smsCampaignFormValid">
{{'labels.buttons.Next' | translate }}
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
</div>
</div>
@@ -1,37 +1,34 @@
<div class="tab-content mat-typography">
<mat-list>
<mat-list-item> {{ 'labels.inputs.Campaign Name' | translate }} : {{ campaign.campaignName }} </mat-list-item>
<mat-list-item>
{{ 'labels.inputs.Campaign Name' | translate }} : {{ campaign.campaignName }}
{{ 'labels.inputs.SMS Provider' | translate }} :
{{ (campaign.providerId | find: smsProviders : 'id' : 'name') || 'Unassigned' }}
</mat-list-item>
<mat-list-item>
{{ 'labels.inputs.SMS Provider' | translate }} : {{ (campaign.providerId | find:smsProviders:'id':'name') || "Unassigned" }}
{{ 'labels.inputs.Trigger Type' | translate }} :
{{ (campaign.editFlag ? campaign.triggerType.id : campaign.triggerType) | find: triggerTypes : 'id' : 'value' }}
</mat-list-item>
<mat-list-item>
{{ 'labels.inputs.Trigger Type' | translate }} : {{ (campaign.editFlag ? campaign.triggerType.id : campaign.triggerType) | find:triggerTypes:'id':'value' }}
</mat-list-item>
<mat-list-item>
{{ 'labels.inputs.Bussiness Rule' | translate }} : {{ campaign.editFlag ? campaign.reportName : campaign.paramValue?.reportName }}
{{ 'labels.inputs.Bussiness Rule' | translate }} :
{{ campaign.editFlag ? campaign.reportName : campaign.paramValue?.reportName }}
</mat-list-item>
<div fxLayout="column" fxLayoutGap="10px" class="template-message">
<h3>{{ 'labels.heading.Campaign Message' | translate }} :</h3>
<textarea matInput disabled>{{ campaign.editFlag ? editedCampaignMessage : campaign.message }}</textarea>
</div>
</mat-list>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button [routerLink]="['../']">
{{'labels.buttons.Cancel' | translate }}
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button mat-raised-button color="primary" (click)="submitEvent.emit()">
{{'labels.buttons.Submit' | translate }}
{{ 'labels.buttons.Submit' | translate }}
</button>
</div>
</div>
@@ -1,65 +1,64 @@
<div fxLayout="column">
<mat-divider fxFlex="98%"></mat-divider>
<h3 fxFlex="98%" class="mat-h3">{{'labels.heading.Business Rule Parameters' | translate }}</h3>
<h3 fxFlex="98%" class="mat-h3">{{ 'labels.heading.Business Rule Parameters' | translate }}</h3>
<form [formGroup]="ReportForm">
<div fxLayout="row wrap" fxLayoutGap="2%">
<ng-container *ngFor="let param of paramData" [ngSwitch]="param.displayType">
<ng-container *ngFor="let param of paramData" [ngSwitch]="param.displayType">
<ng-container *ngIf="ReportForm.controls[param.name]">
<mat-form-field fxFlex="48%" *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="48%" *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="48%" *ngSwitchCase="'select'">
<mat-label>{{param.label}}</mat-label>
<mat-label>{{ param.label }}</mat-label>
<mat-select required [formControlName]="param.name" [compareWith]="compareOptions">
<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>
</div>
</form>
</div>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious disabled>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{'labels.buttons.Previous' | translate }}
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext>
{{'labels.buttons.Next' | translate }}
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
</div>
@@ -1,12 +1,11 @@
<form [formGroup]="smsCampaignDetailsForm">
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" fxLayoutAlign.gt-sm="start center">
<mat-form-field fxFlex="48%">
<mat-label>{{ 'labels.inputs.Campaign Name' | translate }}</mat-label>
<input matInput formControlName="campaignName" required>
<input matInput formControlName="campaignName" required />
<mat-error>
{{ 'labels.inputs.Campaign Name' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Campaign Name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
@@ -27,7 +26,8 @@
</mat-option>
</mat-select>
<mat-error>
{{ 'labels.inputs.Trigger Type' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Trigger Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
@@ -35,14 +35,25 @@
{{ 'labels.inputs.Is Notification' | translate }}?
</mat-checkbox>
<mat-form-field fxFlex="48%" *ngIf="smsCampaignDetailsForm.controls.recurrenceStartDate" (click)="recurrenceStartDatePicker.open()">
<mat-form-field
fxFlex="48%"
*ngIf="smsCampaignDetailsForm.controls.recurrenceStartDate"
(click)="recurrenceStartDatePicker.open()"
>
<mat-label>{{ 'labels.inputs.Schedule Date' | translate }}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="recurrenceStartDatePicker"
formControlName="recurrenceStartDate" required>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="recurrenceStartDatePicker"
formControlName="recurrenceStartDate"
required
/>
<mat-datepicker-toggle matSuffix [for]="recurrenceStartDatePicker"></mat-datepicker-toggle>
<mat-datepicker #recurrenceStartDatePicker></mat-datepicker>
<mat-error>
{{ 'labels.inputs.Schedule Date' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Schedule Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
@@ -54,14 +65,16 @@
</mat-option>
</mat-select>
<mat-error>
{{ 'labels.inputs.Business Rule' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Business Rule' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
</div>
<mifosx-edit-business-rule-parameters [paramData]="paramData" [smsCampaign]="smsCampaign"
(templateParameters)="passParameters($event)">
<mifosx-edit-business-rule-parameters
[paramData]="paramData"
[smsCampaign]="smsCampaign"
(templateParameters)="passParameters($event)"
>
</mifosx-edit-business-rule-parameters>
</form>
@@ -1,61 +1,65 @@
<div fxLayout="column">
<mat-divider fxFlex="98%"></mat-divider>
<h3 fxFlex="98%" class="mat-h3">{{ 'labels.heading.Business Rule Parameters' | translate }}</h3>
<form [formGroup]="ReportForm">
<div fxLayout="row wrap" fxLayoutGap="2%">
<ng-container *ngFor="let param of paramData" [ngSwitch]="param.displayType">
<ng-container *ngFor="let param of paramData" [ngSwitch]="param.displayType">
<ng-container *ngIf="ReportForm.contains(param.name)">
<mat-form-field fxFlex="48%" *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="48%" *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="48%" *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>
</div>
</form>
</div>
<div class="margin-t" fxLayoutAlign="center">
<button mat-raised-button matStepperNext color="primary" (click)="getResponseHeaders()"
[disabled]="!this.ReportForm.valid">
<button
mat-raised-button
matStepperNext
color="primary"
(click)="getResponseHeaders()"
[disabled]="!this.ReportForm.valid"
>
{{ 'labels.buttons.Get Parameters' | translate }}
</button>
</div>
@@ -1,17 +1,15 @@
<form [formGroup]="smsCampaignDetailsForm">
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" fxLayoutAlign.gt-sm="start center">
<mat-form-field fxFlex="48%">
<mat-label>{{ 'labels.inputs.Campaign Name' | translate }}</mat-label>
<input matInput formControlName="campaignName" required>
<input matInput formControlName="campaignName" required />
<mat-error>
{{ 'labels.inputs.Campaign Name' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Campaign Name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%"
*ngIf="!smsCampaignDetailsForm.controls.isNotification.value">
<mat-form-field fxFlex="48%" *ngIf="!smsCampaignDetailsForm.controls.isNotification.value">
<mat-label>{{ 'labels.inputs.SMS Provider' | translate }}</mat-label>
<mat-select formControlName="providerId">
<mat-option *ngFor="let provider of smsProviders" [value]="provider.id">
@@ -28,7 +26,8 @@
</mat-option>
</mat-select>
<mat-error>
{{ 'labels.inputs.Trigger Type' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Trigger Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
@@ -36,20 +35,29 @@
{{ 'labels.inputs.Is Notification' | translate }}?
</mat-checkbox>
<mat-form-field fxFlex="48%"
*ngIf="smsCampaignDetailsForm.contains('recurrenceStartDate')" (click)="recurrenceStartDatePicker.open()">
<mat-form-field
fxFlex="48%"
*ngIf="smsCampaignDetailsForm.contains('recurrenceStartDate')"
(click)="recurrenceStartDatePicker.open()"
>
<mat-label>{{ 'labels.inputs.Schedule Date' | translate }}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="recurrenceStartDatePicker"
formControlName="recurrenceStartDate" required>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="recurrenceStartDatePicker"
formControlName="recurrenceStartDate"
required
/>
<mat-datepicker-toggle matSuffix [for]="recurrenceStartDatePicker"></mat-datepicker-toggle>
<mat-datepicker #recurrenceStartDatePicker></mat-datepicker>
<mat-error>
{{ 'labels.inputs.Schedule Date' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Schedule Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%"
*ngIf="smsCampaignDetailsForm.contains('frequency')">
<mat-form-field fxFlex="48%" *ngIf="smsCampaignDetailsForm.contains('frequency')">
<mat-label>{{ 'labels.inputs.Repeats' | translate }}</mat-label>
<mat-select formControlName="frequency" required>
<mat-option [value]="1">{{ 'labels.inputs.Daily' | translate }}</mat-option>
@@ -58,12 +66,12 @@
<mat-option [value]="4">{{ 'labels.inputs.Yearly' | translate }}</mat-option>
</mat-select>
<mat-error>
{{ 'labels.inputs.Repetition Frequency' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Repetition Frequency' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%"
*ngIf="smsCampaignDetailsForm.contains('interval')">
<mat-form-field fxFlex="48%" *ngIf="smsCampaignDetailsForm.contains('interval')">
<mat-label>{{ 'labels.inputs.Repetition Interval' | translate }}</mat-label>
<mat-select formControlName="interval" required>
<mat-option *ngFor="let interval of repetitionIntervals" [value]="interval">
@@ -71,12 +79,12 @@
</mat-option>
</mat-select>
<mat-error>
{{ 'labels.inputs.Repetition Interval' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Repetition Interval' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%"
*ngIf="smsCampaignDetailsForm.contains('repeatsOnDay')">
<mat-form-field fxFlex="48%" *ngIf="smsCampaignDetailsForm.contains('repeatsOnDay')">
<mat-label>{{ 'labels.inputs.Repeats on Day' | translate }}</mat-label>
<mat-select formControlName="repeatsOnDay" required>
<mat-option value="1">{{ 'labels.inputs.Monday' | translate }}</mat-option>
@@ -88,8 +96,8 @@
<mat-option value="7">{{ 'labels.inputs.Sunday' | translate }}</mat-option>
</mat-select>
<mat-error>
{{"labels.inputs.At least" |translate}} <strong>{{"labels.inputs.one" |translate}}</strong> {{"labels.inputs.day must be selected" |translate}}
{{ 'labels.inputs.At least' | translate }} <strong>{{ 'labels.inputs.one' | translate }}</strong>
{{ 'labels.inputs.day must be selected' | translate }}
</mat-error>
</mat-form-field>
@@ -101,14 +109,20 @@
</mat-option>
</mat-select>
<mat-error>
{{ 'labels.inputs.Business Rule' | translate }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
{{ 'labels.inputs.Business Rule' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
</div>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%"
*ngIf="!smsCampaignDetailsForm.controls.runReportId.value">
<div
fxLayout="row"
class="margin-t"
fxLayout.xs="column"
fxLayoutAlign="center"
fxLayoutGap="2%"
*ngIf="!smsCampaignDetailsForm.controls.runReportId.value"
>
<button mat-raised-button matStepperPrevious disabled>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Previous' | translate }}
@@ -125,5 +139,4 @@
(templateParameters)="passParameters($event)"
>
</mifosx-business-rule-parameters>
</form>
@@ -1,66 +1,63 @@
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end" fxLayoutGap="20px">
<button mat-raised-button color="primary" [routerLink]="['create']" *mifosxHasPermission="'CREATE_SMSCAMPAIGN'">
<fa-icon icon="plus" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Create SMS Campaign' | translate }}
</button>
</div>
<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-container">
<table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="campaignName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.name' | translate }} </th>
<td mat-cell *matCellDef="let smsCampaign"> {{ smsCampaign.campaignName }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let smsCampaign">{{ smsCampaign.campaignName }}</td>
</ng-container>
<ng-container matColumnDef="campaignMessage">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Template Message' | translate }} </th>
<td mat-cell *matCellDef="let smsCampaign"> {{ smsCampaign.campaignMessage }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Template Message' | translate }}</th>
<td mat-cell *matCellDef="let smsCampaign">{{ smsCampaign.campaignMessage }}</td>
</ng-container>
<ng-container matColumnDef="campaignType.value">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Campaign Type' | translate }} </th>
<td mat-cell *matCellDef="let smsCampaign"> {{ smsCampaign.campaignType.value }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Campaign Type' | translate }}</th>
<td mat-cell *matCellDef="let smsCampaign">{{ smsCampaign.campaignType.value }}</td>
</ng-container>
<ng-container matColumnDef="triggerType.value">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Trigger Type' | translate }} </th>
<td mat-cell *matCellDef="let smsCampaign"> {{ smsCampaign.triggerType.value }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Trigger Type' | translate }}</th>
<td mat-cell *matCellDef="let smsCampaign">{{ smsCampaign.triggerType.value }}</td>
</ng-container>
<ng-container matColumnDef="campaignStatus.value">
<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 smsCampaign">
<div [className]="smsCampaign.campaignStatus.code | statusLookup">
<fa-icon matTooltip="{{ smsCampaign.campaignStatus.value | titlecase }}" matTooltipPosition="right" icon="circle" size="lg"></fa-icon>
<fa-icon
matTooltip="{{ smsCampaign.campaignStatus.value | titlecase }}"
matTooltipPosition="right"
icon="circle"
size="lg"
></fa-icon>
</div>
</td>
</ng-container>
<ng-container matColumnDef="smsCampaignTimeLine.submittedByUsername">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Approved By' | translate }} </th>
<td mat-cell *matCellDef="let smsCampaign"> {{ smsCampaign.smsCampaignTimeLine.submittedByUsername }} </td>
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Approved By' | translate }}</th>
<td mat-cell *matCellDef="let smsCampaign">{{ smsCampaign.smsCampaignTimeLine.submittedByUsername }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row" [routerLink]="[row.id]"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" class="select-row" [routerLink]="[row.id]"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
</div>
@@ -1,51 +1,54 @@
<div class="container">
<div fxLayout="row" fxLayoutGap="1%" fxLayoutAlign="flex-end" class="action-buttons m-b-20">
<span *ngIf="smsCampaignData.campaignStatus.value !== 'active'">
<button mat-raised-button color="primary" *mifosxHasPermission="'UPDATE_SMSCAMPAIGN'" [routerLink]="['edit']">
<fa-icon icon="edit" class="m-r-10"></fa-icon>{{'labels.buttons.Edit' | translate }}
<fa-icon icon="edit" class="m-r-10"></fa-icon>{{ 'labels.buttons.Edit' | translate }}
</button>
</span>
<span *ngIf="smsCampaignData.campaignStatus.value === 'Pending'">
<button mat-raised-button color="accent" *mifosxHasPermission="'ACTIVATE_SMSCAMPAIGN'" (click)="activateCampaign()">
<fa-icon icon="lock-open" class="m-r-10"></fa-icon>{{'labels.buttons.Activate' | translate }}
<button
mat-raised-button
color="accent"
*mifosxHasPermission="'ACTIVATE_SMSCAMPAIGN'"
(click)="activateCampaign()"
>
<fa-icon icon="lock-open" class="m-r-10"></fa-icon>{{ 'labels.buttons.Activate' | translate }}
</button>
</span>
<span *ngIf="smsCampaignData.campaignStatus.value !== 'closed'">
<button mat-raised-button color="warn" *mifosxHasPermission="'CLOSE_SMSCAMPAIGN'" (click)="closeCampaign()">
<fa-icon icon="times" class="m-r-10"></fa-icon>{{'labels.buttons.Close' | translate }}
<fa-icon icon="times" class="m-r-10"></fa-icon>{{ 'labels.buttons.Close' | translate }}
</button>
</span>
<span *ngIf="smsCampaignData.campaignStatus.value !== 'Pending' && smsCampaignData.campaignStatus.value !== 'active'">
<button mat-raised-button color="accent" *mifosxHasPermission="'REACTIVATE_SMSCAMPAIGN'" (click)="reactivateCampaign()">
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{'labels.buttons.Reactivate' | translate }}
<span
*ngIf="smsCampaignData.campaignStatus.value !== 'Pending' && smsCampaignData.campaignStatus.value !== 'active'"
>
<button
mat-raised-button
color="accent"
*mifosxHasPermission="'REACTIVATE_SMSCAMPAIGN'"
(click)="reactivateCampaign()"
>
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{ 'labels.buttons.Reactivate' | translate }}
</button>
</span>
<span *ngIf="smsCampaignData.campaignStatus.value === 'closed'">
<button mat-raised-button color="warn" *mifosxHasPermission="'DELETE_SMSCAMPAIGN'" (click)="deleteCampaign()">
<fa-icon icon="trash" class="m-r-10"></fa-icon>{{'labels.buttons.Delete' | translate }}
<fa-icon icon="trash" class="m-r-10"></fa-icon>{{ 'labels.buttons.Delete' | translate }}
</button>
</span>
</div>
<mat-card class="sms-card">
<mat-card-content>
<mat-tab-group (selectedTabChange)="onTabChange($event)">
<mat-tab label="Campaign">
<div class="tab-content mat-typography">
<mat-list>
<mat-list-item>
{{ 'labels.inputs.Campaign Name' | translate }} : {{ smsCampaignData.campaignName }}
</mat-list-item>
@@ -63,7 +66,8 @@
</mat-list-item>
<mat-list-item>
{{ 'labels.inputs.Submitted on' | translate }} : {{ smsCampaignData.smsCampaignTimeLine.submittedOnDate | dateFormat }}
{{ 'labels.inputs.Submitted on' | translate }} :
{{ smsCampaignData.smsCampaignTimeLine.submittedOnDate | dateFormat }}
</mat-list-item>
<mat-list-item *ngIf="smsCampaignData.recurrence">
@@ -71,81 +75,78 @@
</mat-list-item>
<div fxLayout="column" fxLayoutGap="10px" class="template-message">
<h3>{{'labels.heading.Template Message' | translate }} :</h3>
<textarea matInput disabled>{{ smsCampaignData.campaignMessage}}</textarea>
<h3>{{ 'labels.heading.Template Message' | translate }} :</h3>
<textarea matInput disabled>{{ smsCampaignData.campaignMessage }}</textarea>
</div>
</mat-list>
</div>
</mat-tab>
<mat-tab *ngFor = "let tab of smsTabs" [label]="tab.label">
<mat-tab *ngFor="let tab of smsTabs" [label]="tab.label">
<div class="tab-content mat-typography">
<form [formGroup]="smsForm" (ngSubmit)="search()">
<div fxLayout="row" fxLayoutGap="3%" fxLayoutAlign="center">
<mat-form-field (click)="fromDatePicker.open()">
<mat-label>{{ 'labels.inputs.From Date' | translate }}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="fromDatePicker" formControlName="fromDate">
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="fromDatePicker"
formControlName="fromDate"
/>
<mat-datepicker-toggle matSuffix [for]="fromDatePicker"></mat-datepicker-toggle>
<mat-datepicker #fromDatePicker></mat-datepicker>
</mat-form-field>
<mat-form-field (click)="toDatePicker.open()">
<mat-label>{{ 'labels.inputs.To Date' | translate }}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="toDatePicker" formControlName="toDate">
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="toDatePicker"
formControlName="toDate"
/>
<mat-datepicker-toggle matSuffix [for]="toDatePicker"></mat-datepicker-toggle>
<mat-datepicker #toDatePicker></mat-datepicker>
</mat-form-field>
<div class="search-button" >
<div class="search-button">
<button mat-raised-button color="primary">
<fa-icon icon="search" class="m-r-10"></fa-icon>{{'labels.buttons.Search' | translate }}</button>
<fa-icon icon="search" class="m-r-10"></fa-icon>{{ 'labels.buttons.Search' | translate }}
</button>
</div>
</div>
</form>
<table #messageTable mat-table [dataSource]="dataSource" class="mat-elevation-z1 m-b-25">
<ng-container matColumnDef="Message">
<th mat-header-cell *matHeaderCellDef> {{ 'labels.inputs.Message' | translate }} </th>
<td mat-cell *matCellDef="let sms">{{sms.message}}</td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Message' | translate }}</th>
<td mat-cell *matCellDef="let sms">{{ sms.message }}</td>
</ng-container>
<ng-container matColumnDef="Status">
<th mat-header-cell *matHeaderCellDef> {{ 'labels.inputs.Status' | translate }} </th>
<td mat-cell *matCellDef="let sms">{{sms.status.value}}</td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Status' | translate }}</th>
<td mat-cell *matCellDef="let sms">{{ sms.status.value }}</td>
</ng-container>
<ng-container matColumnDef="Mobile No.">
<th mat-header-cell *matHeaderCellDef> {{ 'labels.inputs.Mobile No' | translate }}. </th>
<td mat-cell *matCellDef="let sms">{{sms.mobileNo}} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Mobile No' | translate }}.</th>
<td mat-cell *matCellDef="let sms">{{ sms.mobileNo }}</td>
</ng-container>
<ng-container matColumnDef="Campaign Name">
<th mat-header-cell *matHeaderCellDef> {{ 'labels.inputs.Campaign Name' | translate }} </th>
<td mat-cell *matCellDef="let sms">{{sms.campaignName}}</td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Campaign Name' | translate }}</th>
<td mat-cell *matCellDef="let sms">{{ sms.campaignName }}</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>
</div>
</mat-tab>
</mat-tab-group>
</mat-card-content>
</mat-card>
</div>