-
-
-
Name
-
{{clientChoice.value.displayName}}
-
-
-
Id
-
{{clientChoice.value.id}}
-
-
-
Office
-
{{clientChoice.value.officeName}}
+
+
+ {{ client.displayName }}
+
+
+
+
+
+
+
Name
+
{{clientChoice.value.displayName}}
+
+
+
Id
+
{{clientChoice.value.id}}
+
+
+
Office
+
{{clientChoice.value.officeName}}
+
+
+
+
+
+
+ Client Members
+
+
+
+
{{client.displayName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- Client Members
-
-
-
-
{{client.displayName}}
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts
index d1cb5c7a5..c62593610 100644
--- a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts
+++ b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts
@@ -15,6 +15,7 @@ import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base';
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
import { MatTableDataSource } from '@angular/material/table';
import { LoanTransactionType } from 'app/loans/models/loan-transaction-type.model';
+import { AlertService } from 'app/core/alert/alert.service';
/** Custom Dialogs */
@@ -57,6 +58,7 @@ export class ViewTransactionComponent implements OnInit {
* @param {MatDialog} dialog Dialog reference.
* @param {Dates} dateUtils Date Utils.
* @param {SettingsService} settingsService Settings Service
+ * @param {AlertService} alertService Alert Service
*/
constructor(private loansService: LoansService,
private route: ActivatedRoute,
@@ -64,12 +66,12 @@ export class ViewTransactionComponent implements OnInit {
private router: Router,
public dialog: MatDialog,
private settingsService: SettingsService,
- private organizationService: OrganizationService) {
+ 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);
this.allowUndo = !this.transactionData.manuallyReversed;
- console.log(this.transactionData.type);
this.allowChargeback = this.allowChargebackTransaction(this.transactionData.type) && !this.transactionData.manuallyReversed;
let transactionsChargebackRelated = false;
if (this.allowChargeback) {
@@ -187,6 +189,9 @@ export class ViewTransactionComponent implements OnInit {
this.loansService.executeLoansAccountTransactionsCommand(accountId, 'chargeback', payload, this.transactionData.id).subscribe(() => {
this.router.navigate(['../'], { relativeTo: this.route });
});
+ } else {
+ this.alertService.alert({ type: 'BusinessRule',
+ message: 'Chargeback amount must be lower or equal to: ' + this.amountRelationsAllowed });
}
}
});
diff --git a/src/app/reports/run-report/table-and-sms/table-and-sms.component.html b/src/app/reports/run-report/table-and-sms/table-and-sms.component.html
index 9362721b1..d5c65e28b 100644
--- a/src/app/reports/run-report/table-and-sms/table-and-sms.component.html
+++ b/src/app/reports/run-report/table-and-sms/table-and-sms.component.html
@@ -1,32 +1,53 @@
-
+
-
-
-
+
-
-
-
-
- {{column}} |
-
- {{toDecimal(param.row[i])}}
- {{param.row[i]}}
- |
-
+
+
+
+
+
+
+
+
+ | {{column}} |
+
+ {{toDecimal(param.row[i])}}
+ {{param.row[i]}}
+ |
+
+
+
+
+
+
+
+
+
+
+
+ No report data was generated
-
|
-
|
-
-
-
-
-
-
-
- No report data was generated
+
+
+
+
+ The report request has been sent and the report will be exported to file repository
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/reports/run-report/table-and-sms/table-and-sms.component.scss b/src/app/reports/run-report/table-and-sms/table-and-sms.component.scss
index fb1e08cda..f9d6a5b90 100644
--- a/src/app/reports/run-report/table-and-sms/table-and-sms.component.scss
+++ b/src/app/reports/run-report/table-and-sms/table-and-sms.component.scss
@@ -11,3 +11,10 @@
margin-left: 5px;
margin-right: 5px;
}
+
+.back-button {
+ text-align: center;
+ margin-top: 25px;
+ max-height: 2%;
+ margin-bottom: 2%;
+}
diff --git a/src/app/reports/run-report/table-and-sms/table-and-sms.component.ts b/src/app/reports/run-report/table-and-sms/table-and-sms.component.ts
index 64bad491b..f37d5e08f 100644
--- a/src/app/reports/run-report/table-and-sms/table-and-sms.component.ts
+++ b/src/app/reports/run-report/table-and-sms/table-and-sms.component.ts
@@ -31,6 +31,7 @@ export class TableAndSmsComponent implements OnChanges {
/** Data to be converted into CSV file */
csvData: any;
notExistsReportData = false;
+ toBeExportedToRepo = false;
/** Paginator for run-report table. */
@ViewChild(MatPaginator) paginator: MatPaginator;
@@ -53,15 +54,19 @@ export class TableAndSmsComponent implements OnChanges {
}
getRunReportData() {
+ const exportS3 = this.dataObject.formData.exportS3;
this.reportsService.getRunReportData(this.dataObject.report.name, this.dataObject.formData)
.subscribe( (res: any) => {
- this.csvData = res.data;
- this.notExistsReportData = (res.data.length === 0);
- this.setOutputTable(res.data);
- res.columnHeaders.forEach((header: any) => {
- this.columnTypes.push(header.columnDisplayType);
- this.displayedColumns.push(header.columnName);
- });
+ this.toBeExportedToRepo = exportS3;
+ if (!this.toBeExportedToRepo) {
+ this.csvData = res.data;
+ this.notExistsReportData = (res.data.length === 0);
+ this.setOutputTable(res.data);
+ res.columnHeaders.forEach((header: any) => {
+ this.columnTypes.push(header.columnDisplayType);
+ this.displayedColumns.push(header.columnName);
+ });
+ }
this.hideOutput = false;
});
}