@sachin9822/reports-lib 0.0.213 → 0.0.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.mjs +240 -0
- package/esm2020/lib/components/accounting-report/accounting-report.component.mjs +596 -0
- package/esm2020/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.mjs +218 -0
- package/esm2020/lib/components/branch-activity-send-report/branch-activity-send-report.component.mjs +243 -0
- package/esm2020/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.mjs +700 -0
- package/esm2020/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.mjs +255 -0
- package/esm2020/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.mjs +192 -0
- package/esm2020/lib/components/funding-report/funding-report.component.mjs +198 -0
- package/esm2020/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.mjs +244 -0
- package/esm2020/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.mjs +776 -0
- package/esm2020/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.mjs +266 -0
- package/esm2020/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.mjs +311 -0
- package/esm2020/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.mjs +658 -0
- package/esm2020/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.mjs +2 -0
- package/esm2020/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.mjs +2 -0
- package/esm2020/lib/models/accounting-report/accounting-report-branch-group.mjs +2 -0
- package/esm2020/lib/models/accounting-report/accounting-report-entry-model.mjs +2 -0
- package/esm2020/lib/models/accounting-report/accounting-report-model.mjs +2 -0
- package/esm2020/lib/models/accounting-report/accounting-report-sub-group.mjs +2 -0
- package/esm2020/lib/models/app-config.model.mjs +2 -0
- package/esm2020/lib/models/branch-activity-receive-report/branch-activity-receive.model.mjs +2 -0
- package/esm2020/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.mjs +6 -0
- package/esm2020/lib/models/branch-activity-report/branch-activity-send-report.mjs +3 -0
- package/esm2020/lib/models/cancellation-transaction-report/cancellation-transaction.model.mjs +10 -0
- package/esm2020/lib/models/component-loading-states.mjs +7 -0
- package/esm2020/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.mjs +5 -0
- package/esm2020/lib/models/revenue-per-transaction-report/revenue-per-transaction.model.mjs +2 -0
- package/esm2020/lib/models/statement-of-account-report/statement-of-accounts.model.mjs +2 -0
- package/esm2020/lib/models/transaction-enquiry-report/transaction-enquiry.model.mjs +8 -0
- package/esm2020/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.mjs +6 -0
- package/esm2020/lib/models/transaction-monitoring-report/transaction-monitoring-report.mjs +5 -0
- package/esm2020/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.mjs +3 -0
- package/esm2020/lib/reports-lib-routing.module.mjs +24 -0
- package/esm2020/lib/reports-lib.component.mjs +22 -0
- package/esm2020/lib/reports-lib.module.mjs +172 -0
- package/esm2020/lib/reports-lib.service.mjs +14 -0
- package/esm2020/lib/services/config.service.mjs +39 -0
- package/esm2020/lib/services/report.service.mjs +374 -0
- package/esm2020/lib/shared/export-generic.service.mjs +443 -0
- package/esm2020/lib/shared/export.service.mjs +379 -0
- package/esm2020/lib/shared/loader/loader.component.mjs +11 -0
- package/esm2020/lib/shared/metadata/metadata.component.mjs +51 -0
- package/esm2020/lib/shared/page-size-selector/page-size-selector.component.mjs +44 -0
- package/esm2020/lib/shared/search-filter/search-filter.component.mjs +2134 -0
- package/esm2020/lib/shared/shared.module.mjs +21 -0
- package/esm2020/public-api.mjs +41 -0
- package/esm2020/sachin9822-reports-lib.mjs +5 -0
- package/fesm2015/sachin9822-reports-lib.mjs +8429 -0
- package/fesm2015/sachin9822-reports-lib.mjs.map +1 -0
- package/fesm2020/sachin9822-reports-lib.mjs +8411 -0
- package/fesm2020/sachin9822-reports-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.d.ts +70 -0
- package/lib/components/accounting-report/accounting-report.component.d.ts +76 -0
- package/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.d.ts +58 -0
- package/lib/components/branch-activity-send-report/branch-activity-send-report.component.d.ts +69 -0
- package/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.d.ts +78 -0
- package/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.d.ts +95 -0
- package/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.d.ts +55 -0
- package/lib/components/funding-report/funding-report.component.d.ts +55 -0
- package/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.d.ts +57 -0
- package/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.d.ts +109 -0
- package/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.d.ts +76 -0
- package/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.d.ts +68 -0
- package/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.d.ts +72 -0
- package/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.d.ts +8 -0
- package/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.d.ts +18 -0
- package/lib/models/accounting-report/accounting-report-branch-group.d.ts +6 -0
- package/lib/models/accounting-report/accounting-report-entry-model.d.ts +24 -0
- package/lib/models/accounting-report/accounting-report-model.d.ts +6 -0
- package/{src/lib/models/accounting-report/accounting-report-sub-group.ts → lib/models/accounting-report/accounting-report-sub-group.d.ts} +2 -3
- package/{src/lib/models/app-config.model.ts → lib/models/app-config.model.d.ts} +7 -8
- package/lib/models/branch-activity-receive-report/branch-activity-receive.model.d.ts +18 -0
- package/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.d.ts +13 -0
- package/lib/models/branch-activity-report/branch-activity-send-report.d.ts +24 -0
- package/lib/models/cancellation-transaction-report/cancellation-transaction.model.d.ts +44 -0
- package/lib/models/component-loading-states.d.ts +5 -0
- package/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.d.ts +26 -0
- package/{src/lib/models/revenue-per-transaction-report/revenue-per-transaction.model.ts → lib/models/revenue-per-transaction-report/revenue-per-transaction.model.d.ts} +1 -1
- package/lib/models/statement-of-account-report/statement-of-accounts.model.d.ts +18 -0
- package/lib/models/transaction-enquiry-report/transaction-enquiry.model.d.ts +113 -0
- package/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.d.ts +13 -0
- package/lib/models/transaction-monitoring-report/transaction-monitoring-report.d.ts +23 -0
- package/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.d.ts +39 -0
- package/lib/reports-lib-routing.module.d.ts +7 -0
- package/lib/reports-lib.component.d.ts +8 -0
- package/lib/reports-lib.module.d.ts +33 -0
- package/lib/reports-lib.service.d.ts +6 -0
- package/lib/services/config.service.d.ts +20 -0
- package/lib/services/report.service.d.ts +80 -0
- package/lib/shared/export-generic.service.d.ts +50 -0
- package/lib/shared/export.service.d.ts +32 -0
- package/lib/shared/loader/loader.component.d.ts +5 -0
- package/lib/shared/metadata/metadata.component.d.ts +24 -0
- package/lib/shared/page-size-selector/page-size-selector.component.d.ts +15 -0
- package/lib/shared/search-filter/search-filter.component.d.ts +127 -0
- package/lib/shared/shared.module.d.ts +11 -0
- package/package.json +31 -16
- package/{src/public-api.ts → public-api.d.ts} +7 -17
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -17
- package/src/assets/images/BreadcrumbArrow.png +0 -0
- package/src/assets/images/XMCoral.png +0 -0
- package/src/lib/assets/images/Search.svg +0 -10
- package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.html +0 -27
- package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.scss +0 -46
- package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.spec.ts +0 -23
- package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.ts +0 -292
- package/src/lib/components/accounting-report/accounting-report.component.html +0 -64
- package/src/lib/components/accounting-report/accounting-report.component.scss +0 -24
- package/src/lib/components/accounting-report/accounting-report.component.spec.ts +0 -23
- package/src/lib/components/accounting-report/accounting-report.component.ts +0 -738
- package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.html +0 -46
- package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.scss +0 -2
- package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.spec.ts +0 -23
- package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.ts +0 -247
- package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.html +0 -46
- package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.scss +0 -3
- package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.spec.ts +0 -23
- package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.ts +0 -276
- package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.html +0 -51
- package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.scss +0 -7
- package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.spec.ts +0 -23
- package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.ts +0 -840
- package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.html +0 -68
- package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.scss +0 -65
- package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.spec.ts +0 -23
- package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.ts +0 -290
- package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.html +0 -25
- package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.scss +0 -1
- package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.spec.ts +0 -23
- package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.ts +0 -213
- package/src/lib/components/funding-report/funding-report.component.html +0 -49
- package/src/lib/components/funding-report/funding-report.component.scss +0 -1
- package/src/lib/components/funding-report/funding-report.component.spec.ts +0 -23
- package/src/lib/components/funding-report/funding-report.component.ts +0 -221
- package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.html +0 -26
- package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.scss +0 -1
- package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.spec.ts +0 -23
- package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.ts +0 -267
- package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.html +0 -95
- package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.scss +0 -54
- package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.spec.ts +0 -23
- package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.ts +0 -904
- package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.html +0 -49
- package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.scss +0 -2
- package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.spec.ts +0 -32
- package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.ts +0 -304
- package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.html +0 -46
- package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.scss +0 -7
- package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.ts +0 -343
- package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.html +0 -25
- package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.scss +0 -23
- package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.spec.ts +0 -23
- package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.ts +0 -745
- package/src/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.ts +0 -10
- package/src/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.ts +0 -20
- package/src/lib/models/accounting-report/accounting-report-branch-group.ts +0 -7
- package/src/lib/models/accounting-report/accounting-report-entry-model.ts +0 -25
- package/src/lib/models/accounting-report/accounting-report-model.ts +0 -7
- package/src/lib/models/branch-activity-receive-report/branch-activity-receive.model.ts +0 -18
- package/src/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.ts +0 -16
- package/src/lib/models/branch-activity-report/branch-activity-send-report.ts +0 -26
- package/src/lib/models/cancellation-transaction-report/cancellation-transaction.model.ts +0 -65
- package/src/lib/models/component-loading-states.ts +0 -5
- package/src/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.ts +0 -28
- package/src/lib/models/statement-of-account-report/statement-of-accounts.model.ts +0 -21
- package/src/lib/models/transaction-enquiry-report/transaction-enquiry.model.ts +0 -127
- package/src/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.ts +0 -16
- package/src/lib/models/transaction-monitoring-report/transaction-monitoring-report.ts +0 -29
- package/src/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.ts +0 -46
- package/src/lib/reports-lib-routing.module.ts +0 -20
- package/src/lib/reports-lib.component.spec.ts +0 -23
- package/src/lib/reports-lib.component.ts +0 -20
- package/src/lib/reports-lib.module.ts +0 -102
- package/src/lib/reports-lib.service.spec.ts +0 -16
- package/src/lib/reports-lib.service.ts +0 -9
- package/src/lib/services/config.service.ts +0 -43
- package/src/lib/services/report.service.spec.ts +0 -16
- package/src/lib/services/report.service.ts +0 -463
- package/src/lib/shared/export-generic.service.ts +0 -557
- package/src/lib/shared/export.service.spec.ts +0 -16
- package/src/lib/shared/export.service.ts +0 -457
- package/src/lib/shared/loader/loader.component.html +0 -8
- package/src/lib/shared/loader/loader.component.scss +0 -52
- package/src/lib/shared/loader/loader.component.ts +0 -10
- package/src/lib/shared/metadata/metadata.component.html +0 -42
- package/src/lib/shared/metadata/metadata.component.scss +0 -95
- package/src/lib/shared/metadata/metadata.component.spec.ts +0 -23
- package/src/lib/shared/metadata/metadata.component.ts +0 -38
- package/src/lib/shared/page-size-selector/page-size-selector.component.html +0 -7
- package/src/lib/shared/page-size-selector/page-size-selector.component.scss +0 -42
- package/src/lib/shared/page-size-selector/page-size-selector.component.spec.ts +0 -23
- package/src/lib/shared/page-size-selector/page-size-selector.component.ts +0 -38
- package/src/lib/shared/search-filter/search-filter.component.html +0 -601
- package/src/lib/shared/search-filter/search-filter.component.scss +0 -203
- package/src/lib/shared/search-filter/search-filter.component.spec.ts +0 -23
- package/src/lib/shared/search-filter/search-filter.component.ts +0 -2387
- package/src/lib/shared/shared.module.ts +0 -13
- package/src/styles/ag-grid-report-style.scss +0 -71
- package/src/styles/common-ag-grid-style.scss +0 -146
- package/src/styles/common-report-style.scss +0 -395
- package/src/styles/common-style.scss +0 -615
- package/src/test.ts +0 -27
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- /package/{src/lib → lib}/assets/config/app-config.json +0 -0
- /package/{src → lib}/assets/images/Search.svg +0 -0
- /package/{src/lib → lib}/assets/images/XMLogo.png +0 -0
- /package/{src/lib → lib}/assets/svg-loaders/blue-tail-spin.svg +0 -0
package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.html
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<lib-search-filter
|
|
2
|
-
[ReportName]="ReportName"
|
|
3
|
-
(searchClicked)="handleSearch($event)"
|
|
4
|
-
(formValid)="handleFormValid($event)"
|
|
5
|
-
>
|
|
6
|
-
</lib-search-filter>
|
|
7
|
-
|
|
8
|
-
<app-loader *ngIf="loadingState === ComponentLoadingState.Loading"></app-loader>
|
|
9
|
-
|
|
10
|
-
<span *ngIf="loadingState === ComponentLoadingState.Error">{{ errorMessage }}</span>
|
|
11
|
-
|
|
12
|
-
<div class="alert alert-warning mt-3" *ngIf="hasSearched && transactionData.length === 0 && loadingState === ComponentLoadingState.Complete">
|
|
13
|
-
No transactions found matching your search criteria.
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div *ngIf="transactionData && transactionData.length > 0 && loadingState === ComponentLoadingState.Complete && isFormValid">
|
|
17
|
-
|
|
18
|
-
<lib-metadata
|
|
19
|
-
[reportName]="ReportName"
|
|
20
|
-
[showmetaDataOne]="true"
|
|
21
|
-
[showmetaDataTwo]="true"
|
|
22
|
-
[metaDataOne]="metaDataOne"
|
|
23
|
-
[metaDataTwo]="metaDataTwo"
|
|
24
|
-
(exportEvent)="handleExport($event)"
|
|
25
|
-
(searchEvent)="filter($event)">
|
|
26
|
-
</lib-metadata>
|
|
27
|
-
|
|
28
|
-
<div style="position: relative;" *ngIf="filteredData.length > 0">
|
|
29
|
-
|
|
30
|
-
<lib-page-size-selector
|
|
31
|
-
[totalEntries]="transactionData.length"
|
|
32
|
-
[defaultSize]="'15'"
|
|
33
|
-
[gridApi]="gridApi">
|
|
34
|
-
</lib-page-size-selector>
|
|
35
|
-
|
|
36
|
-
<ag-grid-angular class="ag-theme-alpine transaction-grid"
|
|
37
|
-
[rowData]="filteredData"
|
|
38
|
-
[columnDefs]="columnDefs"
|
|
39
|
-
[defaultColDef]="defaultColDef"
|
|
40
|
-
[rowHeight]="22"
|
|
41
|
-
[pagination]="true"
|
|
42
|
-
[headerHeight]="30"
|
|
43
|
-
[paginationPageSize]="paginationPageSize"
|
|
44
|
-
(gridReady)="onGridReady($event)"
|
|
45
|
-
style="width: 100%; height: 435px;">
|
|
46
|
-
</ag-grid-angular>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
</div>
|
package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.spec.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { TransactionEnquiryComponent } from './transaction-enquiry-report.component';
|
|
4
|
-
import { describe, it } from 'node:test';
|
|
5
|
-
|
|
6
|
-
describe('TransactionEnquiryComponent', () => {
|
|
7
|
-
let component: TransactionEnquiryComponent;
|
|
8
|
-
let fixture: ComponentFixture<TransactionEnquiryComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule({
|
|
12
|
-
declarations: [ TransactionEnquiryComponent ]
|
|
13
|
-
})
|
|
14
|
-
.compileComponents();
|
|
15
|
-
|
|
16
|
-
fixture = TestBed.createComponent(TransactionEnquiryComponent);
|
|
17
|
-
component = fixture.componentInstance;
|
|
18
|
-
fixture.detectChanges();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('should create', () => {
|
|
22
|
-
expect(component).toBeTruthy();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
function beforeEach(arg0: () => Promise<void>) {
|
|
26
|
-
throw new Error('Function not implemented.');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function expect(component: TransactionEnquiryComponent) {
|
|
30
|
-
throw new Error('Function not implemented.');
|
|
31
|
-
}
|
|
32
|
-
|
package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.ts
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, ViewChild } from '@angular/core';
|
|
2
|
-
import { AgGridAngular } from 'ag-grid-angular';
|
|
3
|
-
import { GridOptions, ColDef, GridReadyEvent, GridApi, ColumnApi } from 'ag-grid-community';
|
|
4
|
-
import { Subject } from 'rxjs';
|
|
5
|
-
import { takeUntil, finalize } from 'rxjs/operators';
|
|
6
|
-
import { ReportService } from '../../services/report.service';
|
|
7
|
-
import { TransactionData, ComponentLoadingState } from '../../models/transaction-enquiry-report/transaction-enquiry.model';
|
|
8
|
-
import { ExportService } from '../../shared/export.service';
|
|
9
|
-
import { ConfigService } from '../../services/config.service';
|
|
10
|
-
import { formatDate } from '@angular/common';
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'app-transaction-enquiry',
|
|
14
|
-
templateUrl: './transaction-enquiry-report.component.html',
|
|
15
|
-
styleUrls: ['./transaction-enquiry-report.component.scss']
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
export class TransactionEnquiryComponent implements OnInit {
|
|
19
|
-
@ViewChild('agGrid') agGrid!: AgGridAngular;
|
|
20
|
-
|
|
21
|
-
private destroy$ = new Subject<void>();
|
|
22
|
-
gridApi!: GridApi;
|
|
23
|
-
searchText: string = '';
|
|
24
|
-
paginationPageSize: number = 15;
|
|
25
|
-
selectedExportOption: string = 'excel';
|
|
26
|
-
currentDateTime: Date = new Date();
|
|
27
|
-
|
|
28
|
-
exportFormats = [{ formatName: "Excel", code: 'excel' }, { formatName: "PDF", code: 'pdf' }, { formatName: "CSV", code: 'csv' }]
|
|
29
|
-
|
|
30
|
-
loadingState: ComponentLoadingState = ComponentLoadingState.Complete;
|
|
31
|
-
ComponentLoadingState = ComponentLoadingState;
|
|
32
|
-
isSearching: boolean = false;
|
|
33
|
-
hasSearched: boolean = false;
|
|
34
|
-
_errorMessage: string = '';
|
|
35
|
-
gridColumnApi: ColumnApi;
|
|
36
|
-
|
|
37
|
-
token = sessionStorage.getItem('access_token');
|
|
38
|
-
applicationType = 'ezremit';
|
|
39
|
-
companyCode = 'BH';
|
|
40
|
-
serviceUrl: string;
|
|
41
|
-
searchCriteria: [string, string][];
|
|
42
|
-
|
|
43
|
-
transactionData: TransactionData[] = [];
|
|
44
|
-
ReportName = "Transaction Enquiry";
|
|
45
|
-
metaDataOne: Record<string, string>;
|
|
46
|
-
metaDataTwo: Record<string, string>;
|
|
47
|
-
filteredData: TransactionData[] = [];
|
|
48
|
-
reportUserandTime: string = '';
|
|
49
|
-
reportPeriod: string = '';
|
|
50
|
-
user: any;
|
|
51
|
-
isFormValid: boolean = false;
|
|
52
|
-
|
|
53
|
-
// AG Grid Column Definitions
|
|
54
|
-
columnDefs: ColDef[] = [
|
|
55
|
-
{ headerName: 'Product', field: 'product', flex: 1, minWidth: 70, tooltipField: 'product' },
|
|
56
|
-
{ headerName: 'User Id', field: 'id', flex: 1, minWidth: 70, cellClass: '', tooltipField: 'id' },
|
|
57
|
-
{
|
|
58
|
-
headerName: 'Transaction Number', field: 'transactionNumber', tooltipField: 'transactionNumber',
|
|
59
|
-
cellRenderer: (params: any) => {
|
|
60
|
-
const url = this.buildTransactionDetailsUrl(params.value);
|
|
61
|
-
return `<a href="${url}" target="_blank" rel="noopener noreferrer">${params.value}</a>`;
|
|
62
|
-
},
|
|
63
|
-
flex: 1, minWidth: 100, cellClass: 'transaction-link-cell'
|
|
64
|
-
},
|
|
65
|
-
{ headerName: 'Transaction Ref Number', field: 'transactionReferenceNumber', flex: 1, minWidth: 100, tooltipField: 'transactionReferenceNumber' },
|
|
66
|
-
{ headerName: 'Transaction Date', field: 'businessDate', flex: 1, minWidth: 75, tooltipField: 'businessDate' },
|
|
67
|
-
{ headerName: 'Send Client', field: 'sendAgent', flex: 1, minWidth: 120, tooltipField: 'sendAgent' },
|
|
68
|
-
{ headerName: 'Send Client Branch', field: 'sendAgtBranch', flex: 1, minWidth: 120, tooltipField: 'sendAgtBranch' },
|
|
69
|
-
{ headerName: 'Receive Client', field: 'recvAgent', flex: 1, minWidth: 120, tooltipField: 'recvAgent' },
|
|
70
|
-
{ headerName: 'Receive Client Branch', field: 'rcvAgtBranch', flex: 1, minWidth: 120, tooltipField: 'rcvAgtBranch' },
|
|
71
|
-
{ headerName: 'Sender Name', field: 'sendName', flex: 1, minWidth: 120, tooltipField: 'sendName' },
|
|
72
|
-
{ headerName: 'Sender ID Type', field: 'sendIdType', flex: 1, minWidth: 90, tooltipField: 'sendIdType' },
|
|
73
|
-
{ headerName: 'Sender ID Number', field: 'sendIdNumber', flex: 1, minWidth: 85, tooltipField: 'sendIdNumber' },
|
|
74
|
-
{ headerName: 'Benf. Name', field: 'benName', flex: 1, minWidth: 100, tooltipField: 'benName' },
|
|
75
|
-
{ headerName: 'Receive Currency', field: 'payOutCurrency', flex: 1, minWidth: 80, tooltipField: 'payOutCurrency' },
|
|
76
|
-
{ headerName: 'Receive Amount', field: 'payOutAmount', flex: 1, minWidth: 100, cellClass: 'ag-right-aligned-cell ', tooltipField: 'payOutAmount' },
|
|
77
|
-
{ headerName: 'Send Currency', field: 'payInCurrency', flex: 1, minWidth: 70, tooltipField: 'payInCurrency' },
|
|
78
|
-
{ headerName: 'Send Amount', field: 'payInAmount', flex: 1, minWidth: 100, cellClass: 'ag-right-aligned-cell', tooltipField: 'payInAmount' },
|
|
79
|
-
{ headerName: 'Service Fee', field: 'commission', flex: 1, minWidth: 80, cellClass: 'ag-right-aligned-cell', tooltipField: 'commission' },
|
|
80
|
-
{ headerName: 'Transaction Status', field: 'transactionStatus', flex: 1, minWidth: 98, cellClass: 'status-cell', tooltipField: 'transactionStatus' }
|
|
81
|
-
];
|
|
82
|
-
|
|
83
|
-
defaultColDef = {
|
|
84
|
-
sortable: true,
|
|
85
|
-
filter: true,
|
|
86
|
-
resizable: true,
|
|
87
|
-
minwidth: 40,
|
|
88
|
-
wrapHeaderText: true,
|
|
89
|
-
autoHeaderHeight: true,
|
|
90
|
-
suppressSizeToFit: false,
|
|
91
|
-
wrapText: true,
|
|
92
|
-
autoHeight: true
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
private buildTransactionDetailsUrl(transactionNumber: string): string {
|
|
97
|
-
const baseUrl = this.serviceUrl;
|
|
98
|
-
const token = this.token;
|
|
99
|
-
const userName = this.user;
|
|
100
|
-
const applicationType = this.applicationType;
|
|
101
|
-
|
|
102
|
-
return `${baseUrl}/api/v1/RetailTransaction/GetTransactionDetailsHtmlView` +
|
|
103
|
-
`?transactionNumber=${transactionNumber}&applicationType=${applicationType}` +
|
|
104
|
-
`&access_token=${token}&userName=${userName}`;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
constructor(
|
|
108
|
-
private reportService: ReportService,
|
|
109
|
-
private exportService: ExportService,
|
|
110
|
-
private config: ConfigService
|
|
111
|
-
) {
|
|
112
|
-
this.serviceUrl = this.config.get.serviceUrl;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
ngOnInit(): void {
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
ngOnDestroy(): void {
|
|
119
|
-
this.destroy$.next();
|
|
120
|
-
this.destroy$.complete();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
handleSearch(criteria: any): void {
|
|
124
|
-
this.searchCriteria = criteria.searchCriteria;
|
|
125
|
-
this.loadingState = ComponentLoadingState.Loading;
|
|
126
|
-
this.errorMessage = '';
|
|
127
|
-
this.transactionData = [];
|
|
128
|
-
this.hasSearched = false;
|
|
129
|
-
this.searchText = '';
|
|
130
|
-
this.selectedExportOption = 'excel';
|
|
131
|
-
this.user = criteria.sysUserID;
|
|
132
|
-
this.reportUserandTime = `${criteria.sysUserID} @ ${formatDate(this.currentDateTime, 'dd/MM/yyyy hh:mm a', 'en-US')}`;
|
|
133
|
-
this.reportPeriod = criteria.reportPeriod;
|
|
134
|
-
|
|
135
|
-
var modal = criteria.modal;
|
|
136
|
-
const payload = {
|
|
137
|
-
client: modal.client,
|
|
138
|
-
fromDate: modal.fromDate,
|
|
139
|
-
toDate: modal.toDate,
|
|
140
|
-
branch: modal.branch,
|
|
141
|
-
currency: modal.currency,
|
|
142
|
-
product: modal.product,
|
|
143
|
-
transactionStatus: modal.transactionStatus.join(","),
|
|
144
|
-
transactionNo: (modal.transactionNo || '').trim()
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
try {
|
|
148
|
-
const sdate = new Date(payload?.fromDate);
|
|
149
|
-
const edate = new Date(payload?.toDate);
|
|
150
|
-
payload.fromDate = sdate.toISOString().split("T")[0];
|
|
151
|
-
payload.toDate = edate.toISOString().split("T")[0];
|
|
152
|
-
} catch (err) {
|
|
153
|
-
throw new Error("Invalid Date");
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
console.log(payload)
|
|
157
|
-
this.metaDataOne = {
|
|
158
|
-
'Report Period': criteria.reportPeriod
|
|
159
|
-
}
|
|
160
|
-
this.metaDataTwo = {
|
|
161
|
-
'Report User & Time': this.reportUserandTime
|
|
162
|
-
}
|
|
163
|
-
this.searchCriteria = criteria.searchCriteria;
|
|
164
|
-
|
|
165
|
-
this.reportService.searchTransactions(payload)
|
|
166
|
-
.pipe(
|
|
167
|
-
takeUntil(this.destroy$),
|
|
168
|
-
finalize(() => {
|
|
169
|
-
this.loadingState = ComponentLoadingState.Complete;
|
|
170
|
-
this.hasSearched = true;
|
|
171
|
-
})
|
|
172
|
-
)
|
|
173
|
-
.subscribe({
|
|
174
|
-
next: data => {
|
|
175
|
-
this.transactionData = Array.isArray(data) ? data : [];
|
|
176
|
-
this.filteredData = [...this.transactionData];
|
|
177
|
-
if (this.gridApi) {
|
|
178
|
-
this.gridApi.setRowData(this.filteredData);
|
|
179
|
-
} else {
|
|
180
|
-
console.error('Grid API is not initialized!');
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
error: err => {
|
|
184
|
-
this.errorMessage = 'Failed to fetch transaction data. Please try again.';
|
|
185
|
-
this.loadingState = ComponentLoadingState.Error;
|
|
186
|
-
console.error('Search error:', err);
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
filter(text: string): void {
|
|
192
|
-
this.searchText = text.trim();
|
|
193
|
-
if (this.searchText.length === 0) {
|
|
194
|
-
this.filteredData = [...this.transactionData];
|
|
195
|
-
} else {
|
|
196
|
-
this.filteredData = this.transactionData.filter(row =>
|
|
197
|
-
Object.values(row).some(val =>
|
|
198
|
-
String(val).toLowerCase().includes(this.searchText.toLowerCase())
|
|
199
|
-
)
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
onGridReady(params: GridReadyEvent): void {
|
|
205
|
-
this.gridApi = params.api;
|
|
206
|
-
this.gridColumnApi = params.columnApi;
|
|
207
|
-
this.gridApi.sizeColumnsToFit();
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
clearError(): void {
|
|
211
|
-
this.errorMessage = '';
|
|
212
|
-
this.loadingState = ComponentLoadingState.Complete;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
get isLoading(): boolean {
|
|
216
|
-
return this.loadingState === ComponentLoadingState.Loading;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
get isError(): boolean {
|
|
220
|
-
return this.loadingState === ComponentLoadingState.Error;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
get errorMessage(): string {
|
|
224
|
-
return this._errorMessage;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
set errorMessage(value: string) {
|
|
228
|
-
this._errorMessage = value;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
onExportChange(value: string): void {
|
|
232
|
-
this.selectedExportOption = value;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
handleExport(option: string): void {
|
|
236
|
-
this.selectedExportOption = option;
|
|
237
|
-
if (this.selectedExportOption === 'pdf') {
|
|
238
|
-
this.exportToPDF();
|
|
239
|
-
} else if (this.selectedExportOption === 'excel') {
|
|
240
|
-
this.exportToExcel();
|
|
241
|
-
} else if (this.selectedExportOption === 'csv') {
|
|
242
|
-
this.exportToCSV();
|
|
243
|
-
} else {
|
|
244
|
-
alert('Please select a valid export format.');
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
exportToPDF(): void {
|
|
249
|
-
if (!this.transactionData?.length) return;
|
|
250
|
-
|
|
251
|
-
const title = 'Transaction Enquiry';
|
|
252
|
-
const metadata = this.exportService.generateReportMetadata([
|
|
253
|
-
['Report Period :', this.reportPeriod],
|
|
254
|
-
['Report User & Time :', this.reportUserandTime]
|
|
255
|
-
]);
|
|
256
|
-
const { headers, rows } = this.exportService.prepareExportTable(this.transactionData, this.columnDefs, {
|
|
257
|
-
currencyFields: []
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
this.exportService.exportToPdfUniversal(title, metadata, this.searchCriteria, headers, rows, 'Transaction_Enquiry.pdf')
|
|
261
|
-
.then(() => {
|
|
262
|
-
console.log('PDF export completed.');
|
|
263
|
-
})
|
|
264
|
-
.catch(err => {
|
|
265
|
-
console.error('PDF export failed:', err);
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
exportToExcel(): void {
|
|
270
|
-
if (!this.transactionData?.length) return;
|
|
271
|
-
|
|
272
|
-
const title = 'Transaction Enquiry';
|
|
273
|
-
const metadata = this.exportService.generateReportMetadata([
|
|
274
|
-
['Report Period ', this.reportPeriod],
|
|
275
|
-
['Report User & Time ', this.reportUserandTime]
|
|
276
|
-
]);
|
|
277
|
-
|
|
278
|
-
const { headers, rows } = this.exportService.prepareExportTable(this.transactionData, this.columnDefs, {
|
|
279
|
-
currencyFields: []
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
this.exportService.exportToExcelUniversal(title, metadata, this.searchCriteria, headers, rows, 'Transaction_Enquiry.xlsx');
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
exportToCSV(): void {
|
|
286
|
-
if (!this.transactionData?.length) return;
|
|
287
|
-
|
|
288
|
-
const title = 'Transaction Enquiry';
|
|
289
|
-
const metadata = this.exportService.generateReportMetadata([
|
|
290
|
-
['Report Period: ', this.reportPeriod],
|
|
291
|
-
['Report User & Time: ', this.reportUserandTime]
|
|
292
|
-
]);
|
|
293
|
-
|
|
294
|
-
const { headers, rows } = this.exportService.prepareExportTable(this.transactionData, this.columnDefs, {
|
|
295
|
-
currencyFields: []
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
this.exportService.exportToCsvUniversal(title, metadata, this.searchCriteria, headers, rows, 'Transaction_Enquiry.csv');
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
handleFormValid(isValid: boolean): void {
|
|
302
|
-
this.isFormValid = isValid;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<lib-search-filter
|
|
2
|
-
[ReportName]="ReportName"
|
|
3
|
-
[initialFilters]="initialFilters"
|
|
4
|
-
(searchClicked)="handleSearch($event)"
|
|
5
|
-
(formValid)="handleFormValid($event)">
|
|
6
|
-
</lib-search-filter>
|
|
7
|
-
<app-loader class="" *ngIf="loadingState == ComponentLoadingState.Loading"></app-loader>
|
|
8
|
-
|
|
9
|
-
<section *ngIf="showReport && isFormValid" class="my-2">
|
|
10
|
-
<ng-container *ngIf="!noDataFound">
|
|
11
|
-
<lib-metadata [reportName]="ReportName" [showmetaDataOne]="true" [showmetaDataTwo]="true" [metaDataOne]="leftData" [metaDataTwo]="metaDataTwo"(exportEvent)="handleExport($event)" (searchEvent)="filter($event)"></lib-metadata>
|
|
12
|
-
|
|
13
|
-
<ngb-accordion #acc="ngbAccordion" [closeOthers]="false">
|
|
14
|
-
<!-- <ng-container *ngFor="let item of filteredData | keyvalue; let i = index"> -->
|
|
15
|
-
<ng-container *ngFor="let item of filteredData | keyvalue: statusOrderComparator; let i = index">
|
|
16
|
-
<ngb-panel *ngIf="item.value.length > 0" [id]="'panel-' + i">
|
|
17
|
-
|
|
18
|
-
<ng-template ngbPanelTitle style="height: 10%;">
|
|
19
|
-
<label
|
|
20
|
-
class="panel-cls">{{
|
|
21
|
-
item.key }} - {{item.value.length
|
|
22
|
-
}}</label>
|
|
23
|
-
</ng-template>
|
|
24
|
-
|
|
25
|
-
<ng-template ngbPanelContent>
|
|
26
|
-
<div style="position: relative;">
|
|
27
|
-
<lib-page-size-selector [totalEntries]="item?.value?.length"
|
|
28
|
-
[defaultSize]="'15'" [gridApi]="gridApis[i]">
|
|
29
|
-
></lib-page-size-selector>
|
|
30
|
-
|
|
31
|
-
<ag-grid-angular class="ag-theme-alpine transaction-grid" style="width: 100%;height: 380px;"
|
|
32
|
-
[columnDefs]="columnDefs" [defaultColDef]="defaultColDef" [rowData]="item.value" [rowHeight]="20"
|
|
33
|
-
[headerHeight]="22"[pagination]="true" [paginationPageSize]="paginationArray[i]" (gridReady)="onGridReady($event,i)"
|
|
34
|
-
>
|
|
35
|
-
</ag-grid-angular>
|
|
36
|
-
</div>
|
|
37
|
-
</ng-template>
|
|
38
|
-
|
|
39
|
-
</ngb-panel>
|
|
40
|
-
</ng-container>
|
|
41
|
-
</ngb-accordion>
|
|
42
|
-
</ng-container>
|
|
43
|
-
<div class="alert alert-warning mt-3" *ngIf="noDataFound">
|
|
44
|
-
No Data found matching your search criteria.
|
|
45
|
-
</div>
|
|
46
|
-
</section>
|