build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
+2
-3
@@ -8,9 +8,8 @@ describe('ActivateFixedDepositsAccountComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ActivateFixedDepositsAccountComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [ActivateFixedDepositsAccountComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+12
-9
@@ -17,7 +17,6 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
styleUrls: ['./activate-fixed-deposits-account.component.scss']
|
||||
})
|
||||
export class ActivateFixedDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -36,12 +35,14 @@ export class ActivateFixedDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private savingsService: SavingsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private savingsService: SavingsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId'];
|
||||
}
|
||||
|
||||
@@ -58,7 +59,10 @@ export class ActivateFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
createActivateFixedDepositsAccountForm() {
|
||||
this.activateFixedDepositsAccountForm = this.formBuilder.group({
|
||||
'activatedOnDate': ['', Validators.required]
|
||||
activatedOnDate: [
|
||||
'',
|
||||
Validators.required
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -83,5 +87,4 @@ export class ActivateFixedDepositsAccountComponent implements OnInit {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('AddChargeFixedDepositsAccountComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AddChargeFixedDepositsAccountComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [AddChargeFixedDepositsAccountComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+19
-12
@@ -18,7 +18,6 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
styleUrls: ['./add-charge-fixed-deposits-account.component.scss']
|
||||
})
|
||||
export class AddChargeFixedDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Minimum Due Date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum Due Date allowed. */
|
||||
@@ -65,7 +64,7 @@ export class AddChargeFixedDepositsAccountComponent implements OnInit {
|
||||
}
|
||||
|
||||
buildDependencies() {
|
||||
this.fixedDepositsChargeForm.controls.chargeId.valueChanges.subscribe(chargeId => {
|
||||
this.fixedDepositsChargeForm.controls.chargeId.valueChanges.subscribe((chargeId) => {
|
||||
this.savingsService.getChargeTemplate(chargeId).subscribe((data: any) => {
|
||||
this.chargeDetails = data;
|
||||
const chargeTimeType = data.chargeTimeType.id;
|
||||
@@ -86,14 +85,17 @@ export class AddChargeFixedDepositsAccountComponent implements OnInit {
|
||||
this.fixedDepositsChargeForm.removeControl('feeOnMonthDay');
|
||||
}
|
||||
if (chargeTimeType.value === 'Monthly Fee') {
|
||||
this.fixedDepositsChargeForm.addControl('feeInterval', new UntypedFormControl(data.feeInterval, Validators.required));
|
||||
this.fixedDepositsChargeForm.addControl(
|
||||
'feeInterval',
|
||||
new UntypedFormControl(data.feeInterval, Validators.required)
|
||||
);
|
||||
} else {
|
||||
this.fixedDepositsChargeForm.removeControl('feeInterval');
|
||||
}
|
||||
this.fixedDepositsChargeForm.patchValue({
|
||||
'amount': data.amount,
|
||||
'chargeCalculationType': data.chargeCalculationType.id,
|
||||
'chargeTimeType': data.chargeTimeType.id
|
||||
amount: data.amount,
|
||||
chargeCalculationType: data.chargeCalculationType.id,
|
||||
chargeTimeType: data.chargeTimeType.id
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -104,10 +106,16 @@ export class AddChargeFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
createFixedDepositsChargeForm() {
|
||||
this.fixedDepositsChargeForm = this.formBuilder.group({
|
||||
'chargeId': ['', Validators.required],
|
||||
'amount': ['', Validators.required],
|
||||
'chargeCalculationType': [{ value: '', disabled: true }],
|
||||
'chargeTimeType': [{ value: '', disabled: true }]
|
||||
chargeId: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
amount: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
chargeCalculationType: [{ value: '', disabled: true }],
|
||||
chargeTimeType: [{ value: '', disabled: true }]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -137,9 +145,8 @@ export class AddChargeFixedDepositsAccountComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
this.savingsService.createSavingsCharge(this.fixedDepositAccountId, 'charges', savingsCharge).subscribe( () => {
|
||||
this.savingsService.createSavingsCharge(this.fixedDepositAccountId, 'charges', savingsCharge).subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('ApproveFixedDepositsAccountComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ApproveFixedDepositsAccountComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [ApproveFixedDepositsAccountComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+13
-10
@@ -17,7 +17,6 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
styleUrls: ['./approve-fixed-deposits-account.component.scss']
|
||||
})
|
||||
export class ApproveFixedDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -35,12 +34,14 @@ export class ApproveFixedDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId'];
|
||||
}
|
||||
|
||||
@@ -57,8 +58,11 @@ export class ApproveFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
createApproveFixedDepositsAccountForm() {
|
||||
this.approveFixedDepositsAccountForm = this.formBuilder.group({
|
||||
'approvedOnDate': ['', Validators.required],
|
||||
'note': ['']
|
||||
approvedOnDate: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
note: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@@ -83,5 +87,4 @@ export class ApproveFixedDepositsAccountComponent implements OnInit {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('CloseFixedDepositsAccountComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CloseFixedDepositsAccountComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [CloseFixedDepositsAccountComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+22
-13
@@ -17,7 +17,6 @@ import { Dates } from 'app/core/utils/dates';
|
||||
styleUrls: ['./close-fixed-deposits-account.component.scss']
|
||||
})
|
||||
export class CloseFixedDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -42,12 +41,14 @@ export class CloseFixedDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
this.route.data.subscribe((data: { fixedDepositsAccountActionData: any }) => {
|
||||
this.savingsAccountsData = data.fixedDepositsAccountActionData.savingsAccounts;
|
||||
this.onAccountClosureOptions = data.fixedDepositsAccountActionData.onAccountClosureOptions;
|
||||
@@ -70,10 +71,16 @@ export class CloseFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
createCloseOnMaturityAccountForm() {
|
||||
this.closeOnMaturityAccountForm = this.formBuilder.group({
|
||||
'closedOnDate': ['', Validators.required],
|
||||
'maturityAmount': [{value: this.maturityAmount, disabled: true}],
|
||||
'onAccountClosureId': ['', Validators.required],
|
||||
'note': ['']
|
||||
closedOnDate: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
maturityAmount: [{ value: this.maturityAmount, disabled: true }],
|
||||
onAccountClosureId: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
note: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@@ -83,7 +90,10 @@ export class CloseFixedDepositsAccountComponent implements OnInit {
|
||||
addTransferDetails() {
|
||||
this.closeOnMaturityAccountForm.get('onAccountClosureId').valueChanges.subscribe((id: any) => {
|
||||
if (id === 200) {
|
||||
this.closeOnMaturityAccountForm.addControl('toSavingsAccountId', new UntypedFormControl('', Validators.required));
|
||||
this.closeOnMaturityAccountForm.addControl(
|
||||
'toSavingsAccountId',
|
||||
new UntypedFormControl('', Validators.required)
|
||||
);
|
||||
this.closeOnMaturityAccountForm.addControl('transferDescription', new UntypedFormControl(''));
|
||||
} else {
|
||||
this.closeOnMaturityAccountForm.removeControl('toSavingsAccountId');
|
||||
@@ -113,5 +123,4 @@ export class CloseFixedDepositsAccountComponent implements OnInit {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('FixedDepositsAccountActionsComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ FixedDepositsAccountActionsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [FixedDepositsAccountActionsComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+15
-17
@@ -11,30 +11,29 @@ import { ActivatedRoute } from '@angular/router';
|
||||
styleUrls: ['./fixed-deposits-account-actions.component.scss']
|
||||
})
|
||||
export class FixedDepositsAccountActionsComponent {
|
||||
|
||||
/** Flag object to store possible actions and render appropriate UI to the user */
|
||||
actions: {
|
||||
'Approve': boolean
|
||||
'Reject': boolean
|
||||
'Activate': boolean
|
||||
'Close': boolean
|
||||
'Undo Approval': boolean
|
||||
'Undo Activation': boolean
|
||||
'Add Charge': boolean
|
||||
'Premature Close': boolean
|
||||
'Withdrawn by Client': boolean
|
||||
'Withdrawal': boolean
|
||||
Approve: boolean;
|
||||
Reject: boolean;
|
||||
Activate: boolean;
|
||||
Close: boolean;
|
||||
'Undo Approval': boolean;
|
||||
'Undo Activation': boolean;
|
||||
'Add Charge': boolean;
|
||||
'Premature Close': boolean;
|
||||
'Withdrawn by Client': boolean;
|
||||
Withdrawal: boolean;
|
||||
} = {
|
||||
'Approve': false,
|
||||
'Reject': false,
|
||||
'Activate': false,
|
||||
'Close': false,
|
||||
Approve: false,
|
||||
Reject: false,
|
||||
Activate: false,
|
||||
Close: false,
|
||||
'Undo Approval': false,
|
||||
'Undo Activation': false,
|
||||
'Add Charge': false,
|
||||
'Premature Close': false,
|
||||
'Withdrawn by Client': false,
|
||||
'Withdrawal': false
|
||||
Withdrawal: false
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -44,5 +43,4 @@ export class FixedDepositsAccountActionsComponent {
|
||||
const name = this.route.snapshot.params['name'];
|
||||
this.actions[name] = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('FixedDepositsCashTransactionComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ FixedDepositsCashTransactionComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [FixedDepositsCashTransactionComponent]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(FixedDepositsCashTransactionComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
||||
+24
-16
@@ -12,7 +12,6 @@ import { Currency, PaymentType } from 'app/shared/models/general.model';
|
||||
styleUrls: ['./fixed-deposits-cash-transaction.component.scss']
|
||||
})
|
||||
export class FixedDepositsCashTransactionComponent implements OnInit {
|
||||
|
||||
/** Minimum Due Date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum Due Date allowed. */
|
||||
@@ -24,7 +23,7 @@ export class FixedDepositsCashTransactionComponent implements OnInit {
|
||||
/** Flag to enable payment details fields. */
|
||||
addPaymentDetailsFlag: Boolean = false;
|
||||
/** transaction type flag to render required UI */
|
||||
transactionType: { deposit: boolean, withdrawal: boolean } = { deposit: false, withdrawal: false };
|
||||
transactionType: { deposit: boolean; withdrawal: boolean } = { deposit: false, withdrawal: false };
|
||||
/** transaction command for submit request */
|
||||
transactionCommand: string;
|
||||
actionName: string;
|
||||
@@ -41,12 +40,14 @@ export class FixedDepositsCashTransactionComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private settingsService: SettingsService) {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
this.route.data.subscribe((data: { fixedDepositsAccountActionData: any }) => {
|
||||
this.currency = data.fixedDepositsAccountActionData.currency;
|
||||
this.paymentTypeOptions = data.fixedDepositsAccountActionData.paymentTypeOptions;
|
||||
@@ -70,10 +71,16 @@ export class FixedDepositsCashTransactionComponent implements OnInit {
|
||||
*/
|
||||
createSavingAccountTransactionForm() {
|
||||
this.accountTransactionForm = this.formBuilder.group({
|
||||
'transactionDate': [this.settingsService.businessDate, Validators.required],
|
||||
'transactionAmount': [0, Validators.required],
|
||||
'paymentTypeId': [''],
|
||||
'note': ['']
|
||||
transactionDate: [
|
||||
this.settingsService.businessDate,
|
||||
Validators.required
|
||||
],
|
||||
transactionAmount: [
|
||||
0,
|
||||
Validators.required
|
||||
],
|
||||
paymentTypeId: [''],
|
||||
note: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@@ -115,9 +122,10 @@ export class FixedDepositsCashTransactionComponent implements OnInit {
|
||||
};
|
||||
delete data.note;
|
||||
data['transactionAmount'] = data['transactionAmount'] * 1;
|
||||
this.fixedDepositsService.executeFixedDepositsAccountTransactionsCommand(this.accountId, this.transactionCommand, data).subscribe(res => {
|
||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
||||
});
|
||||
this.fixedDepositsService
|
||||
.executeFixedDepositsAccountTransactionsCommand(this.accountId, this.transactionCommand, data)
|
||||
.subscribe((res) => {
|
||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('PrematureCloseFixedDepositsAccountComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PrematureCloseFixedDepositsAccountComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [PrematureCloseFixedDepositsAccountComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+27
-14
@@ -17,7 +17,6 @@ import { Dates } from 'app/core/utils/dates';
|
||||
styleUrls: ['./premature-close-fixed-deposits-account.component.scss']
|
||||
})
|
||||
export class PrematureCloseFixedDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -33,7 +32,6 @@ export class PrematureCloseFixedDepositsAccountComponent implements OnInit {
|
||||
/** Form submission event */
|
||||
isSubmitted = false;
|
||||
|
||||
|
||||
/**
|
||||
* @param {FormBuilder} formBuilder Form Builder
|
||||
* @param {FixedDepositsService} fixedDepositsService Fixed Deposits Service
|
||||
@@ -42,12 +40,14 @@ export class PrematureCloseFixedDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId'];
|
||||
}
|
||||
|
||||
@@ -65,7 +65,10 @@ export class PrematureCloseFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
createPrematureCloseAccountForm() {
|
||||
this.prematureCloseAccountForm = this.formBuilder.group({
|
||||
'closedOnDate': ['', Validators.required]
|
||||
closedOnDate: [
|
||||
'',
|
||||
Validators.required
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -92,17 +95,23 @@ export class PrematureCloseFixedDepositsAccountComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId, 'calculatePrematureAmount', data)
|
||||
this.fixedDepositsService
|
||||
.executeFixedDepositsAccountCommand(this.accountId, 'calculatePrematureAmount', data)
|
||||
.subscribe((response: any) => {
|
||||
this.savingsAccountsData = response.savingsAccounts;
|
||||
this.onAccountClosureOptions = response.onAccountClosureOptions;
|
||||
this.prematureCloseAccountForm.addControl('maturityAmount', new UntypedFormControl({ value: '', disabled: true }));
|
||||
this.prematureCloseAccountForm.addControl('onAccountClosureId', new UntypedFormControl('', Validators.required));
|
||||
this.prematureCloseAccountForm.addControl(
|
||||
'maturityAmount',
|
||||
new UntypedFormControl({ value: '', disabled: true })
|
||||
);
|
||||
this.prematureCloseAccountForm.addControl(
|
||||
'onAccountClosureId',
|
||||
new UntypedFormControl('', Validators.required)
|
||||
);
|
||||
this.prematureCloseAccountForm.addControl('note', new UntypedFormControl(''));
|
||||
this.prematureCloseAccountForm.get('maturityAmount').patchValue(response.maturityAmount);
|
||||
this.addTransferDetails();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +120,10 @@ export class PrematureCloseFixedDepositsAccountComponent implements OnInit {
|
||||
addTransferDetails() {
|
||||
this.prematureCloseAccountForm.get('onAccountClosureId').valueChanges.subscribe((id: any) => {
|
||||
if (id === 200) {
|
||||
this.prematureCloseAccountForm.addControl('toSavingsAccountId', new UntypedFormControl('', Validators.required));
|
||||
this.prematureCloseAccountForm.addControl(
|
||||
'toSavingsAccountId',
|
||||
new UntypedFormControl('', Validators.required)
|
||||
);
|
||||
this.prematureCloseAccountForm.addControl('transferDescription', new UntypedFormControl(''));
|
||||
} else {
|
||||
this.prematureCloseAccountForm.removeControl('toSavingsAccountId');
|
||||
@@ -138,9 +150,10 @@ export class PrematureCloseFixedDepositsAccountComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId, 'prematureClose', data).subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
this.fixedDepositsService
|
||||
.executeFixedDepositsAccountCommand(this.accountId, 'prematureClose', data)
|
||||
.subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('RejectFixedDepositsAccountComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ RejectFixedDepositsAccountComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [RejectFixedDepositsAccountComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+13
-10
@@ -17,7 +17,6 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
styleUrls: ['./reject-fixed-deposits-account.component.scss']
|
||||
})
|
||||
export class RejectFixedDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -35,12 +34,14 @@ export class RejectFixedDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId'];
|
||||
}
|
||||
|
||||
@@ -57,8 +58,11 @@ export class RejectFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
createRejectFixedDepositsAccountForm() {
|
||||
this.rejectFixedDepositsAccountForm = this.formBuilder.group({
|
||||
'rejectedOnDate': ['', Validators.required],
|
||||
'note': ['']
|
||||
rejectedOnDate: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
note: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@@ -83,5 +87,4 @@ export class RejectFixedDepositsAccountComponent implements OnInit {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('UndoApprovalFixedDepositsAccountComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ UndoApprovalFixedDepositsAccountComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [UndoApprovalFixedDepositsAccountComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+14
-12
@@ -16,7 +16,6 @@ import { FixedDepositsService } from '../../fixed-deposits.service';
|
||||
styleUrls: ['./undo-approval-fixed-deposits-account.component.scss']
|
||||
})
|
||||
export class UndoApprovalFixedDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Undo Approval Fixed Deposits Account form. */
|
||||
undoApprovalFixedDepositsAccountForm: UntypedFormGroup;
|
||||
/** Fixed Deposits Account Id */
|
||||
@@ -32,11 +31,13 @@ export class UndoApprovalFixedDepositsAccountComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private savingsService: SavingsService,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private savingsService: SavingsService,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
this.undoCommand = 'undoapproval'; // Default command
|
||||
this.undoAction = this.route.snapshot.params['name'];
|
||||
if (this.undoAction === 'Undo Activation') {
|
||||
@@ -57,7 +58,7 @@ export class UndoApprovalFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
createUndoApprovalFixedDepositsAccountForm() {
|
||||
this.undoApprovalFixedDepositsAccountForm = this.formBuilder.group({
|
||||
'note': ['']
|
||||
note: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@@ -67,17 +68,18 @@ export class UndoApprovalFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
submit() {
|
||||
const data = {
|
||||
...this.undoApprovalFixedDepositsAccountForm.value,
|
||||
...this.undoApprovalFixedDepositsAccountForm.value
|
||||
};
|
||||
if (this.undoAction === 'Undo Activation') {
|
||||
this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId, this.undoCommand, data).subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
this.fixedDepositsService
|
||||
.executeFixedDepositsAccountCommand(this.accountId, this.undoCommand, data)
|
||||
.subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
} else {
|
||||
this.savingsService.executeSavingsAccountCommand(this.accountId, this.undoCommand, data).subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -8,9 +8,8 @@ describe('WithdrawByClientFixedDepositsAccountComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WithdrawByClientFixedDepositsAccountComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [WithdrawByClientFixedDepositsAccountComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+18
-13
@@ -17,7 +17,6 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
styleUrls: ['./withdraw-by-client-fixed-deposits-account.component.scss']
|
||||
})
|
||||
export class WithdrawByClientFixedDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -35,12 +34,14 @@ export class WithdrawByClientFixedDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private fixedDepositsService: FixedDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId'];
|
||||
}
|
||||
|
||||
@@ -57,8 +58,11 @@ export class WithdrawByClientFixedDepositsAccountComponent implements OnInit {
|
||||
*/
|
||||
createWithdrawFixedDepositsAccountForm() {
|
||||
this.withdrawFixedDepositsAccountForm = this.formBuilder.group({
|
||||
'withdrawnOnDate': ['', Validators.required],
|
||||
'note': ['']
|
||||
withdrawnOnDate: [
|
||||
'',
|
||||
Validators.required
|
||||
],
|
||||
note: ['']
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,9 +83,10 @@ export class WithdrawByClientFixedDepositsAccountComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId, 'withdrawnByApplicant', data).subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
this.fixedDepositsService
|
||||
.executeFixedDepositsAccountCommand(this.accountId, 'withdrawnByApplicant', data)
|
||||
.subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user