@annalib/anna-feature-biz-rules 0.0.1

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 (67) hide show
  1. package/README.md +63 -0
  2. package/advertiser-listing/index.d.ts +5 -0
  3. package/advertiser-listing/public-api.d.ts +5 -0
  4. package/advertiser-listing/src/advertiser-filter-modal/advertiser-filter-modal.component.d.ts +91 -0
  5. package/advertiser-listing/src/advertiser-filter-modal/models/advertiser-filter-modal.model.d.ts +13 -0
  6. package/advertiser-listing/src/advertiser-table-listing/advertiser-table-listing.component.d.ts +81 -0
  7. package/advertiser-listing/src/advertiser-table-listing/model/adv-table-listing.model.d.ts +24 -0
  8. package/advertiser-listing/src/advertiser-table-listing/services/adv-table-listing.service.d.ts +6 -0
  9. package/biz-rules-order-listing/index.d.ts +5 -0
  10. package/biz-rules-order-listing/public-api.d.ts +5 -0
  11. package/biz-rules-order-listing/src/biz-rules-order-listing.component.d.ts +139 -0
  12. package/biz-rules-order-listing/src/model/biz-rule-order-listing.constant.d.ts +35 -0
  13. package/biz-rules-order-listing/src/model/biz-rule-order-listing.model.d.ts +107 -0
  14. package/biz-rules-order-listing/src/service/automation-activated-and-pod.token.service.d.ts +24 -0
  15. package/biz-rules-order-listing/src/service/biz-rule-order-listing-backend.service.d.ts +18 -0
  16. package/business-rules/index.d.ts +5 -0
  17. package/business-rules/public-api.d.ts +27 -0
  18. package/business-rules/src/add-buyer-contact/models/add-buyer-contact.model.d.ts +13 -0
  19. package/business-rules/src/add-edit-buyer-contact-popup/add-edit-buyer-contact-popup.component.d.ts +53 -0
  20. package/business-rules/src/add-edit-buyer-contact-popup/services/buyer-contact-token.service.d.ts +6 -0
  21. package/business-rules/src/adu-rules/adu-rules.component.d.ts +88 -0
  22. package/business-rules/src/adu-rules/models/adu-rules.model.d.ts +84 -0
  23. package/business-rules/src/approval-config/approval-config.component.d.ts +49 -0
  24. package/business-rules/src/approval-config/services/approval-config.service.d.ts +10 -0
  25. package/business-rules/src/avatar/avatar.component.d.ts +18 -0
  26. package/business-rules/src/business-rule-page/business-rule-page.component.d.ts +95 -0
  27. package/business-rules/src/business-rule-page/models/business-rule-page.constants.d.ts +70 -0
  28. package/business-rules/src/business-rule-page/models/business-rule.model.d.ts +567 -0
  29. package/business-rules/src/business-rule-page/services/business-rule-common-SI-BI-logic.service.d.ts +19 -0
  30. package/business-rules/src/business-rules-history/business-rules-history.component.d.ts +44 -0
  31. package/business-rules/src/business-rules-history/models/biz-rule-history.model.d.ts +28 -0
  32. package/business-rules/src/business-rules-history-popup/business-rules-history-popup.component.d.ts +60 -0
  33. package/business-rules/src/business-rules-history-popup/models/business-rules-history-popup.model.d.ts +15 -0
  34. package/business-rules/src/buyer-contact-history/buyer-contact-history.component.d.ts +31 -0
  35. package/business-rules/src/buyer-contact-history/models/buyer-contact-history.model.d.ts +16 -0
  36. package/business-rules/src/buyer-contact-section/buyer-rep-contact-section.component.d.ts +43 -0
  37. package/business-rules/src/buyer-contact-section/models/buyer-contact.model.d.ts +52 -0
  38. package/business-rules/src/copy-biz-rules-popup/copy-biz-rules-popup.component.d.ts +91 -0
  39. package/business-rules/src/copy-biz-rules-popup/copy-business-rule-backend-service.token.d.ts +12 -0
  40. package/business-rules/src/copy-biz-rules-popup/models/copy-biz-rules.model.d.ts +47 -0
  41. package/business-rules/src/daypart-grouping-popup/daypart-grouping-popup.component.d.ts +31 -0
  42. package/business-rules/src/daypart-restrictions/daypart-restrictions.component.d.ts +62 -0
  43. package/business-rules/src/daypart-restrictions/pipe/replaceEnd.pipe.d.ts +7 -0
  44. package/business-rules/src/equivalent-and-higher-daypart/equivalent-and-higher-daypart.component.d.ts +39 -0
  45. package/business-rules/src/excluded-or-special-program/excluded-or-special-program.component.d.ts +58 -0
  46. package/business-rules/src/general-rules/general-rules.component.d.ts +105 -0
  47. package/business-rules/src/general-rules/models/general-rules-constant.d.ts +21 -0
  48. package/business-rules/src/inherit-biz-rule-approval-popup/inherit-biz-rule-approval-popup.component.d.ts +66 -0
  49. package/business-rules/src/inherit-biz-rule-approval-popup/models/inherit-biz-rule-approval-popup.model.d.ts +47 -0
  50. package/business-rules/src/inherit-biz-rule-approval-popup/services/inherit-biz-rule-approval-popup.service.d.ts +9 -0
  51. package/business-rules/src/make-good-rules/make-good-rules.component.d.ts +86 -0
  52. package/business-rules/src/make-good-rules/models/make-good-rules.model.d.ts +98 -0
  53. package/business-rules/src/make-good-rules/validators/relaxedValidation.d.ts +2 -0
  54. package/business-rules/src/mass-copy-biz-rules-popup/mass-copy-biz-rules-popup.component.d.ts +59 -0
  55. package/business-rules/src/mass-copy-biz-rules-popup/models/mass-copy-biz-rules.model.d.ts +32 -0
  56. package/fesm2022/annalib-anna-feature-biz-rules-advertiser-listing.mjs +768 -0
  57. package/fesm2022/annalib-anna-feature-biz-rules-advertiser-listing.mjs.map +1 -0
  58. package/fesm2022/annalib-anna-feature-biz-rules-biz-rules-order-listing.mjs +1068 -0
  59. package/fesm2022/annalib-anna-feature-biz-rules-biz-rules-order-listing.mjs.map +1 -0
  60. package/fesm2022/annalib-anna-feature-biz-rules-business-rules.mjs +6987 -0
  61. package/fesm2022/annalib-anna-feature-biz-rules-business-rules.mjs.map +1 -0
  62. package/fesm2022/annalib-anna-feature-biz-rules.mjs +88 -0
  63. package/fesm2022/annalib-anna-feature-biz-rules.mjs.map +1 -0
  64. package/index.d.ts +5 -0
  65. package/lib/anna-feature-biz-rules.module.d.ts +20 -0
  66. package/package.json +45 -0
  67. package/public-api.d.ts +1 -0
@@ -0,0 +1,1068 @@
1
+ import { NgIf, NgClass } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, EventEmitter, Output, ViewChild, Input, Inject, Component } from '@angular/core';
4
+ import * as i1 from '@angular/router';
5
+ import * as i2 from '@annalib/anna-core';
6
+ import { ANNAIconNames, Constants, AnnaCoreModule, AnnaNonEditableGenericTableComponent } from '@annalib/anna-core';
7
+ import * as i5 from '@annalib/anna-design-components-lib';
8
+ import { AnnaDesignComponentsLibModule } from '@annalib/anna-design-components-lib';
9
+ import { UserTypeEnum } from '@annalib/anna-feature-lib';
10
+ import * as i6 from '@annalib/anna-feature-lib/anna-feature-shared-lib';
11
+ import dayjs from 'dayjs';
12
+ import { isEqual, cloneDeep } from 'lodash-es';
13
+ import * as i3 from 'ngx-toastr';
14
+ import * as i4 from 'ngx-ui-loader';
15
+
16
+ class OrderList {
17
+ constructor(orderList, showModificationRequestedIcon, showAutomationCancelIcon) {
18
+ this.orders = [];
19
+ if (orderList) {
20
+ orderList.forEach((order) => {
21
+ this.orders.push(new Orders(order, showModificationRequestedIcon, showAutomationCancelIcon));
22
+ });
23
+ }
24
+ }
25
+ }
26
+ class Orders {
27
+ constructor(data, showModificationRequestedIcon, showAutomationCancelIcon) {
28
+ this.buyerNames = null;
29
+ this.repUserNames = null;
30
+ this.isSelectedForBulkAutomation = false;
31
+ this.stationOrderActionKey = [];
32
+ this.statusActionKey = [];
33
+ this.automationActionKey = [];
34
+ this.stationName = data.StationName;
35
+ this.orderNoRevNo = data.BuyerOrderId;
36
+ this.stationOrderId = data.BuyerOrderId;
37
+ this.alternateOrderId = data.AlternateOrderId ? data.AlternateOrderId : "-";
38
+ this.status = data.BizRuleStatus;
39
+ this.isPaidWithoutAudience = data.IsPaidWithoutAudience;
40
+ this.allowAutomation = data.AllowAutomation;
41
+ this.automationStatus = data.AutomationStatus;
42
+ this.gtClass = data.IsAutomated ? "AUTOMATION_ACTIVATED_ROW" : "UNACTIVATED_ROW";
43
+ this.businessRuleType = data.BusinessRuleType;
44
+ this.identicalToAdvBizRule = data.IdenticalToAdvBizRule;
45
+ this.advertiser = data.AdvertiserName ? data.AdvertiserName : "-";
46
+ this.stationId = data.StationId;
47
+ this.advertiserId = data.AdvertiserId;
48
+ this.campaignId = data.CampaignId;
49
+ this.agency = data.AgencyName ? data.AgencyName : "-";
50
+ this.orderStartDate = data.OrderStartDate;
51
+ this.orderEndDate = data.OrderEndDate;
52
+ this.primaryAe = data.PrimaryAEUserName ? data.PrimaryAEUserName : "-";
53
+ this.orderSource = data.OrderType ? data.OrderType : "-";
54
+ this.isWriteEnabled = data.IsAutomated;
55
+ this.estimateNo = data.EstimateNumber ? data.EstimateNumber : "-";
56
+ this.productCode = data.ProductCategory ? data.ProductCategory : "-";
57
+ this.orderFlightStatus = data.OrderFlightStatus;
58
+ this.approvedBy = data.ApprovedBy ? data.ApprovedBy : "-";
59
+ this.approvedOn = data.ApprovedOn ? data.ApprovedOn : "-";
60
+ this.isAnnaOrderEntry = data.AnnaEnteredRepOrder;
61
+ const date = data.ApprovedOn === "-" ? "-" : data.ApprovedOn.split(" ")[0];
62
+ this.Date = data.ApprovedOn === "-" ? "-" : dayjs(date, "MM/DD/YY").format("MM/DD/YYYY");
63
+ this.displayStatus = STATUS_DICTIONARY[data.BizRuleStatus];
64
+ this.startDate =
65
+ this.orderStartDate === "-" ? null : dayjs(this.orderStartDate, "MM/DD/YY").format("MM/DD/YYYY");
66
+ this.endDate = this.orderEndDate === "-" ? null : dayjs(this.orderEndDate, "MM/DD/YY").format("MM/DD/YYYY");
67
+ this.buyerNames = Orders.convertToCommaSeperatedString(data.BuyerNames);
68
+ this.repUserNames = Orders.convertToCommaSeperatedString(data.RepContactNames);
69
+ this.isAudiencePostingRequired = data?.IsAudiencePostingRequired ? "Yes" : "No";
70
+ // if (showModificationRequestedIcon) {
71
+ // statusAction = {
72
+ // additionalTextAfterLink: this.displayStatus === "Modification Requested" ? this.displayStatus : "",
73
+ // data: this.displayStatus === "Modification Requested" ? "Approved" : this.displayStatus,
74
+ // showLink: true,
75
+ // additionalTextAfterLinkClass: "italic orange-text",
76
+ // disabledLink: true,
77
+ // linkClass: `status-btn ${this.status}`,
78
+ // showTooltip: false,
79
+ // showIcon: this.displayStatus === "Modification Requested",
80
+ // iconClass: "mdi mdi-alert",
81
+ // disabledIcon: true,
82
+ // };
83
+ // } else {
84
+ const statusAction = {
85
+ additionalTextAfterLink: this.displayStatus === "Modification Requested" ? this.displayStatus : "",
86
+ data: this.displayStatus,
87
+ showLink: true,
88
+ additionalTextAfterLinkClass: "italic",
89
+ disabledLink: true,
90
+ linkClass: `status-btn ${this.status}`,
91
+ showTooltip: false,
92
+ };
93
+ // }
94
+ this.isCurrentlyWriteEnabled = this.isWriteEnabled;
95
+ this.statusActionKey.push(statusAction);
96
+ // eslint-disable-next-line max-len
97
+ // this.stationOrderActionKey.push(new ClickableItem(TypeOfActionLinkForGtEnum.STN_ORDER_CLICKED, this.stationOrderId, 'stationOrderNumber', false, null));
98
+ this.stationOrderActionKey.push(new StationOrderNumberTextAction(this.stationOrderId, this.isCurrentlyWriteEnabled));
99
+ const automationTextActions = new AutomationTextAction(data, showAutomationCancelIcon);
100
+ this.automationActionKey = automationTextActions.automationStatus;
101
+ switch (data.AutomationStatus) {
102
+ case "ShowAutomationDate":
103
+ this.automationBottomData = data.AutomatedFrom;
104
+ break;
105
+ case "ShowMarkedForAutomation":
106
+ this.automationBottomData = "Automation";
107
+ break;
108
+ case "ShowMarkedForDisablingAutomation":
109
+ this.automationBottomData = "<span class='grey-text-italics'>Automation disabled</span>";
110
+ break;
111
+ default:
112
+ this.automationBottomData = "";
113
+ }
114
+ }
115
+ static convertToCommaSeperatedString(arrList) {
116
+ let nameList = "";
117
+ if (arrList && arrList.length) {
118
+ nameList = arrList.join(", ");
119
+ }
120
+ else {
121
+ nameList = "-";
122
+ }
123
+ return nameList;
124
+ }
125
+ }
126
+ var BusinessRuleStatusEnum;
127
+ (function (BusinessRuleStatusEnum) {
128
+ BusinessRuleStatusEnum["APPROVED"] = "APPROVED";
129
+ BusinessRuleStatusEnum["AWAITING_APPROVAL"] = "AWAITING_APPROVAL";
130
+ })(BusinessRuleStatusEnum || (BusinessRuleStatusEnum = {}));
131
+ var BusinessRuleTypeEnum;
132
+ (function (BusinessRuleTypeEnum) {
133
+ BusinessRuleTypeEnum["ORDER"] = "ORDER";
134
+ BusinessRuleTypeEnum["ADVERTISER"] = "ADVERTISER";
135
+ })(BusinessRuleTypeEnum || (BusinessRuleTypeEnum = {}));
136
+ var OrderTypeEnum;
137
+ (function (OrderTypeEnum) {
138
+ OrderTypeEnum["INFLIGHT"] = "LIVE";
139
+ OrderTypeEnum["COMPLETED"] = "COMPLETED";
140
+ OrderTypeEnum["UPCOMING"] = "UPCOMING";
141
+ })(OrderTypeEnum || (OrderTypeEnum = {}));
142
+ var TypeOfActionLinkForGtEnum;
143
+ (function (TypeOfActionLinkForGtEnum) {
144
+ TypeOfActionLinkForGtEnum["STN_ORDER_CLICKED"] = "STN_ORDER_CLICKED";
145
+ TypeOfActionLinkForGtEnum["AUTOMATION_CANCEL_ICON_CLICKED"] = "AUTOMATION_CANCEL_ICON_CLICKED";
146
+ TypeOfActionLinkForGtEnum["ACTIVATE_NOW_LINK_CLICKED"] = "ACTIVATE_NOW_LINK_CLICKED";
147
+ TypeOfActionLinkForGtEnum["NONE"] = "NONE";
148
+ })(TypeOfActionLinkForGtEnum || (TypeOfActionLinkForGtEnum = {}));
149
+ const STATUS_DICTIONARY = {
150
+ AWAITING_APPROVAL: "Awaiting Approval",
151
+ // BUYER_APPROVAL_REQUESTED: "Buyer Approval Requested",
152
+ // SELLER_APPROVAL_REQUESTED: "Seller Approval Requested",
153
+ APPROVED: "Approved",
154
+ // MODIFICATION_REQUESTED: "Modification Requested",
155
+ "-": "-",
156
+ };
157
+ class StationOrderNumberTextAction {
158
+ constructor(data, showIcon) {
159
+ this.id = 0;
160
+ this.showIcon = false;
161
+ this.disabledIcon = false;
162
+ this.showTooltip = false;
163
+ this.additionalTextBeforeLink = "";
164
+ this.id = TypeOfActionLinkForGtEnum.STN_ORDER_CLICKED;
165
+ this.data = data;
166
+ this.showLink = true;
167
+ this.iconClass = showIcon ? ANNAIconNames.AutomationActivatedIconName : "";
168
+ this.showIcon = showIcon;
169
+ this.linkClass = "stationOrderNumber";
170
+ }
171
+ }
172
+ class AutomationTextAction {
173
+ constructor(obj, isSellerInterface) {
174
+ this.automationStatus = [];
175
+ const automationData = new TextActionDataForAutomationColumn(obj, isSellerInterface);
176
+ this.automationStatus.push(automationData);
177
+ }
178
+ }
179
+ class TextActionDataForAutomationColumn {
180
+ constructor(obj, isWritePermission) {
181
+ // if (isSellerInterface) {
182
+ // if (obj.IsWriteEnabled) {
183
+ // this.id = TypeOfActionLinkForGtEnum.AUTOMATION_CANCEL_ICON_CLICKED;
184
+ // this.showLink = false;
185
+ // this.showIcon = obj.OrderFlightStatus !== OrderTypeEnum.COMPLETED;
186
+ // this.disabledLink = false;
187
+ // this.typeOfData = "STRING";
188
+ // this.iconClass =
189
+ // obj.OrderFlightStatus !== OrderTypeEnum.COMPLETED ? "mdi mdi-close-circle-outline" : "";
190
+ // this.data = obj.WriteEnabledFrom ? ` Active from ${obj.WriteEnabledFrom} ` : " Upcoming ";
191
+ // } else if (
192
+ // (obj.BizRuleStatus === BusinessRuleStatusEnum.APPROVED ||
193
+ // obj.BizRuleStatus === BusinessRuleStatusEnum.MODIFICATION_REQUESTED) &&
194
+ // obj.OrderFlightStatus !== OrderTypeEnum.COMPLETED
195
+ // ) {
196
+ // this.id = TypeOfActionLinkForGtEnum.ACTIVATE_NOW_LINK_CLICKED;
197
+ // this.data = " Activate now ";
198
+ // this.showLink = true;
199
+ // this.showTooltip = false;
200
+ // this.showIcon = false;
201
+ // this.disabledLink = false;
202
+ // this.typeOfData = "ICON_TEXT_ACTION";
203
+ // } else {
204
+ // this.id = TypeOfActionLinkForGtEnum.NONE;
205
+ // this.data = " - ";
206
+ // this.showLink = false;
207
+ // this.showTooltip = false;
208
+ // this.showIcon = false;
209
+ // this.disabledLink = false;
210
+ // this.typeOfData = "STRING";
211
+ // }
212
+ // } else {
213
+ // this.id = TypeOfActionLinkForGtEnum.NONE;
214
+ // if (obj.IsWriteEnabled) {
215
+ // this.data = obj.WriteEnabledFrom ? ` Active from ${obj.WriteEnabledFrom} ` : " Upcoming ";
216
+ // this.showLink = false;
217
+ // this.showIcon = false;
218
+ // this.disabledLink = false;
219
+ // this.typeOfData = "STRING";
220
+ // } else {
221
+ // this.data = " - ";
222
+ // this.showLink = false;
223
+ // this.showTooltip = false;
224
+ // this.showIcon = false;
225
+ // this.disabledLink = false;
226
+ // this.typeOfData = "STRING";
227
+ // }
228
+ // }
229
+ this.showIcon = false;
230
+ this.disabledIcon = false;
231
+ this.showLink = false;
232
+ this.disabledLink = false;
233
+ this.showTooltip = false;
234
+ this.disableTooltip = false;
235
+ this.enableTooltipForAdditionalText = false;
236
+ this.tooltipData = [];
237
+ if (obj.AllowAutomation) {
238
+ this.id = TypeOfActionLinkForGtEnum.ACTIVATE_NOW_LINK_CLICKED;
239
+ this.data = isWritePermission ? " Automate Now " : "-";
240
+ this.showLink = isWritePermission;
241
+ this.showTooltip = false;
242
+ this.disabledLink = false;
243
+ this.typeOfData = "ICON_TEXT_ACTION";
244
+ }
245
+ if (obj.AllowDisablingAutomation && isWritePermission) {
246
+ this.id = TypeOfActionLinkForGtEnum.AUTOMATION_CANCEL_ICON_CLICKED;
247
+ this.showIcon = true;
248
+ this.typeOfData = "STRING";
249
+ this.iconClass = "mdi mdi-close-circle-outline";
250
+ }
251
+ // eslint-disable-next-line default-case
252
+ switch (obj.AutomationStatus) {
253
+ case "ShowAutomationDate":
254
+ this.data = ` Automated from`;
255
+ this.typeOfData = "STRING";
256
+ break;
257
+ case "ShowMarkedForAutomation":
258
+ this.data = "Marked for";
259
+ this.showLink = false;
260
+ this.showTooltip = false;
261
+ this.disabledLink = false;
262
+ this.typeOfData = "STRING";
263
+ break;
264
+ case "None":
265
+ if (!obj.AllowAutomation) {
266
+ this.id = TypeOfActionLinkForGtEnum.NONE;
267
+ this.data = " - ";
268
+ this.showLink = false;
269
+ this.showTooltip = false;
270
+ this.showIcon = false;
271
+ this.disabledLink = false;
272
+ this.typeOfData = "STRING";
273
+ }
274
+ break;
275
+ }
276
+ }
277
+ }
278
+
279
+ /** Token to inject the acl service */
280
+ const AUTOMATION_ACTIVATED_AND_POD_SERVICE_TOKEN = new InjectionToken("IAutomationActivatedAndPODService token");
281
+
282
+ /** Token to inject the acl service */
283
+ const BIZ_RULE_ORDER_LISTING_SERVICE_TOKEN = new InjectionToken("IBizRuleOrderListingBackendService token");
284
+
285
+ class BizRulesOrderListingComponent {
286
+ constructor(router, annaGtService, route, persistingFilterService, annaFilterService, annaSortService, toastr, ngxService, breadcrumbService, businessRuleCommonSIBILogicService, orderListingService, automationActivatedAndPODService, annaGlobalConfig) {
287
+ this.router = router;
288
+ this.annaGtService = annaGtService;
289
+ this.route = route;
290
+ this.persistingFilterService = persistingFilterService;
291
+ this.annaFilterService = annaFilterService;
292
+ this.annaSortService = annaSortService;
293
+ this.toastr = toastr;
294
+ this.ngxService = ngxService;
295
+ this.breadcrumbService = breadcrumbService;
296
+ this.businessRuleCommonSIBILogicService = businessRuleCommonSIBILogicService;
297
+ this.orderListingService = orderListingService;
298
+ this.automationActivatedAndPODService = automationActivatedAndPODService;
299
+ this.annaGlobalConfig = annaGlobalConfig;
300
+ this.aclPermission = false;
301
+ this.userType = UserTypeEnum.SELLER;
302
+ this.easyFilters = [];
303
+ this.orderListingTableData = [];
304
+ this.orderListingTableDataCloned = [];
305
+ this.orderListingAutomationOrdersCloned = [];
306
+ this.showNoDataToDisplay = false;
307
+ this.stationIdsWithValidLicense = [];
308
+ this.onorderRowClicked = new EventEmitter();
309
+ this.showTableSkeletonLoader = false;
310
+ this.persistingFilterForPopup = null;
311
+ this.performActionOnQueryParamChange = true;
312
+ this.selectedFilters = null;
313
+ this.disableClearAllBtn = true;
314
+ this.editModeForBulkAutomationOfOrders = false;
315
+ this.countOfSelectedOrdersForAutomation = 0;
316
+ this.isTableFiltersApplied = false;
317
+ this.isAllOrderSelected = false;
318
+ this.isAllFilteredOrdersSelected = false;
319
+ this.stayOnPageAndCloseModal = new EventEmitter();
320
+ // this.activateOrderModalConfig();
321
+ // this.onConfirmdisableOrderAutomation();
322
+ }
323
+ ngOnInit() {
324
+ this.tableHeaders = this.orderListingService.getOrderListingHeaders();
325
+ this.initVariables();
326
+ this.getTotalEasyFltersForSkeletonLoader();
327
+ this.detectUrlChanges();
328
+ this.fetchFiltersAndOrdersData();
329
+ this.activateOrderModalConfig();
330
+ this.setBulkAutomationModalConfig();
331
+ this.setDiscardUnsavedChangesConfirmConfig();
332
+ this.disableOrderAutomation();
333
+ }
334
+ detectUrlChanges() {
335
+ this.route.queryParams.subscribe((params) => {
336
+ this.updateLatestFilters(params);
337
+ if (this.performActionOnQueryParamChange) {
338
+ this.setPersistingFilterForPopup(params.popupFilter);
339
+ this.setPersistingVariableForColumnAndEasyFilter(params.filters);
340
+ this.setPersistedBreadcrumbsVariable(params.breadcrumbs);
341
+ }
342
+ this.performActionOnQueryParamChange = true;
343
+ });
344
+ }
345
+ initVariables() {
346
+ this.applyFiltersFromTheUrl = false;
347
+ }
348
+ getTotalEasyFltersForSkeletonLoader() {
349
+ let totalFilterTextCount = 0;
350
+ this.easyFilters.forEach((item) => {
351
+ if (item.filters) {
352
+ totalFilterTextCount += item.filters.length;
353
+ }
354
+ });
355
+ this.easyFilterSkeletonLoaderCount = totalFilterTextCount;
356
+ }
357
+ updateLatestFilters(queryParams) {
358
+ const latestFilters = this.getLatestFilters();
359
+ const updatedQueryParams = Object.keys(queryParams).length === 0 ? null : queryParams;
360
+ if (!isEqual(updatedQueryParams, latestFilters)) {
361
+ this.setLatestFilters(cloneDeep(updatedQueryParams));
362
+ }
363
+ }
364
+ setPersistingFilterForPopup(filter) {
365
+ this.persistingFilterForPopup =
366
+ filter && this.persistingFilterService.getActualQueryParams(filter)
367
+ ? JSON.parse(this.persistingFilterService.getActualQueryParams(filter))
368
+ : this.persistingFilterForPopup;
369
+ const popupFilter = filter && this.persistingFilterService.getActualQueryParams(filter)
370
+ ? JSON.parse(this.persistingFilterService.getActualQueryParams(filter))
371
+ : null;
372
+ this.businessRuleCommonSIBILogicService.popupfiltersFromTheUrlForOrderBizTab = popupFilter;
373
+ }
374
+ getLatestFilters() {
375
+ return this.orderListingService.latestOrderTabFilters;
376
+ }
377
+ setLatestFilters(queryParams) {
378
+ this.orderListingService.latestOrderTabFilters = queryParams;
379
+ }
380
+ updateInitialStationOrOGFilter(filters) {
381
+ this.initialStationAndPeriodFilter = filters;
382
+ }
383
+ applyOrderListingPopupFilter(filters) {
384
+ // On clicking apply filters.updateNavigation: true
385
+ if (filters.updateNavigation) {
386
+ const popupFilters = {};
387
+ this.modifyQueryParam("filters", "DELETE");
388
+ if (this.orderListingService.showStation &&
389
+ this.initialStationAndPeriodFilter.stationId !== filters.stationId) {
390
+ popupFilters.stationId = filters.stationId;
391
+ }
392
+ if (this.orderListingService.showOwnershipGroup &&
393
+ this.initialStationAndPeriodFilter.og?.id !== filters.og?.id) {
394
+ popupFilters.og = {};
395
+ popupFilters.og.id = filters.og?.id;
396
+ }
397
+ if (!isEqual(this.initialStationAndPeriodFilter.periodData, filters.periodData)) {
398
+ popupFilters.periodData = filters.periodData;
399
+ }
400
+ if (Object.keys(popupFilters).length > 0) {
401
+ const hashedQueryParams = this.persistingFilterService.storeKeyValueInLocalStorage(popupFilters);
402
+ this.modifyQueryParam("popupFilter", "ADD", hashedQueryParams);
403
+ }
404
+ else {
405
+ this.persistingFilterForPopup = null;
406
+ this.modifyQueryParam("popupFilter", "DELETE", JSON.stringify(popupFilters));
407
+ }
408
+ const latestFilters = this.getLatestFilters();
409
+ this.initFiltersForTable();
410
+ this.resetSorting();
411
+ // this.unActiveAllIntelliFilters();
412
+ // this.easyFilters = [...this.easyFilters];
413
+ this.annaFilterService.updateStateOfAllTheKeys(new Map());
414
+ this.applyFiltersFromTheUrl = false;
415
+ if (latestFilters) {
416
+ this.router.navigate([], {
417
+ relativeTo: this.route,
418
+ queryParams: latestFilters,
419
+ });
420
+ }
421
+ else {
422
+ this.router.navigate([], {
423
+ relativeTo: this.route,
424
+ });
425
+ }
426
+ }
427
+ this.selectedFilters = filters;
428
+ // if (this.consumingProjectOrderService.isSandboxModeFeaturePresent) {
429
+ // // uncomment for SI
430
+ // eslint-disable-next-line max-len
431
+ // let isStationInSandboxMode = this.consumingProjectLoginService.isStationInSandboxMode(this.selectedFilters.stationId, (station: any, value: any) => station.StationId == value);
432
+ // this.removeWriteEnabledEasyFilter(isStationInSandboxMode);
433
+ // }
434
+ // else {
435
+ // this.removeWriteEnabledEasyFilter(false);
436
+ // }
437
+ this.fetchOrders();
438
+ }
439
+ initFiltersForTable() {
440
+ this.annaFilterService.tooltipSelectedMap = new Map();
441
+ this.annaFilterService.selectedRadio = null;
442
+ this.annaFilterService.appliedFiltersArray = [];
443
+ this.annaSortService.noSortingAppliedData = [];
444
+ }
445
+ resetSorting() {
446
+ this.annaSortService.columnSortState = new Map();
447
+ }
448
+ modifyQueryParam(key, operation, value) {
449
+ // Fetching latest filters
450
+ let latestFilter = this.getLatestFilters();
451
+ latestFilter = latestFilter || {};
452
+ // Perform Operation on the latestFilter
453
+ if (operation === "ADD") {
454
+ latestFilter[key] = value;
455
+ }
456
+ else if (operation === "DELETE") {
457
+ delete latestFilter[key];
458
+ }
459
+ this.setLatestFilters(Object.keys(latestFilter).length > 0 ? latestFilter : null);
460
+ }
461
+ fetchOrders() {
462
+ this.showTableSkeletonLoader = true;
463
+ if (this.selectedFilters?.periodData) {
464
+ const params = this.createPayloadToFetchOrders();
465
+ this.orderListingService.getBizRulesOrders(params).subscribe((response) => {
466
+ this.orderListingTableData = new OrderList(response, this.orderListingService.showModificationRequestedIcon, this.orderListingService.showCancelActivationIcon).orders;
467
+ this.orderListingTableDataCloned = cloneDeep(this.orderListingTableData);
468
+ this.orderListingAutomationOrdersCloned = this.orderListingTableDataCloned.filter((order) => order.allowAutomation);
469
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.orderListingTableDataCloned);
470
+ this.showTableSkeletonLoader = false;
471
+ this.handleResponse();
472
+ }, (error) => {
473
+ this.toastr.error("Something went wrong! Please try again", "", {
474
+ toastClass: "Inventory-custom-width ngx-toastr custom-anna-error",
475
+ });
476
+ this.getOrdersApiErrorHandler();
477
+ });
478
+ }
479
+ else {
480
+ this.getOrdersApiErrorHandler();
481
+ }
482
+ }
483
+ getOrdersApiErrorHandler() {
484
+ this.orderListingTableData = [];
485
+ this.orderListingTableDataCloned = [];
486
+ this.showTableSkeletonLoader = false;
487
+ }
488
+ // getBizRulesOrders
489
+ createPayloadToFetchOrders() {
490
+ const payload = this.getLatestPayload();
491
+ return payload;
492
+ }
493
+ getLatestPayload() {
494
+ const payload = {
495
+ StationId: this.selectedFilters.stationId,
496
+ QuarterStartDate: dayjs(this.selectedFilters.periodData.startDate, "MM/DD/YYYY").format("YYYY-MM-DD"),
497
+ QuarterEndDate: dayjs(this.selectedFilters.periodData.endDate, "MM/DD/YYYY").format("YYYY-MM-DD"),
498
+ OgName: this.selectedFilters.og?.id,
499
+ UserId: this.orderListingService.loggedInUserId,
500
+ // "CalendarType": this.selectedFilters.periodData.calendarType.toUpperCase(),
501
+ };
502
+ return payload;
503
+ }
504
+ setPersistingVariableForColumnAndEasyFilter(filter) {
505
+ this.filtersFromRoute =
506
+ filter && this.persistingFilterService.getActualQueryParams(filter)
507
+ ? JSON.parse(this.persistingFilterService.getActualQueryParams(filter))
508
+ : null;
509
+ this.applyFiltersFromTheUrl = !!this.filtersFromRoute;
510
+ this.businessRuleCommonSIBILogicService.filtersFromTheUrlForOrderBizTab = this.filtersFromRoute;
511
+ }
512
+ fetchFiltersAndOrdersData() {
513
+ this.showTableSkeletonLoader = true;
514
+ // this.orderInfo = new orderDetailsInfo();
515
+ // eslint-disable-next-line max-len
516
+ // this.consumingProjectOrderService.loggedInUserId = JSON.parse(localStorage.getItem("userProfileData")).userId;
517
+ this.setBreadcrumbs();
518
+ if (this.applyFiltersFromTheUrl) {
519
+ this.initPersistedFilters();
520
+ }
521
+ else {
522
+ this.initFiltersForTable();
523
+ }
524
+ }
525
+ setBreadcrumbs() {
526
+ // set breadcrumbs only when user does not navigate to this page via breadcrumb click
527
+ if (!this.breadcrumbService.isBreadcrumbClicked) {
528
+ const name = "Business Rules (Order)";
529
+ const path = this.router.url;
530
+ const breadcrumbArr = this.breadcrumbService.getBreadcrumbList();
531
+ if (this.breadcrumbsToPersist &&
532
+ this.breadcrumbsToPersist.length > 0 &&
533
+ !isEqual(this.breadcrumbsToPersist, breadcrumbArr)) {
534
+ if (breadcrumbArr && breadcrumbArr.length > 0) {
535
+ this.breadcrumbService.popBreadcrumbs(breadcrumbArr.length);
536
+ }
537
+ this.breadcrumbsToPersist.forEach((item) => {
538
+ this.breadcrumbService.updateBreadcrumbs(item.name, item.path, true);
539
+ });
540
+ }
541
+ this.breadcrumbService.checkIfAnyRemovableBreadcrumbsExist(false);
542
+ this.breadcrumbService.updateBreadcrumbs(name, path, true);
543
+ }
544
+ else {
545
+ this.breadcrumbService.isBreadcrumbClicked = false;
546
+ }
547
+ }
548
+ initPersistedFilters() {
549
+ this.annaFilterService.tooltipSelectedMap = this.filtersFromRoute?.selectedFilterData
550
+ ? new Map(JSON.parse(this.filtersFromRoute.selectedFilterData))
551
+ : new Map();
552
+ this.annaSortService.columnSortState = this.filtersFromRoute?.sortState
553
+ ? new Map(JSON.parse(this.filtersFromRoute.sortState))
554
+ : new Map();
555
+ this.annaFilterService.selectedRadio = null;
556
+ this.annaFilterService.appliedFiltersArray = this.filtersFromRoute?.appliedFilters
557
+ ? cloneDeep(this.filtersFromRoute.appliedFilters)
558
+ : [];
559
+ if (this.annaFilterService.tooltipSelectedMap.has("startDate")) {
560
+ const selectedDateObj = {};
561
+ const startDate = this.annaFilterService.tooltipSelectedMap.get("startDate");
562
+ selectedDateObj.fromDate = dayjs(startDate.fromDate);
563
+ selectedDateObj.toDate = dayjs(startDate.toDate);
564
+ this.annaFilterService.tooltipSelectedMap.set("startDate", selectedDateObj);
565
+ }
566
+ if (this.annaFilterService.tooltipSelectedMap.has("endDate")) {
567
+ const selectedDateObj = {};
568
+ const endDate = this.annaFilterService.tooltipSelectedMap.get("endDate");
569
+ selectedDateObj.fromDate = dayjs(endDate.fromDate);
570
+ selectedDateObj.toDate = dayjs(endDate.toDate);
571
+ this.annaFilterService.tooltipSelectedMap.set("endDate", selectedDateObj);
572
+ }
573
+ if (this.annaFilterService.tooltipSelectedMap.has("Date")) {
574
+ const selectedDateObj = {};
575
+ const date = this.annaFilterService.tooltipSelectedMap.get("Date");
576
+ selectedDateObj.fromDate = dayjs(date.fromDate);
577
+ selectedDateObj.toDate = dayjs(date.toDate);
578
+ this.annaFilterService.tooltipSelectedMap.set("Date", selectedDateObj);
579
+ }
580
+ }
581
+ filterAppliedToTable(data) {
582
+ this.orderListingTableData = cloneDeep(data);
583
+ if (this.editModeForBulkAutomationOfOrders) {
584
+ this.verifyHeaderCheckboxForFilteredOrders();
585
+ this.verifyHeaderCheckbox();
586
+ }
587
+ this.enableDisableClearAllBtn();
588
+ this.updateNavigationHistory();
589
+ }
590
+ handleResponse() {
591
+ // !! CHANGE 1
592
+ this.annaSortService.columnSortState = this.filtersFromRoute?.sortState
593
+ ? new Map(JSON.parse(this.filtersFromRoute.sortState))
594
+ : new Map();
595
+ this.annaFilterService.updateStateOfAllTheKeys(this.annaSortService.columnSortState);
596
+ if (this.applyFiltersFromTheUrl) {
597
+ this.orderListingTableData = this.annaFilterService.filterData(this.orderListingTableDataCloned, "");
598
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.orderListingTableData);
599
+ this.callSort();
600
+ }
601
+ else {
602
+ this.annaSortService.noSortingAppliedData = !this.editModeForBulkAutomationOfOrders
603
+ ? cloneDeep(this.orderListingTableData)
604
+ : cloneDeep(this.orderListingAutomationOrdersCloned);
605
+ }
606
+ this.enableDisableClearAllBtn();
607
+ }
608
+ intelliFilterClicked(emittedObj) {
609
+ this.nonEditableGTComponent.setScrollToInitialPosition();
610
+ this.orderListingTableData = emittedObj.filteredData;
611
+ this.enableDisableClearAllBtn();
612
+ this.updateNavigationHistory();
613
+ }
614
+ sortingAppliedToTable(data) {
615
+ this.orderListingTableData = cloneDeep(data);
616
+ this.enableDisableClearAllBtn();
617
+ this.updateNavigationHistory();
618
+ }
619
+ updateNavigationHistory() {
620
+ const queryParams = this.prepareQueryParamOnFilterApplication();
621
+ const path = "business-rules/order";
622
+ if (Object.keys(queryParams).length > 0) {
623
+ this.router.navigate([`${path}`], {
624
+ queryParams,
625
+ });
626
+ }
627
+ else {
628
+ this.router.navigate([`${path}`]);
629
+ }
630
+ }
631
+ prepareQueryParamOnFilterApplication() {
632
+ const filters = {};
633
+ // Column level filter
634
+ if (this.annaFilterService.appliedFiltersArray.length > 0) {
635
+ filters.appliedFilters = this.annaFilterService.appliedFiltersArray;
636
+ filters.selectedFilterData = JSON.stringify(Array.from(this.annaFilterService.tooltipSelectedMap));
637
+ // filters.easyFilter = this.selectedEasyFilter ? this.selectedEasyFilter.text : null;
638
+ }
639
+ // Column level sorting
640
+ if (this.annaGtService.isSortingAppliedToTable()) {
641
+ filters.sortState = JSON.stringify(Array.from(this.annaSortService.columnSortState));
642
+ }
643
+ let latestFilters = this.getLatestFilters();
644
+ latestFilters = latestFilters || {};
645
+ if (latestFilters.stationId) {
646
+ delete latestFilters.stationId;
647
+ }
648
+ if (latestFilters.filterFor) {
649
+ delete latestFilters.filterFor;
650
+ }
651
+ if (Object.keys(filters).length > 0) {
652
+ const hashedQueryParams = this.persistingFilterService.storeKeyValueInLocalStorage(filters);
653
+ latestFilters.filters = hashedQueryParams;
654
+ }
655
+ else {
656
+ delete latestFilters.filters;
657
+ }
658
+ this.setLatestFilters(latestFilters);
659
+ return latestFilters;
660
+ }
661
+ callSort() {
662
+ this.annaSortService.columnSortState.forEach((value, key) => {
663
+ if (value === "ASC") {
664
+ this.orderListingTableData = this.annaSortService.sortDataForComponentOtherThanLurAndCsrPage(true, this.orderListingTableData, key);
665
+ }
666
+ else if (value === "DESC") {
667
+ this.orderListingTableData = this.annaSortService.sortDataForComponentOtherThanLurAndCsrPage(false, this.orderListingTableData, key);
668
+ }
669
+ });
670
+ }
671
+ enableDisableClearAllBtn() {
672
+ let isSortApplied = false;
673
+ this.annaSortService.columnSortState.forEach((val, key) => {
674
+ if (val === "ASC" || val === "DESC") {
675
+ isSortApplied = true;
676
+ }
677
+ });
678
+ this.isTableFiltersApplied = this.annaFilterService.appliedFiltersArray.length !== 0;
679
+ this.disableClearAllBtn = this.annaFilterService.appliedFiltersArray.length === 0 && !isSortApplied;
680
+ }
681
+ clearAllFilter() {
682
+ this.nonEditableGTComponent?.setScrollToInitialPosition();
683
+ this.annaFilterService.tooltipSelectedMap = new Map();
684
+ this.annaFilterService.selectedRadio = null;
685
+ this.annaFilterService.appliedFiltersArray = [];
686
+ this.annaSortService.columnSortState = new Map();
687
+ this.enableDisableClearAllBtn();
688
+ this.orderListingTableData = this.editModeForBulkAutomationOfOrders
689
+ ? cloneDeep(this.orderListingAutomationOrdersCloned)
690
+ : cloneDeep(this.orderListingTableDataCloned);
691
+ if (this.editModeForBulkAutomationOfOrders) {
692
+ this.verifyHeaderCheckbox();
693
+ }
694
+ this.performActionOnQueryParamChange = false;
695
+ this.modifyQueryParam("filters", "DELETE");
696
+ const latestFilter = this.getLatestFilters();
697
+ this.businessRuleCommonSIBILogicService.filtersFromTheUrlForOrderBizTab = null;
698
+ if (latestFilter) {
699
+ this.performActionOnQueryParamChange = true;
700
+ this.router.navigate(["business-rules/order"], {
701
+ queryParams: latestFilter,
702
+ });
703
+ }
704
+ else {
705
+ this.router.navigate(["business-rules/order"]);
706
+ }
707
+ this.annaSortService.noSortingAppliedData = this.editModeForBulkAutomationOfOrders
708
+ ? cloneDeep(this.orderListingAutomationOrdersCloned)
709
+ : cloneDeep(this.orderListingTableDataCloned);
710
+ this.annaFilterService.updateStateOfAllTheKeys(this.annaSortService.columnSortState);
711
+ }
712
+ tableActionClicked(rowData) {
713
+ this.selectedOrder = rowData.data;
714
+ switch (rowData.id) {
715
+ case TypeOfActionLinkForGtEnum.ACTIVATE_NOW_LINK_CLICKED:
716
+ this.openActivateOrderModal();
717
+ break;
718
+ case TypeOfActionLinkForGtEnum.AUTOMATION_CANCEL_ICON_CLICKED:
719
+ this.openDisableAutomationModal();
720
+ break;
721
+ case TypeOfActionLinkForGtEnum.STN_ORDER_CLICKED:
722
+ this.orderRowClicked(this.selectedOrder);
723
+ break;
724
+ // no default
725
+ }
726
+ }
727
+ setPersistedBreadcrumbsVariable(filter) {
728
+ this.breadcrumbsToPersist =
729
+ filter && this.persistingFilterService.getActualQueryParams(filter)
730
+ ? JSON.parse(this.persistingFilterService.getActualQueryParams(filter))
731
+ : null;
732
+ }
733
+ orderRowClicked(order) {
734
+ this.onorderRowClicked.emit({
735
+ order,
736
+ selectedFilter: this.selectedFilters,
737
+ breadcrumbsToPersist: this.breadcrumbsToPersist,
738
+ });
739
+ }
740
+ openConfirmationPopup() {
741
+ this.discardUnsavedChangesConfirmModal.openModal();
742
+ }
743
+ openActivateOrderModal() {
744
+ this.activateOrderModalConfig();
745
+ this.activateOrderConfirmation.openModal();
746
+ }
747
+ activateOrderModalConfig() {
748
+ this.activateOrderConfirmationConfig = { ...this.annaGlobalConfig.defaultConfirmationPopupConfig };
749
+ this.activateOrderConfirmationConfig.showCloseIcon = false;
750
+ this.activateOrderConfirmationConfig.cancelButtonLabel = "Cancel";
751
+ this.activateOrderConfirmationConfig.confirmButtonLabel = "Confirm";
752
+ this.activateOrderConfirmationConfig.title =
753
+ "Please note that the order will be automated from the next revision cycle. Are you sure you want to automate this order?";
754
+ this.activateOrderConfirmationConfig.windowClass = "generic-confirm-modal";
755
+ }
756
+ setDiscardUnsavedChangesConfirmConfig() {
757
+ this.discardUnsavedChangesConfirmConfig = {
758
+ ...this.annaGlobalConfig.defaultUnsavedChangesConfirmationPopupConfig,
759
+ };
760
+ this.discardUnsavedChangesConfirmConfig.windowClass = "generic-confirm-modal";
761
+ }
762
+ setBulkAutomationModalConfig() {
763
+ this.bulkAutomationConfirmationModalConfig = { ...this.annaGlobalConfig.defaultConfirmationPopupConfig };
764
+ this.bulkAutomationConfirmationModalConfig.showCloseIcon = false;
765
+ this.bulkAutomationConfirmationModalConfig.cancelButtonLabel = "No";
766
+ this.bulkAutomationConfirmationModalConfig.confirmButtonLabel = "Yes";
767
+ this.bulkAutomationConfirmationModalConfig.title = `Please note that ${this.countOfSelectedOrdersForAutomation} order(s) will be automated from the next revision cycle. Are you sure you want to proceed?`;
768
+ this.bulkAutomationConfirmationModalConfig.windowClass =
769
+ "generic-confirm-modal select-orders-bulk-automation-confirm-popup";
770
+ this.selectOrdersForBulkAutomationModalConfig = { ...this.annaGlobalConfig.defaultConfirmationPopupConfig };
771
+ this.selectOrdersForBulkAutomationModalConfig.showCloseIcon = false;
772
+ this.selectOrdersForBulkAutomationModalConfig.cancelButtonLabel = "Cancel";
773
+ this.selectOrdersForBulkAutomationModalConfig.confirmButtonLabel = "Proceed";
774
+ this.selectOrdersForBulkAutomationModalConfig.title =
775
+ "To select orders for automation, simply check the boxes next to the desired order(s). Once you've made your selections, confirm your choices to automate the selected order(s).";
776
+ this.selectOrdersForBulkAutomationModalConfig.windowClass =
777
+ "generic-confirm-modal select-orders-bulk-automation-confirm-popup";
778
+ }
779
+ stayOnBizRulePageAndCloseModal() {
780
+ this.stayOnPageAndCloseModal.emit();
781
+ }
782
+ openDisableAutomationModal() {
783
+ this.disableOrderAutomation();
784
+ this.disableOrderAutomationConfirmation.openModal();
785
+ }
786
+ allowBulkSelectionOfOrdersForAutomation() {
787
+ this.clearAllFilter();
788
+ this.editModeForBulkAutomationOfOrders = true;
789
+ this.tableHeaders = this.orderListingService.getOrderListingHeaders(true);
790
+ this.orderListingTableData = this.orderListingTableDataCloned.filter((order) => {
791
+ if (order.allowAutomation) {
792
+ order.isSelectedForBulkAutomation = false;
793
+ return true;
794
+ }
795
+ return false;
796
+ });
797
+ this.countOfSelectedOrdersForAutomation = 0;
798
+ this.orderListingAutomationOrdersCloned = cloneDeep(this.orderListingTableData);
799
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.orderListingAutomationOrdersCloned);
800
+ // this.disableAllIntelliFilters();
801
+ }
802
+ openAllowBulkSelectionOfOrdersToAutomateModal() {
803
+ this.setBulkAutomationModalConfig();
804
+ this.selectOrdersForBulkAutomation.openModal();
805
+ }
806
+ sendBulkOrdersForActivation() {
807
+ const orderId = [];
808
+ let stationId;
809
+ this.orderListingAutomationOrdersCloned.forEach((order) => {
810
+ if (order.isSelectedForBulkAutomation) {
811
+ // eslint-disable-next-line prefer-destructuring
812
+ stationId = order.stationId;
813
+ orderId.push(order.stationOrderId);
814
+ }
815
+ });
816
+ const payload = {
817
+ StationId: stationId,
818
+ OrderIds: orderId,
819
+ ActivatedByUserId: +this.orderListingService.loggedInUserId,
820
+ };
821
+ this.ngxService.start();
822
+ this.automationActivatedAndPODService.sendBulkOrderForAutomation(payload).subscribe((response) => {
823
+ this.ngxService.stop();
824
+ this.toastr.success("Order(s) successfully marked for automation");
825
+ this.resetOrderListing();
826
+ this.fetchOrders();
827
+ }, (error) => {
828
+ this.ngxService.stop();
829
+ this.toastr.error(Constants.SERVER_ERROR_MSG);
830
+ });
831
+ }
832
+ disableOrderAutomation() {
833
+ this.disableAutomationConfirmationConfig = { ...this.annaGlobalConfig.defaultConfirmationPopupConfig };
834
+ this.disableAutomationConfirmationConfig.showCloseIcon = false;
835
+ this.disableAutomationConfirmationConfig.cancelButtonLabel = "Cancel";
836
+ this.disableAutomationConfirmationConfig.confirmButtonLabel = "Confirm";
837
+ this.disableAutomationConfirmationConfig.title =
838
+ "Are you sure you want to disable automation for this order? Please note that this will only take effect from the next revision cycle.";
839
+ this.disableAutomationConfirmationConfig.windowClass = "generic-confirm-modal";
840
+ }
841
+ activateOrder() {
842
+ const payload = {
843
+ StationId: this.selectedOrder.stationId,
844
+ OrderId: this.selectedOrder.stationOrderId.toString(),
845
+ ActivatedByUserId: +this.orderListingService.loggedInUserId,
846
+ };
847
+ this.ngxService.start();
848
+ this.automationActivatedAndPODService.activateOrderAutomation(payload).subscribe((response) => {
849
+ this.ngxService.stop();
850
+ this.toastr.success(this.automationActivatedAndPODService.successToastrMsgAutomateOrder);
851
+ this.fetchOrders();
852
+ }, (error) => {
853
+ this.ngxService.stop();
854
+ this.toastr.error(Constants.SERVER_ERROR_MSG);
855
+ });
856
+ }
857
+ onConfirmdisableOrderAutomation() {
858
+ const payload = {
859
+ StationId: this.selectedOrder.stationId,
860
+ OrderId: this.selectedOrder.stationOrderId.toString(),
861
+ DisabledByUserId: +this.orderListingService.loggedInUserId,
862
+ };
863
+ this.ngxService.start();
864
+ this.automationActivatedAndPODService.deactivateOrderAutomation(payload).subscribe((response) => {
865
+ this.ngxService.stop();
866
+ this.toastr.success(this.automationActivatedAndPODService.successToastrMsgDeactivateOrder);
867
+ this.fetchOrders();
868
+ }, (error) => {
869
+ this.ngxService.stop();
870
+ this.toastr.error(Constants.SERVER_ERROR_MSG);
871
+ });
872
+ }
873
+ toggleHeaderCheckbox() {
874
+ this.isAllOrderSelected = !this.isAllOrderSelected;
875
+ this.verifyRowCheckbox();
876
+ this.enableOrDisableAutomationButton();
877
+ }
878
+ toggleSelectFilteredOrdersCheckbox() {
879
+ this.isAllFilteredOrdersSelected = !this.isAllFilteredOrdersSelected;
880
+ if (this.orderListingTableData.length === this.orderListingAutomationOrdersCloned.length) {
881
+ this.toggleHeaderCheckbox();
882
+ }
883
+ else {
884
+ this.orderListingTableData.forEach((data) => {
885
+ data.isSelectedForBulkAutomation = this.isAllFilteredOrdersSelected;
886
+ const clonedOrder = this.orderListingAutomationOrdersCloned.find((clonedData) => clonedData.stationOrderId === data.stationOrderId);
887
+ if (clonedOrder) {
888
+ clonedOrder.isSelectedForBulkAutomation = this.isAllFilteredOrdersSelected;
889
+ }
890
+ });
891
+ this.verifyHeaderCheckboxForFilteredOrders();
892
+ }
893
+ this.enableOrDisableAutomationButton();
894
+ this.nonEditableGTComponent.detectChanges();
895
+ }
896
+ verifyRowCheckbox() {
897
+ const isChecked = this.isAllOrderSelected;
898
+ this.orderListingTableData.forEach((data) => {
899
+ data.isSelectedForBulkAutomation = isChecked;
900
+ });
901
+ this.orderListingAutomationOrdersCloned.forEach((data) => {
902
+ data.isSelectedForBulkAutomation = isChecked;
903
+ });
904
+ this.nonEditableGTComponent.detectChanges();
905
+ }
906
+ verifyHeaderCheckbox() {
907
+ let allCheckboxes = 0;
908
+ let selectedCheckboxes = 0;
909
+ this.orderListingAutomationOrdersCloned.forEach((data) => {
910
+ if (data.isSelectedForBulkAutomation) {
911
+ selectedCheckboxes += 1;
912
+ }
913
+ allCheckboxes += 1;
914
+ });
915
+ this.countOfSelectedOrdersForAutomation = selectedCheckboxes;
916
+ this.isAllOrderSelected = allCheckboxes === selectedCheckboxes;
917
+ }
918
+ verifyHeaderCheckboxForFilteredOrders() {
919
+ let allCheckboxes = 0;
920
+ let selectedCheckboxes = 0;
921
+ this.orderListingTableData.forEach((data) => {
922
+ if (data.isSelectedForBulkAutomation) {
923
+ selectedCheckboxes += 1;
924
+ }
925
+ allCheckboxes += 1;
926
+ });
927
+ this.countOfSelectedFilteredOrdersForAutomation = selectedCheckboxes;
928
+ this.isAllFilteredOrdersSelected = allCheckboxes === selectedCheckboxes;
929
+ }
930
+ toggleCheckbox(event) {
931
+ const rowIndex = this.orderListingTableData.findIndex((obj) => obj.stationOrderId === event.rowData.stationOrderId);
932
+ this.orderListingTableData[rowIndex].isSelectedForBulkAutomation = event.isCheckboxSelected;
933
+ const rowIndexCloned = this.orderListingAutomationOrdersCloned.findIndex((obj) => obj.stationOrderId === event.rowData.stationOrderId);
934
+ this.orderListingAutomationOrdersCloned[rowIndexCloned].isSelectedForBulkAutomation = event.isCheckboxSelected;
935
+ if (this.isTableFiltersApplied) {
936
+ this.verifyHeaderCheckboxForFilteredOrders();
937
+ this.verifyHeaderCheckbox();
938
+ }
939
+ else {
940
+ this.verifyHeaderCheckbox();
941
+ }
942
+ this.enableOrDisableAutomationButton();
943
+ }
944
+ enableOrDisableAutomationButton() {
945
+ let selectedCheckboxes = 0;
946
+ this.orderListingAutomationOrdersCloned.forEach((data) => {
947
+ if (data.isSelectedForBulkAutomation) {
948
+ selectedCheckboxes += 1;
949
+ }
950
+ });
951
+ this.countOfSelectedOrdersForAutomation = +selectedCheckboxes;
952
+ }
953
+ resetOrderListing() {
954
+ this.tableHeaders = this.orderListingService.getOrderListingHeaders(false);
955
+ this.editModeForBulkAutomationOfOrders = false;
956
+ this.orderListingAutomationOrdersCloned = this.orderListingTableDataCloned.filter((order) => order.allowAutomation);
957
+ this.clearAllFilter();
958
+ this.isAllOrderSelected = false;
959
+ this.nonEditableGTComponent.detectChanges();
960
+ }
961
+ confirmBulkAutomationOfOrders() {
962
+ this.bulkAutomationConfirmationModalConfig.title = `Please note that ${this.countOfSelectedOrdersForAutomation} order(s) will be automated from the next revision cycle. Are you sure you want to proceed?`;
963
+ this.bulkAutomationConfirmation.openModal();
964
+ }
965
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BizRulesOrderListingComponent, deps: [{ token: i1.Router }, { token: i2.AnnaGtHelperService }, { token: i1.ActivatedRoute }, { token: i2.AnnaPersistingFilterService }, { token: i2.AnnaFilterService }, { token: i2.AnnaSortService }, { token: i3.ToastrService }, { token: i4.NgxUiLoaderService }, { token: i5.BreadcrumbsService }, { token: i6.GenericBusinessRuleCommonSIBILogicService }, { token: BIZ_RULE_ORDER_LISTING_SERVICE_TOKEN }, { token: AUTOMATION_ACTIVATED_AND_POD_SERVICE_TOKEN }, { token: i2.AnnaGlobalConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
966
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: BizRulesOrderListingComponent, isStandalone: true, selector: "anna-feature-biz-rules-order-listing", inputs: { loading: "loading", gtGeneralConfig: "gtGeneralConfig", error: "error", aclPermission: "aclPermission", userType: "userType", filterData: "filterData", easyFilters: "easyFilters", tableHeaders: "tableHeaders", gtDimension: "gtDimension", showOwnershipGroupFilter: "showOwnershipGroupFilter", showStationFilter: "showStationFilter", showNoDataToDisplay: "showNoDataToDisplay", stationIdsWithValidLicense: "stationIdsWithValidLicense" }, outputs: { onorderRowClicked: "onorderRowClicked", stayOnPageAndCloseModal: "stayOnPageAndCloseModal" }, viewQueries: [{ propertyName: "activateOrderConfirmation", first: true, predicate: ["activateOrderModal"], descendants: true }, { propertyName: "disableOrderAutomationConfirmation", first: true, predicate: ["disableOrderAutomationModal"], descendants: true }, { propertyName: "selectOrdersForBulkAutomation", first: true, predicate: ["selectOrdersForBulkAutomationModal"], descendants: true }, { propertyName: "bulkAutomationConfirmation", first: true, predicate: ["bulkAutomationConfirmationModal"], descendants: true }, { propertyName: "nonEditableGTComponent", first: true, predicate: AnnaNonEditableGenericTableComponent, descendants: true }, { propertyName: "discardUnsavedChangesConfirmModal", first: true, predicate: ["discardUnsavedChangesConfirmModal"], descendants: true }], ngImport: i0, template: "<div\n class=\"station-period-row\"\n *ngIf=\"!showNoDataToDisplay\"\n>\n <anna-design-dashboard-filter-modal\n [filterData]=\"filterData\"\n [headerText]=\"'Edit Filter'\"\n [showOwnershipGroup]=\"showOwnershipGroupFilter\"\n [showStation]=\"showStationFilter\"\n [showEquivilization]=\"false\"\n [showNormalization]=\"false\"\n [disableEditButton]=\"editModeForBulkAutomationOfOrders\"\n [error]=\"error\"\n [handleNavigation]=\"false\"\n [message]=\"'Select data for which you want to view the orders for.'\"\n [toDisable]=\"showTableSkeletonLoader\"\n [persistingFilter]=\"persistingFilterForPopup\"\n [stationIdsWithValidLicense]=\"stationIdsWithValidLicense\"\n (getInitialFilter)=\"updateInitialStationOrOGFilter($event)\"\n (applyFilter)=\"applyOrderListingPopupFilter($event)\"\n >\n </anna-design-dashboard-filter-modal>\n <ng-container *ngIf=\"userType === 'SELLER' && aclPermission\">\n <div class=\"button-container\">\n <button\n *ngIf=\"!editModeForBulkAutomationOfOrders\"\n class=\"anna select-orders-to-automate-button apply-button\"\n [disabled]=\"orderListingTableData?.length === 0 || orderListingAutomationOrdersCloned?.length === 0\"\n (click)=\"openAllowBulkSelectionOfOrdersToAutomateModal()\"\n >\n Select Orders to Automate\n </button>\n <ng-container *ngIf=\"editModeForBulkAutomationOfOrders\">\n <button\n class=\"anna cancel-button\"\n (click)=\"resetOrderListing()\"\n >\n Cancel\n </button>\n <button\n class=\"anna automate-button apply-button\"\n [disabled]=\"countOfSelectedOrdersForAutomation === 0\"\n (click)=\"confirmBulkAutomationOfOrders()\"\n >\n Automate\n </button>\n </ng-container>\n </div>\n </ng-container>\n</div>\n<div\n class=\"easy-reset-filter-container\"\n *ngIf=\"!showNoDataToDisplay\"\n>\n <div class=\"filters\">\n <anna-design-easy-filters\n [showLoader]=\"showTableSkeletonLoader\"\n [numberOfItemsForLoader]=\"easyFilterSkeletonLoaderCount\"\n [easyFilters]=\"easyFilters\"\n [tableData]=\"editModeForBulkAutomationOfOrders ? [] : orderListingTableData\"\n [clonedTableData]=\"orderListingTableDataCloned\"\n (easyFilterClickEvent)=\"intelliFilterClicked($event)\"\n >\n </anna-design-easy-filters>\n </div>\n</div>\n<section\n class=\"count-reset-container\"\n *ngIf=\"!showNoDataToDisplay\"\n>\n <anna-design-skt-loader\n *ngIf=\"showTableSkeletonLoader\"\n [theme]=\"{\n height: '12px',\n width: '120px',\n 'margin-bottom': '0',\n 'margin-top': '0',\n 'margin-left': 'var(--app-left-space)'\n }\"\n >\n </anna-design-skt-loader>\n <button\n *ngIf=\"!showTableSkeletonLoader\"\n class=\"clear-all-btn\"\n (click)=\"clearAllFilter()\"\n [disabled]=\"disableClearAllBtn\"\n >\n Reset all filters\n </button>\n\n <div class=\"count-text\">\n <span\n *ngIf=\"editModeForBulkAutomationOfOrders\"\n class=\"total-orders-selected\"\n >\n <ng-container *ngIf=\"!isTableFiltersApplied\">\n <i\n [ngClass]=\"isAllOrderSelected ? 'mdi mdi-checkbox-marked' : 'mdi mdi-checkbox-blank-outline'\"\n (click)=\"toggleHeaderCheckbox()\"\n ></i>\n Select all orders for automation <span> ({{ orderListingAutomationOrdersCloned?.length }}) | </span>\n </ng-container>\n <ng-container *ngIf=\"isTableFiltersApplied\">\n <i\n [ngClass]=\"\n isAllFilteredOrdersSelected ? 'mdi mdi-checkbox-marked' : 'mdi mdi-checkbox-blank-outline'\n \"\n (click)=\"toggleSelectFilteredOrdersCheckbox()\"\n ></i>\n Select all filtered orders for automation <span> ({{ orderListingTableData?.length }}) | </span>\n </ng-container>\n </span>\n <span\n class=\"selectedAutomateOrdersCount\"\n *ngIf=\"editModeForBulkAutomationOfOrders\"\n >Selected Orders:\n <b>{{\n isTableFiltersApplied ? countOfSelectedFilteredOrdersForAutomation : countOfSelectedOrdersForAutomation\n }}</b>\n </span>\n <span *ngIf=\"!showTableSkeletonLoader && !editModeForBulkAutomationOfOrders\"\n >Total Orders: <b>{{ orderListingTableData.length }}</b></span\n >\n </div>\n</section>\n\n<section\n class=\"biz-order-table-container\"\n *ngIf=\"!showNoDataToDisplay\"\n>\n <anna-core-non-editable-generic-table-lib\n class=\"biz-order-listing-generic-table\"\n [ngClass]=\"{\n 'no-data-table': !showTableSkeletonLoader && orderListingTableData && orderListingTableData.length === 0,\n showCheckBoxColumn: editModeForBulkAutomationOfOrders\n }\"\n [showSkeletonLoading]=\"showTableSkeletonLoader\"\n [tableHeaders]=\"tableHeaders\"\n [tableData]=\"orderListingTableData\"\n [clonedTableData]=\"\n editModeForBulkAutomationOfOrders ? orderListingAutomationOrdersCloned : orderListingTableDataCloned\n \"\n [gtGeneralConfig]=\"gtGeneralConfig\"\n [gtDimension]=\"gtDimension\"\n [clickableRow]=\"false\"\n [tableBorderBottomClassRequired]=\"false\"\n [includeBorderInTableHeight]=\"false\"\n (toggleCheckbox)=\"toggleCheckbox($event)\"\n (filterAppliedToTable)=\"filterAppliedToTable($event)\"\n (sortingAppliedToTable)=\"sortingAppliedToTable($event)\"\n (gtTextActionClicked)=\"tableActionClicked($event)\"\n (clickableDataClicked)=\"tableActionClicked($event)\"\n >\n </anna-core-non-editable-generic-table-lib>\n</section>\n\n<ng-container *ngIf=\"showNoDataToDisplay\">\n <anna-core-no-data-lib width=\"50%\"> </anna-core-no-data-lib>\n</ng-container>\n\n<anna-design-confirmation-popup\n #activateOrderModal\n [config]=\"activateOrderConfirmationConfig\"\n (confirmClicked)=\"activateOrder()\"\n>\n</anna-design-confirmation-popup>\n\n<anna-design-confirmation-popup\n #disableOrderAutomationModal\n [config]=\"disableAutomationConfirmationConfig\"\n (confirmClicked)=\"onConfirmdisableOrderAutomation()\"\n>\n</anna-design-confirmation-popup>\n\n<anna-design-confirmation-popup\n #selectOrdersForBulkAutomationModal\n [config]=\"selectOrdersForBulkAutomationModalConfig\"\n (confirmClicked)=\"allowBulkSelectionOfOrdersForAutomation()\"\n>\n</anna-design-confirmation-popup>\n\n<anna-design-confirmation-popup\n #bulkAutomationConfirmationModal\n [config]=\"bulkAutomationConfirmationModalConfig\"\n (confirmClicked)=\"sendBulkOrdersForActivation()\"\n>\n</anna-design-confirmation-popup>\n<anna-design-confirmation-popup\n #discardUnsavedChangesConfirmModal\n [config]=\"discardUnsavedChangesConfirmConfig\"\n (cancelClicked)=\"stayOnBizRulePageAndCloseModal()\"\n>\n</anna-design-confirmation-popup>\n", styles: ["::ng-deep .select-orders-bulk-automation-confirm-popup .modal-content{width:320px!important;max-width:320px!important}.station-period-row{padding-left:var(--app-left-space);padding-right:var(--app-right-space);margin-bottom:12px;margin-top:12px}::ng-deep app-dashboard-filter-modal{width:100%}:host ::ng-deep anna-design-easy-filters section{flex-wrap:wrap}:host ::ng-deep anna-design-easy-filters button.AWAITING_APPROVAL.active{border:1px solid #f3bd18!important;background-color:#f3bd18!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.AWAITING_APPROVAL.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.AWAITING_APPROVAL{border:1px solid #f3bd18!important;background-color:#f7f2d1!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.AWAITING_APPROVAL:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.APPROVED{border:1px solid #00c853!important;background-color:#e3f3ea!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.APPROVED:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.APPROVED.active{border:1px solid #00c853!important;background-color:#00c853!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.APPROVED.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.SELLER_APPROVAL_REQUESTED{border:1px solid #9b1b93!important;background-color:#ffe8fe!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.SELLER_APPROVAL_REQUESTED:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.SELLER_APPROVAL_REQUESTED.active{border:1px solid #9b1b93!important;background-color:#9b1b93!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.SELLER_APPROVAL_REQUESTED.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.BUYER_APPROVAL_REQUESTED{border:1px solid #1565c0!important;background-color:#d5e3f4!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.BUYER_APPROVAL_REQUESTED:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.BUYER_APPROVAL_REQUESTED.active{border:1px solid #1565c0!important;background-color:#1565c0!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.BUYER_APPROVAL_REQUESTED.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.AUTOMATED{border:1px solid #8bac2a!important;background-color:#faffea!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.AUTOMATED:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.AUTOMATED.active{border:1px solid #fff!important;background-color:#8bac2a!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.AUTOMATED.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}.easy-reset-filter-container{padding-left:var(--app-left-space);padding-right:2.5rem;display:flex;align-items:flex-end;flex-wrap:wrap;justify-content:space-between}:host ::ng-deep .wrapper{width:max-content}.filters{display:flex;flex-wrap:wrap;position:relative;margin-bottom:4px}button.clear-all-btn{display:flex;float:right;min-width:max-content;margin-right:40px;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;line-height:normal!important}button.clear-all-btn:hover:enabled{color:#268bff}button.clear-all-btn:disabled{color:#4a4a4a;opacity:.5;cursor:not-allowed}button.clear-all-btn:disabled{background-color:#fff}.reset-container{display:contents}.count-text{font-size:var(--page-message-content-fs);font-family:Roboto;font-style:italic;display:inline-block;margin-left:var(--app-left-space);margin-top:0;color:var(--primary-text-color-medium)}.count-text b{color:var(--font-color)}.total-orders-selected{font-size:12px;color:#4a4a4a;font-style:normal}.select-orders-to-automate-button{width:180px!important}.button-container{display:flex;align-items:end;margin-left:10px}.cancel-button,.automate-button{width:86px!important}:host ::ng-deep anna-core-non-editable-generic-table-lib td{cursor:default!important}:host ::ng-deep anna-core-non-editable-generic-table-lib .table-container{margin-left:var(--app-left-space);margin-right:2.5rem}:host ::ng-deep anna-core-non-editable-generic-table-lib th.mat-column-identicalToAdvBizRule p.lower-label{color:#4a4a4a!important}:host ::ng-deep anna-core-non-editable-generic-table-lib th.mat-column-automation_activated div.row:nth-of-type(2){display:none!important}:host ::ng-deep anna-core-non-editable-generic-table-lib th.mat-column-isInhertingAdvBizRules div.row{white-space:normal!important;max-width:fit-content!important}:host ::ng-deep anna-core-non-editable-generic-table-lib th.mat-column-isInhertingAdvBizRules div.sort-filter-container{margin-left:-20px!important;margin-top:-13px!important}:host ::ng-deep anna-core-non-editable-generic-table-lib .mdi-info-outline{color:#268bff;margin-left:.4rem;font-size:.6875rem}:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.MODIFICATION_REQUESTED,:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.APPROVED{background-color:#00c853!important;border-radius:2px!important;padding:2px 6px!important;cursor:default!important;color:#fff!important;text-decoration:none!important;display:inline-block!important;font-family:Roboto;font-size:12px;font-weight:700!important;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.AWAITING_APPROVAL{background-color:#f3bd18!important;border-radius:2px!important;padding:2px 6px!important;cursor:default!important;color:#fff!important;text-decoration:none!important;display:inline-block!important;font-family:Roboto;font-size:12px;font-weight:700!important;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.BUYER_APPROVAL_REQUESTED{background-color:#1565c0!important;border-radius:2px!important;padding:2px 6px!important;cursor:default!important;color:#fff!important;text-decoration:none!important;display:inline-block!important;font-family:Roboto;font-size:12px;font-weight:700!important;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.SELLER_APPROVAL_REQUESTED{background-color:#9b1b93!important;border-radius:2px!important;padding:2px 6px!important;cursor:default!important;color:#fff!important;text-decoration:none!important;display:inline-block!important;font-family:Roboto;font-size:12px;font-weight:700!important;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}:host ::ng-deep anna-core-non-editable-generic-table-lib a.stationOrderNumber,:host ::ng-deep anna-core-non-editable-generic-table-lib a#ACTIVATE_NOW_LINK_CLICKED{color:#268bff!important}:host ::ng-deep anna-core-non-editable-generic-table-lib td.mat-column-automation_activated div{display:flex!important;color:#000!important}:host ::ng-deep anna-core-non-editable-generic-table-lib td.mat-column-automation_activated div i{color:#f44336;font-size:.75rem;cursor:pointer;float:right;margin-left:auto}:host ::ng-deep anna-core-non-editable-generic-table-lib .table-container.no-data-table>div{height:120px!important}:host ::ng-deep anna-core-non-editable-generic-table-lib .custom-column-checkbox-unchecked,:host ::ng-deep anna-core-non-editable-generic-table-lib .custom-column-checkbox-checked{color:#268bff!important;font-size:13px!important}:host ::ng-deep anna-core-non-editable-generic-table-lib td.mat-column-isSelectedForBulkAutomation div{display:flex;justify-content:center;align-items:center}:host ::ng-deep .italic.orange-text{margin-left:1px;filter:drop-shadow(0px 0 0px #d4d4d4)!important}@media only screen and (max-width: 1281px){:host ::ng-deep anna-design-easy-filters section.d-flex{row-gap:4px}}.mdi-checkbox-blank-outline,.mdi-checkbox-marked{cursor:pointer;color:#268bff!important;font-size:13px!important}::ng-deep .grey-text-italics{color:#a7a7a7!important;font-style:italic!important}.selectedAutomateOrdersCount{font-style:normal!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: AnnaDesignComponentsLibModule }, { kind: "component", type: i5.SkeletonLoaderComponent, selector: "anna-design-skt-loader", inputs: ["theme", "count"] }, { kind: "component", type: i5.ConfirmationPopupComponent, selector: "anna-design-confirmation-popup", inputs: ["config"], outputs: ["confirmClicked", "cancelClicked"] }, { kind: "component", type: i5.DashboardFilterModalComponent, selector: "anna-design-dashboard-filter-modal", inputs: ["error", "toDisable", "disableEditButton", "filterData", "persistingFilter", "headerText", "handleNavigation", "showEquivilization", "showNormalization", "showOwnershipGroup", "showStation", "showMultiSelectionForStation", "stationIdsWithValidLicense", "message", "toShowAllPeriodModeSetting", "PeriodOptions"], outputs: ["applyFilter", "getInitialFilter"] }, { kind: "component", type: i5.EasyFiltersComponent, selector: "anna-design-easy-filters", inputs: ["showLoader", "tableData", "clonedTableData", "autoSelectionOfOnlyEnabledFilter", "showUnsavedChangesPopup", "isUnSavedChangesPresent", "defaultFilterNameToBeSelected", "filterToBeUpdatedManually", "easyFilters", "numberOfItemsForLoader"], outputs: ["easyFilterClickEvent", "easyFilterIsSelected", "getUpdatedDataAfterUserAction"] }, { kind: "ngmodule", type: AnnaCoreModule }, { kind: "component", type: i2.AnnaNoDataComponent, selector: "anna-core-no-data-lib", inputs: ["width", "marginTop"] }, { kind: "component", type: i2.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"], 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"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
967
+ }
968
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BizRulesOrderListingComponent, decorators: [{
969
+ type: Component,
970
+ args: [{ selector: "anna-feature-biz-rules-order-listing", imports: [NgIf, AnnaDesignComponentsLibModule, AnnaCoreModule, NgClass], template: "<div\n class=\"station-period-row\"\n *ngIf=\"!showNoDataToDisplay\"\n>\n <anna-design-dashboard-filter-modal\n [filterData]=\"filterData\"\n [headerText]=\"'Edit Filter'\"\n [showOwnershipGroup]=\"showOwnershipGroupFilter\"\n [showStation]=\"showStationFilter\"\n [showEquivilization]=\"false\"\n [showNormalization]=\"false\"\n [disableEditButton]=\"editModeForBulkAutomationOfOrders\"\n [error]=\"error\"\n [handleNavigation]=\"false\"\n [message]=\"'Select data for which you want to view the orders for.'\"\n [toDisable]=\"showTableSkeletonLoader\"\n [persistingFilter]=\"persistingFilterForPopup\"\n [stationIdsWithValidLicense]=\"stationIdsWithValidLicense\"\n (getInitialFilter)=\"updateInitialStationOrOGFilter($event)\"\n (applyFilter)=\"applyOrderListingPopupFilter($event)\"\n >\n </anna-design-dashboard-filter-modal>\n <ng-container *ngIf=\"userType === 'SELLER' && aclPermission\">\n <div class=\"button-container\">\n <button\n *ngIf=\"!editModeForBulkAutomationOfOrders\"\n class=\"anna select-orders-to-automate-button apply-button\"\n [disabled]=\"orderListingTableData?.length === 0 || orderListingAutomationOrdersCloned?.length === 0\"\n (click)=\"openAllowBulkSelectionOfOrdersToAutomateModal()\"\n >\n Select Orders to Automate\n </button>\n <ng-container *ngIf=\"editModeForBulkAutomationOfOrders\">\n <button\n class=\"anna cancel-button\"\n (click)=\"resetOrderListing()\"\n >\n Cancel\n </button>\n <button\n class=\"anna automate-button apply-button\"\n [disabled]=\"countOfSelectedOrdersForAutomation === 0\"\n (click)=\"confirmBulkAutomationOfOrders()\"\n >\n Automate\n </button>\n </ng-container>\n </div>\n </ng-container>\n</div>\n<div\n class=\"easy-reset-filter-container\"\n *ngIf=\"!showNoDataToDisplay\"\n>\n <div class=\"filters\">\n <anna-design-easy-filters\n [showLoader]=\"showTableSkeletonLoader\"\n [numberOfItemsForLoader]=\"easyFilterSkeletonLoaderCount\"\n [easyFilters]=\"easyFilters\"\n [tableData]=\"editModeForBulkAutomationOfOrders ? [] : orderListingTableData\"\n [clonedTableData]=\"orderListingTableDataCloned\"\n (easyFilterClickEvent)=\"intelliFilterClicked($event)\"\n >\n </anna-design-easy-filters>\n </div>\n</div>\n<section\n class=\"count-reset-container\"\n *ngIf=\"!showNoDataToDisplay\"\n>\n <anna-design-skt-loader\n *ngIf=\"showTableSkeletonLoader\"\n [theme]=\"{\n height: '12px',\n width: '120px',\n 'margin-bottom': '0',\n 'margin-top': '0',\n 'margin-left': 'var(--app-left-space)'\n }\"\n >\n </anna-design-skt-loader>\n <button\n *ngIf=\"!showTableSkeletonLoader\"\n class=\"clear-all-btn\"\n (click)=\"clearAllFilter()\"\n [disabled]=\"disableClearAllBtn\"\n >\n Reset all filters\n </button>\n\n <div class=\"count-text\">\n <span\n *ngIf=\"editModeForBulkAutomationOfOrders\"\n class=\"total-orders-selected\"\n >\n <ng-container *ngIf=\"!isTableFiltersApplied\">\n <i\n [ngClass]=\"isAllOrderSelected ? 'mdi mdi-checkbox-marked' : 'mdi mdi-checkbox-blank-outline'\"\n (click)=\"toggleHeaderCheckbox()\"\n ></i>\n Select all orders for automation <span> ({{ orderListingAutomationOrdersCloned?.length }}) | </span>\n </ng-container>\n <ng-container *ngIf=\"isTableFiltersApplied\">\n <i\n [ngClass]=\"\n isAllFilteredOrdersSelected ? 'mdi mdi-checkbox-marked' : 'mdi mdi-checkbox-blank-outline'\n \"\n (click)=\"toggleSelectFilteredOrdersCheckbox()\"\n ></i>\n Select all filtered orders for automation <span> ({{ orderListingTableData?.length }}) | </span>\n </ng-container>\n </span>\n <span\n class=\"selectedAutomateOrdersCount\"\n *ngIf=\"editModeForBulkAutomationOfOrders\"\n >Selected Orders:\n <b>{{\n isTableFiltersApplied ? countOfSelectedFilteredOrdersForAutomation : countOfSelectedOrdersForAutomation\n }}</b>\n </span>\n <span *ngIf=\"!showTableSkeletonLoader && !editModeForBulkAutomationOfOrders\"\n >Total Orders: <b>{{ orderListingTableData.length }}</b></span\n >\n </div>\n</section>\n\n<section\n class=\"biz-order-table-container\"\n *ngIf=\"!showNoDataToDisplay\"\n>\n <anna-core-non-editable-generic-table-lib\n class=\"biz-order-listing-generic-table\"\n [ngClass]=\"{\n 'no-data-table': !showTableSkeletonLoader && orderListingTableData && orderListingTableData.length === 0,\n showCheckBoxColumn: editModeForBulkAutomationOfOrders\n }\"\n [showSkeletonLoading]=\"showTableSkeletonLoader\"\n [tableHeaders]=\"tableHeaders\"\n [tableData]=\"orderListingTableData\"\n [clonedTableData]=\"\n editModeForBulkAutomationOfOrders ? orderListingAutomationOrdersCloned : orderListingTableDataCloned\n \"\n [gtGeneralConfig]=\"gtGeneralConfig\"\n [gtDimension]=\"gtDimension\"\n [clickableRow]=\"false\"\n [tableBorderBottomClassRequired]=\"false\"\n [includeBorderInTableHeight]=\"false\"\n (toggleCheckbox)=\"toggleCheckbox($event)\"\n (filterAppliedToTable)=\"filterAppliedToTable($event)\"\n (sortingAppliedToTable)=\"sortingAppliedToTable($event)\"\n (gtTextActionClicked)=\"tableActionClicked($event)\"\n (clickableDataClicked)=\"tableActionClicked($event)\"\n >\n </anna-core-non-editable-generic-table-lib>\n</section>\n\n<ng-container *ngIf=\"showNoDataToDisplay\">\n <anna-core-no-data-lib width=\"50%\"> </anna-core-no-data-lib>\n</ng-container>\n\n<anna-design-confirmation-popup\n #activateOrderModal\n [config]=\"activateOrderConfirmationConfig\"\n (confirmClicked)=\"activateOrder()\"\n>\n</anna-design-confirmation-popup>\n\n<anna-design-confirmation-popup\n #disableOrderAutomationModal\n [config]=\"disableAutomationConfirmationConfig\"\n (confirmClicked)=\"onConfirmdisableOrderAutomation()\"\n>\n</anna-design-confirmation-popup>\n\n<anna-design-confirmation-popup\n #selectOrdersForBulkAutomationModal\n [config]=\"selectOrdersForBulkAutomationModalConfig\"\n (confirmClicked)=\"allowBulkSelectionOfOrdersForAutomation()\"\n>\n</anna-design-confirmation-popup>\n\n<anna-design-confirmation-popup\n #bulkAutomationConfirmationModal\n [config]=\"bulkAutomationConfirmationModalConfig\"\n (confirmClicked)=\"sendBulkOrdersForActivation()\"\n>\n</anna-design-confirmation-popup>\n<anna-design-confirmation-popup\n #discardUnsavedChangesConfirmModal\n [config]=\"discardUnsavedChangesConfirmConfig\"\n (cancelClicked)=\"stayOnBizRulePageAndCloseModal()\"\n>\n</anna-design-confirmation-popup>\n", styles: ["::ng-deep .select-orders-bulk-automation-confirm-popup .modal-content{width:320px!important;max-width:320px!important}.station-period-row{padding-left:var(--app-left-space);padding-right:var(--app-right-space);margin-bottom:12px;margin-top:12px}::ng-deep app-dashboard-filter-modal{width:100%}:host ::ng-deep anna-design-easy-filters section{flex-wrap:wrap}:host ::ng-deep anna-design-easy-filters button.AWAITING_APPROVAL.active{border:1px solid #f3bd18!important;background-color:#f3bd18!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.AWAITING_APPROVAL.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.AWAITING_APPROVAL{border:1px solid #f3bd18!important;background-color:#f7f2d1!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.AWAITING_APPROVAL:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.APPROVED{border:1px solid #00c853!important;background-color:#e3f3ea!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.APPROVED:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.APPROVED.active{border:1px solid #00c853!important;background-color:#00c853!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.APPROVED.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.SELLER_APPROVAL_REQUESTED{border:1px solid #9b1b93!important;background-color:#ffe8fe!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.SELLER_APPROVAL_REQUESTED:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.SELLER_APPROVAL_REQUESTED.active{border:1px solid #9b1b93!important;background-color:#9b1b93!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.SELLER_APPROVAL_REQUESTED.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.BUYER_APPROVAL_REQUESTED{border:1px solid #1565c0!important;background-color:#d5e3f4!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.BUYER_APPROVAL_REQUESTED:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.BUYER_APPROVAL_REQUESTED.active{border:1px solid #1565c0!important;background-color:#1565c0!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.BUYER_APPROVAL_REQUESTED.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.AUTOMATED{border:1px solid #8bac2a!important;background-color:#faffea!important;color:#268bff!important}:host ::ng-deep anna-design-easy-filters button.AUTOMATED:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}:host ::ng-deep anna-design-easy-filters button.AUTOMATED.active{border:1px solid #fff!important;background-color:#8bac2a!important;color:#268bff!important;color:#fff!important}:host ::ng-deep anna-design-easy-filters button.AUTOMATED.active:disabled{border:1px solid #bdbdbd!important;color:#4a4a4a!important;background:#bdbdbd!important;cursor:not-allowed!important}.easy-reset-filter-container{padding-left:var(--app-left-space);padding-right:2.5rem;display:flex;align-items:flex-end;flex-wrap:wrap;justify-content:space-between}:host ::ng-deep .wrapper{width:max-content}.filters{display:flex;flex-wrap:wrap;position:relative;margin-bottom:4px}button.clear-all-btn{display:flex;float:right;min-width:max-content;margin-right:40px;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;line-height:normal!important}button.clear-all-btn:hover:enabled{color:#268bff}button.clear-all-btn:disabled{color:#4a4a4a;opacity:.5;cursor:not-allowed}button.clear-all-btn:disabled{background-color:#fff}.reset-container{display:contents}.count-text{font-size:var(--page-message-content-fs);font-family:Roboto;font-style:italic;display:inline-block;margin-left:var(--app-left-space);margin-top:0;color:var(--primary-text-color-medium)}.count-text b{color:var(--font-color)}.total-orders-selected{font-size:12px;color:#4a4a4a;font-style:normal}.select-orders-to-automate-button{width:180px!important}.button-container{display:flex;align-items:end;margin-left:10px}.cancel-button,.automate-button{width:86px!important}:host ::ng-deep anna-core-non-editable-generic-table-lib td{cursor:default!important}:host ::ng-deep anna-core-non-editable-generic-table-lib .table-container{margin-left:var(--app-left-space);margin-right:2.5rem}:host ::ng-deep anna-core-non-editable-generic-table-lib th.mat-column-identicalToAdvBizRule p.lower-label{color:#4a4a4a!important}:host ::ng-deep anna-core-non-editable-generic-table-lib th.mat-column-automation_activated div.row:nth-of-type(2){display:none!important}:host ::ng-deep anna-core-non-editable-generic-table-lib th.mat-column-isInhertingAdvBizRules div.row{white-space:normal!important;max-width:fit-content!important}:host ::ng-deep anna-core-non-editable-generic-table-lib th.mat-column-isInhertingAdvBizRules div.sort-filter-container{margin-left:-20px!important;margin-top:-13px!important}:host ::ng-deep anna-core-non-editable-generic-table-lib .mdi-info-outline{color:#268bff;margin-left:.4rem;font-size:.6875rem}:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.MODIFICATION_REQUESTED,:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.APPROVED{background-color:#00c853!important;border-radius:2px!important;padding:2px 6px!important;cursor:default!important;color:#fff!important;text-decoration:none!important;display:inline-block!important;font-family:Roboto;font-size:12px;font-weight:700!important;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.AWAITING_APPROVAL{background-color:#f3bd18!important;border-radius:2px!important;padding:2px 6px!important;cursor:default!important;color:#fff!important;text-decoration:none!important;display:inline-block!important;font-family:Roboto;font-size:12px;font-weight:700!important;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.BUYER_APPROVAL_REQUESTED{background-color:#1565c0!important;border-radius:2px!important;padding:2px 6px!important;cursor:default!important;color:#fff!important;text-decoration:none!important;display:inline-block!important;font-family:Roboto;font-size:12px;font-weight:700!important;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}:host ::ng-deep anna-core-non-editable-generic-table-lib .status-btn.SELLER_APPROVAL_REQUESTED{background-color:#9b1b93!important;border-radius:2px!important;padding:2px 6px!important;cursor:default!important;color:#fff!important;text-decoration:none!important;display:inline-block!important;font-family:Roboto;font-size:12px;font-weight:700!important;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}:host ::ng-deep anna-core-non-editable-generic-table-lib a.stationOrderNumber,:host ::ng-deep anna-core-non-editable-generic-table-lib a#ACTIVATE_NOW_LINK_CLICKED{color:#268bff!important}:host ::ng-deep anna-core-non-editable-generic-table-lib td.mat-column-automation_activated div{display:flex!important;color:#000!important}:host ::ng-deep anna-core-non-editable-generic-table-lib td.mat-column-automation_activated div i{color:#f44336;font-size:.75rem;cursor:pointer;float:right;margin-left:auto}:host ::ng-deep anna-core-non-editable-generic-table-lib .table-container.no-data-table>div{height:120px!important}:host ::ng-deep anna-core-non-editable-generic-table-lib .custom-column-checkbox-unchecked,:host ::ng-deep anna-core-non-editable-generic-table-lib .custom-column-checkbox-checked{color:#268bff!important;font-size:13px!important}:host ::ng-deep anna-core-non-editable-generic-table-lib td.mat-column-isSelectedForBulkAutomation div{display:flex;justify-content:center;align-items:center}:host ::ng-deep .italic.orange-text{margin-left:1px;filter:drop-shadow(0px 0 0px #d4d4d4)!important}@media only screen and (max-width: 1281px){:host ::ng-deep anna-design-easy-filters section.d-flex{row-gap:4px}}.mdi-checkbox-blank-outline,.mdi-checkbox-marked{cursor:pointer;color:#268bff!important;font-size:13px!important}::ng-deep .grey-text-italics{color:#a7a7a7!important;font-style:italic!important}.selectedAutomateOrdersCount{font-style:normal!important}\n"] }]
971
+ }], ctorParameters: () => [{ type: i1.Router }, { type: i2.AnnaGtHelperService }, { type: i1.ActivatedRoute }, { type: i2.AnnaPersistingFilterService }, { type: i2.AnnaFilterService }, { type: i2.AnnaSortService }, { type: i3.ToastrService }, { type: i4.NgxUiLoaderService }, { type: i5.BreadcrumbsService }, { type: i6.GenericBusinessRuleCommonSIBILogicService }, { type: undefined, decorators: [{
972
+ type: Inject,
973
+ args: [BIZ_RULE_ORDER_LISTING_SERVICE_TOKEN]
974
+ }] }, { type: undefined, decorators: [{
975
+ type: Inject,
976
+ args: [AUTOMATION_ACTIVATED_AND_POD_SERVICE_TOKEN]
977
+ }] }, { type: i2.AnnaGlobalConfigService }], propDecorators: { loading: [{
978
+ type: Input
979
+ }], gtGeneralConfig: [{
980
+ type: Input
981
+ }], error: [{
982
+ type: Input
983
+ }], aclPermission: [{
984
+ type: Input
985
+ }], userType: [{
986
+ type: Input
987
+ }], filterData: [{
988
+ type: Input
989
+ }], easyFilters: [{
990
+ type: Input
991
+ }], tableHeaders: [{
992
+ type: Input
993
+ }], gtDimension: [{
994
+ type: Input
995
+ }], showOwnershipGroupFilter: [{
996
+ type: Input
997
+ }], showStationFilter: [{
998
+ type: Input
999
+ }], showNoDataToDisplay: [{
1000
+ type: Input
1001
+ }], stationIdsWithValidLicense: [{
1002
+ type: Input
1003
+ }], onorderRowClicked: [{
1004
+ type: Output
1005
+ }], activateOrderConfirmation: [{
1006
+ type: ViewChild,
1007
+ args: ["activateOrderModal"]
1008
+ }], disableOrderAutomationConfirmation: [{
1009
+ type: ViewChild,
1010
+ args: ["disableOrderAutomationModal"]
1011
+ }], selectOrdersForBulkAutomation: [{
1012
+ type: ViewChild,
1013
+ args: ["selectOrdersForBulkAutomationModal"]
1014
+ }], bulkAutomationConfirmation: [{
1015
+ type: ViewChild,
1016
+ args: ["bulkAutomationConfirmationModal"]
1017
+ }], nonEditableGTComponent: [{
1018
+ type: ViewChild,
1019
+ args: [AnnaNonEditableGenericTableComponent]
1020
+ }], discardUnsavedChangesConfirmModal: [{
1021
+ type: ViewChild,
1022
+ args: ["discardUnsavedChangesConfirmModal"]
1023
+ }], stayOnPageAndCloseModal: [{
1024
+ type: Output
1025
+ }] } });
1026
+
1027
+ class BusinessRulesOrderListingEasyFilterConstants {
1028
+ static { this.ORDER_FLIGHT_STATUS = "Order flight status"; }
1029
+ static { this.IN_FLIGHT = "IN-FLIGHT"; }
1030
+ static { this.COMPLETED = "COMPLETED"; }
1031
+ static { this.UPCOMING = "UPCOMING"; }
1032
+ static { this.BUSINESS_RULES_STATUS = "Order business rules status"; }
1033
+ static { this.APPROVED = "APPROVED"; }
1034
+ static { this.AWAITING_APPROVAL = "AWAITING APPROVAL"; }
1035
+ static { this.AUTOMATED = "AUTOMATED"; }
1036
+ }
1037
+ class EasyFilterClasses {
1038
+ static { this.APPROVED = "APPROVED"; }
1039
+ static { this.AWAITING_APPROVAL = "AWAITING_APPROVAL"; }
1040
+ static { this.AUTOMATED = "AUTOMATED"; }
1041
+ }
1042
+ class BizRuleOrderListingTableHeaderConstants {
1043
+ static { this.STN_ORDER_NUMBER = "STN ORDER#"; }
1044
+ static { this.ALT_ORDER_NUMBER = "ALT/REP ORDER#"; }
1045
+ static { this.ESTIMATE_NUM = "ESTIMATE#"; }
1046
+ static { this.PRODUCT_CATEGORY = "PRODUCT CODE"; }
1047
+ static { this.STATUS = "STATUS"; }
1048
+ static { this.INHERTING_ADV_BIZ_RULES = "IDENTICAL TO ADV BIZ RULES"; }
1049
+ static { this.APPROVED_BY = "APPROVED BY"; }
1050
+ static { this.APPROVED_ON = "APPROVED ON"; }
1051
+ static { this.PRIMARY_AE = "PRIMARY AE"; }
1052
+ static { this.ORDER_ROUTE = "ORDER ROUTE"; }
1053
+ static { this.BUYERS = "BUYERS"; }
1054
+ static { this.REPS = "REPS"; }
1055
+ static { this.AUTOMATION = "AUTOMATION"; }
1056
+ static { this.AGENCY = "AGENCY"; }
1057
+ static { this.ADVERTISER = "ADVERTISER"; }
1058
+ static { this.START_DATE = "START DATE"; }
1059
+ static { this.END_DATE = "END DATE"; }
1060
+ static { this.STATION = "STATION"; }
1061
+ }
1062
+
1063
+ /**
1064
+ * Generated bundle index. Do not edit.
1065
+ */
1066
+
1067
+ export { AUTOMATION_ACTIVATED_AND_POD_SERVICE_TOKEN, AutomationTextAction, BIZ_RULE_ORDER_LISTING_SERVICE_TOKEN, BizRuleOrderListingTableHeaderConstants, BizRulesOrderListingComponent, BusinessRuleStatusEnum, BusinessRuleTypeEnum, BusinessRulesOrderListingEasyFilterConstants, EasyFilterClasses, OrderList, OrderTypeEnum, Orders, StationOrderNumberTextAction, TextActionDataForAutomationColumn, TypeOfActionLinkForGtEnum };
1068
+ //# sourceMappingURL=annalib-anna-feature-biz-rules-biz-rules-order-listing.mjs.map