Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/app/clients/clients-view/clients-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ export class ClientsViewComponent implements OnInit {
data: { deleteContext: `client with id: ${this.clientViewData.id}` }
});
deleteClientDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.delete) {
this.clientsService.deleteClient(this.clientViewData.id).subscribe(() => {
this.router.navigate(['/clients'], { relativeTo: this.route });
Expand All @@ -290,6 +293,9 @@ export class ClientsViewComponent implements OnInit {
private unassignStaff() {
const unAssignStaffDialogRef = this.dialog.open(UnassignStaffDialogComponent);
unAssignStaffDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (!response) {
return;
}
if (response.confirm) {
this.clientsService
.executeClientCommand(this.clientViewData.id, 'unassignStaff', { staffId: this.clientViewData.staffId })
Expand All @@ -312,6 +318,9 @@ export class ClientsViewComponent implements OnInit {
}
});
viewSignatureDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.upload) {
this.uploadSignature();
} else if (response.draw) {
Expand Down Expand Up @@ -360,6 +369,9 @@ export class ClientsViewComponent implements OnInit {
data: documents
});
deleteSignatureDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.delete) {
this.clientsService.deleteClientDocument(this.clientViewData.id, response.id).subscribe(() => {
this.reload();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {

if (this.recurringDepositsAccountData.charges && this.recurringDepositsAccountData.status.value === 'Matured') {
this.charges.forEach((element: any) => {
if (element.name === 'Annual fee - INR') {
if (element.chargeTimeType?.id === 7) {
Comment thread
Manishnemade12 marked this conversation as resolved.
this.buttonConfig.addOption({
name: 'Apply Annual Fees',
taskPermissionName: 'APPLYANNUALFEE_SAVINGSACCOUNT'
Expand All @@ -157,7 +157,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
}
if (this.recurringDepositsAccountData.charges) {
this.charges.forEach((element: any) => {
if (element.name === 'Annual fee - INR') {
if (element.chargeTimeType?.id === 7) {
this.buttonConfig.addOption({
name: 'Apply Annual Fees',
taskPermissionName: 'APPLYANNUALFEE_SAVINGSACCOUNT'
Expand Down
9 changes: 9 additions & 0 deletions src/app/loans/loans-view/loans-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ export class LoansViewComponent extends LoanProductBaseComponent implements OnIn
}
});
recoverFromGuarantorDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.confirm) {
this.loansService.loanActionButtons(this.loanId, 'recoverGuarantees').subscribe(() => {
this.reload();
Expand Down Expand Up @@ -500,6 +503,9 @@ export class LoansViewComponent extends LoanProductBaseComponent implements OnIn
}
});
undoTransactionAccountDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.confirm) {
let undoCommand: string = '';
switch (actionName) {
Expand Down Expand Up @@ -564,6 +570,9 @@ export class LoansViewComponent extends LoanProductBaseComponent implements OnIn
data: { deleteContext: `with loan id: ${this.loanId}` }
});
deleteGuarantorDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.delete) {
this.loansService.deleteLoanAccount(this.loanId).subscribe(() => {
this.router.navigate(['../../'], { relativeTo: this.route });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class ApplyAnnualFeesSavingsAccountComponent implements OnInit {
applyCharge() {
const charges: any[] = this.savingsAccountData.charges;
charges.forEach((charge: any) => {
if (charge.name === 'Annual fee - INR') {
if (charge.chargeTimeType?.id === 7) {
this.chargeId = charge.id;
this.applyAnnualFeesForm.get('amount').patchValue(charge.amount);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class SavingsAccountViewComponent implements OnInit {
if (this.savingsAccountData.charges) {
const charges: any[] = this.savingsAccountData.charges;
charges.forEach((charge: any) => {
if (charge.name === 'Annual fee - INR') {
if (charge.chargeTimeType?.id === 7) {
this.buttonConfig.addOption({
name: 'Apply Annual Fees',
taskPermissionName: 'APPLYANNUALFEE_SAVINGSACCOUNT'
Expand Down Expand Up @@ -281,6 +281,9 @@ export class SavingsAccountViewComponent implements OnInit {
data: { deleteContext: `savings account with id: ${this.savingsAccountData.id}` }
});
deleteSavingsAccountDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.delete) {
this.savingsService.deleteSavingsAccount(this.savingsAccountData.id).subscribe(() => {
this.router.navigate(['../../'], { relativeTo: this.route });
Expand All @@ -295,6 +298,9 @@ export class SavingsAccountViewComponent implements OnInit {
private calculateInterest() {
const calculateInterestAccountDialogRef = this.dialog.open(CalculateInterestDialogComponent);
calculateInterestAccountDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.confirm) {
this.savingsService
.executeSavingsAccountCommand(this.savingsAccountData.id, 'calculateInterest', {})
Expand All @@ -311,6 +317,9 @@ export class SavingsAccountViewComponent implements OnInit {
private postInterest() {
const postInterestAccountDialogRef = this.dialog.open(PostInterestDialogComponent);
postInterestAccountDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.confirm) {
this.savingsService
.executeSavingsAccountCommand(this.savingsAccountData.id, 'postInterest', {})
Expand All @@ -329,6 +338,9 @@ export class SavingsAccountViewComponent implements OnInit {
data: { isEnable: true }
});
deleteSavingsAccountDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.confirm) {
this.savingsService
.executeSavingsAccountUpdateCommand(this.savingsAccountData.id, 'updateWithHoldTax', { withHoldTax: true })
Expand All @@ -347,6 +359,9 @@ export class SavingsAccountViewComponent implements OnInit {
data: { isEnable: false }
});
disableWithHoldTaxDialogRef.afterClosed().subscribe((response: any) => {
if (!response) {
return;
}
if (response.confirm) {
this.savingsService
.executeSavingsAccountUpdateCommand(this.savingsAccountData.id, 'updateWithHoldTax', { withHoldTax: false })
Expand Down Expand Up @@ -378,6 +393,9 @@ export class SavingsAccountViewComponent implements OnInit {
command = 'unblockDebit';
}
unblockSavingsAccountDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
if (!response) {
return;
}
if (response.confirm) {
this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id, command, {}).subscribe(() => {
this.reload();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ export class SharesAccountViewComponent implements OnInit {
if (this.sharesAccountData.charges) {
const charges: any[] = this.sharesAccountData.charges;
charges.forEach((charge: any) => {
if (charge.name === 'Annual fee - INR') {
if (charge.chargeTimeType?.id === 7) {
this.buttonConfig.addOption({
name: 'Apply Anuual Fees',
name: 'Apply Annual Fees',
taskPermissionName: 'APPLYANNUALFEE_SAVINGSACCOUNT'
});
}
Expand Down
Loading