Files
cbsnexora/src/app/groups/groups-view/group-actions/group-transfer-clients/group-transfer-clients.component.html
T

114 lines
4.6 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]="transferClientsForm">
<mat-card-content>
<div class="layout-column">
<mat-form-field>
<mat-label>{{ 'labels.inputs.Select Client Members for Transfer' | translate }}</mat-label>
<mat-select required formControlName="clients" multiple>
@for (member of clientMembers; track member) {
<mat-option [value]="{ id: member.id }">
{{ member.displayName }}
</mat-option>
}
</mat-select>
@if (transferClientsForm.controls.clients.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Select Client Members for Transfer' | translate }}
{{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-checkbox
class="m-t-10 m-b-10"
labelPosition="before"
formControlName="inheritDestinationGroupLoanOfficer"
>
{{ 'labels.inputs.Inherit Group Loan Officer' | translate }}?
</mat-checkbox>
<mat-form-field>
<mat-label>{{ 'labels.inputs.Destination Group' | translate }}</mat-label>
<input matInput formControlName="destinationGroupId" [matAutocomplete]="groupsAutocomplete" />
@if (transferClientsForm.controls.destinationGroupId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Destination Group' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
</div>
<mat-autocomplete autoActiveFirstOption #groupsAutocomplete="matAutocomplete" [displayWith]="displayGroup">
@for (group of groupsData; track group) {
<mat-option [value]="group">
{{ group.name }}
</mat-option>
}
</mat-autocomplete>
@if (transferClientsForm.get('destinationGroupId').value?.id) {
<div class="mat-table">
<div class="mat-header-row">
<div class="mat-header-cell">{{ 'labels.inputs.Destination Group Details' | translate }}</div>
</div>
<div class="mat-row">
<div class="mat-cell">{{ 'labels.inputs.name' | translate }}</div>
<div class="mat-cell">{{ transferClientsForm.get('destinationGroupId').value.name }}</div>
</div>
<div class="mat-row">
<div class="mat-cell">{{ 'labels.inputs.Id' | translate }}</div>
<div class="mat-cell">{{ transferClientsForm.get('destinationGroupId').value.id }}</div>
</div>
<div class="mat-row">
<div class="mat-cell">{{ 'labels.inputs.Activation Date' | translate }}</div>
<div class="mat-cell">
{{
(transferClientsForm.get('destinationGroupId').value.activationDate | dateFormat) || 'Not Activated'
}}
</div>
</div>
<div class="mat-row">
<div class="mat-cell">{{ 'labels.inputs.Staff' | translate }}</div>
<div class="mat-cell">
{{ transferClientsForm.get('destinationGroupId').value.staffName || 'Unassigned' }}
</div>
</div>
<div class="mat-row">
<div class="mat-cell">{{ 'labels.inputs.External Id' | translate }}</div>
<div class="mat-cell">
{{ transferClientsForm.get('destinationGroupId').value.externalId || 'Unassigned' }}
</div>
</div>
</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]="!transferClientsForm.valid"
(click)="submit()"
*mifosxHasPermission="'TRANSFERCLIENTS_GROUP'"
>
{{ 'labels.buttons.Submit' | translate }}
</button>
</mat-card-actions>
</form>
</mat-card>
</div>