@sachin9822/reports-lib 0.0.211 → 0.0.212
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/karma.conf.js +44 -0
- package/ng-package.json +17 -0
- package/package.json +16 -31
- package/src/assets/images/BreadcrumbArrow.png +0 -0
- package/src/lib/assets/images/Search.svg +10 -0
- package/src/lib/assets/images/XMLogo.png +0 -0
- package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.html +27 -0
- package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.scss +46 -0
- package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.spec.ts +23 -0
- package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.ts +292 -0
- package/src/lib/components/accounting-report/accounting-report.component.html +64 -0
- package/src/lib/components/accounting-report/accounting-report.component.scss +24 -0
- package/src/lib/components/accounting-report/accounting-report.component.spec.ts +23 -0
- package/src/lib/components/accounting-report/accounting-report.component.ts +738 -0
- package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.html +46 -0
- package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.scss +2 -0
- package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.spec.ts +23 -0
- package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.ts +247 -0
- package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.html +46 -0
- package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.scss +3 -0
- package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.spec.ts +23 -0
- package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.ts +276 -0
- package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.html +51 -0
- package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.scss +7 -0
- package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.spec.ts +23 -0
- package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.ts +840 -0
- package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.html +68 -0
- package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.scss +65 -0
- package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.spec.ts +23 -0
- package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.ts +290 -0
- package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.html +25 -0
- package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.scss +1 -0
- package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.spec.ts +23 -0
- package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.ts +213 -0
- package/src/lib/components/funding-report/funding-report.component.html +49 -0
- package/src/lib/components/funding-report/funding-report.component.scss +1 -0
- package/src/lib/components/funding-report/funding-report.component.spec.ts +23 -0
- package/src/lib/components/funding-report/funding-report.component.ts +221 -0
- package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.html +26 -0
- package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.scss +1 -0
- package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.spec.ts +23 -0
- package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.ts +267 -0
- package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.html +95 -0
- package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.scss +54 -0
- package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.spec.ts +23 -0
- package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.ts +904 -0
- package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.html +49 -0
- package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.scss +2 -0
- package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.spec.ts +32 -0
- package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.ts +304 -0
- package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.html +46 -0
- package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.scss +7 -0
- package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.ts +343 -0
- package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.html +25 -0
- package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.scss +23 -0
- package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.spec.ts +23 -0
- package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.ts +745 -0
- package/src/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.ts +10 -0
- package/src/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.ts +20 -0
- package/src/lib/models/accounting-report/accounting-report-branch-group.ts +7 -0
- package/src/lib/models/accounting-report/accounting-report-entry-model.ts +25 -0
- package/src/lib/models/accounting-report/accounting-report-model.ts +7 -0
- package/{lib/models/accounting-report/accounting-report-sub-group.d.ts → src/lib/models/accounting-report/accounting-report-sub-group.ts} +3 -2
- package/{lib/models/app-config.model.d.ts → src/lib/models/app-config.model.ts} +8 -7
- package/src/lib/models/branch-activity-receive-report/branch-activity-receive.model.ts +18 -0
- package/src/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.ts +16 -0
- package/src/lib/models/branch-activity-report/branch-activity-send-report.ts +26 -0
- package/src/lib/models/cancellation-transaction-report/cancellation-transaction.model.ts +65 -0
- package/src/lib/models/component-loading-states.ts +5 -0
- package/src/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.ts +28 -0
- package/{lib/models/revenue-per-transaction-report/revenue-per-transaction.model.d.ts → src/lib/models/revenue-per-transaction-report/revenue-per-transaction.model.ts} +1 -1
- package/src/lib/models/statement-of-account-report/statement-of-accounts.model.ts +21 -0
- package/src/lib/models/transaction-enquiry-report/transaction-enquiry.model.ts +127 -0
- package/src/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.ts +16 -0
- package/src/lib/models/transaction-monitoring-report/transaction-monitoring-report.ts +29 -0
- package/src/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.ts +46 -0
- package/src/lib/reports-lib-routing.module.ts +20 -0
- package/src/lib/reports-lib.component.spec.ts +23 -0
- package/src/lib/reports-lib.component.ts +20 -0
- package/src/lib/reports-lib.module.ts +102 -0
- package/src/lib/reports-lib.service.spec.ts +16 -0
- package/src/lib/reports-lib.service.ts +9 -0
- package/src/lib/services/config.service.ts +43 -0
- package/src/lib/services/report.service.spec.ts +16 -0
- package/src/lib/services/report.service.ts +463 -0
- package/src/lib/shared/export-generic.service.ts +557 -0
- package/src/lib/shared/export.service.spec.ts +16 -0
- package/src/lib/shared/export.service.ts +457 -0
- package/src/lib/shared/loader/loader.component.html +8 -0
- package/src/lib/shared/loader/loader.component.scss +52 -0
- package/src/lib/shared/loader/loader.component.ts +10 -0
- package/src/lib/shared/metadata/metadata.component.html +42 -0
- package/src/lib/shared/metadata/metadata.component.scss +95 -0
- package/src/lib/shared/metadata/metadata.component.spec.ts +23 -0
- package/src/lib/shared/metadata/metadata.component.ts +38 -0
- package/src/lib/shared/page-size-selector/page-size-selector.component.html +7 -0
- package/src/lib/shared/page-size-selector/page-size-selector.component.scss +42 -0
- package/src/lib/shared/page-size-selector/page-size-selector.component.spec.ts +23 -0
- package/src/lib/shared/page-size-selector/page-size-selector.component.ts +38 -0
- package/src/lib/shared/search-filter/search-filter.component.html +601 -0
- package/src/lib/shared/search-filter/search-filter.component.scss +203 -0
- package/src/lib/shared/search-filter/search-filter.component.spec.ts +23 -0
- package/src/lib/shared/search-filter/search-filter.component.ts +2387 -0
- package/src/lib/shared/shared.module.ts +13 -0
- package/{public-api.d.ts → src/public-api.ts} +17 -7
- package/src/styles/ag-grid-report-style.scss +71 -0
- package/src/styles/common-ag-grid-style.scss +146 -0
- package/src/styles/common-report-style.scss +395 -0
- package/src/styles/common-style.scss +615 -0
- package/src/test.ts +27 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2020/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.mjs +0 -240
- package/esm2020/lib/components/accounting-report/accounting-report.component.mjs +0 -596
- package/esm2020/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.mjs +0 -218
- package/esm2020/lib/components/branch-activity-send-report/branch-activity-send-report.component.mjs +0 -243
- package/esm2020/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.mjs +0 -700
- package/esm2020/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.mjs +0 -255
- package/esm2020/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.mjs +0 -192
- package/esm2020/lib/components/funding-report/funding-report.component.mjs +0 -198
- package/esm2020/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.mjs +0 -244
- package/esm2020/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.mjs +0 -776
- package/esm2020/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.mjs +0 -266
- package/esm2020/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.mjs +0 -311
- package/esm2020/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.mjs +0 -631
- package/esm2020/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.mjs +0 -2
- package/esm2020/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.mjs +0 -2
- package/esm2020/lib/models/accounting-report/accounting-report-branch-group.mjs +0 -2
- package/esm2020/lib/models/accounting-report/accounting-report-entry-model.mjs +0 -2
- package/esm2020/lib/models/accounting-report/accounting-report-model.mjs +0 -2
- package/esm2020/lib/models/accounting-report/accounting-report-sub-group.mjs +0 -2
- package/esm2020/lib/models/app-config.model.mjs +0 -2
- package/esm2020/lib/models/branch-activity-receive-report/branch-activity-receive.model.mjs +0 -2
- package/esm2020/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.mjs +0 -6
- package/esm2020/lib/models/branch-activity-report/branch-activity-send-report.mjs +0 -3
- package/esm2020/lib/models/cancellation-transaction-report/cancellation-transaction.model.mjs +0 -10
- package/esm2020/lib/models/component-loading-states.mjs +0 -7
- package/esm2020/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.mjs +0 -5
- package/esm2020/lib/models/revenue-per-transaction-report/revenue-per-transaction.model.mjs +0 -2
- package/esm2020/lib/models/statement-of-account-report/statement-of-accounts.model.mjs +0 -2
- package/esm2020/lib/models/transaction-enquiry-report/transaction-enquiry.model.mjs +0 -8
- package/esm2020/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.mjs +0 -6
- package/esm2020/lib/models/transaction-monitoring-report/transaction-monitoring-report.mjs +0 -5
- package/esm2020/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.mjs +0 -3
- package/esm2020/lib/reports-lib-routing.module.mjs +0 -24
- package/esm2020/lib/reports-lib.component.mjs +0 -22
- package/esm2020/lib/reports-lib.module.mjs +0 -172
- package/esm2020/lib/reports-lib.service.mjs +0 -14
- package/esm2020/lib/services/config.service.mjs +0 -39
- package/esm2020/lib/services/report.service.mjs +0 -374
- package/esm2020/lib/shared/export-generic.service.mjs +0 -443
- package/esm2020/lib/shared/export.service.mjs +0 -379
- package/esm2020/lib/shared/loader/loader.component.mjs +0 -11
- package/esm2020/lib/shared/metadata/metadata.component.mjs +0 -51
- package/esm2020/lib/shared/page-size-selector/page-size-selector.component.mjs +0 -44
- package/esm2020/lib/shared/search-filter/search-filter.component.mjs +0 -2134
- package/esm2020/lib/shared/shared.module.mjs +0 -21
- package/esm2020/public-api.mjs +0 -41
- package/esm2020/sachin9822-reports-lib.mjs +0 -5
- package/fesm2015/sachin9822-reports-lib.mjs +0 -8402
- package/fesm2015/sachin9822-reports-lib.mjs.map +0 -1
- package/fesm2020/sachin9822-reports-lib.mjs +0 -8384
- package/fesm2020/sachin9822-reports-lib.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.d.ts +0 -70
- package/lib/components/accounting-report/accounting-report.component.d.ts +0 -76
- package/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.d.ts +0 -58
- package/lib/components/branch-activity-send-report/branch-activity-send-report.component.d.ts +0 -69
- package/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.d.ts +0 -78
- package/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.d.ts +0 -95
- package/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.d.ts +0 -55
- package/lib/components/funding-report/funding-report.component.d.ts +0 -55
- package/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.d.ts +0 -57
- package/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.d.ts +0 -109
- package/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.d.ts +0 -76
- package/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.d.ts +0 -68
- package/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.d.ts +0 -71
- package/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.d.ts +0 -8
- package/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.d.ts +0 -18
- package/lib/models/accounting-report/accounting-report-branch-group.d.ts +0 -6
- package/lib/models/accounting-report/accounting-report-entry-model.d.ts +0 -24
- package/lib/models/accounting-report/accounting-report-model.d.ts +0 -6
- package/lib/models/branch-activity-receive-report/branch-activity-receive.model.d.ts +0 -18
- package/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.d.ts +0 -13
- package/lib/models/branch-activity-report/branch-activity-send-report.d.ts +0 -24
- package/lib/models/cancellation-transaction-report/cancellation-transaction.model.d.ts +0 -44
- package/lib/models/component-loading-states.d.ts +0 -5
- package/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.d.ts +0 -26
- package/lib/models/statement-of-account-report/statement-of-accounts.model.d.ts +0 -18
- package/lib/models/transaction-enquiry-report/transaction-enquiry.model.d.ts +0 -113
- package/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.d.ts +0 -13
- package/lib/models/transaction-monitoring-report/transaction-monitoring-report.d.ts +0 -23
- package/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.d.ts +0 -38
- package/lib/reports-lib-routing.module.d.ts +0 -7
- package/lib/reports-lib.component.d.ts +0 -8
- package/lib/reports-lib.module.d.ts +0 -33
- package/lib/reports-lib.service.d.ts +0 -6
- package/lib/services/config.service.d.ts +0 -20
- package/lib/services/report.service.d.ts +0 -80
- package/lib/shared/export-generic.service.d.ts +0 -50
- package/lib/shared/export.service.d.ts +0 -32
- package/lib/shared/loader/loader.component.d.ts +0 -5
- package/lib/shared/metadata/metadata.component.d.ts +0 -24
- package/lib/shared/page-size-selector/page-size-selector.component.d.ts +0 -15
- package/lib/shared/search-filter/search-filter.component.d.ts +0 -127
- package/lib/shared/shared.module.d.ts +0 -11
- /package/{lib → src}/assets/images/Search.svg +0 -0
- /package/{lib/assets/images/XMLogo.png → src/assets/images/XMCoral.png} +0 -0
- /package/{lib → src/lib}/assets/config/app-config.json +0 -0
- /package/{lib → src/lib}/assets/svg-loaders/blue-tail-spin.svg +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<lib-search-filter
|
|
2
|
+
[ReportName]="ReportName"
|
|
3
|
+
(searchClicked)="handleSearch($event)"
|
|
4
|
+
(formValid)="handleFormValid($event)"
|
|
5
|
+
>
|
|
6
|
+
</lib-search-filter>
|
|
7
|
+
|
|
8
|
+
<app-loader class="" *ngIf="loadingState == ComponentLoadingState.Loading"></app-loader>
|
|
9
|
+
<div class="alert alert-warning mt-3" *ngIf="hasSearched && noDataFromApi">
|
|
10
|
+
No transactions found matching your search criteria.
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div *ngIf="errorMessage" class="error alert alert-danger mt-3">{{ errorMessage }}</div>
|
|
14
|
+
|
|
15
|
+
<div *ngIf="isDataAvailable() && !errorMessage && isFormValid">
|
|
16
|
+
<lib-metadata
|
|
17
|
+
[reportName]="ReportName"
|
|
18
|
+
[showmetaDataOne]="true"
|
|
19
|
+
[showmetaDataTwo]="true"
|
|
20
|
+
[metaDataOne]="metaDataOne"
|
|
21
|
+
[metaDataTwo]="metaDataTwo"
|
|
22
|
+
(exportEvent)="handleExport($event)"
|
|
23
|
+
(searchEvent)="filter($event)">
|
|
24
|
+
</lib-metadata>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div style="margin-top: 20px;" *ngIf="hasAnyGroups() && !errorMessage && isFormValid">
|
|
28
|
+
|
|
29
|
+
<ngb-accordion #acc="ngbAccordion" [closeOthers]="false">
|
|
30
|
+
<ng-container *ngFor="let item of filteredData | keyvalue; let i = index">
|
|
31
|
+
|
|
32
|
+
<ngb-panel *ngIf="item.value.length > 0" [id]="'panel-' + i">
|
|
33
|
+
|
|
34
|
+
<ng-template ngbPanelTitle style="height: 10%;">
|
|
35
|
+
<label class="panel-cls">
|
|
36
|
+
{{ item.key }}
|
|
37
|
+
</label>
|
|
38
|
+
</ng-template>
|
|
39
|
+
|
|
40
|
+
<ng-template ngbPanelContent>
|
|
41
|
+
<div style="position: relative;">
|
|
42
|
+
<lib-page-size-selector [totalEntries]="item?.value?.length"
|
|
43
|
+
[defaultSize]="'15'" [gridApi]="gridApis[i]">
|
|
44
|
+
></lib-page-size-selector>
|
|
45
|
+
|
|
46
|
+
<ag-grid-angular
|
|
47
|
+
class="ag-theme-alpine cancellation-grid"
|
|
48
|
+
style="width: 100%; height: 370px;"
|
|
49
|
+
[rowData]="item.value"
|
|
50
|
+
[columnDefs]="columnDefs"
|
|
51
|
+
[pagination]="true"
|
|
52
|
+
[defaultColDef]="defaultColDef"
|
|
53
|
+
[rowHeight]="22"
|
|
54
|
+
[paginationPageSize]="getPageSizeFor(i, item.value.length)"
|
|
55
|
+
(gridReady)="onGridReady($event, i)"
|
|
56
|
+
(gridSizeChanged)="onGridSizeChanged($event)">
|
|
57
|
+
</ag-grid-angular>
|
|
58
|
+
</div>
|
|
59
|
+
</ng-template>
|
|
60
|
+
|
|
61
|
+
</ngb-panel>
|
|
62
|
+
</ng-container>
|
|
63
|
+
</ngb-accordion>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!-- <div class="alert alert-info mt-3" *ngIf="hasSearched && !noDataFromApi && hasNoGroups() && !errorMessage && !hasAnyGroups()">
|
|
67
|
+
Your search filter did not match any transactions in the current report. Clear the search box to see all data.
|
|
68
|
+
</div> -->
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@import "src/styles/common-report-style.scss";
|
|
2
|
+
.bootstrap-scope {
|
|
3
|
+
@import "bootstrap/scss/bootstrap";
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.cancellation-grid ::ng-deep .ag-header {
|
|
7
|
+
background-color: #f9f9f9;
|
|
8
|
+
color: #000;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
font-size: 10px;
|
|
11
|
+
border-top: 1px solid #e0e0e0;
|
|
12
|
+
white-space: normal !important;
|
|
13
|
+
word-break: keep-all !important;
|
|
14
|
+
overflow-wrap: anywhere;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cancellation-grid ::ng-deep .ag-header-cell,
|
|
18
|
+
.cancellation-grid ::ng-deep .ag-header-group-cell {
|
|
19
|
+
padding: 2px !important;
|
|
20
|
+
border-right: 1px solid #e0e0e0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cancellation-grid ::ng-deep .ag-header-cell-label {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
white-space: break-spaces;
|
|
28
|
+
height: auto;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.cancellation-grid ::ng-deep .ag-cell {
|
|
32
|
+
font-size: 9px;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
line-height: 1.35;
|
|
35
|
+
padding: 4px 6px !important;
|
|
36
|
+
color: #000;
|
|
37
|
+
border-right: 1px solid #e0e0e0;
|
|
38
|
+
border-bottom: 1px solid #e0e0e0;
|
|
39
|
+
white-space: normal !important;
|
|
40
|
+
overflow-wrap: anywhere;
|
|
41
|
+
user-select: text !important;
|
|
42
|
+
-webkit-user-select: text !important;
|
|
43
|
+
-moz-user-select: text !important;
|
|
44
|
+
-ms-user-select: text !important;
|
|
45
|
+
cursor: text;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cancellation-grid ::ng-deep .ag-header-cell-text {
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cancellation-grid ::ng-deep .ag-cell.ag-right-aligned-cell {
|
|
55
|
+
justify-content: flex-end !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
::ng-deep .ag-paging-panel {
|
|
59
|
+
border-top: 1px solid;
|
|
60
|
+
border-top-color: var(--ag-border-color);
|
|
61
|
+
color: var(--ag-secondary-foreground-color);
|
|
62
|
+
height: 30px;
|
|
63
|
+
font-size: 11px !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CancellationTransactionReportComponent } from './cancellation-transaction-report.component';
|
|
4
|
+
|
|
5
|
+
describe('CancellationTransactionReportComponent', () => {
|
|
6
|
+
let component: CancellationTransactionReportComponent;
|
|
7
|
+
let fixture: ComponentFixture<CancellationTransactionReportComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ CancellationTransactionReportComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CancellationTransactionReportComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { finalize, takeUntil } from 'rxjs/operators';
|
|
4
|
+
import { ReportService } from '../../services/report.service';
|
|
5
|
+
import { ComponentLoadingStates } from '../../models/component-loading-states';
|
|
6
|
+
import { CancellationTransaction } from '../../models/cancellation-transaction-report/cancellation-transaction.model';
|
|
7
|
+
import { GenericExportService } from '../../shared/export-generic.service';
|
|
8
|
+
import { formatDate } from '@angular/common';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'lib-cancellation-transaction-report',
|
|
12
|
+
templateUrl: './cancellation-transaction-report.component.html',
|
|
13
|
+
styleUrls: ['./cancellation-transaction-report.component.scss']
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export class CancellationTransactionReportComponent implements OnInit, OnDestroy {
|
|
17
|
+
ReportName = "Cancellation Transaction";
|
|
18
|
+
user: string;
|
|
19
|
+
private destroy$ = new Subject<void>();
|
|
20
|
+
ComponentLoadingState = ComponentLoadingStates;
|
|
21
|
+
loadingState: ComponentLoadingStates = ComponentLoadingStates.Complete;
|
|
22
|
+
hasSearched: boolean = false;
|
|
23
|
+
noDataFromApi: boolean = false;
|
|
24
|
+
errorMessage: string;
|
|
25
|
+
cancellationData: CancellationTransaction[];
|
|
26
|
+
pageSize = 15;
|
|
27
|
+
metaDataOne: Record<string, string>;
|
|
28
|
+
metaDataTwo: Record<string, string>;
|
|
29
|
+
currentDateTime: Date = new Date();
|
|
30
|
+
searchText: string;
|
|
31
|
+
selectedExportOption = 'excel';
|
|
32
|
+
|
|
33
|
+
dataMap: Record<string, CancellationTransaction[]> = {};
|
|
34
|
+
filteredData: Record<string, CancellationTransaction[]> = {};
|
|
35
|
+
searchCriteria: [string, string][];
|
|
36
|
+
|
|
37
|
+
paginationArray: (number | 'All')[] = [];
|
|
38
|
+
gridApis: any[] = [];
|
|
39
|
+
reportPeriod: any;
|
|
40
|
+
reportUserandTime: string;
|
|
41
|
+
isFormValid: boolean = false;
|
|
42
|
+
|
|
43
|
+
// ag-Grid properties
|
|
44
|
+
columnDefs = [
|
|
45
|
+
{ headerName: 'Txn Date & Time', field: 'txnDateAndTime', flex: 1, minWidth: 63, tooltipValueGetter: params => params.value || '' },
|
|
46
|
+
{ headerName: 'Cancellation Branch Date', field: 'cancellationBranchDateTime', flex: 1, minWidth: 110, tooltipField: 'cancellationBranchDateTime' },
|
|
47
|
+
{ headerName: 'Cancellation Business Date', field: 'cancellationBusinessDate', flex: 1, minWidth: 80, tooltipField: 'cancellationBusinessDate' },
|
|
48
|
+
{ headerName: 'Transaction Number', field: 'transactionNumber', flex: 1, minWidth: 80, tooltipField: 'transactionNumber' },
|
|
49
|
+
{ headerName: 'Product', field: 'product', flex: 1, minWidth: 60, tooltipField: 'product' },
|
|
50
|
+
{ headerName: 'Send Client Branch Code', field: 'sendAgentBranchCode', flex: 1, minWidth: 90, tooltipField: 'sendAgentBranchCode' },
|
|
51
|
+
{ headerName: 'Send Principal Client Code (If Applicable)', field: 'sendPrincipalAgentCode', flex: 1, minWidth: 90, tooltipField: 'sendPrincipalAgentCode' },
|
|
52
|
+
{ headerName: 'Receive Client Code', field: 'recvAGTcode', flex: 1, minWidth: 80, tooltipField: 'recvAGTcode' },
|
|
53
|
+
{ headerName: 'Receive CcyCode', field: 'payoutCCcode', flex: 1, minWidth: 65, tooltipField: 'payoutCCcode' },
|
|
54
|
+
{ headerName: 'Receive Amount', field: 'payOutAmount', flex: 1, minWidth: 82, cellClass: 'ag-right-aligned-cell', tooltipField: 'payOutAmount' },
|
|
55
|
+
{ headerName: 'Send CcyCode', field: 'payinCCcode', flex: 1, minWidth: 69, tooltipField: 'payinCCcode' },
|
|
56
|
+
{ headerName: 'Send Amount', field: 'payInAmount', flex: 1, minWidth: 80, cellClass: 'ag-right-aligned-cell', tooltipField: 'payInAmount' },
|
|
57
|
+
{ headerName: 'Service Fee', field: 'txnCommission', flex: 1, minWidth: 80, cellClass: 'ag-right-aligned-cell', },
|
|
58
|
+
{ headerName: 'Tax', field: 'tax', flex: 1, minWidth: 70, cellClass: 'ag-right-aligned-cell', tooltipField: 'tax' },
|
|
59
|
+
{ headerName: 'Total Send Amount', field: 'totalPayinAmount', flex: 1, minWidth: 82, cellClass: 'ag-right-aligned-cell', tooltipField: 'totalPayinAmount' },
|
|
60
|
+
{ headerName: 'Transaction Status', field: 'status', flex: 1, minWidth: 80, tooltipField: 'status' },
|
|
61
|
+
{ headerName: 'Cancellation Location Code', field: 'cancellationLocationCode', flex: 1, minWidth: 95, tooltipField: 'cancellationLocationCode' },
|
|
62
|
+
{ headerName: 'Cancellation Reason', field: 'cancellationReason', flex: 1, minWidth: 105, tooltipField: 'cancellationReason' },
|
|
63
|
+
{ headerName: 'Cancelled By User', field: 'statusChangedBy', flex: 1, minWidth: 100, tooltipField: 'statusChangedBy' }
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
defaultColDef = {
|
|
67
|
+
sortable: true,
|
|
68
|
+
filter: true,
|
|
69
|
+
resizable: true,
|
|
70
|
+
minwidth: 40,
|
|
71
|
+
wrapHeaderText: true,
|
|
72
|
+
autoHeaderHeight: true,
|
|
73
|
+
suppressSizeToFit: false,
|
|
74
|
+
wrapText: true,
|
|
75
|
+
autoHeight: true
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
constructor(
|
|
79
|
+
private reportService: ReportService,
|
|
80
|
+
private exportService: GenericExportService
|
|
81
|
+
) { }
|
|
82
|
+
|
|
83
|
+
ngOnInit(): void {
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
ngOnDestroy(): void {
|
|
87
|
+
this.destroy$.next();
|
|
88
|
+
this.destroy$.complete();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
handleSearch(criteria: any): void {
|
|
92
|
+
this.searchCriteria = criteria.searchCriteria;
|
|
93
|
+
const modal = criteria.modal;
|
|
94
|
+
this.user = criteria.sysUserID;
|
|
95
|
+
this.reportPeriod = criteria.reportPeriod;
|
|
96
|
+
this.reportUserandTime = `${criteria.sysUserID} @ ${formatDate(this.currentDateTime, 'dd/MM/yyyy hh:mm a', 'en-US')}`;
|
|
97
|
+
this.metaDataOne = {
|
|
98
|
+
'Report Period': criteria.reportPeriod
|
|
99
|
+
}
|
|
100
|
+
this.metaDataTwo = {
|
|
101
|
+
'Report User & Time': this.reportUserandTime
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const searchData = {
|
|
105
|
+
BusinessPartnerCode: modal.client,
|
|
106
|
+
StartDate: modal.fromDate,
|
|
107
|
+
EndDate: modal.toDate,
|
|
108
|
+
BranchCode: modal.branch,
|
|
109
|
+
SendCountryCode: modal.sendCountry,
|
|
110
|
+
RecvCountryCode: modal.receiveCountry,
|
|
111
|
+
TransactionType: modal.product,
|
|
112
|
+
PayoutCurrency: modal.receiveCurrency,
|
|
113
|
+
};
|
|
114
|
+
try {
|
|
115
|
+
const sdate = new Date(searchData?.StartDate);
|
|
116
|
+
const edate = new Date(searchData?.EndDate);
|
|
117
|
+
searchData.StartDate = sdate.toISOString().split("T")[0];
|
|
118
|
+
searchData.EndDate = edate.toISOString().split("T")[0];
|
|
119
|
+
} catch (err) {
|
|
120
|
+
throw new Error("Invalid Date");
|
|
121
|
+
}
|
|
122
|
+
this.dataMap = {};
|
|
123
|
+
this.filteredData = {};
|
|
124
|
+
this.searchText = '';
|
|
125
|
+
this.errorMessage = '';
|
|
126
|
+
this.noDataFromApi = false;
|
|
127
|
+
this.selectedExportOption = 'excel';
|
|
128
|
+
this.loadingState = ComponentLoadingStates.Loading;
|
|
129
|
+
this.searchCriteria = criteria.searchCriteria;
|
|
130
|
+
|
|
131
|
+
this.reportService.getCancellationReport(searchData)
|
|
132
|
+
.pipe(
|
|
133
|
+
takeUntil(this.destroy$),
|
|
134
|
+
finalize(() => {
|
|
135
|
+
this.loadingState = ComponentLoadingStates.Complete;
|
|
136
|
+
this.hasSearched = true;
|
|
137
|
+
})
|
|
138
|
+
)
|
|
139
|
+
.subscribe({
|
|
140
|
+
next: (data) => {
|
|
141
|
+
this.filteredData = data;
|
|
142
|
+
this.dataMap = JSON.parse(JSON.stringify(data));
|
|
143
|
+
if (
|
|
144
|
+
Object.keys(this.filteredData).length === 0 ||
|
|
145
|
+
Object.values(this.filteredData).every(arr => arr.length === 0)
|
|
146
|
+
) {
|
|
147
|
+
this.noDataFromApi = true;
|
|
148
|
+
this.dataMap = {};
|
|
149
|
+
this.filteredData = {};
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
this.paginationArray = new Array(Object.keys(this.filteredData).length).fill(15);
|
|
153
|
+
},
|
|
154
|
+
error: (err) => {
|
|
155
|
+
console.error('Search error:', err);
|
|
156
|
+
this.errorMessage = 'Failed to fetch cancellation transaction data. Please try again.';
|
|
157
|
+
this.dataMap = {};
|
|
158
|
+
this.filteredData = {};
|
|
159
|
+
this.loadingState = this.ComponentLoadingState.Error;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
filter(text: string): void {
|
|
165
|
+
this.searchText = text;
|
|
166
|
+
const searchText = this.searchText ? this.searchText.trim().toLowerCase() : '';
|
|
167
|
+
|
|
168
|
+
if (searchText.length === 0) {
|
|
169
|
+
this.filteredData = structuredClone(this.dataMap);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const newFilteredData: Record<string, CancellationTransaction[]> = {};
|
|
173
|
+
for (const [key, entries] of Object.entries(this.dataMap)) {
|
|
174
|
+
const filteredEntries = entries.filter(entry =>
|
|
175
|
+
Object.values(entry).some(val => {
|
|
176
|
+
return val != null && val.toString().toLowerCase().includes(searchText);
|
|
177
|
+
})
|
|
178
|
+
);
|
|
179
|
+
if (filteredEntries.length > 0) {
|
|
180
|
+
newFilteredData[key] = filteredEntries;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
this.filteredData = newFilteredData;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
formatCurrency(params) {
|
|
187
|
+
if (params.value != null) {
|
|
188
|
+
return params.value.toLocaleString('en-US', { minimumFractionDigits: 3 });
|
|
189
|
+
}
|
|
190
|
+
return '';
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
dateValueFormatter(format: string) {
|
|
194
|
+
return (params: any) => {
|
|
195
|
+
if (!params.value) return '';
|
|
196
|
+
try {
|
|
197
|
+
return formatDate(params.value, format, 'en-US');
|
|
198
|
+
} catch {
|
|
199
|
+
return '';
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
onGridReady(params: any, id: number) {
|
|
205
|
+
params.api.sizeColumnsToFit();
|
|
206
|
+
this.gridApis[id] = params.api;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
onGridSizeChanged(params: any) {
|
|
210
|
+
params.api.sizeColumnsToFit();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
getKeys(obj: Record<string, unknown>): string[] {
|
|
214
|
+
return obj ? Object.keys(obj) : [];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
hasAnyGroups(): boolean {
|
|
218
|
+
return this.filteredData && this.getKeys(this.filteredData).length > 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
hasNoGroups(): boolean {
|
|
222
|
+
return this.filteredData && this.getKeys(this.filteredData).length === 0 && this.loadingState == ComponentLoadingStates.Complete;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
getPageSizeFor(index: number, total: number): number {
|
|
226
|
+
const val = this.paginationArray[index];
|
|
227
|
+
if (val === 'All') {
|
|
228
|
+
return total;
|
|
229
|
+
}
|
|
230
|
+
return Number(val ?? this.pageSize);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
isDataAvailable(): boolean {
|
|
234
|
+
return this.hasSearched && !this.noDataFromApi && !this.errorMessage && this.loadingState == ComponentLoadingStates.Complete;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
handleExport(option: string): void {
|
|
238
|
+
this.selectedExportOption = option;
|
|
239
|
+
if (!this.hasAnyGroups()) {
|
|
240
|
+
alert("There is no data to export based on your current filter.");
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (!this.filteredData || Object.keys(this.filteredData).length === 0) {
|
|
244
|
+
alert("No data to export");
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const title = "Cancellation Transaction";
|
|
248
|
+
const reportTimeFormatter = this.dateValueFormatter('dd/MM/yyyy hh:mm a');
|
|
249
|
+
const metadata: [string, string][] = [
|
|
250
|
+
['Report Period ', this.reportPeriod],
|
|
251
|
+
['Report User & Time ', this.reportUserandTime]
|
|
252
|
+
];
|
|
253
|
+
// --- search criteria ---
|
|
254
|
+
const searchCriteria: [string, string][] = this.searchCriteria;
|
|
255
|
+
const columns = this.columnDefs;
|
|
256
|
+
const data = this.dataMap;
|
|
257
|
+
const options = {
|
|
258
|
+
currencyFields: [],
|
|
259
|
+
dateFields: [],
|
|
260
|
+
|
|
261
|
+
dateFieldFormats: {},
|
|
262
|
+
|
|
263
|
+
specialDecimalFields: {
|
|
264
|
+
rate: 8
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
groupByKey: true
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
switch (this.selectedExportOption) {
|
|
271
|
+
case 'excel':
|
|
272
|
+
this.exportService.exportToExcel({ title, metadata, searchCriteria, columns, data, options });
|
|
273
|
+
break;
|
|
274
|
+
case 'pdf':
|
|
275
|
+
this.exportService.exportToPdf({ title, metadata, searchCriteria, columns, data, options });
|
|
276
|
+
break;
|
|
277
|
+
case 'csv':
|
|
278
|
+
this.exportService.exportToCsv({ title, metadata, searchCriteria, columns, data, options });
|
|
279
|
+
break;
|
|
280
|
+
default:
|
|
281
|
+
alert("Please select an export format.");
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
handleFormValid(isValid: boolean): void {
|
|
286
|
+
this.isFormValid = isValid;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
}
|
|
290
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<lib-search-filter [ReportName]="ReportName" (searchClicked)="handleSearch($event)" (formValid)="handleFormValid($event)">
|
|
2
|
+
</lib-search-filter>
|
|
3
|
+
<app-loader class="" *ngIf="loadingState == ComponentLoadingState.Loading"></app-loader>
|
|
4
|
+
<section *ngIf="showReport && isFormValid" class="my-2 mx-1">
|
|
5
|
+
<ng-container *ngIf="!noDataFound else noDataTemplate">
|
|
6
|
+
<lib-metadata [reportName]="ReportName" [showmetaDataOne]="true" [showmetaDataTwo]="true"
|
|
7
|
+
[metaDataOne]="metaDataOne" [metaDataTwo]="metaDataTwo" (exportEvent)="handleExport($event)"
|
|
8
|
+
(searchEvent)="onSearch($event)"></lib-metadata>
|
|
9
|
+
<div style="position: relative;" *ngIf="filteredData?.length>0">
|
|
10
|
+
<lib-page-size-selector [totalEntries]="data?.length" [defaultSize]="'15'" [gridApi]="gridApi">
|
|
11
|
+
></lib-page-size-selector>
|
|
12
|
+
|
|
13
|
+
<ag-grid-angular class="ag-theme-alpine transaction-grid" style="width: 100%;height: 407px;"
|
|
14
|
+
[columnDefs]="columnDefs" [defaultColDef]="defaultColDef" [rowData]="filteredData" [rowHeight]="20"
|
|
15
|
+
[headerHeight]="22" [pagination]="true" [paginationPageSize]="pageSize"
|
|
16
|
+
(gridReady)="onGridReady($event)">
|
|
17
|
+
</ag-grid-angular>
|
|
18
|
+
</div>
|
|
19
|
+
</ng-container>
|
|
20
|
+
<ng-template #noDataTemplate>
|
|
21
|
+
<div class="alert alert-warning mt-3">
|
|
22
|
+
No Data found matching your search criteria.
|
|
23
|
+
</div>
|
|
24
|
+
</ng-template>
|
|
25
|
+
</section>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'src/styles/ag-grid-report-style.scss';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CreditLimitStatusEnquiryReportComponent } from './credit-limit-status-enquiry-report.component';
|
|
4
|
+
|
|
5
|
+
describe('CreditLimitStatusEnquiryReportComponent', () => {
|
|
6
|
+
let component: CreditLimitStatusEnquiryReportComponent;
|
|
7
|
+
let fixture: ComponentFixture<CreditLimitStatusEnquiryReportComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ CreditLimitStatusEnquiryReportComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(CreditLimitStatusEnquiryReportComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|