@annalib/anna-feature-spots-approval 0.0.2

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 (102) hide show
  1. package/README.md +63 -0
  2. package/anna-feature-shared-lib/index.d.ts +5 -0
  3. package/anna-feature-shared-lib/public-api.d.ts +16 -0
  4. package/anna-feature-shared-lib/src/biz-rules/constants/generic-business-rule-page.constants.d.ts +5 -0
  5. package/anna-feature-shared-lib/src/biz-rules/models/generic-business-rule-history-popup.model.d.ts +10 -0
  6. package/anna-feature-shared-lib/src/biz-rules/services/generic-business-rule-common-SI-BI-logic.service.d.ts +20 -0
  7. package/anna-feature-shared-lib/src/constants/generic-feature-related-constants.d.ts +3 -0
  8. package/anna-feature-shared-lib/src/daily-revision-listing/components/action-comments-popup/action-comments-popup.component.d.ts +35 -0
  9. package/anna-feature-shared-lib/src/daily-revision-listing/components/offer-rejection-popup/offer-rejection-popup.component.d.ts +44 -0
  10. package/anna-feature-shared-lib/src/daily-revision-listing/models/generic-daily-revision-listing.model.d.ts +64 -0
  11. package/anna-feature-shared-lib/src/daily-revision-listing/models/generic-offers-awaiting-approval.model.d.ts +36 -0
  12. package/anna-feature-shared-lib/src/daily-revision-listing/models/generic-todays-anna-offers-listing.model.d.ts +34 -0
  13. package/anna-feature-shared-lib/src/daily-revision-listing/models/generic-todays-user-offers-listing.model.d.ts +39 -0
  14. package/anna-feature-shared-lib/src/daily-revision-listing/models/spot-approval-generic.model.d.ts +12 -0
  15. package/anna-feature-shared-lib/src/daily-revision-listing/services/generic-daily-revision-listing.service.d.ts +12 -0
  16. package/anna-feature-shared-lib/src/generic-primary-order-panel/models/generic-primary-order-panel.model.d.ts +5 -0
  17. package/anna-feature-shared-lib/src/generic-primary-order-panel/services/generic-primary-order-panel.service.d.ts +13 -0
  18. package/anna-feature-shared-lib/src/order-listing/constants/generic-order-listing.constant.d.ts +18 -0
  19. package/anna-feature-shared-lib/src/spot-approval/models/spot-approval-generic-in-feature-shared-lib.model.d.ts +7 -0
  20. package/anna-feature-shared-lib/src/spot-approval/services/spot-approval-generic-in-feature-shared-lib.service.d.ts +14 -0
  21. package/drr-listing/index.d.ts +5 -0
  22. package/drr-listing/public-api.d.ts +8 -0
  23. package/drr-listing/src/daily-revision-filter-modal/config/daily-revision-listing-backend-service.token.d.ts +10 -0
  24. package/drr-listing/src/daily-revision-filter-modal/daily-revision-filter-modal.component.d.ts +89 -0
  25. package/drr-listing/src/daily-revision-filter-modal/models/daily-revision-filter-modal.model.d.ts +41 -0
  26. package/drr-listing/src/daily-revision-listing/config/daily-revision-listing-backend-service.token.d.ts +18 -0
  27. package/drr-listing/src/daily-revision-listing/constants/daily-revision-listing.constant.d.ts +80 -0
  28. package/drr-listing/src/daily-revision-listing/constants/orders.constant.d.ts +69 -0
  29. package/drr-listing/src/daily-revision-listing/daily-revision-listing.component.d.ts +154 -0
  30. package/drr-listing/src/daily-revision-listing/models/daily-revision-listing.model.d.ts +33 -0
  31. package/drr-listing/src/daily-revision-listing/services/daily-revision-listing.service.d.ts +25 -0
  32. package/fesm2022/annalib-anna-feature-spots-approval-anna-feature-shared-lib.mjs +670 -0
  33. package/fesm2022/annalib-anna-feature-spots-approval-anna-feature-shared-lib.mjs.map +1 -0
  34. package/fesm2022/annalib-anna-feature-spots-approval-drr-listing.mjs +2844 -0
  35. package/fesm2022/annalib-anna-feature-spots-approval-drr-listing.mjs.map +1 -0
  36. package/fesm2022/annalib-anna-feature-spots-approval-spot-approval-shared-lib.mjs +112 -0
  37. package/fesm2022/annalib-anna-feature-spots-approval-spot-approval-shared-lib.mjs.map +1 -0
  38. package/fesm2022/annalib-anna-feature-spots-approval-spots-approval.mjs +12115 -0
  39. package/fesm2022/annalib-anna-feature-spots-approval-spots-approval.mjs.map +1 -0
  40. package/fesm2022/annalib-anna-feature-spots-approval-src-lib-all-offers-listing.mjs +1369 -0
  41. package/fesm2022/annalib-anna-feature-spots-approval-src-lib-all-offers-listing.mjs.map +1 -0
  42. package/fesm2022/annalib-anna-feature-spots-approval-src-lib-spot-approval-seller-or-buyer-revision.mjs +1223 -0
  43. package/fesm2022/annalib-anna-feature-spots-approval-src-lib-spot-approval-seller-or-buyer-revision.mjs.map +1 -0
  44. package/fesm2022/annalib-anna-feature-spots-approval.mjs +88 -0
  45. package/fesm2022/annalib-anna-feature-spots-approval.mjs.map +1 -0
  46. package/index.d.ts +5 -0
  47. package/lib/anna-feature-spots-approval.module.d.ts +20 -0
  48. package/package.json +57 -0
  49. package/public-api.d.ts +1 -0
  50. package/spot-approval-shared-lib/index.d.ts +5 -0
  51. package/spot-approval-shared-lib/public-api.d.ts +2 -0
  52. package/spot-approval-shared-lib/src/revision-offer-status-progress-view/revision-offer-status-progress-view.component.d.ts +19 -0
  53. package/spot-approval-shared-lib/src/revision-summary-panel/revision-summary-panel.component.d.ts +21 -0
  54. package/spots-approval/index.d.ts +5 -0
  55. package/spots-approval/public-api.d.ts +21 -0
  56. package/spots-approval/src/add-os-spots-popup/add-os-spots-popup.component.d.ts +59 -0
  57. package/spots-approval/src/anna-revision/anna-revision.component.d.ts +551 -0
  58. package/spots-approval/src/badly-behaved-spot-details-popup/badly-behaved-spot-details-popup.component.d.ts +38 -0
  59. package/spots-approval/src/badly-behaved-spot-details-popup/models/badly-behaved-spot-details-popup.model.d.ts +15 -0
  60. package/spots-approval/src/badly-behaved-spot-details-popup/services/badly-behaved-spot-details-popup.service.d.ts +7 -0
  61. package/spots-approval/src/cancel-offers-popup/cancel-offers-popup.component.d.ts +36 -0
  62. package/spots-approval/src/config/spots-approval-backend-service.token.d.ts +30 -0
  63. package/spots-approval/src/constants/create-or-edit-offers.constant.d.ts +44 -0
  64. package/spots-approval/src/constants/spots-approval.constant.d.ts +129 -0
  65. package/spots-approval/src/create-or-edit-adu-or-bonus/create-or-edit-adu-or-bonus.component.d.ts +214 -0
  66. package/spots-approval/src/create-or-edit-offers-popup/create-or-edit-offers-popup.component.d.ts +333 -0
  67. package/spots-approval/src/credit-confirmation-table-popup/credit-confirmation-table-popup.component.d.ts +72 -0
  68. package/spots-approval/src/models/anna-revisions-backend.model.d.ts +325 -0
  69. package/spots-approval/src/models/anna-revisions-enums.model.d.ts +53 -0
  70. package/spots-approval/src/models/anna-revisions-response.model.d.ts +355 -0
  71. package/spots-approval/src/models/anna-revisions-total-rows.model.d.ts +124 -0
  72. package/spots-approval/src/models/create-or-edit-offer-total-rows.model.d.ts +73 -0
  73. package/spots-approval/src/models/create-or-edit-offers-popup.model.d.ts +384 -0
  74. package/spots-approval/src/models/order-revision-detail.model.d.ts +156 -0
  75. package/spots-approval/src/offered-mg-edit-table/offered-mg-edit-table.component.d.ts +74 -0
  76. package/spots-approval/src/other-spots-edit-table/other-spots-edit-table.component.d.ts +44 -0
  77. package/spots-approval/src/political-rate-warning-popup/political-rate-warning-popup.component.d.ts +26 -0
  78. package/spots-approval/src/revision-header/revision-header.component.d.ts +21 -0
  79. package/spots-approval/src/revision-summary/revision-summary.component.d.ts +22 -0
  80. package/spots-approval/src/select-spot-length-popup/select-spot-length-popup.component.d.ts +37 -0
  81. package/spots-approval/src/services/create-or-edit-offers-popup.service.d.ts +25 -0
  82. package/spots-approval/src/services/generic-spots-approval.service.d.ts +99 -0
  83. package/spots-approval/src/services/spots-approval.service.d.ts +81 -0
  84. package/spots-approval/src/spot-details-popup/spot-details-popup.component.d.ts +57 -0
  85. package/src/lib/all-offers-listing/index.d.ts +5 -0
  86. package/src/lib/all-offers-listing/public-api.d.ts +6 -0
  87. package/src/lib/all-offers-listing/src/all-offers-listing.component.d.ts +162 -0
  88. package/src/lib/all-offers-listing/src/configs/all-offers-listing-backend.token.d.ts +11 -0
  89. package/src/lib/all-offers-listing/src/models/all-offers-filter.model.d.ts +12 -0
  90. package/src/lib/all-offers-listing/src/models/all-offers-listing-backend.model.d.ts +88 -0
  91. package/src/lib/all-offers-listing/src/models/all-offers-listing.constant.d.ts +84 -0
  92. package/src/lib/all-offers-listing/src/models/all-offers-listing.model.d.ts +95 -0
  93. package/src/lib/all-offers-listing/src/services/all-offers-listing.service.d.ts +25 -0
  94. package/src/lib/spot-approval-seller-or-buyer-revision/index.d.ts +5 -0
  95. package/src/lib/spot-approval-seller-or-buyer-revision/public-api.d.ts +6 -0
  96. package/src/lib/spot-approval-seller-or-buyer-revision/src/seller-or-buyer-revision/models/seller-or-buyer-revision-additional-data.model.d.ts +73 -0
  97. package/src/lib/spot-approval-seller-or-buyer-revision/src/seller-or-buyer-revision/models/seller-or-buyer-revision-backend.model.d.ts +57 -0
  98. package/src/lib/spot-approval-seller-or-buyer-revision/src/seller-or-buyer-revision/models/seller-or-buyer-revision-response.model.d.ts +117 -0
  99. package/src/lib/spot-approval-seller-or-buyer-revision/src/seller-or-buyer-revision/models/seller-or-buyer-revision-total-row.model.d.ts +29 -0
  100. package/src/lib/spot-approval-seller-or-buyer-revision/src/seller-or-buyer-revision/models/seller-or-buyer-revision.constant.d.ts +13 -0
  101. package/src/lib/spot-approval-seller-or-buyer-revision/src/seller-or-buyer-revision/models/seller-or-buyer-revision.token.d.ts +14 -0
  102. package/src/lib/spot-approval-seller-or-buyer-revision/src/seller-or-buyer-revision/seller-or-buyer-revision.component.d.ts +128 -0
@@ -0,0 +1,2844 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, EventEmitter, ViewChild, Output, Input, Inject, Component, Injectable, ChangeDetectionStrategy } from '@angular/core';
3
+ import { NgIf, NgTemplateOutlet, NgClass, NgStyle, NgFor } from '@angular/common';
4
+ import * as i4$1 from '@angular/router';
5
+ import { RouterLink } from '@angular/router';
6
+ import * as i4 from '@annalib/anna-core';
7
+ import { AnnaCoreModule, AnnaNumberFormatService, GTTableRelatedCommonFunctionsService, ANNAIconNames, ErrorCodes, AnnaNonEditableGenericTableComponent } from '@annalib/anna-core';
8
+ import * as i6 from '@annalib/anna-design-components-lib';
9
+ import { MultiSelectIdText, DASHBOARD_FILTER_MODAL_SERVICE_TOKEN, SkeletonLoaderComponent, SingleSelectComponent, MultiSelectComponent, EquivalisationOfDataToggleBtnComponent, DemoNormalizationComponent, MessageBoxData, GenericMessageBoxTheme, AnnaDesignComponentsLibModule } from '@annalib/anna-design-components-lib';
10
+ import * as i2 from '@ng-bootstrap/ng-bootstrap';
11
+ import { isEqual, cloneDeep } from 'lodash-es';
12
+ import * as i7 from '@annalib/anna-feature-lib';
13
+ import * as i3 from '@annalib/anna-feature-lib/anna-feature-shared-lib';
14
+ import { UserOfferSpecificDRROrderDataForSeller, ANNAOfferSpecificDRROrderDataForSeller, ANNAOfferSpecificDRROrderDataForBuyer } from '@annalib/anna-feature-lib/anna-feature-shared-lib';
15
+ import dayjs from 'dayjs';
16
+ import * as i8 from 'ngx-skeleton-loader';
17
+ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
18
+ import * as i5 from 'ngx-toastr';
19
+ import { Subject } from 'rxjs';
20
+ import { takeUntil } from 'rxjs/operators';
21
+
22
+ const DAILY_REVISION_FILTERS_SERVICE_TOKEN = new InjectionToken("DRRFiltersBackendService token");
23
+
24
+ class SecondaryFiltersData {
25
+ constructor(data) {
26
+ this.productCategories = data.ProductCategories;
27
+ this.childAndProxiedUsers = new ChildAndProxiedUsers(data.ChildAndProxiedUsers);
28
+ }
29
+ }
30
+ class ChildAndProxiedUsers {
31
+ constructor(data) {
32
+ this.childUsers = data.ChildUsers.map((item) => new Users(item));
33
+ this.proxiedUsers = data.ProxiedUsers.map((item) => new Users(item));
34
+ }
35
+ }
36
+ class Users {
37
+ constructor(data) {
38
+ this.userId = data.UserId;
39
+ this.userName = data.UserName;
40
+ this.advertisers = data.Advertisers.map((item) => new Advertisers(item));
41
+ this.isDeleted = data.IsDeleted;
42
+ }
43
+ }
44
+ class Advertisers {
45
+ constructor(data) {
46
+ this.advertiserId = data.AdvertiserId;
47
+ this.advertiserName = data.AdvertiserName;
48
+ }
49
+ }
50
+
51
+ /* eslint-disable import/no-extraneous-dependencies */
52
+ class DailyRevisionFilterModalComponent {
53
+ constructor(multiselectDropdownService, modalService, annaGlobalService, router, currentRoute, persistingFilterService, consumingProjectDRRFilterBackendService, consumingProjectDashboardFilterService, updateStationIdService) {
54
+ this.multiselectDropdownService = multiselectDropdownService;
55
+ this.modalService = modalService;
56
+ this.annaGlobalService = annaGlobalService;
57
+ this.router = router;
58
+ this.currentRoute = currentRoute;
59
+ this.persistingFilterService = persistingFilterService;
60
+ this.consumingProjectDRRFilterBackendService = consumingProjectDRRFilterBackendService;
61
+ this.consumingProjectDashboardFilterService = consumingProjectDashboardFilterService;
62
+ this.updateStationIdService = updateStationIdService;
63
+ this.stationOrOgDropdownTitleText = "Station";
64
+ this.showUserFilter = true;
65
+ this.showDemoNormalization = false;
66
+ this.handleNavigation = true;
67
+ this.applyFilter = new EventEmitter();
68
+ this.getInitialFilter = new EventEmitter();
69
+ // selectedNormalization: NormalizedData;
70
+ this.multiSelectBottomBorderObj = {};
71
+ this.usersText = "";
72
+ this.configModalOptions();
73
+ this.dropdownConfig();
74
+ this.resetClonedFilter();
75
+ }
76
+ ngOnChanges(changes) {
77
+ if (changes.filterData?.currentValue &&
78
+ !isEqual(changes?.filterData?.currentValue, changes?.filterData?.previousValue)) {
79
+ if (this.stationIdsWithValidLicense?.length) {
80
+ this.filterData = this.filterData.filter((station) => this.stationIdsWithValidLicense.includes(parseInt(station.id.toString(), 10)));
81
+ }
82
+ this.getLoginUserId();
83
+ this.setFilterData();
84
+ }
85
+ }
86
+ ngOnInit() {
87
+ this.singleSelectConfig = { ...this.annaGlobalService.defaultSingleSelectConfig };
88
+ }
89
+ configModalOptions() {
90
+ this.ngbModalOptions = {
91
+ windowClass: "dashboard-filter-modal",
92
+ };
93
+ }
94
+ resetClonedFilter() {
95
+ this.clonedFilter = {
96
+ station: null,
97
+ isEquivalised: false,
98
+ // normalizedData: null,
99
+ updateNavigation: false,
100
+ };
101
+ this.addUserKeyInClonedFilter(null);
102
+ }
103
+ getLoginUserId() {
104
+ if (this.showUserFilter) {
105
+ const loginUser = localStorage.getItem("userProfileData");
106
+ this.loggedInUserId = +JSON.parse(loginUser).userId;
107
+ this.loggedInUserName = JSON.parse(localStorage.getItem("userProfileData")).userName;
108
+ }
109
+ }
110
+ setFilterData() {
111
+ this.userNormalizationLoader = true;
112
+ this.setStationData();
113
+ this.setEquivilizationToggleVal();
114
+ if (this.showUserFilter) {
115
+ this.setUsersAndNormalizationData(this.callBackFuncOnInitialSetup);
116
+ }
117
+ else {
118
+ // this.getNormalizationData(this.callBackFuncOnInitialSetup);
119
+ this.callBackFuncOnInitialSetup();
120
+ }
121
+ }
122
+ setStationData() {
123
+ this.stationsOrOGs = cloneDeep(this.filterData);
124
+ // this.stationsOrOGs = sortBy(this.stationsOrOGs, (o) => o.text); // commented to maintain the same order of stations as in other pages
125
+ if (this.stationsOrOGs.length > 0) {
126
+ if (this.persistingFilter && this.persistingFilter.stationId) {
127
+ this.selectedStationOrOG = this.stationsOrOGs.some((item) => item.id === this.persistingFilter.stationId)
128
+ ? this.stationsOrOGs.find((item) => item.id === this.persistingFilter.stationId)
129
+ : this.stationsOrOGs[0];
130
+ }
131
+ else {
132
+ this.selectedStationOrOG = this.stationsOrOGs[0];
133
+ }
134
+ }
135
+ else {
136
+ this.selectedStationOrOG = null;
137
+ }
138
+ this.previousSelectedStationOrOG = cloneDeep(this.selectedStationOrOG);
139
+ }
140
+ callBackFuncOnInitialSetup() {
141
+ // if(this.showDemoNormalization){
142
+ // this.selectedNormalization = this.persistingFilter?.normalizedData
143
+ // ? this.setPersistedNormalizedFilter()
144
+ // : this.setDefaultDataForNormalization();
145
+ // }
146
+ if (this.showUserFilter) {
147
+ this.createUserDropdownData();
148
+ this.selectUserDropdownData();
149
+ }
150
+ this.setInitialFiltersForComponent();
151
+ this.setClonedDataAndEmitFilters(false);
152
+ if (this.showUserFilter) {
153
+ this.usersText = this.getTextFromSelectedFilters(this.clonedFilter.users, this.usersList);
154
+ }
155
+ this.userNormalizationLoader = false;
156
+ this.isFilterValueChanged = false;
157
+ }
158
+ setInitialFiltersForComponent() {
159
+ this.initialFiltersForDailyRevisionModal = {};
160
+ this.initialFiltersForDailyRevisionModal.station = this.stationsOrOGs[0];
161
+ this.initialFiltersForDailyRevisionModal.isEquivalised = false;
162
+ // this.initialFiltersForDailyRevisionModal.normalizedData = this.setDefaultDataForNormalization(false);
163
+ this.initialFiltersForDailyRevisionModal.userIds = this.usersList
164
+ ? this.usersList.map((item) => item.id)
165
+ : null;
166
+ if (!this.handleNavigation) {
167
+ this.getInitialFilter.emit(this.initialFiltersForDailyRevisionModal);
168
+ }
169
+ }
170
+ getTextFromSelectedFilters(data, originalData) {
171
+ if (data) {
172
+ if (originalData.length === data.length) {
173
+ return `All (${originalData.length})`;
174
+ }
175
+ else if (data.length === 1) {
176
+ return `${data[0].text}`;
177
+ }
178
+ else if (data.length > 1 && data[0].text === "-") {
179
+ return `${data[1].text} + ${data.length - 1}`;
180
+ }
181
+ else if (data.length > 1 && data[0].text !== "-") {
182
+ return `${data[0].text} + ${data.length - 1}`;
183
+ }
184
+ }
185
+ return "-";
186
+ }
187
+ setClonedDataAndEmitFilters(updateNavigation) {
188
+ const filterApplied = this.setClonedFilter(updateNavigation);
189
+ this.applyFilter.emit(filterApplied);
190
+ }
191
+ closeOptionsModal() {
192
+ this.isFilterValueChanged = false;
193
+ this.modalRef.close();
194
+ }
195
+ setClonedFilter(updateNavigation) {
196
+ this.clonedFilter = {
197
+ isEquivalised: this.selectedEquivilizationToggle,
198
+ // normalizedData: this.selectedNormalization,
199
+ station: this.selectedStationOrOG,
200
+ updateNavigation,
201
+ };
202
+ this.updateStationIdService.updateStationIdInLocalStorage([this.clonedFilter.station.id.toString()]);
203
+ this.addUserKeyInClonedFilter(this.selectedUsersList);
204
+ return this.clonedFilter;
205
+ }
206
+ addUserKeyInClonedFilter(val) {
207
+ if (this.showUserFilter) {
208
+ this.clonedFilter.users = val;
209
+ }
210
+ }
211
+ createUserDropdownData() {
212
+ const loggedInUserName = JSON.parse(localStorage.getItem("userProfileData")).userName;
213
+ const loggedInUser = new MultiSelectIdText(this.loggedInUserId, loggedInUserName, true);
214
+ let reporteeUsers = this.secondaryFilterData.childAndProxiedUsers.childUsers.map((item) => new MultiSelectIdText(item.userId, item.userName + (item.isDeleted ? " (Deleted)" : ""), true));
215
+ let proxyUsers = this.secondaryFilterData.childAndProxiedUsers.proxiedUsers.map((item) => new MultiSelectIdText(item.userId, `${item.userName} (Proxy${item.isDeleted ? ", Deleted" : ""})`, true));
216
+ const deletedReporteeUsers = reporteeUsers.filter((n) => n.text.includes("Deleted"));
217
+ const deletedProxyUsers = proxyUsers.filter((n) => n.text.includes("Deleted"));
218
+ reporteeUsers = reporteeUsers.filter((n) => n.id !== loggedInUser.id && !n.text.includes("Deleted"));
219
+ proxyUsers = proxyUsers.filter((n) => n.id !== loggedInUser.id && !n.text.includes("Deleted"));
220
+ this.multiSelectBottomBorderObj = {};
221
+ this.multiSelectBottomBorderObj[loggedInUser.id] = true;
222
+ if (reporteeUsers.length > 0) {
223
+ const lastUserId = reporteeUsers[reporteeUsers.length - 1].id;
224
+ this.multiSelectBottomBorderObj[lastUserId] = true;
225
+ }
226
+ if (proxyUsers.length > 0) {
227
+ const lastUserId = proxyUsers[proxyUsers.length - 1].id;
228
+ this.multiSelectBottomBorderObj[lastUserId] = true;
229
+ }
230
+ this.usersList = [loggedInUser, ...reporteeUsers, ...proxyUsers, ...deletedReporteeUsers, ...deletedProxyUsers];
231
+ }
232
+ selectUserDropdownData() {
233
+ if (this.persistingFilter?.userIds) {
234
+ const userIdsSet = new Set(this.persistingFilter.userIds);
235
+ this.selectedUsersList = this.usersList.filter((item) => userIdsSet.has(item.id));
236
+ this.multiselectDropdownService.resetMultiSelect(this.selectedUsersList, this.usersList);
237
+ this.usersList = [...this.usersList];
238
+ }
239
+ else {
240
+ this.selectedUsersList = cloneDeep(this.usersList);
241
+ }
242
+ }
243
+ findLoggedInUserIndex(users, loggedInUserId) {
244
+ return users.length > 0 ? users.findIndex((item) => item.id === loggedInUserId) : -1;
245
+ }
246
+ setEquivilizationToggleVal() {
247
+ this.selectedEquivilizationToggle =
248
+ this.persistingFilter?.isEquivalised != null ? this.persistingFilter.isEquivalised : false;
249
+ }
250
+ // setPersistedNormalizedFilter() {
251
+ // if (this.persistingFilter.normalizedData.toggle) {
252
+ // const { demoId } = this.persistingFilter.normalizedData;
253
+ // this.demoToShow = this.normalizationDemographics.filter((item) => item.id === demoId)[0].text;
254
+ // }
255
+ // return this.persistingFilter.normalizedData;
256
+ // }
257
+ // setDefaultDataForNormalization(setSelectedDemoText: boolean = true): NormalizedData {
258
+ // const A18Demo = this.normalizationDemographics.filter((item) => item.text === this.defaultDemo)[0];
259
+ // if (setSelectedDemoText) {
260
+ // this.demoToShow = A18Demo?.text;
261
+ // }
262
+ // const A18DemoId = A18Demo?.id;
263
+ // return {
264
+ // toggle: this.consumingProjectDashboardFilterService.defaultDemoToggleValue,
265
+ // demoId: +A18DemoId,
266
+ // };
267
+ // }
268
+ // getNormalizationData(callBackFunc: any) {
269
+ // this.consumingProjectDRRFilterBackendService
270
+ // .getNormalizedDemoForStation(this.selectedStationOrOG.id)
271
+ // .subscribe((res: any) => {
272
+ // this.normalizationDemographics = res.map((item: any) => new IdText(item.Id, item.Name));
273
+ // callBackFunc.call(this);
274
+ // });
275
+ // }
276
+ setUsersAndNormalizationData(callBackFunc) {
277
+ const payloadForSecondaryFilterApi = this.createPayloadForSecondaryFilterApi();
278
+ this.showLoaderInUsersDropdown = true;
279
+ if (this.selectedStationOrOG) {
280
+ // const userApi =
281
+ // this.consumingProjectDRRFilterBackendService.getSecondaryFiltersForDashboard(
282
+ // payloadForSecondaryFilterApi,
283
+ // );
284
+ // const demoNormalization = this.consumingProjectDRRFilterBackendService.getNormalizedDemoForStation(
285
+ // this.selectedStationOrOG.id,
286
+ // );
287
+ // forkJoin([userApi, demoNormalization]).subscribe((res: any) => {
288
+ // this.secondaryFilterData = new SecondaryFiltersData(res[0].data);
289
+ // this.normalizationDemographics = res[1].map((item: any) => new IdText(item.Id, item.Name));
290
+ // callBackFunc.call(this);
291
+ // });
292
+ this.consumingProjectDRRFilterBackendService
293
+ .getSecondaryFiltersForDashboard(payloadForSecondaryFilterApi)
294
+ .subscribe((res) => {
295
+ this.secondaryFilterData = new SecondaryFiltersData(res.data);
296
+ this.showLoaderInUsersDropdown = false;
297
+ callBackFunc.call(this);
298
+ });
299
+ }
300
+ }
301
+ createPayloadForSecondaryFilterApi() {
302
+ const payload = {
303
+ loggedInUserId: this.loggedInUserId,
304
+ stationIds: [this.selectedStationOrOG.id],
305
+ quarterStartDate: null,
306
+ quarterEndDate: null,
307
+ };
308
+ return payload;
309
+ }
310
+ dropdownConfig() {
311
+ this.ngSelectConfigStation = { ...this.annaGlobalService.defaultNgSelectSettings };
312
+ this.ngSelectConfigStation.placeholder = "No station selected";
313
+ this.usersDropdownSetting = { ...this.annaGlobalService.defaultMultiSelectConfig };
314
+ this.usersDropdownSetting.placeholder = "Select Users";
315
+ }
316
+ openFilterModal() {
317
+ setTimeout(() => {
318
+ this.modalRef = this.modalService.open(this.dRFilterModal, this.ngbModalOptions);
319
+ }, 0);
320
+ }
321
+ isFilterDropdownValueChanged() {
322
+ this.isFilterValueChanged =
323
+ !isEqual(this.clonedFilter.station.id, this.selectedStationOrOG.id) ||
324
+ this.clonedFilter.isEquivalised !== this.selectedEquivilizationToggle;
325
+ // || !isEqual(this.clonedFilter.normalizedData, this.selectedNormalization);
326
+ if (this.showUserFilter && !this.isFilterValueChanged) {
327
+ this.isFilterValueChanged = !isEqual(this.clonedFilter.users, this.selectedUsersList);
328
+ }
329
+ }
330
+ updateEquivalizationToggle(val) {
331
+ this.selectedEquivilizationToggle = val;
332
+ this.isFilterDropdownValueChanged();
333
+ }
334
+ // updateNormalizationValue(val: NormalizedData) {
335
+ // this.selectedNormalization = val;
336
+ // this.isFilterDropdownValueChanged();
337
+ // }
338
+ stationOrOGSelected(station) {
339
+ this.selectedStationOrOG = station;
340
+ if (this.showUserFilter) {
341
+ this.setUsersAndNormalizationData(this.callBackFuncOnStationChange);
342
+ }
343
+ else {
344
+ // this.getNormalizationData(this.callBackFuncOnStationChange);
345
+ this.callBackFuncOnStationChange();
346
+ }
347
+ }
348
+ callBackFuncOnStationChange() {
349
+ // this.selectedNormalization = this.setDefaultDataForNormalization();
350
+ if (this.showUserFilter) {
351
+ this.createUserDropdownData();
352
+ this.initialFiltersForDailyRevisionModal.userIds = this.usersList.map((item) => item.id);
353
+ }
354
+ if (!this.handleNavigation) {
355
+ this.getInitialFilter.emit(this.initialFiltersForDailyRevisionModal);
356
+ }
357
+ this.selectedUsersList = cloneDeep(this.usersList);
358
+ this.isFilterDropdownValueChanged();
359
+ }
360
+ userSelectionChanged(selectedItems) {
361
+ this.selectedUsersList = cloneDeep(selectedItems);
362
+ this.multiselectDropdownService.resetMultiSelect(this.selectedUsersList, this.usersList);
363
+ this.usersList = [...this.usersList];
364
+ this.isFilterDropdownValueChanged();
365
+ }
366
+ onCancelClicked() {
367
+ const currentSelectedStationId = this.selectedStationOrOG.id;
368
+ const previousSelectedStationId = this.clonedFilter.station.id;
369
+ this.selectedStationOrOG = this.stationsOrOGs.filter((n) => n.id === this.clonedFilter.station.id)[0];
370
+ this.selectedEquivilizationToggle = this.clonedFilter.isEquivalised;
371
+ if (currentSelectedStationId === previousSelectedStationId) {
372
+ this.callBackFuncOnCancelClicked();
373
+ }
374
+ else if (this.showUserFilter) {
375
+ this.setUsersAndNormalizationData(this.callBackFuncOnCancelClicked);
376
+ }
377
+ else {
378
+ // this.getNormalizationData(this.callBackFuncOnCancelClicked);
379
+ this.callBackFuncOnCancelClicked();
380
+ }
381
+ this.closeOptionsModal();
382
+ }
383
+ callBackFuncOnCancelClicked() {
384
+ // this.selectedNormalization = cloneDeep(this.clonedFilter.normalizedData);
385
+ if (this.showUserFilter) {
386
+ this.createUserDropdownData();
387
+ const userIdsSet = new Set(this.clonedFilter.users.map((item) => item.id));
388
+ this.selectedUsersList = this.usersList.filter((item) => userIdsSet.has(item.id));
389
+ this.multiselectDropdownService.resetMultiSelect(this.selectedUsersList, this.usersList);
390
+ this.usersList = [...this.usersList];
391
+ this.initialFiltersForDailyRevisionModal.userIds = this.usersList.map((item) => item.id);
392
+ if (!this.handleNavigation) {
393
+ this.getInitialFilter.emit(this.initialFiltersForDailyRevisionModal);
394
+ }
395
+ }
396
+ }
397
+ onApplyDRFilterAndUpdateNavigation() {
398
+ this.updateStationIdService.updateStationIdInLocalStorage([this.selectedStationOrOG.id.toString()]);
399
+ this.previousSelectedStationOrOG = cloneDeep(this.selectedStationOrOG);
400
+ this.setClonedDataAndEmitFilters(true);
401
+ // this.showSelectedDemoValue();
402
+ if (this.showUserFilter) {
403
+ this.usersText = this.getTextFromSelectedFilters(this.clonedFilter.users, this.usersList);
404
+ }
405
+ if (this.handleNavigation) {
406
+ this.updateNavigationHistory();
407
+ }
408
+ this.closeOptionsModal();
409
+ }
410
+ // showSelectedDemoValue() {
411
+ // if (this.selectedNormalization.toggle) {
412
+ // const { demoId } = this.selectedNormalization;
413
+ // this.demoToShow = this.normalizationDemographics.filter((item) => item.id === demoId)[0].text;
414
+ // } else {
415
+ // this.demoToShow = null;
416
+ // }
417
+ // }
418
+ updateNavigationHistory() {
419
+ const queryParams = this.createQueryParams();
420
+ if (Object.keys(queryParams).length > 0) {
421
+ const hashedQueryParams = this.persistingFilterService.storeKeyValueInLocalStorage(queryParams);
422
+ this.router.navigate([], {
423
+ relativeTo: this.currentRoute,
424
+ queryParams: { popupFilter: hashedQueryParams },
425
+ queryParamsHandling: "merge",
426
+ });
427
+ }
428
+ else {
429
+ this.router.navigate([]);
430
+ }
431
+ }
432
+ createQueryParams() {
433
+ const param = {};
434
+ if (this.initialFiltersForDailyRevisionModal.station?.id !== this.clonedFilter.station.id) {
435
+ param.stationId = this.clonedFilter.station.id;
436
+ }
437
+ if (this.initialFiltersForDailyRevisionModal.isEquivalised !== this.clonedFilter.isEquivalised) {
438
+ param.isEquivalised = this.clonedFilter.isEquivalised;
439
+ }
440
+ // if (!isEqual(this.initialFiltersForDailyRevisionModal.normalizedData, this.clonedFilter.normalizedData)) {
441
+ // param.normalizedData = this.clonedFilter.normalizedData;
442
+ // }
443
+ if (this.showUserFilter) {
444
+ const userIds = this.clonedFilter.users.map((item) => item.id);
445
+ if (!isEqual(this.initialFiltersForDailyRevisionModal.userIds, userIds)) {
446
+ param.userIds = userIds;
447
+ }
448
+ }
449
+ return param;
450
+ }
451
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DailyRevisionFilterModalComponent, deps: [{ token: i6.MultiSelectDropdownService }, { token: i2.NgbModal }, { token: i4.AnnaGlobalConfigService }, { token: i4$1.Router }, { token: i4$1.ActivatedRoute }, { token: i4.AnnaPersistingFilterService }, { token: DAILY_REVISION_FILTERS_SERVICE_TOKEN }, { token: DASHBOARD_FILTER_MODAL_SERVICE_TOKEN }, { token: i4.UpdateStationIdService }], target: i0.ɵɵFactoryTarget.Component }); }
452
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DailyRevisionFilterModalComponent, isStandalone: true, selector: "anna-feature-daily-revision-filter-modal", inputs: { filterData: "filterData", stationOrOgDropdownTitleText: "stationOrOgDropdownTitleText", error: "error", showUserFilter: "showUserFilter", showDemoNormalization: "showDemoNormalization", persistingFilter: "persistingFilter", headerText: "headerText", handleNavigation: "handleNavigation", toDisable: "toDisable", stationIdsWithValidLicense: "stationIdsWithValidLicense" }, outputs: { applyFilter: "applyFilter", getInitialFilter: "getInitialFilter" }, viewQueries: [{ propertyName: "dRFilterModal", first: true, predicate: ["dRFilterModal"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<article class=\"selected-filters-container\">\n <section\n *ngIf=\"filterData\"\n class=\"filter-view\"\n >\n <div>\n <header class=\"header\">{{ stationOrOgDropdownTitleText }}</header>\n <p class=\"selected-value\">\n {{ previousSelectedStationOrOG?.text | AnnaConvertZeroOrNullOrUndefined: \"-\" }}\n </p>\n </div>\n\n <div *ngIf=\"showUserFilter\">\n <ng-container *ngIf=\"!userNormalizationLoader\">\n <header class=\"header\">Users</header>\n <p class=\"selected-value\">{{ usersText }}</p>\n </ng-container>\n <ng-container\n *ngIf=\"userNormalizationLoader\"\n [ngTemplateOutlet]=\"userSkeletonLoader\"\n ></ng-container>\n </div>\n\n <!-- <div>\n <ng-container *ngIf=\"!userNormalizationLoader\">\n <header class=\"header\">Demo Normalization</header>\n <ng-container [ngTemplateOutlet]=\"normalizationSelected\"></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"userNormalizationLoader\"\n [ngTemplateOutlet]=\"normalizationSkeletonLoader\"\n ></ng-container>\n </div> -->\n\n <div>\n <ng-container *ngIf=\"!userNormalizationLoader\">\n <header class=\"header\">Equivalized Data</header>\n <p class=\"selected-value\">{{ clonedFilter.isEquivalised ? \"Yes\" : \"No\" }}</p>\n </ng-container>\n <ng-container\n *ngIf=\"userNormalizationLoader\"\n [ngTemplateOutlet]=\"normalizationSkeletonLoader\"\n ></ng-container>\n </div>\n </section>\n\n <section\n *ngIf=\"!filterData\"\n class=\"filter-view\"\n >\n <ng-container [ngTemplateOutlet]=\"skeletonLoader\"></ng-container>\n </section>\n\n <button\n class=\"anna edit-button\"\n *ngIf=\"!toDisable\"\n (click)=\"openFilterModal()\"\n >\n Edit\n </button>\n\n <ng-container\n *ngIf=\"toDisable\"\n [ngTemplateOutlet]=\"editButtonLoader\"\n ></ng-container>\n</article>\n\n<!-- <ng-template #normalizationSelected>\n <ng-container *ngIf=\"clonedFilter.normalizedData\">\n <p class=\"selected-value\">\n {{ clonedFilter.normalizedData.toggle ? \"Yes\" : \"No\" }}\n <span *ngIf=\"clonedFilter.normalizedData.toggle\"> ({{ demoToShow }}) </span>\n </p>\n </ng-container>\n <ng-container *ngIf=\"!clonedFilter.normalizedData\">\n <p class=\"selected-value\">-</p>\n </ng-container>\n</ng-template> -->\n\n<ng-template #skeletonLoader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '150px',\n 'margin-bottom': '0',\n 'margin-right': '20px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '170px',\n 'margin-bottom': '0',\n 'margin-right': '20px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '100px',\n 'margin-bottom': '0',\n 'margin-right': '20px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '100px',\n 'margin-bottom': '0',\n 'margin-right': '20px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n</ng-template>\n\n<ng-template #userSkeletonLoader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '140px',\n 'margin-bottom': '0',\n 'margin-right': '0px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n</ng-template>\n\n<ng-template #normalizationSkeletonLoader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '140px',\n 'margin-bottom': '0',\n 'margin-right': '0px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n</ng-template>\n\n<ng-template #editButtonLoader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '52px',\n 'margin-bottom': '0',\n 'margin-right': '0px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n</ng-template>\n\n<ng-template\n #dRFilterModal\n let-modal\n>\n <div class=\"modal-header confirm-modal-header\">\n <h3 class=\"modal-title\">{{ headerText }}</h3>\n <!-- <i class=\"mi mdi-close-icon mdi-font-md close pull-right\" style=\"cursor: pointer\" (click)=\"onCancelClicked()\"></i> -->\n </div>\n <div class=\"modal-body\">\n <div class=\"filter-dropdown\">\n <div\n [ngClass]=\"{ 'user-station-container': showUserFilter }\"\n class=\"pb-0\"\n >\n <div class=\"popup-filter\">\n <header class=\"popup-dropdown-label\">\n {{ stationOrOgDropdownTitleText === \"OG\" ? \"Ownership Group\" : stationOrOgDropdownTitleText }}\n </header>\n <anna-design-single-select\n [config]=\"singleSelectConfig\"\n [items]=\"stationsOrOGs\"\n [selectedItem]=\"selectedStationOrOG\"\n (valueChanged)=\"stationOrOGSelected($event)\"\n >\n </anna-design-single-select>\n </div>\n\n <div\n class=\"popup-filter\"\n *ngIf=\"showUserFilter\"\n >\n <header class=\"popup-dropdown-label\">Users</header>\n <anna-design-skt-loader\n *ngIf=\"showLoaderInUsersDropdown\"\n [theme]=\"{\n height: '1.5rem',\n width: '100%',\n 'margin-bottom': 0\n }\"\n ></anna-design-skt-loader>\n <anna-design-multi-select\n *ngIf=\"!showLoaderInUsersDropdown\"\n [borderbottomObject]=\"multiSelectBottomBorderObj\"\n [config]=\"usersDropdownSetting\"\n [loading]=\"showLoaderInUsersDropdown\"\n [items]=\"usersList\"\n (valueChanged)=\"userSelectionChanged($event)\"\n >\n </anna-design-multi-select>\n </div>\n </div>\n\n <!-- <div class=\"border-top\">\n <anna-design-demo-normalization\n class=\"reduced-demo-font\"\n [dropdownData]=\"normalizationDemographics\"\n [selectedFilters]=\"selectedNormalization\"\n (normalizationChange)=\"updateNormalizationValue($event)\"\n ></anna-design-demo-normalization>\n </div> -->\n\n <div class=\"border-top\">\n <anna-design-equivalisation-of-data-toggle-btn\n [toShow]=\"true\"\n [isDisabled]=\"disableEquivalization\"\n [isEquivalisedData]=\"selectedEquivilizationToggle\"\n [updateQueryParamOnApplyBtn]=\"true\"\n [defaultEquivalisedValue]=\"true\"\n [equivalisationTooltipClass]=\"'dashboard-equivalization-tooltip'\"\n [isNewCustomEquivalisationMessage]=\"true\"\n (toggleChanged)=\"updateEquivalizationToggle($event)\"\n ></anna-design-equivalisation-of-data-toggle-btn>\n </div>\n </div>\n <div class=\"btn-group\">\n <button\n class=\"anna cancel-button\"\n (click)=\"onCancelClicked()\"\n >\n Cancel\n </button>\n\n <button\n class=\"anna apply-button\"\n [disabled]=\"!isFilterValueChanged || (showUserFilter && selectedUsersList.length === 0)\"\n (click)=\"onApplyDRFilterAndUpdateNavigation()\"\n >\n Apply\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [".selected-filters-container{border-radius:2px;border:1px solid #268bff;padding:.625rem .5rem .625rem 1.5rem;display:flex;flex-wrap:nowrap;justify-content:space-between;height:50px}.filter-view{display:flex;gap:1.5625rem}.edit-button{margin-top:3px}.header{margin-bottom:0;color:#333;font-family:Roboto;font-size:var(--primary-filter-label-fs);font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}.popup-dropdown-label{margin-bottom:0;color:#333;font-family:Roboto;font-size:var(--dropdown-label-fs);font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}.selected-value{margin-bottom:0;color:#767676;font-family:Roboto;font-size:var(--primary-filter-value-fs);font-weight:700;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}::ng-deep .dashboard-filter-modal .modal-dialog{top:80px!important}::ng-deep .dashboard-filter-modal .modal-content{min-width:28.125rem;width:28.125rem;max-width:28.125rem}::ng-deep .dashboard-filter-modal .modal-header{padding:.5rem .5rem .25rem 1.5rem}::ng-deep .dashboard-filter-modal .modal-header .modal-title{color:#fff;margin-top:auto;margin-bottom:0;font-family:Roboto;font-size:var(--modal-header-title-fs);font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}::ng-deep .dashboard-filter-modal .modal-header i{color:#fff;font-size:1.5rem}::ng-deep .dashboard-filter-modal .modal-header i:hover,::ng-deep .dashboard-filter-modal .modal-header i:focus{opacity:1!important;color:#fff}::ng-deep .dashboard-filter-modal .modal-body{padding:1.5rem}::ng-deep .dashboard-filter-modal .modal-body .popup-filter{margin-bottom:1rem}::ng-deep .dashboard-filter-modal .modal-body .btn-group{display:flex;justify-content:space-between;padding-top:.5rem}.border-top{border-top:solid 1px #d3d3d3!important;padding-block:.9375rem}.user-station-container{display:flex;gap:8px}.user-station-container>div{width:calc(50% - 4px)}.pb-0{padding-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkeletonLoaderComponent, selector: "anna-design-skt-loader", inputs: ["theme", "count"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SingleSelectComponent, selector: "anna-design-single-select", inputs: ["config", "loading", "showAdditionalDataInSelectedText", "disabled", "items", "selectedItem", "keyToUseForDisplay", "keyToUseForCheckingSelectedItem", "hideDropdownArrow", "borderbottomObject", "defaultDropdownHeight", "itemsToHideInDropdownIds", "showClearSelection"], outputs: ["valueChanged", "dropdownClosedEvent", "dropdownOpenedEvent", "clearSelectionClickedEvent"] }, { kind: "component", type: MultiSelectComponent, selector: "anna-design-multi-select", inputs: ["items", "loading", "hideOptionsEnabled", "hideDropdownArrow", "showAdditionalDataInSelectedText", "config", "disabled", "borderbottomObject", "disableOptionsEnabled", "defaultDropdownHeight", "isEquivalentHigherDpComponent"], outputs: ["valueChanged", "selectionChangedEmitAllItems", "dropdownClosedEvent", "dropdownOpenedEvent"] }, { kind: "component", type: EquivalisationOfDataToggleBtnComponent, selector: "anna-design-equivalisation-of-data-toggle-btn", inputs: ["toShow", "considerParentEquivalizedData", "defaultEquivalisedValue", "equivalisationTooltipClass", "equivalisationMessage", "isNewCustomEquivalisationMessage", "isDisabled", "isParentOrderContainer", "isEquivalisedData", "updateQueryParamOnApplyBtn"], outputs: ["toggleChanged"] }, { kind: "ngmodule", type: AnnaCoreModule }, { kind: "pipe", type: i4.AnnaConvertZeroOrNullOrUndefinedPipe, name: "AnnaConvertZeroOrNullOrUndefined" }] }); }
453
+ }
454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DailyRevisionFilterModalComponent, decorators: [{
455
+ type: Component,
456
+ args: [{ selector: "anna-feature-daily-revision-filter-modal", imports: [
457
+ NgIf,
458
+ NgTemplateOutlet,
459
+ SkeletonLoaderComponent,
460
+ NgClass,
461
+ SingleSelectComponent,
462
+ MultiSelectComponent,
463
+ DemoNormalizationComponent,
464
+ EquivalisationOfDataToggleBtnComponent,
465
+ AnnaCoreModule,
466
+ ], template: "<article class=\"selected-filters-container\">\n <section\n *ngIf=\"filterData\"\n class=\"filter-view\"\n >\n <div>\n <header class=\"header\">{{ stationOrOgDropdownTitleText }}</header>\n <p class=\"selected-value\">\n {{ previousSelectedStationOrOG?.text | AnnaConvertZeroOrNullOrUndefined: \"-\" }}\n </p>\n </div>\n\n <div *ngIf=\"showUserFilter\">\n <ng-container *ngIf=\"!userNormalizationLoader\">\n <header class=\"header\">Users</header>\n <p class=\"selected-value\">{{ usersText }}</p>\n </ng-container>\n <ng-container\n *ngIf=\"userNormalizationLoader\"\n [ngTemplateOutlet]=\"userSkeletonLoader\"\n ></ng-container>\n </div>\n\n <!-- <div>\n <ng-container *ngIf=\"!userNormalizationLoader\">\n <header class=\"header\">Demo Normalization</header>\n <ng-container [ngTemplateOutlet]=\"normalizationSelected\"></ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"userNormalizationLoader\"\n [ngTemplateOutlet]=\"normalizationSkeletonLoader\"\n ></ng-container>\n </div> -->\n\n <div>\n <ng-container *ngIf=\"!userNormalizationLoader\">\n <header class=\"header\">Equivalized Data</header>\n <p class=\"selected-value\">{{ clonedFilter.isEquivalised ? \"Yes\" : \"No\" }}</p>\n </ng-container>\n <ng-container\n *ngIf=\"userNormalizationLoader\"\n [ngTemplateOutlet]=\"normalizationSkeletonLoader\"\n ></ng-container>\n </div>\n </section>\n\n <section\n *ngIf=\"!filterData\"\n class=\"filter-view\"\n >\n <ng-container [ngTemplateOutlet]=\"skeletonLoader\"></ng-container>\n </section>\n\n <button\n class=\"anna edit-button\"\n *ngIf=\"!toDisable\"\n (click)=\"openFilterModal()\"\n >\n Edit\n </button>\n\n <ng-container\n *ngIf=\"toDisable\"\n [ngTemplateOutlet]=\"editButtonLoader\"\n ></ng-container>\n</article>\n\n<!-- <ng-template #normalizationSelected>\n <ng-container *ngIf=\"clonedFilter.normalizedData\">\n <p class=\"selected-value\">\n {{ clonedFilter.normalizedData.toggle ? \"Yes\" : \"No\" }}\n <span *ngIf=\"clonedFilter.normalizedData.toggle\"> ({{ demoToShow }}) </span>\n </p>\n </ng-container>\n <ng-container *ngIf=\"!clonedFilter.normalizedData\">\n <p class=\"selected-value\">-</p>\n </ng-container>\n</ng-template> -->\n\n<ng-template #skeletonLoader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '150px',\n 'margin-bottom': '0',\n 'margin-right': '20px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '170px',\n 'margin-bottom': '0',\n 'margin-right': '20px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '100px',\n 'margin-bottom': '0',\n 'margin-right': '20px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '100px',\n 'margin-bottom': '0',\n 'margin-right': '20px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n</ng-template>\n\n<ng-template #userSkeletonLoader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '140px',\n 'margin-bottom': '0',\n 'margin-right': '0px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n</ng-template>\n\n<ng-template #normalizationSkeletonLoader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '140px',\n 'margin-bottom': '0',\n 'margin-right': '0px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n</ng-template>\n\n<ng-template #editButtonLoader>\n <anna-design-skt-loader\n [theme]=\"{\n height: '100%',\n width: '52px',\n 'margin-bottom': '0',\n 'margin-right': '0px',\n display: 'inline-block'\n }\"\n >\n </anna-design-skt-loader>\n</ng-template>\n\n<ng-template\n #dRFilterModal\n let-modal\n>\n <div class=\"modal-header confirm-modal-header\">\n <h3 class=\"modal-title\">{{ headerText }}</h3>\n <!-- <i class=\"mi mdi-close-icon mdi-font-md close pull-right\" style=\"cursor: pointer\" (click)=\"onCancelClicked()\"></i> -->\n </div>\n <div class=\"modal-body\">\n <div class=\"filter-dropdown\">\n <div\n [ngClass]=\"{ 'user-station-container': showUserFilter }\"\n class=\"pb-0\"\n >\n <div class=\"popup-filter\">\n <header class=\"popup-dropdown-label\">\n {{ stationOrOgDropdownTitleText === \"OG\" ? \"Ownership Group\" : stationOrOgDropdownTitleText }}\n </header>\n <anna-design-single-select\n [config]=\"singleSelectConfig\"\n [items]=\"stationsOrOGs\"\n [selectedItem]=\"selectedStationOrOG\"\n (valueChanged)=\"stationOrOGSelected($event)\"\n >\n </anna-design-single-select>\n </div>\n\n <div\n class=\"popup-filter\"\n *ngIf=\"showUserFilter\"\n >\n <header class=\"popup-dropdown-label\">Users</header>\n <anna-design-skt-loader\n *ngIf=\"showLoaderInUsersDropdown\"\n [theme]=\"{\n height: '1.5rem',\n width: '100%',\n 'margin-bottom': 0\n }\"\n ></anna-design-skt-loader>\n <anna-design-multi-select\n *ngIf=\"!showLoaderInUsersDropdown\"\n [borderbottomObject]=\"multiSelectBottomBorderObj\"\n [config]=\"usersDropdownSetting\"\n [loading]=\"showLoaderInUsersDropdown\"\n [items]=\"usersList\"\n (valueChanged)=\"userSelectionChanged($event)\"\n >\n </anna-design-multi-select>\n </div>\n </div>\n\n <!-- <div class=\"border-top\">\n <anna-design-demo-normalization\n class=\"reduced-demo-font\"\n [dropdownData]=\"normalizationDemographics\"\n [selectedFilters]=\"selectedNormalization\"\n (normalizationChange)=\"updateNormalizationValue($event)\"\n ></anna-design-demo-normalization>\n </div> -->\n\n <div class=\"border-top\">\n <anna-design-equivalisation-of-data-toggle-btn\n [toShow]=\"true\"\n [isDisabled]=\"disableEquivalization\"\n [isEquivalisedData]=\"selectedEquivilizationToggle\"\n [updateQueryParamOnApplyBtn]=\"true\"\n [defaultEquivalisedValue]=\"true\"\n [equivalisationTooltipClass]=\"'dashboard-equivalization-tooltip'\"\n [isNewCustomEquivalisationMessage]=\"true\"\n (toggleChanged)=\"updateEquivalizationToggle($event)\"\n ></anna-design-equivalisation-of-data-toggle-btn>\n </div>\n </div>\n <div class=\"btn-group\">\n <button\n class=\"anna cancel-button\"\n (click)=\"onCancelClicked()\"\n >\n Cancel\n </button>\n\n <button\n class=\"anna apply-button\"\n [disabled]=\"!isFilterValueChanged || (showUserFilter && selectedUsersList.length === 0)\"\n (click)=\"onApplyDRFilterAndUpdateNavigation()\"\n >\n Apply\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [".selected-filters-container{border-radius:2px;border:1px solid #268bff;padding:.625rem .5rem .625rem 1.5rem;display:flex;flex-wrap:nowrap;justify-content:space-between;height:50px}.filter-view{display:flex;gap:1.5625rem}.edit-button{margin-top:3px}.header{margin-bottom:0;color:#333;font-family:Roboto;font-size:var(--primary-filter-label-fs);font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}.popup-dropdown-label{margin-bottom:0;color:#333;font-family:Roboto;font-size:var(--dropdown-label-fs);font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}.selected-value{margin-bottom:0;color:#767676;font-family:Roboto;font-size:var(--primary-filter-value-fs);font-weight:700;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}::ng-deep .dashboard-filter-modal .modal-dialog{top:80px!important}::ng-deep .dashboard-filter-modal .modal-content{min-width:28.125rem;width:28.125rem;max-width:28.125rem}::ng-deep .dashboard-filter-modal .modal-header{padding:.5rem .5rem .25rem 1.5rem}::ng-deep .dashboard-filter-modal .modal-header .modal-title{color:#fff;margin-top:auto;margin-bottom:0;font-family:Roboto;font-size:var(--modal-header-title-fs);font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}::ng-deep .dashboard-filter-modal .modal-header i{color:#fff;font-size:1.5rem}::ng-deep .dashboard-filter-modal .modal-header i:hover,::ng-deep .dashboard-filter-modal .modal-header i:focus{opacity:1!important;color:#fff}::ng-deep .dashboard-filter-modal .modal-body{padding:1.5rem}::ng-deep .dashboard-filter-modal .modal-body .popup-filter{margin-bottom:1rem}::ng-deep .dashboard-filter-modal .modal-body .btn-group{display:flex;justify-content:space-between;padding-top:.5rem}.border-top{border-top:solid 1px #d3d3d3!important;padding-block:.9375rem}.user-station-container{display:flex;gap:8px}.user-station-container>div{width:calc(50% - 4px)}.pb-0{padding-bottom:0!important}\n"] }]
467
+ }], ctorParameters: () => [{ type: i6.MultiSelectDropdownService }, { type: i2.NgbModal }, { type: i4.AnnaGlobalConfigService }, { type: i4$1.Router }, { type: i4$1.ActivatedRoute }, { type: i4.AnnaPersistingFilterService }, { type: undefined, decorators: [{
468
+ type: Inject,
469
+ args: [DAILY_REVISION_FILTERS_SERVICE_TOKEN]
470
+ }] }, { type: undefined, decorators: [{
471
+ type: Inject,
472
+ args: [DASHBOARD_FILTER_MODAL_SERVICE_TOKEN]
473
+ }] }, { type: i4.UpdateStationIdService }], propDecorators: { filterData: [{
474
+ type: Input
475
+ }], stationOrOgDropdownTitleText: [{
476
+ type: Input
477
+ }], error: [{
478
+ type: Input
479
+ }], showUserFilter: [{
480
+ type: Input
481
+ }], showDemoNormalization: [{
482
+ type: Input
483
+ }], persistingFilter: [{
484
+ type: Input
485
+ }], headerText: [{
486
+ type: Input
487
+ }], handleNavigation: [{
488
+ type: Input
489
+ }], toDisable: [{
490
+ type: Input
491
+ }], stationIdsWithValidLicense: [{
492
+ type: Input
493
+ }], applyFilter: [{
494
+ type: Output
495
+ }], getInitialFilter: [{
496
+ type: Output
497
+ }], dRFilterModal: [{
498
+ type: ViewChild,
499
+ args: ["dRFilterModal", { static: true }]
500
+ }] } });
501
+
502
+ const DAILY_REVISION_LISTING_SERVICE_TOKEN = new InjectionToken("DRRListingBackendService token");
503
+
504
+ class DRRListingEasyFilterConstants {
505
+ static { this.SellerPending = "SELLER PENDING"; }
506
+ static { this.SellerReconfirm = "SELLER RECONFIRM"; }
507
+ static { this.BuyerPending = "BUYER PENDING"; }
508
+ static { this.SMPending = "SM PENDING"; }
509
+ static { this.RevisionGenerated = "REV GENERATED"; }
510
+ static { this.RevisionDiscarded = "REV DISCARDED"; }
511
+ static { this.OSSpots = "O/S SPOTS"; }
512
+ static { this.OSUD = "O/S UD"; }
513
+ static { this.PoD = "PoD"; }
514
+ static { this.WriteEnabled = "AUTOMATED"; }
515
+ static { this.Starred = "STARRED"; }
516
+ static { this.AnnaOrderEntry = "ANNA ORDER ENTRY"; }
517
+ static { this.UserRevision = "SELLER USER REVISION"; }
518
+ static { this.BuyerRevision = "BUYER REVISION"; }
519
+ static { this.SellerPendingBackgroundColor = "#F7F2D1"; }
520
+ static { this.SellerReconfirmBackgroundColor = "#D9D1F7"; }
521
+ static { this.BuyerPendingBackgroundColor = "#D5E3F4"; }
522
+ static { this.SMPendingBackgroundColor = "#FEE7D2"; }
523
+ static { this.RevisionDiscardedBackgroundColor = "#FDD8D5 "; }
524
+ static { this.RevisionGeneratedBackgroundColor = "#DBF0E4"; }
525
+ static { this.OSSpotsBackgroundColor = "#EFEFEF"; }
526
+ static { this.WriteEnabledBackgroundColor = "white"; }
527
+ static { this.SellerPendingBorder = "solid 1px #dec30b"; }
528
+ static { this.BuyerPendingBorder = "solid 1px #1565c0"; }
529
+ static { this.ReviewBuyerRequestBorder = "solid 1px #ff7726"; }
530
+ static { this.SMPendingBorder = "solid 1px #F97B07"; }
531
+ static { this.RevisionDiscardedBorder = "solid 1px #F44336"; }
532
+ static { this.RevisionGeneratedBorder = "solid 1px #37AD68"; }
533
+ static { this.OSSpotsBorder = "solid 1px #a2a8ad"; }
534
+ static { this.WriteEnabledBorder = "solid 1px #268bff"; }
535
+ static { this.SellerReconfirmBorder = "solid 1px #4D1EFF"; }
536
+ }
537
+ class DRRListingTableColumnNameConstants {
538
+ static { this.Station = "STATION"; }
539
+ static { this.BUYERS = "BUYERS"; }
540
+ static { this.REPS = "REPS"; }
541
+ static { this.TimeoutDateAndTime = "TIMEOUT DATE & TIME"; }
542
+ static { this.PrimaryAE = "PRIMARY AE"; }
543
+ static { this.Region = "REGION"; }
544
+ static { this.Agency = "AGENCY"; }
545
+ static { this.Location = "LOCATION"; }
546
+ static { this.Advertiser = "ADVERTISER"; }
547
+ static { this.ProductCode = "PRODUCT CODE"; }
548
+ static { this.RevisionStartDate = " REVISION START DATE"; }
549
+ static { this.StartDate = "START DATE"; }
550
+ static { this.EndDate = "END DATE"; }
551
+ static { this.OrderNumber = "STN ORDER#-REV#"; }
552
+ static { this.BuyerOrderId = "BUYER ORDER#"; }
553
+ static { this.AltOrderId = "ALT/REP ORDER#"; }
554
+ static { this.GRP = "GRP"; }
555
+ static { this.CPP = "CPP"; }
556
+ static { this.IMPS = "IMPS"; }
557
+ static { this.CPM = "CPM"; }
558
+ static { this.OfferefMadegood = "OFFERED MG"; }
559
+ static { this.OSSPOTSValue = "O/S SPOTS"; }
560
+ static { this.OSPE = "O/S PE"; }
561
+ static { this.OfferefADUs = "OFFERED ADUs"; }
562
+ static { this.UDProjection = "O/S UD PROJ."; }
563
+ static { this.BookedValue = "$ BOOKED"; }
564
+ static { this.BookedSpots = "SPOTS"; }
565
+ // static readonly UserChanges = "USER CHANGES";
566
+ static { this.RevisionType = "REVISION TYPE"; }
567
+ // static readonly BuyerChanges = "BUYER CHANGES";
568
+ static { this.UserADUs = "USER ADUs"; }
569
+ static { this.UserMGs = "USER MG"; }
570
+ static { this.Demo = "DEMO"; }
571
+ static { this.OfferCount = "OFFER COUNT"; }
572
+ static { this.Status = "STATUS"; }
573
+ }
574
+ class DRRListingIntelliFilterKeys {
575
+ static { this.RevisionType = "revisionTypeForEasyFilters"; }
576
+ static { this.OrderRevisionStatus = "orderRevisionStatusForEasyFilter"; }
577
+ static { this.IsPayForPerformanceOrder = "isPayForPerformanceOrder"; }
578
+ static { this.IsWriteEnabledOrder = "isWriteEnabledOrder"; }
579
+ static { this.IsStarred = "isStarred"; }
580
+ static { this.AnnaEnteredRepOrder = "annaEnteredRepOrder"; }
581
+ }
582
+ class DRRListingRevisionTypes {
583
+ static { this.SellerUser = "SELLER USER"; }
584
+ static { this.Buyer = "BUYER"; }
585
+ }
586
+
587
+ class OrdersConstant {
588
+ // buyer-contact-details
589
+ static { this.buyerApprovalAndContact = "Buyer Approval & Contact"; }
590
+ static { this.buyerBizApprovalNeeded = "Buyer business rules approval needed"; }
591
+ static { this.noContactsAdded = "No Contact added"; }
592
+ static { this.buyerApprovalRequired = "Buyer approval required"; }
593
+ static { this.emailOnlyOrderSchedule = "Email only order schedule"; }
594
+ static { this.buyer = "Buyer"; }
595
+ static { this.buyerContact = `${OrdersConstant.buyer} contact`; }
596
+ static { this.addBuyer = `Add ${OrdersConstant.buyer.toLowerCase()}`; }
597
+ static { this.addBuyerContact = `Add ${OrdersConstant.buyer} Contact`; }
598
+ static { this.editBuyer = "Edit "; }
599
+ static { this.yes = "Yes"; }
600
+ static { this.no = "No"; }
601
+ // add-buyer-contact constants
602
+ static { this.primary = "Primary"; }
603
+ static { this.secondary = "Secondary"; }
604
+ static { this.primaryBuyerDetails = `${OrdersConstant.primary} ${OrdersConstant.buyer.toLowerCase()} details`; }
605
+ static { this.namePlaceholder = "Enter buyer’s name"; }
606
+ static { this.emailPlaceholder = "Enter buyer’s email ID"; }
607
+ static { this.phoneNoPlaceholder = "Enter buyer’s phone number"; }
608
+ static { this.invalidName = "*Invalid Name"; }
609
+ static { this.Name = "Name*"; }
610
+ static { this.pleaseEnterFullName = "*Please enter full name"; }
611
+ static { this.specialCharNotAllowed = "Special Charater not allowed"; }
612
+ static { this.invalidEmail = "*Invalid Email"; }
613
+ static { this.email = "Email*"; }
614
+ static { this.pleaseEnterEmailId = "Please enter email ID"; }
615
+ static { this.pleaseEnterValidEmailId = "Please enter a valid email ID"; }
616
+ static { this.invalidPhone = "Invalid Phone"; }
617
+ static { this.phone = "Phone"; }
618
+ static { this.pleaseEnterValidPhoneNo = "Please enter a valid Phone No"; }
619
+ static { this.secondaryBuyerContactDetails = `${OrdersConstant.secondary} ${OrdersConstant.buyer.toLowerCase()} Details`; }
620
+ static { this.addSecondaryBuyerContactDetails = `Add ${OrdersConstant.secondaryBuyerContactDetails.toLowerCase()}`; }
621
+ static { this.removeSecondaryBuyerContactDetails = `Remove ${OrdersConstant.secondaryBuyerContactDetails.toLowerCase()}`; }
622
+ static { this.save = "Save "; }
623
+ static { this.newBuyerSuccess = "New Buyer Contact details added successfully."; }
624
+ static { this.updateBuyerSuccess = "Buyer Contact details updated successfully."; }
625
+ static { this.BuyerErrorMessage = "Some Error occured. Couldn't add Buyer details"; }
626
+ static { this.secondaryBuyerDeleteErrorMessage = "Some Error occured while deleting secondary Buyer details"; }
627
+ static { this.businessRulesTabName = "Business Rules"; }
628
+ static { this.UndefinedEndDate = "indefinitely"; }
629
+ static { this.ProxyOrderToasteTextPartOne = "This order belongs to "; }
630
+ static { this.ProxyOrderToasteTextPartTwo = ". You can manage this order since you are the proxy user from"; }
631
+ static { this.writeEnabledOrderToastrMessage = "This is a Automated order. Action taken on spots for this order will be fed into the traffic system."; }
632
+ static { this.notWriteEnabledOrderToastrMessage = "This is a Read-Only order. No approval action can be taken for these orders."; }
633
+ static { this.PerformancePeriodModalTitle = "Edit Period"; }
634
+ static { this.PerformancePeriodModalMessage = "Select period for which you want to view the audience performance for."; }
635
+ static { this.SpotDetailsPeriodModalTitle = "Edit Period"; }
636
+ static { this.SpotDetailsPeriodModalMessage = "Select period for which you want to view the spot details for."; }
637
+ static { this.Quarter = "Quarter"; }
638
+ static { this.Month = "Month"; }
639
+ static { this.CustomRange = "Custom Range"; }
640
+ static { this.Broadcast = "broadcast"; }
641
+ static { this.Fiscal = "fiscal"; }
642
+ static { this.InFlightAndUpcoming = "In-flight & Upcoming"; }
643
+ static { this.Completed = "Completed"; }
644
+ static { this.Blank = "Blank"; }
645
+ static { this.TodaysANNAOffers = "Today’s ANNA Offers"; }
646
+ static { this.OffersAwaitingApproval = "Offers Awaiting Approval"; }
647
+ static { this.TodaysUsersOffers = "Today’s User Offers"; }
648
+ static { this.RATING = "RATINGS"; }
649
+ static { this.IMPRESSIONS = "IMPRESSIONS"; }
650
+ static { this.GRP = "GRP"; }
651
+ static { this.TvRevenueAndDigital = "TV & Digital"; }
652
+ static { this.DRR = "Daily Revisions"; }
653
+ static { this.TvRevenue = "TV Revenue"; }
654
+ static { this.OtherRevenue = "Other Revenue"; }
655
+ static { this.OngoingTemporaryRevisionMessage = "This is an ongoing temporary revision. Any new revision will henceforth be for the live order."; }
656
+ static { this.DefaultDemo = "A25-54"; }
657
+ }
658
+
659
+ class TotalRowForDRROngoingRevisions {
660
+ constructor(data) {
661
+ this.totalOfferedMG = 0;
662
+ this.totalOutstandingPE = 0;
663
+ this.totalAudienceDeficit = 0;
664
+ this.totalPostedAudPercent = 0;
665
+ this.totalRowCount = data.length;
666
+ let totalCreditAdus = 0;
667
+ data.forEach((row) => {
668
+ this.totalOfferedMG = row.offeredMGsValue ? this.totalOfferedMG + row.offeredMGsValue : this.totalOfferedMG;
669
+ this.totalOutstandingPE = row.outstandingSpotsValue
670
+ ? this.totalOutstandingPE + +row.outstandingSpotsValue
671
+ : this.totalOutstandingPE;
672
+ this.totalAudienceDeficit = row.uDProjectionValue
673
+ ? this.totalAudienceDeficit + row.uDProjectionValue
674
+ : this.totalAudienceDeficit;
675
+ this.totalPostedAudPercent = row.offeredADUsValue
676
+ ? this.totalPostedAudPercent + row.offeredADUsValue
677
+ : this.totalPostedAudPercent;
678
+ totalCreditAdus = row.creditAdusValue ? totalCreditAdus + row.creditAdusValue : totalCreditAdus;
679
+ });
680
+ this.totalOfferedMGForDisplay =
681
+ this.totalOfferedMG === 0
682
+ ? "-"
683
+ : (this.totalOfferedMG < 0 ? "-$" : "$") +
684
+ AnnaNumberFormatService.GetRoundedValueWithUnits(Math.abs(this.totalOfferedMG));
685
+ this.totalOutstandingPEForDisplay =
686
+ this.totalOutstandingPE === 0
687
+ ? "-"
688
+ : (this.totalOutstandingPE < 0 ? "-$" : "$") +
689
+ AnnaNumberFormatService.GetRoundedValueWithUnits(Math.abs(this.totalOutstandingPE));
690
+ this.totalAudienceDeficitForDisplay =
691
+ this.totalAudienceDeficit === 0
692
+ ? "-"
693
+ : (this.totalAudienceDeficit < 0 ? "-$" : "$") +
694
+ AnnaNumberFormatService.GetRoundedValueWithUnits(Math.abs(this.totalAudienceDeficit));
695
+ this.totalPostedAudPercentDisplay =
696
+ this.totalPostedAudPercent === 0
697
+ ? "-"
698
+ : (this.totalPostedAudPercent < 0 ? "-$" : "$") +
699
+ AnnaNumberFormatService.GetRoundedValueWithUnits(Math.abs(this.totalPostedAudPercent));
700
+ this.totalCreditAdusForDisplay =
701
+ totalCreditAdus === 0
702
+ ? "-"
703
+ : (this.totalPostedAudPercent < 0 ? "-$" : "$") +
704
+ AnnaNumberFormatService.GetRoundedValueWithUnits(Math.abs(totalCreditAdus));
705
+ }
706
+ }
707
+ class TotalRowForDRRCompletedRevisions {
708
+ constructor(data) {
709
+ this.totalUserMG = 0;
710
+ this.totalOutstandingPE = 0;
711
+ this.totalAudienceDeficit = 0;
712
+ this.totalPostedAudPercent = 0;
713
+ this.totalUserChanges = 0;
714
+ this.totalBuyerChanges = 0;
715
+ let totalBuyerGrpChanges = 0;
716
+ let totalBuyerImpsChanges = 0;
717
+ let totalBuyerAddedChanges = 0;
718
+ let totalBuyerDeletedChanges = 0;
719
+ this.totalRowCount = data.length;
720
+ data.forEach((row) => {
721
+ this.totalUserMG = row.userMGValue ? this.totalUserMG + row.userMGValue : this.totalUserMG;
722
+ this.totalOutstandingPE = row.outstandingPreemptionsValue
723
+ ? this.totalOutstandingPE + row.outstandingPreemptionsValue
724
+ : this.totalOutstandingPE;
725
+ this.totalAudienceDeficit = row.audienceDeficitValue
726
+ ? this.totalAudienceDeficit + row.audienceDeficitValue
727
+ : this.totalAudienceDeficit;
728
+ this.totalPostedAudPercent = row.userADUValue
729
+ ? this.totalPostedAudPercent + +row.userADUValue
730
+ : this.totalPostedAudPercent;
731
+ this.totalUserChanges = row.userChangesValue
732
+ ? this.totalUserChanges + row.userChangesValue
733
+ : this.totalUserChanges;
734
+ this.totalBuyerChanges = row.buyerChangesValue
735
+ ? this.totalBuyerChanges + row.buyerChangesValue
736
+ : this.totalBuyerChanges;
737
+ totalBuyerGrpChanges = row.buyerGrpChangesValue
738
+ ? totalBuyerGrpChanges + row.buyerGrpChangesValue
739
+ : totalBuyerGrpChanges;
740
+ totalBuyerImpsChanges = row.buyerImpChangesValue
741
+ ? totalBuyerImpsChanges + row.buyerImpChangesValue
742
+ : totalBuyerImpsChanges;
743
+ totalBuyerAddedChanges = row.buyerAddedValue
744
+ ? totalBuyerAddedChanges + row.buyerAddedValue
745
+ : totalBuyerAddedChanges;
746
+ totalBuyerDeletedChanges = row.buyerDeletedValue
747
+ ? totalBuyerDeletedChanges + row.buyerDeletedValue
748
+ : totalBuyerDeletedChanges;
749
+ });
750
+ this.totalUserMGForDisplay = AnnaNumberFormatService.GetRoundedValueWithUnitsAndDollarSymbol(Math.abs(this.totalUserMG));
751
+ this.totalOutstandingPEForDisplay = AnnaNumberFormatService.GetRoundedValueWithUnitsAndDollarSymbol(Math.abs(this.totalOutstandingPE));
752
+ this.totalAudienceDeficitForDisplay = AnnaNumberFormatService.GetRoundedValueWithUnitsAndDollarSymbol(Math.abs(this.totalAudienceDeficit));
753
+ this.totalPostedAudPercentDisplay = AnnaNumberFormatService.GetRoundedValueWithUnitsAndDollarSymbol(Math.abs(this.totalPostedAudPercent));
754
+ this.totalUserChangesForDisplay = AnnaNumberFormatService.GetRoundedValueWithUnitsAndDollarSymbol(Math.abs(this.totalUserChanges));
755
+ this.totalBuyerChangesForDisplay = AnnaNumberFormatService.GetRoundedValueWithUnitsAndDollarSymbol(this.totalBuyerChanges);
756
+ this.totalBuyerAddedChangesForDisplay =
757
+ AnnaNumberFormatService.GetRoundedValueWithUnitsAndDollarSymbol(totalBuyerAddedChanges);
758
+ this.totalBuyerDeletedChangesForDisplay =
759
+ AnnaNumberFormatService.GetRoundedValueWithUnitsAndDollarSymbol(totalBuyerDeletedChanges);
760
+ this.totalBuyerGrpChangesForDisplay = GTTableRelatedCommonFunctionsService.GetGrpOrImpsRoundedValue(totalBuyerGrpChanges, 2);
761
+ this.totalBuyerImpsChangesForDisplay = GTTableRelatedCommonFunctionsService.GetGrpOrImpsRoundedValue(totalBuyerImpsChanges, 1);
762
+ }
763
+ }
764
+
765
+ class DailyRevisionService {
766
+ constructor() {
767
+ this.orderIdSubject = new Subject();
768
+ this.easyFiltersTypes = [
769
+ "orderRevisionStatusForEasyFilter",
770
+ "isWriteEnabledOrder",
771
+ "revisionTypeForEasyFilters",
772
+ "starredOrder",
773
+ "isPayForPerformanceOrder",
774
+ ];
775
+ }
776
+ getTodaysANNAOffersEasyFilters() {
777
+ return [
778
+ {
779
+ label: "Revision status",
780
+ filters: [
781
+ {
782
+ text: DRRListingEasyFilterConstants.SellerPending,
783
+ isActive: false,
784
+ isDisabled: false,
785
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "Seller Pending" },
786
+ backgroundColor: DRRListingEasyFilterConstants.SellerPendingBackgroundColor,
787
+ border: DRRListingEasyFilterConstants.SellerPendingBorder,
788
+ iconRequired: false,
789
+ },
790
+ {
791
+ text: DRRListingEasyFilterConstants.SellerReconfirm,
792
+ isActive: false,
793
+ isDisabled: false,
794
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "Seller Reconfirm" },
795
+ backgroundColor: DRRListingEasyFilterConstants.SellerReconfirmBackgroundColor,
796
+ border: DRRListingEasyFilterConstants.SellerReconfirmBorder,
797
+ iconRequired: false,
798
+ },
799
+ {
800
+ text: DRRListingEasyFilterConstants.BuyerPending,
801
+ isActive: false,
802
+ isDisabled: false,
803
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "Buyer Pending" },
804
+ backgroundColor: DRRListingEasyFilterConstants.BuyerPendingBackgroundColor,
805
+ border: DRRListingEasyFilterConstants.BuyerPendingBorder,
806
+ iconRequired: false,
807
+ },
808
+ {
809
+ text: DRRListingEasyFilterConstants.SMPending,
810
+ isActive: false,
811
+ isDisabled: false,
812
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "SM Pending" },
813
+ backgroundColor: DRRListingEasyFilterConstants.SMPendingBackgroundColor,
814
+ border: DRRListingEasyFilterConstants.SMPendingBorder,
815
+ iconRequired: false,
816
+ },
817
+ {
818
+ text: DRRListingEasyFilterConstants.RevisionGenerated,
819
+ isActive: false,
820
+ isDisabled: false,
821
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "Rev Generated" },
822
+ backgroundColor: DRRListingEasyFilterConstants.RevisionGeneratedBackgroundColor,
823
+ border: DRRListingEasyFilterConstants.RevisionGeneratedBorder,
824
+ iconRequired: false,
825
+ },
826
+ {
827
+ text: DRRListingEasyFilterConstants.RevisionDiscarded,
828
+ isActive: false,
829
+ isDisabled: false,
830
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "Rev Discarded" },
831
+ backgroundColor: DRRListingEasyFilterConstants.RevisionDiscardedBackgroundColor,
832
+ border: DRRListingEasyFilterConstants.RevisionDiscardedBorder,
833
+ iconRequired: false,
834
+ },
835
+ ],
836
+ groupId: "revisionStatusGroup",
837
+ },
838
+ {
839
+ label: "",
840
+ class: "",
841
+ filters: [
842
+ {
843
+ text: DRRListingEasyFilterConstants.OSSpots,
844
+ isActive: false,
845
+ isDisabled: false,
846
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "O/S Spots" },
847
+ backgroundColor: DRRListingEasyFilterConstants.OSSpotsBackgroundColor,
848
+ border: DRRListingEasyFilterConstants.OSSpotsBorder,
849
+ iconRequired: false,
850
+ },
851
+ ],
852
+ groupId: "osSpotsGroup",
853
+ },
854
+ {
855
+ label: "",
856
+ class: "",
857
+ filters: [
858
+ {
859
+ text: DRRListingEasyFilterConstants.OSUD,
860
+ isActive: false,
861
+ isDisabled: false,
862
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "O/S UD" },
863
+ backgroundColor: DRRListingEasyFilterConstants.OSSpotsBackgroundColor,
864
+ border: DRRListingEasyFilterConstants.OSSpotsBorder,
865
+ iconRequired: false,
866
+ },
867
+ ],
868
+ groupId: "osUDGroup",
869
+ },
870
+ {
871
+ label: "",
872
+ class: "",
873
+ filters: [
874
+ {
875
+ text: DRRListingEasyFilterConstants.WriteEnabled,
876
+ isActive: false,
877
+ isDisabled: false,
878
+ filterKeyValue: { key: "isWriteEnabledOrder", valueToCheck: true },
879
+ iconRequired: true,
880
+ iconClass: ANNAIconNames.AutomationActivatedIconName,
881
+ isSvgIcon: false,
882
+ },
883
+ ],
884
+ groupId: "automationActivatedGroup",
885
+ },
886
+ {
887
+ label: "",
888
+ class: "",
889
+ filters: [
890
+ {
891
+ text: DRRListingEasyFilterConstants.PoD,
892
+ isActive: false,
893
+ isDisabled: false,
894
+ filterKeyValue: { key: "isPayForPerformanceOrder", valueToCheck: true },
895
+ iconRequired: true,
896
+ isSvgIcon: true,
897
+ svgIconKey: "POD",
898
+ },
899
+ ],
900
+ groupId: "podGroup",
901
+ },
902
+ {
903
+ label: "",
904
+ class: "",
905
+ filters: [
906
+ {
907
+ text: DRRListingEasyFilterConstants.Starred,
908
+ isActive: false,
909
+ isDisabled: false,
910
+ filterKeyValue: { key: "isStarred", valueToCheck: true },
911
+ iconRequired: true,
912
+ isSvgIcon: false,
913
+ iconClass: "mdi mdi-star",
914
+ },
915
+ ],
916
+ groupId: "starredGroup",
917
+ },
918
+ {
919
+ label: "",
920
+ class: "",
921
+ filters: [
922
+ {
923
+ text: DRRListingEasyFilterConstants.AnnaOrderEntry,
924
+ isActive: false,
925
+ isDisabled: false,
926
+ filterKeyValue: { key: "annaEnteredRepOrder", valueToCheck: true },
927
+ iconRequired: false,
928
+ },
929
+ ],
930
+ groupId: "annaEntryGroup",
931
+ },
932
+ ];
933
+ }
934
+ getOffersAwaitingApprovalEasyFiltersForBuyer() {
935
+ return [
936
+ {
937
+ label: "Revision status",
938
+ filters: [
939
+ {
940
+ text: DRRListingEasyFilterConstants.BuyerPending,
941
+ isActive: false,
942
+ isDisabled: false,
943
+ backgroundColor: DRRListingEasyFilterConstants.BuyerPendingBackgroundColor,
944
+ border: DRRListingEasyFilterConstants.BuyerPendingBorder,
945
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "Buyer Pending" },
946
+ iconRequired: false,
947
+ },
948
+ {
949
+ text: DRRListingEasyFilterConstants.SMPending,
950
+ isActive: false,
951
+ isDisabled: false,
952
+ backgroundColor: DRRListingEasyFilterConstants.SMPendingBackgroundColor,
953
+ border: DRRListingEasyFilterConstants.SMPendingBorder,
954
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "SM Pending" },
955
+ iconRequired: false,
956
+ },
957
+ {
958
+ text: DRRListingEasyFilterConstants.RevisionGenerated,
959
+ isActive: false,
960
+ isDisabled: false,
961
+ backgroundColor: DRRListingEasyFilterConstants.RevisionGeneratedBackgroundColor,
962
+ border: DRRListingEasyFilterConstants.RevisionGeneratedBorder,
963
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "Rev Generated" },
964
+ iconRequired: false,
965
+ },
966
+ {
967
+ text: DRRListingEasyFilterConstants.RevisionDiscarded,
968
+ isActive: false,
969
+ isDisabled: false,
970
+ backgroundColor: DRRListingEasyFilterConstants.RevisionDiscardedBackgroundColor,
971
+ border: DRRListingEasyFilterConstants.RevisionDiscardedBorder,
972
+ filterKeyValue: { key: "orderRevisionStatusForEasyFilter", valueToCheck: "Rev Discarded" },
973
+ iconRequired: false,
974
+ },
975
+ ],
976
+ groupId: "revisionStatusGroup",
977
+ },
978
+ {
979
+ label: "",
980
+ class: "add-padding-top",
981
+ filters: [
982
+ {
983
+ text: DRRListingEasyFilterConstants.PoD,
984
+ isActive: false,
985
+ isDisabled: false,
986
+ iconRequired: true,
987
+ isSvgIcon: true,
988
+ svgIconKey: "POD",
989
+ filterKeyValue: { key: "isPayForPerformanceOrder", valueToCheck: true },
990
+ },
991
+ ],
992
+ groupId: "podGroup",
993
+ },
994
+ ];
995
+ }
996
+ getTodaysUserOffersEasyFilters() {
997
+ return [
998
+ {
999
+ label: "Revision Type",
1000
+ filters: [
1001
+ {
1002
+ text: DRRListingEasyFilterConstants.UserRevision,
1003
+ isActive: false,
1004
+ isDisabled: false,
1005
+ filterKeyValue: { key: "revisionTypeForEasyFilters", valueToCheck: "SELLER USER" },
1006
+ iconRequired: false,
1007
+ },
1008
+ {
1009
+ text: DRRListingEasyFilterConstants.BuyerRevision,
1010
+ isDisabled: false,
1011
+ isActive: false,
1012
+ filterKeyValue: { key: "revisionTypeForEasyFilters", valueToCheck: "BUYER" },
1013
+ iconRequired: false,
1014
+ },
1015
+ ],
1016
+ groupId: "revisionTypeGroup",
1017
+ },
1018
+ {
1019
+ label: "",
1020
+ class: "add-padding-top ",
1021
+ filters: [
1022
+ {
1023
+ text: DRRListingEasyFilterConstants.WriteEnabled,
1024
+ isActive: false,
1025
+ isDisabled: false,
1026
+ iconRequired: true,
1027
+ iconClass: ANNAIconNames.AutomationActivatedIconName,
1028
+ filterKeyValue: { key: "isWriteEnabledOrder", valueToCheck: true },
1029
+ isSvgIcon: false,
1030
+ },
1031
+ ],
1032
+ groupId: "automationActivatedGroup",
1033
+ },
1034
+ {
1035
+ label: "",
1036
+ class: "add-padding-top ",
1037
+ filters: [
1038
+ {
1039
+ text: DRRListingEasyFilterConstants.PoD,
1040
+ isActive: false,
1041
+ isDisabled: false,
1042
+ iconRequired: true,
1043
+ isSvgIcon: true,
1044
+ filterKeyValue: { key: "isPayForPerformanceOrder", valueToCheck: true },
1045
+ svgIconKey: "POD",
1046
+ },
1047
+ ],
1048
+ groupId: "podGroup",
1049
+ },
1050
+ {
1051
+ label: "",
1052
+ class: "add-padding-top ",
1053
+ filters: [
1054
+ {
1055
+ text: DRRListingEasyFilterConstants.Starred,
1056
+ isActive: false,
1057
+ isDisabled: false,
1058
+ iconRequired: true,
1059
+ isSvgIcon: false,
1060
+ filterKeyValue: { key: "isStarred", valueToCheck: true },
1061
+ iconClass: "mdi mdi-star",
1062
+ },
1063
+ ],
1064
+ groupId: "starredGroup",
1065
+ },
1066
+ {
1067
+ label: "",
1068
+ class: "add-padding-top",
1069
+ filters: [
1070
+ {
1071
+ text: DRRListingEasyFilterConstants.AnnaOrderEntry,
1072
+ isActive: false,
1073
+ isDisabled: false,
1074
+ iconRequired: false,
1075
+ filterKeyValue: { key: "annaEnteredRepOrder", valueToCheck: true },
1076
+ },
1077
+ ],
1078
+ groupId: "annaEntryGroup",
1079
+ },
1080
+ ];
1081
+ }
1082
+ getTodaysAnnaOffersTableHeaders() {
1083
+ return [
1084
+ {
1085
+ headerInfo: [
1086
+ {
1087
+ name: "",
1088
+ objectKey: "isStarred",
1089
+ typeOfHeaderData: "",
1090
+ typeOfBodyData: "ICON",
1091
+ showTooltipIcon: false,
1092
+ },
1093
+ ],
1094
+ visible: true,
1095
+ width: "40px",
1096
+ },
1097
+ {
1098
+ headerInfo: [
1099
+ {
1100
+ name: DRRListingTableColumnNameConstants.OrderNumber,
1101
+ objectKey: "orderIdAndRevNumber",
1102
+ typeOfHeaderData: "STRING",
1103
+ typeOfBodyData: "SVG_ICON",
1104
+ actionKey: "poDandAAKey",
1105
+ showTooltipIcon: true,
1106
+ isSortRequired: [true, true],
1107
+ isFilterRequired: [true, true],
1108
+ filter: "CHECKBOX",
1109
+ filterSortObjectKeys: ["orderIdAndRevNumber", "alternateOrderId"],
1110
+ },
1111
+ {
1112
+ name: DRRListingTableColumnNameConstants.AltOrderId,
1113
+ objectKey: "alternateOrderId",
1114
+ typeOfHeaderData: "STRING",
1115
+ typeOfBodyData: "STRING",
1116
+ showTooltipIcon: false,
1117
+ },
1118
+ ],
1119
+ visible: true,
1120
+ width: "137px",
1121
+ },
1122
+ {
1123
+ headerInfo: [
1124
+ {
1125
+ name: DRRListingTableColumnNameConstants.PrimaryAE,
1126
+ objectKey: "primaryAEName",
1127
+ typeOfHeaderData: "STRING",
1128
+ typeOfBodyData: "STRING",
1129
+ showTooltipIcon: true,
1130
+ isSortRequired: [true, true],
1131
+ isFilterRequired: [true, true],
1132
+ filter: "CHECKBOX",
1133
+ filterSortObjectKeys: ["primaryAEName", "region"],
1134
+ },
1135
+ {
1136
+ name: DRRListingTableColumnNameConstants.Region,
1137
+ objectKey: "region",
1138
+ typeOfHeaderData: "STRING",
1139
+ typeOfBodyData: "STRING",
1140
+ showTooltipIcon: false,
1141
+ },
1142
+ ],
1143
+ visible: true,
1144
+ width: "118px",
1145
+ },
1146
+ {
1147
+ headerInfo: [
1148
+ {
1149
+ name: DRRListingTableColumnNameConstants.Agency,
1150
+ objectKey: "agencyName",
1151
+ typeOfHeaderData: "STRING",
1152
+ typeOfBodyData: "STRING",
1153
+ showTooltipIcon: true,
1154
+ isSortRequired: [true, true],
1155
+ isFilterRequired: [true, true],
1156
+ filter: "CHECKBOX",
1157
+ filterSortObjectKeys: ["agencyName", "location"],
1158
+ },
1159
+ {
1160
+ name: DRRListingTableColumnNameConstants.Location,
1161
+ objectKey: "location",
1162
+ typeOfHeaderData: "STRING",
1163
+ typeOfBodyData: "STRING",
1164
+ showTooltipIcon: false,
1165
+ },
1166
+ ],
1167
+ visible: true,
1168
+ width: "129.5808px",
1169
+ },
1170
+ {
1171
+ headerInfo: [
1172
+ {
1173
+ name: DRRListingTableColumnNameConstants.Advertiser,
1174
+ objectKey: "advertiserName",
1175
+ typeOfHeaderData: "STRING",
1176
+ typeOfBodyData: "STRING",
1177
+ showTooltipIcon: true,
1178
+ isSortRequired: [true, true],
1179
+ isFilterRequired: [true, true],
1180
+ filter: "CHECKBOX",
1181
+ filterSortObjectKeys: ["advertiserName", "productCode"],
1182
+ },
1183
+ {
1184
+ name: DRRListingTableColumnNameConstants.ProductCode,
1185
+ objectKey: "productCode",
1186
+ typeOfHeaderData: "STRING",
1187
+ typeOfBodyData: "STRING",
1188
+ showTooltipIcon: false,
1189
+ },
1190
+ ],
1191
+ visible: true,
1192
+ width: "140px",
1193
+ },
1194
+ {
1195
+ headerInfo: [
1196
+ {
1197
+ name: DRRListingTableColumnNameConstants.StartDate,
1198
+ objectKey: "flightStartDate",
1199
+ typeOfHeaderData: "STRING",
1200
+ typeOfBodyData: "STRING",
1201
+ showTooltipIcon: true,
1202
+ isSortRequired: [true, true],
1203
+ isFilterRequired: [true, true],
1204
+ filter: "DATE",
1205
+ filterSortObjectKeys: ["flightStartDate", "flightEndDate"],
1206
+ },
1207
+ {
1208
+ name: DRRListingTableColumnNameConstants.EndDate,
1209
+ objectKey: "flightEndDate",
1210
+ typeOfHeaderData: "STRING",
1211
+ typeOfBodyData: "STRING",
1212
+ showTooltipIcon: false,
1213
+ },
1214
+ ],
1215
+ visible: true,
1216
+ width: "95px",
1217
+ },
1218
+ {
1219
+ headerInfo: [
1220
+ {
1221
+ name: "REVISION <br/> START DATE",
1222
+ objectKey: "revisionStartDate",
1223
+ wrapHeaderText: true,
1224
+ typeOfHeaderData: "STRING",
1225
+ typeOfBodyData: "STRING",
1226
+ showTooltipIcon: true,
1227
+ isSortRequired: [true],
1228
+ isFilterRequired: [true],
1229
+ filter: "DATE",
1230
+ filterSortObjectKeys: ["revisionStartDate"],
1231
+ },
1232
+ // {
1233
+ // name: "START DATE",
1234
+ // objectKey: "revisionStartDate",
1235
+ // typeOfHeaderData: "STRING",
1236
+ // typeOfBodyData: "STRING",
1237
+ // showTooltipIcon: false,
1238
+ // },
1239
+ ],
1240
+ visible: true,
1241
+ width: "90px",
1242
+ },
1243
+ {
1244
+ headerInfo: [
1245
+ {
1246
+ name: DRRListingTableColumnNameConstants.OfferCount,
1247
+ objectKey: "offerCount",
1248
+ typeOfHeaderData: "STRING",
1249
+ typeOfBodyData: "STRING",
1250
+ showTooltipIcon: true,
1251
+ isSortRequired: [true],
1252
+ isFilterRequired: [true],
1253
+ filter: "SLIDER",
1254
+ filterSortObjectKeys: ["offerCount"],
1255
+ },
1256
+ {
1257
+ name: DRRListingTableColumnNameConstants.Status,
1258
+ objectKey: "orderRevisionStatus",
1259
+ actionKey: "statusAndNeedsAttentionActionKey",
1260
+ typeOfHeaderData: "STRING",
1261
+ typeOfBodyData: "SVG_ICON",
1262
+ showTooltipIcon: true,
1263
+ filter: "CHECKBOX",
1264
+ isSortRequired: [true],
1265
+ isFilterRequired: [true],
1266
+ filterSortObjectKeys: ["orderRevisionStatus"],
1267
+ },
1268
+ ],
1269
+ visible: true,
1270
+ width: "15%",
1271
+ },
1272
+ {
1273
+ headerInfo: [
1274
+ {
1275
+ name: DRRListingTableColumnNameConstants.OfferefMadegood,
1276
+ objectKey: "offeredMGsValueDisplay",
1277
+ typeOfHeaderData: "STRING",
1278
+ typeOfBodyData: "STRING",
1279
+ showTooltipIcon: true,
1280
+ isSortRequired: [true, true],
1281
+ isFilterRequired: [true, true],
1282
+ filter: "SLIDER",
1283
+ filterSortObjectKeys: ["offeredMGsValue", "outstandingSpotsValue"],
1284
+ },
1285
+ {
1286
+ name: DRRListingTableColumnNameConstants.OSSPOTSValue,
1287
+ objectKey: "outstandingSpotsValueDisplay",
1288
+ typeOfHeaderData: "STRING",
1289
+ typeOfBodyData: "STRING",
1290
+ showTooltipIcon: false,
1291
+ },
1292
+ ],
1293
+ visible: true,
1294
+ width: "15%",
1295
+ },
1296
+ {
1297
+ headerInfo: [
1298
+ {
1299
+ name: DRRListingTableColumnNameConstants.OfferefADUs,
1300
+ objectKey: "offeredADUsValueDisplay",
1301
+ typeOfHeaderData: "STRING",
1302
+ typeOfBodyData: "STRING",
1303
+ showTooltipIcon: true,
1304
+ isSortRequired: [true, true],
1305
+ isFilterRequired: [true, true],
1306
+ filter: "SLIDER",
1307
+ filterSortObjectKeys: ["offeredADUsValue", "uDProjectionValue"],
1308
+ },
1309
+ {
1310
+ name: DRRListingTableColumnNameConstants.UDProjection,
1311
+ objectKey: "uDProjectionValueDisplay",
1312
+ typeOfHeaderData: "STRING",
1313
+ typeOfBodyData: "STRING",
1314
+ showTooltipIcon: false,
1315
+ },
1316
+ ],
1317
+ visible: true,
1318
+ width: "15%",
1319
+ },
1320
+ {
1321
+ headerInfo: [
1322
+ {
1323
+ name: "CREDIT ADUs",
1324
+ objectKey: "creditAdusValueDisplay",
1325
+ typeOfHeaderData: "STRING",
1326
+ typeOfBodyData: "STRING",
1327
+ showTooltipIcon: true,
1328
+ isSortRequired: [true],
1329
+ isFilterRequired: [true],
1330
+ filter: "SLIDER",
1331
+ filterSortObjectKeys: ["creditAdusValue"],
1332
+ },
1333
+ ],
1334
+ visible: true,
1335
+ width: "15%",
1336
+ },
1337
+ ];
1338
+ }
1339
+ getTodaysUserOffersTableHeaders() {
1340
+ return [
1341
+ {
1342
+ headerInfo: [
1343
+ {
1344
+ name: "",
1345
+ objectKey: "isStarred",
1346
+ typeOfHeaderData: "",
1347
+ typeOfBodyData: "ICON",
1348
+ showTooltipIcon: false,
1349
+ },
1350
+ ],
1351
+ visible: true,
1352
+ width: "40px",
1353
+ },
1354
+ {
1355
+ headerInfo: [
1356
+ {
1357
+ name: DRRListingTableColumnNameConstants.OrderNumber,
1358
+ objectKey: "orderIdAndRevNumber",
1359
+ typeOfHeaderData: "STRING",
1360
+ typeOfBodyData: "SVG_ICON",
1361
+ actionKey: "poDandAAKey",
1362
+ showTooltipIcon: true,
1363
+ isSortRequired: [true, true],
1364
+ isFilterRequired: [true, true],
1365
+ filter: "CHECKBOX",
1366
+ tooltipKey: "tooltipData",
1367
+ filterSortObjectKeys: ["orderIdAndRevNumber", "alternateOrderId"],
1368
+ },
1369
+ {
1370
+ name: DRRListingTableColumnNameConstants.AltOrderId,
1371
+ objectKey: "alternateOrderId",
1372
+ typeOfHeaderData: "STRING",
1373
+ typeOfBodyData: "STRING",
1374
+ showTooltipIcon: false,
1375
+ },
1376
+ ],
1377
+ visible: true,
1378
+ width: "130px",
1379
+ },
1380
+ {
1381
+ headerInfo: [
1382
+ {
1383
+ name: DRRListingTableColumnNameConstants.RevisionType,
1384
+ objectKey: "displayRevisionType",
1385
+ typeOfHeaderData: "STRING",
1386
+ typeOfBodyData: "STRING",
1387
+ showTooltipIcon: true,
1388
+ isSortRequired: [true],
1389
+ isFilterRequired: [true],
1390
+ filter: "CHECKBOX",
1391
+ filterSortObjectKeys: ["displayRevisionType"],
1392
+ },
1393
+ ],
1394
+ visible: true,
1395
+ width: "108px",
1396
+ },
1397
+ {
1398
+ headerInfo: [
1399
+ {
1400
+ name: DRRListingTableColumnNameConstants.PrimaryAE,
1401
+ objectKey: "primaryAEName",
1402
+ typeOfHeaderData: "STRING",
1403
+ typeOfBodyData: "STRING",
1404
+ showTooltipIcon: true,
1405
+ isSortRequired: [true, true],
1406
+ isFilterRequired: [true, true],
1407
+ filter: "CHECKBOX",
1408
+ filterSortObjectKeys: ["primaryAEName", "region"],
1409
+ },
1410
+ {
1411
+ name: DRRListingTableColumnNameConstants.Region,
1412
+ objectKey: "region",
1413
+ typeOfHeaderData: "STRING",
1414
+ typeOfBodyData: "STRING",
1415
+ showTooltipIcon: false,
1416
+ },
1417
+ ],
1418
+ visible: true,
1419
+ width: "129.5808px",
1420
+ },
1421
+ {
1422
+ headerInfo: [
1423
+ {
1424
+ name: DRRListingTableColumnNameConstants.Agency,
1425
+ objectKey: "agencyName",
1426
+ typeOfHeaderData: "STRING",
1427
+ typeOfBodyData: "STRING",
1428
+ showTooltipIcon: true,
1429
+ isSortRequired: [true, true],
1430
+ isFilterRequired: [true, true],
1431
+ filter: "CHECKBOX",
1432
+ filterSortObjectKeys: ["agencyName", "location"],
1433
+ },
1434
+ {
1435
+ name: DRRListingTableColumnNameConstants.Location,
1436
+ objectKey: "location",
1437
+ typeOfHeaderData: "STRING",
1438
+ typeOfBodyData: "STRING",
1439
+ showTooltipIcon: false,
1440
+ },
1441
+ ],
1442
+ visible: true,
1443
+ width: "120px",
1444
+ },
1445
+ {
1446
+ headerInfo: [
1447
+ {
1448
+ name: DRRListingTableColumnNameConstants.Advertiser,
1449
+ objectKey: "advertiserName",
1450
+ typeOfHeaderData: "STRING",
1451
+ typeOfBodyData: "STRING",
1452
+ showTooltipIcon: true,
1453
+ isSortRequired: [true, true],
1454
+ isFilterRequired: [true, true],
1455
+ filter: "CHECKBOX",
1456
+ filterSortObjectKeys: ["advertiserName", "productCode"],
1457
+ },
1458
+ {
1459
+ name: DRRListingTableColumnNameConstants.ProductCode,
1460
+ objectKey: "productCode",
1461
+ typeOfHeaderData: "STRING",
1462
+ typeOfBodyData: "STRING",
1463
+ showTooltipIcon: false,
1464
+ },
1465
+ ],
1466
+ visible: true,
1467
+ width: "156.8608px",
1468
+ },
1469
+ {
1470
+ headerInfo: [
1471
+ {
1472
+ name: DRRListingTableColumnNameConstants.StartDate,
1473
+ objectKey: "flightStartDate",
1474
+ typeOfHeaderData: "STRING",
1475
+ typeOfBodyData: "STRING",
1476
+ showTooltipIcon: true,
1477
+ isSortRequired: [true, true],
1478
+ isFilterRequired: [true, true],
1479
+ filter: "DATE",
1480
+ filterSortObjectKeys: ["flightStartDate", "flightEndDate"],
1481
+ },
1482
+ {
1483
+ name: DRRListingTableColumnNameConstants.EndDate,
1484
+ objectKey: "flightEndDate",
1485
+ typeOfHeaderData: "STRING",
1486
+ typeOfBodyData: "STRING",
1487
+ showTooltipIcon: false,
1488
+ },
1489
+ ],
1490
+ visible: true,
1491
+ width: "100px",
1492
+ },
1493
+ {
1494
+ headerInfo: [
1495
+ {
1496
+ name: DRRListingTableColumnNameConstants.UserMGs,
1497
+ objectKey: "userMGValueDisplay",
1498
+ typeOfHeaderData: "STRING",
1499
+ typeOfBodyData: "STRING",
1500
+ showTooltipIcon: true,
1501
+ isSortRequired: [true, true],
1502
+ isFilterRequired: [true, true],
1503
+ filter: "SLIDER",
1504
+ filterSortObjectKeys: ["userMGValue", "outstandingPreemptionsValue"],
1505
+ },
1506
+ {
1507
+ name: DRRListingTableColumnNameConstants.OSPE,
1508
+ objectKey: "outstandingPreemptionsValueDisplay",
1509
+ typeOfHeaderData: "STRING",
1510
+ typeOfBodyData: "STRING",
1511
+ showTooltipIcon: false,
1512
+ },
1513
+ ],
1514
+ visible: true,
1515
+ width: "100px",
1516
+ },
1517
+ {
1518
+ headerInfo: [
1519
+ {
1520
+ name: DRRListingTableColumnNameConstants.UserADUs,
1521
+ objectKey: "userADUValueDisplay",
1522
+ typeOfHeaderData: "STRING",
1523
+ typeOfBodyData: "STRING",
1524
+ showTooltipIcon: true,
1525
+ isSortRequired: [true, true],
1526
+ isFilterRequired: [true, true],
1527
+ filter: "SLIDER",
1528
+ filterSortObjectKeys: ["userADUValue", "audienceDeficitValue"],
1529
+ },
1530
+ {
1531
+ name: DRRListingTableColumnNameConstants.UDProjection,
1532
+ objectKey: "audienceDeficitValueDisplay",
1533
+ typeOfHeaderData: "STRING",
1534
+ typeOfBodyData: "STRING",
1535
+ showTooltipIcon: false,
1536
+ },
1537
+ ],
1538
+ visible: true,
1539
+ width: "100px",
1540
+ },
1541
+ {
1542
+ headerInfo: [
1543
+ {
1544
+ name: "BUYER $ CHANGES",
1545
+ objectKey: "buyerChangesValueDisplay",
1546
+ typeOfHeaderData: "STRING",
1547
+ typeOfBodyData: "STRING",
1548
+ showTooltipIcon: true,
1549
+ isSortRequired: [true, true],
1550
+ isFilterRequired: [true, true],
1551
+ filter: "SLIDER",
1552
+ filterSortObjectKeys: ["buyerChangesValue", "userChangesValue"],
1553
+ },
1554
+ {
1555
+ name: "SELLER $ CHANGES",
1556
+ objectKey: "userChangesValueDisplay",
1557
+ typeOfHeaderData: "STRING",
1558
+ typeOfBodyData: "STRING",
1559
+ showTooltipIcon: false,
1560
+ },
1561
+ ],
1562
+ visible: true,
1563
+ width: "128px",
1564
+ },
1565
+ {
1566
+ headerInfo: [
1567
+ {
1568
+ name: "BUYER GRP CHANGES",
1569
+ objectKey: "buyerGrpChangesValueDisplay",
1570
+ typeOfHeaderData: "STRING",
1571
+ typeOfBodyData: "STRING",
1572
+ showTooltipIcon: true,
1573
+ isSortRequired: [true, true],
1574
+ isFilterRequired: [true, true],
1575
+ filter: "SLIDER",
1576
+ filterSortObjectKeys: ["buyerGrpChangesValue", "buyerImpChangesValue"],
1577
+ },
1578
+ {
1579
+ name: "BUYER IMPS CHANGES",
1580
+ objectKey: "buyerImpChangesValueDisplay",
1581
+ typeOfHeaderData: "STRING",
1582
+ typeOfBodyData: "STRING",
1583
+ showTooltipIcon: false,
1584
+ },
1585
+ ],
1586
+ visible: true,
1587
+ width: "143px",
1588
+ },
1589
+ {
1590
+ headerInfo: [
1591
+ {
1592
+ name: "BUYER ADDED",
1593
+ objectKey: "buyerAddedValueDisplay",
1594
+ typeOfHeaderData: "STRING",
1595
+ typeOfBodyData: "STRING",
1596
+ showTooltipIcon: true,
1597
+ isSortRequired: [true, true],
1598
+ isFilterRequired: [true, true],
1599
+ filter: "SLIDER",
1600
+ filterSortObjectKeys: ["buyerAddedValue", "buyerDeletedValue"],
1601
+ },
1602
+ {
1603
+ name: "BUYER DELETED",
1604
+ objectKey: "buyerDeletedValueDisplay",
1605
+ typeOfHeaderData: "STRING",
1606
+ typeOfBodyData: "STRING",
1607
+ showTooltipIcon: false,
1608
+ },
1609
+ ],
1610
+ visible: true,
1611
+ width: "143px",
1612
+ },
1613
+ ];
1614
+ }
1615
+ getOffersAwaitingApprovalTableHeadersForBuyer() {
1616
+ return [
1617
+ {
1618
+ headerInfo: [
1619
+ {
1620
+ name: DRRListingTableColumnNameConstants.Station,
1621
+ objectKey: "station",
1622
+ typeOfHeaderData: "STRING",
1623
+ typeOfBodyData: "STRING",
1624
+ showTooltipIcon: true,
1625
+ isSortRequired: [true],
1626
+ isFilterRequired: [true],
1627
+ filter: "CHECKBOX",
1628
+ filterSortObjectKeys: ["station"],
1629
+ },
1630
+ ],
1631
+ visible: true,
1632
+ width: "100px",
1633
+ },
1634
+ {
1635
+ headerInfo: [
1636
+ {
1637
+ name: DRRListingTableColumnNameConstants.OrderNumber,
1638
+ objectKey: "orderIdAndRevNumber",
1639
+ typeOfHeaderData: "STRING",
1640
+ actionKey: "poDandAAKey",
1641
+ typeOfBodyData: "SVG_ICON",
1642
+ showTooltipIcon: true,
1643
+ isSortRequired: [true, true],
1644
+ isFilterRequired: [true, true],
1645
+ filter: "CHECKBOX",
1646
+ filterSortObjectKeys: ["orderIdAndRevNumber", "alternateOrderId"],
1647
+ },
1648
+ {
1649
+ name: DRRListingTableColumnNameConstants.AltOrderId,
1650
+ objectKey: "alternateOrderId",
1651
+ typeOfHeaderData: "STRING",
1652
+ typeOfBodyData: "STRING",
1653
+ showTooltipIcon: false,
1654
+ },
1655
+ ],
1656
+ visible: true,
1657
+ width: "128px",
1658
+ },
1659
+ {
1660
+ headerInfo: [
1661
+ {
1662
+ name: DRRListingTableColumnNameConstants.BUYERS,
1663
+ objectKey: "buyerNames",
1664
+ typeOfHeaderData: "STRING",
1665
+ typeOfBodyData: "STRING",
1666
+ showTooltipIcon: true,
1667
+ isSortRequired: [true, true],
1668
+ isFilterRequired: [true, true],
1669
+ filter: "CHECKBOX",
1670
+ filterSortObjectKeys: ["buyerNames", "repUserNames"],
1671
+ },
1672
+ {
1673
+ name: DRRListingTableColumnNameConstants.REPS,
1674
+ objectKey: "repUserNames",
1675
+ typeOfHeaderData: "STRING",
1676
+ typeOfBodyData: "STRING",
1677
+ showTooltipIcon: false,
1678
+ filter: "CHECKBOX",
1679
+ },
1680
+ ],
1681
+ visible: true,
1682
+ width: "137px",
1683
+ },
1684
+ {
1685
+ headerInfo: [
1686
+ {
1687
+ name: DRRListingTableColumnNameConstants.PrimaryAE,
1688
+ objectKey: "primaryAEName",
1689
+ typeOfHeaderData: "STRING",
1690
+ typeOfBodyData: "STRING",
1691
+ showTooltipIcon: true,
1692
+ isSortRequired: [true, true],
1693
+ isFilterRequired: [true, true],
1694
+ filter: "CHECKBOX",
1695
+ filterSortObjectKeys: ["primaryAEName", "region"],
1696
+ },
1697
+ {
1698
+ name: DRRListingTableColumnNameConstants.Region,
1699
+ objectKey: "region",
1700
+ typeOfHeaderData: "STRING",
1701
+ typeOfBodyData: "STRING",
1702
+ showTooltipIcon: false,
1703
+ },
1704
+ ],
1705
+ visible: true,
1706
+ width: "126px",
1707
+ },
1708
+ {
1709
+ headerInfo: [
1710
+ {
1711
+ name: DRRListingTableColumnNameConstants.Agency,
1712
+ objectKey: "agencyName",
1713
+ typeOfHeaderData: "STRING",
1714
+ typeOfBodyData: "STRING",
1715
+ showTooltipIcon: true,
1716
+ isSortRequired: [true, true],
1717
+ isFilterRequired: [true, true],
1718
+ filter: "CHECKBOX",
1719
+ filterSortObjectKeys: ["agencyName", "location"],
1720
+ },
1721
+ {
1722
+ name: DRRListingTableColumnNameConstants.Location,
1723
+ objectKey: "location",
1724
+ typeOfHeaderData: "STRING",
1725
+ typeOfBodyData: "STRING",
1726
+ showTooltipIcon: false,
1727
+ },
1728
+ ],
1729
+ visible: true,
1730
+ width: "115px",
1731
+ },
1732
+ {
1733
+ headerInfo: [
1734
+ {
1735
+ name: DRRListingTableColumnNameConstants.Advertiser,
1736
+ objectKey: "advertiserName",
1737
+ typeOfHeaderData: "STRING",
1738
+ typeOfBodyData: "STRING",
1739
+ showTooltipIcon: true,
1740
+ isSortRequired: [true],
1741
+ isFilterRequired: [true],
1742
+ filter: "CHECKBOX",
1743
+ filterSortObjectKeys: ["advertiserName"],
1744
+ },
1745
+ ],
1746
+ visible: true,
1747
+ width: "130px",
1748
+ },
1749
+ {
1750
+ headerInfo: [
1751
+ {
1752
+ name: DRRListingTableColumnNameConstants.StartDate,
1753
+ objectKey: "flightStartDate",
1754
+ typeOfHeaderData: "STRING",
1755
+ typeOfBodyData: "STRING",
1756
+ showTooltipIcon: true,
1757
+ isSortRequired: [true, true],
1758
+ isFilterRequired: [true, true],
1759
+ filter: "DATE",
1760
+ filterSortObjectKeys: ["flightStartDate", "flightEndDate"],
1761
+ },
1762
+ {
1763
+ name: DRRListingTableColumnNameConstants.EndDate,
1764
+ objectKey: "flightEndDate",
1765
+ typeOfHeaderData: "STRING",
1766
+ typeOfBodyData: "STRING",
1767
+ showTooltipIcon: false,
1768
+ },
1769
+ ],
1770
+ visible: true,
1771
+ width: "95px",
1772
+ },
1773
+ {
1774
+ headerInfo: [
1775
+ {
1776
+ name: DRRListingTableColumnNameConstants.RevisionStartDate,
1777
+ objectKey: "revisionStartDate",
1778
+ typeOfHeaderData: "STRING",
1779
+ typeOfBodyData: "STRING",
1780
+ showTooltipIcon: true,
1781
+ isSortRequired: [true],
1782
+ isFilterRequired: [true],
1783
+ filter: "DATE",
1784
+ filterSortObjectKeys: ["revisionStartDate"],
1785
+ },
1786
+ {
1787
+ name: DRRListingTableColumnNameConstants.TimeoutDateAndTime,
1788
+ objectKey: "timeoutDateTimeForDisplay",
1789
+ typeOfHeaderData: "STRING",
1790
+ typeOfBodyData: "STRING",
1791
+ showTooltipIcon: true,
1792
+ isSortRequired: [true],
1793
+ isFilterRequired: [true],
1794
+ filter: "DATE",
1795
+ filterSortObjectKeys: ["timeoutDate"],
1796
+ },
1797
+ ],
1798
+ visible: true,
1799
+ width: "145px",
1800
+ },
1801
+ {
1802
+ headerInfo: [
1803
+ {
1804
+ name: DRRListingTableColumnNameConstants.OfferCount,
1805
+ objectKey: "offerCount",
1806
+ typeOfHeaderData: "STRING",
1807
+ typeOfBodyData: "STRING",
1808
+ showTooltipIcon: true,
1809
+ isSortRequired: [true, true],
1810
+ isFilterRequired: [true, true],
1811
+ filter: "SLIDER",
1812
+ filterSortObjectKeys: ["offerCount", "orderRevisionStatus"],
1813
+ },
1814
+ {
1815
+ name: DRRListingTableColumnNameConstants.Status,
1816
+ objectKey: "orderRevisionStatus",
1817
+ actionKey: "statusAndNeedsAttentionActionKey",
1818
+ typeOfHeaderData: "STRING",
1819
+ typeOfBodyData: "SVG_ICON",
1820
+ showTooltipIcon: false,
1821
+ },
1822
+ ],
1823
+ visible: true,
1824
+ width: "129px",
1825
+ },
1826
+ {
1827
+ headerInfo: [
1828
+ {
1829
+ name: DRRListingTableColumnNameConstants.OfferefMadegood,
1830
+ objectKey: "offeredMGsValueDisplay",
1831
+ typeOfHeaderData: "STRING",
1832
+ typeOfBodyData: "STRING",
1833
+ showTooltipIcon: true,
1834
+ isSortRequired: [true, true],
1835
+ isFilterRequired: [true, true],
1836
+ filter: "SLIDER",
1837
+ filterSortObjectKeys: ["offeredMGsValue", "outstandingSpotsValue"],
1838
+ },
1839
+ {
1840
+ name: DRRListingTableColumnNameConstants.OSSPOTSValue,
1841
+ objectKey: "outstandingSpotsValueDisplay",
1842
+ typeOfHeaderData: "STRING",
1843
+ typeOfBodyData: "STRING",
1844
+ showTooltipIcon: false,
1845
+ },
1846
+ ],
1847
+ visible: true,
1848
+ width: "129px",
1849
+ },
1850
+ {
1851
+ headerInfo: [
1852
+ {
1853
+ name: DRRListingTableColumnNameConstants.OfferefADUs,
1854
+ objectKey: "offeredADUsValueDisplay",
1855
+ typeOfHeaderData: "STRING",
1856
+ typeOfBodyData: "STRING",
1857
+ showTooltipIcon: true,
1858
+ isSortRequired: [true, true],
1859
+ isFilterRequired: [true, true],
1860
+ filter: "SLIDER",
1861
+ filterSortObjectKeys: ["offeredADUsValue", "uDProjectionValue"],
1862
+ },
1863
+ {
1864
+ name: DRRListingTableColumnNameConstants.UDProjection,
1865
+ objectKey: "uDProjectionValueDisplay",
1866
+ typeOfHeaderData: "STRING",
1867
+ typeOfBodyData: "STRING",
1868
+ showTooltipIcon: false,
1869
+ },
1870
+ ],
1871
+ visible: true,
1872
+ width: "129px",
1873
+ },
1874
+ {
1875
+ headerInfo: [
1876
+ {
1877
+ name: "CREDIT ADUs",
1878
+ objectKey: "creditAdusValueDisplay",
1879
+ typeOfHeaderData: "STRING",
1880
+ typeOfBodyData: "STRING",
1881
+ showTooltipIcon: true,
1882
+ isSortRequired: [true],
1883
+ isFilterRequired: [true],
1884
+ filter: "SLIDER",
1885
+ filterSortObjectKeys: ["creditAdusValue"],
1886
+ },
1887
+ ],
1888
+ visible: true,
1889
+ width: "100px",
1890
+ },
1891
+ ];
1892
+ }
1893
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DailyRevisionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1894
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DailyRevisionService, providedIn: "root" }); }
1895
+ }
1896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DailyRevisionService, decorators: [{
1897
+ type: Injectable,
1898
+ args: [{
1899
+ providedIn: "root",
1900
+ }]
1901
+ }] });
1902
+
1903
+ class DailyRevisionListingComponent {
1904
+ constructor(router, dailyRevisionService, genericDailyRevisionService, annaGlobalConfig, annaFilterService, annaSortService, cdRef, toastr, route, breadcrumbService, equivilizationService, annaGtService, persistingFilterService, notificationService, consumingProjectDRRListingBackendService) {
1905
+ this.router = router;
1906
+ this.dailyRevisionService = dailyRevisionService;
1907
+ this.genericDailyRevisionService = genericDailyRevisionService;
1908
+ this.annaGlobalConfig = annaGlobalConfig;
1909
+ this.annaFilterService = annaFilterService;
1910
+ this.annaSortService = annaSortService;
1911
+ this.cdRef = cdRef;
1912
+ this.toastr = toastr;
1913
+ this.route = route;
1914
+ this.breadcrumbService = breadcrumbService;
1915
+ this.equivilizationService = equivilizationService;
1916
+ this.annaGtService = annaGtService;
1917
+ this.persistingFilterService = persistingFilterService;
1918
+ this.notificationService = notificationService;
1919
+ this.consumingProjectDRRListingBackendService = consumingProjectDRRListingBackendService;
1920
+ this.stationIdsWithValidLicense = [];
1921
+ this.dailyRevisionData = [];
1922
+ this.dailyRevisionDataCloned = [];
1923
+ this.loading = false;
1924
+ this.disableResetAllButton = false;
1925
+ this.ngUnsubscribe = new Subject();
1926
+ this.gtDimension = { rowHeight: 40, headerHeight: 40, dataOnTopHeight: 248, marginFromBottom: 20 };
1927
+ this.orderConstants = OrdersConstant;
1928
+ this.drrSummaryUrl = "summary";
1929
+ this.lastOrderListFetchedDateTimeAndTimezone = null;
1930
+ this.defaultFilterNameToBeSelected = null;
1931
+ this.gtGeneralConfig = { ...this.annaGlobalConfig.defaultGtGeneralConfig };
1932
+ this.setGtGeneralConfig();
1933
+ }
1934
+ ngOnChanges(changes) {
1935
+ if (changes.queryparams) {
1936
+ this.onQueryParamsChange();
1937
+ }
1938
+ if (changes.allStationsOrOGs) {
1939
+ this.handleNoData();
1940
+ }
1941
+ }
1942
+ onQueryParamsChange() {
1943
+ if (!this.dailyRevisionService.filtersAppliedRouteChange) {
1944
+ this.setPersistingFilterForPopup(this.queryparams?.popupFilter);
1945
+ if (this.queryparams?.filters &&
1946
+ this.persistingFilterService.getActualQueryParams(this.queryparams?.filters)) {
1947
+ this.filtersFromRoute = JSON.parse(this.persistingFilterService.getActualQueryParams(this.queryparams?.filters));
1948
+ }
1949
+ else if (this.queryparams?.filterFor) {
1950
+ this.easyFilterNameFromRoute = this.queryparams.filterFor;
1951
+ }
1952
+ else {
1953
+ this.filtersFromRoute = null;
1954
+ }
1955
+ if (this.queryparams?.breadcrumbs &&
1956
+ this.persistingFilterService.getActualQueryParams(this.queryparams.breadcrumbs)) {
1957
+ this.breadcrumbsToPersist = JSON.parse(this.persistingFilterService.getActualQueryParams(this.queryparams.breadcrumbs));
1958
+ }
1959
+ this.initializeDrrPageData();
1960
+ }
1961
+ else {
1962
+ this.dailyRevisionService.filtersAppliedRouteChange = false;
1963
+ }
1964
+ }
1965
+ setPersistingFilterForPopup(filter) {
1966
+ this.persistingFilterForPopup =
1967
+ filter && this.persistingFilterService.getActualQueryParams(filter)
1968
+ ? JSON.parse(this.persistingFilterService.getActualQueryParams(filter))
1969
+ : this.persistingFilterForPopup;
1970
+ }
1971
+ ngOnInit() {
1972
+ this.loading = true;
1973
+ this.breadcrumbService.isOrderListingPageOpened = true;
1974
+ this.dailyRevisionService.ongoingOrdersList = null;
1975
+ this.dailyRevisionService.completedOrdersList = null;
1976
+ this.setTableHeight(true);
1977
+ this.setMessageForNoOrders();
1978
+ this.notificationService.samePageNotificationClickedSubject
1979
+ .pipe(takeUntil(this.ngUnsubscribe))
1980
+ .subscribe((isSamePage) => {
1981
+ this.dailyRevisionService.filtersAppliedRouteChange = false;
1982
+ this.onQueryParamsChange();
1983
+ this.getAllOrdersData();
1984
+ });
1985
+ }
1986
+ setMessageForNoOrders() {
1987
+ const msg = "Offers for all orders will list here for approval.";
1988
+ this.noOrdersPresentMessageBoxData = new MessageBoxData("", msg, "mdi mdi-information", `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm`);
1989
+ }
1990
+ initializeDrrPageData() {
1991
+ this.initEasyFilters();
1992
+ const tableClass = this.userType === "SELLER" ? "seller-drr-listing" : "buyer-drr-listing";
1993
+ if (this.currentTab === OrdersConstant.TodaysUsersOffers) {
1994
+ this.gtElementClass = `${tableClass}-user-offers-table`;
1995
+ this.numberOfEasyFilterLoader = 6;
1996
+ }
1997
+ else {
1998
+ this.gtElementClass = `${tableClass}-anna-offers-table`;
1999
+ this.gtGeneralConfig.tableOuterContainerName = `anna-offers-${tableClass}-outer-container`;
2000
+ this.numberOfEasyFilterLoader = this.userType === "BUYER" ? 5 : 11;
2001
+ }
2002
+ if (this.filtersFromRoute) {
2003
+ this.initFiltersFromRoute();
2004
+ }
2005
+ else {
2006
+ this.initFilters();
2007
+ this.disableResetAllButton = true;
2008
+ }
2009
+ this.initAllData();
2010
+ }
2011
+ initAllData() {
2012
+ this.loading = true;
2013
+ this.handleNoData();
2014
+ }
2015
+ handleNoData() {
2016
+ if (this.allStationsOrOGs && this.allStationsOrOGs.length === 0) {
2017
+ this.loading = false;
2018
+ }
2019
+ }
2020
+ getLastOrderListFetchedDateTime() {
2021
+ this.consumingProjectDRRListingBackendService
2022
+ .getLastOrderListFetchedDateTime(this.selectedPopupFilters.station.id)
2023
+ .subscribe((response) => {
2024
+ this.lastOrderListFetchedDateTimeAndTimezone = `${response.LastOrderListFetchedDateTime} ${response.Timezone}`;
2025
+ this.cdRef.markForCheck();
2026
+ }, (error) => {
2027
+ this.lastOrderListFetchedDateTimeAndTimezone = "";
2028
+ });
2029
+ }
2030
+ getAllOrdersData() {
2031
+ this.loading = true;
2032
+ const payload = this.prepareRequestPayloadForOrders();
2033
+ const summaryPagePayload = cloneDeep(payload);
2034
+ summaryPagePayload.loggedInUserId = this.userOrBuyerId;
2035
+ this.payloadForSummaryPage = summaryPagePayload;
2036
+ if (this.currentTab === OrdersConstant.TodaysUsersOffers) {
2037
+ this.revisionDateMessage = "The data presented below belongs to the revision generated after";
2038
+ }
2039
+ this.getRevisionData(payload);
2040
+ }
2041
+ getRevisionData(payload) {
2042
+ this.consumingProjectDRRListingBackendService
2043
+ .getAllOrders(payload, this.currentTab)
2044
+ .pipe(takeUntil(this.ngUnsubscribe))
2045
+ .subscribe((response) => {
2046
+ if (response.status === ErrorCodes.SUCCESS_CODE_GET) {
2047
+ if (response.body && response.body.OrdersData?.length > 0) {
2048
+ this.onSuccessfullyReceivingOrders(response.body);
2049
+ }
2050
+ else {
2051
+ this.getAllOrdersErrorHandler();
2052
+ }
2053
+ }
2054
+ else if (response.status === ErrorCodes.NO_CONTENT) {
2055
+ this.getAllOrdersErrorHandler();
2056
+ }
2057
+ }, (error) => {
2058
+ this.toastr.error("Something went wrong! Please try again");
2059
+ this.getAllOrdersErrorHandler();
2060
+ });
2061
+ }
2062
+ onSuccessfullyReceivingOrders(data) {
2063
+ this.dailyRevisionData = [];
2064
+ this.dailyRevisionDataCloned = [];
2065
+ if (this.userType === "SELLER") {
2066
+ if (this.currentTab === OrdersConstant.TodaysUsersOffers) {
2067
+ const dailyRevisionData = [];
2068
+ data.OrdersData.forEach((item) => {
2069
+ dailyRevisionData.push(new UserOfferSpecificDRROrderDataForSeller(item));
2070
+ });
2071
+ this.dailyRevisionData = cloneDeep(dailyRevisionData);
2072
+ this.dailyRevisionDataCloned = cloneDeep(this.dailyRevisionData);
2073
+ }
2074
+ else {
2075
+ const dailyRevisionData = [];
2076
+ data.OrdersData.forEach((item) => {
2077
+ dailyRevisionData.push(new ANNAOfferSpecificDRROrderDataForSeller(item));
2078
+ });
2079
+ this.dailyRevisionData = cloneDeep(dailyRevisionData);
2080
+ this.dailyRevisionDataCloned = cloneDeep(this.dailyRevisionData);
2081
+ this.setTimeOutdataAndCountForEasyFilters(data.StationRevisionInformation);
2082
+ }
2083
+ }
2084
+ else {
2085
+ const dailyRevisionData = [];
2086
+ data.OrdersData.forEach((item) => {
2087
+ dailyRevisionData.push(new ANNAOfferSpecificDRROrderDataForBuyer(item));
2088
+ });
2089
+ this.dailyRevisionData = cloneDeep(dailyRevisionData);
2090
+ this.dailyRevisionDataCloned = cloneDeep(this.dailyRevisionData);
2091
+ this.setTimeOutdataAndCountForEasyFilters(data.StationRevisionInformation);
2092
+ }
2093
+ this.handleDRRListingResponse();
2094
+ }
2095
+ handleDRRListingResponse() {
2096
+ this.annaSortService.columnSortState = this.filtersFromRoute?.sortState
2097
+ ? new Map(JSON.parse(this.filtersFromRoute.sortState))
2098
+ : new Map();
2099
+ this.annaFilterService.updateStateOfAllTheKeys(this.annaSortService.columnSortState);
2100
+ if (this.filtersFromRoute) {
2101
+ this.dailyRevisionData = this.annaFilterService.filterData(this.dailyRevisionDataCloned, "");
2102
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.dailyRevisionDataCloned);
2103
+ this.checkIfSortingIsApplied();
2104
+ setTimeout(() => {
2105
+ // let isDisabledEasyFilterPresent = false;
2106
+ this.easyFilterComponent.easyFilters.forEach((grp) => {
2107
+ grp.filters.forEach((filter) => {
2108
+ if (filter.isActive && filter.isDisabled) {
2109
+ this.removeEasyFilterFromFiltervariables(filter, grp.groupId);
2110
+ }
2111
+ });
2112
+ });
2113
+ // if (isDisabledEasyFilterPresent) {
2114
+ // this.clearFilters();
2115
+ // }
2116
+ }, 0);
2117
+ }
2118
+ this.setEasyFiltersFromRouteOrDefaultFilter();
2119
+ this.showOrHideClearAll();
2120
+ this.createTotalRow();
2121
+ this.equivilizationService.publishIsNoDataStatusData(this.dailyRevisionData?.length === 0);
2122
+ if (this.dailyRevisionData?.length === 0) {
2123
+ this.loading = false;
2124
+ this.dailyRevisionData = [];
2125
+ this.easyFilters.forEach((filterGroup) => {
2126
+ filterGroup.filters.forEach((obj) => {
2127
+ obj.count = 0;
2128
+ });
2129
+ });
2130
+ this.cdRef.detectChanges();
2131
+ }
2132
+ else {
2133
+ this.setTableHeight();
2134
+ }
2135
+ this.loading = false;
2136
+ this.cdRef.detectChanges();
2137
+ }
2138
+ setEasyFiltersFromRouteOrDefaultFilter() {
2139
+ if (this.easyFilterNameFromRoute) {
2140
+ setTimeout(() => {
2141
+ const filterName = this.easyFilterNameFromRoute;
2142
+ this.easyFilterNameFromRoute = null;
2143
+ this.easyFilterComponent.applyEasyFilterUsingFilterName(filterName);
2144
+ }, 0);
2145
+ }
2146
+ else {
2147
+ this.defaultFilterNameToBeSelected =
2148
+ this.currentTab === OrdersConstant.TodaysANNAOffers && this.dailyRevisionDataCloned.filter(n => n.isWriteEnabledOrder)?.length > 0
2149
+ ? DRRListingEasyFilterConstants.WriteEnabled : null;
2150
+ if (!this.defaultFilterNameToBeSelected) {
2151
+ this.removeDefaultEasyFilterFromFiltervariables();
2152
+ }
2153
+ }
2154
+ }
2155
+ removeEasyFilterFromFiltervariables(easyFilter, groupId) {
2156
+ const filterKey = `easy_${groupId}_${easyFilter?.filterKeyValue?.key}`;
2157
+ this.annaFilterService.tooltipSelectedMap.delete(easyFilter?.filterKeyValue?.key);
2158
+ this.annaFilterService.appliedFiltersArray = this.annaFilterService.appliedFiltersArray.filter((n) => n !== filterKey);
2159
+ }
2160
+ showOrHideClearAll() {
2161
+ let isSortApplied = false;
2162
+ this.annaSortService.columnSortState.forEach((val, key) => {
2163
+ if (val === "ASC" || val === "DESC") {
2164
+ isSortApplied = true;
2165
+ }
2166
+ });
2167
+ this.disableResetAllButton =
2168
+ ((this.currentTab !== OrdersConstant.TodaysANNAOffers &&
2169
+ this.annaFilterService.appliedFiltersArray?.length === 0) ||
2170
+ this.checkIfOnlyDefaultEasyFilterIsApplied()) &&
2171
+ !isSortApplied;
2172
+ }
2173
+ checkIfOnlyDefaultEasyFilterIsApplied() {
2174
+ const writeEnabledEasyFilterKey = "easy_automationActivatedGroup_isWriteEnabledOrder";
2175
+ const appliedFilterArr = this.annaFilterService.appliedFiltersArray;
2176
+ return (this.currentTab === OrdersConstant.TodaysANNAOffers &&
2177
+ ((appliedFilterArr.length === 1 &&
2178
+ appliedFilterArr.includes(writeEnabledEasyFilterKey) &&
2179
+ this.annaFilterService.tooltipSelectedMap.has("isWriteEnabledOrder")) ||
2180
+ this.dailyRevisionDataCloned.filter((n) => n.isWriteEnabledOrder)?.length === 0));
2181
+ }
2182
+ removeDefaultEasyFilterFromFiltervariables() {
2183
+ this.defaultFilterNameToBeSelected = null;
2184
+ this.annaFilterService.tooltipSelectedMap.delete("isWriteEnabledOrder");
2185
+ this.annaFilterService.appliedFiltersArray = this.annaFilterService.appliedFiltersArray.filter((n) => n !== "easy_automationActivatedGroup_isWriteEnabledOrder");
2186
+ }
2187
+ setTimeOutdataAndCountForEasyFilters(data) {
2188
+ if (this.currentTab !== OrdersConstant.TodaysUsersOffers) {
2189
+ this.easyFilters.forEach((filterGroup) => {
2190
+ filterGroup.filters.forEach((obj) => {
2191
+ const dailyRevisionDataCloned = cloneDeep(this.dailyRevisionDataCloned);
2192
+ obj.count = dailyRevisionDataCloned.filter((n) => obj.text.toUpperCase() === n.orderRevisionStatus.toUpperCase() &&
2193
+ n.includeOrderInBubbleCount)?.length;
2194
+ if (obj.text === DRRListingEasyFilterConstants.SellerPending) {
2195
+ obj.textBelowFilter = `${data.IsSellerCutOffTimeExpired
2196
+ ? `<span class='italic-sub-text red-text'>Timed-out`
2197
+ : `<span class='italic-sub-text'>Timeout`}: ${data?.SellerCutOffTime} ${data?.StationTimeZone}</span>`;
2198
+ }
2199
+ if (obj.text === DRRListingEasyFilterConstants.SellerReconfirm) {
2200
+ obj.textBelowFilter = `${data.IsSellerReconfirmCutOffTimeExpired
2201
+ ? `<span class='italic-sub-text red-text'>Timed-out`
2202
+ : "<span class='italic-sub-text'>Timeout"}: ${data?.SellerReconfirmCutOffTime} ${data?.StationTimeZone}</span>`;
2203
+ }
2204
+ });
2205
+ if (filterGroup.label === "" && this.userType === "SELLER") {
2206
+ filterGroup.filters.forEach((obj) => {
2207
+ obj.textBelowFilter = " ";
2208
+ obj.textBelowFilterClass = "h-21";
2209
+ });
2210
+ }
2211
+ });
2212
+ }
2213
+ }
2214
+ getAllOrdersErrorHandler() {
2215
+ this.loading = false;
2216
+ this.dailyRevisionData = [];
2217
+ this.dailyRevisionDataCloned = [];
2218
+ this.easyFilters.forEach((filterGroup) => {
2219
+ filterGroup.filters.forEach((obj) => {
2220
+ obj.count = 0;
2221
+ });
2222
+ });
2223
+ this.cdRef.detectChanges();
2224
+ }
2225
+ createTotalRow() {
2226
+ this.totalRowInfo = [];
2227
+ switch (this.currentTab) {
2228
+ case OrdersConstant.TodaysUsersOffers:
2229
+ this.createTotalRowForCompletedRevisions();
2230
+ break;
2231
+ default:
2232
+ this.createTotalRowForOngoingRevisions();
2233
+ break;
2234
+ }
2235
+ }
2236
+ checkIfSortingIsApplied() {
2237
+ this.annaSortService.columnSortState.forEach((value, key) => {
2238
+ if (value === "ASC") {
2239
+ this.dailyRevisionData = this.annaSortService.sortDataForComponentOtherThanLurAndCsrPage(true, this.dailyRevisionData, key);
2240
+ }
2241
+ else if (value === "DESC") {
2242
+ this.dailyRevisionData = this.annaSortService.sortDataForComponentOtherThanLurAndCsrPage(false, this.dailyRevisionData, key);
2243
+ }
2244
+ });
2245
+ }
2246
+ createTotalRowForOngoingRevisions() {
2247
+ const totalRowData = new TotalRowForDRROngoingRevisions(this.dailyRevisionData);
2248
+ if (this.tableHeaders[0].headerInfo[0].objectKey === "isStarred") {
2249
+ this.totalRowInfo.push({
2250
+ colspan: 1,
2251
+ data: "",
2252
+ colName: "starred",
2253
+ });
2254
+ }
2255
+ this.totalRowInfo.push({
2256
+ colspan: this.userType === "SELLER" ? 4 : 7,
2257
+ data: `Total for ${totalRowData.totalRowCount} ANNA revision(s) listed below`,
2258
+ colName: "total",
2259
+ });
2260
+ const extraTdsCount = this.userType === "SELLER" ? 3 : 2;
2261
+ for (let i = 0; i < extraTdsCount; i++) {
2262
+ this.totalRowInfo.push({
2263
+ colspan: 1,
2264
+ data: ``,
2265
+ colName: `extra-blank-tds-${i}`,
2266
+ });
2267
+ }
2268
+ this.totalRowInfo.push({
2269
+ colspan: 1,
2270
+ data: totalRowData.totalOfferedMGForDisplay,
2271
+ lowerData: totalRowData.totalOutstandingPEForDisplay,
2272
+ colName: "total-offered-mg",
2273
+ });
2274
+ this.totalRowInfo.push({
2275
+ colspan: 1,
2276
+ data: totalRowData.totalPostedAudPercentDisplay,
2277
+ lowerData: totalRowData.totalAudienceDeficitForDisplay,
2278
+ colName: "total-posted-aud",
2279
+ });
2280
+ this.totalRowInfo.push({
2281
+ colspan: 1,
2282
+ data: totalRowData.totalCreditAdusForDisplay,
2283
+ colName: "total-credit",
2284
+ });
2285
+ }
2286
+ createTotalRowForCompletedRevisions() {
2287
+ const totalRowData = new TotalRowForDRRCompletedRevisions(this.dailyRevisionData);
2288
+ if (this.tableHeaders[0].headerInfo[0].objectKey === "isStarred") {
2289
+ this.totalRowInfo.push({
2290
+ colspan: 1,
2291
+ data: "",
2292
+ colName: "starred",
2293
+ });
2294
+ }
2295
+ this.totalRowInfo.push({
2296
+ colspan: 5,
2297
+ data: `Total for ${totalRowData.totalRowCount} revision(s) listed below`,
2298
+ colName: "total",
2299
+ });
2300
+ this.totalRowInfo.push({
2301
+ colspan: 1,
2302
+ data: ``,
2303
+ colName: "extra-blank",
2304
+ });
2305
+ this.totalRowInfo.push({
2306
+ colspan: 1,
2307
+ data: totalRowData.totalUserMGForDisplay,
2308
+ lowerData: totalRowData.totalOutstandingPEForDisplay,
2309
+ colName: "total-offered-mg",
2310
+ });
2311
+ this.totalRowInfo.push({
2312
+ colspan: 1,
2313
+ data: totalRowData.totalPostedAudPercentDisplay,
2314
+ lowerData: totalRowData.totalAudienceDeficitForDisplay,
2315
+ colName: "total-posted-aud",
2316
+ });
2317
+ this.totalRowInfo.push({
2318
+ colspan: 1,
2319
+ data: totalRowData.totalBuyerChangesForDisplay,
2320
+ lowerData: totalRowData.totalUserChangesForDisplay,
2321
+ colName: "total-user-buyer-chnages",
2322
+ });
2323
+ this.totalRowInfo.push({
2324
+ colspan: 1,
2325
+ data: totalRowData.totalBuyerGrpChangesForDisplay,
2326
+ lowerData: totalRowData.totalBuyerImpsChangesForDisplay,
2327
+ colName: "total-buyer-grp-changes",
2328
+ });
2329
+ this.totalRowInfo.push({
2330
+ colspan: 1,
2331
+ data: totalRowData.totalBuyerAddedChangesForDisplay,
2332
+ lowerData: totalRowData.totalBuyerDeletedChangesForDisplay,
2333
+ colName: "total-buyer-imps-changes",
2334
+ });
2335
+ }
2336
+ prepareRequestPayloadForOrders() {
2337
+ const payload = {
2338
+ stationOrOGId: +this.selectedPopupFilters.station.id,
2339
+ isEquivalized: this.selectedPopupFilters.isEquivalised,
2340
+ };
2341
+ return payload;
2342
+ }
2343
+ setBreadcrumbs() {
2344
+ // set breadcrumbs only when user does not navigate to this page via breadcrumb click
2345
+ if (!this.breadcrumbService.isBreadcrumbClicked) {
2346
+ const name = `Orders (${this.currentTab})`;
2347
+ const path = this.router.url;
2348
+ // let queryParams = this.applyFiltersFromTheUrl ? { filters: JSON.stringify(this.filtersFromRoute) } : null;
2349
+ const breadcrumbArr = this.breadcrumbService.getBreadcrumbList();
2350
+ if (this.breadcrumbsToPersist &&
2351
+ this.breadcrumbsToPersist.length > 0 &&
2352
+ !isEqual(this.breadcrumbsToPersist, breadcrumbArr)) {
2353
+ if (breadcrumbArr && breadcrumbArr.length > 0) {
2354
+ this.breadcrumbService.popBreadcrumbs(this.breadcrumbService.getBreadcrumbList().length);
2355
+ }
2356
+ this.breadcrumbsToPersist.forEach((item) => {
2357
+ this.breadcrumbService.updateBreadcrumbs(item.name, item.path, true);
2358
+ });
2359
+ }
2360
+ let hasBreadcrumbObjectIndex = -1;
2361
+ if (this.breadcrumbService.getBreadcrumbList()) {
2362
+ hasBreadcrumbObjectIndex = breadcrumbArr.findIndex((n) => n.path.includes("orders"));
2363
+ if (hasBreadcrumbObjectIndex !== -1) {
2364
+ this.breadcrumbService.popBreadcrumbs(breadcrumbArr.length - hasBreadcrumbObjectIndex);
2365
+ }
2366
+ }
2367
+ this.breadcrumbService.updateBreadcrumbs(name, path, true);
2368
+ }
2369
+ else {
2370
+ this.breadcrumbService.isBreadcrumbClicked = false;
2371
+ }
2372
+ }
2373
+ initFiltersFromRoute() {
2374
+ this.annaFilterService.appliedFiltersArray = this.filtersFromRoute.appliedFilters
2375
+ ? this.filtersFromRoute.appliedFilters
2376
+ : [];
2377
+ this.annaFilterService.tooltipSelectedMap = this.filtersFromRoute.selectedFilterData
2378
+ ? new Map(JSON.parse(this.filtersFromRoute.selectedFilterData))
2379
+ : new Map();
2380
+ if (this.annaFilterService.tooltipSelectedMap.has("flightStartDate")) {
2381
+ const selectedDateObj = {};
2382
+ const startDate = this.annaFilterService.tooltipSelectedMap.get("flightStartDate");
2383
+ selectedDateObj.fromDate = dayjs(startDate.fromDate);
2384
+ selectedDateObj.toDate = dayjs(startDate.toDate);
2385
+ this.annaFilterService.tooltipSelectedMap.set("flightStartDate", selectedDateObj);
2386
+ }
2387
+ if (this.annaFilterService.tooltipSelectedMap.has("flightEndDate")) {
2388
+ const selectedDateObj = {};
2389
+ const endDate = this.annaFilterService.tooltipSelectedMap.get("flightEndDate");
2390
+ selectedDateObj.fromDate = dayjs(endDate.fromDate);
2391
+ selectedDateObj.toDate = dayjs(endDate.toDate);
2392
+ this.annaFilterService.tooltipSelectedMap.set("flightEndDate", selectedDateObj);
2393
+ }
2394
+ if (this.annaFilterService.tooltipSelectedMap.has("timeoutDate")) {
2395
+ const selectedDateObj = {};
2396
+ const date = this.annaFilterService.tooltipSelectedMap.get("timeoutDate");
2397
+ selectedDateObj.fromDate = dayjs(date.fromDate);
2398
+ selectedDateObj.toDate = dayjs(date.toDate);
2399
+ this.annaFilterService.tooltipSelectedMap.set("timeoutDate", selectedDateObj);
2400
+ }
2401
+ if (this.annaFilterService.tooltipSelectedMap.has("revisionStartDate")) {
2402
+ const selectedDateObj = {};
2403
+ const startDate = this.annaFilterService.tooltipSelectedMap.get("revisionStartDate");
2404
+ selectedDateObj.fromDate = dayjs(startDate.fromDate);
2405
+ selectedDateObj.toDate = dayjs(startDate.toDate);
2406
+ this.annaFilterService.tooltipSelectedMap.set("revisionStartDate", selectedDateObj);
2407
+ }
2408
+ }
2409
+ initFilters() {
2410
+ this.annaFilterService.tooltipSelectedMap = new Map();
2411
+ this.annaFilterService.selectedRadio = null;
2412
+ this.annaFilterService.appliedFiltersArray = [];
2413
+ }
2414
+ setGtGeneralConfig() {
2415
+ this.gtGeneralConfig.totalRow = true;
2416
+ this.gtGeneralConfig.component = "DRRLISTING";
2417
+ this.gtGeneralConfig.tableContainerName = "drr-order-listing-table-container";
2418
+ this.gtGeneralConfig.verticalScrollOffsetForFilterTooltip = 200;
2419
+ }
2420
+ setTableHeight(showLoader = false) {
2421
+ let dataOnTopHeight = 278;
2422
+ if (!showLoader) {
2423
+ if (this.currentTab === OrdersConstant.OffersAwaitingApproval) {
2424
+ dataOnTopHeight = 236;
2425
+ }
2426
+ else if (this.currentTab === OrdersConstant.TodaysANNAOffers) {
2427
+ dataOnTopHeight = window.innerWidth < 1396 ? 278 : 250;
2428
+ }
2429
+ else {
2430
+ dataOnTopHeight = window.innerHeight < 769 ? 254 : 248;
2431
+ }
2432
+ }
2433
+ else {
2434
+ // eslint-disable-next-line no-lonely-if
2435
+ if (this.currentTab === OrdersConstant.OffersAwaitingApproval) {
2436
+ dataOnTopHeight = 243;
2437
+ }
2438
+ else if (this.currentTab === OrdersConstant.TodaysANNAOffers) {
2439
+ dataOnTopHeight = window.innerHeight < 769 ? 243 : 244;
2440
+ }
2441
+ else {
2442
+ dataOnTopHeight = window.innerHeight < 769 ? 270 : 270;
2443
+ }
2444
+ }
2445
+ this.gtDimension = { ...this.gtDimension, dataOnTopHeight };
2446
+ }
2447
+ clearFilters() {
2448
+ this.nonEditableGTComponent?.setScrollToInitialPosition();
2449
+ this.annaFilterService.tooltipSelectedMap = new Map();
2450
+ this.annaFilterService.selectedRadio = null;
2451
+ this.annaFilterService.appliedFiltersArray = [];
2452
+ this.annaSortService.columnSortState = new Map();
2453
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.dailyRevisionDataCloned);
2454
+ this.dailyRevisionData = cloneDeep(this.dailyRevisionDataCloned);
2455
+ this.createTotalRow();
2456
+ this.dailyRevisionService.filtersAppliedRouteChange = true;
2457
+ this.disableResetAllButton = true;
2458
+ let route;
2459
+ if (this.currentTab === OrdersConstant.TodaysANNAOffers) {
2460
+ route = "todays-anna-offers";
2461
+ }
2462
+ else if (this.currentTab === OrdersConstant.OffersAwaitingApproval) {
2463
+ // this.dailyRevisionService.latestOngoingRevisionsTabFilters = null;
2464
+ route = "offers-awaiting-approval";
2465
+ }
2466
+ else {
2467
+ // this.dailyRevisionService.latestCompletedRevisionsTabFilters = null;
2468
+ route = "todays-user-offers";
2469
+ }
2470
+ this.modifyQueryParam("filters", "DELETE");
2471
+ const latestFilter = this.getLatestFilters();
2472
+ if (latestFilter) {
2473
+ this.router.navigate([`orders/${route}`], {
2474
+ queryParams: latestFilter,
2475
+ });
2476
+ }
2477
+ else {
2478
+ this.router.navigate([`orders/${route}`]);
2479
+ }
2480
+ this.setTableHeight();
2481
+ this.annaFilterService.updateStateOfAllTheKeys(this.annaSortService.columnSortState);
2482
+ }
2483
+ orderSelected(order) {
2484
+ if (order) {
2485
+ this.dailyRevisionService.filtersAppliedRouteChange = false;
2486
+ this.genericDailyRevisionService.orderInfo = order;
2487
+ this.genericDailyRevisionService.selectedStationId = this.selectedPopupFilters.station.id;
2488
+ this.selectedOgName = this.selectedPopupFilters.station.text;
2489
+ this.genericDailyRevisionService.selectedOgId = +this.selectedPopupFilters.station.id;
2490
+ this.updateBreadcrumbs();
2491
+ let navigateTo;
2492
+ if (this.currentTab === OrdersConstant.TodaysANNAOffers) {
2493
+ this.dailyRevisionService.ongoingOrdersList = cloneDeep(this.dailyRevisionData);
2494
+ navigateTo = "todays-anna-offers/";
2495
+ }
2496
+ else if (this.currentTab === OrdersConstant.OffersAwaitingApproval) {
2497
+ this.dailyRevisionService.ongoingOrdersList = cloneDeep(this.dailyRevisionData);
2498
+ navigateTo = "offers-awaiting-approval/";
2499
+ }
2500
+ else {
2501
+ this.dailyRevisionService.completedOrdersList = cloneDeep(this.dailyRevisionData);
2502
+ navigateTo = "todays-user-offers/";
2503
+ }
2504
+ this.breadcrumbService.isBreadcrumbClicked = false;
2505
+ this.genericDailyRevisionService.spotsApprovalFiltersAppliedRouteChange = false;
2506
+ this.router.navigate([`orders/${navigateTo}${this.genericDailyRevisionService.orderInfo.orderId}`], {
2507
+ queryParams: {
2508
+ ogId: this.genericDailyRevisionService.selectedOgId,
2509
+ orderId: this.genericDailyRevisionService.orderInfo.orderId,
2510
+ stationId: this.userType === "SELLER" ? this.selectedPopupFilters.station.id : order.stationId,
2511
+ ogName: this.selectedOgName,
2512
+ revNumber: this.genericDailyRevisionService.orderInfo.revisionNo,
2513
+ campaignId: this.genericDailyRevisionService.orderInfo.campaignId,
2514
+ parentListingPage: this.currentTab !== OrdersConstant.TodaysUsersOffers ? "ongoing" : "completed",
2515
+ breadcrumbs: this.persistingFilterService.storeKeyValueInLocalStorage(this.breadcrumbService.getBreadcrumbList(), false),
2516
+ },
2517
+ });
2518
+ }
2519
+ }
2520
+ updateBreadcrumbs() {
2521
+ const name = `Orders (${this.currentTab})`;
2522
+ const path = this.router.url;
2523
+ this.breadcrumbService.popBreadcrumbs(1);
2524
+ this.breadcrumbService.updateBreadcrumbs(name, path, true);
2525
+ }
2526
+ prepareQueryParamForNavigationOnReceivingQueryparamsFromMail(easyFilterName) {
2527
+ const query = {};
2528
+ query.easyFilter = easyFilterName;
2529
+ return query;
2530
+ }
2531
+ starUnstarOrder(emittedData) {
2532
+ const order = emittedData.data;
2533
+ window.event.stopPropagation();
2534
+ const value = order.isStarred;
2535
+ const payload = {
2536
+ marked_as_starred: !value,
2537
+ order_id: order.orderId.toString(),
2538
+ station_id: +this.selectedPopupFilters.station.id,
2539
+ user_id: JSON.parse(localStorage.getItem("userProfileData"))
2540
+ ? +JSON.parse(localStorage.getItem("userProfileData")).userId
2541
+ : null,
2542
+ campaign_id: order.campaignId,
2543
+ };
2544
+ this.starredOrderLoading = true;
2545
+ this.cdRef.detectChanges();
2546
+ this.consumingProjectDRRListingBackendService.starUnstarOrder(payload).subscribe((response) => {
2547
+ const changeStatusTo = !order.isStarred;
2548
+ this.dailyRevisionData.forEach((item) => {
2549
+ if (item.orderId.toString() === order.orderId.toString()) {
2550
+ item.isStarred = changeStatusTo;
2551
+ item.iconClass = item.isStarred ? "mdi mdi-star highlight-star" : "mdi mdi-star-outline";
2552
+ }
2553
+ });
2554
+ this.dailyRevisionDataCloned.forEach((item) => {
2555
+ if (item.orderId.toString() === order.orderId.toString()) {
2556
+ item.isStarred = changeStatusTo;
2557
+ item.iconClass = item.isStarred ? "mdi mdi-star highlight-star" : "mdi mdi-star-outline";
2558
+ }
2559
+ });
2560
+ // const starredOrderIndex: number = this.dailyRevisionData.findIndex((obj: any) => obj.isStarred);
2561
+ this.dailyRevisionData = cloneDeep(this.dailyRevisionData);
2562
+ this.checkStarOrderStatus();
2563
+ this.cdRef.detectChanges();
2564
+ this.showOrHideClearAll();
2565
+ this.starredOrderLoading = false;
2566
+ this.cdRef.detectChanges();
2567
+ }, (error) => {
2568
+ this.toastr.error("Something went wrong! Please try again");
2569
+ });
2570
+ }
2571
+ updateDataForEasyFilters(tableData) {
2572
+ this.dailyRevisionData = [...tableData];
2573
+ }
2574
+ checkStarOrderStatus() {
2575
+ setTimeout(() => {
2576
+ this.easyFilterComponent.updateEasyFiltersAfterUserTookAction(DRRListingEasyFilterConstants.Starred);
2577
+ }, 0);
2578
+ }
2579
+ easyFilterClicked(emittedObj) {
2580
+ this.dailyRevisionData = emittedObj.filteredData;
2581
+ this.nonEditableGTComponent.setScrollToInitialPosition();
2582
+ this.createTotalRow();
2583
+ this.showOrHideClearAll();
2584
+ if (!this.checkIfOnlyDefaultEasyFilterIsApplied() || this.checkIfPopupFilterApplied()) {
2585
+ this.updateNavigationHistory();
2586
+ }
2587
+ else if (this.currentTab === OrdersConstant.TodaysANNAOffers) {
2588
+ this.updateNavigationHistoryAndRemoveFiltersFromUrl();
2589
+ }
2590
+ }
2591
+ checkIfPopupFilterApplied() {
2592
+ const popupPersistedFilter = this.createPopupPersistingFilter();
2593
+ return Object.keys(popupPersistedFilter).length > 0;
2594
+ }
2595
+ filterAppliedToTable(data) {
2596
+ this.dailyRevisionData = cloneDeep(data);
2597
+ this.showOrHideClearAll();
2598
+ this.createTotalRow();
2599
+ this.updateNavigationHistory();
2600
+ }
2601
+ sortingAppliedToTable(data) {
2602
+ this.dailyRevisionData = cloneDeep(data);
2603
+ this.showOrHideClearAll();
2604
+ this.updateNavigationHistory();
2605
+ }
2606
+ setFiltersInService(queryParams) {
2607
+ if (this.currentTab !== OrdersConstant.TodaysUsersOffers) {
2608
+ this.dailyRevisionService.latestOngoingRevisionsTabFilters = queryParams;
2609
+ }
2610
+ else {
2611
+ this.dailyRevisionService.latestCompletedRevisionsTabFilters = queryParams;
2612
+ }
2613
+ }
2614
+ initEasyFilters() {
2615
+ if (this.userType === "BUYER") {
2616
+ this.easyFilters = this.dailyRevisionService.getOffersAwaitingApprovalEasyFiltersForBuyer();
2617
+ }
2618
+ else if (this.currentTab === OrdersConstant.TodaysUsersOffers) {
2619
+ this.easyFilters = this.dailyRevisionService.getTodaysUserOffersEasyFilters();
2620
+ }
2621
+ else {
2622
+ this.easyFilters = this.dailyRevisionService.getTodaysANNAOffersEasyFilters();
2623
+ }
2624
+ }
2625
+ applyDailyRevisionFilters(filter) {
2626
+ const previousFilters = cloneDeep(this.selectedPopupFilters);
2627
+ this.selectedPopupFilters = filter;
2628
+ this.handleNavigation(filter.updateNavigation);
2629
+ if (!this.easyFilters) {
2630
+ this.initializeDrrPageData();
2631
+ }
2632
+ this.getAllOrdersData();
2633
+ if (previousFilters?.station?.id !== this.selectedPopupFilters?.station?.id) {
2634
+ this.getLastOrderListFetchedDateTime();
2635
+ }
2636
+ }
2637
+ handleNavigation(isFilterManuallyChanged) {
2638
+ if (isFilterManuallyChanged) {
2639
+ this.modifyQueryParam("filters", "DELETE");
2640
+ const popupPersistedFilter = this.createPopupPersistingFilter();
2641
+ if (Object.keys(popupPersistedFilter).length > 0) {
2642
+ this.modifyQueryParam("popupFilter", "ADD", this.persistingFilterService.storeKeyValueInLocalStorage(popupPersistedFilter));
2643
+ }
2644
+ else {
2645
+ this.modifyQueryParam("popupFilter", "DELETE", {});
2646
+ }
2647
+ let latestFilters = this.getLatestFilters();
2648
+ latestFilters = latestFilters || {};
2649
+ if (Object.keys(latestFilters).length > 0) {
2650
+ this.router.navigate([], {
2651
+ relativeTo: this.route,
2652
+ queryParams: latestFilters,
2653
+ });
2654
+ }
2655
+ else {
2656
+ this.router.navigate([]);
2657
+ }
2658
+ }
2659
+ }
2660
+ createPopupPersistingFilter() {
2661
+ const query = {};
2662
+ if (this.allStationsOrOGs?.length > 0 &&
2663
+ this.allStationsOrOGs[0]?.id !== this.selectedPopupFilters.station.id) {
2664
+ query.stationId = this.selectedPopupFilters.station.id;
2665
+ }
2666
+ if (this.selectedPopupFilters.isEquivalised) {
2667
+ query.isEquivalised = this.selectedPopupFilters.isEquivalised;
2668
+ }
2669
+ // if (!isEqual(this.initialFiltersForPopup.normalizedData, this.selectedPopupFilters.normalizedData)) {
2670
+ // query.normalizedData = this.selectedPopupFilters.normalizedData;
2671
+ // }
2672
+ return query;
2673
+ }
2674
+ modifyQueryParam(key, operation, value) {
2675
+ // Fetching latest filters
2676
+ let latestFilter = this.getLatestFilters();
2677
+ latestFilter = latestFilter || {};
2678
+ // Perform Operation on the latestFilter
2679
+ if (operation === "ADD") {
2680
+ latestFilter[key] = value;
2681
+ }
2682
+ else if (operation === "DELETE") {
2683
+ delete latestFilter[key];
2684
+ }
2685
+ this.setLatestFilters(Object.keys(latestFilter).length > 0 ? latestFilter : null);
2686
+ }
2687
+ updateLatestFilters(queryParams) {
2688
+ const latestFilters = this.getLatestFilters();
2689
+ const updatedQueryParams = Object.keys(queryParams).length === 0 ? null : queryParams;
2690
+ if (!isEqual(updatedQueryParams, latestFilters)) {
2691
+ this.setLatestFilters(cloneDeep(updatedQueryParams));
2692
+ }
2693
+ }
2694
+ getLatestFilters() {
2695
+ if (this.currentTab !== OrdersConstant.TodaysUsersOffers) {
2696
+ return this.dailyRevisionService.latestOngoingRevisionsTabFilters;
2697
+ }
2698
+ else if (this.currentTab === OrdersConstant.TodaysUsersOffers) {
2699
+ return this.dailyRevisionService.latestCompletedRevisionsTabFilters;
2700
+ }
2701
+ return null;
2702
+ }
2703
+ setLatestFilters(queryParams) {
2704
+ if (this.currentTab !== OrdersConstant.TodaysUsersOffers) {
2705
+ this.dailyRevisionService.latestOngoingRevisionsTabFilters = queryParams;
2706
+ }
2707
+ else if (this.currentTab === OrdersConstant.TodaysUsersOffers) {
2708
+ this.dailyRevisionService.latestCompletedRevisionsTabFilters = queryParams;
2709
+ }
2710
+ }
2711
+ updateNavigationHistoryAndRemoveFiltersFromUrl() {
2712
+ this.dailyRevisionService.filtersAppliedRouteChange = true;
2713
+ if ("filters" in this.route.snapshot.queryParams) {
2714
+ this.setLatestFilters({});
2715
+ const path = "orders/todays-anna-offers";
2716
+ this.router.navigate([`${path}`]);
2717
+ }
2718
+ }
2719
+ updateNavigationHistory(replaceUrl = false) {
2720
+ this.dailyRevisionService.filtersAppliedRouteChange = true;
2721
+ const queryParams = this.prepareQueryParamOnFilterApplication();
2722
+ let path = "";
2723
+ if (this.currentTab === OrdersConstant.TodaysANNAOffers) {
2724
+ path = "orders/todays-anna-offers";
2725
+ }
2726
+ else if (this.currentTab === OrdersConstant.OffersAwaitingApproval) {
2727
+ path = "orders/offers-awaiting-approval";
2728
+ }
2729
+ else {
2730
+ path = "orders/todays-user-offers";
2731
+ }
2732
+ if (Object.keys(queryParams).length > 0) {
2733
+ this.router.navigate([`${path}`], {
2734
+ queryParams,
2735
+ replaceUrl,
2736
+ });
2737
+ }
2738
+ else {
2739
+ this.router.navigate([`${path}`]);
2740
+ }
2741
+ }
2742
+ prepareQueryParamOnFilterApplication() {
2743
+ const filters = {};
2744
+ // Column level filter
2745
+ const appliedFiltersArray = cloneDeep(this.annaFilterService.appliedFiltersArray);
2746
+ const tooltipSelectedMap = cloneDeep(this.annaFilterService.tooltipSelectedMap);
2747
+ if (appliedFiltersArray.length > 0 || tooltipSelectedMap.size > 0) {
2748
+ filters.appliedFilters = cloneDeep(this.annaFilterService.appliedFiltersArray);
2749
+ filters.selectedFilterData = JSON.stringify(Array.from(this.annaFilterService.tooltipSelectedMap));
2750
+ }
2751
+ // Column level sorting
2752
+ if (this.annaGtService.isSortingAppliedToTable()) {
2753
+ filters.sortState = JSON.stringify(Array.from(this.annaSortService.columnSortState));
2754
+ }
2755
+ let latestFilters = this.getLatestFilters();
2756
+ latestFilters = latestFilters || {};
2757
+ if (latestFilters.stationId) {
2758
+ delete latestFilters.stationId;
2759
+ }
2760
+ if (latestFilters.filterFor) {
2761
+ delete latestFilters.filterFor;
2762
+ }
2763
+ if (Object.keys(filters).length > 0) {
2764
+ const hashedQueryParams = this.persistingFilterService.storeKeyValueInLocalStorage(filters);
2765
+ latestFilters.filters = hashedQueryParams;
2766
+ }
2767
+ else {
2768
+ delete latestFilters.filters;
2769
+ }
2770
+ const popupPersistedFilter = this.createPopupPersistingFilter();
2771
+ if (Object.keys(popupPersistedFilter).length > 0) {
2772
+ const hashedQueryParams = this.persistingFilterService.storeKeyValueInLocalStorage(popupPersistedFilter);
2773
+ latestFilters.popupFilter = hashedQueryParams;
2774
+ }
2775
+ else {
2776
+ delete latestFilters.popupFilter;
2777
+ }
2778
+ this.setLatestFilters(latestFilters);
2779
+ return latestFilters;
2780
+ }
2781
+ ngOnDestroy() {
2782
+ this.dailyRevisionService.filtersAppliedRouteChange = false;
2783
+ this.ngUnsubscribe.next();
2784
+ this.ngUnsubscribe.complete();
2785
+ }
2786
+ updateInitialFilterForPrimaryPopup(filters) {
2787
+ this.initialFiltersForPopup = filters;
2788
+ }
2789
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DailyRevisionListingComponent, deps: [{ token: i4$1.Router }, { token: DailyRevisionService }, { token: i3.GenericDailyRevisionService }, { token: i4.AnnaGlobalConfigService }, { token: i4.AnnaFilterService }, { token: i4.AnnaSortService }, { token: i0.ChangeDetectorRef }, { token: i5.ToastrService }, { token: i4$1.ActivatedRoute }, { token: i6.BreadcrumbsService }, { token: i6.EquivalisationOfDataService }, { token: i4.AnnaGtHelperService }, { token: i4.AnnaPersistingFilterService }, { token: i7.NotificationsService }, { token: DAILY_REVISION_LISTING_SERVICE_TOKEN }], target: i0.ɵɵFactoryTarget.Component }); }
2790
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DailyRevisionListingComponent, isStandalone: true, selector: "anna-feature-daily-revision-listing", inputs: { userType: "userType", showViewSummary: "showViewSummary", queryparams: "queryparams", persistingFilterForPopup: "persistingFilterForPopup", currentTab: "currentTab", tableHeaders: "tableHeaders", allStationsOrOGs: "allStationsOrOGs", stationOrOgDropdownTitleText: "stationOrOgDropdownTitleText", userOrBuyerId: "userOrBuyerId", stationIdsWithValidLicense: "stationIdsWithValidLicense" }, viewQueries: [{ propertyName: "filterPopup", first: true, predicate: ["filterPopup"], descendants: true }, { propertyName: "nonEditableGTComponent", first: true, predicate: AnnaNonEditableGenericTableComponent, descendants: true }, { propertyName: "easyFilterComponent", first: true, predicate: ["easyFilterComponent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"drr-page\">\n <anna-core-no-data-lib\n width=\"50%\"\n *ngIf=\"allStationsOrOGs?.length === 0; else showData\"\n >\n </anna-core-no-data-lib>\n\n <ng-template #showData>\n <div class=\"filter-container\">\n <anna-feature-daily-revision-filter-modal\n #filterPopup\n [filterData]=\"allStationsOrOGs\"\n [showUserFilter]=\"false\"\n [handleNavigation]=\"false\"\n [headerText]=\"'Edit Filter'\"\n [toDisable]=\"loading\"\n [persistingFilter]=\"persistingFilterForPopup\"\n [stationOrOgDropdownTitleText]=\"stationOrOgDropdownTitleText\"\n [stationIdsWithValidLicense]=\"stationIdsWithValidLicense\"\n (getInitialFilter)=\"updateInitialFilterForPrimaryPopup($event)\"\n (applyFilter)=\"applyDailyRevisionFilters($event)\"\n >\n </anna-feature-daily-revision-filter-modal>\n <!-- <ngx-skeleton-loader\n *ngIf=\"!allStationsOrOGs?.length\"\n count=\"1\"\n [theme]=\"{ width: '100px', height: '20px', 'margin-right': '20px', 'margin-bottom': '6px' }\"\n ></ngx-skeleton-loader> -->\n <!-- <div>\n <a\n [ngClass]=\"{ 'disabled-summary-button': !dailyRevisionData || dailyRevisionData?.length === 0 }\"\n *ngIf=\"showViewSummary && !loading\"\n href=\"\"\n target=\"_blank\"\n [routerLink]=\"[drrSummaryUrl]\"\n [queryParams]=\"{\n isEquivalized: payloadForSummaryPage.isEquivalized,\n ordersRevisionType: payloadForSummaryPage.ordersRevisionType,\n isNormalized: payloadForSummaryPage.isNormalized,\n demoId: payloadForSummaryPage.demoId,\n loggedInUserId: payloadForSummaryPage.loggedInUserId,\n stationId: payloadForSummaryPage.stationOrOGId,\n }\"\n class=\"summary-button\"\n >\n View summary\n </a>\n <ngx-skeleton-loader\n *ngIf=\"showViewSummary && loading\"\n count=\"1\"\n [theme]=\"{\n width: '112px',\n height: '30px',\n float: 'right',\n 'margin-left': 'auto',\n 'margin-bottom': '0px',\n 'border-radius': '15px'\n }\"\n ></ngx-skeleton-loader>\n </div> -->\n </div>\n\n <anna-design-message-box\n *ngIf=\"userType === 'BUYER' && !loading && dailyRevisionDataCloned?.length === 0\"\n class=\"daily-order-container\"\n [messageBoxData]=\"noOrdersPresentMessageBoxData\"\n [hide]=\"false\"\n [headerAsBlockElement]=\"false\"\n [showHyphen]=\"false\"\n >\n </anna-design-message-box>\n\n <section *ngIf=\"loading || userType === 'SELLER' || dailyRevisionDataCloned?.length > 0\">\n <div class=\"easy-filter-content\">\n <anna-design-easy-filters\n #easyFilterComponent\n class=\"drr-listing-easy-filters\"\n [showLoader]=\"loading\"\n [numberOfItemsForLoader]=\"numberOfEasyFilterLoader\"\n [easyFilters]=\"easyFilters\"\n [tableData]=\"dailyRevisionData\"\n [defaultFilterNameToBeSelected]=\"defaultFilterNameToBeSelected\"\n [clonedTableData]=\"dailyRevisionDataCloned\"\n (getUpdatedDataAfterUserAction)=\"updateDataForEasyFilters($event)\"\n (easyFilterClickEvent)=\"easyFilterClicked($event)\"\n >\n </anna-design-easy-filters>\n <div\n class=\"drr-clear-all\"\n [ngClass]=\"{\n 'todays-anna-drr-clear-all':\n currentTab === orderConstants.TodaysANNAOffers && dailyRevisionDataCloned?.length > 0\n }\"\n [ngStyle]=\"{\n 'margin-bottom':\n lastOrderListFetchedDateTimeAndTimezone &&\n currentTab === orderConstants.TodaysUsersOffers &&\n dailyRevisionData?.length > 0\n ? '-17px'\n : '0px'\n }\"\n >\n <button\n *ngIf=\"!loading\"\n class=\"drr-clear-all-btn\"\n (click)=\"clearFilters()\"\n [disabled]=\"disableResetAllButton\"\n >\n Reset all filters\n </button>\n <br />\n </div>\n </div>\n\n <ng-container *ngIf=\"currentTab === orderConstants.TodaysUsersOffers\">\n <div\n class=\"revision-info\"\n *ngIf=\"!loading && lastOrderListFetchedDateTimeAndTimezone && dailyRevisionData?.length > 0\"\n >\n {{ revisionDateMessage }}\n <span class=\"bold-text\">{{ lastOrderListFetchedDateTimeAndTimezone }}</span>\n </div>\n\n <ngx-skeleton-loader\n class=\"pl-40\"\n count=\"1\"\n *ngIf=\"loading\"\n [theme]=\"{\n width: '428px',\n height: '12px',\n margin: '0 10px 5px 0px'\n }\"\n ></ngx-skeleton-loader\n ></ng-container>\n\n <div class=\"margin-container\">\n <anna-core-non-editable-generic-table-lib\n #revisionListingGenericTable\n class=\"revision-listing-table {{ gtElementClass }}\"\n [ngClass]=\"{\n 'drr-no-data-table': !loading && dailyRevisionData && dailyRevisionData?.length === 0,\n 'drr-no-cloned-data-table': !loading && dailyRevisionDataCloned && dailyRevisionDataCloned?.length === 0,\n 'loading-table': loading\n }\"\n [showSkeletonLoading]=\"loading\"\n [tableHeaders]=\"tableHeaders\"\n [tableData]=\"dailyRevisionData\"\n [tableClass]=\"'drr-order-listing-table '\"\n [clonedTableData]=\"dailyRevisionDataCloned\"\n [gtGeneralConfig]=\"gtGeneralConfig\"\n [totalRowInfo]=\"totalRowInfo\"\n [gtDimension]=\"gtDimension\"\n [clickableRow]=\"true\"\n [showOrHideToggleForTotalRow]=\"true\"\n (filterAppliedToTable)=\"filterAppliedToTable($event)\"\n (sortingAppliedToTable)=\"sortingAppliedToTable($event)\"\n (gtIconClicked)=\"starUnstarOrder($event)\"\n (rowClicked)=\"orderSelected($event)\"\n [starredInProgress]=\"starredOrderLoading\"\n [tableBorderBottomClassRequired]=\"false\"\n >\n </anna-core-non-editable-generic-table-lib>\n </div>\n </section>\n </ng-template>\n</div>\n", styles: [".filter-label{font-family:Roboto;font-size:var(--easy-filter-label-fs);font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4a4a4a;margin-bottom:0;height:12px}.filter-divider{width:.5px;margin-right:8px;height:20px;background:#111}::ng-deep .daily-order-container{max-width:2050px}::ng-deep .daily-order-container section{margin:12px 40px}.pl-40{padding-left:40px}.filter-container{padding:0 40px;display:flex;width:100%;max-width:2050px;margin:0 auto;align-items:flex-end}.filter-container div:nth-child(1){min-width:8.75rem}.filter-container anna-feature-daily-revision-filter-modal{flex-grow:1}.summary-button{float:right;width:max-content;margin-left:20px;font-style:normal;padding:3px 10px;color:#268bff;background:#268bff29;font-size:14px;height:24px!important;line-height:20px;border-radius:15px;font-weight:500;text-decoration:none;font-size:var(--page-link-fs)}.disabled-summary-button{pointer-events:none;opacity:.5;color:#4a4a4a!important;background:#bdbdbd!important}.bold-text{font-weight:700;color:#000}.drr-clear-all{display:flex;align-items:flex-end;float:right;margin-left:auto;min-width:max-content;margin-bottom:-3px}.drr-clear-all span{float:right;padding-right:.375rem}.margin-container{padding-right:40px}::ng-deep button.intelli-filter.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important}::ng-deep button.intelli-filter.active:disabled i.anna-automation-activated-icon.mdi.mdi-cog-refresh{color:#8bac2a}.red-text{color:#f44336;opacity:1}.drr-clear-all-btn{padding:0;border:none;display:block;text-align:right;margin-left:auto;width:fit-content;background-color:transparent;text-decoration:underline;color:#268bff;line-height:1!important;font-size:var(--reset-all-filter-fs)!important;letter-spacing:normal!important;font-weight:400!important}.drr-clear-all-btn:hover:enabled{color:#268bff}.drr-clear-all-btn:disabled{color:#4a4a4a;opacity:.5;cursor:not-allowed}::ng-deep .tooltip-inner{max-height:24rem!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .tooltip-inner div.dropdown-data-container{max-height:10rem!important;width:100%!important}::ng-deep .tooltip-inner div.filter-container .buttons{margin-bottom:10px}.drr-page{overflow-y:auto;width:100%;max-width:2050px;margin:12px auto auto;overflow:auto!important}.drr-page::-webkit-scrollbar{display:none}.drr-page{-ms-overflow-style:none;scrollbar-width:none}.revision-info{padding-bottom:4px;padding-left:40px;margin:0 8px 0 0!important;min-width:fit-content;line-height:normal;margin:0px 0px .6rem;font-style:italic;font-size:var(--page-message-content-fs);color:#b7b6b6}:host ::ng-deep .revision-listing-table table tbody tr td .mdi-warning{line-height:normal!important}:host ::ng-deep .revision-listing-table table tbody tr td:nth-of-type(1){padding:0 5px 0 10px!important}:host ::ng-deep .revision-listing-table table tbody tr td.mat-column-orderIdAndRevNumber div:first-child{display:flex;align-items:center}:host ::ng-deep .revision-listing-table table tbody tr td.mat-column-orderIdAndRevNumber .mdi-warning{font-size:12px!important;position:relative;top:-1px;padding-left:2px}:host ::ng-deep .revision-listing-table table tbody tr td .mdi.mdi-star-outline,:host ::ng-deep .revision-listing-table table tbody tr td .mdi-star.highlight-star{cursor:pointer!important}::ng-deep .drr-no-data-table .table-container{max-height:124px;overflow-y:hidden!important}::ng-deep .drr-no-data-table table tr td{cursor:default!important}.easy-filter-content{display:flex;align-items:flex-end;padding:0 40px;margin-bottom:8px;margin-top:10px}::ng-deep .drr-listing-easy-filters section{row-gap:4px}.easy-filter{display:flex}::ng-deep .red-text{color:#f44336!important}:host ::ng-deep anna-core-no-data-lib .no-data{margin-top:-90px!important}::ng-deep anna-design-easy-filters .h-21{height:21px}@media screen and (max-width: 1463px){::ng-deep .seller-drr-listing-anna-offers-table:not(.drr-no-cloned-data-table) .table-container{margin-top:-21px}::ng-deep .loading-table .table-container{margin-top:0!important}.todays-anna-drr-clear-all{margin-bottom:21px!important}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AnnaDesignComponentsLibModule }, { kind: "component", type: i6.MessageBoxComponent, selector: "anna-design-message-box", inputs: ["messageBoxData", "showHyphen", "hide", "headerAsBlockElement"] }, { kind: "component", type: i6.EasyFiltersComponent, selector: "anna-design-easy-filters", inputs: ["showLoader", "tableData", "clonedTableData", "autoSelectionOfOnlyEnabledFilter", "showUnsavedChangesPopup", "isUnSavedChangesPresent", "defaultFilterNameToBeSelected", "filterToBeUpdatedManually", "easyFilters", "numberOfItemsForLoader"], outputs: ["easyFilterClickEvent", "easyFilterIsSelected", "getUpdatedDataAfterUserAction"] }, { kind: "component", type: DailyRevisionFilterModalComponent, selector: "anna-feature-daily-revision-filter-modal", inputs: ["filterData", "stationOrOgDropdownTitleText", "error", "showUserFilter", "showDemoNormalization", "persistingFilter", "headerText", "handleNavigation", "toDisable", "stationIdsWithValidLicense"], outputs: ["applyFilter", "getInitialFilter"] }, { kind: "ngmodule", type: NgxSkeletonLoaderModule }, { kind: "component", type: i8.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: AnnaCoreModule }, { kind: "component", type: i4.AnnaNoDataComponent, selector: "anna-core-no-data-lib", inputs: ["width", "marginTop"] }, { kind: "component", type: i4.AnnaNonEditableGenericTableComponent, selector: "anna-core-non-editable-generic-table-lib", inputs: ["showSkeletonLoading", "tableHeaders", "tableData", "clonedTableData", "gtGeneralConfig", "totalRowInfo", "gtDimension", "extraHeaderRowForAdjustingColumnWidths", "tableClass", "maximumRowsWhichCanBeRenderedWithoutScroll", "fixNumberOfRowsForPopup", "fixRowsToRender", "includeBorderInTableHeight", "downloadInProgress", "percentDone", "starredInProgress", "clickableRow", "setTableHeightWhenRowSizeIsFixed", "tableBorderBottomClassRequired", "hideSomeTds", "tdsHaveRowSpan", "multipleTablesPresent", "showOrHideToggleForTotalRow", "enableCustomizableColumns", "customizableColumnsList"], outputs: ["toggleCheckbox", "toggleRowCheckbox", "toggleHeaderCheckbox", "undoIconClicked", "filterAppliedToTable", "sortingAppliedToTable", "rowClicked", "radioButtonSelected", "columnFilterOpened", "columnFilterClosed", "gtIconClicked", "gtSVGIconClicked", "gtTextActionClicked", "gtViewDetailClicked", "gtInnerHTMLClicked", "downloadSpotDetails", "clickableDataClicked", "totalRowIconClicked", "notificationIconHover", "notificationIconHoverLeave", "editableInputEdited", "radioButtonMessageIconClicked", "statusNotePopupOpened", "textPopupOpened", "digitOnlyInputChanged", "singleSelectDropdownValueEmit", "timeSelected", "totalRowRadioButtonClicked", "totalRowRadioButtonIconClicked", "columnsCustomized", "acfiRateInputChanged", "acfiRateCopyRequested"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2791
+ }
2792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DailyRevisionListingComponent, decorators: [{
2793
+ type: Component,
2794
+ args: [{ selector: "anna-feature-daily-revision-listing", changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2795
+ NgIf,
2796
+ NgClass,
2797
+ AnnaDesignComponentsLibModule,
2798
+ DailyRevisionFilterModalComponent,
2799
+ NgxSkeletonLoaderModule,
2800
+ RouterLink,
2801
+ NgFor,
2802
+ NgStyle,
2803
+ AnnaCoreModule,
2804
+ ], template: "<div class=\"drr-page\">\n <anna-core-no-data-lib\n width=\"50%\"\n *ngIf=\"allStationsOrOGs?.length === 0; else showData\"\n >\n </anna-core-no-data-lib>\n\n <ng-template #showData>\n <div class=\"filter-container\">\n <anna-feature-daily-revision-filter-modal\n #filterPopup\n [filterData]=\"allStationsOrOGs\"\n [showUserFilter]=\"false\"\n [handleNavigation]=\"false\"\n [headerText]=\"'Edit Filter'\"\n [toDisable]=\"loading\"\n [persistingFilter]=\"persistingFilterForPopup\"\n [stationOrOgDropdownTitleText]=\"stationOrOgDropdownTitleText\"\n [stationIdsWithValidLicense]=\"stationIdsWithValidLicense\"\n (getInitialFilter)=\"updateInitialFilterForPrimaryPopup($event)\"\n (applyFilter)=\"applyDailyRevisionFilters($event)\"\n >\n </anna-feature-daily-revision-filter-modal>\n <!-- <ngx-skeleton-loader\n *ngIf=\"!allStationsOrOGs?.length\"\n count=\"1\"\n [theme]=\"{ width: '100px', height: '20px', 'margin-right': '20px', 'margin-bottom': '6px' }\"\n ></ngx-skeleton-loader> -->\n <!-- <div>\n <a\n [ngClass]=\"{ 'disabled-summary-button': !dailyRevisionData || dailyRevisionData?.length === 0 }\"\n *ngIf=\"showViewSummary && !loading\"\n href=\"\"\n target=\"_blank\"\n [routerLink]=\"[drrSummaryUrl]\"\n [queryParams]=\"{\n isEquivalized: payloadForSummaryPage.isEquivalized,\n ordersRevisionType: payloadForSummaryPage.ordersRevisionType,\n isNormalized: payloadForSummaryPage.isNormalized,\n demoId: payloadForSummaryPage.demoId,\n loggedInUserId: payloadForSummaryPage.loggedInUserId,\n stationId: payloadForSummaryPage.stationOrOGId,\n }\"\n class=\"summary-button\"\n >\n View summary\n </a>\n <ngx-skeleton-loader\n *ngIf=\"showViewSummary && loading\"\n count=\"1\"\n [theme]=\"{\n width: '112px',\n height: '30px',\n float: 'right',\n 'margin-left': 'auto',\n 'margin-bottom': '0px',\n 'border-radius': '15px'\n }\"\n ></ngx-skeleton-loader>\n </div> -->\n </div>\n\n <anna-design-message-box\n *ngIf=\"userType === 'BUYER' && !loading && dailyRevisionDataCloned?.length === 0\"\n class=\"daily-order-container\"\n [messageBoxData]=\"noOrdersPresentMessageBoxData\"\n [hide]=\"false\"\n [headerAsBlockElement]=\"false\"\n [showHyphen]=\"false\"\n >\n </anna-design-message-box>\n\n <section *ngIf=\"loading || userType === 'SELLER' || dailyRevisionDataCloned?.length > 0\">\n <div class=\"easy-filter-content\">\n <anna-design-easy-filters\n #easyFilterComponent\n class=\"drr-listing-easy-filters\"\n [showLoader]=\"loading\"\n [numberOfItemsForLoader]=\"numberOfEasyFilterLoader\"\n [easyFilters]=\"easyFilters\"\n [tableData]=\"dailyRevisionData\"\n [defaultFilterNameToBeSelected]=\"defaultFilterNameToBeSelected\"\n [clonedTableData]=\"dailyRevisionDataCloned\"\n (getUpdatedDataAfterUserAction)=\"updateDataForEasyFilters($event)\"\n (easyFilterClickEvent)=\"easyFilterClicked($event)\"\n >\n </anna-design-easy-filters>\n <div\n class=\"drr-clear-all\"\n [ngClass]=\"{\n 'todays-anna-drr-clear-all':\n currentTab === orderConstants.TodaysANNAOffers && dailyRevisionDataCloned?.length > 0\n }\"\n [ngStyle]=\"{\n 'margin-bottom':\n lastOrderListFetchedDateTimeAndTimezone &&\n currentTab === orderConstants.TodaysUsersOffers &&\n dailyRevisionData?.length > 0\n ? '-17px'\n : '0px'\n }\"\n >\n <button\n *ngIf=\"!loading\"\n class=\"drr-clear-all-btn\"\n (click)=\"clearFilters()\"\n [disabled]=\"disableResetAllButton\"\n >\n Reset all filters\n </button>\n <br />\n </div>\n </div>\n\n <ng-container *ngIf=\"currentTab === orderConstants.TodaysUsersOffers\">\n <div\n class=\"revision-info\"\n *ngIf=\"!loading && lastOrderListFetchedDateTimeAndTimezone && dailyRevisionData?.length > 0\"\n >\n {{ revisionDateMessage }}\n <span class=\"bold-text\">{{ lastOrderListFetchedDateTimeAndTimezone }}</span>\n </div>\n\n <ngx-skeleton-loader\n class=\"pl-40\"\n count=\"1\"\n *ngIf=\"loading\"\n [theme]=\"{\n width: '428px',\n height: '12px',\n margin: '0 10px 5px 0px'\n }\"\n ></ngx-skeleton-loader\n ></ng-container>\n\n <div class=\"margin-container\">\n <anna-core-non-editable-generic-table-lib\n #revisionListingGenericTable\n class=\"revision-listing-table {{ gtElementClass }}\"\n [ngClass]=\"{\n 'drr-no-data-table': !loading && dailyRevisionData && dailyRevisionData?.length === 0,\n 'drr-no-cloned-data-table': !loading && dailyRevisionDataCloned && dailyRevisionDataCloned?.length === 0,\n 'loading-table': loading\n }\"\n [showSkeletonLoading]=\"loading\"\n [tableHeaders]=\"tableHeaders\"\n [tableData]=\"dailyRevisionData\"\n [tableClass]=\"'drr-order-listing-table '\"\n [clonedTableData]=\"dailyRevisionDataCloned\"\n [gtGeneralConfig]=\"gtGeneralConfig\"\n [totalRowInfo]=\"totalRowInfo\"\n [gtDimension]=\"gtDimension\"\n [clickableRow]=\"true\"\n [showOrHideToggleForTotalRow]=\"true\"\n (filterAppliedToTable)=\"filterAppliedToTable($event)\"\n (sortingAppliedToTable)=\"sortingAppliedToTable($event)\"\n (gtIconClicked)=\"starUnstarOrder($event)\"\n (rowClicked)=\"orderSelected($event)\"\n [starredInProgress]=\"starredOrderLoading\"\n [tableBorderBottomClassRequired]=\"false\"\n >\n </anna-core-non-editable-generic-table-lib>\n </div>\n </section>\n </ng-template>\n</div>\n", styles: [".filter-label{font-family:Roboto;font-size:var(--easy-filter-label-fs);font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4a4a4a;margin-bottom:0;height:12px}.filter-divider{width:.5px;margin-right:8px;height:20px;background:#111}::ng-deep .daily-order-container{max-width:2050px}::ng-deep .daily-order-container section{margin:12px 40px}.pl-40{padding-left:40px}.filter-container{padding:0 40px;display:flex;width:100%;max-width:2050px;margin:0 auto;align-items:flex-end}.filter-container div:nth-child(1){min-width:8.75rem}.filter-container anna-feature-daily-revision-filter-modal{flex-grow:1}.summary-button{float:right;width:max-content;margin-left:20px;font-style:normal;padding:3px 10px;color:#268bff;background:#268bff29;font-size:14px;height:24px!important;line-height:20px;border-radius:15px;font-weight:500;text-decoration:none;font-size:var(--page-link-fs)}.disabled-summary-button{pointer-events:none;opacity:.5;color:#4a4a4a!important;background:#bdbdbd!important}.bold-text{font-weight:700;color:#000}.drr-clear-all{display:flex;align-items:flex-end;float:right;margin-left:auto;min-width:max-content;margin-bottom:-3px}.drr-clear-all span{float:right;padding-right:.375rem}.margin-container{padding-right:40px}::ng-deep button.intelli-filter.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important}::ng-deep button.intelli-filter.active:disabled i.anna-automation-activated-icon.mdi.mdi-cog-refresh{color:#8bac2a}.red-text{color:#f44336;opacity:1}.drr-clear-all-btn{padding:0;border:none;display:block;text-align:right;margin-left:auto;width:fit-content;background-color:transparent;text-decoration:underline;color:#268bff;line-height:1!important;font-size:var(--reset-all-filter-fs)!important;letter-spacing:normal!important;font-weight:400!important}.drr-clear-all-btn:hover:enabled{color:#268bff}.drr-clear-all-btn:disabled{color:#4a4a4a;opacity:.5;cursor:not-allowed}::ng-deep .tooltip-inner{max-height:24rem!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .tooltip-inner div.dropdown-data-container{max-height:10rem!important;width:100%!important}::ng-deep .tooltip-inner div.filter-container .buttons{margin-bottom:10px}.drr-page{overflow-y:auto;width:100%;max-width:2050px;margin:12px auto auto;overflow:auto!important}.drr-page::-webkit-scrollbar{display:none}.drr-page{-ms-overflow-style:none;scrollbar-width:none}.revision-info{padding-bottom:4px;padding-left:40px;margin:0 8px 0 0!important;min-width:fit-content;line-height:normal;margin:0px 0px .6rem;font-style:italic;font-size:var(--page-message-content-fs);color:#b7b6b6}:host ::ng-deep .revision-listing-table table tbody tr td .mdi-warning{line-height:normal!important}:host ::ng-deep .revision-listing-table table tbody tr td:nth-of-type(1){padding:0 5px 0 10px!important}:host ::ng-deep .revision-listing-table table tbody tr td.mat-column-orderIdAndRevNumber div:first-child{display:flex;align-items:center}:host ::ng-deep .revision-listing-table table tbody tr td.mat-column-orderIdAndRevNumber .mdi-warning{font-size:12px!important;position:relative;top:-1px;padding-left:2px}:host ::ng-deep .revision-listing-table table tbody tr td .mdi.mdi-star-outline,:host ::ng-deep .revision-listing-table table tbody tr td .mdi-star.highlight-star{cursor:pointer!important}::ng-deep .drr-no-data-table .table-container{max-height:124px;overflow-y:hidden!important}::ng-deep .drr-no-data-table table tr td{cursor:default!important}.easy-filter-content{display:flex;align-items:flex-end;padding:0 40px;margin-bottom:8px;margin-top:10px}::ng-deep .drr-listing-easy-filters section{row-gap:4px}.easy-filter{display:flex}::ng-deep .red-text{color:#f44336!important}:host ::ng-deep anna-core-no-data-lib .no-data{margin-top:-90px!important}::ng-deep anna-design-easy-filters .h-21{height:21px}@media screen and (max-width: 1463px){::ng-deep .seller-drr-listing-anna-offers-table:not(.drr-no-cloned-data-table) .table-container{margin-top:-21px}::ng-deep .loading-table .table-container{margin-top:0!important}.todays-anna-drr-clear-all{margin-bottom:21px!important}}\n"] }]
2805
+ }], ctorParameters: () => [{ type: i4$1.Router }, { type: DailyRevisionService }, { type: i3.GenericDailyRevisionService }, { type: i4.AnnaGlobalConfigService }, { type: i4.AnnaFilterService }, { type: i4.AnnaSortService }, { type: i0.ChangeDetectorRef }, { type: i5.ToastrService }, { type: i4$1.ActivatedRoute }, { type: i6.BreadcrumbsService }, { type: i6.EquivalisationOfDataService }, { type: i4.AnnaGtHelperService }, { type: i4.AnnaPersistingFilterService }, { type: i7.NotificationsService }, { type: undefined, decorators: [{
2806
+ type: Inject,
2807
+ args: [DAILY_REVISION_LISTING_SERVICE_TOKEN]
2808
+ }] }], propDecorators: { userType: [{
2809
+ type: Input
2810
+ }], showViewSummary: [{
2811
+ type: Input
2812
+ }], queryparams: [{
2813
+ type: Input
2814
+ }], persistingFilterForPopup: [{
2815
+ type: Input
2816
+ }], currentTab: [{
2817
+ type: Input
2818
+ }], tableHeaders: [{
2819
+ type: Input
2820
+ }], allStationsOrOGs: [{
2821
+ type: Input
2822
+ }], stationOrOgDropdownTitleText: [{
2823
+ type: Input
2824
+ }], userOrBuyerId: [{
2825
+ type: Input
2826
+ }], stationIdsWithValidLicense: [{
2827
+ type: Input
2828
+ }], filterPopup: [{
2829
+ type: ViewChild,
2830
+ args: ["filterPopup"]
2831
+ }], nonEditableGTComponent: [{
2832
+ type: ViewChild,
2833
+ args: [AnnaNonEditableGenericTableComponent]
2834
+ }], easyFilterComponent: [{
2835
+ type: ViewChild,
2836
+ args: ["easyFilterComponent"]
2837
+ }] } });
2838
+
2839
+ /**
2840
+ * Generated bundle index. Do not edit.
2841
+ */
2842
+
2843
+ export { Advertisers, ChildAndProxiedUsers, DAILY_REVISION_FILTERS_SERVICE_TOKEN, DAILY_REVISION_LISTING_SERVICE_TOKEN, DRRListingEasyFilterConstants, DRRListingIntelliFilterKeys, DRRListingRevisionTypes, DRRListingTableColumnNameConstants, DailyRevisionFilterModalComponent, DailyRevisionListingComponent, DailyRevisionService, SecondaryFiltersData, TotalRowForDRRCompletedRevisions, TotalRowForDRROngoingRevisions, Users };
2844
+ //# sourceMappingURL=annalib-anna-feature-spots-approval-drr-listing.mjs.map