Files
cbsnexora/src/app/accounting/financial-activity-mappings/create-financial-activity-mapping/create-financial-activity-mapping.component.html
T

58 lines
2.2 KiB
HTML

<!--
Copyright since 2025 Mifos Initiative
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="container">
<mat-card>
<form [formGroup]="financialActivityMappingForm" (ngSubmit)="submit()">
<mat-card-content>
<div class="layout-column">
<mat-form-field>
<mat-label>{{ 'labels.inputs.Financial Activity' | translate }}</mat-label>
<mat-select required formControlName="financialActivityId">
@for (financialActivity of financialActivityData; track financialActivity) {
<mat-option [value]="financialActivity.id">
({{ financialActivity.id }})
{{ 'labels.accounting.financialActivity.' + financialActivity.name | translate }}
</mat-option>
}
</mat-select>
@if (financialActivityMappingForm.controls.financialActivityId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Financial Activity' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mifosx-gl-account-selector
[inputFormControl]="financialActivityMappingForm.controls.glAccountId"
[glAccountList]="glAccountData"
[required]="true"
[inputLabel]="'Account'"
>
</mifosx-gl-account-selector>
</div>
</mat-card-content>
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
<button type="button" mat-raised-button [routerLink]="['../']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button
mat-raised-button
color="primary"
[disabled]="!financialActivityMappingForm.valid"
*mifosxHasPermission="'CREATE_FINANCIALACTIVITYACCOUNT'"
>
{{ 'labels.buttons.Submit' | translate }}
</button>
</mat-card-actions>
</form>
</mat-card>
</div>