Client views updated

This commit is contained in:
Jose Alberto Hernandez
2024-04-03 20:15:23 -06:00
committed by Jose Alberto Hernandez
parent 54dc91e0e2
commit e09fccf14b
10 changed files with 1059 additions and 1533 deletions
+954 -1437
View File
File diff suppressed because it is too large Load Diff
@@ -14,7 +14,7 @@
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Legal Form" | translate}}</mat-label>
<mat-select required formControlName="legalFormId">
<mat-option *ngFor="let legalForm of legalFormOptions" [value]="legalForm.id">
@@ -23,17 +23,13 @@
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Staff" | translate}}</mat-label>
<mat-select formControlName="staffId">
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
{{ staff.displayName }}
</mat-option>
</mat-select>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
<input matInput formControlName="externalId">
</mat-form-field>
<mat-form-field *ngIf="createClientForm.contains('fullname')" fxFlex="48%">
<mat-label>{{ createClientForm.value.legalFormId === 1 ? 'Name' : 'Entity Name' }}</mat-label>
<mat-label>{{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Name', 'Entity Name']) | translate }}</mat-label>
<input matInput required formControlName="fullname">
<mat-error *ngIf="createClientForm.controls.fullname.hasError('required')">
{{"labels.inputs.Client name" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
@@ -73,18 +69,15 @@
</mat-error>
</mat-form-field>
<mat-divider></mat-divider>
<mat-form-field fxFlex="48%" (click)="dateOfBirthDatePicker.open()">
<mat-label>{{ createClientForm.value.legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }}</mat-label>
<mat-label>{{ 'labels.inputs.' + getDateLabel(createClientForm.value.legalFormId, ['Date of Birth', 'Incorporation Date']) | translate }}</mat-label>
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth">
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
<input matInput formControlName="externalId">
</mat-form-field>
<div fxFlex="100%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" formGroupName="clientNonPersonDetails"
*ngIf="createClientForm.contains('clientNonPersonDetails')">
@@ -134,10 +127,21 @@
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Staff" | translate}}</mat-label>
<mat-select formControlName="staffId">
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
{{ staff.displayName }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox *ngIf="createClientForm.value.legalFormId === 1" fxFlex="48%" labelPosition="before" formControlName="isStaff" class="margin-v">
{{"labels.inputs.Is staff" | translate}}?
</mat-checkbox>
<mat-divider fxFlex="98%"></mat-divider>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Mobile No" | translate}}</mat-label>
<input matInput type="number" formControlName="mobileNo">
@@ -153,6 +153,10 @@ export class ClientGeneralStepComponent implements OnInit {
});
}
getDateLabel(legalFormId: number, values: string[]): string {
return legalFormId === 1 ? values[0] : values[1];
}
/**
* Client General Details
*/
@@ -60,6 +60,13 @@
</span>
</span>
<br />
<span *ngIf="clientViewData.mobileNo">
<b>{{"labels.inputs.Mobile Number" | translate}}:</b><mifosx-external-identifier externalId="{{clientViewData.mobileNo}}" completed="true"></mifosx-external-identifier><br />
</span>
<span *ngIf="clientViewData.emailAddress">
<b>{{"labels.inputs.Email" | translate}}:</b><mifosx-external-identifier externalId="{{clientViewData.emailAddress}}" completed="true"></mifosx-external-identifier><br />
</span>
<br />
</p>
</mat-card-subtitle>
+1 -1
View File
@@ -31,7 +31,7 @@
<!-- Account no Column -->
<ng-container matColumnDef="accountNumber">
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Account No" | translate}}. </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.inputs.Account No" | translate}}</th>
<td mat-cell *matCellDef="let row">
<mifosx-account-number display="left" accountNo="{{row.accountNumber}}"></mifosx-account-number>
</td>
@@ -8,7 +8,7 @@
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<mat-form-field fxFlex="48%">
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Office" | translate}}</mat-label>
<mat-select required formControlName="officeId">
<mat-option *ngFor="let office of officeOptions" [value]="office.id">
@@ -20,7 +20,7 @@
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Legal Form" | translate}}</mat-label>
<mat-select formControlName="legalFormId">
<mat-option *ngFor="let legalForm of legalFormOptions" [value]="legalForm.id">
@@ -29,22 +29,18 @@
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Account No" | translate}}</mat-label>
<input matInput formControlName="accountNo">
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Staff" | translate}}</mat-label>
<mat-select formControlName="staffId">
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
{{ staff.displayName }}
</mat-option>
</mat-select>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
<input matInput formControlName="externalId">
</mat-form-field>
<mat-form-field *ngIf="editClientForm.contains('fullname')" fxFlex="48%">
<mat-label>{{ legalFormId === 1 ? 'Name' : 'Entity Name' }}</mat-label>
<mat-label>{{ 'labels.inputs.' + getDateLabel(legalFormId, ['Name', 'Entity Name']) | translate }}</mat-label>
<input matInput required formControlName="fullname">
<mat-error *ngIf="editClientForm.controls.fullname.hasError('required')">
{{"labels.inputs.Client name" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
@@ -72,6 +68,15 @@
</mat-error>
</mat-form-field>
<mat-divider></mat-divider>
<mat-form-field fxFlex="48%" (click)="dateOfBirthDatePicker.open()">
<mat-label>{{ 'labels.inputs.' + getDateLabel(legalFormId, ['Date of Birth', 'Incorporation Date']) | translate }}</mat-label>
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth">
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
</mat-form-field>
<mat-form-field *ngIf="legalFormId === 1" fxFlex="48%">
<mat-label>{{"labels.inputs.Gender" | translate}}</mat-label>
<mat-select formControlName="genderId">
@@ -81,11 +86,13 @@
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="48%" (click)="dateOfBirthDatePicker.open()">
<mat-label>{{ legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }}</mat-label>
<input matInput [max]="maxDate" [matDatepicker]="dateOfBirthDatePicker" formControlName="dateOfBirth">
<mat-datepicker-toggle matSuffix [for]="dateOfBirthDatePicker"></mat-datepicker-toggle>
<mat-datepicker #dateOfBirthDatePicker></mat-datepicker>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Staff" | translate}}</mat-label>
<mat-select formControlName="staffId">
<mat-option *ngFor="let staff of staffOptions" [value]="staff.id">
{{ staff.displayName }}
</mat-option>
</mat-select>
</mat-form-field>
<div fxFlex="100%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" formGroupName="clientNonPersonDetails"
@@ -127,11 +134,6 @@
</mat-form-field>
</div>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
<input matInput formControlName="externalId">
</mat-form-field>
<mat-checkbox *ngIf="legalFormId === 1" fxFlex="48%" labelPosition="before" formControlName="isStaff" class="margin-v">
{{"labels.inputs.Is staff" | translate}}?
</mat-checkbox>
@@ -158,6 +158,10 @@ export class EditClientComponent implements OnInit {
});
}
getDateLabel(legalFormId: number, values: string[]): string {
return legalFormId === 1 ? values[0] : values[1];
}
/**
* Submits the edit client form.
*/
@@ -21,9 +21,7 @@ import { LoanTransactionType } from 'app/loans/models/loan-transaction-type.mode
export class TransactionsTabComponent implements OnInit {
/** Loan Details Data */
transactions: any;
/** Temporary Transaction Data */
tempTransaction: any;
transactionsData: LoanTransaction[] = [];
/** Form control to handle accural parameter */
hideAccrualsParam: UntypedFormControl;
hideReversedParam: UntypedFormControl;
@@ -51,8 +49,7 @@ export class TransactionsTabComponent implements OnInit {
private translateService: TranslateService,
private settingsService: SettingsService) {
this.route.parent.parent.data.subscribe((data: { loanDetailsData: any }) => {
this.transactions = data.loanDetailsData.transactions;
this.tempTransaction = data.loanDetailsData.transactions;
this.transactionsData = data.loanDetailsData.transactions;
this.status = data.loanDetailsData.status.value;
});
this.loanId = this.route.parent.parent.snapshot.params['loanId'];
@@ -61,24 +58,16 @@ export class TransactionsTabComponent implements OnInit {
ngOnInit() {
this.hideAccrualsParam = new UntypedFormControl(false);
this.hideReversedParam = new UntypedFormControl(false);
this.setLoanTransactions(this.transactions);
this.setLoanTransactions();
}
setLoanTransactions(transactions: any) {
this.transactions = transactions;
this.transactions.forEach((element: any) => {
setLoanTransactions() {
this.transactionsData.forEach((element: any) => {
element.date = this.dateUtils.parseDate(element.date);
});
this.dataSource = new MatTableDataSource(this.transactions);
this.dataSource = new MatTableDataSource(this.transactionsData);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
if (this.tempTransaction) {
this.tempTransaction.forEach((element: LoanTransaction) => {
if (this.isAccrual(element.type)) {
this.tempTransaction = this.removeItem(this.tempTransaction, element);
}
});
}
}
/**
@@ -93,11 +82,24 @@ export class TransactionsTabComponent implements OnInit {
}
hideAccruals() {
if (!this.hideAccrualsParam.value) {
this.dataSource = new MatTableDataSource(this.tempTransaction);
} else {
this.dataSource = new MatTableDataSource(this.transactions);
this.filterTransactions(this.hideReversedParam.value, !this.hideAccrualsParam.value);
}
hideReversed() {
this.filterTransactions(!this.hideReversedParam.value, this.hideAccrualsParam.value);
}
filterTransactions(hideReversed: boolean, hideAccrual: boolean): void {
let transactions: LoanTransaction[] = this.transactionsData;
if (hideAccrual || hideReversed) {
transactions = this.transactionsData.filter((t: LoanTransaction) => {
return (!(hideReversed && t.manuallyReversed) && !(hideAccrual && t.type.accrual));
});
}
this.dataSource = new MatTableDataSource(transactions);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
}
applyFilter(filterValue: string = '') {
@@ -275,25 +277,11 @@ export class TransactionsTabComponent implements OnInit {
.then(() => this.router.navigate([url]));
}
hideReversed() {
let transactions: LoanTransaction[] = this.transactions;
if (!this.hideReversedParam.value) {
transactions = [];
this.transactions.forEach((t: LoanTransaction) => {
if (!t.manuallyReversed) {
transactions.push(t);
}
});
}
this.dataSource = new MatTableDataSource(transactions);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
}
displaySubMenu(transaction: LoanTransaction): boolean {
if (this.isReAgoeOrReAmortize(transaction.type) && transaction.manuallyReversed) {
return false;
}
return true;
}
}
+21 -21
View File
@@ -311,7 +311,7 @@
"Applications": "Aplicaciones",
"Approve": "Aprobar",
"Apply Changes": "Aplicar cambios",
"Assign Staff": "Asignar personal",
"Assign Staff": "Asignar Asesor",
"Attach Meeting": "Adjuntar reunión",
"Attendance": "Asistencia",
"Back": "Atrás",
@@ -471,8 +471,8 @@
"Setup System": "Configuración de Sistema",
"Show more": "Mostrar más",
"Show less": "Muestra menos",
"Staff": "Personal",
"Staff Assignment History": "Historial de asignaciones de personal",
"Staff": "Asesor",
"Staff Assignment History": "Historial de asignaciones de asesor",
"Subledger Account": "Cuenta auxiliar",
"Submit": "Aceptar",
"Summary": "Resumen",
@@ -482,7 +482,7 @@
"Transaction Reverted": "Transacción revertida",
"Transfer Client": "Transferir cliente",
"Transfer Clients": "Transferir Clientes",
"Unassign Staff": "Desasignar personal",
"Unassign Staff": "Desasignar Asesor",
"Undo": "Deshacer",
"Undo Rejection": "Deshacer rechazo",
"Undo Transfer": "Deshacer transferencia",
@@ -606,7 +606,7 @@
"Clients": "Clientes",
"Closing Entries": "Entradas de cierre",
"Collateral Data": "Datos de garantias",
"Collateral Management": "Administracion de garantias",
"Collateral Management": "Administración de garantias",
"Collaterals Data": "Datos de garantías",
"Command": "Comando",
"Configuration Wizard": "Asistente de configuración",
@@ -871,7 +871,7 @@
"Tree View": "Vista de árbol",
"Two-Factor Configuration": "Configuración de dos factores",
"Unassign Role": "Desasignar rol",
"Unassign Staff": "Desasignar personal",
"Unassign Staff": "Desasignar Asesor",
"Undo": "Deshacer",
"Undo Transaction": "Deshacer transacción",
"Upcoming Charges": "Próximos cargos",
@@ -918,8 +918,8 @@
"Actions": "Acciones",
"Activated On": "Activado en",
"Activated On Date": "Activado en la fecha",
"Activation Date": "fecha de activacion",
"Activation date": "Fecha de activacion",
"Activation Date": "Fecha de activación",
"Activation date": "Fecha de activación",
"Active": "Activo",
"Active Client Borrowers": "Prestatarios de clientes activos",
"Active Client Loans": "Créditos para clientes activos",
@@ -995,7 +995,7 @@
"Associated Center": "Centro Asociado",
"Associated Office": "Oficina asociada",
"Associated Officer": "Oficial asociado",
"Associated Staff": "Personal Asociado",
"Associated Staff": "Asesor Asociado",
"Associated With": "Asociado con",
"At least": "Al menos",
"Attendance": "Asistencia",
@@ -1257,7 +1257,7 @@
"Effective Date": "Fecha efectiva",
"Effective From": "Válido desde",
"Email": "Correo electrónico",
"Email Address": "Dirección de correo electrónico",
"Email Address": "Correo electrónico",
"Email ID": "Id de correo",
"Email should be a": "El correo electrónico debe ser un",
"Enable installment level Delinquency": "Habilitar morosidad a nivel de cuotas",
@@ -1482,7 +1482,7 @@
"Is Topup Loan": "¿Es un Crédito de recarga?",
"Is Withhold Tax Applicable": "¿Se aplica la retención de impuestos?",
"Is job active": "¿Está activo el proceso?",
"Is staff": "es personal",
"Is staff": "¿Es personal",
"Is Zero Interest Rate?": "¿Es tasa de interés cero?",
"JLG Loan Application": "Solicitud de Crédito JLG",
"Job Name": "Nombre del proceso",
@@ -1612,8 +1612,8 @@
"Minimum gap between Installments": "Brecha mínima entre Cuotas",
"Mobile": "Móvil",
"Mobile Banking App": "Aplicación de banca móvil",
"Mobile No": "No móviles",
"Mobile Number": "Número de teléfono móvil",
"Mobile No": "Teléfono móvil",
"Mobile Number": "Teléfono móvil",
"Mobile Number for SMS": "Número de móvil para SMS",
"Monday": "Lunes",
"Monthly": "Mensual",
@@ -1665,12 +1665,12 @@
"Number of Installments": "Número de cuotas",
"Number of Repayments": "Número de reembolsos",
"Number of repayments by loan cycle": "Número de reembolsos por ciclo de préstamo",
"Number of Staff": "Numero de empleado",
"Number of Staff": "Numero de Empleado",
"Number of days a loan may be overdue before moving into arrears": "Número de días que un Crédito puede estar vencido antes de entrar en mora",
"Number of repayments": "Número de reembolsos",
"OTP": "OTP",
"Office": "Oficina",
"Office Name": "Nombre de la oficina",
"Office Name": "Oficina",
"Officer": "Oficial",
"Offices Charges/Fees": "Oficinas --> Comisiones/Tarifas",
"Offices Loan Products": "Oficinas --> Productos de Crédito",
@@ -1938,7 +1938,7 @@
"Show Closed Centers": "Mostrar Centros Cerrados",
"Show Closed Groups": "Mostrar grupos cerrados",
"Show Payment Details": "Mostrar detalles de pago",
"Staff": "Personal",
"Staff": "Asesor",
"Standing Instruction": "Instrucción permanente",
"Standing Instruction Type": "Tipo de instrucción permanente",
"Standing Instructions": "Instrucciones permanentes",
@@ -2154,8 +2154,8 @@
"Application Menu": "Menú de aplicaciones",
"Approve": "Aprobar",
"Assign Loan Officer": "Asignar oficial de Créditos",
"Assign Staff": "Asignar personal",
"Block Account": "Bloquear cuenta",
"Assign Staff": "Asignar Asesor",
"Block Account": "Bloquear Cuenta",
"Block Deposit": "Bloquear depósitos",
"Block Withdrawal": "Bloquear retiros",
"Breadcrumbs": "Migas de pan",
@@ -2264,7 +2264,7 @@
"Withdrawn": "Retirado"
},
"dialogContext": {
"Are you sure you want Unassign Staff": "¿Estás seguro de que deseas desasignar al personal?",
"Are you sure you want Unassign Staff": "¿Estás seguro de que deseas desasignar al asesor?",
"Are you sure you want to calculate interest ?": "¿Estás seguro de que deseas calcular los intereses?",
"Are you sure you want to post interest ?": "¿Estás seguro de que deseas contabilizar los intereses?",
"Enable withhold tax for this account ?": "¿Quieres habilitar la retención de impuestos para esta cuenta?",
@@ -2756,9 +2756,9 @@
"Two Factor Authentication": "Autenticación de dos factores",
"Two types of charges—fees and penalties": "Mifos admite dos tipos de cargos: comisiones y sanciones. Se cobran comisiones por los servicios, por ejemplo, cuotas de membresía, comisiones de desembolso de Créditos y comisiones de retiro. Se cobran sanciones para disuadir a los clientes de desviarse de los términos de un producto.",
"Two-factor authentication configuration": "Ajustes de configuración de autenticación de dos factores",
"Unassign Staff client": "¿Está seguro de que desea desasignar personal para este cliente?",
"Unassign Staff client": "¿Está seguro de que desea desasignar el asesor de este cliente?",
"Unassign role for client member": "¿Está seguro de que desea cancelar la asignación del rol del miembro cliente con ID?",
"Unassign staff for this group": "¿Estás seguro de que deseas desasignar personal para este grupo?",
"Unassign staff for this group": "¿Estás seguro de que desea desasignar el asesor de este grupo?",
"Unassigned": "No asignado",
"Undo approval of shares account with ID": "¿Está seguro de que desea deshacer la aprobación de la cuenta de acciones con ID?",
"Used Add Fund": "Este formulario se utilizará para agregar fondos. Si desea agregar fondos, haga clic en el botón Agregar fondos y complete el nombre del fondo, luego haga clic en el botón +; de lo contrario, haga clic en Siguiente o Atrás. Para más detalles haga clic",
+2 -2
View File
@@ -2,8 +2,8 @@
/* tslint:disable */
export default {
'mifos_x': {
'version': '231121',
'hash': 'f6edab0d'
'version': '240403',
'hash': '54dc91e0'
},
'allow_switching_backend_instance': true
};