@sachin9822/reports-lib 0.0.212 → 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,213 +0,0 @@
1
- import { Component, inject, OnInit } from '@angular/core';
2
- import { CreditLimitStatusEnquiryReportModel } from '../../models/credit-limit-status-enquiry-report/credit-limit-status-enquiry.model';
3
- import { ReportService } from '../../services/report.service';
4
- import { ExportService } from '../../shared/export.service';
5
- import { ComponentLoadingStates } from '../../models/component-loading-states';
6
- import { ColDef, ColumnApi, GridApi, GridReadyEvent } from 'ag-grid-community';
7
- import { formatDate } from '@angular/common';
8
-
9
- @Component({
10
- selector: 'lib-credit-limit-status-enquiry-report',
11
- templateUrl: './credit-limit-status-enquiry-report.component.html',
12
- styleUrls: ['./credit-limit-status-enquiry-report.component.scss']
13
- })
14
- export class CreditLimitStatusEnquiryReportComponent implements OnInit {
15
- data: CreditLimitStatusEnquiryReportModel[] = [];
16
- filteredData: CreditLimitStatusEnquiryReportModel[] = [];
17
- user: string = "";
18
- ReportName = "Credit Limit Status Enquiry";
19
- reportService: ReportService = inject(ReportService);
20
- exportService: ExportService = inject(ExportService);
21
- reportDate: string;
22
- fromDate: string;
23
- toDate: string;
24
- metaDataOne: Record<string, string>;
25
- metaDataTwo: Record<string, string>;
26
- ComponentLoadingState = ComponentLoadingStates;
27
- loadingState: ComponentLoadingStates = ComponentLoadingStates.Complete;
28
- selectedExportOption: string;
29
- searchText: string = '';
30
- pageSize: number = 15;
31
- searchCriteria: [string, string][];
32
-
33
- gridApi: GridApi;
34
- gridColumnApi: ColumnApi;
35
- showReport: boolean = false;
36
- noDataFound: boolean = false;
37
- isFormValid: boolean = false;
38
-
39
-
40
- columnDefs: ColDef<CreditLimitStatusEnquiryReportModel>[] = [
41
- { field: 'agentCode', headerName: 'Client Code', flex: 1, headerClass: 'ag-header-cell', minWidth: 100, tooltipField: 'agentCode', wrapText: true, autoHeight: true },
42
- { field: 'agentName', headerName: 'Client', flex: 1, headerClass: 'ag-header-cell', minWidth: 150, tooltipField: 'agentName', wrapText: true, autoHeight: true },
43
- { field: 'creditLimit', headerName: 'Credit Limit', flex: 1, headerClass: 'ag-header-cell', cellClass: 'ag-right-aligned-cell compact-cell', minWidth: 100, tooltipField: 'creditLimit', wrapText: true, autoHeight: true },
44
- { field: 'currencyCode', headerName: 'Settlement Currency', flex: 1, headerClass: 'ag-header-cell', minWidth: 80, tooltipField: 'currencyCode', wrapText: true, autoHeight: true },
45
- { field: 'requestTCLAmount', headerName: 'Requested TCL Amount', flex: 1, headerClass: 'ag-header-cell', cellClass: 'ag-right-aligned-cell compact-cell', minWidth: 100, tooltipField: 'requestTCLAmount', wrapText: true, autoHeight: true },
46
- { field: 'requestStatus', headerName: 'Transaction Status', flex: 1, headerClass: 'ag-header-cell', minWidth: 120, tooltipField: 'requestStatus', wrapText: true, autoHeight: true },
47
- { field: 'requestDescription', headerName: 'Request Description', flex: 1, headerClass: 'ag-header-cell', minWidth: 150, tooltipField: 'requestDescription', wrapText: true, autoHeight: true },
48
- { field: 'requestingUserId', headerName: 'Requesting User ID', flex: 1, headerClass: 'ag-header-cell', minWidth: 170, tooltipField: 'requestingUserId', wrapText: true, autoHeight: true },
49
- { field: 'requestingUser', headerName: 'Requesting User', flex: 1, headerClass: 'ag-header-cell', minWidth: 130, tooltipField: 'requestingUser', wrapText: true, autoHeight: true },
50
- { field: 'authorisingUserId', headerName: 'Authorising User ID', flex: 1, headerClass: 'ag-header-cell', minWidth: 170, tooltipField: 'authorisingUserId', wrapText: true, autoHeight: true },
51
- { field: 'authorisingUser', headerName: 'Authorising User', flex: 1, headerClass: 'ag-header-cell', minWidth: 130, tooltipField: 'authorisingUser', wrapText: true, autoHeight: true },
52
- { field: 'requestCreatedDate', headerName: 'Request Date', flex: 1, headerClass: 'ag-header-cell', minWidth: 130, tooltipField: 'requestCreatedDate', wrapText: true, autoHeight: true },
53
- { field: 'authorisedDate', headerName: 'Authorise Date', flex: 1, headerClass: 'ag-header-cell', minWidth: 150, tooltipField: 'authorisationDate', wrapText: true, autoHeight: true },
54
- ];
55
-
56
- defaultColDef = {
57
- sortable: true,
58
- filter: true,
59
- resizable: true,
60
- minwidth: 40,
61
- wrapHeaderText: true,
62
- autoHeaderHeight: true,
63
- suppressSizeToFit: false,
64
- wrapText: true
65
- };
66
-
67
- constructor() { }
68
-
69
- ngOnInit(): void {
70
- }
71
-
72
- onGridReady(params: GridReadyEvent) {
73
- this.gridApi = params.api;
74
- this.gridColumnApi = params.columnApi;
75
- }
76
-
77
- formatAmount(params: any): string {
78
- if (params.value == null) return '0.000';
79
- const num = Number(params.value);
80
- return num.toFixed(3);
81
- }
82
-
83
- onSearch(text: string) {
84
- this.searchText = text.trim();
85
- if (this.searchText === "") {
86
- this.filteredData = JSON.parse(JSON.stringify(this.data));
87
- return;
88
- }
89
- const data = JSON.parse(JSON.stringify(this.data));
90
- this.filteredData = data.filter((row) =>
91
- Object.values(row).some(val => String(val).toLowerCase().includes(this.searchText.toLowerCase()))
92
- )
93
- }
94
-
95
- handleExport(option: string) {
96
- this.selectedExportOption = option;
97
- if (this.selectedExportOption === 'pdf') {
98
- this.exportToPDF();
99
- } else if (this.selectedExportOption === 'excel') {
100
- this.exportToExcel();
101
- } else if (this.selectedExportOption === 'csv') {
102
- this.exportToCSV();
103
- } else {
104
- alert('Please select a valid export format.');
105
- }
106
- }
107
-
108
- exportToExcel() {
109
- if (!this.data?.length) return;
110
- const title = this.ReportName;
111
- const metadata = this.exportService.generateReportMetadata([
112
- ['Report Period:', this.fromDate + " - " + this.toDate],
113
- ['Report User & Time:', this.user?this.user+" @ "+this.reportDate:''+" @ "+this.reportDate],
114
- ]);
115
- // --- search criteria ---
116
- const searchCriteria: [string, string][] = this.searchCriteria;
117
-
118
- const { headers, rows } = this.exportService.prepareExportTable(this.data, this.columnDefs, {
119
- currencyFields: ['creditLimit', 'requestTCLAmount'],
120
- rateFields: []
121
- });
122
-
123
- this.exportService.exportToExcelUniversal(title, metadata, searchCriteria, headers, rows, 'Credit_Limit_Status_Enquiry.xlsx');
124
- }
125
-
126
- exportToPDF() {
127
- if (!this.data?.length) return;
128
- const title = this.ReportName;
129
- const metadata = this.exportService.generateReportMetadata([
130
- ['Report Period:', this.fromDate + " - " + this.toDate],
131
- ['Report User & Time:', this.user?this.user+" @ "+this.reportDate:''+" @ "+this.reportDate],
132
- ]);
133
-
134
- // --- search criteria ---
135
- const searchCriteria: [string, string][] = this.searchCriteria;
136
-
137
- const { headers, rows } = this.exportService.prepareExportTable(this.data, this.columnDefs, {
138
- currencyFields: ['creditLimit', 'requestTCLAmount'],
139
- rateFields: []
140
- });
141
-
142
- this.exportService.exportToPdfUniversal(title, metadata, searchCriteria, headers, rows, 'Credit_Limit_Status_Enquiry.pdf')
143
- .then(() => {
144
- console.log('PDF export completed.');
145
- })
146
- .catch(err => {
147
- console.error('PDF export failed:', err);
148
- });
149
- }
150
-
151
- exportToCSV() {
152
- if (!this.data?.length) return;
153
- const title = this.ReportName;
154
- const metadata = this.exportService.generateReportMetadata([
155
- ['Report Period:', this.fromDate + " - " + this.toDate],
156
- ['Report User & Time:', this.user?this.user+" @ "+this.reportDate:''+" @ "+this.reportDate],
157
- ]);
158
- // --- search criteria ---
159
- const searchCriteria: [string, string][] = this.searchCriteria;
160
-
161
- const { headers, rows } = this.exportService.prepareExportTable(this.data, this.columnDefs, {
162
- currencyFields: ['creditLimit', 'requestTCLAmount'],
163
- rateFields: []
164
- });
165
-
166
- this.exportService.exportToCsvUniversal(title, metadata, searchCriteria, headers, rows, 'Credit_Limit_Status_Enquiry.csv');
167
- }
168
-
169
- handleSearch(criteria: any) {
170
- this.searchCriteria = criteria.searchCriteria;
171
- this.reportDate = new Date().toISOString();
172
- this.reportDate = formatDate(this.reportDate, 'dd/MM/yyyy hh:mm a', 'en-US');
173
- const modal = criteria.modal;
174
- this.user = criteria.sysUserID;
175
- this.fromDate = formatDate(modal.fromDate, 'dd/MM/yyyy hh:mm a', 'en-US').slice(0,10);
176
- this.toDate = formatDate(modal.toDate, 'dd/MM/yyyy hh:mm a', 'en-US').slice(0,10);
177
- console.log(modal);
178
- // Code For Meta Data
179
- this.metaDataOne = {
180
- 'Report Period': this.fromDate + " - " + this.toDate,
181
- }
182
-
183
- this.metaDataTwo = {
184
- 'Report User & Time': this.user+" @ "+this.reportDate,
185
- }
186
-
187
- const searchData = {
188
- "FromDate": modal.fromDate,
189
- "ToDate": modal.toDate,
190
- "AgentName": modal.client,
191
- "Status": modal.transactionStatus
192
- }
193
- this.loadingState = ComponentLoadingStates.Loading;
194
- this.reportService.getCreditLimitStatusEnquiryReport(searchData).subscribe({
195
- next: (response) => {
196
- this.data = response;
197
- this.filteredData = JSON.parse(JSON.stringify(this.data));
198
- this.noDataFound = this.data?.length === 0 ? true : false;
199
- },
200
- error: (err) => {
201
- this.loadingState = ComponentLoadingStates.Complete;
202
- },
203
- complete: () => {
204
- this.showReport = true;
205
- this.loadingState = ComponentLoadingStates.Complete;
206
- }
207
- })
208
- }
209
-
210
- handleFormValid(isValid: boolean): void {
211
- this.isFormValid = isValid;
212
- }
213
- }
@@ -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
- <div *ngIf="errorMessage" class="error alert alert-danger mt-3">{{ errorMessage }}</div>
11
-
12
- <div class="alert alert-warning mt-3" *ngIf="hasSearched && transactionData.length === 0 && !errorMessage">
13
- No Data found matching your search criteria.
14
- </div>
15
-
16
- <section *ngIf="showReport && isFormValid && transactionData.length > 0">
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]="filteredData.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]="35"
43
- [paginationPageSize]="paginationPageSize"
44
- (gridReady)="onGridReady($event)"
45
- style="width: 100%; height: 375px;">
46
- </ag-grid-angular>
47
- </div>
48
-
49
- </section>
@@ -1 +0,0 @@
1
- @import 'src/styles/ag-grid-report-style';
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { FundingReportComponent } from './funding-report.component';
4
-
5
- describe('FundingReportComponent', () => {
6
- let component: FundingReportComponent;
7
- let fixture: ComponentFixture<FundingReportComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ FundingReportComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(FundingReportComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,221 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { ReportService } from '../../services/report.service';
3
- import { ComponentLoadingStates } from '../../models/component-loading-states';
4
- import { finalize } from 'rxjs/operators';
5
- import { ColDef, GridReadyEvent, GridApi, ColumnApi } from 'ag-grid-community';
6
- import { formatDate } from '@angular/common';
7
- import { ExportService } from '../../shared/export.service';
8
-
9
- @Component({
10
- selector: 'lib-funding-report',
11
- templateUrl: './funding-report.component.html',
12
- styleUrls: ['./funding-report.component.scss']
13
- })
14
- export class FundingReportComponent implements OnInit {
15
- ReportName = "Funding";
16
- ComponentLoadingState = ComponentLoadingStates;
17
- loadingState: ComponentLoadingStates = ComponentLoadingStates.Complete;
18
- showReport: boolean = false;
19
- metaDataOne: Record<string, string>;
20
- metaDataTwo: Record<string, string>;
21
- currentDateTime: Date = new Date();
22
- searchText: string = '';
23
- gridColumnApi: ColumnApi;
24
- paginationPageSize: number = 15;
25
- gridApi!: GridApi;
26
- errorMessage: string;
27
- hasSearched: boolean = false;
28
- selectedExportOption: string;
29
- reportUserandTime: string = '';
30
- reportPeriod: string = '';
31
- filteredData: any[] = [];
32
- transactionData: any[] = [];
33
- searchCriteria: [string, string][];
34
- isFormValid: boolean = false;
35
-
36
-
37
- columnDefs: ColDef[] = [
38
- { headerName: 'Requested Date', field: 'requestedDate', flex: 1, minWidth: 73, tooltipField: 'requestedDate' },
39
- { headerName: 'Requested By Username', field: 'requestedByUsername', flex: 1, minWidth: 100, tooltipField: 'requestedByUsername' },
40
- { headerName: 'Requested By UserID', field: 'requestedByUserID', flex: 1, minWidth: 120, tooltipField: 'requestedByUserID' },
41
- { headerName: 'Client Code', field: 'clientCode', flex: 1, minWidth: 65, tooltipField: 'clientCode' },
42
- { headerName: 'Client', field: 'companyName', flex: 1, minWidth: 120, tooltipField: 'companyName' },
43
- { headerName: 'Country', field: 'country', flex: 1, minWidth: 60, tooltipField: 'country' },
44
- { headerName: 'Movement', field: 'movement', flex: 1, minWidth: 75, tooltipField: 'Movement' },
45
- { headerName: 'Funding Amount', field: 'fundingAmount', flex: 1, minWidth: 80, cellClass: 'ag-right-aligned-cell', tooltipField: 'fundingAmount' },
46
- { headerName: 'Funding Currency', field: 'fCcyCode', flex: 1, minWidth: 65, tooltipField: 'fCcyCode' },
47
- { headerName: 'Exchange Rate', field: 'exchangeRate', flex: 1, minWidth: 80, cellClass: 'ag-right-aligned-cell', tooltipField: 'exchangeRate' },
48
- { headerName: 'Amount in LC', field: 'amountInLC', flex: 1, minWidth: 80, cellClass: 'ag-right-aligned-cell', tooltipField: 'amountInLC' },
49
- { headerName: 'Local Currency', field: 'lCcyCode', flex: 1, minWidth: 65, tooltipField: 'lCcyCode' },
50
- { headerName: 'Authorized By UserID', field: 'authorizedByUserID', flex: 1, minWidth: 120, tooltipField: 'authorizedByUserID' },
51
- { headerName: 'Authorized By Username', field: 'authorizedByUsername', flex: 1, minWidth: 100, tooltipField: 'authorizedByUsername' },
52
- { headerName: 'Authorized Date', field: 'authorizedDate', flex: 1, minWidth: 75, tooltipField: 'authorizedDate' },
53
- { headerName: 'Transaction Status', field: 'transactionStatus', flex: 1, minWidth: 80, tooltipField: 'transactionStatus' },
54
- { headerName: 'Requester Comments', field: 'requesterComments', flex: 1, minWidth: 100, tooltipField: 'requesterComments' },
55
- { headerName: 'Authorizer Comments', field: 'authorizerComments', flex: 1, minWidth: 100, tooltipField: 'authorizerComments' }
56
- ];
57
-
58
- defaultColDef = {
59
- sortable: true,
60
- filter: true,
61
- resizable: true,
62
- minwidth: 40,
63
- wrapHeaderText: true,
64
- autoHeaderHeight: true,
65
- suppressSizeToFit: false,
66
- wrapText: true,
67
- autoHeight: true
68
- };
69
-
70
-
71
- constructor(private reportService: ReportService,
72
- private exportService: ExportService,) { }
73
-
74
- ngOnInit(): void {
75
- }
76
-
77
- handleSearch(criteria: any): void {
78
- this.searchCriteria = criteria.searchCriteria;
79
- this.loadingState = ComponentLoadingStates.Loading;
80
- this.showReport = false;
81
- this.errorMessage = '';
82
- this.selectedExportOption = 'excel';
83
- const payload = criteria.modal;
84
- this.reportUserandTime = `${criteria.sysUserID} @ ${formatDate(this.currentDateTime, 'dd/MM/yyyy hh:mm a', 'en-US')}`;
85
- this.reportPeriod = criteria.reportPeriod;
86
- this.metaDataOne = {
87
- 'Report Period': this.reportPeriod
88
- }
89
- this.metaDataTwo = {
90
- 'Report User & Time': this.reportUserandTime
91
- }
92
- this.searchCriteria = criteria.searchCriteria;
93
-
94
- try {
95
- const sdate = new Date(payload?.fromDate);
96
- const edate = new Date(payload?.toDate);
97
- payload.fromDate = sdate.toISOString().split("T")[0];
98
- payload.toDate = edate.toISOString().split("T")[0];
99
- } catch (err) {
100
- throw new Error("Invalid Date");
101
- }
102
-
103
- this.reportService.getFundingReport(payload)
104
- .pipe(
105
- finalize(() => {
106
- this.loadingState = ComponentLoadingStates.Complete;
107
- })
108
- )
109
- .subscribe({
110
- next: (data) => {
111
- this.transactionData = Array.isArray(data) ? data : [];
112
- this.filteredData = JSON.parse(JSON.stringify(data));
113
- this.showReport = true;
114
- this.hasSearched = true;
115
- },
116
- error: (error) => {
117
- console.error('Error fetching Funding Report:', error);
118
- this.errorMessage = 'An error occurred while fetching the report. Please try again later.';
119
- this.showReport = false;
120
- }
121
- });
122
- }
123
-
124
- filter(text: string): void {
125
- this.searchText = text.trim();
126
- if (this.searchText?.length === 0) {
127
- this.filteredData = [...this.transactionData];
128
- } else {
129
- this.filteredData = this.transactionData.filter(row =>
130
- Object.values(row).some(val =>
131
- String(val).toLowerCase().includes(this.searchText.toLowerCase())
132
- )
133
- );
134
- }
135
- }
136
-
137
- onGridReady(params: GridReadyEvent): void {
138
- this.gridApi = params.api;
139
- this.gridColumnApi = params.columnApi;
140
- this.gridApi.sizeColumnsToFit();
141
- }
142
-
143
- handleExport(option: string) {
144
- this.selectedExportOption = option;
145
- if (this.selectedExportOption === 'pdf') {
146
- this.exportToPDF();
147
- } else if (this.selectedExportOption === 'excel') {
148
- this.exportToExcel();
149
- } else if (this.selectedExportOption === 'csv') {
150
- this.exportToCSV();
151
- } else {
152
- alert('Please select a valid export format.');
153
- }
154
- }
155
-
156
- onExportChange(value: string): void {
157
- this.selectedExportOption = value;
158
- }
159
-
160
- exportToPDF(): void {
161
- if (!this.transactionData?.length) return;
162
-
163
- const title = 'Funding';
164
- const metadata = this.exportService.generateReportMetadata([
165
- ['Report Period :', this.reportPeriod],
166
- ['Report User and Time :', this.reportUserandTime]
167
- ]);
168
-
169
- const { headers, rows } = this.exportService.prepareExportTable(this.transactionData, this.columnDefs, {
170
- currencyFields: [],
171
- rateFields: []
172
- });
173
-
174
- this.exportService.exportToPdfUniversal(title, metadata, this.searchCriteria, headers, rows, 'Funding.pdf')
175
- .then(() => {
176
- console.log('PDF export completed.');
177
- })
178
- .catch(err => {
179
- console.error('PDF export failed:', err);
180
- });
181
- }
182
-
183
- exportToExcel(): void {
184
- if (!this.transactionData?.length) return;
185
-
186
- const title = 'Funding';
187
- const metadata = this.exportService.generateReportMetadata([
188
- ['Report Period ', this.reportPeriod],
189
- ['Report User and Time ', this.reportUserandTime]
190
- ]);
191
-
192
- const { headers, rows } = this.exportService.prepareExportTable(this.transactionData, this.columnDefs, {
193
- currencyFields: [],
194
- rateFields: []
195
- });
196
-
197
- this.exportService.exportToExcelUniversal(title, metadata, this.searchCriteria, headers, rows, 'Funding.xlsx');
198
- }
199
-
200
- exportToCSV(): void {
201
- if (!this.transactionData?.length) return;
202
-
203
- const title = 'Funding';
204
- const metadata = this.exportService.generateReportMetadata([
205
- ['Report Period: ', this.reportPeriod],
206
- ['Report User and Time: ', this.reportUserandTime]
207
- ]);
208
-
209
- const { headers, rows } = this.exportService.prepareExportTable(this.transactionData, this.columnDefs, {
210
- currencyFields: ['fundingAmount', 'amountInLC'],
211
- rateFields: ['exchangeRate']
212
- });
213
-
214
- this.exportService.exportToCsvUniversal(title, metadata, this.searchCriteria, headers, rows, 'Funding.csv');
215
- }
216
-
217
- handleFormValid(isValid: boolean): void {
218
- this.isFormValid = isValid;
219
- }
220
-
221
- }
@@ -1,26 +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
-
6
- <ng-container *ngIf="!noDataFound">
7
- <lib-metadata [reportName]="ReportName" [showmetaDataOne]="true" [showmetaDataTwo]="true"
8
- [metaDataOne]="metaDataOne" [metaDataTwo]="metaDataTwo" (exportEvent)="handleExport($event)"
9
- (searchEvent)="onSearch($event)"></lib-metadata>
10
- <div style="position: relative;" *ngIf="filteredData?.length>0">
11
- <lib-page-size-selector [totalEntries]="data?.length" [defaultSize]="'15'" [gridApi]="gridApi">
12
- ></lib-page-size-selector>
13
-
14
- <ag-grid-angular class="ag-theme-alpine transaction-grid" style="width: 100%;height: 407px;"
15
- [columnDefs]="columnDefs" [defaultColDef]="defaultColDef" [rowData]="filteredData" [rowHeight]="20"
16
- [headerHeight]="22" [pagination]="true" [paginationPageSize]="pageSize"
17
- (gridReady)="onGridReady($event)">
18
- </ag-grid-angular>
19
- </div>
20
- </ng-container>
21
-
22
- <div class="alert alert-warning mt-3" *ngIf="noDataFound">
23
- No Data found matching your search criteria.
24
- </div>
25
-
26
- </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 { RevenuePerTransactionReportComponent } from './revenue-per-transaction-report.component';
4
-
5
- describe('RevenuePerTransactionReportComponent', () => {
6
- let component: RevenuePerTransactionReportComponent;
7
- let fixture: ComponentFixture<RevenuePerTransactionReportComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ RevenuePerTransactionReportComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(RevenuePerTransactionReportComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });