feat: non-individual entity UI improvements — hide individual-only sections, fix legal form display, send extended fields to API
- Hide Family Members tab/section for non-individual entities in client view, create flow, and preview - Hide Financial & Classification section for non-individual entities in personal data and preview - Fix legal form column in clients list — fetch legalForm from client API for correct display - Add person/business icon before client name in list rows - Remove unsupportedNpd filter — send authorizedSignatory, additionalInfo, dateOfRegistration to API - Add registration number format hint (mat-hint) based on constitution type - Add spacing between verification row and constitution type dropdowns - Reduce table cell padding and prevent action buttons from being clipped - Add missing MPL-2.0 license headers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
ab01111424
commit
b890d24bb7
+86
-60
@@ -6,72 +6,98 @@
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<mat-card>
|
||||
<div #currencyFormRef class="currency-form-container">
|
||||
<form #formRef="ngForm" [formGroup]="currencyForm" class="layout-row gap-20px" (ngSubmit)="addCurrency()">
|
||||
<mat-form-field class="currency-search-field">
|
||||
<mat-label>{{ 'labels.inputs.Currency' | translate }}</mat-label>
|
||||
<mat-select required formControlName="currency">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search
|
||||
placeholderLabel="{{ placeHolderLabel }}"
|
||||
noEntriesFoundLabel="{{ noEntriesFoundLabel }}"
|
||||
[formControl]="filterFormCtrl"
|
||||
></ngx-mat-select-search>
|
||||
</mat-option>
|
||||
@for (currency of currencyData | async; track currency) {
|
||||
<mat-option [value]="currency"> ({{ currency.code }}) {{ currency.name }} </mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
@if (currencyForm.controls.currency.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<div class="mc-container">
|
||||
<!-- Header -->
|
||||
<div class="mc-header">
|
||||
<button mat-stroked-button [routerLink]="['../']" class="mc-back">
|
||||
<i class="fas fa-arrow-left"></i> {{ 'labels.heading.Currency Configuration' | translate }}
|
||||
</button>
|
||||
<h2 class="mc-header__title">{{ 'labels.buttons.Add/Edit' | translate }}</h2>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
mat-raised-button
|
||||
class="add-currency-button"
|
||||
color="primary"
|
||||
[disabled]="!currencyForm.valid"
|
||||
[attr.aria-label]="'labels.buttons.Add Currency' | translate"
|
||||
[title]="'labels.buttons.Add Currency' | translate"
|
||||
*mifosxHasPermission="'UPDATE_CURRENCY'"
|
||||
>
|
||||
<fa-icon icon="plus"></fa-icon>
|
||||
</button>
|
||||
</form>
|
||||
<!-- Card -->
|
||||
<div class="mc-card">
|
||||
<!-- Add Currency Section -->
|
||||
<div class="mc-section">
|
||||
<div class="mc-section__header">
|
||||
<i class="fas fa-plus-circle"></i>
|
||||
<h3>{{ 'labels.buttons.Add Currency' | translate }}</h3>
|
||||
</div>
|
||||
<div class="mc-add" #currencyFormRef>
|
||||
<form #formRef="ngForm" [formGroup]="currencyForm" (ngSubmit)="addCurrency()" class="mc-add__form">
|
||||
<mat-form-field appearance="outline" class="mc-add__field">
|
||||
<mat-label>{{ 'labels.inputs.Currency' | translate }}</mat-label>
|
||||
<mat-select required formControlName="currency">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search
|
||||
placeholderLabel="{{ placeHolderLabel }}"
|
||||
noEntriesFoundLabel="{{ noEntriesFoundLabel }}"
|
||||
[formControl]="filterFormCtrl"
|
||||
></ngx-mat-select-search>
|
||||
</mat-option>
|
||||
@for (currency of currencyData | async; track currency) {
|
||||
<mat-option [value]="currency"> ({{ currency.code }}) {{ currency.name }} </mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
@if (currencyForm.controls.currency.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
mat-flat-button
|
||||
color="primary"
|
||||
class="mc-add__btn"
|
||||
[disabled]="!currencyForm.valid"
|
||||
[attr.aria-label]="'labels.buttons.Add Currency' | translate"
|
||||
[title]="'labels.buttons.Add Currency' | translate"
|
||||
*mifosxHasPermission="'UPDATE_CURRENCY'"
|
||||
>
|
||||
<i class="fas fa-plus"></i> Add
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-grid-list cols="2" rowHeight="50px">
|
||||
@for (currency of selectedCurrencies; track currency; let i = $index) {
|
||||
<mat-grid-tile class="grid-tile-content">
|
||||
<div class="grid-container">
|
||||
<div>
|
||||
<button
|
||||
type="button"
|
||||
mat-button
|
||||
color="warn"
|
||||
(click)="deleteCurrency(currency.code, i)"
|
||||
[attr.aria-label]="'labels.buttons.Delete' | translate"
|
||||
[title]="'labels.buttons.Delete' | translate"
|
||||
*mifosxHasPermission="'UPDATE_CURRENCY'"
|
||||
>
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
</button>
|
||||
<!-- Selected Currencies Section -->
|
||||
<div class="mc-section">
|
||||
<div class="mc-section__header">
|
||||
<i class="fas fa-coins"></i>
|
||||
<h3>Selected Currencies</h3>
|
||||
</div>
|
||||
<div class="mc-list">
|
||||
@for (currency of selectedCurrencies; track currency; let i = $index) {
|
||||
<div class="mc-currency">
|
||||
<div class="mc-currency__info">
|
||||
<span class="mc-currency__code">{{ currency.code }}</span>
|
||||
<span class="mc-currency__name">{{ currency.name }}</span>
|
||||
</div>
|
||||
<span class="label m-l-10 p-t-5"
|
||||
><b>{{ currency.name }}</b></span
|
||||
<button
|
||||
type="button"
|
||||
mat-icon-button
|
||||
class="mc-currency__delete"
|
||||
(click)="deleteCurrency(currency.code, i)"
|
||||
[attr.aria-label]="'labels.buttons.Delete' | translate"
|
||||
[title]="'labels.buttons.Delete' | translate"
|
||||
*mifosxHasPermission="'UPDATE_CURRENCY'"
|
||||
>
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</mat-grid-tile>
|
||||
}
|
||||
</mat-grid-list>
|
||||
</mat-card>
|
||||
}
|
||||
@if (!selectedCurrencies || selectedCurrencies.length === 0) {
|
||||
<div class="mc-empty">
|
||||
<i class="fas fa-coins"></i>
|
||||
<p>No currencies selected</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #templateCurrencyFormRef let-popover="popover">
|
||||
|
||||
Reference in New Issue
Block a user