translated the heading of the dialogBox in .ts files

This commit is contained in:
Pushpendra Kumar
2023-12-13 21:41:02 +01:00
committed by Adam Saghy
parent 9766644fb8
commit 21dc452e36
31 changed files with 216 additions and 46 deletions
@@ -140,7 +140,7 @@ export class ChargesTabComponent implements OnInit {
* @param {any} chargeId Charge Id
*/
waiveCharge(chargeId: any) {
const waiveChargeDialogRef = this.dialog.open(ConfirmationDialogComponent, { data: { heading: 'Waive Charge', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to waive charge with id') + `${chargeId} ?`, type: 'Basic' } });
const waiveChargeDialogRef = this.dialog.open(ConfirmationDialogComponent, { data: { heading: this.translateService.instant('labels.heading.Waive Charge'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to waive charge with id') + `${chargeId} ?`, type: 'Basic' } });
waiveChargeDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
this.loansService.executeLoansAccountChargesCommand(this.loanDetails.id, 'waive', {}, chargeId)
@@ -118,7 +118,7 @@ export class EditRepaymentScheduleComponent implements OnInit {
reset(): void {
const recoverScheduleDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Recover Original Schedule', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want recover the Original Schedule') }
data: { heading: this.translateService.instant('labels.heading.Recover Original Schedule'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want recover the Original Schedule') }
});
recoverScheduleDialogRef.afterClosed().subscribe((responseConfirmation: any) => {
if (responseConfirmation.confirm) {
@@ -90,7 +90,7 @@ export class LoanDelinquencyTagsTabComponent implements OnInit {
resumeDelinquencyClassification(item: LoanDelinquencyAction): void {
const removePauseDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: {
heading: 'Loan Delinquency Classification',
heading: this.translateService.instant('labels.heading.Loan Delinquency Classification'),
dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want resume the Delinquency Classification for Loan') + this.loanId,
type: 'Mild'
}
@@ -49,11 +49,11 @@ export class LoansViewComponent implements OnInit {
currency: Currency;
constructor(private route: ActivatedRoute,
private router: Router,
public loansService: LoansService,
private translateService:TranslateService,
public dialog: MatDialog) {
this.route.data.subscribe((data: { loanDetailsData: any, loanDatatables: any, loanArrearsDelinquencyConfig: any}) => {
private router: Router,
public loansService: LoansService,
private translateService: TranslateService,
public dialog: MatDialog) {
this.route.data.subscribe((data: { loanDetailsData: any, loanDatatables: any, loanArrearsDelinquencyConfig: any }) => {
this.loanDetailsData = data.loanDetailsData;
this.loanDatatables = data.loanDatatables;
this.loanDisplayArrearsDelinquency = data.loanArrearsDelinquencyConfig.value || 0;
@@ -176,7 +176,7 @@ export class LoansViewComponent implements OnInit {
this.deleteLoanAccount();
break;
case 'Modify Application':
this.router.navigate(['edit-loans-account'], { relativeTo: this.route});
this.router.navigate(['edit-loans-account'], { relativeTo: this.route });
break;
case 'Transfer Funds':
const queryParams: any = { loanId: this.loanId, accountType: 'fromloans' };
@@ -193,7 +193,7 @@ export class LoansViewComponent implements OnInit {
*/
private recoverFromGuarantor() {
const recoverFromGuarantorDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Recover from Guarantor', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want recover from Guarantor'), type: 'Mild' }
data: { heading: this.translateService.instant('labels.heading.Recover from Guarantor'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want recover from Guarantor'), type: 'Mild' }
});
recoverFromGuarantorDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
@@ -38,7 +38,7 @@ export class RescheduleLoanTabComponent implements OnInit {
manageRequest(request: any, command: string): void {
const approveLoanRescheduleDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: `${command} Loan Reschedule`, dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want') + `${command}` + this.translateService.instant('labels.dialogContext.the Loan Reschedule') + `${request.id}` }
data: { heading: `${command}` + this.translateService.instant('labels.heading.Loan Reschedule'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want') + `${command}` + this.translateService.instant('labels.dialogContext.the Loan Reschedule') + `${request.id}` }
});
approveLoanRescheduleDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -179,7 +179,7 @@ export class TransactionsTabComponent implements OnInit {
}
const undoTransactionAccountDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Undo Transaction', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want undo the transaction type') + `${transaction.type.value}` + this.translateService.instant('labels.dialogContext.with id') + `${transaction.id}` }
data: { heading: this.translateService.instant('labels.heading.Undo Transaction'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want undo the transaction type') + `${transaction.type.value}` + this.translateService.instant('labels.dialogContext.with id') + `${transaction.id}` }
});
undoTransactionAccountDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -62,14 +62,14 @@ export class ViewTransactionComponent implements OnInit {
* @param {AlertService} alertService Alert Service
*/
constructor(private loansService: LoansService,
private route: ActivatedRoute,
private dateUtils: Dates,
private router: Router,
public dialog: MatDialog,
private translateService:TranslateService,
private settingsService: SettingsService,
private organizationService: OrganizationService,
private alertService: AlertService) {
private route: ActivatedRoute,
private dateUtils: Dates,
private router: Router,
public dialog: MatDialog,
private translateService: TranslateService,
private settingsService: SettingsService,
private organizationService: OrganizationService,
private alertService: AlertService) {
this.route.data.subscribe((data: { loansAccountTransaction: any }) => {
this.transactionData = data.loansAccountTransaction;
this.allowEdition = !this.transactionData.manuallyReversed && !this.allowTransactionEdition(this.transactionData.type.id);
@@ -88,7 +88,7 @@ export class ViewTransactionComponent implements OnInit {
}
});
this.amountRelationsAllowed = this.transactionData.amount - amountRelations;
this.isFullRelated = (this.amountRelationsAllowed === 0);
this.isFullRelated = (this.amountRelationsAllowed === 0);
this.allowChargeback = this.allowChargebackTransaction(this.transactionData.type) && !this.isFullRelated;
}
}
@@ -106,9 +106,9 @@ export class ViewTransactionComponent implements OnInit {
ngOnInit(): void {
if (this.allowChargeback) {
this.organizationService.getPaymentTypesWithCode().toPromise()
.then(data => {
this.paymentTypeOptions = data;
});
.then(data => {
this.paymentTypeOptions = data;
});
}
}
@@ -133,7 +133,7 @@ export class ViewTransactionComponent implements OnInit {
undoTransaction() {
const accountId = this.route.snapshot.params['loanId'];
const undoTransactionAccountDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Undo Transaction', dialogContext:this.translateService.instant('labels.dialogContext.Are you sure you want undo the transaction') +`${this.transactionData.id}` }
data: { heading: this.translateService.instant('labels.heading.Undo Transaction'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want undo the transaction') + `${this.transactionData.id}` }
});
undoTransactionAccountDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -192,8 +192,10 @@ export class ViewTransactionComponent implements OnInit {
this.router.navigate(['../'], { relativeTo: this.route });
});
} else {
this.alertService.alert({ type: 'BusinessRule',
message: 'Chargeback amount must be lower or equal to: ' + this.amountRelationsAllowed });
this.alertService.alert({
type: 'BusinessRule',
message: 'Chargeback amount must be lower or equal to: ' + this.amountRelationsAllowed
});
}
}
});
@@ -101,7 +101,7 @@ export class ViewChargeComponent {
* Waive's the charge
*/
waiveCharge() {
const waiveChargeDialogRef = this.dialog.open(ConfirmationDialogComponent, { data: { heading: 'Waive Charge', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to waive charge with id:')` ${this.chargeData.id}`, type: 'Basic' } });
const waiveChargeDialogRef = this.dialog.open(ConfirmationDialogComponent, { data: { heading: this.translateService.instant('labels.heading.Waive Charge'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to waive charge with id:')` ${this.chargeData.id}`, type: 'Basic' } });
waiveChargeDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId, 'waive', {}, this.chargeData.id)