@annalib/anna-feature-shared-lib 43.0.0-final-ng-19 → 44.0.1-final-ng-19
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.
- package/fesm2022/annalib-anna-feature-shared-lib.mjs +670 -0
- package/fesm2022/annalib-anna-feature-shared-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/{biz-rules/constants/generic-business-rule-page.constants.ts → lib/biz-rules/constants/generic-business-rule-page.constants.d.ts} +2 -2
- package/{biz-rules/models/generic-business-rule-history-popup.model.ts → lib/biz-rules/models/generic-business-rule-history-popup.model.d.ts} +3 -3
- package/lib/biz-rules/services/generic-business-rule-common-SI-BI-logic.service.d.ts +20 -0
- package/lib/constants/generic-feature-related-constants.d.ts +3 -0
- package/lib/daily-revision-listing/components/action-comments-popup/action-comments-popup.component.d.ts +35 -0
- package/lib/daily-revision-listing/components/offer-rejection-popup/offer-rejection-popup.component.d.ts +44 -0
- package/lib/daily-revision-listing/models/generic-daily-revision-listing.model.d.ts +64 -0
- package/lib/daily-revision-listing/models/generic-offers-awaiting-approval.model.d.ts +36 -0
- package/lib/daily-revision-listing/models/generic-todays-anna-offers-listing.model.d.ts +34 -0
- package/lib/daily-revision-listing/models/generic-todays-user-offers-listing.model.d.ts +39 -0
- package/lib/daily-revision-listing/services/generic-daily-revision-listing.service.d.ts +12 -0
- package/lib/generic-primary-order-panel/models/generic-primary-order-panel.model.d.ts +5 -0
- package/lib/generic-primary-order-panel/services/generic-primary-order-panel.service.d.ts +13 -0
- package/{order-listing/constants/generic-order-listing.constant.ts → lib/order-listing/constants/generic-order-listing.constant.d.ts} +3 -5
- package/{spot-approval/models/spot-approval-generic-in-feature-shared-lib.model.ts → lib/spot-approval/models/spot-approval-generic-in-feature-shared-lib.model.d.ts} +1 -2
- package/lib/spot-approval/services/spot-approval-generic-in-feature-shared-lib.service.d.ts +14 -0
- package/package.json +28 -16
- package/public-api.d.ts +16 -0
- package/.eslintrc.json +0 -31
- package/biz-rules/services/generic-business-rule-common-SI-BI-logic.service.ts +0 -28
- package/constants/generic-feature-related-constants.ts +0 -4
- package/daily-revision-listing/components/action-comments-popup/action-comments-popup.component.html +0 -41
- package/daily-revision-listing/components/action-comments-popup/action-comments-popup.component.scss +0 -29
- package/daily-revision-listing/components/action-comments-popup/action-comments-popup.component.spec.ts +0 -21
- package/daily-revision-listing/components/action-comments-popup/action-comments-popup.component.ts +0 -106
- package/daily-revision-listing/components/offer-rejection-popup/offer-rejection-popup.component.html +0 -113
- package/daily-revision-listing/components/offer-rejection-popup/offer-rejection-popup.component.scss +0 -92
- package/daily-revision-listing/components/offer-rejection-popup/offer-rejection-popup.component.spec.ts +0 -22
- package/daily-revision-listing/components/offer-rejection-popup/offer-rejection-popup.component.ts +0 -199
- package/daily-revision-listing/models/generic-daily-revision-listing.model.ts +0 -116
- package/daily-revision-listing/models/generic-offers-awaiting-approval.model.ts +0 -88
- package/daily-revision-listing/models/generic-todays-anna-offers-listing.model.ts +0 -87
- package/daily-revision-listing/models/generic-todays-user-offers-listing.model.ts +0 -91
- package/daily-revision-listing/services/generic-daily-revision-listing.service.ts +0 -15
- package/generic-primary-order-panel/models/generic-primary-order-panel.model.ts +0 -16
- package/generic-primary-order-panel/services/generic-primary-order-panel.service.ts +0 -19
- package/karma.conf.js +0 -41
- package/ng-package.json +0 -9
- package/spot-approval/services/spot-approval-generic-in-feature-shared-lib.service.ts +0 -108
- package/src/lib/anna-feature-shared-lib.module.ts +0 -19
- package/src/public-api.ts +0 -1
- package/src/test.ts +0 -15
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -10
- /package/{daily-revision-listing/models/spot-approval-generic.model.ts → lib/daily-revision-listing/models/spot-approval-generic.model.d.ts} +0 -0
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, ViewChild, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { SvgOrIconNames } from '@annalib/anna-core';
|
|
5
|
+
import * as i2 from '@angular/common';
|
|
6
|
+
import { CommonModule, NgIf, NgFor, NgClass } from '@angular/common';
|
|
7
|
+
import * as i2$1 from '@angular/forms';
|
|
8
|
+
import { FormsModule } from '@angular/forms';
|
|
9
|
+
import * as i4 from '@annalib/anna-design-components-lib';
|
|
10
|
+
import { MessageBoxData, GenericMessageBoxTheme, AnnaDesignComponentsLibModule } from '@annalib/anna-design-components-lib';
|
|
11
|
+
import * as i1 from '@ng-bootstrap/ng-bootstrap';
|
|
12
|
+
import { cloneDeep, isEqual } from 'lodash-es';
|
|
13
|
+
|
|
14
|
+
var BizRuleStatus;
|
|
15
|
+
(function (BizRuleStatus) {
|
|
16
|
+
BizRuleStatus["AWAITING_APPROVAL"] = "AWAITING_APPROVAL";
|
|
17
|
+
BizRuleStatus["APPROVED"] = "APPROVED";
|
|
18
|
+
BizRuleStatus["SELLER_SAVED"] = "SELLER_SAVED";
|
|
19
|
+
})(BizRuleStatus || (BizRuleStatus = {}));
|
|
20
|
+
|
|
21
|
+
var BizHistoryType;
|
|
22
|
+
(function (BizHistoryType) {
|
|
23
|
+
BizHistoryType["STATION"] = "station";
|
|
24
|
+
BizHistoryType["ADVERTISER"] = "advertiser";
|
|
25
|
+
BizHistoryType["ORDER"] = "order";
|
|
26
|
+
})(BizHistoryType || (BizHistoryType = {}));
|
|
27
|
+
class BuyerContactInfo {
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* eslint-disable max-len */
|
|
31
|
+
class GenericBusinessRuleCommonSIBILogicService {
|
|
32
|
+
constructor() {
|
|
33
|
+
// Manage biz rule tab service
|
|
34
|
+
this.stationIdFilterFromUrlForStationBizTab = null;
|
|
35
|
+
this.filtersFromTheUrlForAdvertiserBizTab = null;
|
|
36
|
+
this.stationIdfiltersFromTheUrlForAdvertiserBizTab = null;
|
|
37
|
+
this.popupFiltersFromTheUrlForAdvertiserBizTab = null;
|
|
38
|
+
this.filtersFromTheUrlForOrderBizTab = null;
|
|
39
|
+
this.popupfiltersFromTheUrlForOrderBizTab = null;
|
|
40
|
+
this.buyerDetailsChanged$ = new Subject();
|
|
41
|
+
this.businessRulesSubject = new Subject();
|
|
42
|
+
this.businessRules$ = this.businessRulesSubject.asObservable();
|
|
43
|
+
}
|
|
44
|
+
notifyBusinessRulesChanged() {
|
|
45
|
+
this.businessRulesSubject.next();
|
|
46
|
+
}
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GenericBusinessRuleCommonSIBILogicService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GenericBusinessRuleCommonSIBILogicService, providedIn: "root" }); }
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GenericBusinessRuleCommonSIBILogicService, decorators: [{
|
|
51
|
+
type: Injectable,
|
|
52
|
+
args: [{
|
|
53
|
+
providedIn: "root",
|
|
54
|
+
}]
|
|
55
|
+
}] });
|
|
56
|
+
|
|
57
|
+
// These value we get from backend. there is mapping at backend ex: WO_TRAFFIC (BE) comes as -> Non electronic
|
|
58
|
+
var OrderMetrics;
|
|
59
|
+
(function (OrderMetrics) {
|
|
60
|
+
OrderMetrics["rating"] = "GRP";
|
|
61
|
+
OrderMetrics["imps"] = "IMP('000)";
|
|
62
|
+
})(OrderMetrics || (OrderMetrics = {}));
|
|
63
|
+
|
|
64
|
+
class PrimaryOrderPanelService {
|
|
65
|
+
constructor() {
|
|
66
|
+
this.parentContainerScrolled = new Subject();
|
|
67
|
+
this.isPrimaryOrderPanelOpen$ = new BehaviorSubject(false);
|
|
68
|
+
}
|
|
69
|
+
getOrderMetricsDropdownValues() {
|
|
70
|
+
return [
|
|
71
|
+
{ id: 1, text: OrderMetrics.rating },
|
|
72
|
+
{ id: 2, text: OrderMetrics.imps },
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PrimaryOrderPanelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
76
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PrimaryOrderPanelService, providedIn: "root" }); }
|
|
77
|
+
}
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PrimaryOrderPanelService, decorators: [{
|
|
79
|
+
type: Injectable,
|
|
80
|
+
args: [{
|
|
81
|
+
providedIn: "root",
|
|
82
|
+
}]
|
|
83
|
+
}] });
|
|
84
|
+
|
|
85
|
+
class DRROrderGenericData {
|
|
86
|
+
constructor(data) {
|
|
87
|
+
this.campaignId = +data.CampaignId;
|
|
88
|
+
this.orderId = data.OrderId;
|
|
89
|
+
this.primaryAEName = data.PrimaryAEName;
|
|
90
|
+
this.region = data.Region;
|
|
91
|
+
this.agencyName = data.AgencyName;
|
|
92
|
+
this.location = data.Location;
|
|
93
|
+
this.advertiserName = data.AdvertiserName;
|
|
94
|
+
this.revisionStartDate = data.RevisionStartDate;
|
|
95
|
+
this.flightStartDate = data.FlightStartDate;
|
|
96
|
+
this.flightEndDate = data.FlightEndDate;
|
|
97
|
+
this.revisionNo = data.RevisionNo;
|
|
98
|
+
this.alternateOrderId = data.AlternateOrderId ? data.AlternateOrderId : "-";
|
|
99
|
+
this.revisionType = data.RevisionType;
|
|
100
|
+
this.revisionTypeForEasyFilters = data.RevisionType;
|
|
101
|
+
this.isWriteEnabledOrder = data.IsAutomated;
|
|
102
|
+
this.isStarred = data.IsStarred;
|
|
103
|
+
this.annaEnteredRepOrder = data.AnnaEnteredRepOrder;
|
|
104
|
+
this.isPayForPerformanceOrder = data.IsPayForPerformanceOrder;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
class AdditionalDRROrderGenericData extends DRROrderGenericData {
|
|
108
|
+
constructor(data) {
|
|
109
|
+
super(data);
|
|
110
|
+
const roundedRevisionNumber = Math.floor(data.RevisionNo);
|
|
111
|
+
this.revisionNumberText = roundedRevisionNumber > 0 ? `Rev${roundedRevisionNumber}` : "Original";
|
|
112
|
+
this.orderIdAndRevNumber = `${data.OrderId}-${this.revisionNumberText}`;
|
|
113
|
+
this.iconClass = this.isStarred ? "mdi mdi-star highlight-star" : "mdi mdi-star-outline";
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
var StatusCodeAndBackgroundColors;
|
|
117
|
+
(function (StatusCodeAndBackgroundColors) {
|
|
118
|
+
StatusCodeAndBackgroundColors["Seller Pending"] = "#F7F2D1";
|
|
119
|
+
StatusCodeAndBackgroundColors["Seller Reconfirm"] = "#D9D1F7";
|
|
120
|
+
StatusCodeAndBackgroundColors["Buyer Pending"] = "#D5E3F4";
|
|
121
|
+
StatusCodeAndBackgroundColors["SM Pending"] = "#FEE7D2";
|
|
122
|
+
StatusCodeAndBackgroundColors["Rev Discarded"] = "#FDD8D5";
|
|
123
|
+
StatusCodeAndBackgroundColors["Rev Generated"] = "#DBF0E4";
|
|
124
|
+
StatusCodeAndBackgroundColors["O/S Spots"] = "#EFEFEF";
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
126
|
+
StatusCodeAndBackgroundColors["O/S UD"] = "#EFEFEF";
|
|
127
|
+
})(StatusCodeAndBackgroundColors || (StatusCodeAndBackgroundColors = {}));
|
|
128
|
+
var StatusCodeAndClass;
|
|
129
|
+
(function (StatusCodeAndClass) {
|
|
130
|
+
StatusCodeAndClass["Seller Pending"] = "seller-pending";
|
|
131
|
+
StatusCodeAndClass["Seller Reconfirm"] = "seller-reconfirm";
|
|
132
|
+
StatusCodeAndClass["Buyer Pending"] = "buyer-pending";
|
|
133
|
+
StatusCodeAndClass["SM Pending"] = "sm-pending";
|
|
134
|
+
StatusCodeAndClass["Rev Generated"] = "rev-generated";
|
|
135
|
+
StatusCodeAndClass["Rev Discarded"] = "rev-discarded";
|
|
136
|
+
StatusCodeAndClass["O/S Spots"] = "os-spots";
|
|
137
|
+
StatusCodeAndClass["O/S UD"] = "os-ud";
|
|
138
|
+
})(StatusCodeAndClass || (StatusCodeAndClass = {}));
|
|
139
|
+
|
|
140
|
+
class ANNAOfferSpecificDRROrderDataForBuyer extends AdditionalDRROrderGenericData {
|
|
141
|
+
constructor(data) {
|
|
142
|
+
super(data);
|
|
143
|
+
this.buyerNames = null;
|
|
144
|
+
this.repUserNames = null;
|
|
145
|
+
this.station = data.StationName;
|
|
146
|
+
this.stationId = data.StationId;
|
|
147
|
+
this.timeoutDateTimeForDisplay = `${data.TimeoutDate} ${data.TimeoutTimeForDisplay}`;
|
|
148
|
+
this.timeoutTime = data.TimeoutTime;
|
|
149
|
+
this.timeoutDate = data.TimeoutDate;
|
|
150
|
+
this.offerCount = data.OfferCount;
|
|
151
|
+
this.orderRevisionStatus = data.OrderRevisionStatus;
|
|
152
|
+
this.orderRevisionStatusForEasyFilter = data.OrderRevisionStatus;
|
|
153
|
+
this.showNeedsAttentionIcon = data.ShowNeedsAttentionIcon;
|
|
154
|
+
this.includeOrderInBubbleCount = data.IncludeOrderInBubbleCount;
|
|
155
|
+
this.backgroundColor = data.RevisionStartedAt;
|
|
156
|
+
this.statusAndNeedsAttentionActionKey = [
|
|
157
|
+
{
|
|
158
|
+
showObjectKey: true,
|
|
159
|
+
svgOrIconName: this.showNeedsAttentionIcon ? SvgOrIconNames.WARNING_ICON : null,
|
|
160
|
+
svgOrIconTooltipMsg: this.showNeedsAttentionIcon ? "Needs attention" : null,
|
|
161
|
+
},
|
|
162
|
+
];
|
|
163
|
+
this.offeredMGsValueDisplay = data.OfferedMGsValueDisplay;
|
|
164
|
+
this.offeredMGsValue = data.OfferedMGsValue;
|
|
165
|
+
this.offeredADUsValueDisplay = data.OfferedADUsValueDisplay;
|
|
166
|
+
this.offeredADUsValue = data.OfferedADUsValue;
|
|
167
|
+
this.outstandingSpotsValueDisplay = data.OutstandingSpotsValueDisplay;
|
|
168
|
+
this.outstandingSpotsValue = data.OutstandingSpotsValue;
|
|
169
|
+
this.uDProjectionValueDisplay = data.UDProjectionValueDisplay;
|
|
170
|
+
this.uDProjectionValue = data.UDProjectionValue;
|
|
171
|
+
this.poDandAAKey = [
|
|
172
|
+
{
|
|
173
|
+
showObjectKey: true,
|
|
174
|
+
svgOrIconName: this.isPayForPerformanceOrder ? SvgOrIconNames.PAY_FOR_PERFORMANCE_ACTIVE : null,
|
|
175
|
+
},
|
|
176
|
+
];
|
|
177
|
+
this.buyerNames = ANNAOfferSpecificDRROrderDataForBuyer.convertToCommaSeperatedString(data.Buyers);
|
|
178
|
+
this.repUserNames = ANNAOfferSpecificDRROrderDataForBuyer.convertToCommaSeperatedString(data.Reps);
|
|
179
|
+
this.backgroundColor = StatusCodeAndBackgroundColors[this.orderRevisionStatus];
|
|
180
|
+
this.gtClass = StatusCodeAndClass[this.orderRevisionStatus];
|
|
181
|
+
// this.correspondingEasyFilterText = StatusCodeAndEasyFilterTextmap[this.orderRevisionStatus];
|
|
182
|
+
}
|
|
183
|
+
static convertToCommaSeperatedString(arrList) {
|
|
184
|
+
let nameList = "";
|
|
185
|
+
if (arrList && arrList.length) {
|
|
186
|
+
nameList = arrList.join(", ");
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
nameList = "-";
|
|
190
|
+
}
|
|
191
|
+
return nameList;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
class ANNAOfferSpecificDRROrderDataForSeller extends AdditionalDRROrderGenericData {
|
|
196
|
+
constructor(data) {
|
|
197
|
+
super(data);
|
|
198
|
+
this.productCode = data.ProductCode;
|
|
199
|
+
this.offerCount = data.OfferCount;
|
|
200
|
+
this.orderRevisionStatus = data.OrderRevisionStatus;
|
|
201
|
+
this.orderRevisionStatusForEasyFilter = data.OrderRevisionStatus;
|
|
202
|
+
this.showNeedsAttentionIcon = data.ShowNeedsAttentionIcon;
|
|
203
|
+
this.includeOrderInBubbleCount = data.IncludeOrderInBubbleCount;
|
|
204
|
+
this.offeredMGsValueDisplay = data.OfferedMGsValueDisplay;
|
|
205
|
+
this.offeredMGsValue = data.OfferedMGsValue;
|
|
206
|
+
this.offeredADUsValueDisplay = data.OfferedADUsValueDisplay;
|
|
207
|
+
this.offeredADUsValue = data.OfferedADUsValue;
|
|
208
|
+
this.outstandingSpotsValueDisplay = data.OutstandingSpotsValueDisplay;
|
|
209
|
+
this.outstandingSpotsValue = data.OutstandingSpotsValue;
|
|
210
|
+
this.uDProjectionValueDisplay = data.UDProjectionValueDisplay;
|
|
211
|
+
this.uDProjectionValue = data.UDProjectionValue;
|
|
212
|
+
this.isDeletedAtTraffic = data.IsDeletedAtTraffic;
|
|
213
|
+
this.backgroundColor = StatusCodeAndBackgroundColors[this.orderRevisionStatus];
|
|
214
|
+
this.gtClass = StatusCodeAndClass[this.orderRevisionStatus];
|
|
215
|
+
this.creditAdusValue = data.CreditAdusValue;
|
|
216
|
+
this.creditAdusValueDisplay = data.CreditAdusValueDisplay;
|
|
217
|
+
this.poDandAAKey = [
|
|
218
|
+
{
|
|
219
|
+
showObjectKey: true,
|
|
220
|
+
svgOrIconName: this.isDeletedAtTraffic ? "DELETED_ORDER" : null,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
showObjectKey: false,
|
|
224
|
+
svgOrIconName: this.isPayForPerformanceOrder ? SvgOrIconNames.PAY_FOR_PERFORMANCE_ACTIVE : null,
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
showObjectKey: false,
|
|
228
|
+
svgOrIconName: this.isWriteEnabledOrder ? SvgOrIconNames.AUTOMATED : null,
|
|
229
|
+
},
|
|
230
|
+
];
|
|
231
|
+
this.statusAndNeedsAttentionActionKey = [
|
|
232
|
+
{
|
|
233
|
+
showObjectKey: true,
|
|
234
|
+
svgOrIconName: this.showNeedsAttentionIcon ? SvgOrIconNames.WARNING_ICON : null,
|
|
235
|
+
svgOrIconTooltipMsg: this.showNeedsAttentionIcon ? "Needs attention" : null,
|
|
236
|
+
},
|
|
237
|
+
];
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
class StationRevisionInformationForUserOffers {
|
|
242
|
+
constructor(data) {
|
|
243
|
+
this.revisionStartedAt = data.RevisionStartedAt;
|
|
244
|
+
this.stationTimezone = data.StationTimezone;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
class UserOfferSpecificDRROrderDataForSeller extends AdditionalDRROrderGenericData {
|
|
248
|
+
constructor(data) {
|
|
249
|
+
super(data);
|
|
250
|
+
this.productCode = data.ProductCode;
|
|
251
|
+
this.userMGValue = data.UserMGValue;
|
|
252
|
+
this.userMGValueDisplay = data.UserMGValueDisplay;
|
|
253
|
+
this.outstandingPreemptionsValueDisplay = data.OutstandingPreemptionsValueDisplay;
|
|
254
|
+
this.outstandingPreemptionsValue = data.OutstandingPreemptionsValue;
|
|
255
|
+
this.userADUValue = data.UserADUValue;
|
|
256
|
+
this.userADUValueDisplay = data.UserADUValueDisplay;
|
|
257
|
+
this.audienceDeficitValue = data.AudienceDeficitValue;
|
|
258
|
+
this.audienceDeficitValueDisplay = data.AudienceDeficitValueDisplay;
|
|
259
|
+
this.userChangesValue = data.UserChangesValue;
|
|
260
|
+
this.userChangesValueDisplay = data.UserChangesValueDisplay;
|
|
261
|
+
this.buyerChangesValue = data.BuyerChangesValue;
|
|
262
|
+
this.buyerChangesValueDisplay = data.BuyerChangesValueDisplay;
|
|
263
|
+
this.buyerGrpChangesValue = data.BuyerGrpChangesValue;
|
|
264
|
+
this.buyerImpChangesValue = data.BuyerImpChangesValue;
|
|
265
|
+
this.buyerGrpChangesValueDisplay = data.BuyerGrpChangesValueDisplay;
|
|
266
|
+
this.buyerImpChangesValueDisplay = data.BuyerImpChangesValueDisplay;
|
|
267
|
+
this.buyerAddedValue = data.BuyerAddedValue;
|
|
268
|
+
this.buyerDeletedValue = data.BuyerDeletedValue;
|
|
269
|
+
this.buyerAddedValueDisplay = data.BuyerAddedDisplay;
|
|
270
|
+
this.buyerDeletedValueDisplay = data.BuyerDeletedDisplay;
|
|
271
|
+
this.displayRevisionType = RevisionTypeAndDisplayRevisionType[this.revisionType];
|
|
272
|
+
this.isDeletedAtTraffic = data.IsDeletedAtTraffic;
|
|
273
|
+
this.poDandAAKey = [
|
|
274
|
+
{
|
|
275
|
+
showObjectKey: true,
|
|
276
|
+
svgOrIconName: this.isDeletedAtTraffic ? "DELETED_ORDER" : null,
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
showObjectKey: false,
|
|
280
|
+
svgOrIconName: this.isPayForPerformanceOrder ? SvgOrIconNames.PAY_FOR_PERFORMANCE_ACTIVE : null,
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
showObjectKey: false,
|
|
284
|
+
svgOrIconName: this.isWriteEnabledOrder ? SvgOrIconNames.AUTOMATED : null,
|
|
285
|
+
},
|
|
286
|
+
];
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
var RevisionTypeAndDisplayRevisionType;
|
|
290
|
+
(function (RevisionTypeAndDisplayRevisionType) {
|
|
291
|
+
RevisionTypeAndDisplayRevisionType["SELLER USER"] = "Seller User";
|
|
292
|
+
RevisionTypeAndDisplayRevisionType["BUYER"] = "Buyer";
|
|
293
|
+
RevisionTypeAndDisplayRevisionType["ANNA"] = "ANNA";
|
|
294
|
+
})(RevisionTypeAndDisplayRevisionType || (RevisionTypeAndDisplayRevisionType = {}));
|
|
295
|
+
|
|
296
|
+
class GenericDailyRevisionService {
|
|
297
|
+
constructor() {
|
|
298
|
+
this.fromOrderRevisionsPage = false;
|
|
299
|
+
this.fromOrderHistoryPage = false;
|
|
300
|
+
}
|
|
301
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GenericDailyRevisionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
302
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GenericDailyRevisionService, providedIn: "root" }); }
|
|
303
|
+
}
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GenericDailyRevisionService, decorators: [{
|
|
305
|
+
type: Injectable,
|
|
306
|
+
args: [{
|
|
307
|
+
providedIn: "root",
|
|
308
|
+
}]
|
|
309
|
+
}] });
|
|
310
|
+
|
|
311
|
+
class OrderListingConstants {
|
|
312
|
+
static { this.InFlightAndUpcoming = "In-flight & Upcoming"; }
|
|
313
|
+
static { this.Completed = "Completed"; }
|
|
314
|
+
static { this.BlankAndDeleted = "Blank & Deleted"; }
|
|
315
|
+
static { this.Deleted = "Deleted"; }
|
|
316
|
+
static { this.TodaysANNAOffers = "Today’s ANNA Offers"; }
|
|
317
|
+
static { this.TodaysUserOffers = "Today’s User Offers"; }
|
|
318
|
+
static { this.OffersAwaitingApproval = "Offers Awaiting Approval"; }
|
|
319
|
+
static { this.RATING = "RATING"; }
|
|
320
|
+
static { this.IMPRESSIONS = "IMPRESSIONS"; }
|
|
321
|
+
static { this.GRP = "GRP"; }
|
|
322
|
+
static { this.TvRevenueAndDigital = "TV & Digital"; }
|
|
323
|
+
static { this.DRR = "Daily Revisions"; }
|
|
324
|
+
static { this.TvRevenue = "TV Revenue"; }
|
|
325
|
+
static { this.TV = "TV"; }
|
|
326
|
+
static { this.OtherRevenue = "Other Revenue"; }
|
|
327
|
+
static { this.AnnaOrderEntry = "ANNA ORDER ENTRY"; }
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
class ActionCommentsPopupComponent {
|
|
331
|
+
constructor(modalService) {
|
|
332
|
+
this.modalService = modalService;
|
|
333
|
+
this.applyCloseButtonText = { apply: "Apply", cancel: "Cancel" };
|
|
334
|
+
this.commented = new EventEmitter();
|
|
335
|
+
this.userActed = new EventEmitter();
|
|
336
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
337
|
+
this.cancel = new EventEmitter();
|
|
338
|
+
}
|
|
339
|
+
openModal(data, comment, customTopMessage = null) {
|
|
340
|
+
this.comment = cloneDeep(comment);
|
|
341
|
+
if (customTopMessage === "") {
|
|
342
|
+
this.infoMessage = null;
|
|
343
|
+
}
|
|
344
|
+
else if (customTopMessage) {
|
|
345
|
+
this.infoMessage = new MessageBoxData("", customTopMessage, "mdi mdi-information", GenericMessageBoxTheme.informationBlue.messageBoxClass);
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
this.infoMessage = new MessageBoxData("", "Please note, this comment will be entered on the rep platform against this offer.", "mdi mdi-information", GenericMessageBoxTheme.informationBlue.messageBoxClass);
|
|
349
|
+
}
|
|
350
|
+
this.spotData = cloneDeep(data);
|
|
351
|
+
this.originalComment = cloneDeep(this.comment);
|
|
352
|
+
this.disableApply = true;
|
|
353
|
+
const ngbModalOptions = {
|
|
354
|
+
backdrop: "static",
|
|
355
|
+
keyboard: false,
|
|
356
|
+
windowClass: "action-comment-modal",
|
|
357
|
+
};
|
|
358
|
+
this.actionCommentModalRef = this.modalService.open(this.actionCommentModal, ngbModalOptions);
|
|
359
|
+
}
|
|
360
|
+
cancelClicked() {
|
|
361
|
+
const revertToDefault = false;
|
|
362
|
+
// if ((this.title.includes("approve") && this.comment) || (this.title.includes("Credit") && this.comment)) {
|
|
363
|
+
// revertToDefault = false;
|
|
364
|
+
// }
|
|
365
|
+
// const actionTaken: "approve" | "credit" = this.title.includes("approve") ? "approve" : "credit";
|
|
366
|
+
// const payload = { revertToDefault, actionTaken };
|
|
367
|
+
this.cancel.emit(revertToDefault);
|
|
368
|
+
this.closeModal();
|
|
369
|
+
}
|
|
370
|
+
closeModal() {
|
|
371
|
+
this.actionCommentModalRef?.close();
|
|
372
|
+
}
|
|
373
|
+
apply() {
|
|
374
|
+
const trimmedComment = this.comment ? this.comment.trim() : null;
|
|
375
|
+
this.commented.emit({ spotData: this.spotData, comment: trimmedComment });
|
|
376
|
+
}
|
|
377
|
+
reasonChanged() {
|
|
378
|
+
this.enableDisableApply();
|
|
379
|
+
this.userActed.emit();
|
|
380
|
+
}
|
|
381
|
+
enableDisableApply() {
|
|
382
|
+
const isReofferPopup = this.title?.toLowerCase().includes("reoffer");
|
|
383
|
+
const isCancelPopup = this.title?.toLowerCase().includes("cancel");
|
|
384
|
+
const trimmedComment = this.comment ? this.comment.trim() : null;
|
|
385
|
+
if (isReofferPopup || isCancelPopup) {
|
|
386
|
+
const isCommentEmpty = !trimmedComment || trimmedComment === "";
|
|
387
|
+
this.disableApply = isCommentEmpty;
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
this.disableApply = this.originalComment === trimmedComment;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ActionCommentsPopupComponent, deps: [{ token: i1.NgbModal }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
394
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ActionCommentsPopupComponent, isStandalone: true, selector: "anna-feature-spots-approval-action-comments-popup", inputs: { title: "title", allowEdit: "allowEdit", applyCloseButtonText: "applyCloseButtonText" }, outputs: { commented: "commented", userActed: "userActed", cancel: "cancel" }, viewQueries: [{ propertyName: "actionCommentModal", first: true, predicate: ["actionCommentModal"], descendants: true, static: true }], ngImport: i0, template: "<ng-template\n #actionCommentModal\n let-modal\n>\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ title }}</h3>\n <i\n (click)=\"closeModal()\"\n class=\"mi mdi-close-icon mdi-font-md action-comments-close\"\n *ngIf=\"!allowEdit\"\n ></i>\n </div>\n <div class=\"modal-body\">\n <anna-design-message-box *ngIf=\"infoMessage\" [messageBoxData]=\"infoMessage\"></anna-design-message-box>\n <textarea\n [(ngModel)]=\"comment\"\n [disabled]=\"!allowEdit\"\n spellcheck=\"false\"\n (ngModelChange)=\"reasonChanged()\"\n ></textarea>\n\n <div\n class=\"button-container-modal\"\n *ngIf=\"allowEdit\"\n >\n <button\n class=\"anna cancel-button\"\n (click)=\"cancelClicked()\"\n >\n {{ applyCloseButtonText?.cancel }}\n </button>\n <button\n class=\"anna apply-button\"\n (click)=\"apply()\"\n [disabled]=\"disableApply\"\n >\n {{ applyCloseButtonText?.apply }}\n </button>\n </div>\n </div>\n</ng-template>\n", styles: ["textarea{resize:none;padding:8px;height:6.375rem;margin:12px 0 0;border-radius:4px;border:solid 1px #d4d4d4;width:100%;font-size:var(--page-link-fs)}.button-container-modal{display:flex;margin-top:24px}.button-container-modal button{border-radius:2px!important;border:none!important;font-size:.875rem;letter-spacing:normal;font-weight:400;line-height:normal}i.action-comments-close{float:right;margin-left:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AnnaDesignComponentsLibModule }, { kind: "component", type: i4.MessageBoxComponent, selector: "anna-design-message-box", inputs: ["messageBoxData", "showHyphen", "hide", "headerAsBlockElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
395
|
+
}
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ActionCommentsPopupComponent, decorators: [{
|
|
397
|
+
type: Component,
|
|
398
|
+
args: [{ selector: "anna-feature-spots-approval-action-comments-popup", imports: [CommonModule, FormsModule, AnnaDesignComponentsLibModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template\n #actionCommentModal\n let-modal\n>\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ title }}</h3>\n <i\n (click)=\"closeModal()\"\n class=\"mi mdi-close-icon mdi-font-md action-comments-close\"\n *ngIf=\"!allowEdit\"\n ></i>\n </div>\n <div class=\"modal-body\">\n <anna-design-message-box *ngIf=\"infoMessage\" [messageBoxData]=\"infoMessage\"></anna-design-message-box>\n <textarea\n [(ngModel)]=\"comment\"\n [disabled]=\"!allowEdit\"\n spellcheck=\"false\"\n (ngModelChange)=\"reasonChanged()\"\n ></textarea>\n\n <div\n class=\"button-container-modal\"\n *ngIf=\"allowEdit\"\n >\n <button\n class=\"anna cancel-button\"\n (click)=\"cancelClicked()\"\n >\n {{ applyCloseButtonText?.cancel }}\n </button>\n <button\n class=\"anna apply-button\"\n (click)=\"apply()\"\n [disabled]=\"disableApply\"\n >\n {{ applyCloseButtonText?.apply }}\n </button>\n </div>\n </div>\n</ng-template>\n", styles: ["textarea{resize:none;padding:8px;height:6.375rem;margin:12px 0 0;border-radius:4px;border:solid 1px #d4d4d4;width:100%;font-size:var(--page-link-fs)}.button-container-modal{display:flex;margin-top:24px}.button-container-modal button{border-radius:2px!important;border:none!important;font-size:.875rem;letter-spacing:normal;font-weight:400;line-height:normal}i.action-comments-close{float:right;margin-left:auto}\n"] }]
|
|
399
|
+
}], ctorParameters: () => [{ type: i1.NgbModal }], propDecorators: { title: [{
|
|
400
|
+
type: Input
|
|
401
|
+
}], allowEdit: [{
|
|
402
|
+
type: Input
|
|
403
|
+
}], applyCloseButtonText: [{
|
|
404
|
+
type: Input
|
|
405
|
+
}], commented: [{
|
|
406
|
+
type: Output
|
|
407
|
+
}], userActed: [{
|
|
408
|
+
type: Output
|
|
409
|
+
}], cancel: [{
|
|
410
|
+
type: Output
|
|
411
|
+
}], actionCommentModal: [{
|
|
412
|
+
type: ViewChild,
|
|
413
|
+
args: ["actionCommentModal", { static: true }]
|
|
414
|
+
}] } });
|
|
415
|
+
|
|
416
|
+
class OfferRejectionPopupComponent {
|
|
417
|
+
constructor(modalService) {
|
|
418
|
+
this.modalService = modalService;
|
|
419
|
+
this.rejectionHeader = "Reject Offer";
|
|
420
|
+
this.rejectionPopupData = {
|
|
421
|
+
showActionInRejectionPopup: true,
|
|
422
|
+
allowActionInRejectionPopup: false,
|
|
423
|
+
rejectActionComment: [],
|
|
424
|
+
excludeFromFutureOffers: false,
|
|
425
|
+
rejectionHeader: "Reject Offer"
|
|
426
|
+
};
|
|
427
|
+
this.isSubmitCommentButtonEnabled = false;
|
|
428
|
+
this.hideExcludePECheckbox = false;
|
|
429
|
+
this.apply = new EventEmitter();
|
|
430
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
431
|
+
this.cancel = new EventEmitter();
|
|
432
|
+
this.userActed = new EventEmitter();
|
|
433
|
+
}
|
|
434
|
+
setRevertToApproveIfCancelClickedInPopup(revertToApproveIfCancelClickedInPopup) {
|
|
435
|
+
this.revertToApproveIfCancelClickedInPopup = cloneDeep(revertToApproveIfCancelClickedInPopup);
|
|
436
|
+
this.openOfferRejectionReasonAndCommentModal();
|
|
437
|
+
}
|
|
438
|
+
openOfferRejectionReasonAndCommentModal() {
|
|
439
|
+
this.hideExcludePECheckbox = this.hideExcludePECheckbox || this.spotType.toLowerCase().includes("adu");
|
|
440
|
+
const ngbModalOptions = {
|
|
441
|
+
windowClass: "offer-rejection-modal",
|
|
442
|
+
};
|
|
443
|
+
const rejectionReasons = [];
|
|
444
|
+
this.offerRjectionPossibleReasons.forEach((item) => {
|
|
445
|
+
rejectionReasons.push({
|
|
446
|
+
title: item,
|
|
447
|
+
isSelected: this.rejectionPopupData.rejectActionComment &&
|
|
448
|
+
this.rejectionPopupData.rejectActionComment.includes(item),
|
|
449
|
+
});
|
|
450
|
+
});
|
|
451
|
+
this.offerRejectedReasonAndCommentPopupData = {
|
|
452
|
+
reasons: rejectionReasons,
|
|
453
|
+
comment: this.rejectionPopupData.rejectActionComment && !this.revertToApproveIfCancelClickedInPopup
|
|
454
|
+
? this.rejectionPopupData.rejectActionComment.filter((n) => !this.offerRjectionPossibleReasons.includes(n))[0]
|
|
455
|
+
: null,
|
|
456
|
+
isDisabled: !this.rejectionPopupData.allowActionInRejectionPopup,
|
|
457
|
+
disableApply: false,
|
|
458
|
+
excludeFutureOffers: this.rejectionPopupData.excludeFromFutureOffers,
|
|
459
|
+
disableCommentBox: !this.rejectionPopupData.allowActionInRejectionPopup ||
|
|
460
|
+
rejectionReasons.filter((n) => n.isSelected).length === 0,
|
|
461
|
+
commentBoxPlaceholder: rejectionReasons.filter((n) => n.title.includes("Other"))[0]?.isSelected
|
|
462
|
+
? "Please specify the reason for rejection (Max 200 characters)"
|
|
463
|
+
: "Please provide any additional comments for offer rejection here (Max 200 characters)",
|
|
464
|
+
};
|
|
465
|
+
this.disableEnableOfferRejectedReasonAndCommentPopupApplyButton();
|
|
466
|
+
if (this.offerRejectionReasonAndCommentModalRef) {
|
|
467
|
+
this.offerRejectionReasonAndCommentModalRef.close();
|
|
468
|
+
}
|
|
469
|
+
this.offerRejectionReasonAndCommentModalRef = this.modalService.open(this.offerRejectionReasonAndCommentModal, ngbModalOptions);
|
|
470
|
+
}
|
|
471
|
+
changesMadeInCommentBox(e) {
|
|
472
|
+
if (!/[a-zA-Z0-9 ]/.test(e.key)) {
|
|
473
|
+
e.preventDefault();
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
reasonTextChanged(event) {
|
|
477
|
+
this.userActed.emit();
|
|
478
|
+
this.rejectionReasonHasSpecialCharacter = !!/[`!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/.test(event);
|
|
479
|
+
this.disableEnableOfferRejectedReasonAndCommentPopupApplyButton();
|
|
480
|
+
}
|
|
481
|
+
closeOfferRejectionReasonAndCommentModal() {
|
|
482
|
+
let revertRadioButtonSelectionToApprove = false;
|
|
483
|
+
if (!this.offerRejectedReasonAndCommentPopupData.isDisabled) {
|
|
484
|
+
if (this.revertToApproveIfCancelClickedInPopup ||
|
|
485
|
+
this.rejectionPopupData.rejectActionComment === "" ||
|
|
486
|
+
!this.rejectionPopupData.rejectActionComment ||
|
|
487
|
+
this.rejectionPopupData.rejectActionComment.length === 0) {
|
|
488
|
+
revertRadioButtonSelectionToApprove = true;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
this.cancel.emit(revertRadioButtonSelectionToApprove);
|
|
492
|
+
this.offerRejectionReasonAndCommentModalRef.close();
|
|
493
|
+
}
|
|
494
|
+
applyOfferRejectionReasonSelectedAndComment() {
|
|
495
|
+
this.apply.emit({
|
|
496
|
+
comments: this.prepareCommentsArray(),
|
|
497
|
+
excludeFutureOffers: this.offerRejectedReasonAndCommentPopupData.excludeFutureOffers,
|
|
498
|
+
});
|
|
499
|
+
this.offerRejectionReasonAndCommentModalRef.close();
|
|
500
|
+
}
|
|
501
|
+
prepareCommentsArray() {
|
|
502
|
+
const comments = this.offerRejectedReasonAndCommentPopupData.reasons
|
|
503
|
+
.filter((n) => n.isSelected)
|
|
504
|
+
.map((n) => n.title);
|
|
505
|
+
const trimmedComment = this.offerRejectedReasonAndCommentPopupData.comment
|
|
506
|
+
? this.offerRejectedReasonAndCommentPopupData.comment.trim()
|
|
507
|
+
: null;
|
|
508
|
+
if (trimmedComment && trimmedComment !== "") {
|
|
509
|
+
comments.push(trimmedComment);
|
|
510
|
+
}
|
|
511
|
+
return comments;
|
|
512
|
+
}
|
|
513
|
+
isOfferRejectionReasonsChanged() {
|
|
514
|
+
return (!isEqual(this.prepareCommentsArray(), this.rejectionPopupData.rejectActionComment) ||
|
|
515
|
+
this.rejectionPopupData.excludeFromFutureOffers !==
|
|
516
|
+
this.offerRejectedReasonAndCommentPopupData.excludeFutureOffers);
|
|
517
|
+
}
|
|
518
|
+
disableEnableOfferRejectedReasonAndCommentPopupApplyButton() {
|
|
519
|
+
const trimmedComment = this.offerRejectedReasonAndCommentPopupData.comment
|
|
520
|
+
? this.offerRejectedReasonAndCommentPopupData.comment.trim()
|
|
521
|
+
: null;
|
|
522
|
+
this.offerRejectedReasonAndCommentPopupData.disableApply =
|
|
523
|
+
this.offerRejectedReasonAndCommentPopupData.reasons.filter((n) => n.isSelected).length === 0 ||
|
|
524
|
+
(this.offerRejectedReasonAndCommentPopupData.reasons.filter((n) => n.title.includes("Other"))[0]
|
|
525
|
+
.isSelected &&
|
|
526
|
+
(!trimmedComment || trimmedComment === "")) ||
|
|
527
|
+
!this.isOfferRejectionReasonsChanged() ||
|
|
528
|
+
this.rejectionReasonHasSpecialCharacter;
|
|
529
|
+
}
|
|
530
|
+
offerRejectionReasonCheckedOrUnchecked(index) {
|
|
531
|
+
this.userActed.emit();
|
|
532
|
+
if (!this.offerRejectedReasonAndCommentPopupData.isDisabled) {
|
|
533
|
+
this.offerRejectedReasonAndCommentPopupData.reasons[index].isSelected =
|
|
534
|
+
!this.offerRejectedReasonAndCommentPopupData.reasons[index].isSelected;
|
|
535
|
+
this.disableEnableOfferRejectedReasonAndCommentPopupApplyButton();
|
|
536
|
+
this.offerRejectedReasonAndCommentPopupData.disableCommentBox =
|
|
537
|
+
this.offerRejectedReasonAndCommentPopupData.reasons.filter((n) => n.isSelected).length === 0;
|
|
538
|
+
this.offerRejectedReasonAndCommentPopupData.commentBoxPlaceholder =
|
|
539
|
+
this.offerRejectedReasonAndCommentPopupData.reasons.filter((n) => n.title.includes("Other"))[0]
|
|
540
|
+
?.isSelected
|
|
541
|
+
? "Please specify the reason for rejection (Max 200 characters)"
|
|
542
|
+
: "Please provide any additional comments for offer rejection here (Max 200 characters)";
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
excludeFutureOffers() {
|
|
546
|
+
this.userActed.emit();
|
|
547
|
+
this.offerRejectedReasonAndCommentPopupData.excludeFutureOffers =
|
|
548
|
+
!this.offerRejectedReasonAndCommentPopupData.excludeFutureOffers;
|
|
549
|
+
this.disableEnableOfferRejectedReasonAndCommentPopupApplyButton();
|
|
550
|
+
}
|
|
551
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: OfferRejectionPopupComponent, deps: [{ token: i1.NgbModal }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
552
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: OfferRejectionPopupComponent, isStandalone: true, selector: "anna-feature-spots-approval-offer-rejection-popup", inputs: { spotType: "spotType", rejectionHeader: "rejectionHeader", rejectionPopupData: "rejectionPopupData", isSubmitCommentButtonEnabled: "isSubmitCommentButtonEnabled", offerRjectionPossibleReasons: "offerRjectionPossibleReasons", hideExcludePECheckbox: "hideExcludePECheckbox" }, outputs: { apply: "apply", cancel: "cancel", userActed: "userActed" }, viewQueries: [{ propertyName: "offerRejectionReasonAndCommentModal", first: true, predicate: ["offerRejectionReasonAndCommentModal"], descendants: true, static: true }], ngImport: i0, template: "<ng-template\n #offerRejectionReasonAndCommentModal\n let-modal\n>\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ rejectionHeader }}</h3>\n <i\n (click)=\"closeOfferRejectionReasonAndCommentModal()\"\n class=\"mi mdi-close-icon mdi-font-md offer-rejection-close\"\n *ngIf=\"offerRejectedReasonAndCommentPopupData?.isDisabled\"\n ></i>\n </div>\n <div class=\"modal-body offer-rejection-reasoning-modal\">\n <ng-container *ngIf=\"rejectionPopupData?.showActionInRejectionPopup\">\n <p class=\"mb-10\">\n {{\n offerRejectedReasonAndCommentPopupData.isDisabled\n ? \"Reason for rejection:\"\n : \"Please select reason for\n rejection:\"\n }}\n </p>\n <ul>\n <label\n *ngFor=\"let reason of offerRejectedReasonAndCommentPopupData.reasons; let i = index\"\n (click)=\"offerRejectionReasonCheckedOrUnchecked(i)\"\n [ngClass]=\"{ disabled: offerRejectedReasonAndCommentPopupData?.isDisabled }\"\n >\n <i\n class=\"mi mdi-check-box\"\n *ngIf=\"reason.isSelected\"\n ></i>\n <i\n class=\"mi mdi-check-box-outline-blank\"\n *ngIf=\"!reason.isSelected\"\n ></i>\n <span>{{ reason.title }}</span>\n </label>\n </ul>\n </ng-container>\n\n <p\n class=\"mb-10\"\n *ngIf=\"!rejectionPopupData?.showActionInRejectionPopup\"\n >\n Reason for rejection:\n </p>\n <textarea\n [(ngModel)]=\"offerRejectedReasonAndCommentPopupData.comment\"\n spellcheck=\"false\"\n id=\"offerRejectionCommentInput\"\n [disabled]=\"offerRejectedReasonAndCommentPopupData.disableCommentBox\"\n (ngModelChange)=\"reasonTextChanged($event)\"\n (keydown)=\"changesMadeInCommentBox($event)\"\n (keyup)=\"disableEnableOfferRejectedReasonAndCommentPopupApplyButton()\"\n placeholder=\"{{\n offerRejectedReasonAndCommentPopupData.isDisabled\n ? ''\n : offerRejectedReasonAndCommentPopupData.commentBoxPlaceholder\n }}\"\n maxlength=\"200\"\n ></textarea>\n <p\n class=\"text-danger\"\n *ngIf=\"rejectionReasonHasSpecialCharacter\"\n >\n Special Character not allowed\n </p>\n <hr *ngIf=\"rejectionPopupData?.showActionInRejectionPopup\" />\n <ng-container *ngIf=\"!hideExcludePECheckbox && rejectionPopupData?.showActionInRejectionPopup\">\n <p *ngIf=\"!offerRejectedReasonAndCommentPopupData.isDisabled\">\n You can choose to exclude the preemption(s) of this offer set from further attempts to find MakeGoods.\n In this case, you will have to manually create the MakeGoods.\n </p>\n <label\n class=\"mt-8\"\n (click)=\"excludeFutureOffers()\"\n [ngClass]=\"{ disabled: offerRejectedReasonAndCommentPopupData?.disableCommentBox }\"\n >\n <i\n class=\"mi mdi-check-box\"\n *ngIf=\"offerRejectedReasonAndCommentPopupData.excludeFutureOffers\"\n ></i>\n <i\n class=\"mi mdi-check-box-outline-blank\"\n *ngIf=\"!offerRejectedReasonAndCommentPopupData.excludeFutureOffers\"\n ></i>\n <span>Exclude the preemption(s) of this offer set from future attempts</span>\n </label>\n </ng-container>\n\n <ng-container *ngIf=\"!offerRejectedReasonAndCommentPopupData.isDisabled\">\n <p>\n Please note that the offer will not be marked as rejected if you do not select the reason for rejection.\n </p>\n <div class=\"button-container-modal\">\n <button\n class=\"anna cancel-button\"\n (click)=\"closeOfferRejectionReasonAndCommentModal()\"\n >\n Cancel\n </button>\n <button\n class=\"anna apply-button\"\n (click)=\"applyOfferRejectionReasonSelectedAndComment()\"\n [disabled]=\"offerRejectedReasonAndCommentPopupData.disableApply\"\n >\n Apply\n </button>\n </div>\n </ng-container>\n </div>\n</ng-template>\n", styles: ["::ng-deep .offer-rejection-modal>.modal-dialog>.modal-content{width:530px!important;min-width:530px!important;max-width:530px!important}.offer-rejection-close{float:right;margin-left:auto}.offer-rejection-reasoning-modal{color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}.offer-rejection-reasoning-modal p{margin-bottom:0}.offer-rejection-reasoning-modal p.mb-10{margin-bottom:8px}.offer-rejection-reasoning-modal ul{padding:0;height:80px;display:flex;flex-direction:column;flex-wrap:wrap;margin:0}.offer-rejection-reasoning-modal label{line-height:1.5;display:flex;align-items:center;cursor:pointer}.offer-rejection-reasoning-modal label i{color:#268bff;margin-right:4px}.offer-rejection-reasoning-modal label.disabled{pointer-events:none;cursor:default!important}.offer-rejection-reasoning-modal label.disabled i{color:#d4d4d4!important}textarea{resize:none;padding:8px;height:6.375rem;margin:0;border-radius:4px;border:solid 1px #d4d4d4;width:100%}.button-container-modal{display:flex;margin-top:24px}.button-container-modal button{border-radius:2px!important;border:none!important;font-size:.875rem;letter-spacing:normal;font-weight:400;line-height:normal}.mt-8{margin-top:.5rem}hr{margin:.625rem 0!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
553
|
+
}
|
|
554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: OfferRejectionPopupComponent, decorators: [{
|
|
555
|
+
type: Component,
|
|
556
|
+
args: [{ selector: "anna-feature-spots-approval-offer-rejection-popup", changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgIf, NgFor, NgClass, FormsModule], template: "<ng-template\n #offerRejectionReasonAndCommentModal\n let-modal\n>\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ rejectionHeader }}</h3>\n <i\n (click)=\"closeOfferRejectionReasonAndCommentModal()\"\n class=\"mi mdi-close-icon mdi-font-md offer-rejection-close\"\n *ngIf=\"offerRejectedReasonAndCommentPopupData?.isDisabled\"\n ></i>\n </div>\n <div class=\"modal-body offer-rejection-reasoning-modal\">\n <ng-container *ngIf=\"rejectionPopupData?.showActionInRejectionPopup\">\n <p class=\"mb-10\">\n {{\n offerRejectedReasonAndCommentPopupData.isDisabled\n ? \"Reason for rejection:\"\n : \"Please select reason for\n rejection:\"\n }}\n </p>\n <ul>\n <label\n *ngFor=\"let reason of offerRejectedReasonAndCommentPopupData.reasons; let i = index\"\n (click)=\"offerRejectionReasonCheckedOrUnchecked(i)\"\n [ngClass]=\"{ disabled: offerRejectedReasonAndCommentPopupData?.isDisabled }\"\n >\n <i\n class=\"mi mdi-check-box\"\n *ngIf=\"reason.isSelected\"\n ></i>\n <i\n class=\"mi mdi-check-box-outline-blank\"\n *ngIf=\"!reason.isSelected\"\n ></i>\n <span>{{ reason.title }}</span>\n </label>\n </ul>\n </ng-container>\n\n <p\n class=\"mb-10\"\n *ngIf=\"!rejectionPopupData?.showActionInRejectionPopup\"\n >\n Reason for rejection:\n </p>\n <textarea\n [(ngModel)]=\"offerRejectedReasonAndCommentPopupData.comment\"\n spellcheck=\"false\"\n id=\"offerRejectionCommentInput\"\n [disabled]=\"offerRejectedReasonAndCommentPopupData.disableCommentBox\"\n (ngModelChange)=\"reasonTextChanged($event)\"\n (keydown)=\"changesMadeInCommentBox($event)\"\n (keyup)=\"disableEnableOfferRejectedReasonAndCommentPopupApplyButton()\"\n placeholder=\"{{\n offerRejectedReasonAndCommentPopupData.isDisabled\n ? ''\n : offerRejectedReasonAndCommentPopupData.commentBoxPlaceholder\n }}\"\n maxlength=\"200\"\n ></textarea>\n <p\n class=\"text-danger\"\n *ngIf=\"rejectionReasonHasSpecialCharacter\"\n >\n Special Character not allowed\n </p>\n <hr *ngIf=\"rejectionPopupData?.showActionInRejectionPopup\" />\n <ng-container *ngIf=\"!hideExcludePECheckbox && rejectionPopupData?.showActionInRejectionPopup\">\n <p *ngIf=\"!offerRejectedReasonAndCommentPopupData.isDisabled\">\n You can choose to exclude the preemption(s) of this offer set from further attempts to find MakeGoods.\n In this case, you will have to manually create the MakeGoods.\n </p>\n <label\n class=\"mt-8\"\n (click)=\"excludeFutureOffers()\"\n [ngClass]=\"{ disabled: offerRejectedReasonAndCommentPopupData?.disableCommentBox }\"\n >\n <i\n class=\"mi mdi-check-box\"\n *ngIf=\"offerRejectedReasonAndCommentPopupData.excludeFutureOffers\"\n ></i>\n <i\n class=\"mi mdi-check-box-outline-blank\"\n *ngIf=\"!offerRejectedReasonAndCommentPopupData.excludeFutureOffers\"\n ></i>\n <span>Exclude the preemption(s) of this offer set from future attempts</span>\n </label>\n </ng-container>\n\n <ng-container *ngIf=\"!offerRejectedReasonAndCommentPopupData.isDisabled\">\n <p>\n Please note that the offer will not be marked as rejected if you do not select the reason for rejection.\n </p>\n <div class=\"button-container-modal\">\n <button\n class=\"anna cancel-button\"\n (click)=\"closeOfferRejectionReasonAndCommentModal()\"\n >\n Cancel\n </button>\n <button\n class=\"anna apply-button\"\n (click)=\"applyOfferRejectionReasonSelectedAndComment()\"\n [disabled]=\"offerRejectedReasonAndCommentPopupData.disableApply\"\n >\n Apply\n </button>\n </div>\n </ng-container>\n </div>\n</ng-template>\n", styles: ["::ng-deep .offer-rejection-modal>.modal-dialog>.modal-content{width:530px!important;min-width:530px!important;max-width:530px!important}.offer-rejection-close{float:right;margin-left:auto}.offer-rejection-reasoning-modal{color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}.offer-rejection-reasoning-modal p{margin-bottom:0}.offer-rejection-reasoning-modal p.mb-10{margin-bottom:8px}.offer-rejection-reasoning-modal ul{padding:0;height:80px;display:flex;flex-direction:column;flex-wrap:wrap;margin:0}.offer-rejection-reasoning-modal label{line-height:1.5;display:flex;align-items:center;cursor:pointer}.offer-rejection-reasoning-modal label i{color:#268bff;margin-right:4px}.offer-rejection-reasoning-modal label.disabled{pointer-events:none;cursor:default!important}.offer-rejection-reasoning-modal label.disabled i{color:#d4d4d4!important}textarea{resize:none;padding:8px;height:6.375rem;margin:0;border-radius:4px;border:solid 1px #d4d4d4;width:100%}.button-container-modal{display:flex;margin-top:24px}.button-container-modal button{border-radius:2px!important;border:none!important;font-size:.875rem;letter-spacing:normal;font-weight:400;line-height:normal}.mt-8{margin-top:.5rem}hr{margin:.625rem 0!important}\n"] }]
|
|
557
|
+
}], ctorParameters: () => [{ type: i1.NgbModal }], propDecorators: { spotType: [{
|
|
558
|
+
type: Input
|
|
559
|
+
}], rejectionHeader: [{
|
|
560
|
+
type: Input
|
|
561
|
+
}], rejectionPopupData: [{
|
|
562
|
+
type: Input
|
|
563
|
+
}], isSubmitCommentButtonEnabled: [{
|
|
564
|
+
type: Input
|
|
565
|
+
}], offerRjectionPossibleReasons: [{
|
|
566
|
+
type: Input
|
|
567
|
+
}], hideExcludePECheckbox: [{
|
|
568
|
+
type: Input
|
|
569
|
+
}], apply: [{
|
|
570
|
+
type: Output
|
|
571
|
+
}], cancel: [{
|
|
572
|
+
type: Output
|
|
573
|
+
}], userActed: [{
|
|
574
|
+
type: Output
|
|
575
|
+
}], offerRejectionReasonAndCommentModal: [{
|
|
576
|
+
type: ViewChild,
|
|
577
|
+
args: ["offerRejectionReasonAndCommentModal", { static: true }]
|
|
578
|
+
}] } });
|
|
579
|
+
|
|
580
|
+
// Angular import statements
|
|
581
|
+
class SpotApprovalGenericInFeatureSharedLibService {
|
|
582
|
+
static returnTooltipAndIconForSolvedType(solvedType, metric, valueToUse) {
|
|
583
|
+
switch (solvedType) {
|
|
584
|
+
case "LINE":
|
|
585
|
+
return {
|
|
586
|
+
icon: SvgOrIconNames.ALPHA_B_CIRCLE,
|
|
587
|
+
tooltipMsg: `The booked ${metric} for this spot is calculated based on the booked ${metric} (${valueToUse}) of the inventory code of the spot.`,
|
|
588
|
+
};
|
|
589
|
+
case "ROLLING_ESTIMATES":
|
|
590
|
+
return {
|
|
591
|
+
icon: SvgOrIconNames.ALPHA_R_CIRCLE,
|
|
592
|
+
tooltipMsg: `The booked ${metric} for this spot is calculated based on the ANNA Estimate value (${valueToUse}) of the program.`,
|
|
593
|
+
};
|
|
594
|
+
case "ESTIMATES":
|
|
595
|
+
return {
|
|
596
|
+
icon: SvgOrIconNames.ALPHA_E_CIRCLE,
|
|
597
|
+
tooltipMsg: `The booked ${metric} for this spot is calculated based on the station’s estimated ${metric} (${valueToUse}) of the program.`,
|
|
598
|
+
};
|
|
599
|
+
case "AVERAGE":
|
|
600
|
+
return {
|
|
601
|
+
icon: SvgOrIconNames.ALPHA_A_CIRCLE,
|
|
602
|
+
tooltipMsg: `The booked ${metric} for this spot is calculated based on the average booked ${metric} (${valueToUse}).`,
|
|
603
|
+
};
|
|
604
|
+
default:
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
static returnEstimatePriorities(data, estimatePriority) {
|
|
609
|
+
const firstAndSecondEstimatePrioritiesForRTGMetric = `${this.returnEstimateValueBasedOnKeyForRTGMetric(data, estimatePriority[0])} | ${this.returnEstimateValueBasedOnKeyForRTGMetric(data, estimatePriority[1])}`;
|
|
610
|
+
const thirdAndFourthEstimatePrioritiesForRTGMetric = `${this.returnEstimateValueBasedOnKeyForRTGMetric(data, estimatePriority[2])} | ${this.returnEstimateValueBasedOnKeyForRTGMetric(data, estimatePriority[3])}`;
|
|
611
|
+
const firstAndSecondEstimatePrioritiesForIMPSMetric = `${this.returnEstimateValueBasedOnKeyForIMPSMetric(data, estimatePriority[0])} | ${this.returnEstimateValueBasedOnKeyForIMPSMetric(data, estimatePriority[1])}`;
|
|
612
|
+
const thirdAndFourthEstimatePrioritiesForIMPSGMetric = `${this.returnEstimateValueBasedOnKeyForIMPSMetric(data, estimatePriority[2])} | ${this.returnEstimateValueBasedOnKeyForIMPSMetric(data, estimatePriority[3])}`;
|
|
613
|
+
return [
|
|
614
|
+
firstAndSecondEstimatePrioritiesForRTGMetric,
|
|
615
|
+
thirdAndFourthEstimatePrioritiesForRTGMetric,
|
|
616
|
+
firstAndSecondEstimatePrioritiesForIMPSMetric,
|
|
617
|
+
thirdAndFourthEstimatePrioritiesForIMPSGMetric,
|
|
618
|
+
];
|
|
619
|
+
}
|
|
620
|
+
// TODO ADD THE KEYS IN BE
|
|
621
|
+
static returnEstimateValueBasedOnKeyForRTGMetric(BEData, key) {
|
|
622
|
+
switch (key) {
|
|
623
|
+
case "AverageRTG":
|
|
624
|
+
return BEData.BookedAvgRatings !== null ? BEData.BookedAvgRatings : "-";
|
|
625
|
+
case "BookedRTG":
|
|
626
|
+
return BEData.BookedRatings !== null ? BEData.BookedRatings : "-";
|
|
627
|
+
case "RollingEstimate":
|
|
628
|
+
return BEData.RollingEstimateRatings === 0 ? "-" : BEData.RollingEstimateRatings;
|
|
629
|
+
case "StationEstimate":
|
|
630
|
+
return BEData.StationEstimateRatings === 0 ? "-" : BEData.StationEstimateRatings;
|
|
631
|
+
// no default
|
|
632
|
+
}
|
|
633
|
+
return "-";
|
|
634
|
+
}
|
|
635
|
+
static returnEstimateValueBasedOnKeyForIMPSMetric(data, key) {
|
|
636
|
+
switch (key) {
|
|
637
|
+
case "AverageRTG":
|
|
638
|
+
return data.BookedAvgImpressions !== null ? data.BookedAvgImpressions : "-";
|
|
639
|
+
case "BookedRTG":
|
|
640
|
+
return data.BookedImpressions !== null ? data.BookedImpressions : "-";
|
|
641
|
+
case "RollingEstimate":
|
|
642
|
+
return data.RollingEstimateImpressions === 0 ? "-" : data.RollingEstimateImpressions;
|
|
643
|
+
case "StationEstimate":
|
|
644
|
+
return data.StationEstimateImpressions === 0 ? "-" : data.StationEstimateImpressions;
|
|
645
|
+
// no default
|
|
646
|
+
}
|
|
647
|
+
return "-";
|
|
648
|
+
}
|
|
649
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpotApprovalGenericInFeatureSharedLibService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
650
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpotApprovalGenericInFeatureSharedLibService, providedIn: "root" }); }
|
|
651
|
+
}
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpotApprovalGenericInFeatureSharedLibService, decorators: [{
|
|
653
|
+
type: Injectable,
|
|
654
|
+
args: [{
|
|
655
|
+
providedIn: "root",
|
|
656
|
+
}]
|
|
657
|
+
}] });
|
|
658
|
+
|
|
659
|
+
class GenericFeatureRelatedConstants {
|
|
660
|
+
static { this.ProjectedGrpOrImpsMessage = "ANNA calculates projected RTG/IMPS values using either the computed estimates or the actual posted data, depending on what is available. If posted data has not yet been received, ANNA will use the computed estimates as the projected value. Once the actual posted data is received, the projection will automatically update to reflect the real, posted values. This ensures that projected data is always based on the most accurate and up-to-date information."; }
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
// biz-rules
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Generated bundle index. Do not edit.
|
|
667
|
+
*/
|
|
668
|
+
|
|
669
|
+
export { ANNAOfferSpecificDRROrderDataForBuyer, ANNAOfferSpecificDRROrderDataForSeller, ActionCommentsPopupComponent, AdditionalDRROrderGenericData, BizHistoryType, BizRuleStatus, BuyerContactInfo, DRROrderGenericData, GenericBusinessRuleCommonSIBILogicService, GenericDailyRevisionService, GenericFeatureRelatedConstants, OfferRejectionPopupComponent, OrderListingConstants, OrderMetrics, PrimaryOrderPanelService, RevisionTypeAndDisplayRevisionType, SpotApprovalGenericInFeatureSharedLibService, StationRevisionInformationForUserOffers, StatusCodeAndBackgroundColors, StatusCodeAndClass, UserOfferSpecificDRROrderDataForSeller };
|
|
670
|
+
//# sourceMappingURL=annalib-anna-feature-shared-lib.mjs.map
|