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
@@ -100,7 +100,7 @@ export class CentersViewComponent implements OnInit {
private centersUnassignStaff() {
const dialogcontext: string = ""
const unAssignStaffDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Unassign Staff', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want Unassign Staff') }
data: { heading: this.translateService.instant('labels.heading.Unassign Staff'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want Unassign Staff') }
});
unAssignStaffDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -128,7 +128,7 @@ export class ChargesTabComponent implements OnInit {
* @param {any} chargeId Charge Id
*/
waiveCharge(chargeId: any) {
const waiveChargeDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, { data: { heading: 'Waive Charge', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to waive charge with id: ')+ `${chargeId} ?` } });
const waiveChargeDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, { 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} ?` } });
waiveChargeDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
this.savingsService.executeSavingsAccountChargesCommand(this.recurringDepositsAccountData.id, 'waive', {}, chargeId)
@@ -209,7 +209,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
*/
private calculateInterest() {
const calculateInterestAccountDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, {
data: { heading: 'Calculate Interest', dialogContext: this.translateService.instant(`labels.dialogContext.Are you sure you want to calculate interest ?`) }
data: { heading: this.translateService.instant('labels.heading.Calculate Interest'), dialogContext: this.translateService.instant(`labels.dialogContext.Are you sure you want to calculate interest ?`) }
});
calculateInterestAccountDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
@@ -225,7 +225,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
*/
private postInterest() {
const postInterestAccountDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, {
data: { heading: 'Post Interest', dialogContext:this.translateService.instant('lables.dialogContext.Are you sure you want to post interest ?') }
data: { heading: this.translateService.instant('labels.heading.Post Interest'), dialogContext:this.translateService.instant('lables.dialogContext.Are you sure you want to post interest ?') }
});
postInterestAccountDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
@@ -243,7 +243,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
*/
private enableWithHoldTax() {
const deleteSavingsAccountDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, {
data: { heading: 'Enable Withhold Tax', dialogContext: this.translateService.instant('labels.dialogContext.Enable withhold tax for this account ?') }
data: { heading: this.translateService.instant('labels.heading.Enable Withhold Tax'), dialogContext: this.translateService.instant('labels.dialogContext.Enable withhold tax for this account ?') }
});
deleteSavingsAccountDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
@@ -261,7 +261,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
*/
private disableWithHoldTax() {
const disableWithHoldTaxDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, {
data: { heading: 'Disable Withhold Tax', dialogContext: this.translateService.instant('labels.dialogContext.Disable withhold tax for this account ?') }
data: { heading: this.translateService.instant('labels.heading.Disable Withhold Tax'), dialogContext: this.translateService.instant('labels.dialogContext.Disable withhold tax for this account ?') }
});
disableWithHoldTaxDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
@@ -53,7 +53,7 @@ export class ViewTransactionComponent {
*/
undoTransaction() {
const accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
const undoTransactionAccountDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, { data: { heading: 'Undo Transaction', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to undo this transaction ?') } });
const undoTransactionAccountDialogRef = this.dialog.open(RecurringDepositConfirmationDialogComponent, { data: { heading: this.translateService.instant('labels.heading.Undo Transaction'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to undo this transaction ?') } });
undoTransactionAccountDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
const locale = this.settingsService.language.code;
@@ -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)
@@ -60,7 +60,7 @@ export class ViewHolidaysComponent {
*/
activateHoliday() {
const unAssignStaffDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Holiday', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to activate') + ` ${this.holidayData.name} ` + this.translateService.instant('labels.dialogContext.holiday') }
data: { heading: this.translateService.instant('labels.heading.Holiday'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to activate') + ` ${this.holidayData.name} ` + this.translateService.instant('labels.dialogContext.holiday') }
});
unAssignStaffDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -269,7 +269,7 @@ export class SavingsAccountViewComponent implements OnInit {
*/
private unblockSavingsAccount(action: string) {
const unblockSavingsAccountDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Savings Account', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want') + action + this.translateService.instant('this Savings Account') }
data: { heading: this.translateService.instant('labels.heading.Savings Account'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want') + action + this.translateService.instant('this Savings Account') }
});
let command = 'unblock';
if (action === 'Unblock Deposit') {
@@ -132,7 +132,7 @@ export class CheckerInboxComponent implements OnInit {
approveChecker() {
const approveCheckerDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Approve Checker', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to approve checker') }
data: { heading: this.translateService.instant('labels.heading.Approve Checker'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to approve checker') }
});
approveCheckerDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -143,7 +143,7 @@ export class CheckerInboxComponent implements OnInit {
rejectChecker() {
const rejectCheckerDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Reject Checker', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to reject checker') }
data: { heading: this.translateService.instant('labels.heading.Reject Checker'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to reject checker') }
});
rejectCheckerDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -154,7 +154,7 @@ export class CheckerInboxComponent implements OnInit {
deleteChecker() {
const deleteCheckerDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Delete Checker', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to delete checker') }
data: { heading: this.translateService.instant('labels.heading.Delete Checker'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to delete checker') }
});
deleteCheckerDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -123,7 +123,7 @@ export class LoanApprovalComponent {
approveLoan() {
const approveLoanDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Approve Loan', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to Approve Loan') }
data: { heading: this.translateService.instant('labels.heading.Approve Loan'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to Approve Loan') }
});
approveLoanDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -81,7 +81,7 @@ export class LoanDisbursalComponent {
disburseLoan() {
const disburseLoanDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Loan Disbursal', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to Disburse Loan') }
data: { heading: this.translateService.instant('labels.heading.Loan Disbursal'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to Disburse Loan') }
});
disburseLoanDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -83,7 +83,7 @@ export class RescheduleLoanComponent implements OnInit {
bulkLoanReschedule(action: string) {
const rescheduleLoanDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Reschedule Loan', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to') + action + this.translateService.instant('labels.dialogContext.the Reschedule Loan') }
data: { heading: this.translateService.instant('labels.heading.Reschedule Loan'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to') + action + this.translateService.instant('labels.dialogContext.the Reschedule Loan') }
});
rescheduleLoanDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -50,7 +50,7 @@ export class ViewCheckerInboxComponent {
*/
approveChecker() {
const approveCheckerDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Approve Checker', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to approve checker') }
data: { heading: this.translateService.instant('labels.heading.Approve Checker'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to approve checker') }
});
approveCheckerDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -66,7 +66,7 @@ export class ViewCheckerInboxComponent {
*/
rejectChecker() {
const rejectCheckerDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Reject Checker', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to reject checker') }
data: { heading: this.translateService.instant('labels.heading.Reject Checker'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to reject checker') }
});
rejectCheckerDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {
@@ -82,7 +82,7 @@ export class ViewCheckerInboxComponent {
*/
deleteChecker() {
const deleteCheckerDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: 'Delete Checker', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to delete checker') }
data: { heading: this.translateService.instant('labels.heading.Delete Checker'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to delete checker') }
});
deleteCheckerDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (response.confirm) {