@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.
Files changed (211) hide show
  1. package/esm2020/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.mjs +240 -0
  2. package/esm2020/lib/components/accounting-report/accounting-report.component.mjs +596 -0
  3. package/esm2020/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.mjs +218 -0
  4. package/esm2020/lib/components/branch-activity-send-report/branch-activity-send-report.component.mjs +243 -0
  5. package/esm2020/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.mjs +700 -0
  6. package/esm2020/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.mjs +255 -0
  7. package/esm2020/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.mjs +192 -0
  8. package/esm2020/lib/components/funding-report/funding-report.component.mjs +198 -0
  9. package/esm2020/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.mjs +244 -0
  10. package/esm2020/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.mjs +776 -0
  11. package/esm2020/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.mjs +266 -0
  12. package/esm2020/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.mjs +311 -0
  13. package/esm2020/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.mjs +658 -0
  14. package/esm2020/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.mjs +2 -0
  15. package/esm2020/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.mjs +2 -0
  16. package/esm2020/lib/models/accounting-report/accounting-report-branch-group.mjs +2 -0
  17. package/esm2020/lib/models/accounting-report/accounting-report-entry-model.mjs +2 -0
  18. package/esm2020/lib/models/accounting-report/accounting-report-model.mjs +2 -0
  19. package/esm2020/lib/models/accounting-report/accounting-report-sub-group.mjs +2 -0
  20. package/esm2020/lib/models/app-config.model.mjs +2 -0
  21. package/esm2020/lib/models/branch-activity-receive-report/branch-activity-receive.model.mjs +2 -0
  22. package/esm2020/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.mjs +6 -0
  23. package/esm2020/lib/models/branch-activity-report/branch-activity-send-report.mjs +3 -0
  24. package/esm2020/lib/models/cancellation-transaction-report/cancellation-transaction.model.mjs +10 -0
  25. package/esm2020/lib/models/component-loading-states.mjs +7 -0
  26. package/esm2020/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.mjs +5 -0
  27. package/esm2020/lib/models/revenue-per-transaction-report/revenue-per-transaction.model.mjs +2 -0
  28. package/esm2020/lib/models/statement-of-account-report/statement-of-accounts.model.mjs +2 -0
  29. package/esm2020/lib/models/transaction-enquiry-report/transaction-enquiry.model.mjs +8 -0
  30. package/esm2020/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.mjs +6 -0
  31. package/esm2020/lib/models/transaction-monitoring-report/transaction-monitoring-report.mjs +5 -0
  32. package/esm2020/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.mjs +3 -0
  33. package/esm2020/lib/reports-lib-routing.module.mjs +24 -0
  34. package/esm2020/lib/reports-lib.component.mjs +22 -0
  35. package/esm2020/lib/reports-lib.module.mjs +172 -0
  36. package/esm2020/lib/reports-lib.service.mjs +14 -0
  37. package/esm2020/lib/services/config.service.mjs +39 -0
  38. package/esm2020/lib/services/report.service.mjs +374 -0
  39. package/esm2020/lib/shared/export-generic.service.mjs +443 -0
  40. package/esm2020/lib/shared/export.service.mjs +379 -0
  41. package/esm2020/lib/shared/loader/loader.component.mjs +11 -0
  42. package/esm2020/lib/shared/metadata/metadata.component.mjs +51 -0
  43. package/esm2020/lib/shared/page-size-selector/page-size-selector.component.mjs +44 -0
  44. package/esm2020/lib/shared/search-filter/search-filter.component.mjs +2134 -0
  45. package/esm2020/lib/shared/shared.module.mjs +21 -0
  46. package/esm2020/public-api.mjs +41 -0
  47. package/esm2020/sachin9822-reports-lib.mjs +5 -0
  48. package/fesm2015/sachin9822-reports-lib.mjs +8429 -0
  49. package/fesm2015/sachin9822-reports-lib.mjs.map +1 -0
  50. package/fesm2020/sachin9822-reports-lib.mjs +8411 -0
  51. package/fesm2020/sachin9822-reports-lib.mjs.map +1 -0
  52. package/index.d.ts +5 -0
  53. package/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.d.ts +70 -0
  54. package/lib/components/accounting-report/accounting-report.component.d.ts +76 -0
  55. package/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.d.ts +58 -0
  56. package/lib/components/branch-activity-send-report/branch-activity-send-report.component.d.ts +69 -0
  57. package/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.d.ts +78 -0
  58. package/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.d.ts +95 -0
  59. package/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.d.ts +55 -0
  60. package/lib/components/funding-report/funding-report.component.d.ts +55 -0
  61. package/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.d.ts +57 -0
  62. package/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.d.ts +109 -0
  63. package/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.d.ts +76 -0
  64. package/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.d.ts +68 -0
  65. package/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.d.ts +72 -0
  66. package/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.d.ts +8 -0
  67. package/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.d.ts +18 -0
  68. package/lib/models/accounting-report/accounting-report-branch-group.d.ts +6 -0
  69. package/lib/models/accounting-report/accounting-report-entry-model.d.ts +24 -0
  70. package/lib/models/accounting-report/accounting-report-model.d.ts +6 -0
  71. package/{src/lib/models/accounting-report/accounting-report-sub-group.ts → lib/models/accounting-report/accounting-report-sub-group.d.ts} +2 -3
  72. package/{src/lib/models/app-config.model.ts → lib/models/app-config.model.d.ts} +7 -8
  73. package/lib/models/branch-activity-receive-report/branch-activity-receive.model.d.ts +18 -0
  74. package/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.d.ts +13 -0
  75. package/lib/models/branch-activity-report/branch-activity-send-report.d.ts +24 -0
  76. package/lib/models/cancellation-transaction-report/cancellation-transaction.model.d.ts +44 -0
  77. package/lib/models/component-loading-states.d.ts +5 -0
  78. package/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.d.ts +26 -0
  79. 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
  80. package/lib/models/statement-of-account-report/statement-of-accounts.model.d.ts +18 -0
  81. package/lib/models/transaction-enquiry-report/transaction-enquiry.model.d.ts +113 -0
  82. package/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.d.ts +13 -0
  83. package/lib/models/transaction-monitoring-report/transaction-monitoring-report.d.ts +23 -0
  84. package/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.d.ts +39 -0
  85. package/lib/reports-lib-routing.module.d.ts +7 -0
  86. package/lib/reports-lib.component.d.ts +8 -0
  87. package/lib/reports-lib.module.d.ts +33 -0
  88. package/lib/reports-lib.service.d.ts +6 -0
  89. package/lib/services/config.service.d.ts +20 -0
  90. package/lib/services/report.service.d.ts +80 -0
  91. package/lib/shared/export-generic.service.d.ts +50 -0
  92. package/lib/shared/export.service.d.ts +32 -0
  93. package/lib/shared/loader/loader.component.d.ts +5 -0
  94. package/lib/shared/metadata/metadata.component.d.ts +24 -0
  95. package/lib/shared/page-size-selector/page-size-selector.component.d.ts +15 -0
  96. package/lib/shared/search-filter/search-filter.component.d.ts +127 -0
  97. package/lib/shared/shared.module.d.ts +11 -0
  98. package/package.json +31 -16
  99. package/{src/public-api.ts → public-api.d.ts} +7 -17
  100. package/karma.conf.js +0 -44
  101. package/ng-package.json +0 -17
  102. package/src/assets/images/BreadcrumbArrow.png +0 -0
  103. package/src/assets/images/XMCoral.png +0 -0
  104. package/src/lib/assets/images/Search.svg +0 -10
  105. package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.html +0 -27
  106. package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.scss +0 -46
  107. package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.spec.ts +0 -23
  108. package/src/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.ts +0 -292
  109. package/src/lib/components/accounting-report/accounting-report.component.html +0 -64
  110. package/src/lib/components/accounting-report/accounting-report.component.scss +0 -24
  111. package/src/lib/components/accounting-report/accounting-report.component.spec.ts +0 -23
  112. package/src/lib/components/accounting-report/accounting-report.component.ts +0 -738
  113. package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.html +0 -46
  114. package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.scss +0 -2
  115. package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.spec.ts +0 -23
  116. package/src/lib/components/branch-activity-receive-report/branch-activity-receive-report.component.ts +0 -247
  117. package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.html +0 -46
  118. package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.scss +0 -3
  119. package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.spec.ts +0 -23
  120. package/src/lib/components/branch-activity-send-report/branch-activity-send-report.component.ts +0 -276
  121. package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.html +0 -51
  122. package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.scss +0 -7
  123. package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.spec.ts +0 -23
  124. package/src/lib/components/branch-activity-send-summary-report/branch-activity-send-summary-report.component.ts +0 -840
  125. package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.html +0 -68
  126. package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.scss +0 -65
  127. package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.spec.ts +0 -23
  128. package/src/lib/components/cancellation-transaction-report/cancellation-transaction-report.component.ts +0 -290
  129. package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.html +0 -25
  130. package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.scss +0 -1
  131. package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.spec.ts +0 -23
  132. package/src/lib/components/credit-limit-status-enquiry-report/credit-limit-status-enquiry-report.component.ts +0 -213
  133. package/src/lib/components/funding-report/funding-report.component.html +0 -49
  134. package/src/lib/components/funding-report/funding-report.component.scss +0 -1
  135. package/src/lib/components/funding-report/funding-report.component.spec.ts +0 -23
  136. package/src/lib/components/funding-report/funding-report.component.ts +0 -221
  137. package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.html +0 -26
  138. package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.scss +0 -1
  139. package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.spec.ts +0 -23
  140. package/src/lib/components/revenue-per-transaction-report/revenue-per-transaction-report.component.ts +0 -267
  141. package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.html +0 -95
  142. package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.scss +0 -54
  143. package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.spec.ts +0 -23
  144. package/src/lib/components/statement-of-accounts-report/statement-of-accounts-report.component.ts +0 -904
  145. package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.html +0 -49
  146. package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.scss +0 -2
  147. package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.spec.ts +0 -32
  148. package/src/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.ts +0 -304
  149. package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.html +0 -46
  150. package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.scss +0 -7
  151. package/src/lib/components/transaction-monitoring-report/transaction-monitoring-report.component.ts +0 -343
  152. package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.html +0 -25
  153. package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.scss +0 -23
  154. package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.spec.ts +0 -23
  155. package/src/lib/components/trial-balance-accounts-report/trial-balance-accounts-report.component.ts +0 -745
  156. package/src/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.ts +0 -10
  157. package/src/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.ts +0 -20
  158. package/src/lib/models/accounting-report/accounting-report-branch-group.ts +0 -7
  159. package/src/lib/models/accounting-report/accounting-report-entry-model.ts +0 -25
  160. package/src/lib/models/accounting-report/accounting-report-model.ts +0 -7
  161. package/src/lib/models/branch-activity-receive-report/branch-activity-receive.model.ts +0 -18
  162. package/src/lib/models/branch-activity-report/branch-activity-send-report-request-domain-model.ts +0 -16
  163. package/src/lib/models/branch-activity-report/branch-activity-send-report.ts +0 -26
  164. package/src/lib/models/cancellation-transaction-report/cancellation-transaction.model.ts +0 -65
  165. package/src/lib/models/component-loading-states.ts +0 -5
  166. package/src/lib/models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model.ts +0 -28
  167. package/src/lib/models/statement-of-account-report/statement-of-accounts.model.ts +0 -21
  168. package/src/lib/models/transaction-enquiry-report/transaction-enquiry.model.ts +0 -127
  169. package/src/lib/models/transaction-monitoring-report/transaction-monitoring-report-request-domain-model.ts +0 -16
  170. package/src/lib/models/transaction-monitoring-report/transaction-monitoring-report.ts +0 -29
  171. package/src/lib/models/trial-balance-accounts-report/trial-balance-accounts.models.ts +0 -46
  172. package/src/lib/reports-lib-routing.module.ts +0 -20
  173. package/src/lib/reports-lib.component.spec.ts +0 -23
  174. package/src/lib/reports-lib.component.ts +0 -20
  175. package/src/lib/reports-lib.module.ts +0 -102
  176. package/src/lib/reports-lib.service.spec.ts +0 -16
  177. package/src/lib/reports-lib.service.ts +0 -9
  178. package/src/lib/services/config.service.ts +0 -43
  179. package/src/lib/services/report.service.spec.ts +0 -16
  180. package/src/lib/services/report.service.ts +0 -463
  181. package/src/lib/shared/export-generic.service.ts +0 -557
  182. package/src/lib/shared/export.service.spec.ts +0 -16
  183. package/src/lib/shared/export.service.ts +0 -457
  184. package/src/lib/shared/loader/loader.component.html +0 -8
  185. package/src/lib/shared/loader/loader.component.scss +0 -52
  186. package/src/lib/shared/loader/loader.component.ts +0 -10
  187. package/src/lib/shared/metadata/metadata.component.html +0 -42
  188. package/src/lib/shared/metadata/metadata.component.scss +0 -95
  189. package/src/lib/shared/metadata/metadata.component.spec.ts +0 -23
  190. package/src/lib/shared/metadata/metadata.component.ts +0 -38
  191. package/src/lib/shared/page-size-selector/page-size-selector.component.html +0 -7
  192. package/src/lib/shared/page-size-selector/page-size-selector.component.scss +0 -42
  193. package/src/lib/shared/page-size-selector/page-size-selector.component.spec.ts +0 -23
  194. package/src/lib/shared/page-size-selector/page-size-selector.component.ts +0 -38
  195. package/src/lib/shared/search-filter/search-filter.component.html +0 -601
  196. package/src/lib/shared/search-filter/search-filter.component.scss +0 -203
  197. package/src/lib/shared/search-filter/search-filter.component.spec.ts +0 -23
  198. package/src/lib/shared/search-filter/search-filter.component.ts +0 -2387
  199. package/src/lib/shared/shared.module.ts +0 -13
  200. package/src/styles/ag-grid-report-style.scss +0 -71
  201. package/src/styles/common-ag-grid-style.scss +0 -146
  202. package/src/styles/common-report-style.scss +0 -395
  203. package/src/styles/common-style.scss +0 -615
  204. package/src/test.ts +0 -27
  205. package/tsconfig.lib.json +0 -15
  206. package/tsconfig.lib.prod.json +0 -10
  207. package/tsconfig.spec.json +0 -17
  208. /package/{src/lib → lib}/assets/config/app-config.json +0 -0
  209. /package/{src → lib}/assets/images/Search.svg +0 -0
  210. /package/{src/lib → lib}/assets/images/XMLogo.png +0 -0
  211. /package/{src/lib → lib}/assets/svg-loaders/blue-tail-spin.svg +0 -0
@@ -1,68 +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 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> -->
@@ -1,65 +0,0 @@
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
-
@@ -1,23 +0,0 @@
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
- });
@@ -1,290 +0,0 @@
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
-
@@ -1,25 +0,0 @@
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>
@@ -1 +0,0 @@
1
- @import 'src/styles/ag-grid-report-style.scss';
@@ -1,23 +0,0 @@
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
- });