+
{{ savingProduct.name }}
-
{{ savingProduct.name }}
+
+
+
Details
+
+
+
+
+ Short Name:
+ {{ savingProduct.shortName }}
+
+
+
+ Description:
+ {{ savingProduct.description }}
+
+
+
Currency
+
+
+
+
+ Currency:
+ {{ savingProduct.currency.name }}
+
+
+
+ Decimal Places:
+ {{ savingProduct.currency.decimalPlaces }}
+
+
+
+ Currency in multiples of:
+ {{ savingProduct.currency.inMultiplesOf }}
+
+
+
Terms
+
+
+
+
+ Nominal Annual Interest Rate:
+ {{ savingProduct.nominalAnnualInterestRate }}
+
+
+
+ Interest Compounding Period:
+ {{ savingProduct.interestCompoundingPeriodType.value }}
+
+
+
+ Interest Posting Period:
+ {{ savingProduct.interestPostingPeriodType.value }}
+
+
+
+ Interest Calculated using:
+ {{ savingProduct.interestCalculationType.value }}
+
+
+
+ Days in Year:
+ {{ savingProduct.interestCalculationDaysInYearType.value }}
+
+
+
Settings
+
+
+
+
+ Minimum Opening Balance:
+ {{ savingProduct.minRequiredOpeningBalance }}
+
+
+
+ Lock-in Period:
+ {{ savingProduct.lockinPeriodFrequency + ' ' + savingProduct.lockinPeriodFrequencyType.value
+ }}
+
+
+
+ Apply Withdrawal Fee for Transfers:
+ {{ savingProduct.withdrawalFeeForTransfers ? 'Yes' : 'No' }}
+
+
+
+ Balance Required for Interest Calculation:
+ {{ savingProduct.minBalanceForInterestCalculation }}
+
+
+
+ Enforce Minimum Balance:
+ {{ savingProduct.enforceMinRequiredBalance ? 'Yes' : 'No' }}
+
+
+
+ Minimum Balance:
+ {{ savingProduct.minRequiredBalance }}
+
+
+
+ Withhold Tax is Applicable:
+ {{ savingProduct.withHoldTax ? 'Yes' : 'No' }}
+
+
+
+ Tax Group:
+ {{ savingProduct.taxGroup.name }}
+
+
+
+ Is Overdraft Allowed:
+ {{ savingProduct.allowOverdraft ? 'Yes' : 'No' }}
+
+
+
+ Minimum Overdraft Required for Interest Calculation:
+ {{ savingProduct.minOverdraftForInterestCalculation }}
+
+
+
+ Nominal Annual Interest for Overdraft:
+ {{ savingProduct.nominalAnnualInterestRateOverdraft }}
+
+
+
+ Maximum Overdraft Amount Limit:
+ {{ savingProduct.overdraftLimit }}
+
+
+
+ Enable Dormancy Tracking:
+ {{ savingProduct.isDormancyTrackingActive ? 'Yes' : 'No' }}
+
+
+
+ Number of Days to Inactive sub-status:
+ {{ savingProduct.daysToInactive }}
+ Number of Days to Dormant sub-status:
+ {{ savingProduct.daysToDormancy }}
+ Number of Days to Escheat:
+ {{ savingProduct.daysToEscheat }}
+
+
+
+
+
Charges
+
+
+
+
+
+
+ Name
+
+ {{ charge.name + ', ' + charge.currency.displaySymbol }}
+
+
+
+
+ Type
+
+ {{ charge.chargeCalculationType.value }}
+
+
+
+
+ Amount
+
+ {{ charge.amount }}
+
+
+
+
+ Collected On
+
+ {{ charge.chargeTimeType.value }}
+
+
+
+
+
+
+
+
+
+
+
Accounting
+
+
+
+
+ Type:
+ {{ savingProduct.accountingRule.value }}
+
+
+
+
+
Assets
+
+
+ Saving reference:
+ ({{ savingProduct.accountingMappings.savingsReferenceAccount.glCode }}) {{
+ savingProduct.accountingMappings.savingsReferenceAccount.name }}
+ Overdraft portfolio:
+ ({{ savingProduct.accountingMappings.overdraftPortfolioControl.glCode }}) {{
+ savingProduct.accountingMappings.overdraftPortfolioControl.name }}
+
+
+
Liabilities
+
+
+
Saving control:
+
({{ savingProduct.accountingMappings.savingsControlAccount.glCode }}) {{
+ savingProduct.accountingMappings.savingsControlAccount.name }}
+
Savings transfers in suspense:
+
({{ savingProduct.accountingMappings.transfersInSuspenseAccount.glCode }}) {{
+ savingProduct.accountingMappings.transfersInSuspenseAccount.name }}
+
+ Escheat liability:
+ ({{ savingProduct.accountingMappings.escheatLiabilityAccount.glCode }}) {{
+ savingProduct.accountingMappings.escheatLiabilityAccount.name }}
+
+
+
+
Expenses
+
+
+ Interest on savings:
+ ({{ savingProduct.accountingMappings.interestOnSavingsAccount.glCode }}) {{
+ savingProduct.accountingMappings.interestOnSavingsAccount.name }}
+ Write-off:
+ ({{ savingProduct.accountingMappings.writeOffAccount.glCode }}) {{
+ savingProduct.accountingMappings.writeOffAccount.name }}
+
+
+
Income
+
+
+ Income from fees:
+ ({{ savingProduct.accountingMappings.incomeFromFeeAccount.glCode }}) {{
+ savingProduct.accountingMappings.incomeFromFeeAccount.name }}
+ Income from penalties:
+ ({{ savingProduct.accountingMappings.incomeFromPenaltyAccount.glCode }}) {{
+ savingProduct.accountingMappings.incomeFromPenaltyAccount.name }}
+ Overdraft Interest Income:
+ ({{ savingProduct.accountingMappings.incomeFromInterest.glCode }}) {{
+ savingProduct.accountingMappings.incomeFromInterest.name }}
+
+
+
+
+
Advanced Accounting Rules
-
Details
+
-
+
Fund Sources for Payment Channels
-
- Short Name:
- {{ savingProduct.shortName }}
-
+
-
- Description:
- {{ savingProduct.description }}
-
-
- Currency
-
-
-
-
- Currency:
- {{ savingProduct.currency.name }}
-
-
-
- Decimal Places:
- {{ savingProduct.currency.decimalPlaces }}
-
-
-
- Currency in multiples of:
- {{ savingProduct.currency.inMultiplesOf }}
-
-
- Terms
-
-
-
-
- Nominal Annual Interest Rate:
- {{ savingProduct.nominalAnnualInterestRate }}
-
-
-
- Interest Compounding Period:
- {{ savingProduct.interestCompoundingPeriodType.value }}
-
-
-
- Interest Posting Period:
- {{ savingProduct.interestPostingPeriodType.value }}
-
-
-
- Interest Calculated using:
- {{ savingProduct.interestCalculationType.value }}
-
-
-
- Days in Year:
- {{ savingProduct.interestCalculationDaysInYearType.value }}
-
-
- Settings
-
-
-
-
- Minimum Opening Balance:
- {{ savingProduct.minRequiredOpeningBalance }}
-
-
-
- Lock-in Period:
- {{ savingProduct.lockinPeriodFrequency + ' ' + savingProduct.lockinPeriodFrequencyType.value }}
-
-
-
- Apply Withdrawal Fee for Transfers:
- {{ savingProduct.withdrawalFeeForTransfers ? 'Yes' : 'No' }}
-
-
-
- Balance Required for Interest Calculation:
- {{ savingProduct.minBalanceForInterestCalculation }}
-
-
-
- Enforce Minimum Balance:
- {{ savingProduct.enforceMinRequiredBalance ? 'Yes' : 'No' }}
-
-
-
- Minimum Balance:
- {{ savingProduct.minRequiredBalance }}
-
-
-
- Withhold Tax is Applicable:
- {{ savingProduct.withHoldTax ? 'Yes' : 'No' }}
-
-
-
- Tax Group:
- {{ savingProduct.taxGroup.name }}
-
-
-
- Is Overdraft Allowed:
- {{ savingProduct.allowOverdraft ? 'Yes' : 'No' }}
-
-
-
- Minimum Overdraft Required for Interest Calculation:
- {{ savingProduct.minOverdraftForInterestCalculation }}
-
-
-
- Nominal Annual Interest for Overdraft:
- {{ savingProduct.nominalAnnualInterestRateOverdraft }}
-
-
-
- Maximum Overdraft Amount Limit:
- {{ savingProduct.overdraftLimit }}
-
-
-
- Enable Dormancy Tracking:
- {{ savingProduct.isDormancyTrackingActive ? 'Yes' : 'No' }}
-
-
-
- Number of Days to Inactive sub-status:
- {{ savingProduct.daysToInactive }}
- Number of Days to Dormant sub-status:
- {{ savingProduct.daysToDormancy }}
- Number of Days to Escheat:
- {{ savingProduct.daysToEscheat }}
-
-
-
-
-
Charges
-
-
-
-
-
-
- Name
-
- {{ charge.name + ', ' + charge.currency.displaySymbol }}
+
+ Payment Type
+
+ {{ paymentFundSource.paymentType.name }}
-
- Type
-
- {{ charge.chargeCalculationType.value }}
+
+ Fund Source
+
+ ({{ paymentFundSource.fundSourceAccount.glCode }}) {{ paymentFundSource.fundSourceAccount.name }}
-
- Amount
-
- {{ charge.amount }}
-
-
-
-
- Collected On
-
- {{ charge.chargeTimeType.value }}
-
-
-
-
-
+
+
- Accounting
+
-
+
Fees to Specific Income Accounts
+
+
+
+
+ Fees
+
+ {{ feesIncome.charge.name }}
+
+
+
+
+ Income Account
+
+ ({{ feesIncome.incomeAccount.glCode }}) {{ feesIncome.incomeAccount.name }}
+
+
+
+
+
+
+
-
- Type:
- {{ savingProduct.accountingRule.value }}
-
+
-
Assets
+
Penalties to Specific Income Accounts
-
- Saving reference:
- ({{ savingProduct.accountingMappings.savingsReferenceAccount.glCode }}) {{ savingProduct.accountingMappings.savingsReferenceAccount.name }}
- Overdraft portfolio:
- ({{ savingProduct.accountingMappings.overdraftPortfolioControl.glCode }}) {{ savingProduct.accountingMappings.overdraftPortfolioControl.name }}
-
+
- Liabilities
+
+ Penalty
+
+ {{ penaltyIncome.charge.name }}
+
+
-
-
Saving control:
-
({{ savingProduct.accountingMappings.savingsControlAccount.glCode }}) {{ savingProduct.accountingMappings.savingsControlAccount.name }}
-
Savings transfers in suspense:
-
({{ savingProduct.accountingMappings.transfersInSuspenseAccount.glCode }}) {{ savingProduct.accountingMappings.transfersInSuspenseAccount.name }}
-
- Escheat liability:
- ({{ savingProduct.accountingMappings.escheatLiabilityAccount.glCode }}) {{ savingProduct.accountingMappings.escheatLiabilityAccount.name }}
-
-
+
+ Income Account
+
+ ({{ penaltyIncome.incomeAccount.glCode }}) {{ penaltyIncome.incomeAccount.name }}
+
+
- Expenses
+
+
-
- Interest on savings:
- ({{ savingProduct.accountingMappings.interestOnSavingsAccount.glCode }}) {{ savingProduct.accountingMappings.interestOnSavingsAccount.name }}
- Write-off:
- ({{ savingProduct.accountingMappings.writeOffAccount.glCode }}) {{ savingProduct.accountingMappings.writeOffAccount.name }}
-
-
- Income
-
-
- Income from fees:
- ({{ savingProduct.accountingMappings.incomeFromFeeAccount.glCode }}) {{ savingProduct.accountingMappings.incomeFromFeeAccount.name }}
- Income from penalties:
- ({{ savingProduct.accountingMappings.incomeFromPenaltyAccount.glCode }}) {{ savingProduct.accountingMappings.incomeFromPenaltyAccount.name }}
- Overdraft Interest Income:
- ({{ savingProduct.accountingMappings.incomeFromInterest.glCode }}) {{ savingProduct.accountingMappings.incomeFromInterest.name }}
-
-
-
-
-
Advanced Accounting Rules
-
-
-
-
-
-
Fund Sources for Payment Channels
-
-
-
-
- Payment Type
-
- {{ paymentFundSource.paymentType.name }}
-
-
-
-
- Fund Source
-
- ({{ paymentFundSource.fundSourceAccount.glCode }}) {{ paymentFundSource.fundSourceAccount.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
Fees to Specific Income Accounts
-
-
-
-
- Fees
-
- {{ feesIncome.charge.name }}
-
-
-
-
- Income Account
-
- ({{ feesIncome.incomeAccount.glCode }}) {{ feesIncome.incomeAccount.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
Penalties to Specific Income Accounts
-
-
-
-
- Penalty
-
- {{ penaltyIncome.charge.name }}
-
-
-
-
- Income Account
-
- ({{ penaltyIncome.incomeAccount.glCode }}) {{ penaltyIncome.incomeAccount.name }}
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
diff --git a/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.scss b/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.scss
index 8f6633e58..e71120a64 100644
--- a/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.scss
+++ b/src/app/products/saving-products/view-saving-product/saving-product-general-tab/saving-product-general-tab.component.scss
@@ -3,6 +3,10 @@
.tab-container {
padding: 1%;
margin: 1%;
+
+ div: {
+ margin-top: 3px;
+ }
}
.mat-h3 {
diff --git a/src/app/savings/common-resolvers/savings-account-transaction.resolver.ts b/src/app/savings/common-resolvers/savings-account-transaction.resolver.ts
index f30c75545..0f6db6813 100644
--- a/src/app/savings/common-resolvers/savings-account-transaction.resolver.ts
+++ b/src/app/savings/common-resolvers/savings-account-transaction.resolver.ts
@@ -26,7 +26,7 @@ export class SavingsAccountTransactionResolver implements Resolve {
*/
resolve(route: ActivatedRouteSnapshot): Observable {
const savingAccountId = route.parent.paramMap.get('savingAccountId');
- const transactionId = route.paramMap.get('id');
+ const transactionId = route.parent.paramMap.get('id');
return this.savingsService.getSavingsAccountTransaction(savingAccountId, transactionId);
}
diff --git a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html
index 0a97121e5..9deac5d57 100644
--- a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html
+++ b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.html
@@ -44,12 +44,17 @@
{{ transaction.runningBalance | formatNumber }}
-
- View Reciept
+
+ Actions
+
+
+
diff --git a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts
index 8464efe7e..0919f6fdc 100644
--- a/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts
+++ b/src/app/savings/savings-account-view/transactions-tab/transactions-tab.component.ts
@@ -20,7 +20,7 @@ export class TransactionsTabComponent implements OnInit {
/** Transactions Data */
transactionsData: any;
/** Columns to be displayed in transactions table. */
- displayedColumns: string[] = ['id', 'date', 'transactionType', 'debit', 'credit', 'balance', 'viewReciept'];
+ displayedColumns: string[] = ['id', 'date', 'transactionType', 'debit', 'credit', 'balance', 'actions'];
/** Data source for transactions table. */
dataSource: MatTableDataSource;
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
@@ -75,7 +75,7 @@ export class TransactionsTabComponent implements OnInit {
if (transactionsData.transfer) {
this.router.navigate([`account-transfers/account-transfers/${transactionsData.transfer.id}`], { relativeTo: this.route });
} else {
- this.router.navigate([transactionsData.id], { relativeTo: this.route });
+ this.router.navigate([transactionsData.id, 'general'], { relativeTo: this.route });
}
}
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.html b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.html
new file mode 100644
index 000000000..debe4eb19
--- /dev/null
+++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.html
@@ -0,0 +1 @@
+savings-transaction-datatable-tab works!
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.scss b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.spec.ts b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.spec.ts
new file mode 100644
index 000000000..5ed60eb5b
--- /dev/null
+++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SavingsTransactionDatatableTabComponent } from './savings-transaction-datatable-tab.component';
+
+describe('SavingsTransactionDatatableTabComponent', () => {
+ let component: SavingsTransactionDatatableTabComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ SavingsTransactionDatatableTabComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(SavingsTransactionDatatableTabComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.ts b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.ts
new file mode 100644
index 000000000..2c29b2952
--- /dev/null
+++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'mifosx-savings-transaction-datatable-tab',
+ templateUrl: './savings-transaction-datatable-tab.component.html',
+ styleUrls: ['./savings-transaction-datatable-tab.component.scss']
+})
+export class SavingsTransactionDatatableTabComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html
new file mode 100644
index 000000000..f169c4ded
--- /dev/null
+++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.html
@@ -0,0 +1,90 @@
+
+
+
+ Edit
+
+
+
+
+ Release Amount
+
+
+
+ Undo
+
+
+
+
+
+
+
+
+
+
+
+
+ Transaction Id
+
+
+
+ {{ transactionData.id }}
+
+
+
+ Type
+
+
+
+ {{ transactionData.transactionType.value }}
+
+
+
+ Transaction Date
+
+
+
+ {{ transactionData.date | dateFormat }}
+
+
+
+ Currency
+
+
+
+ {{ transactionData.currency.name }}
+
+
+
+ Amount
+
+
+
+ {{ transactionData.amount | currency }} {{ transactionData.currency.code }}
+
+
+
+ Note
+
+
+
+ {{ transactionData.note }}
+
+
+
+
+
+
+
+
+ {{ 'Back' | translate }}
+
+
+
+
+
+
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.scss b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.scss
new file mode 100644
index 000000000..fb9843d66
--- /dev/null
+++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.scss
@@ -0,0 +1,14 @@
+.container {
+ max-width: 37rem;
+ .content {
+ div {
+ margin: 1rem 0;
+ word-wrap: break-word;
+ }
+
+ mifosx-transaction-payment-detail {
+ width: 100%;
+ margin-bottom: 20px;
+ }
+ }
+}
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.spec.ts b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.spec.ts
new file mode 100644
index 000000000..410f95fe9
--- /dev/null
+++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SavingsTransactionGeneralTabComponent } from './savings-transaction-general-tab.component';
+
+describe('SavingsTransactionGeneralTabComponent', () => {
+ let component: SavingsTransactionGeneralTabComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ SavingsTransactionGeneralTabComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(SavingsTransactionGeneralTabComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts
new file mode 100644
index 000000000..4c331ffc8
--- /dev/null
+++ b/src/app/savings/savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component.ts
@@ -0,0 +1,67 @@
+import { Component, OnInit } from '@angular/core';
+import { MatDialog } from '@angular/material/dialog';
+import { ActivatedRoute, Router } from '@angular/router';
+import { Dates } from 'app/core/utils/dates';
+import { ReleaseAmountDialogComponent } from 'app/savings/savings-account-view/custom-dialogs/release-amount-dialog/release-amount-dialog.component';
+import { UndoTransactionDialogComponent } from 'app/savings/savings-account-view/custom-dialogs/undo-transaction-dialog/undo-transaction-dialog.component';
+import { SavingsService } from 'app/savings/savings.service';
+import { SettingsService } from 'app/settings/settings.service';
+
+@Component({
+ selector: 'mifosx-savings-transaction-general-tab',
+ templateUrl: './savings-transaction-general-tab.component.html',
+ styleUrls: ['./savings-transaction-general-tab.component.scss']
+})
+export class SavingsTransactionGeneralTabComponent implements OnInit {
+
+ accountId: string;
+ transactionId: string;
+ transactionData: any;
+
+ constructor(private savingsService: SavingsService,
+ private route: ActivatedRoute,
+ private dateUtils: Dates,
+ private router: Router,
+ public dialog: MatDialog,
+ private settingsService: SettingsService) {
+ this.route.data.subscribe((data: { savingsAccountTransaction: any }) => {
+ this.accountId = this.route.parent.snapshot.params['savingAccountId'];
+ this.transactionData = data.savingsAccountTransaction;
+ });
+ }
+
+ ngOnInit(): void {
+ }
+
+ releaseAmount(): void {
+ const releaseAmountDialogRef = this.dialog.open(ReleaseAmountDialogComponent);
+ releaseAmountDialogRef.afterClosed().subscribe((response: any) => {
+ if (response.confirm) {
+ const data = {};
+ this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId, 'releaseAmount', data, this.transactionData.id).subscribe(() => {
+ this.router.navigate(['../..'], { relativeTo: this.route });
+ });
+ }
+ });
+ }
+
+ undoTransaction(): void {
+ const undoTransactionAccountDialogRef = this.dialog.open(UndoTransactionDialogComponent);
+ undoTransactionAccountDialogRef.afterClosed().subscribe((response: any) => {
+ if (response.confirm) {
+ const locale = this.settingsService.language.code;
+ const dateFormat = this.settingsService.dateFormat;
+ const data = {
+ transactionDate: this.dateUtils.formatDate(this.transactionData.date && new Date(this.transactionData.date), dateFormat),
+ transactionAmount: 0,
+ dateFormat,
+ locale
+ };
+ this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId, 'undo', data, this.transactionData.id).subscribe(() => {
+ this.router.navigate(['../'], { relativeTo: this.route });
+ });
+ }
+ });
+ }
+
+}
diff --git a/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html b/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html
index e578a8d57..af16e478f 100644
--- a/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html
+++ b/src/app/savings/savings-account-view/transactions/view-transaction/view-transaction.component.html
@@ -1,110 +1,18 @@
-
-
-