@sachin9822/reports-lib 0.0.6 → 0.0.8

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 (42) hide show
  1. package/environments/environment.d.ts +5 -0
  2. package/esm2020/environments/environment.mjs +10 -0
  3. package/esm2020/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.mjs +87 -36
  4. package/esm2020/lib/interceptors/auth-http.interceptor.mjs +88 -0
  5. package/esm2020/lib/models/accgl-details-enquiry-reportmodel.mjs +2 -0
  6. package/esm2020/lib/models/journal-voucher-entry-model.mjs +2 -0
  7. package/esm2020/lib/models/security/authorise-profile-system-function.model.mjs +2 -0
  8. package/esm2020/lib/models/security/authorise-profile-system-report.model.mjs +2 -0
  9. package/esm2020/lib/models/security/authorise-profile-system-shortcurt.model.mjs +2 -0
  10. package/esm2020/lib/models/security/authorize-profile-ratesheet.model.mjs +2 -0
  11. package/esm2020/lib/models/security/authorize-profile.model.mjs +2 -0
  12. package/esm2020/lib/models/security/user-session.model.mjs +6 -0
  13. package/esm2020/lib/models/view-pending-queue-option.enum.mjs +13 -0
  14. package/esm2020/lib/reports-lib-routing.module.mjs +2 -6
  15. package/esm2020/lib/reports-lib.module.mjs +50 -15
  16. package/esm2020/lib/services/active-x.service.mjs +63 -0
  17. package/esm2020/lib/services/report.service.mjs +24 -0
  18. package/esm2020/lib/services/session.service.mjs +54 -0
  19. package/esm2020/public-api.mjs +1 -2
  20. package/fesm2015/sachin9822-reports-lib.mjs +350 -66
  21. package/fesm2015/sachin9822-reports-lib.mjs.map +1 -1
  22. package/fesm2020/sachin9822-reports-lib.mjs +355 -66
  23. package/fesm2020/sachin9822-reports-lib.mjs.map +1 -1
  24. package/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.d.ts +21 -28
  25. package/lib/interceptors/auth-http.interceptor.d.ts +15 -0
  26. package/lib/models/accgl-details-enquiry-reportmodel.d.ts +8 -0
  27. package/lib/models/journal-voucher-entry-model.d.ts +18 -0
  28. package/lib/models/security/authorise-profile-system-function.model.d.ts +9 -0
  29. package/lib/models/security/authorise-profile-system-report.model.d.ts +6 -0
  30. package/lib/models/security/authorise-profile-system-shortcurt.model.d.ts +4 -0
  31. package/lib/models/security/authorize-profile-ratesheet.model.d.ts +5 -0
  32. package/lib/models/security/authorize-profile.model.d.ts +9 -0
  33. package/lib/models/security/user-session.model.d.ts +31 -0
  34. package/lib/models/view-pending-queue-option.enum.d.ts +10 -0
  35. package/lib/reports-lib.module.d.ts +8 -5
  36. package/lib/services/active-x.service.d.ts +23 -0
  37. package/lib/services/report.service.d.ts +13 -0
  38. package/lib/services/session.service.d.ts +21 -0
  39. package/package.json +1 -1
  40. package/public-api.d.ts +0 -1
  41. package/esm2020/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.mjs +0 -14
  42. package/lib/components/transaction-enquiry-report/transaction-enquiry-report.component.d.ts +0 -8
@@ -1,10 +1,24 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, NgModule } from '@angular/core';
3
- import * as i1 from 'ag-grid-angular';
2
+ import { Injectable, Component, NgModule, Inject } from '@angular/core';
3
+ import Decimal from 'decimal.js';
4
+ import * as i3 from '@angular/common';
5
+ import { formatDate, CommonModule } from '@angular/common';
6
+ import * as i1 from '@angular/common/http';
7
+ import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
8
+ import * as i2 from 'ag-grid-angular';
4
9
  import { AgGridModule } from 'ag-grid-angular';
5
- import { HttpClientModule } from '@angular/common/http';
10
+ import * as i4 from '@angular/forms';
11
+ import { FormsModule } from '@angular/forms';
6
12
  import * as i1$1 from '@angular/router';
7
13
  import { RouterModule } from '@angular/router';
14
+ import * as i1$2 from 'angular-oauth2-oidc';
15
+ import { OAuthService, OAuthModule } from 'angular-oauth2-oidc';
16
+ import { v4 } from 'uuid';
17
+ import { forkJoin, BehaviorSubject } from 'rxjs';
18
+ import * as i2$1 from 'ngx-webstorage-service';
19
+ import { isStorageAvailable, SESSION_STORAGE } from 'ngx-webstorage-service';
20
+ import * as i1$3 from '@ng-idle/core';
21
+ import { NgIdleModule } from '@ng-idle/core';
8
22
 
9
23
  class ReportsLibService {
10
24
  constructor() { }
@@ -38,70 +52,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
38
52
  ` }]
39
53
  }], ctorParameters: function () { return []; } });
40
54
 
55
+ class ReportService {
56
+ constructor(http) {
57
+ this.http = http;
58
+ this.serviceUrl = "https://4xplus-local.xpressmoney.tech:8699";
59
+ this.reportUrl = "/api/v1/Report";
60
+ }
61
+ getAccGLDetailsReport(date, dateType, sysCompanyCode, sysUserId, companyName) {
62
+ const formattedDate = date.toISOString().split('T')[0];
63
+ const apiPath = `${this.serviceUrl}${this.reportUrl}/AccGLFDetailsEnquiryReport/${formattedDate}/${dateType}/${sysCompanyCode}/${sysUserId}/${companyName}`;
64
+ return this.http.get(apiPath);
65
+ }
66
+ }
67
+ ReportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
68
+ ReportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportService, providedIn: 'root' });
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportService, decorators: [{
70
+ type: Injectable,
71
+ args: [{
72
+ providedIn: 'root'
73
+ }]
74
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
75
+
41
76
  class AccGlDetailsEnquiryReportComponent {
42
- constructor() {
77
+ constructor(reportService) {
78
+ this.reportService = reportService;
79
+ this.dateTypeFilter = 1;
80
+ this.defaultColDef = {
81
+ resizable: true,
82
+ sortable: true,
83
+ filter: true,
84
+ cellStyle: { userSelect: 'text' }
85
+ };
43
86
  this.columnDefs = [
44
- {
45
- headerName: 'Sr. No',
46
- valueGetter: 'node.rowIndex + 1',
47
- width: 100
48
- },
49
- { headerName: 'Name', field: 'name', sortable: true, filter: true },
50
- { headerName: 'Email', field: 'email', sortable: true, filter: true },
51
- { headerName: 'Salary', field: 'salary', sortable: true, filter: true, width: 170 },
52
- { headerName: 'Name', field: 'name', sortable: true, filter: true },
53
- { headerName: 'Email', field: 'email', sortable: true, filter: true },
54
- { headerName: 'Salary', field: 'salary', sortable: true, filter: true, width: 170 }
55
- ];
56
- this.rowData = [
57
- { name: 'John Doe', email: 'john@example.com', salary: 50000 },
58
- { name: 'Jane Smith', email: 'jane@example.com', salary: 60000 },
59
- { name: 'Bill Murray', email: 'bill@example.com', salary: 70000 },
60
- { name: 'John Doe', email: 'john@example.com', salary: 50000 },
61
- { name: 'Jane Smith', email: 'jane@example.com', salary: 60000 },
62
- { name: 'Bill Murray', email: 'bill@example.com', salary: 70000 },
63
- { name: 'John Doe', email: 'john@example.com', salary: 50000 },
64
- { name: 'Jane Smith', email: 'jane@example.com', salary: 60000 },
65
- { name: 'Bill Murray', email: 'bill@example.com', salary: 70000 },
66
- { name: 'John Doe', email: 'john@example.com', salary: 50000 },
67
- { name: 'Jane Smith', email: 'jane@example.com', salary: 60000 },
68
- { name: 'John Doe', email: 'john@example.com', salary: 50000 },
69
- { name: 'Jane Smith', email: 'jane@example.com', salary: 60000 },
70
- { name: 'Bill Murray', email: 'bill@example.com', salary: 70000 },
71
- { name: 'John Doe', email: 'john@example.com', salary: 50000 },
72
- { name: 'Jane Smith', email: 'jane@example.com', salary: 60000 },
87
+ { headerName: 'Sr. No', valueGetter: 'node.rowIndex + 1', },
88
+ { headerName: 'Journal ID', field: 'journalID' },
89
+ { headerName: 'Trans No', field: 'transactionNo' },
90
+ { headerName: 'Trans Code', field: 'transactionCode', },
91
+ { headerName: 'Journal Type', field: 'journalType' },
92
+ { headerName: 'Posting Date', field: 'postingDate', valueFormatter: this.formatDate },
93
+ { headerName: 'Value Date', field: 'valueDate', valueFormatter: this.formatDate },
94
+ { headerName: 'Description', field: 'description', width: 385 },
95
+ { headerName: 'Account Code', field: 'accountCode', },
96
+ { headerName: 'Currency', field: 'currency', },
97
+ { headerName: 'Rate', field: 'rate', },
98
+ { headerName: 'FxDebit', field: 'forexDebit', },
99
+ { headerName: 'Local Debit', field: 'localDebit', },
100
+ { headerName: 'FxCredit', field: 'forexCredit', },
101
+ { headerName: 'Local Credit', field: 'localCredit', },
73
102
  ];
103
+ this.rowData = [];
104
+ this.gridOptions = {
105
+ enableRangeSelection: true,
106
+ getContextMenuItems: () => [
107
+ 'copy',
108
+ 'copyWithHeaders'
109
+ ]
110
+ };
111
+ this.accGlDetailsEnquiryReportModel = undefined;
74
112
  }
75
113
  ngOnInit() {
114
+ const today = new Date();
115
+ this.date = today.toISOString().substring(0, 10); // yyyy-MM-dd format
76
116
  }
77
- }
78
- AccGlDetailsEnquiryReportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AccGlDetailsEnquiryReportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
79
- AccGlDetailsEnquiryReportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AccGlDetailsEnquiryReportComponent, selector: "lib-acc-gl-details-enquiry-report", ngImport: i0, template: "\r\n<div>\r\n\r\n<div></div>\r\n\r\n<ag-grid-angular\r\nclass=\"ag-theme-alpine\"\r\nstyle=\"height: 400px; width: 100%;\"\r\n[rowData]=\"rowData\"\r\n[columnDefs]=\"columnDefs\"\r\n>\r\n</ag-grid-angular>\r\n\r\n\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "suppressMenuHide", "enableBrowserTooltips", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "maintainColumnOrder", "suppressFieldDotNotation", "deltaColumnMode", "applyColumnDefOrder", "immutableColumns", "suppressSetColumnStateEvents", "suppressColumnStateEvents", "colWidth", "minColWidth", "maxColWidth", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "components", "frameworkComponents", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "stopEditingWhenGridLosesFocus", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "defaultExportParams", "quickFilterText", "cacheQuickFilter", "excludeChildrenWhenTreeDataFiltering", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "chartToolPanelsDef", "loadingCellRenderer", "loadingCellRendererFramework", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererFramework", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentFramework", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentFramework", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "suppressAggAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDelay", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererFramework", "fullWidthCellRendererParams", "embedFullWidthRows", "deprecatedEmbedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererFramework", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "groupRowsSticky", "groupRowInnerRenderer", "groupRowInnerRendererFramework", "groupMultiAutoColumn", "groupUseEntireRow", "groupSuppressAutoColumn", "rememberGroupStateWhenNewData", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "immutableData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "deltaRowDataMode", "batchUpdateWaitMillis", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "serverSideStoreType", "serverSideInfiniteScroll", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSideSortingAlwaysResets", "serverSideFilteringAlwaysResets", "suppressEnterpriseResetOnNewColumns", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellSelection", "suppressCellFocus", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "deltaSort", "treeDataDisplayType", "angularCompileRows", "angularCompileFilters", "functionsPassive", "enableGroupEdit", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "suppressKeyboardEvent", "localeTextFunc", "getLocaleText", "getDocument", "paginationNumberFormatter", "groupRowAggNodes", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "defaultGroupOrderComparator", "processSecondaryColDef", "processSecondaryColGroupDef", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "defaultGroupSortComparator", "getChildCount", "getServerSideGroupLevelParams", "getServerSideStoreParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowNodeId", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSort", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthCell", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "filterOpened", "filterChanged", "filterModified", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "cellKeyPress", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }] });
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AccGlDetailsEnquiryReportComponent, decorators: [{
81
- type: Component,
82
- args: [{ selector: 'lib-acc-gl-details-enquiry-report', template: "\r\n<div>\r\n\r\n<div></div>\r\n\r\n<ag-grid-angular\r\nclass=\"ag-theme-alpine\"\r\nstyle=\"height: 400px; width: 100%;\"\r\n[rowData]=\"rowData\"\r\n[columnDefs]=\"columnDefs\"\r\n>\r\n</ag-grid-angular>\r\n\r\n\r\n</div>" }]
83
- }], ctorParameters: function () { return []; } });
84
-
85
- class TransactionEnquiryReportComponent {
86
- constructor() { }
87
- ngOnInit() {
117
+ getAccGLDetailsReport() {
118
+ // '2025-02-06','VD','BH','sachin.kamble@xpressmoney.tech','xpress money'
119
+ debugger;
120
+ this.sysCompanyCode = 'BH';
121
+ this.sysUserId = 'sachin.kamble@xpressmoney.tech';
122
+ this.companyName = "Xpress Money";
123
+ if (this.dateTypeFilter == 1) {
124
+ this.dateType = 'VD';
125
+ }
126
+ else {
127
+ this.dateType = 'PD';
128
+ }
129
+ this.reportService.getAccGLDetailsReport(new Date(this.date), this.dateType, this.sysCompanyCode, this.sysUserId, this.companyName)
130
+ .subscribe(data => {
131
+ this.accGlDetailsEnquiryReportModel = data;
132
+ if (this.accGlDetailsEnquiryReportModel != undefined || this.accGlDetailsEnquiryReportModel != null) {
133
+ if (this.accGlDetailsEnquiryReportModel) {
134
+ this.rowData = this.accGlDetailsEnquiryReportModel.journalVoucherEntries.map(entry => {
135
+ return Object.assign(Object.assign({}, entry), { rate: new Decimal(entry.rate).toFixed(15), forexDebit: new Decimal(entry.forexDebit).toFixed(15), localDebit: new Decimal(entry.localDebit).toFixed(15), forexCredit: new Decimal(entry.forexCredit).toFixed(15), localCredit: new Decimal(entry.localCredit).toFixed(15) });
136
+ });
137
+ this.companyName = this.accGlDetailsEnquiryReportModel.companyName;
138
+ const userName = this.accGlDetailsEnquiryReportModel.reportUser;
139
+ this.reportUser = userName.toLowerCase();
140
+ const rawDate = this.accGlDetailsEnquiryReportModel.reportTime;
141
+ this.reportTime = formatDate(rawDate, 'dd/MM/yyyy HH:mm', 'en-US');
142
+ this.formattedDate = formatDate(new Date(this.date), 'dd/MM/yyyy', 'en-US');
143
+ }
144
+ console.log(this.accGlDetailsEnquiryReportModel);
145
+ }
146
+ }, error => { console.log(error); });
147
+ }
148
+ formatDate(params) {
149
+ return formatDate(new Date(params.value), 'dd/MM/yyyy', 'en-US');
88
150
  }
89
151
  }
90
- TransactionEnquiryReportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TransactionEnquiryReportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
91
- TransactionEnquiryReportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TransactionEnquiryReportComponent, selector: "lib-transaction-enquiry-report", ngImport: i0, template: "<p>transaction-enquiry-report works!</p>\n", styles: [""] });
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TransactionEnquiryReportComponent, decorators: [{
152
+ AccGlDetailsEnquiryReportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AccGlDetailsEnquiryReportComponent, deps: [{ token: ReportService }], target: i0.ɵɵFactoryTarget.Component });
153
+ AccGlDetailsEnquiryReportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AccGlDetailsEnquiryReportComponent, selector: "lib-acc-gl-details-enquiry-report", ngImport: i0, template: "<div style=\"display: flex; flex-direction: column; width: 100%; padding: 10px; box-sizing: border-box;\">\n\n\n <div style=\"display: flex; flex-wrap: wrap; gap: 10px; align-items: center;\">\n\n <form class=\"d-flex flex-wrap gap-3 align-items-center w-100\">\n\n\n <!-- <div class=\"d-flex align-items-center gap-2\">\n <label for=\"dateTypeFilter\" style=\"font-weight: 500;\" class=\"mb-0 \">Date Type</label>\n <select class=\"form-control\" name=\"dateTypeFilter\" [(ngModel)]=\"dateTypeFilter\" id=\"dateTypeFilter\"\n style=\"width: 140px;\">\n <option [ngValue]=\"1\">Value Date</option>\n <option [ngValue]=\"2\">Posting Date</option>\n </select>\n </div>\n\n\n <div class=\"d-flex align-items-center gap-2\">\n <label for=\"date\" style=\"font-weight: 500;\" class=\"mb-0\">Date</label>\n <input type=\"date\" class=\"form-control\" name=\"date\" [(ngModel)]=\"date\" id=\"date\" style=\"width: 150px;\">\n </div> -->\n\n<!-- ----------------------------------------------------- -->\n<div class=\"d-flex align-items-center gap-2\">\n <label for=\"dateTypeFilter\" style=\"font-weight: 500;\" class=\"mb-0\">Date Type</label>\n <div class=\"required-box\">\n <select class=\"form-control\" name=\"dateTypeFilter\" [(ngModel)]=\"dateTypeFilter\" id=\"dateTypeFilter\">\n <option [ngValue]=\"1\">Value Date</option>\n <option [ngValue]=\"2\">Posting Date</option>\n </select>\n </div>\n</div>\n\n<div class=\"d-flex align-items-center gap-2\">\n <label for=\"date\" style=\"font-weight: 500;\" class=\"mb-0\">Date</label>\n <div class=\"required-box\">\n <input type=\"date\" class=\"form-control\" name=\"date\" [(ngModel)]=\"date\" id=\"date\">\n </div>\n</div>\n\n<!-- -------------- -->\n\n <div>\n <button type=\"button\" style=\"border: 2px solid rgb(13, 110, 253);\" class=\"btn btn-primary\" (click)=\"getAccGLDetailsReport()\">\n View Report\n </button>\n </div>\n\n </form>\n\n\n\n\n\n </div>\n\n\n <hr style=\"margin: 15px 0;\" />\n\n<!-- -------------------------------------------------------------------------------- -->\n <div style=\"border: 1px solid #ccc; padding: 10px; overflow: auto;\">\n\n<!-- *ngIf=\"accGlDetailsEnquiryReportModel != undefined\" -->\n <div style=\"flex:1; overflow-y: auto;\" *ngIf=\"accGlDetailsEnquiryReportModel != undefined\" >\n\n <label style=\"font-size: 21.333px; font-weight: bold; color: black; \">{{companyName}} - General Ledger Account Details Enquiry</label>\n\n <!-- <div class=\"d-flex align-items-center gap-2\">\n <label style=\"font-weight: bold; font-size: 21.333px; color:#004494 ;\" class=\"mb-0\">{{companyName}}</label>\n <label class=\"mb-0\" style=\"font-weight: bold; font-size: 21.333px; color:black ;\"> - General Ledger Account Details Enquiry</label>\n </div> -->\n\n <div class=\"d-flex align-items-center gap-2 mt-4\">\n <label for=\"date\" style=\"font-weight: 500; font-size: 13px;\" class=\"mb-0\">Report User :</label>\n <label class=\"mb-0\" style=\"font-size: 13px;\">{{reportUser}}</label>\n </div>\n\n <div class=\"d-flex align-items-center gap-2 mt-2\">\n <label for=\"date\" style=\"font-weight: 500; font-size: 13px;\" class=\"mb-0\">Report Time :</label>\n <label class=\"mb-0\" style=\"font-size: 13px;\">{{reportTime}}</label>\n </div>\n\n <label style=\"font-weight: bold; font-size: 16px; text-decoration: underline;\" class=\"mt-2\" >Search Criteria</label>\n\n <div class=\"d-flex align-items-center gap-2 mt-2 mb-2\">\n <label for=\"date\" style=\"font-weight: 500; font-size: 13px;\" class=\"mb-0\">Date :</label>\n <label class=\"mb-0\" style=\"font-size: 13px;\">{{formattedDate}}</label>\n </div>\n\n\n\n\n <ag-grid-angular style=\"width: 100%; height: 500px;\" class=\"ag-theme-alpine ag-small-grid\" [rowData]=\"rowData\"\n [columnDefs]=\"columnDefs\" [defaultColDef]=\"defaultColDef\" [enableRangeSelection]=\"true\"\n [enableBrowserTooltips]=\"true\" [gridOptions]=\"gridOptions\" [animateRows]=\"true\" \n [rowHeight]=\"27\" [headerHeight]=\"35\">\n\n </ag-grid-angular>\n\n\n <div class=\"d-flex align-items-center gap-2 mt-2\">\n <label for=\"date\" style=\"font-weight: 500; font-size: 13px;\" class=\"mb-0\">Report User And Time :</label>\n <label class=\"mb-0\" style=\"font-size: 13px;\">{{reportUser}} @ {{reportTime}}</label>\n </div>\n\n\n </div>\n\n\n\n\n\n\n </div>\n</div>", styles: [".ag-theme-alpine{-webkit-user-select:text!important;user-select:text!important}.ag-small-grid .ag-cell,.ag-small-grid .ag-header-cell{font-size:11px;padding:2px 4px}::ng-deep .ag-theme-alpine .ag-cell{border-right:1px solid #ccc}::ng-deep .ag-theme-alpine .ag-row .ag-cell:last-child{border-right:none}::ng-deep .ag-theme-alpine .ag-header-cell{border-right:1px solid #ccc}::ng-deep .ag-theme-alpine .ag-header-row .ag-header-cell:last-child{border-right:none}::ng-deep .ag-theme-alpine .ag-pinned-left-cols-container .ag-cell{border-right:1px solid #ccc!important}::ng-deep .ag-theme-alpine .ag-pinned-left-header .ag-header-cell{border-right:1px solid #ccc!important}.required-box{position:relative;display:inline-block}.required-box .form-control{border:2px solid #C3007D;padding-right:15px;height:38px}.required-box:after{content:\"*\";color:#c3007d;position:absolute;top:1px;right:5px;font-size:16px;pointer-events:none;font-size:22px;font-weight:700}\n"], dependencies: [{ kind: "component", type: i2.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "suppressMenuHide", "enableBrowserTooltips", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "maintainColumnOrder", "suppressFieldDotNotation", "deltaColumnMode", "applyColumnDefOrder", "immutableColumns", "suppressSetColumnStateEvents", "suppressColumnStateEvents", "colWidth", "minColWidth", "maxColWidth", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "components", "frameworkComponents", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "stopEditingWhenGridLosesFocus", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "defaultExportParams", "quickFilterText", "cacheQuickFilter", "excludeChildrenWhenTreeDataFiltering", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "chartToolPanelsDef", "loadingCellRenderer", "loadingCellRendererFramework", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererFramework", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentFramework", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentFramework", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "suppressAggAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDelay", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererFramework", "fullWidthCellRendererParams", "embedFullWidthRows", "deprecatedEmbedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererFramework", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "groupRowsSticky", "groupRowInnerRenderer", "groupRowInnerRendererFramework", "groupMultiAutoColumn", "groupUseEntireRow", "groupSuppressAutoColumn", "rememberGroupStateWhenNewData", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "immutableData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "deltaRowDataMode", "batchUpdateWaitMillis", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "serverSideStoreType", "serverSideInfiniteScroll", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSideSortingAlwaysResets", "serverSideFilteringAlwaysResets", "suppressEnterpriseResetOnNewColumns", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellSelection", "suppressCellFocus", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "deltaSort", "treeDataDisplayType", "angularCompileRows", "angularCompileFilters", "functionsPassive", "enableGroupEdit", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "suppressKeyboardEvent", "localeTextFunc", "getLocaleText", "getDocument", "paginationNumberFormatter", "groupRowAggNodes", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "defaultGroupOrderComparator", "processSecondaryColDef", "processSecondaryColGroupDef", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "defaultGroupSortComparator", "getChildCount", "getServerSideGroupLevelParams", "getServerSideStoreParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowNodeId", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSort", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthCell", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "filterOpened", "filterChanged", "filterModified", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "cellKeyPress", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AccGlDetailsEnquiryReportComponent, decorators: [{
93
155
  type: Component,
94
- args: [{ selector: 'lib-transaction-enquiry-report', template: "<p>transaction-enquiry-report works!</p>\n" }]
95
- }], ctorParameters: function () { return []; } });
156
+ args: [{ selector: 'lib-acc-gl-details-enquiry-report', template: "<div style=\"display: flex; flex-direction: column; width: 100%; padding: 10px; box-sizing: border-box;\">\n\n\n <div style=\"display: flex; flex-wrap: wrap; gap: 10px; align-items: center;\">\n\n <form class=\"d-flex flex-wrap gap-3 align-items-center w-100\">\n\n\n <!-- <div class=\"d-flex align-items-center gap-2\">\n <label for=\"dateTypeFilter\" style=\"font-weight: 500;\" class=\"mb-0 \">Date Type</label>\n <select class=\"form-control\" name=\"dateTypeFilter\" [(ngModel)]=\"dateTypeFilter\" id=\"dateTypeFilter\"\n style=\"width: 140px;\">\n <option [ngValue]=\"1\">Value Date</option>\n <option [ngValue]=\"2\">Posting Date</option>\n </select>\n </div>\n\n\n <div class=\"d-flex align-items-center gap-2\">\n <label for=\"date\" style=\"font-weight: 500;\" class=\"mb-0\">Date</label>\n <input type=\"date\" class=\"form-control\" name=\"date\" [(ngModel)]=\"date\" id=\"date\" style=\"width: 150px;\">\n </div> -->\n\n<!-- ----------------------------------------------------- -->\n<div class=\"d-flex align-items-center gap-2\">\n <label for=\"dateTypeFilter\" style=\"font-weight: 500;\" class=\"mb-0\">Date Type</label>\n <div class=\"required-box\">\n <select class=\"form-control\" name=\"dateTypeFilter\" [(ngModel)]=\"dateTypeFilter\" id=\"dateTypeFilter\">\n <option [ngValue]=\"1\">Value Date</option>\n <option [ngValue]=\"2\">Posting Date</option>\n </select>\n </div>\n</div>\n\n<div class=\"d-flex align-items-center gap-2\">\n <label for=\"date\" style=\"font-weight: 500;\" class=\"mb-0\">Date</label>\n <div class=\"required-box\">\n <input type=\"date\" class=\"form-control\" name=\"date\" [(ngModel)]=\"date\" id=\"date\">\n </div>\n</div>\n\n<!-- -------------- -->\n\n <div>\n <button type=\"button\" style=\"border: 2px solid rgb(13, 110, 253);\" class=\"btn btn-primary\" (click)=\"getAccGLDetailsReport()\">\n View Report\n </button>\n </div>\n\n </form>\n\n\n\n\n\n </div>\n\n\n <hr style=\"margin: 15px 0;\" />\n\n<!-- -------------------------------------------------------------------------------- -->\n <div style=\"border: 1px solid #ccc; padding: 10px; overflow: auto;\">\n\n<!-- *ngIf=\"accGlDetailsEnquiryReportModel != undefined\" -->\n <div style=\"flex:1; overflow-y: auto;\" *ngIf=\"accGlDetailsEnquiryReportModel != undefined\" >\n\n <label style=\"font-size: 21.333px; font-weight: bold; color: black; \">{{companyName}} - General Ledger Account Details Enquiry</label>\n\n <!-- <div class=\"d-flex align-items-center gap-2\">\n <label style=\"font-weight: bold; font-size: 21.333px; color:#004494 ;\" class=\"mb-0\">{{companyName}}</label>\n <label class=\"mb-0\" style=\"font-weight: bold; font-size: 21.333px; color:black ;\"> - General Ledger Account Details Enquiry</label>\n </div> -->\n\n <div class=\"d-flex align-items-center gap-2 mt-4\">\n <label for=\"date\" style=\"font-weight: 500; font-size: 13px;\" class=\"mb-0\">Report User :</label>\n <label class=\"mb-0\" style=\"font-size: 13px;\">{{reportUser}}</label>\n </div>\n\n <div class=\"d-flex align-items-center gap-2 mt-2\">\n <label for=\"date\" style=\"font-weight: 500; font-size: 13px;\" class=\"mb-0\">Report Time :</label>\n <label class=\"mb-0\" style=\"font-size: 13px;\">{{reportTime}}</label>\n </div>\n\n <label style=\"font-weight: bold; font-size: 16px; text-decoration: underline;\" class=\"mt-2\" >Search Criteria</label>\n\n <div class=\"d-flex align-items-center gap-2 mt-2 mb-2\">\n <label for=\"date\" style=\"font-weight: 500; font-size: 13px;\" class=\"mb-0\">Date :</label>\n <label class=\"mb-0\" style=\"font-size: 13px;\">{{formattedDate}}</label>\n </div>\n\n\n\n\n <ag-grid-angular style=\"width: 100%; height: 500px;\" class=\"ag-theme-alpine ag-small-grid\" [rowData]=\"rowData\"\n [columnDefs]=\"columnDefs\" [defaultColDef]=\"defaultColDef\" [enableRangeSelection]=\"true\"\n [enableBrowserTooltips]=\"true\" [gridOptions]=\"gridOptions\" [animateRows]=\"true\" \n [rowHeight]=\"27\" [headerHeight]=\"35\">\n\n </ag-grid-angular>\n\n\n <div class=\"d-flex align-items-center gap-2 mt-2\">\n <label for=\"date\" style=\"font-weight: 500; font-size: 13px;\" class=\"mb-0\">Report User And Time :</label>\n <label class=\"mb-0\" style=\"font-size: 13px;\">{{reportUser}} @ {{reportTime}}</label>\n </div>\n\n\n </div>\n\n\n\n\n\n\n </div>\n</div>", styles: [".ag-theme-alpine{-webkit-user-select:text!important;user-select:text!important}.ag-small-grid .ag-cell,.ag-small-grid .ag-header-cell{font-size:11px;padding:2px 4px}::ng-deep .ag-theme-alpine .ag-cell{border-right:1px solid #ccc}::ng-deep .ag-theme-alpine .ag-row .ag-cell:last-child{border-right:none}::ng-deep .ag-theme-alpine .ag-header-cell{border-right:1px solid #ccc}::ng-deep .ag-theme-alpine .ag-header-row .ag-header-cell:last-child{border-right:none}::ng-deep .ag-theme-alpine .ag-pinned-left-cols-container .ag-cell{border-right:1px solid #ccc!important}::ng-deep .ag-theme-alpine .ag-pinned-left-header .ag-header-cell{border-right:1px solid #ccc!important}.required-box{position:relative;display:inline-block}.required-box .form-control{border:2px solid #C3007D;padding-right:15px;height:38px}.required-box:after{content:\"*\";color:#c3007d;position:absolute;top:1px;right:5px;font-size:16px;pointer-events:none;font-size:22px;font-weight:700}\n"] }]
157
+ }], ctorParameters: function () { return [{ type: ReportService }]; } });
96
158
 
97
159
  const routes = [
98
160
  {
99
161
  path: 'acc-gl-details-enquiry-report',
100
162
  component: AccGlDetailsEnquiryReportComponent
101
- }, {
102
- path: 'transaction-enquiry-report',
103
- component: TransactionEnquiryReportComponent
104
- }
163
+ },
105
164
  ];
106
165
  class ReportsLibRoutingModule {
107
166
  }
@@ -116,36 +175,261 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
116
175
  }]
117
176
  }] });
118
177
 
178
+ // The file contents for the current environment will overwrite these during build.
179
+ // The build system defaults to the dev environment which uses `environment.ts`, but if you do
180
+ // `ng build --env=prod` then `environment.prod.ts` will be used instead.
181
+ // The list of which env maps to which file can be found in `.angular-cli.json`.
182
+ const environment = {
183
+ production: false,
184
+ selfHostUrl: 'http://localhost:9000/api/scriptx',
185
+ configFile: 'assets/config/app-config.json'
186
+ };
187
+
188
+ class ActiveXService {
189
+ constructor(backend) {
190
+ this.backend = backend;
191
+ this.macAddress = "";
192
+ this.ipAddress = "";
193
+ this.machineName = "";
194
+ this.processorId = "";
195
+ this.printerName = "";
196
+ this.scriptxServiceUrl = environment.selfHostUrl;
197
+ this.scriptxHttpClient = new HttpClient(backend);
198
+ this.requestSelfHostedServiceInfo()
199
+ .subscribe((responseList) => {
200
+ this.machineName = responseList[0];
201
+ this.macAddress = responseList[1];
202
+ this.ipAddress = responseList[2];
203
+ this.processorId = responseList[3];
204
+ this.isSelfHostAvailable = true;
205
+ }, err => {
206
+ this.isSelfHostAvailable = false;
207
+ console.error(err);
208
+ });
209
+ }
210
+ getMACAddress() {
211
+ return this.macAddress;
212
+ }
213
+ getIPAddress() {
214
+ return this.ipAddress;
215
+ }
216
+ getMachineName() {
217
+ return this.machineName;
218
+ }
219
+ getPrinterName() {
220
+ return this.printerName;
221
+ }
222
+ getProcessorId() {
223
+ return this.processorId;
224
+ }
225
+ requestSelfHostedServiceInfo() {
226
+ let responseGetMachineName = this.scriptxHttpClient.get(this.scriptxServiceUrl + "/GetMachineName");
227
+ let responseGetMacAddress = this.scriptxHttpClient.get(this.scriptxServiceUrl + "/GetMacAddress");
228
+ let responseGetIpAddress = this.scriptxHttpClient.get(this.scriptxServiceUrl + "/GetIpAddress");
229
+ let responseGetProcessId = this.scriptxHttpClient.get(this.scriptxServiceUrl + "/GetProcessId");
230
+ return forkJoin([
231
+ responseGetMachineName,
232
+ responseGetMacAddress,
233
+ responseGetIpAddress,
234
+ responseGetProcessId,
235
+ ]);
236
+ }
237
+ }
238
+ ActiveXService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActiveXService, deps: [{ token: i1.HttpBackend }], target: i0.ɵɵFactoryTarget.Injectable });
239
+ ActiveXService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActiveXService });
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActiveXService, decorators: [{
241
+ type: Injectable
242
+ }], ctorParameters: function () { return [{ type: i1.HttpBackend }]; } });
243
+
244
+ class SessionService {
245
+ constructor(storage, oauthService) {
246
+ this.storage = storage;
247
+ this.oauthService = oauthService;
248
+ this.userSessionKey = 'FossilUserSessionModel';
249
+ this.onSessionChanged = new BehaviorSubject(null);
250
+ }
251
+ GetObjectByKey(key) {
252
+ if (isStorageAvailable(sessionStorage) && this.storage !== undefined) {
253
+ return this.storage.get(key);
254
+ }
255
+ return null;
256
+ }
257
+ SetObject(key, value) {
258
+ if (isStorageAvailable(sessionStorage) && this.storage !== undefined) {
259
+ this.storage.set(key, value);
260
+ }
261
+ this.UpdateSession();
262
+ }
263
+ RemoveObject(key) {
264
+ if (isStorageAvailable(sessionStorage) && this.storage !== undefined) {
265
+ this.storage.remove(key);
266
+ }
267
+ this.UpdateSession();
268
+ }
269
+ GetUserSession() {
270
+ return this.GetObjectByKey(this.userSessionKey);
271
+ }
272
+ // TODO Consider if this should close the session on the server side or just reset the client session
273
+ Clear() {
274
+ if (isStorageAvailable(sessionStorage) && this.storage !== undefined) {
275
+ this.storage.remove(this.userSessionKey);
276
+ }
277
+ }
278
+ UpdateSession() {
279
+ this.session = this.GetUserSession();
280
+ this.onSessionChanged.next(this.session);
281
+ }
282
+ }
283
+ SessionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionService, deps: [{ token: SESSION_STORAGE }, { token: i1$2.OAuthService }], target: i0.ɵɵFactoryTarget.Injectable });
284
+ SessionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionService });
285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionService, decorators: [{
286
+ type: Injectable
287
+ }], ctorParameters: function () {
288
+ return [{ type: i2$1.InMemoryStorageService, decorators: [{
289
+ type: Inject,
290
+ args: [SESSION_STORAGE]
291
+ }] }, { type: i1$2.OAuthService }];
292
+ } });
293
+
294
+ class AuthHttpInterceptor {
295
+ constructor(oAuthService, activeXService, session) {
296
+ this.oAuthService = oAuthService;
297
+ this.activeXService = activeXService;
298
+ this.session = session;
299
+ }
300
+ intercept(request, next) {
301
+ const token = this.oAuthService.getAccessToken();
302
+ const guid = v4().replace(/-/g, '');
303
+ let clonedRequest = request.clone({
304
+ withCredentials: true
305
+ });
306
+ if (token) {
307
+ clonedRequest = clonedRequest.clone({
308
+ setHeaders: {
309
+ Authorization: `Bearer ${token}`
310
+ },
311
+ withCredentials: true
312
+ });
313
+ }
314
+ if (!request.headers.has('request-trace-id')) {
315
+ clonedRequest = clonedRequest.clone({
316
+ setHeaders: {
317
+ 'request-trace-id': guid
318
+ }
319
+ });
320
+ }
321
+ const macAddress = this.activeXService.getMACAddress();
322
+ if (!request.headers.has('MAC-Address')) {
323
+ clonedRequest = clonedRequest.clone({
324
+ setHeaders: {
325
+ 'MAC-Address': macAddress || ''
326
+ },
327
+ withCredentials: true
328
+ });
329
+ }
330
+ const ipAddress = this.activeXService.getIPAddress();
331
+ if (!request.headers.has('IP-Address')) {
332
+ clonedRequest = clonedRequest.clone({
333
+ setHeaders: {
334
+ 'IP-Address': ipAddress || ''
335
+ },
336
+ withCredentials: true
337
+ });
338
+ }
339
+ const machineName = this.activeXService.getMachineName();
340
+ if (!request.headers.has('Machine-Name')) {
341
+ clonedRequest = clonedRequest.clone({
342
+ setHeaders: {
343
+ 'Machine-Name': machineName || ''
344
+ },
345
+ withCredentials: true
346
+ });
347
+ }
348
+ let userBranch = 'NotSelected';
349
+ let userCompany = 'NotSelected';
350
+ if (this.session) {
351
+ const userSession = this.session.GetUserSession();
352
+ userBranch = (userSession === null || userSession === void 0 ? void 0 : userSession.branch) || 'NotInSession';
353
+ userCompany = (userSession === null || userSession === void 0 ? void 0 : userSession.companyShortCode) || 'NotInSession';
354
+ }
355
+ clonedRequest = clonedRequest.clone({
356
+ setHeaders: {
357
+ 'UserBranch': userBranch || ''
358
+ },
359
+ withCredentials: true
360
+ });
361
+ clonedRequest = clonedRequest.clone({
362
+ setHeaders: {
363
+ 'UserCompany': userCompany || ''
364
+ },
365
+ withCredentials: true
366
+ });
367
+ return next.handle(clonedRequest);
368
+ }
369
+ }
370
+ AuthHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthHttpInterceptor, deps: [{ token: i1$2.OAuthService }, { token: ActiveXService }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Injectable });
371
+ AuthHttpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthHttpInterceptor });
372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthHttpInterceptor, decorators: [{
373
+ type: Injectable
374
+ }], ctorParameters: function () { return [{ type: i1$2.OAuthService }, { type: ActiveXService }, { type: SessionService }]; } });
375
+
119
376
  class ReportsLibModule {
120
377
  }
121
378
  ReportsLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
122
379
  ReportsLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule, declarations: [ReportsLibComponent,
123
- AccGlDetailsEnquiryReportComponent,
124
- TransactionEnquiryReportComponent], imports: [HttpClientModule,
380
+ AccGlDetailsEnquiryReportComponent], imports: [HttpClientModule,
125
381
  AgGridModule,
126
- ReportsLibRoutingModule], exports: [ReportsLibComponent,
127
- AccGlDetailsEnquiryReportComponent,
128
- TransactionEnquiryReportComponent] });
129
- ReportsLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule, imports: [HttpClientModule,
382
+ ReportsLibRoutingModule,
383
+ CommonModule,
384
+ HttpClientModule, i1$3.NgIdleModule, i1$2.OAuthModule, FormsModule], exports: [ReportsLibComponent,
385
+ AccGlDetailsEnquiryReportComponent] });
386
+ ReportsLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule, providers: [
387
+ ActiveXService,
388
+ SessionService,
389
+ {
390
+ provide: HTTP_INTERCEPTORS,
391
+ useClass: AuthHttpInterceptor,
392
+ deps: [OAuthService, ActiveXService, SessionService],
393
+ multi: true
394
+ },
395
+ ], imports: [HttpClientModule,
130
396
  AgGridModule,
131
- ReportsLibRoutingModule] });
397
+ ReportsLibRoutingModule,
398
+ CommonModule,
399
+ HttpClientModule,
400
+ NgIdleModule.forRoot(),
401
+ OAuthModule.forRoot(),
402
+ FormsModule] });
132
403
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule, decorators: [{
133
404
  type: NgModule,
134
405
  args: [{
135
406
  declarations: [
136
407
  ReportsLibComponent,
137
- AccGlDetailsEnquiryReportComponent,
138
- TransactionEnquiryReportComponent
408
+ AccGlDetailsEnquiryReportComponent
139
409
  ],
140
410
  imports: [
141
411
  HttpClientModule,
142
412
  AgGridModule,
143
- ReportsLibRoutingModule
413
+ ReportsLibRoutingModule,
414
+ CommonModule,
415
+ HttpClientModule,
416
+ NgIdleModule.forRoot(),
417
+ OAuthModule.forRoot(),
418
+ FormsModule
419
+ ],
420
+ providers: [
421
+ ActiveXService,
422
+ SessionService,
423
+ {
424
+ provide: HTTP_INTERCEPTORS,
425
+ useClass: AuthHttpInterceptor,
426
+ deps: [OAuthService, ActiveXService, SessionService],
427
+ multi: true
428
+ },
144
429
  ],
145
430
  exports: [
146
431
  ReportsLibComponent,
147
- AccGlDetailsEnquiryReportComponent,
148
- TransactionEnquiryReportComponent
432
+ AccGlDetailsEnquiryReportComponent
149
433
  ]
150
434
  }]
151
435
  }] });
@@ -158,5 +442,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
158
442
  * Generated bundle index. Do not edit.
159
443
  */
160
444
 
161
- export { AccGlDetailsEnquiryReportComponent, ReportsLibComponent, ReportsLibModule, ReportsLibService, TransactionEnquiryReportComponent };
445
+ export { AccGlDetailsEnquiryReportComponent, ReportsLibComponent, ReportsLibModule, ReportsLibService };
162
446
  //# sourceMappingURL=sachin9822-reports-lib.mjs.map