@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.
- package/README.md +63 -0
- package/advertiser-listing/index.d.ts +5 -0
- package/advertiser-listing/public-api.d.ts +5 -0
- package/advertiser-listing/src/advertiser-filter-modal/advertiser-filter-modal.component.d.ts +91 -0
- package/advertiser-listing/src/advertiser-filter-modal/models/advertiser-filter-modal.model.d.ts +13 -0
- package/advertiser-listing/src/advertiser-table-listing/advertiser-table-listing.component.d.ts +81 -0
- package/advertiser-listing/src/advertiser-table-listing/model/adv-table-listing.model.d.ts +24 -0
- package/advertiser-listing/src/advertiser-table-listing/services/adv-table-listing.service.d.ts +6 -0
- package/biz-rules-order-listing/index.d.ts +5 -0
- package/biz-rules-order-listing/public-api.d.ts +5 -0
- package/biz-rules-order-listing/src/biz-rules-order-listing.component.d.ts +139 -0
- package/biz-rules-order-listing/src/model/biz-rule-order-listing.constant.d.ts +35 -0
- package/biz-rules-order-listing/src/model/biz-rule-order-listing.model.d.ts +107 -0
- package/biz-rules-order-listing/src/service/automation-activated-and-pod.token.service.d.ts +24 -0
- package/biz-rules-order-listing/src/service/biz-rule-order-listing-backend.service.d.ts +18 -0
- package/business-rules/index.d.ts +5 -0
- package/business-rules/public-api.d.ts +27 -0
- package/business-rules/src/add-buyer-contact/models/add-buyer-contact.model.d.ts +13 -0
- package/business-rules/src/add-edit-buyer-contact-popup/add-edit-buyer-contact-popup.component.d.ts +53 -0
- package/business-rules/src/add-edit-buyer-contact-popup/services/buyer-contact-token.service.d.ts +6 -0
- package/business-rules/src/adu-rules/adu-rules.component.d.ts +88 -0
- package/business-rules/src/adu-rules/models/adu-rules.model.d.ts +84 -0
- package/business-rules/src/approval-config/approval-config.component.d.ts +49 -0
- package/business-rules/src/approval-config/services/approval-config.service.d.ts +10 -0
- package/business-rules/src/avatar/avatar.component.d.ts +18 -0
- package/business-rules/src/business-rule-page/business-rule-page.component.d.ts +95 -0
- package/business-rules/src/business-rule-page/models/business-rule-page.constants.d.ts +70 -0
- package/business-rules/src/business-rule-page/models/business-rule.model.d.ts +567 -0
- package/business-rules/src/business-rule-page/services/business-rule-common-SI-BI-logic.service.d.ts +19 -0
- package/business-rules/src/business-rules-history/business-rules-history.component.d.ts +44 -0
- package/business-rules/src/business-rules-history/models/biz-rule-history.model.d.ts +28 -0
- package/business-rules/src/business-rules-history-popup/business-rules-history-popup.component.d.ts +60 -0
- package/business-rules/src/business-rules-history-popup/models/business-rules-history-popup.model.d.ts +15 -0
- package/business-rules/src/buyer-contact-history/buyer-contact-history.component.d.ts +31 -0
- package/business-rules/src/buyer-contact-history/models/buyer-contact-history.model.d.ts +16 -0
- package/business-rules/src/buyer-contact-section/buyer-rep-contact-section.component.d.ts +43 -0
- package/business-rules/src/buyer-contact-section/models/buyer-contact.model.d.ts +52 -0
- package/business-rules/src/copy-biz-rules-popup/copy-biz-rules-popup.component.d.ts +91 -0
- package/business-rules/src/copy-biz-rules-popup/copy-business-rule-backend-service.token.d.ts +12 -0
- package/business-rules/src/copy-biz-rules-popup/models/copy-biz-rules.model.d.ts +47 -0
- package/business-rules/src/daypart-grouping-popup/daypart-grouping-popup.component.d.ts +31 -0
- package/business-rules/src/daypart-restrictions/daypart-restrictions.component.d.ts +62 -0
- package/business-rules/src/daypart-restrictions/pipe/replaceEnd.pipe.d.ts +7 -0
- package/business-rules/src/equivalent-and-higher-daypart/equivalent-and-higher-daypart.component.d.ts +39 -0
- package/business-rules/src/excluded-or-special-program/excluded-or-special-program.component.d.ts +58 -0
- package/business-rules/src/general-rules/general-rules.component.d.ts +105 -0
- package/business-rules/src/general-rules/models/general-rules-constant.d.ts +21 -0
- package/business-rules/src/inherit-biz-rule-approval-popup/inherit-biz-rule-approval-popup.component.d.ts +66 -0
- package/business-rules/src/inherit-biz-rule-approval-popup/models/inherit-biz-rule-approval-popup.model.d.ts +47 -0
- package/business-rules/src/inherit-biz-rule-approval-popup/services/inherit-biz-rule-approval-popup.service.d.ts +9 -0
- package/business-rules/src/make-good-rules/make-good-rules.component.d.ts +86 -0
- package/business-rules/src/make-good-rules/models/make-good-rules.model.d.ts +98 -0
- package/business-rules/src/make-good-rules/validators/relaxedValidation.d.ts +2 -0
- package/business-rules/src/mass-copy-biz-rules-popup/mass-copy-biz-rules-popup.component.d.ts +59 -0
- package/business-rules/src/mass-copy-biz-rules-popup/models/mass-copy-biz-rules.model.d.ts +32 -0
- package/fesm2022/annalib-anna-feature-biz-rules-advertiser-listing.mjs +768 -0
- package/fesm2022/annalib-anna-feature-biz-rules-advertiser-listing.mjs.map +1 -0
- package/fesm2022/annalib-anna-feature-biz-rules-biz-rules-order-listing.mjs +1068 -0
- package/fesm2022/annalib-anna-feature-biz-rules-biz-rules-order-listing.mjs.map +1 -0
- package/fesm2022/annalib-anna-feature-biz-rules-business-rules.mjs +6987 -0
- package/fesm2022/annalib-anna-feature-biz-rules-business-rules.mjs.map +1 -0
- package/fesm2022/annalib-anna-feature-biz-rules.mjs +88 -0
- package/fesm2022/annalib-anna-feature-biz-rules.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/anna-feature-biz-rules.module.d.ts +20 -0
- package/package.json +45 -0
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annalib-anna-feature-biz-rules-business-rules.mjs","sources":["../../../projects/anna-feature-biz-rules/business-rules/src/add-edit-buyer-contact-popup/services/buyer-contact-token.service.ts","../../../projects/anna-feature-biz-rules/business-rules/src/business-rule-page/models/business-rule-page.constants.ts","../../../projects/anna-feature-biz-rules/business-rules/src/business-rule-page/models/business-rule.model.ts","../../../projects/anna-feature-biz-rules/business-rules/src/business-rule-page/services/business-rule-common-SI-BI-logic.service.ts","../../../projects/anna-feature-biz-rules/business-rules/src/daypart-grouping-popup/daypart-grouping-popup.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/daypart-grouping-popup/daypart-grouping-popup.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/adu-rules/adu-rules.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/adu-rules/adu-rules.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/approval-config/services/approval-config.service.ts","../../../projects/anna-feature-biz-rules/business-rules/src/approval-config/approval-config.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/approval-config/approval-config.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/daypart-restrictions/pipe/replaceEnd.pipe.ts","../../../projects/anna-feature-biz-rules/business-rules/src/daypart-restrictions/daypart-restrictions.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/daypart-restrictions/daypart-restrictions.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/equivalent-and-higher-daypart/equivalent-and-higher-daypart.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/equivalent-and-higher-daypart/equivalent-and-higher-daypart.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/excluded-or-special-program/excluded-or-special-program.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/excluded-or-special-program/excluded-or-special-program.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/make-good-rules/validators/relaxedValidation.ts","../../../projects/anna-feature-biz-rules/business-rules/src/general-rules/models/general-rules-constant.ts","../../../projects/anna-feature-biz-rules/business-rules/src/general-rules/general-rules.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/general-rules/general-rules.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/make-good-rules/make-good-rules.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/make-good-rules/make-good-rules.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/business-rule-page/business-rule-page.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/business-rule-page/business-rule-page.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/business-rules-history/models/biz-rule-history.model.ts","../../../projects/anna-feature-biz-rules/business-rules/src/business-rules-history/business-rules-history.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/business-rules-history/business-rules-history.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/business-rules-history-popup/business-rules-history-popup.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/business-rules-history-popup/business-rules-history-popup.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/business-rules-history-popup/models/business-rules-history-popup.model.ts","../../../projects/anna-feature-biz-rules/business-rules/src/buyer-contact-history/models/buyer-contact-history.model.ts","../../../projects/anna-feature-biz-rules/business-rules/src/buyer-contact-history/buyer-contact-history.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/buyer-contact-history/buyer-contact-history.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/buyer-contact-section/models/buyer-contact.model.ts","../../../projects/anna-feature-biz-rules/business-rules/src/add-edit-buyer-contact-popup/add-edit-buyer-contact-popup.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/add-edit-buyer-contact-popup/add-edit-buyer-contact-popup.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/avatar/avatar.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/avatar/avatar.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/buyer-contact-section/buyer-rep-contact-section.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/buyer-contact-section/buyer-rep-contact-section.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/copy-biz-rules-popup/copy-business-rule-backend-service.token.ts","../../../projects/anna-feature-biz-rules/business-rules/src/copy-biz-rules-popup/models/copy-biz-rules.model.ts","../../../projects/anna-feature-biz-rules/business-rules/src/copy-biz-rules-popup/copy-biz-rules-popup.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/copy-biz-rules-popup/copy-biz-rules-popup.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/inherit-biz-rule-approval-popup/models/inherit-biz-rule-approval-popup.model.ts","../../../projects/anna-feature-biz-rules/business-rules/src/inherit-biz-rule-approval-popup/services/inherit-biz-rule-approval-popup.service.ts","../../../projects/anna-feature-biz-rules/business-rules/src/inherit-biz-rule-approval-popup/inherit-biz-rule-approval-popup.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/inherit-biz-rule-approval-popup/inherit-biz-rule-approval-popup.component.html","../../../projects/anna-feature-biz-rules/business-rules/src/mass-copy-biz-rules-popup/models/mass-copy-biz-rules.model.ts","../../../projects/anna-feature-biz-rules/business-rules/src/mass-copy-biz-rules-popup/mass-copy-biz-rules-popup.component.ts","../../../projects/anna-feature-biz-rules/business-rules/src/mass-copy-biz-rules-popup/mass-copy-biz-rules-popup.component.html","../../../projects/anna-feature-biz-rules/business-rules/annalib-anna-feature-biz-rules-business-rules.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nexport const BUYER_CONTACT_SERVICE_TOKEN: InjectionToken<IBuyerContactBackendService> =\n new InjectionToken<IBuyerContactBackendService>(\"IBuyerContactBackendService token\");\n\nexport interface IBuyerContactBackendService {\n validateEmailDomains(stationId: number): Observable<any>;\n}\n","/* eslint-disable max-len */\n// export enum BusinessRuleSectionName {\n// MG_RULES = \"MakeGood Business Rules\",\n// ADU_RULES = \"ADU Business Rules\",\n// // EQUIVALENT_DAYPARTS = \"Equivalent and Higher DPs\",\n// DAY_AND_DAYPART_RESTICTIONS = \"Day & Daypart Restrictions\",\n// EQUIVALENT_AND_HIGHER_DAYPARTS = \"Equivalent & Higher Dayparts\",\n// EXCLUDED_PROGRAM = \"Excluded Programs\",\n// SPECIAL_PROGRAM = \"Special Programs\"\n// }\n\nexport enum BusinessRuleSectionName {\n APPROVALS = \"Approvals\",\n DAYPART_RESTRICTION = \"DP Restrictions\",\n EQUIVALENT_DAYPARTS = \"Equivalent & Higher DPs\",\n EXCLUDED_PROGRAM = \"Excluded Programs\",\n SPECIAL_PROGRAM = \"Special Programs\",\n MG_RULES = \"MakeGoods\",\n ADU_RULES = \"ADUs\",\n GENERAL_RULES = \"General\",\n}\n\nexport enum BusinessRuleSectionNameForCopyBizRule {\n MG_RULES = \"MakeGoods\",\n ADU_RULES = \"ADUs\",\n GENERAL_RULES = \"General\",\n DAY_AND_DAYPART_RESTICTIONS = \"DP Restrictions\",\n EQUIVALENT_AND_HIGHER_DAYPARTS = \"Equivalent & Higher DPs\",\n EXCLUDED_PROGRAM_AND_SPECIAL_PROGRAM = \"Excluded & Special Programs\",\n}\n\nexport enum BizHistoryRuleUrl {\n Approvals = \"Approvals\",\n DaypartRestriction = \"DP Restrictions\",\n EquivalentAndHigherDaypart = \"Equivalent & Higher DPs\",\n MG = \"MakeGoods\",\n ADU = \"ADUs\",\n General = \"General\",\n ExcludePrograms = \"Excluded Programs\",\n SpecialPrograms = \"Special Programs\",\n}\n\nexport class BusinessRuleLevelConstant {\n static readonly ADVERTISER = \"advertiser\";\n static readonly ORDER = \"order\";\n static readonly STATION = \"station\";\n}\n\nexport enum BusinessPageType {\n ORDER = \"ORDER\",\n ADVERTISER = \"ADVERTISER\",\n STATION = \"STATION\",\n}\nexport enum UserTypeEnum {\n BUYER = \"BUYER\",\n SELLER = \"SELLER\",\n}\n\nexport type BusinessRuleListType = {\n id: number;\n name: BusinessRuleSectionName;\n differenceValue?: number;\n differenceIdentifyingKey:\n | \"numberOfDpRestrictionRulesChanged\"\n | \"numberEquivalencyRulesChanged\"\n | \"numberOfMakeGoodRulesChanged\"\n | \"numberOfAduRulesChanged\"\n | \"numberOfGeneralRulesChanged\"\n | \"numberOfExcludedProgramsSelectionChanged\"\n | \"numberOfSpecialProgramsSelectionChanged\";\n};\n\nexport class BusinessRulePageConstant {\n static readonly MGDOrADUisableChanged = \"MGDOrADUisableChanged\";\n static readonly approvedBy = \" Approved by: \";\n\n static readonly notifyBuyerMessage =\n \"Buyer business rules approval is pending. AE must set and save the business rules to notify the buyer for approval.\";\n static readonly notifyBuyerSavedRulesMessage =\n \"Buyer business rules approval is pending. AE needs to notify the buyer for their approval\";\n static readonly messageToInformCanUpdateBizRule =\n \"Default advertiser business rules shown below are applicable for this order. If required, you can modify and set new business rules for future use.\";\n static readonly rejectedMessage =\n \"Please note that the business rules for this order have been rejected by the buyer. Please review and save the business rules in order to reset and resend them to the buyer for approval. Until then the currently set business rules will be used to generate MG/ADU offers.\";\n static readonly awaitingApprovalMessage =\n \" Please note that the business rules for this order are not yet approved by the buyer. Until then the currently set business rules will be used to generate MG/ADU offers.\";\n\n // SPOT APPROVAL CONFIG MESSGAE\n\n static readonly addBuyerContactForSpotApprovalForOrder =\n 'If the value is set to \"Yes\", all offers for this order must be reviewed by the Buyer through email communications facilitated by ANNA.';\n static readonly addBuyerContactForSpotApprovalForAdvertiser = `If the value is set to \"Yes\", all offers for direct orders must be reviewed by the Buyer through email communications facilitated by ANNA.</br> All offers for electronic orders will be fed into the respective tool for buyer approval irrespective of this configuration.`;\n\n static spotsWillBeFedIntoTool(tool: string): string {\n return `The spots for these orders will be fed into the ${tool} tool for buyer approval.`;\n }\n}\n\nexport class DaypartRestrictionTimesToastrMessage {\n static readonly advertiser = \"The station daypart restriction times are updated as per WO Traffic. You can review the daypart restrictions for your advertiser and update them if needed. It is not updated for this advertiser because it follows custom business rules.\";\n static readonly order = \"The station daypart restriction times are updated as per WO Traffic. You can review the daypart restrictions for your order and update them if needed. It is not updated for this order because it follows custom business rules.\";\n}\n\nexport class ReconfirmationOptionLabels {\n static readonly offeredMgs = \"Offered MGs\";\n static readonly offeredAdus = \"Offered ADUs\";\n static readonly offeredBonusSpots = \"Offered Bonus\";\n static readonly CreditingExtraAdus = \"Crediting extra ADUs\";\n}","import { TitleCasePipe } from \"@angular/common\";\nimport { AnnaDateTimeFormatService } from \"@annalib/anna-core\";\nimport { IdText, SingleSelectIdText } from \"@annalib/anna-design-components-lib\";\nimport { BizRuleStatus } from \"@annalib/anna-feature-lib/anna-feature-shared-lib\";\nimport { map } from \"lodash-es\";\n\nimport { OrdersToBeInheritedActionType } from \"../../inherit-biz-rule-approval-popup/models/inherit-biz-rule-approval-popup.model\";\nimport { BusinessPageType, ReconfirmationOptionLabels, UserTypeEnum } from \"./business-rule-page.constants\";\n\nexport class BizRulesResponse {\n isParentStationBizRulesApproved: boolean;\n previousStatus: string;\n isExpired: boolean;\n expiredFromTrafficOn: string;\n highlightChanges: boolean;\n sellerName: string;\n inheritedLevel: BusinessPageType;\n isParentBizRulesInherited: boolean;\n lastSellerToEdit: string;\n lastBuyerToEdit: string;\n lastUserTypeToEdit: UserTypeEnum;\n comment: string;\n isSaved: boolean;\n businessRulesStatus: BizRuleStatus;\n isBuyerApprovalRequiredForPreApprovedSpots: boolean;\n isSellerApprovalRequiredForPreApprovedSpots: boolean;\n isBuyerBizRuleApprovalNeeded: boolean;\n isBuyerSpotApprovalNeeded: boolean;\n isProxyBuyerSpotsApprovalRequired: boolean;\n disableProxyBuyerSpotsApprovalToggle: boolean;\n allowEditForCompletedOrder: boolean;\n lastEditedAt: string;\n lastApprovedAt: string;\n stationName: string;\n advertiserName: string;\n ogName: string;\n minimumSeparation: string;\n\n hideBizRuleStatusAndButtonButShowBizRules: boolean;\n\n makeGoodRules: MakeGoodRulesResponse;\n aduRules: AduRules;\n generalRules: GeneralRules;\n approvalConfig: ApprovalConfig;\n dayAndDaypartRestrictionForMgAndAdu: DayAndDaypartRestrictionForMgAndAdu[] = [];\n equivalentAndHigherDaypartForMgAndAdu: EquivalentOrHigherDayparts[] = [];\n\n // keys added at UI\n selectedExcludedInventories: Inventory[] = [];\n selectedSpecialInventories: Inventory[] = [];\n nonSelectedInventories: Inventory[] = [];\n\n numberOfMakeGoodRulesChanged: number;\n numberOfAduRulesChanged: number;\n numberOfDpRestrictionRulesChanged: number;\n numberEquivalencyRulesChanged: number;\n numberOfExcludedProgramsSelectionChanged: number;\n numberOfSpecialProgramsSelectionChanged: number;\n numberOfGeneralRulesChanged: number;\n\n lastApprovedBusinessRulesHistoryId: number;\n\n lastApprovedUserTypeAndName: string;\n showBusinessRules: boolean;\n showBuyerContactSection: boolean;\n isPastOrderNotApprovedOrSet: boolean;\n hideBuyerEditContactButtonOrDisableBuyerContactForm: boolean;\n isAnyBizRuleChanged: boolean;\n isOrderCompletedBeforeStationBizRuleGotApproved: boolean;\n\n constructor(data: any, highlightChanges: boolean = false) {\n this.isParentStationBizRulesApproved = data?.IsParentStationBizRulesApproved;\n this.ogName = data?.OgName;\n this.minimumSeparation = data.MinimumSeparation;\n this.previousStatus = data.PreviousStatus ? data.PreviousStatus : \"-\";\n this.isExpired = data.IsExpired;\n this.approvalConfig = new ApprovalConfig(data?.Approvals);\n this.expiredFromTrafficOn = data.ExpiredOn;\n this.sellerName = data.SellerName;\n this.inheritedLevel = data.InheritedLevel;\n this.isParentBizRulesInherited = data.InheritsParentBizRules;\n this.lastSellerToEdit = data.LastSellerToEdit.trim();\n this.lastBuyerToEdit = data.LastBuyerToEdit.trim();\n this.lastUserTypeToEdit = data.LastUserTypeToEdit;\n this.comment = data.Comment;\n this.isSaved = data.IsSaved;\n this.allowEditForCompletedOrder = data.AllowEditForCompletedOrder;\n this.generalRules = new GeneralRules(data.GeneralRules);\n\n // this.isPod = data.IsPod;\n this.numberEquivalencyRulesChanged = data.NumberOfEquivalentOrHigherDaypartsChanged;\n this.numberOfDpRestrictionRulesChanged = data.NumberOfDaypartRestrictionsChanged;\n // this.isDefault = data.IsDefault;\n this.businessRulesStatus = data.BusinessRulesStatus;\n this.isBuyerApprovalRequiredForPreApprovedSpots = data.IsBuyerApprovalRequiredForPreApprovedSpots;\n this.isSellerApprovalRequiredForPreApprovedSpots = data.IsSellerApprovalRequiredForPreApprovedSpots;\n this.isBuyerBizRuleApprovalNeeded = data.IsBuyerBizRuleApprovalNeeded;\n this.isBuyerSpotApprovalNeeded = data.IsBuyerSpotApprovalNeeded;\n this.isProxyBuyerSpotsApprovalRequired = data.IsBuyerSpotsApprovalRequiredBySeller;\n this.disableProxyBuyerSpotsApprovalToggle = data.DisableBuyerSpotsApprovalRequiredBySellerToggle;\n this.lastEditedAt = data.LastEditedAt;\n this.stationName = data.StationName;\n this.advertiserName = data.AdvertiserName;\n this.numberOfMakeGoodRulesChanged = data.NumberOfMakeGoodRulesChanged;\n this.numberOfAduRulesChanged = data.NumberOfAduRulesChanged;\n this.numberOfGeneralRulesChanged = data.NumberOfGeneralRulesChanged;\n this.numberOfExcludedProgramsSelectionChanged = data.NumberOfExcludedProgramsSelectionChanged;\n this.numberOfSpecialProgramsSelectionChanged = data.NumberOfSpecialProgramsSelectionChanged;\n this.isAnyBizRuleChanged =\n this.numberOfMakeGoodRulesChanged > 0 ||\n this.numberOfAduRulesChanged > 0 ||\n this.numberEquivalencyRulesChanged > 0 ||\n this.numberOfDpRestrictionRulesChanged > 0 ||\n this.numberOfExcludedProgramsSelectionChanged > 0 ||\n this.numberOfSpecialProgramsSelectionChanged > 0 ||\n this.numberOfGeneralRulesChanged > 0;\n this.highlightChanges = highlightChanges;\n\n this.hideBizRuleStatusAndButtonButShowBizRules =\n data.HideBizRuleStatusAndButton && !data.AllowEditForCompletedOrder;\n this.showBusinessRules = data.ShowBusinessRules;\n this.showBuyerContactSection = data.ShowBuyerContactSection;\n this.isPastOrderNotApprovedOrSet = data.IsPastOrderNotApprovedOrSet;\n this.hideBuyerEditContactButtonOrDisableBuyerContactForm = data.HideBuyerContactButton;\n this.isOrderCompletedBeforeStationBizRuleGotApproved = data.IsOrderCompletedBeforeStationBizRuleGotApproved;\n\n this.lastApprovedAt = data.LastApprovedAt;\n this.lastSellerToEdit = data.LastSellerToEdit.trim();\n this.lastBuyerToEdit = data.LastBuyerToEdit.trim();\n this.lastUserTypeToEdit = data.LastUserTypeToEdit;\n this.lastApprovedUserTypeAndName = `${data.LastApprovedByUserType} (${data.LastApprovedByUserName?.trim()})`;\n\n this.lastApprovedBusinessRulesHistoryId = data.LastApprovedBusinessRulesHistoryId;\n\n this.makeGoodRules = new MakeGoodRulesResponse(\n data.MakeGoodRules,\n data.DisableProvideOffersBasedOnSpecificWeekDaysToggle,\n );\n this.aduRules = new AduRules(data.AduRules, data.DisableProvideOffersBasedOnSpecificWeekDaysToggle);\n\n if (data?.UniquePrograms) {\n data.UniquePrograms.forEach((uniqueInvt: any) => {\n const inventory = new Inventory(uniqueInvt, this.highlightChanges);\n if (!inventory.isSelected) {\n this.nonSelectedInventories.push(inventory);\n }\n // eslint-disable-next-line max-len\n // Don't check for type = '-' and include in selected excluded or special. as these value contain the selected value.\n if (inventory.type === \"EXCLUDED\") {\n this.selectedExcludedInventories.push(inventory);\n }\n if (inventory.type === \"SPECIAL\") {\n this.selectedSpecialInventories.push(inventory);\n }\n });\n }\n\n data.DaypartRestriction.forEach((daypart: any) => {\n this.dayAndDaypartRestrictionForMgAndAdu.push(new DayAndDaypartRestrictionForMgAndAdu(daypart));\n });\n if (data.EquivalentOrHigherDayparts) {\n data.EquivalentOrHigherDayparts.forEach((item: any) => {\n this.equivalentAndHigherDaypartForMgAndAdu.push(new EquivalentOrHigherDayparts(item));\n });\n }\n }\n}\n\nexport class Inventory {\n programName: string;\n startEndTime: string;\n startTimeForFilter: string;\n endTimeForFilter: string;\n daypart: string;\n type: string;\n days: string;\n\n makeGoodSelected: boolean;\n isMakeGoodSelectedChanged: boolean;\n isAduSelectedChanged: boolean;\n aduSelected: boolean;\n isSelected: boolean;\n\n makeGoodCheckboxIsChangedIconActionKey: { showIcon: boolean; iconClass: string; isDisabledKey: boolean }[];\n aduCheckboxIsChangedIconActionKey: { showIcon: boolean; iconClass: string; isDisabledKey: boolean }[];\n\n constructor(data: any, highlightChanges: boolean) {\n this.programName = data.ProgramName;\n this.startEndTime = data.StartEndTime ? data.StartEndTime : \"-\";\n this.startTimeForFilter = data.StartTimeForFilter;\n this.endTimeForFilter = data.EndTimeForFilter;\n this.daypart = data.Daypart ? data.Daypart : \"-\";\n this.type = data.Type;\n this.days = data.Days ? data.Days : \"-\";\n\n this.makeGoodSelected = data.MakeGoodSelected?.Current;\n this.aduSelected = data.AduSelected?.Current;\n this.isSelected = data.IsSelected;\n this.isMakeGoodSelectedChanged = data.MakeGoodSelected?.IsChanged;\n this.isAduSelectedChanged = data.AduSelected?.IsChanged;\n\n this.makeGoodCheckboxIsChangedIconActionKey = [\n {\n showIcon: highlightChanges && data.MakeGoodSelected?.IsChanged,\n iconClass: \"input-difference-icon\",\n isDisabledKey: true,\n },\n ];\n\n this.aduCheckboxIsChangedIconActionKey = [\n {\n showIcon: highlightChanges && data.AduSelected?.IsChanged,\n iconClass: \"input-difference-icon\",\n isDisabledKey: true,\n },\n ];\n }\n}\n\nexport class PostingTypeBizRule {\n disablePostingTypeDropdown: boolean = false;\n previous: boolean;\n isChanged: boolean;\n postingTypesDropdownData: SingleSelectIdText[] = [];\n constructor(data: any) {\n this.disablePostingTypeDropdown = data?.DisablePostingType;\n this.previous = data.PostingType.Previous;\n this.isChanged = data.PostingType.IsChanged;\n let id = 0;\n data.PostingType.Types.forEach((postingType: any) => {\n this.postingTypesDropdownData.push(\n new SingleSelectIdText(\n id,\n postingType.DisplayName,\n postingType.Name,\n null,\n null,\n postingType.IsSelected,\n ),\n );\n id += 1;\n });\n }\n}\n\nexport interface CurrentPreviousIsChangedStringValues {\n Current: string;\n Previous: string;\n IsChanged: boolean;\n}\n\nexport interface CurrentPreviousIsChangedBoolValues {\n Current: boolean;\n Previous: boolean;\n IsChanged: boolean;\n}\n\nexport interface CurrentPreviousIsChangedNumberValues {\n Current: number;\n Previous: number;\n IsChanged: boolean;\n}\nexport class MeasurementAgencyBizRule {\n disableMeasurementAgencyDropdown: boolean = false;\n isChanged: boolean;\n measurementAgencyDropdownData: SingleSelectIdText[] = [];\n constructor(data: any) {\n this.disableMeasurementAgencyDropdown = data?.DisableMeasurementAgencies;\n this.isChanged = data?.MeasurementAgencies?.IsChanged;\n data?.MeasurementAgencies?.Types?.forEach((measurementAgencyType: any) => {\n this.measurementAgencyDropdownData.push(\n new SingleSelectIdText(\n measurementAgencyType.Name,\n measurementAgencyType.DisplayName,\n null,\n null,\n null,\n measurementAgencyType.IsSelected,\n ),\n );\n });\n }\n}\n\nclass AdvertiserSeperation {\n isAdvertiserSeparationNeeded: CurrentPreviousIsChangedBoolValues;\n advertiserSeparationValue: CurrentPreviousIsChangedStringValues;\n constructor(data: any) {\n this.isAdvertiserSeparationNeeded = data?.IsAdvertiserSeparationNeeded;\n this.advertiserSeparationValue = data?.AdvertiserSeparation;\n }\n}\n\nexport class GeneralRules {\n postingTypeBusinessRule: PostingTypeBizRule;\n measurementAgencyBizRule: MeasurementAgencyBizRule;\n maxSpotsAllowedInOTO: MaxSpotsAllowedDurationsForOTO;\n maxSpotsAllowedInStripDaily: MaxSpotsAllowedDurationsForStrip;\n maxSpotsAllowedInStripWeekly: MaxSpotsAllowedDurationsForStrip;\n advertiserSeperation: AdvertiserSeperation;\n\n constructor(data: any) {\n this.postingTypeBusinessRule = new PostingTypeBizRule(data);\n this.measurementAgencyBizRule = new MeasurementAgencyBizRule(data);\n this.maxSpotsAllowedInOTO = new MaxSpotsAllowedDurationsForOTO(data.MaxSpotsAllowedInOTO);\n this.maxSpotsAllowedInStripDaily = new MaxSpotsAllowedDurationsForStrip(data.MaxSpotsAllowedInStripDaily);\n this.maxSpotsAllowedInStripWeekly = new MaxSpotsAllowedDurationsForStrip(data.MaxSpotsAllowedInStripWeekly);\n this.advertiserSeperation = new AdvertiserSeperation(data);\n }\n}\nexport class RelaxedPreApprovedValues {\n preApproved: CurrentPreviousIsChangedNumberValues;\n relaxed: CurrentPreviousIsChangedNumberValues;\n constructor(data: any) {\n this.preApproved = data.PreApproved;\n this.relaxed = data.Relaxed;\n }\n}\n\nexport class DaypartGroups {\n daypartGroupList: DaypartGroupsList[] = [];\n allDaypartGroups: IdText[] = [];\n isChanged: boolean;\n constructor(data: any) {\n this.isChanged = data.IsChanged;\n\n data.CreatedGroups?.forEach((group: any) => {\n this.daypartGroupList.push(new DaypartGroupsList(group.GroupName, group.Dayparts));\n });\n\n data.AllDayparts.forEach((daypart: any) => {\n this.allDaypartGroups.push(new IdText(daypart.DaypartId, daypart.DaypartName));\n });\n }\n}\n\nexport class DaypartGroupsList {\n groupName: string;\n dayparts: IdText[] = [];\n isDuplicateGroupName: boolean = false;\n constructor(groupName: string, daypartList: any) {\n this.groupName = groupName;\n\n daypartList?.forEach((daypart: any) => {\n this.dayparts.push(new IdText(daypart.DaypartId, daypart.DaypartName));\n });\n }\n}\n\nexport class MaxSpotsAllowedDurationsForOTO {\n perHalfAnHour: RelaxedPreApprovedValues;\n halfHourToOneHour: RelaxedPreApprovedValues;\n oneHourToTwoHour: RelaxedPreApprovedValues;\n twoHoursToThreeHours: RelaxedPreApprovedValues;\n moreThanThreeHours?: RelaxedPreApprovedValues;\n constructor(data: any) {\n this.perHalfAnHour = new RelaxedPreApprovedValues(data.PerHalfHour);\n this.halfHourToOneHour = new RelaxedPreApprovedValues(data.HalfHourToOneHour);\n this.oneHourToTwoHour = new RelaxedPreApprovedValues(data.OneHourToTwoHours);\n this.twoHoursToThreeHours = new RelaxedPreApprovedValues(data.TwoHoursToThreeHours);\n this.moreThanThreeHours = new RelaxedPreApprovedValues(data.ThreeHoursPlus);\n }\n}\nexport class MaxSpotsAllowedDurationsForStrip {\n perHalfAnHour: RelaxedPreApprovedValues;\n halfHourToOneHour: RelaxedPreApprovedValues;\n oneHourToTwoHour: RelaxedPreApprovedValues;\n moreThanTwoHours?: RelaxedPreApprovedValues;\n constructor(data: any) {\n this.perHalfAnHour = new RelaxedPreApprovedValues(data.PerHalfHour);\n this.halfHourToOneHour = new RelaxedPreApprovedValues(data.HalfHourToOneHour);\n this.oneHourToTwoHour = new RelaxedPreApprovedValues(data.OneHourToTwoHours);\n this.moreThanTwoHours = new RelaxedPreApprovedValues(data.TwoHoursPlus);\n }\n}\n\nexport class MGADUCommonRules {\n // maxSpotsAllowedPerHalfHourInOTO: CurrentPreviousIsChangedNumberValues;\n // maxSpotsAllowedPerHalfHourInOTORelaxed: CurrentPreviousIsChangedNumberValues;\n // maxSpotsAllowedPerHalfHourInStripePerDay: CurrentPreviousIsChangedNumberValues;\n // maxSpotsAllowedPerHalfHourInStripePerDayRelaxed: CurrentPreviousIsChangedNumberValues;\n // maxSpotsAllowedPerHalfHourInStripePerWeek: CurrentPreviousIsChangedNumberValues;\n // maxSpotsAllowedPerHalfHourInStripePerWeekRelaxed: CurrentPreviousIsChangedNumberValues;\n isTresholdAllowed: CurrentPreviousIsChangedBoolValues;\n allowedInventory: AllowedInventoryOrTimeWindow;\n\n // equivalentOrHigherDayparts: EquivalentOrHigherDayparts[] = [];\n // daypartRestriction: DaypatrtRestriction[] = [];\n // added @ UI\n daypartRestrictionChanged: boolean;\n\n equivalentOrHigherDaypartsChangedForMg: boolean;\n equivalentOrHigherDaypartsChangedForAdu: boolean;\n constructor(data: any) {\n this.isTresholdAllowed = data.IsTresholdAllowed;\n // this.maxSpotsAllowedPerHalfHourInOTO = data.MaxSpotsAllowedPerHalfHourInOTO;\n // this.maxSpotsAllowedPerHalfHourInOTORelaxed = data.MaxSpotsAllowedPerHalfHourInOTORelaxed;\n // this.maxSpotsAllowedPerHalfHourInStripePerDay = data.MaxSpotsAllowedPerHalfHourInStripePerDay;\n // this.maxSpotsAllowedPerHalfHourInStripePerDayRelaxed = data.MaxSpotsAllowedPerHalfHourInStripePerDayRelaxed;\n // this.maxSpotsAllowedPerHalfHourInStripePerWeek = data.MaxSpotsAllowedPerHalfHourInStripePerWeek;\n // this.maxSpotsAllowedPerHalfHourInStripePerWeekRelaxed = data.MaxSpotsAllowedPerHalfHourInStripePerWeekRelaxed;\n this.allowedInventory = new AllowedInventoryOrTimeWindow(data.AllowedInventory);\n\n // data.EquivalentOrHigherDayparts && data.EquivalentOrHigherDayparts.forEach((item: any) => {\n // this.equivalentOrHigherDayparts.push(new EquivalentOrHigherDayparts(item));\n // });\n // data?.DaypartRestriction.forEach((daypart: any) => {\n // this.daypartRestriction.push(new DaypatrtRestriction(daypart));\n // });\n // this.daypartRestrictionChanged = this.daypartRestriction.filter(n => n.restrictedStartTimeForMg.IsChanged || n.restrictedEndTimeForMg.IsChanged || n.restrictedStartTimeForAdu.IsChanged || n.restrictedEndTimeForAdu.IsChanged).length > 0;\n\n // this.equivalentOrHigherDaypartsChangedForMg = this.equivalentOrHigherDayparts.filter(n => n.isEquivalentChangedForMg || n.isHigherChangedForMg).length > 0;\n // this.equivalentOrHigherDaypartsChangedForAdu = this.equivalentOrHigherDayparts.filter(n => n.isEquivalentChangedForAdu || n.isHigherChangedForAdu).length > 0;\n }\n}\n\nexport class MakeGoodRulesResponse extends MGADUCommonRules {\n disableGenerateMgsForUnresolvedSpotsToggle: boolean;\n disableProvideOffersBasedOnSpecificWeekDaysToggle: boolean;\n generateMgsForUnresolvedSpots: CurrentPreviousIsChangedBoolValues;\n maxPercentageOfGrpAllowedToMakeGood: CurrentPreviousIsChangedNumberValues;\n maxSpotsAllowedForEachSpot: CurrentPreviousIsChangedNumberValues;\n maxSpotsAllowedForEachSpotRelaxed: CurrentPreviousIsChangedNumberValues;\n minPercentageRating: CurrentPreviousIsChangedNumberValues;\n minPercentageRatingRelaxed: CurrentPreviousIsChangedNumberValues;\n enableGrouping: CurrentPreviousIsChangedBoolValues;\n isMakeGoodAllowedForSpecialDayparts: CurrentPreviousIsChangedBoolValues;\n isWeekdayAllowedOnWeekends: CurrentPreviousIsChangedBoolValues;\n isWeekdendAllowedOnWeekdays: CurrentPreviousIsChangedBoolValues;\n lowerLimitPercentageForProgramChange: CurrentPreviousIsChangedNumberValues;\n upperLimitPercentageForProgramChange: CurrentPreviousIsChangedNumberValues;\n specialDaypartAllowedInventory: AllowedInventoryOrTimeWindow;\n programChangeAllowedInventory: AllowedInventoryOrTimeWindow;\n timeWindow: AllowedInventoryOrTimeWindow;\n provideOffersBasedOnPreemptionDays: CurrentPreviousIsChangedBoolValues;\n provideOffersBasedOnSpecificWeekDays: CurrentPreviousIsChangedBoolValues;\n maxSpotsToBeGrouped: CurrentPreviousIsChangedNumberValues;\n maxSpotsToBeGroupedRelaxed: CurrentPreviousIsChangedNumberValues;\n\n constructor(data: any, disableProvideOffersToggle: boolean) {\n super(data);\n this.disableGenerateMgsForUnresolvedSpotsToggle = data.DisableGenerateMgsForUnresolvedSpotsToggle;\n this.disableProvideOffersBasedOnSpecificWeekDaysToggle = disableProvideOffersToggle;\n this.generateMgsForUnresolvedSpots = data.GenerateMgsForUnresolvedSpots;\n this.maxPercentageOfGrpAllowedToMakeGood = data.MaxPercentageOfGrpAllowedToMakeGood;\n this.maxSpotsAllowedForEachSpot = data.MaxSpotsAllowedForEachSpot;\n this.maxSpotsAllowedForEachSpotRelaxed = data.MaxSpotsAllowedForEachSpotRelaxed;\n this.minPercentageRating = data.MinPercentageRating;\n this.minPercentageRatingRelaxed = data.MinPercentageRatingRelaxed;\n this.enableGrouping = data.EnableGrouping;\n this.timeWindow = new AllowedInventoryOrTimeWindow(data.TimeWindow);\n this.isMakeGoodAllowedForSpecialDayparts = data.IsMakeGoodAllowedForSpecialDayparts;\n this.isWeekdayAllowedOnWeekends = data.IsWeekdayAllowedOnWeekends;\n this.isWeekdendAllowedOnWeekdays = data.IsWeekdendAllowedOnWeekdays;\n this.provideOffersBasedOnPreemptionDays = data.ProvideOffersBasedOnPreemptionDays;\n this.provideOffersBasedOnSpecificWeekDays = data.ProvideOffersBasedOnSpecificWeekDays;\n this.lowerLimitPercentageForProgramChange = data.LowerLimitPercentageForProgramChange;\n this.upperLimitPercentageForProgramChange = data.UpperLimitPercentageForProgramChange;\n this.specialDaypartAllowedInventory = new AllowedInventoryOrTimeWindow(data.SpecialDaypartAllowedInventory);\n this.programChangeAllowedInventory = new AllowedInventoryOrTimeWindow(data.ProgramChangeAllowedInventory);\n this.maxSpotsToBeGrouped = data.MaxSpotsToBeGrouped;\n this.maxSpotsToBeGroupedRelaxed = data.MaxSpotsToBeGroupedRelaxed;\n }\n}\n\nexport class AduRules extends MGADUCommonRules {\n generateAdu: CurrentPreviousIsChangedBoolValues;\n useProjectedValues: CurrentPreviousIsChangedBoolValues;\n percentageDeficitAllowedBeforeAdu: CurrentPreviousIsChangedNumberValues;\n timeWindowForProvidingAdu: AllowedInventoryOrTimeWindow;\n timeWindowForUdLiability: AllowedInventoryOrTimeWindow;\n daypartGroups: DaypartGroups;\n provideOffersBasedOnSpecificWeekDays: CurrentPreviousIsChangedBoolValues;\n provideAdusForShortestDuration: CurrentPreviousIsChangedBoolValues;\n sameDpGroupAllowedInventoryOption: PopulateListDropdown;\n disableProvideOffersBasedOnSpecificWeekDaysToggle: boolean;\n hasAduDiscrepancy: boolean;\n isUdLiabilityOrder: boolean;\n onlyForLiveOrders: CurrentPreviousIsChangedBoolValues;\n constructor(data: any, disableProvideOffersToggle: boolean) {\n super(data);\n this.isUdLiabilityOrder = data.IsSetUdLiabilityOrder;\n this.generateAdu = data.GenerateAdu;\n this.disableProvideOffersBasedOnSpecificWeekDaysToggle = disableProvideOffersToggle;\n this.useProjectedValues = data.UseProjectedValues;\n this.provideOffersBasedOnSpecificWeekDays = data.ProvideOffersBasedOnSpecificWeekDays;\n this.provideAdusForShortestDuration = data.ProvideAdusForShortestDuration;\n this.percentageDeficitAllowedBeforeAdu = data.PercentageDeficitAllowedBeforeAdu;\n this.hasAduDiscrepancy = data.HasAduDiscrepancy;\n // this.maxSpotsAllowedPerHalfHourInOTO = data.MaxSpotsAllowedPerHalfHourInOTO;\n // this.maxSpotsAllowedPerHalfHourInOTORelaxed = data.MaxSpotsAllowedPerHalfHourInOTORelaxed;\n // this.maxSpotsAllowedPerHalfHourInStripePerDay = data.MaxSpotsAllowedPerHalfHourInStripePerDay;\n // this.maxSpotsAllowedPerHalfHourInStripePerDayRelaxed = data.MaxSpotsAllowedPerHalfHourInStripePerDayRelaxed;\n // this.maxSpotsAllowedPerHalfHourInStripePerWeek = data.MaxSpotsAllowedPerHalfHourInStripePerWeek;\n // this.maxSpotsAllowedPerHalfHourInStripePerWeekRelaxed = data.MaxSpotsAllowedPerHalfHourInStripePerWeekRelaxed;\n this.isTresholdAllowed = data.IsTresholdAllowed;\n this.timeWindowForProvidingAdu = new AllowedInventoryOrTimeWindow(data.TimeWindowForProvidingAdu);\n this.timeWindowForUdLiability = new AllowedInventoryOrTimeWindow(data.TimeWindowForUdLiability);\n this.onlyForLiveOrders = data.OnlyForLiveOrders;\n this.daypartGroups = new DaypartGroups(data.DaypartGroups);\n this.sameDpGroupAllowedInventoryOption = this.allowedInventory.preApproved.find(\n (item) => item.inventory === \"SAME_DAYPART_GROUP_ANY_DAY\",\n );\n if (this.daypartGroups.daypartGroupList.length === 0) {\n this.allowedInventory.preApproved = this.allowedInventory.preApproved.filter(\n (item) => item.inventory !== \"SAME_DAYPART_GROUP_ANY_DAY\",\n );\n this.allowedInventory.relaxed = this.allowedInventory.relaxed.filter(\n (item) => item.inventory !== \"SAME_DAYPART_GROUP_ANY_DAY\",\n );\n }\n }\n}\n\nexport class BuyerContacts {\n campaignId: number;\n orderId: number;\n stationId: number;\n primaryContact: ContactDetails;\n secondaryContact: ContactDetails;\n\n constructor(data: any) {\n this.campaignId = data?.campaign_id ? data.campaign_id : null;\n this.orderId = data?.order_id ? data.order_id : null;\n this.stationId = data?.station_id ? data.station_id : null;\n this.primaryContact = data?.PrimaryBuyer ? new ContactDetails(data.PrimaryBuyer) : null;\n this.secondaryContact = data?.SecondaryBuyer ? new ContactDetails(data.SecondaryBuyer) : null;\n }\n}\n\nexport class ContactDetails {\n buyerId: number;\n name: string;\n email: string;\n contactNumber: string;\n type: string;\n constructor(data: any) {\n this.buyerId = data.BuyerId;\n this.name = data.Name;\n this.email = data.Email;\n this.contactNumber = data.ContactNumber;\n this.type = data.Type;\n }\n}\n\nexport class DropdownDataIdText {\n id: number;\n inventory: string;\n text: string;\n isSelected: boolean;\n constructor(data: any) {\n this.id = data.Id;\n this.inventory = data.Inventory;\n this.text = data.InventoryText;\n this.isSelected = data.IsSelected;\n }\n}\n\nexport class PopulateListDropdown {\n id: number;\n inventory: string;\n inventoryText: string;\n isSelected: boolean;\n constructor(data: any) {\n this.id = data.Id;\n this.inventory = data.Inventory;\n const titleCasePipe = new TitleCasePipe();\n this.inventoryText = data.InventoryText\n ? data.InventoryText\n : titleCasePipe.transform(data.Inventory.split(\"_\").join(\" \"));\n this.isSelected = data.IsSelected;\n }\n}\n\nexport class AllowedInventoryOrTimeWindow {\n previousPreApproved: PopulateListDropdown;\n previousRelaxed: PopulateListDropdown;\n isPreApprovedChanged: boolean;\n isRelaxedChanged: boolean;\n isInvalid: boolean;\n preApproved: PopulateListDropdown[] = [];\n relaxed: PopulateListDropdown[] = [];\n disableEditForRelaxed?: boolean;\n constructor(data: any) {\n this.previousPreApproved = data?.PreviousPreApproved\n ? new PopulateListDropdown(data?.PreviousPreApproved)\n : null;\n this.previousRelaxed = data?.PreviousRelaxed ? new PopulateListDropdown(data?.PreviousRelaxed) : null;\n this.isPreApprovedChanged = data.IsPreApprovedChanged;\n this.isRelaxedChanged = data.IsRelaxedChanged;\n if (data?.PreApproved) {\n data.PreApproved.forEach((item: any) => {\n this.preApproved.push(new PopulateListDropdown(item));\n });\n if (data?.Relaxed) {\n data.Relaxed.forEach((item: any) => {\n this.relaxed.push(new PopulateListDropdown(item));\n });\n }\n }\n const selectedLowPriorityOption = this.relaxed?.filter((e) => e.isSelected)[0];\n const selectedHighPriorityOption = this.preApproved?.filter((e) => e.isSelected)[0];\n this.isInvalid = selectedLowPriorityOption?.id < selectedHighPriorityOption?.id;\n this.disableEditForRelaxed = data?.DisableEditForRelaxed;\n }\n}\n\nexport class EquivalentOrHigherDayparts {\n originalDaypart: IdText;\n disableForEdit: boolean = false;\n higherDaypartsForMg: DayPartList[] = [];\n equivalentDaypartsForMg: DayPartList[] = [];\n // higherDaypartsForAdu: DayPartList[] = [];\n // equivalentDaypartsForAdu: DayPartList[] = [];\n\n isHigherChangedForMg: boolean = false;\n isEquivalentChangedForMg: boolean = false;\n // isHigherChangedForAdu: boolean = false;\n // isEquivalentChangedForAdu: boolean = false;\n\n isHigherEditedForMg: boolean = false;\n isEquivalentEditedForMg: boolean = false;\n // isHigherEditedForAdu: boolean = false;\n // isEquivalentEditedForAdu: boolean = false;\n\n isHigherDpForMgSelected: boolean = false;\n isEquivalentDpForMgSelected: boolean = false;\n // isHigherDpForAduSelected: boolean = false;\n // isEquivalentDpForAduSelected: boolean = false;\n\n constructor(data: any) {\n this.originalDaypart = new IdText(data.OriginalDaypart.Id, data.OriginalDaypart.Name);\n\n this.isEquivalentChangedForMg = data.IsMgEquivalentChanged;\n this.isHigherChangedForMg = data.IsMgHigherChanged;\n // this.isEquivalentChangedForAdu = data.IsAduEquivalentChanged;\n // this.isHigherChangedForAdu = data.IsAduHigherChanged;\n\n const selectedEquivalentDaypartsForMg = map(\n data.MgEquivalentDaypart.filter((n: any) => n.IsSelected),\n \"Id\",\n );\n const selectedHigherDaypartsForMg = map(\n data.MgHigherDaypart.filter((n: any) => n.IsSelected),\n \"Id\",\n );\n\n data.MgEquivalentDaypart.forEach((item: any) => {\n const isDisbaled = selectedHigherDaypartsForMg.includes(item.Id) || item.Id === this.originalDaypart.id;\n const additionalData = item.Id === this.originalDaypart.id ? \"(Original)\" : null;\n const daypart = new DayPartList(item, isDisbaled, additionalData);\n this.equivalentDaypartsForMg.push(daypart);\n });\n data.MgHigherDaypart.forEach((item: any) => {\n const isDisbaled = selectedEquivalentDaypartsForMg.includes(item.Id);\n const daypart = new DayPartList(item, isDisbaled);\n this.higherDaypartsForMg.push(daypart);\n });\n this.disableForEdit = data.OriginalDaypart.DisableEdits;\n this.higherDaypartsForMg = this.higherDaypartsForMg.filter((n) => n.id !== this.originalDaypart.id);\n\n // ADU\n // const selectedEquivalentDaypartsForAdu = map(\n // data.AduEquivalentDaypart.filter((n: any) => n.IsSelected),\n // \"Id\",\n // );\n // const selectedHigherDaypartsForAdu = map(\n // data.AduHigherDaypart.filter((n: any) => n.IsSelected),\n // \"Id\",\n // );\n // data.AduEquivalentDaypart.forEach((item: any) => {\n // const isDisbaled = selectedHigherDaypartsForAdu.includes(item.Id);\n // const daypart = new DayPartList(item, isDisbaled);\n // this.equivalentDaypartsForAdu.push(daypart);\n // });\n // this.equivalentDaypartsForAdu = this.equivalentDaypartsForAdu.filter((n) => n.id !== this.originalDaypart.id);\n\n // data.AduHigherDaypart.forEach((item: any) => {\n // const isDisbaled = selectedEquivalentDaypartsForAdu.includes(item.Id);\n // const daypart = new DayPartList(item, isDisbaled);\n // this.higherDaypartsForAdu.push(daypart);\n // });\n // this.higherDaypartsForAdu = this.higherDaypartsForAdu.filter((n) => n.id !== this.originalDaypart.id);\n }\n}\n\nexport class DayPartList {\n id: number;\n text: string;\n additionalData: string;\n isSelected: boolean;\n isDisabled: boolean;\n constructor(data: any, isDisbaled?: boolean, additionalData?: string) {\n this.id = data.Id;\n if (data.Name) {\n this.text = data.Name;\n } else {\n this.text = data.text ? data.text : \"\";\n }\n this.additionalData = additionalData;\n this.isSelected = data.IsSelected;\n this.isDisabled = isDisbaled || false;\n }\n}\n\nexport class WeekdaysAndWeekend {\n name: string;\n isSelected: boolean;\n constructor(data: any) {\n this.name = data.Days;\n this.isSelected = data.IsSelected;\n }\n}\n\nexport class DaySelected {\n name: string;\n isSelected: boolean;\n isChanged?: boolean;\n\n constructor(data: any) {\n if (data.Day === \"Su\") {\n this.name = \"Sunday\";\n } else if (data.Day === \"Sa\") {\n this.name = \"Saturday\";\n } else {\n this.name = data.Day;\n }\n\n this.isSelected = data.SelectionState.Current;\n this.isChanged = data.SelectionState.IsChanged;\n }\n}\n\n// !!isStartTimeRestricted and isEndTimeRestricted\nexport class DaypartRestrictionDetails {\n days: DaySelected[] = [];\n isDisabled: boolean;\n restrictedStartTime: CurrentPreviousIsChangedStringValues;\n restrictedEndTime: CurrentPreviousIsChangedStringValues;\n time: { time: string }[];\n daySelectedString: string = \"\";\n displayTime: string;\n isTimeEdited: boolean = false;\n isDaysChanged: boolean = false;\n isDaysEdited: boolean = false;\n constructor(data: any) {\n data.Days.forEach((day: any) => {\n this.days.push(new DaySelected(day));\n });\n\n let noDaySelected = true;\n this.days.forEach((day: DaySelected) => {\n if (day.isSelected) {\n noDaySelected = false;\n this.daySelectedString = `${this.daySelectedString}${day.name} `;\n } else if (!day.isSelected && day.name !== \"Saturday\" && day.name !== \"Sunday\") {\n this.daySelectedString = `${this.daySelectedString}- `;\n } else {\n this.daySelectedString = `${this.daySelectedString}${day.name} `;\n }\n });\n if (noDaySelected) {\n if (this.days.length >= 2) {\n this.daySelectedString = \"M T W Th F\";\n }\n }\n\n this.isDaysChanged = this.days.some((day) => {\n if (day.isChanged) {\n return true;\n }\n return false;\n });\n\n this.isDisabled = this.days.every((day: any) => !day.isSelected) || false;\n\n this.restrictedStartTime = data.RestrictedStartTime;\n this.restrictedEndTime = data.RestrictedEndTime;\n\n // let startTime = dayjs('1/1/1 ' + this.restrictedStartTime?.Current).format(\"hmm A\");\n // let endTime = dayjs('1/1/1 ' + this.restrictedEndTime?.Current).format(\"hmm A\");\n // this.displayTime =this.isDisabled ? '-': startTime + \" - \" + endTime;\n\n this.time = [{ time: data.RestrictedStartTime.Current }, { time: data.RestrictedEndTime.Current }];\n if (noDaySelected) {\n this.time[0].time = \"- \";\n this.time[1].time = \" \";\n }\n }\n}\n\nexport class DayAndDaypartRestriction {\n weekdays: DaypartRestrictionDetails;\n saturday: DaypartRestrictionDetails;\n sunday: DaypartRestrictionDetails;\n constructor(data: any) {\n this.weekdays = new DaypartRestrictionDetails(data.Weekday);\n this.saturday = new DaypartRestrictionDetails(data.Saturday);\n this.sunday = new DaypartRestrictionDetails(data.Sunday);\n }\n}\n\nexport class DayAndDaypartRestrictionForMgAndAdu {\n id: number;\n name: string;\n daysSelectedForMg: DayAndDaypartRestriction;\n daysSelectedForAdu: DayAndDaypartRestriction;\n constructor(data: any) {\n this.id = data.Id;\n this.name = data.Name;\n this.daysSelectedForMg = new DayAndDaypartRestriction(data.DaysSelectedForMg);\n this.daysSelectedForAdu = new DayAndDaypartRestriction(data.DaysSelectedForAdu);\n }\n}\n\nexport class DaypatrtRestriction {\n id: number;\n name: string;\n startTime: string;\n endTime: string;\n\n mgTime: any;\n\n // MG\n isStartTimeRestrictedForMg: boolean;\n isEndTimeRestrictedForMg: boolean;\n\n restrictedStartTimeForMg: CurrentPreviousIsChangedStringValues;\n restrictedEndTimeForMg: CurrentPreviousIsChangedStringValues;\n // keys added @ UI\n restrictedStartTimeHourForMg: string;\n restrictedStartTimeMinuteForMg: string;\n restrictedStartTimeAmpmForMg: string;\n restrictedEndTimeHourForMg: string;\n restrictedEndTimeMinuteForMg: string;\n restrictedEndTimeAmpmForMg: string;\n\n restrictedStartTimeHasValidationErrorForMg: boolean;\n restrictedEndTimeHasValidationErrorForMg: boolean;\n\n // will remove it\n restrictedStartTimeMinuteHasValidationError: boolean;\n restrictedStartTimeHourHasValidationError: boolean;\n restrictedEndTimeHourHasValidationError: boolean;\n restrictedEndTimeMinuteHasValidationError: boolean;\n\n // ADU\n isStartTimeRestrictedForAdu: boolean;\n isEndTimeRestrictedForAdu: boolean;\n\n restrictedStartTimeForAdu: CurrentPreviousIsChangedStringValues;\n restrictedEndTimeForAdu: CurrentPreviousIsChangedStringValues;\n\n // keys added @ UI\n restrictedStartTimeHourForAdu: string;\n restrictedStartTimeMinuteForAdu: string;\n restrictedStartTimeAmpmForAdu: string;\n restrictedEndTimeHourForAdu: string;\n restrictedEndTimeMinuteForAdu: string;\n restrictedEndTimeAmpmForAdu: string;\n\n restrictedStartTimeHasValidationErrorForAdu: boolean;\n restrictedEndTimeHasValidationErrorForAdu: boolean;\n timeForMg: { timeForMg: string }[];\n timeForAdu: { time: string }[];\n\n constructor(obj: any) {\n this.id = obj.Id;\n this.name = obj.Name;\n this.startTime = obj.StartTime;\n this.endTime = obj.EndTime;\n\n this.mgTime = {\n fromTime: obj.StartTime,\n toTime: obj.EndTime,\n };\n\n this.timeForMg = [\n { timeForMg: obj.RestrictedStartTimeForMg.Current },\n { timeForMg: obj.RestrictedEndTimeForMg.Current },\n ];\n this.timeForAdu = [\n { time: obj.RestrictedStartTimeForAdu.Current },\n { time: obj.RestrictedEndTimeForAdu.Current },\n ];\n\n // MG\n this.restrictedStartTimeForMg = obj.RestrictedStartTimeForMg;\n this.restrictedEndTimeForMg = obj.RestrictedEndTimeForMg;\n this.isStartTimeRestrictedForMg = obj.IsStartTimeRestrictedForMg;\n this.isEndTimeRestrictedForMg = obj.IsEndTimeRestrictedForMg;\n\n const restrictedStartTimeForMg: string[] = AnnaDateTimeFormatService.formatToTwelveHrs(\n obj.RestrictedStartTimeForMg?.Current,\n true,\n );\n this.restrictedStartTimeHourForMg = restrictedStartTimeForMg[0];\n this.restrictedStartTimeMinuteForMg = restrictedStartTimeForMg[1];\n this.restrictedStartTimeAmpmForMg = restrictedStartTimeForMg[2];\n\n const restrictedEndTimeForMg: string[] = AnnaDateTimeFormatService.formatToTwelveHrs(\n obj.RestrictedEndTimeForMg?.Current,\n true,\n );\n this.restrictedEndTimeHourForMg = restrictedEndTimeForMg[0];\n this.restrictedEndTimeMinuteForMg = restrictedEndTimeForMg[1];\n this.restrictedEndTimeAmpmForMg = restrictedEndTimeForMg[2];\n\n // ADU\n this.restrictedStartTimeForAdu = obj.RestrictedStartTimeForAdu;\n this.restrictedEndTimeForAdu = obj.RestrictedEndTimeForAdu;\n this.isStartTimeRestrictedForAdu = obj.IsStartTimeRestrictedForAdu;\n this.isEndTimeRestrictedForAdu = obj.IsEndTimeRestrictedForAdu;\n\n const restrictedStartTimeForAdu: string[] = AnnaDateTimeFormatService.formatToTwelveHrs(\n obj.RestrictedStartTimeForAdu?.Current,\n true,\n );\n this.restrictedStartTimeHourForAdu = restrictedStartTimeForAdu[0];\n this.restrictedStartTimeMinuteForAdu = restrictedStartTimeForAdu[1];\n this.restrictedStartTimeAmpmForAdu = restrictedStartTimeForAdu[2];\n\n const restrictedEndTimeForAdu: string[] = AnnaDateTimeFormatService.formatToTwelveHrs(\n obj.RestrictedEndTimeForAdu?.Current,\n true,\n );\n this.restrictedEndTimeHourForAdu = restrictedEndTimeForAdu[0];\n this.restrictedEndTimeMinuteForAdu = restrictedEndTimeForAdu[1];\n this.restrictedEndTimeAmpmForAdu = restrictedEndTimeForMg[2];\n }\n}\n\nexport enum BizRuleInfo {\n A = \"The ADUs will be offered in equivalent or higher dayparts selected in this rule, and follow rule# 6.\",\n}\n\nexport class PreApprovedAndRelaxed {\n PreApproved: string | number;\n Relaxed: string | number;\n constructor(preApprovedData: string | number, relaxedData: string | number) {\n this.PreApproved = preApprovedData;\n this.Relaxed = relaxedData;\n }\n}\nexport class EquivalentOrHigherDaypartsRequestPayload {\n OriginalDaypart: number | string;\n MgEquivalentOrHigherDaypart: EquivalentOrHigherDaypartsForMgOrAdu = {\n EquivalentDaypart: [],\n HigherDaypart: [],\n };\n // AduEquivalentOrHigherDaypart: EquivalentOrHigherDaypartsForMgOrAdu = {\n // EquivalentDaypart: [],\n // HigherDaypart: [],\n // };\n\n constructor(data: EquivalentOrHigherDayparts) {\n this.OriginalDaypart = data.originalDaypart.id;\n this.MgEquivalentOrHigherDaypart.EquivalentDaypart = data.equivalentDaypartsForMg\n .filter((x: any) => x.isSelected)\n .map((x: any) => x.id);\n this.MgEquivalentOrHigherDaypart.HigherDaypart = data.higherDaypartsForMg\n .filter((x: any) => x.isSelected)\n .map((x: any) => x.id);\n // this.AduEquivalentOrHigherDaypart.EquivalentDaypart = data.equivalentDaypartsForAdu\n // .filter((x: any) => x.isSelected)\n // .map((x: any) => x.id);\n // this.AduEquivalentOrHigherDaypart.HigherDaypart = data.higherDaypartsForAdu\n // .filter((x: any) => x.isSelected)\n // .map((x: any) => x.id);\n }\n}\n\nexport class EquivalentOrHigherDaypartsForMgOrAdu {\n EquivalentDaypart: number[] = [];\n HigherDaypart: number[] = [];\n}\nexport class DaySelectedForPayload {\n Day: string;\n IsSelected: boolean;\n constructor(day: DaySelected) {\n if (day.name === \"Saturday\") {\n this.Day = \"Sa\";\n } else if (day.name === \"Sunday\") {\n this.Day = \"Su\";\n } else {\n this.Day = day.name;\n }\n\n this.IsSelected = day.isSelected;\n }\n}\nexport class DaypartRestrictionForMgOrAdu {\n WeekdayRestrictedTime: RestrictedTime;\n SaturdayRestrictedTime: RestrictedTime;\n SundayRestrictedTime: RestrictedTime;\n WeekdaysRestricted: DaySelectedForPayload[] = [];\n constructor(data: DayAndDaypartRestriction) {\n this.WeekdayRestrictedTime = new RestrictedTime(\n data.weekdays.restrictedStartTime.Current,\n data.weekdays.restrictedEndTime.Current,\n );\n this.SaturdayRestrictedTime = new RestrictedTime(\n data.saturday.restrictedStartTime.Current,\n data.saturday.restrictedEndTime.Current,\n );\n this.SundayRestrictedTime = new RestrictedTime(\n data.sunday.restrictedStartTime.Current,\n data.sunday.restrictedEndTime.Current,\n );\n data.weekdays.days.forEach((day) => {\n this.WeekdaysRestricted.push(new DaySelectedForPayload(day));\n });\n data.saturday.days.forEach((day) => {\n this.WeekdaysRestricted.push(new DaySelectedForPayload(day));\n });\n data.sunday.days.forEach((day) => {\n this.WeekdaysRestricted.push(new DaySelectedForPayload(day));\n });\n }\n // weekdaysRestricted:\n}\nexport class RestrictedTime {\n RestrictedEndTime: string;\n RestrictedStartTime: string;\n constructor(startTime: string, endTime: string) {\n this.RestrictedEndTime = endTime;\n this.RestrictedStartTime = startTime;\n }\n}\nexport class DaypatrtRestrictionRequestPayload {\n Id: number;\n MgDaypartRestriction: DaypartRestrictionForMgOrAdu;\n AduDaypartRestriction: DaypartRestrictionForMgOrAdu;\n constructor(data: DayAndDaypartRestrictionForMgAndAdu) {\n this.Id = data.id;\n this.MgDaypartRestriction = new DaypartRestrictionForMgOrAdu(data.daysSelectedForMg);\n this.AduDaypartRestriction = new DaypartRestrictionForMgOrAdu(data.daysSelectedForAdu);\n }\n}\n\nexport class MGADUCommonRulesRequest {\n IsTresholdAllowed: boolean;\n AllowedInventory: PreApprovedAndRelaxed;\n\n constructor(data: MGADUCommonRules) {\n this.IsTresholdAllowed = data.isTresholdAllowed?.Current;\n this.AllowedInventory = new PreApprovedAndRelaxed(\n data.allowedInventory.preApproved.filter((n) => n.isSelected)[0].inventory,\n data.allowedInventory.relaxed.filter((n) => n.isSelected)[0].inventory,\n );\n }\n}\n\nexport class AduRulesRequest extends MGADUCommonRulesRequest {\n generateAdu: boolean;\n UseProjectedValues: boolean;\n percentageDeficitAllowedBeforeAdu: number;\n TimeWindowForProvidingAdu: PreApprovedAndRelaxed;\n TimeWindowForUdLiability: PreApprovedAndRelaxed;\n DaypartGroups: DaypartGroupsRequest[] = [];\n ProvideOffersBasedOnSpecificWeekDays: boolean;\n ProvideAdusForShortestDuration: boolean;\n OnlyForLiveOrders: boolean;\n constructor(data: AduRules) {\n super(data);\n this.generateAdu = data.generateAdu?.Current;\n this.UseProjectedValues = data.useProjectedValues?.Current;\n this.percentageDeficitAllowedBeforeAdu = data.percentageDeficitAllowedBeforeAdu?.Current;\n this.TimeWindowForProvidingAdu = new PreApprovedAndRelaxed(\n data.timeWindowForProvidingAdu.preApproved.filter((n) => n.isSelected)[0].inventory,\n data.timeWindowForProvidingAdu.relaxed.filter((n) => n.isSelected)[0].inventory,\n );\n this.ProvideOffersBasedOnSpecificWeekDays = data.provideOffersBasedOnSpecificWeekDays?.Current;\n this.ProvideAdusForShortestDuration = data.provideAdusForShortestDuration?.Current;\n this.TimeWindowForUdLiability = new PreApprovedAndRelaxed(\n data.timeWindowForUdLiability.preApproved.filter((n) => n.isSelected)[0].inventory,\n data.timeWindowForUdLiability.relaxed.filter((n) => n.isSelected)[0].inventory,\n );\n if (data.daypartGroups?.daypartGroupList.length === 0) {\n this.DaypartGroups = [];\n } else {\n data.daypartGroups?.daypartGroupList.forEach((daypartGroup) => {\n this.DaypartGroups.push(new DaypartGroupsRequest(daypartGroup));\n });\n }\n this.OnlyForLiveOrders = data.onlyForLiveOrders?.Current;\n }\n}\n\nexport class MakeGoodRulesRequest extends MGADUCommonRulesRequest {\n GenerateMgsForUnresolvedSpots: boolean;\n MaxPercentageOfGrpAllowedToMakeGood: number;\n MaxSpotsAllowedForEachSpot: number;\n MaxSpotsAllowedForEachSpotRelaxed: number;\n MinPercentageRating: number;\n MinPercentageRatingRelaxed: number;\n EnableGrouping: boolean;\n IsMakeGoodAllowedForSpecialDayparts: boolean;\n IsWeekdayAllowedOnWeekends: boolean;\n IsWeekdendAllowedOnWeekdays: boolean;\n LowerLimitPercentageForProgramChange: number;\n UpperLimitPercentageForProgramChange: number;\n SpecialDaypartAllowedInventory: PreApprovedAndRelaxed;\n ProgramChangeAllowedInventory: PreApprovedAndRelaxed;\n TimeWindow: PreApprovedAndRelaxed;\n ProvideOffersBasedOnPreemptionDays: boolean;\n ProvideOffersBasedOnSpecificWeekDays: boolean;\n MaxSpotsToBeGrouped: number;\n MaxSpotsToBeGroupedRelaxed: number;\n\n constructor(data: MakeGoodRulesResponse) {\n super(data);\n this.GenerateMgsForUnresolvedSpots = data.generateMgsForUnresolvedSpots?.Current;\n this.MaxPercentageOfGrpAllowedToMakeGood = data.maxPercentageOfGrpAllowedToMakeGood?.Current;\n this.MaxSpotsAllowedForEachSpot = data.maxSpotsAllowedForEachSpot?.Current;\n this.MaxSpotsAllowedForEachSpotRelaxed = data.maxSpotsAllowedForEachSpotRelaxed?.Current;\n this.MinPercentageRating = data.minPercentageRating?.Current;\n this.MinPercentageRatingRelaxed = data.minPercentageRatingRelaxed?.Current;\n this.EnableGrouping = data.enableGrouping?.Current;\n this.MaxSpotsToBeGrouped = data.maxSpotsToBeGrouped?.Current;\n this.MaxSpotsToBeGroupedRelaxed = data.maxSpotsToBeGroupedRelaxed?.Current;\n this.TimeWindow = new PreApprovedAndRelaxed(\n data.timeWindow.preApproved.filter((n) => n.isSelected)[0].inventory,\n data.timeWindow.relaxed.filter((n) => n.isSelected)[0].inventory,\n );\n this.IsMakeGoodAllowedForSpecialDayparts = data.isMakeGoodAllowedForSpecialDayparts?.Current;\n this.IsWeekdayAllowedOnWeekends = data.isWeekdayAllowedOnWeekends?.Current;\n this.IsWeekdendAllowedOnWeekdays = data.isWeekdendAllowedOnWeekdays?.Current;\n this.ProvideOffersBasedOnPreemptionDays = data.provideOffersBasedOnPreemptionDays?.Current;\n this.ProvideOffersBasedOnSpecificWeekDays = data.provideOffersBasedOnSpecificWeekDays?.Current;\n this.LowerLimitPercentageForProgramChange = data.lowerLimitPercentageForProgramChange?.Current;\n this.UpperLimitPercentageForProgramChange = data.upperLimitPercentageForProgramChange?.Current;\n this.SpecialDaypartAllowedInventory = new PreApprovedAndRelaxed(\n data.specialDaypartAllowedInventory.preApproved.filter((n) => n.isSelected)[0]?.inventory,\n data.specialDaypartAllowedInventory.relaxed.filter((n) => n.isSelected)[0]?.inventory,\n );\n this.ProgramChangeAllowedInventory = new PreApprovedAndRelaxed(\n data.programChangeAllowedInventory.preApproved.filter((n) => n.isSelected)[0]?.inventory,\n data.programChangeAllowedInventory.relaxed.filter((n) => n.isSelected)[0]?.inventory,\n );\n }\n}\nexport enum InventoryTypes {\n SPECIAL = \"SPECIAL\",\n EXCLUDED = \"EXCLUDED\",\n \"-\" = \"-\",\n}\n\nexport class ApprovalConfig {\n sellerApprovalConfiguration: SellerBuyerApprovalConfiguration;\n buyerApprovalConfiguration: SellerBuyerApprovalConfiguration;\n buyerApprovalConfigurationForSeller: BuyerApprovalConfigurationForSeller;\n\n constructor(data: any) {\n this.sellerApprovalConfiguration = new SellerBuyerApprovalConfiguration(data?.SellerApprovalConfiguration);\n this.buyerApprovalConfiguration = new SellerBuyerApprovalConfiguration(data?.BuyerApprovalConfiguration);\n this.buyerApprovalConfigurationForSeller = new BuyerApprovalConfigurationForSeller(\n data?.BuyerApprovalConfigurationForSeller,\n );\n }\n}\n\nexport class SellerBuyerApprovalConfiguration {\n offeredMgs: ApprovalSection;\n offeredAdus: ApprovalSection;\n creditingExtraAdus: ApprovalSection;\n offeredBonus: ApprovalSection;\n\n constructor(data: any) {\n this.offeredMgs = new ApprovalSection(data?.OfferedMgs);\n this.offeredAdus = new ApprovalSection(data?.OfferedAdus);\n this.creditingExtraAdus = new ApprovalSection(data?.CreditingExtraAdus);\n this.offeredBonus = new ApprovalSection(data?.OfferedBonus);\n }\n}\n\nexport class ApprovalSection {\n selection: ApprovalSelectionOption;\n showSection: boolean;\n\n constructor(data: any) {\n this.selection = data?.Selection || null;\n this.showSection = data?.ShowSection;\n }\n}\n\nexport enum ApprovalSelectionOption {\n AUTO_APPROVE_ALL = \"AUTO_APPROVE_ALL\",\n AUTO_APPROVE_STANDARD = \"AUTO_APPROVE_STANDARD\",\n REVIEW_ALL = \"REVIEW_ALL\",\n}\n\nexport class BuyerApprovalConfigurationForSeller {\n isBuyerSpotsApprovalNeeded: boolean;\n isBuyerSpotsApprovalNeededOnRepTool: boolean;\n isBuyerBizRuleApprovalNeeded: boolean;\n isSellerSpotsReconfirmationNeeded: boolean;\n disableSellerSpotsReconfirmationToggle: boolean;\n buyerApprovalOnRepToolRequiredFor: RepToolApprovalConfiguration;\n buyerOrSellerReconfirmationRequiredFor: ApprovalReconfirmationSection;\n\n constructor(data: any) {\n this.isBuyerBizRuleApprovalNeeded = data?.IsBuyerBizRuleApprovalNeeded;\n this.isBuyerSpotsApprovalNeeded = data?.IsBuyerSpotsApprovalNeeded;\n this.isSellerSpotsReconfirmationNeeded = data?.IsSellerSpotsReconfirmationNeeded;\n this.disableSellerSpotsReconfirmationToggle = data?.DisableSellerReconfirmationToggle;\n this.buyerApprovalOnRepToolRequiredFor = new RepToolApprovalConfiguration(\n data?.BuyerApprovalOnRepToolRequiredFor,\n );\n this.isBuyerSpotsApprovalNeededOnRepTool = data?.IsBuyerSpotsApprovalNeededForRepTool;\n this.buyerOrSellerReconfirmationRequiredFor = new ApprovalReconfirmationSection(\n data?.BuyerOrSellerReconfirmationRequiredFor,\n );\n }\n}\nexport class RepToolApprovalConfiguration {\n offeredMgs: ReconfirmationOption;\n offeredAdusAndCreditingExtraAdus: ReconfirmationOption;\n offeredBonus: ReconfirmationOption;\n\n constructor(data: any) {\n this.offeredMgs = new ReconfirmationOption(data?.OfferedMgs, ReconfirmationOptionLabels.offeredMgs);\n this.offeredAdusAndCreditingExtraAdus = new ReconfirmationOption(\n data?.OfferedAduAndAduCredits,\n `${ReconfirmationOptionLabels.offeredAdus} & ${ReconfirmationOptionLabels.CreditingExtraAdus}`,\n );\n this.offeredBonus = new ReconfirmationOption(data?.OfferedBonus, ReconfirmationOptionLabels.offeredBonusSpots);\n }\n}\n\nexport class ApprovalReconfirmationSection {\n creditingExtraAdus: ReconfirmationOption;\n offeredAdus: ReconfirmationOption;\n offeredMgs: ReconfirmationOption;\n offeredBonus: ReconfirmationOption;\n\n constructor(data: any) {\n this.offeredMgs = new ReconfirmationOption(data?.OfferedMgs, ReconfirmationOptionLabels.offeredMgs);\n this.offeredAdus = new ReconfirmationOption(data?.OfferedAdus, ReconfirmationOptionLabels.offeredAdus);\n this.creditingExtraAdus = new ReconfirmationOption(\n data?.CreditingExtraAdus,\n ReconfirmationOptionLabels.CreditingExtraAdus,\n );\n this.offeredBonus = new ReconfirmationOption(data?.OfferedBonus, ReconfirmationOptionLabels.offeredBonusSpots);\n }\n}\n\nexport class ReconfirmationOption {\n isChecked: boolean;\n isEnabled: boolean;\n label: string;\n constructor(data: any, label: string) {\n this.isChecked = data?.IsChecked;\n this.label = label;\n this.isEnabled = data?.IsEnabled;\n }\n}\n\nexport class GeneralRulesSaveRequest {\n PostingType: string;\n MeasurementAgency: string;\n MaxSpotsAllowedInOTO: MaxSpotsAllowedInOTORequest;\n MaxSpotsAllowedInStripDaily: MaxSpotsAllowedInStripRequest;\n MaxSpotsAllowedInStripWeekly: MaxSpotsAllowedInStripRequest;\n AdvertiserSeparation: string;\n IsAdvertiserSeparationNeeded: boolean;\n\n constructor(data: GeneralRules) {\n const items = data.postingTypeBusinessRule.postingTypesDropdownData;\n const selectedItem = items.find((item) => item.isSelected);\n\n this.PostingType = selectedItem ? selectedItem.class : null;\n const selectedMeasurementAgency = data.measurementAgencyBizRule.measurementAgencyDropdownData.find(\n (item) => item.isSelected,\n );\n this.MeasurementAgency = selectedMeasurementAgency?.id || null;\n this.MaxSpotsAllowedInOTO = new MaxSpotsAllowedInOTORequest(data.maxSpotsAllowedInOTO);\n this.MaxSpotsAllowedInStripDaily = new MaxSpotsAllowedInStripRequest(data.maxSpotsAllowedInStripDaily);\n this.MaxSpotsAllowedInStripWeekly = new MaxSpotsAllowedInStripRequest(data.maxSpotsAllowedInStripWeekly);\n this.AdvertiserSeparation = data?.advertiserSeperation?.advertiserSeparationValue?.Current;\n this.IsAdvertiserSeparationNeeded = data?.advertiserSeperation?.isAdvertiserSeparationNeeded?.Current;\n }\n}\nexport class DaypartGroupsRequest {\n GroupName: string;\n DaypartIds: number[] = [];\n constructor(data: DaypartGroupsList) {\n this.GroupName = data.groupName;\n data?.dayparts.forEach((dp) => {\n this.DaypartIds.push(+dp.id);\n });\n }\n}\nexport class MaxSpotsAllowedInOTORequest {\n PerHalfHour: PreApprovedAndRelaxed;\n HalfHourToOneHour: PreApprovedAndRelaxed;\n OneHourToTwoHours: PreApprovedAndRelaxed;\n TwoHoursToThreeHours: PreApprovedAndRelaxed;\n ThreeHoursPlus: PreApprovedAndRelaxed;\n constructor(data: MaxSpotsAllowedDurationsForOTO) {\n this.PerHalfHour = new PreApprovedAndRelaxed(\n data.perHalfAnHour.preApproved.Current,\n data.perHalfAnHour.relaxed.Current,\n );\n this.HalfHourToOneHour = new PreApprovedAndRelaxed(\n data.halfHourToOneHour.preApproved.Current,\n data.halfHourToOneHour.relaxed.Current,\n );\n this.OneHourToTwoHours = new PreApprovedAndRelaxed(\n data.oneHourToTwoHour.preApproved.Current,\n data.oneHourToTwoHour.relaxed.Current,\n );\n this.TwoHoursToThreeHours = new PreApprovedAndRelaxed(\n data.twoHoursToThreeHours.preApproved.Current,\n data.twoHoursToThreeHours.relaxed.Current,\n );\n this.ThreeHoursPlus = new PreApprovedAndRelaxed(\n data.moreThanThreeHours.preApproved.Current,\n data.moreThanThreeHours.relaxed.Current,\n );\n }\n}\nexport class MaxSpotsAllowedInStripRequest {\n PerHalfHour: PreApprovedAndRelaxed;\n HalfHourToOneHour: PreApprovedAndRelaxed;\n OneHourToTwoHours: PreApprovedAndRelaxed;\n TwoHoursPlus: PreApprovedAndRelaxed;\n constructor(data: MaxSpotsAllowedDurationsForStrip) {\n this.PerHalfHour = new PreApprovedAndRelaxed(\n data.perHalfAnHour.preApproved.Current,\n data.perHalfAnHour.relaxed.Current,\n );\n this.HalfHourToOneHour = new PreApprovedAndRelaxed(\n data.halfHourToOneHour.preApproved.Current,\n data.halfHourToOneHour.relaxed.Current,\n );\n this.OneHourToTwoHours = new PreApprovedAndRelaxed(\n data.oneHourToTwoHour.preApproved.Current,\n data.oneHourToTwoHour.relaxed.Current,\n );\n this.TwoHoursPlus = new PreApprovedAndRelaxed(\n data.moreThanTwoHours.preApproved.Current,\n data.moreThanTwoHours.relaxed.Current,\n );\n }\n}\nexport interface IBizRulesSaveRequest {\n IsADUPostingRequiredValueChanged: boolean;\n IsMeasurementAgencyValueChanged?: boolean;\n IsAdvertiserSeparationValueChanged?: boolean;\n CentralBuyerId: string;\n RequestedBySellerId: number;\n Comment: string;\n Status: BizRuleStatus;\n ActionTakenOnOrdersPopup: OrdersToBeInheritedActionType;\n IsBizRulesAlreadyApprovedBySeller: boolean;\n IsBusinessRulesEdited?: boolean;\n BusinessRules: {\n MakeGoodRules: MakeGoodRulesRequest;\n AduRules: AduRulesRequest;\n GeneralRules: GeneralRulesSaveRequest;\n EquivalentOrHigherDayparts: EquivalentOrHigherDaypartsRequestPayload[];\n DaypartRestriction: DaypatrtRestrictionRequestPayload[];\n UniquePrograms: InventoryPayload[];\n Approvals: ApprovalsRequestPayload;\n } | null;\n}\nexport class ApprovalsRequestPayload {\n SellerApprovalForMgs: ApprovalSelectionOption;\n SellerApprovalForAdus: ApprovalSelectionOption;\n SellerApprovalForAduCredits: ApprovalSelectionOption;\n BuyerApprovalForDirectOrderMgs: ApprovalSelectionOption;\n BuyerApprovalForDirectOrderAdus: ApprovalSelectionOption;\n BuyerApprovalForDirectOrderAduCredits: ApprovalSelectionOption;\n BuyerSpotsApprovalNeeded: boolean;\n SellerSpotsReconfirmationNeeded: boolean;\n IsBuyerSpotsApprovalNeededForRepTool: boolean;\n BuyerApprovalRequiredForElectronicOrderMgs: boolean;\n BuyerApprovalRequiredForElectronicOrderAdusAndAduCredits: boolean;\n BuyerOrSellerReconfirmationRequiredForDirectOrderMgs: boolean;\n BuyerOrSellerReconfirmationRequiredForDirectOrderAdus: boolean;\n BuyerOrSellerReconfirmationRequiredForDirectOrderAduCredits: boolean;\n IsBuyerBizRuleApprovalNeeded: boolean;\n BuyerApprovalRequiredForElectronicOrderBonus: boolean;\n BuyerOrSellerReconfRequiredForDirectOrderBonus: boolean;\n BuyerApprovalForDirectOrderBonus: ApprovalSelectionOption;\n SellerApprovalForBonus: ApprovalSelectionOption;\n constructor(data: ApprovalConfig) {\n this.SellerApprovalForMgs = data.sellerApprovalConfiguration.offeredMgs.selection;\n this.SellerApprovalForAdus = data.sellerApprovalConfiguration.offeredAdus.selection;\n this.SellerApprovalForAduCredits = data.sellerApprovalConfiguration.creditingExtraAdus.selection;\n this.SellerApprovalForBonus = data.sellerApprovalConfiguration.offeredBonus.selection;\n\n this.BuyerApprovalForDirectOrderMgs = data.buyerApprovalConfiguration.offeredMgs.selection;\n this.BuyerApprovalForDirectOrderAdus = data.buyerApprovalConfiguration.offeredAdus.selection;\n this.BuyerApprovalForDirectOrderAduCredits = data.buyerApprovalConfiguration.creditingExtraAdus.selection;\n this.BuyerApprovalForDirectOrderBonus = data.buyerApprovalConfiguration.offeredBonus.selection;\n\n this.BuyerSpotsApprovalNeeded = data.buyerApprovalConfigurationForSeller.isBuyerSpotsApprovalNeeded;\n this.IsBuyerBizRuleApprovalNeeded = data.buyerApprovalConfigurationForSeller.isBuyerBizRuleApprovalNeeded;\n this.SellerSpotsReconfirmationNeeded =\n data.buyerApprovalConfigurationForSeller.isSellerSpotsReconfirmationNeeded;\n this.IsBuyerSpotsApprovalNeededForRepTool =\n data.buyerApprovalConfigurationForSeller.isBuyerSpotsApprovalNeededOnRepTool;\n\n this.BuyerApprovalRequiredForElectronicOrderMgs =\n data.buyerApprovalConfigurationForSeller.buyerApprovalOnRepToolRequiredFor.offeredMgs.isChecked;\n this.BuyerApprovalRequiredForElectronicOrderBonus =\n data.buyerApprovalConfigurationForSeller.buyerApprovalOnRepToolRequiredFor.offeredBonus.isChecked;\n this.BuyerApprovalRequiredForElectronicOrderAdusAndAduCredits =\n data.buyerApprovalConfigurationForSeller.buyerApprovalOnRepToolRequiredFor.offeredAdusAndCreditingExtraAdus.isChecked;\n\n this.BuyerOrSellerReconfirmationRequiredForDirectOrderMgs =\n data.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor.offeredMgs.isChecked;\n this.BuyerOrSellerReconfirmationRequiredForDirectOrderAdus =\n data.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor.offeredAdus.isChecked;\n this.BuyerOrSellerReconfirmationRequiredForDirectOrderAduCredits =\n data.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor.creditingExtraAdus.isChecked;\n this.BuyerOrSellerReconfRequiredForDirectOrderBonus =\n data.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor.offeredBonus.isChecked;\n }\n}\nexport class InventoryPayload {\n ProgramName: string;\n MakeGoodSelected: boolean;\n AduSelected: boolean;\n IsSelected: boolean;\n Type: InventoryTypes;\n constructor(data: any) {\n this.ProgramName = data.programName;\n this.MakeGoodSelected = data.makeGoodSelected;\n this.AduSelected = data.aduSelected;\n this.IsSelected = data.isSelected;\n this.Type = data.type;\n }\n}\n","/* eslint-disable max-len */\nimport { Injectable } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport { BuyerContactInfo } from \"../../add-buyer-contact/models/add-buyer-contact.model\";\nimport { ADURulesName } from \"../../adu-rules/models/adu-rules.model\";\nimport { MGRulesTooltip } from \"../../make-good-rules/models/make-good-rules.model\";\nimport { BizRulesResponse } from \"../models/business-rule.model\";\nimport { BusinessPageType, BusinessRulePageConstant } from \"../models/business-rule-page.constants\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class BusinessRuleCommonSIBILogicService {\n // Manage biz rule tab service\n // stationIdFilterFromUrlForStationBizTab: any = null;\n\n // filtersFromTheUrlForAdvertiserBizTab: any = null;\n // stationIdfiltersFromTheUrlForAdvertiserBizTab: any = null;\n // popupFiltersFromTheUrlForAdvertiserBizTab: any = null;\n // filtersFromTheUrlForOrderBizTab: any = null;\n // popupfiltersFromTheUrlForOrderBizTab: any = null;\n\n buyerDetailsChanged$ = new Subject<{ primaryBuyer: BuyerContactInfo; secondaryBuyer: BuyerContactInfo }>();\n getSpotApprovalConfigMessage(level: BusinessPageType): string {\n if (level === BusinessPageType.ADVERTISER) {\n return BusinessRulePageConstant.addBuyerContactForSpotApprovalForAdvertiser;\n } else if (level === BusinessPageType.ORDER) {\n return BusinessRulePageConstant.addBuyerContactForSpotApprovalForOrder;\n }\n return null;\n }\n\n getInformationDataForAduForm(): ADURulesName {\n return {\n minGrp: {\n name: \"Minimum GRP/Impressions % that must be achieved to ensure the station incurs no liability (used to calculate UD (@ Threshold) on ANNA)\",\n tooltip:\n \"The UD (@ Threshold) will only be calculated if postings or projected postings for the order goes below the specified % in this rule.\",\n },\n generateAdu: {\n name: \"Audience Posting Required?\",\n tooltip:\n \"Only when this rule is set to ‘Yes’, ANNA will attempt to find Additional Delivery Units(ADUs) for the order in case it has any Audience Under-Delivery. You can decide if ANNA should solve for the UD till the last posted data or for the projected UD.\",\n },\n allowedInventory: {\n name: \"Allowed inventory\",\n tooltip:\n \"<ul><li>Based on the selection below, the ADUs will be placed in the same daypart, same program, equivalent or higher dayparts as compared to the preemption(s).</li><li> Equivalent and higher dayparts can be set separately.</li></ul>\",\n },\n provideADUsForLiveOrders: {\n name: \"Provide ADUs after the order flight start\",\n tooltip:\n \"If this toggle is set to “Yes”, then ANNA will only provide ADUs after the order flight has started\",\n },\n provideMGsOnSpecificWeekdays: {\n name: \"Provide ADUs only on the specific days booked for each week\",\n tooltip:\n \"If this toggle is set to “Yes” then ANNA will honor the specific days that are booked in each week while providing any offers. For example: If Week 1 for an order only has booked spots on MTW, then all offers will only be provided on MTW if it is scheduled on that week. This rule is only applicable for rep orders.\",\n },\n provideAdusForShortestDuration: {\n name: \"Provide ADUs for the shortest duration\",\n tooltip: `When this rule is set to \"Yes\", ANNA will provide ADUs for the shortest duration that is booked in the order. If set to \"No\" ANNA will provide the ADUs in the respective length(s) in which the shortfall is present.`,\n },\n aduTimeWindow: {\n name: \"ADU Time Window\",\n tooltip:\n \"<ul><li>You can set a time frame for the ANNA to find ADUs.</li> <li>If you choose 'Same broadcast month', ANNA will make sure to find a bonus spot within the same month as that of the under-delivery.</li></ul>\",\n },\n daypart: {\n name: \"Manage Posting by Daypart Groups\",\n tooltip:\n \"For example, if you want ANNA to achieve 100% posting for PR & SP and 100% posting for all other dayparts independently, you can create two groups here. If no groups are added, ANNA will try to achieve 100% posting for the entire order.\",\n },\n windowForUDLiability: {\n name: \"Window for considering UD\",\n tooltip:\n '<ul><li>You can set the time window when for which ANNA needs to solve the under delivery for.</li> <li>If you choose \"Broadcast Month\", ANNA will solve the complete UD for the broadcast month.</li></ul>',\n },\n windowForProvidingADUs: {\n name: \"Window for providing ADUs\",\n tooltip:\n '<ul><li>You can set the time window when ANNA should give the ADU offers.</li> <li>If you choose \"Current Broadcast Month\", ANNA will give the ADU offers in the ongoing current broadcast month.</li></ul>',\n },\n maxSpotOTO: {\n name: \"Max spots allowed per half hour in OTO programs\",\n tooltip:\n \"If set to 3, ANNA will try to enter a maximum of 3 ADUs in every half-hour OTO program (programs that are telecasted only one day in a week).\",\n },\n maxSpotStrip: {\n name: \"Max spots allowed per half hour in Strip programs\",\n tooltip:\n \"If set to 2, ANNA will try to enter a maximum of 2 ADUs in every half-hour Strip program (programs that are telecasted more than once a week).\",\n },\n daily: {\n name: \"\",\n tooltip: \"\",\n },\n weekly: {\n name: \"\",\n tooltip: \"\",\n },\n allowAduTwoMinutes: {\n name: \"Offers up to 2 minutes before and after Display Time of the Program\",\n tooltip:\n \"<ul><li>If you choose 'No', then ANNA will restrict the ADU spots within the display time of the Line.</li><li> For example, if the display time is 6-7a and the eligible time of the program is 5:58a - 7:00:05a, the ADUs will be restricted by ANNA such that they do not get placed between 5:58a to 6:00a and 7:00a to 7:00:05a.</li></ul>\",\n },\n provideForUDProjection: {\n name: \"Provide ADUs based on posted spots and projections for future spots\",\n tooltip: \"\",\n },\n provideForUDTillPostedDate: {\n name: \"Provide ADUs only based on posted spots\",\n tooltip: \"\",\n },\n };\n }\n\n getInformationDataForMgForm(): MGRulesTooltip {\n return {\n generateMGsForUnresolvedSpots: {\n name: \"Generate MGs for Unresolved spots\",\n tooltip: `If this toggle is set to \"Yes\", ANNA will attempt to also solve unresolved spots and provide MakeGoods for them, applying the same MakeGood rules used for Preemptions to these spots as well.`,\n },\n allowedMg: {\n name: \"Allowed inventory\",\n tooltip:\n \"<ul><li>Based on the selection below, the MakeGoods will be placed in the same daypart, same program, equivalent or higher dayparts as compared to the preemption(s).</li><li> Equivalent and higher dayparts can be set separately.</li></ul>\",\n },\n sportsAndSpecials: {\n name: \"Generate MakeGoods for Sports\",\n tooltip:\n \"<ul><li> All spots with daypart ‘SP’ are considered sports.</li> <li> You can specify whether ANNA should find MGs for them. If set to ‘Yes’, the appropriate time frame selected below will be used to enter MGs. <li>Please note that these MakeGoods will always require approval from the Seller and the Buyer.</li></ul>\",\n },\n mgTimeWindow: {\n name: \"Time Window\",\n tooltip:\n \"<ul><li>You can set a time frame for ANNA to find MGs for every spot that got preempted.</li><li> If you choose 'Same broadcast month', ANNA will make sure to find a replacement spot within the same month when the preempted spot was supposed to air.</li><ul>\",\n },\n maxSpotsOTO: {\n name: \"Max spots allowed per half hour in OTO programs\",\n tooltip:\n \"If set to 2, ANNA will try to enter a maximum of 2 MGs in every half-hour of an OTO program (programs that are telecasted only one day a week).\",\n },\n maxSpotsStrip: {\n name: \"Max spots allowed per half hour in Strip programs\",\n tooltip:\n \"If set to 2, ANNA will try to enter a maximum of 2 MGs in every half-hour of a Strip program (programs that are telecasted more than once a week).\",\n },\n allowMgTwoMinutes: {\n name: \"Offered up to 2 minutes before and after Display Time of the Program\",\n tooltip:\n \"<ul><li>If you choose 'No', then ANNA will restrict the MG spots within the display time of the Line.</li><li>For example, if the display time is 6-7a and the eligible time of the program is 5:58a - 7:00:05a, the MGs will be restricted by ANNA such that they do not get placed between 5:58a to 6:00a and 7:00a to 7:00:05a.</li></ul>\",\n },\n programmingChangesTooltip: {\n name: \"Programming Changes\",\n tooltip:\n \"<ul><li>When the Buyer program name changes for the preemption, selecting 'Same Program, Same Day' will prioritize the program name and the same day for finding MakeGoods. </li><li>The business rule will be applied on top of the rest of the rules.</li></ul>\",\n },\n allowedRatingForMg: {\n name: \"Allowed rating range for MGs\",\n tooltip:\n \"If set to -10% to 20%, ANNA will search for MakeGoods within a range of 10% lower to 20% higher than the PEs.\",\n },\n maxGrp: {\n name: \"\",\n tooltip:\n \"If the total booked GRP of an order is 100 and you set this to 40%, then ANNA will only make good a maximum of 40 GRP even if the preemptions exceed 40 GRP.\",\n },\n allowedDays1: {\n name: \"Allow MGs for weekday PEs on weekends also\",\n tooltip:\n \"If this toggle is set to 'Yes', ANNA will attempt to also include weekends along with weekdays to make good a preemption scheduled on a weekday.\",\n },\n allowedDays2: {\n name: \"Allow MGs for weekend PEs on weekdays also\",\n tooltip:\n \"If this toggle is set to 'Yes', ANNA will attempt to also include weekdays along with weekends to make good a preemption scheduled on a weekend.\",\n },\n allowMgForSpecificDaysOfPE: {\n name: \"Provide MGs only on the specific booked days of the PE\",\n tooltip:\n 'If this toggle is set to \"Yes\" then ANNA will pick up the eligible days from the preempted spot. For example: If the PE spot has the Inventory eligible days of M-F, then the MG offer will be provided on M-F itself, irrespective of the week in which it is getting scheduled.',\n },\n allowMgForSpecificDaysEachWeek: {\n name: \"Provide MGs only on the specific days booked for each week\",\n tooltip:\n \"If this toggle is set to “Yes” then ANNA will honor the specific days that are booked in each week while providing any offers. For example: If Week 1 for an order only has booked spots on MTW, then all offers will only be provided on MTW if it is scheduled on that week. This rule is only applicable for rep orders.\",\n },\n enableGrouping: {\n name: \"Enable grouping of preempted spots for MGs\",\n tooltip:\n \"If set to 'Yes', ANNA will try to group multiple preemptions to find MakeGoods for the entire group.\",\n },\n maxNoOfPESpotsForGrouping: {\n name: \"Max number of PE spots that can be grouped\",\n tooltip: \"If set to 2, ANNA will group a maximum of 2 spots to provide a MakeGood.\",\n },\n maxMg: {\n name: \"Max number of MG spots allowed for each preempted spot\",\n tooltip: \"If set to 3, ANNA will provide a maximum of 3 MGs for each preempted spot.\",\n },\n minPercentageOfPreempted: {\n name: \"Min % of preempted spot's rating/impressions needed from each MG spot\",\n tooltip:\n \"<ul><li>This rule is an extension of the previous rule.</li> <li>If you have set the previous rule to 3, then this can be set to 25% to make sure every MG that ANNA offers fulfils a minimum of 25% of the preempted spot's GRP/Impressions.</li></ul>\",\n },\n };\n }\n\n isAnyChangeInAdvertiserSeparation(oldRules: BizRulesResponse, newRules: BizRulesResponse): boolean {\n const changeInAdvertiserSeparationValue =\n oldRules?.generalRules?.advertiserSeperation?.advertiserSeparationValue?.Current !==\n newRules?.generalRules?.advertiserSeperation?.advertiserSeparationValue?.Current;\n const changeInAdvertiserSeperationRequiredToggle =\n oldRules?.generalRules?.advertiserSeperation?.isAdvertiserSeparationNeeded?.Current !==\n newRules?.generalRules?.advertiserSeperation?.isAdvertiserSeparationNeeded?.Current;\n\n return changeInAdvertiserSeparationValue || changeInAdvertiserSeperationRequiredToggle;\n }\n}\n","import { DragDropModule, transferArrayItem } from \"@angular/cdk/drag-drop\";\nimport { NgClass, NgFor, NgForOf, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { AnnaCoreModule, FixedRowsPopupTableDirective } from \"@annalib/anna-core\";\nimport { AnnaDesignComponentsLibModule } from \"@annalib/anna-design-components-lib\";\nimport { GenericBusinessRuleCommonSIBILogicService } from \"@annalib/anna-feature-lib/anna-feature-shared-lib\";\nimport { NgbTooltip } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep } from \"lodash-es\";\n\nimport { DaypartGroupsList } from \"../business-rule-page/models/business-rule.model\";\n\n@Component({\n selector: \"anna-feature-daypart-grouping-popup\",\n templateUrl: \"./daypart-grouping-popup.component.html\",\n styleUrls: [\"./daypart-grouping-popup.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgFor,\n NgForOf,\n NgClass,\n NgIf,\n AnnaDesignComponentsLibModule,\n NgbTooltip,\n FormsModule,\n ReactiveFormsModule,\n AnnaCoreModule,\n DragDropModule,\n FixedRowsPopupTableDirective,\n ]\n})\nexport class DaypartGroupingPopupComponent implements OnChanges {\n @Input() daypartGroupsForPopup: DaypartGroupsList[];\n @Input() modalTitle: string = \"Add Groups\";\n // @Input() initialDaypartGroups: DaypartGroupsList[];\n\n @Output() closeModal = new EventEmitter<boolean>();\n @Output() emitSavedDaypartGroups = new EventEmitter<any>();\n\n dragDaypart: string | null = null;\n dragDaypartGroupIndex: number | null = null;\n dragDaypartIndex: number | null = null;\n disableSaveButton: boolean = true;\n daypartGroups: DaypartGroupsList[];\n initialDaypartGroups: DaypartGroupsList[];\n\n constructor(\n private cdr: ChangeDetectorRef,\n private businessRulesService: GenericBusinessRuleCommonSIBILogicService,\n ) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.daypartGroupsForPopup?.currentValue) {\n this.daypartGroups = cloneDeep(this.daypartGroupsForPopup);\n this.initialDaypartGroups = cloneDeep(this.daypartGroupsForPopup);\n }\n }\n\n onGroupNameChange() {\n this.checkDuplicate();\n this.cdr.markForCheck();\n }\n\n onDragAndDropDaypart(event: any) {\n if (event.previousContainer !== event.container) {\n transferArrayItem(\n event.previousContainer.data,\n event.container.data,\n event.previousIndex,\n event.currentIndex,\n );\n }\n \n this.checkDuplicate();\n }\n\n checkDuplicate() {\n const groupNameCounts: { [key: string]: number } = {};\n\n this.daypartGroups.forEach((group) => {\n group.isDuplicateGroupName = false;\n const currentGroupname = group.groupName.trim().toLocaleLowerCase();\n if (currentGroupname === \"\") {\n this.disableSaveButton = true;\n return;\n }\n\n if (groupNameCounts[currentGroupname]) {\n groupNameCounts[currentGroupname] += 1;\n if (groupNameCounts[currentGroupname] > 1) {\n group.isDuplicateGroupName = true;\n }\n } else {\n groupNameCounts[currentGroupname] = 1;\n }\n });\n\n if (this.hasEmptyOrDuplicateGroupNames(this.daypartGroups)) {\n this.disableSaveButton = true;\n return;\n }\n const filteredInitialGroups = this.filterNonEmptyGroups(this.initialDaypartGroups);\n const filteredCurrentGroups = this.filterNonEmptyGroups(this.daypartGroups);\n\n // const initialGroupNames = filteredInitialGroups.map((group) => group.groupName.toLowerCase());\n // const currentGroupNames = filteredCurrentGroups.map((group) => group.groupName.toLowerCase());\n this.disableSaveButton = !this.checkIfDaypartGroupsAreDifferent(filteredInitialGroups, filteredCurrentGroups);\n this.businessRulesService.notifyBusinessRulesChanged();\n this.cdr.detectChanges();\n }\n\n addGroup() {\n let counter = 1;\n let newGroupName: string;\n do {\n newGroupName = `Group ${this.daypartGroups.length + counter}`;\n counter += 1;\n } while (\n this.daypartGroups.some(\n // eslint-disable-next-line @typescript-eslint/no-loop-func\n (group) => group.groupName.trim().toLowerCase() === newGroupName.trim().toLowerCase(),\n )\n );\n\n this.daypartGroups.push({ groupName: newGroupName, dayparts: [], isDuplicateGroupName: false });\n }\n\n onSavingDayparts() {\n const daypartGroupList = this.filterNonEmptyGroups(this.daypartGroups);\n this.emitSavedDaypartGroups.emit(daypartGroupList);\n }\n\n cancelClicked() {\n this.closeModal.emit(true);\n }\n\n hasEmptyOrDuplicateGroupNames(groups: DaypartGroupsList[]): boolean {\n return groups.some(\n (group) => (group.groupName.trim() === \"\" && group.dayparts.length > 0) || group.isDuplicateGroupName,\n );\n }\n\n filterNonEmptyGroups(groups: DaypartGroupsList[]): DaypartGroupsList[] {\n return groups.filter((group) => group.dayparts.length > 0);\n }\n\n checkIfDaypartGroupsAreDifferent(initialGroups: DaypartGroupsList[], currentGroups: DaypartGroupsList[]): boolean {\n if (currentGroups.length === 1) return false;\n const initialGroupsMap = new Map(initialGroups.map((group) => [group.groupName.toLowerCase(), group.dayparts]));\n const currentGroupsMap = new Map(currentGroups.map((group) => [group.groupName.toLowerCase(), group.dayparts]));\n\n // eslint-disable-next-line no-restricted-syntax\n for (const [groupName, initialDayparts] of initialGroupsMap) {\n const currentDayparts = currentGroupsMap.get(groupName);\n\n if (!currentDayparts || initialDayparts.length !== currentDayparts.length) {\n return true;\n }\n\n const initialDaypartsSet = new Set(initialDayparts.map((daypart) => JSON.stringify(daypart)));\n const currentDaypartsSet = new Set(currentDayparts.map((daypart) => JSON.stringify(daypart)));\n\n // eslint-disable-next-line no-restricted-syntax\n for (const daypart of initialDaypartsSet) {\n if (!currentDaypartsSet.has(daypart)) {\n return true;\n }\n }\n // const sortedInitialDayparts = initialDayparts.map((daypart) => JSON.stringify(daypart)).sort();\n // const sortedCurrentDayparts = currentDayparts.map((daypart) => JSON.stringify(daypart)).sort();\n // return isEqual(sortedInitialDayparts,sortedCurrentDayparts);\n }\n return false;\n }\n}\n","<div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ modalTitle }}</h3>\n</div>\n\n<div class=\"modal-body\">\n <span class=\"drag-label\">Drag & Drop to add or remove dayparts within groups.</span>\n <table class=\"daypart-grouping-table\">\n <thead>\n <tr>\n <th class=\"group-header\">DAYPART GROUPS</th>\n <th>DAYPARTS</th>\n </tr>\n </thead>\n <tbody cdkDropListGroup>\n <tr *ngFor=\"let group of daypartGroups; let i = index\">\n <td>\n <input\n type=\"text\"\n class=\"group-input-field\"\n [(ngModel)]=\"group.groupName\"\n (input)=\"onGroupNameChange()\"\n [ngClass]=\"{ error: group.isDuplicateGroupName }\"\n />\n <i\n *ngIf=\"group.isDuplicateGroupName\"\n class=\"mdi mdi-alert-octagon\"\n [ngbTooltip]=\"'Name already used'\"\n container=\"body\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>\n <div\n #groupDropList=\"cdkDropList\"\n class=\"container-box\"\n cdkDropList\n (cdkDropListDropped)=\"onDragAndDropDaypart($event)\"\n [cdkDropListData]=\"group.dayparts\"\n >\n <div\n class=\"dp-box\"\n *ngFor=\"let daypart of group.dayparts; let j = index\"\n >\n <div\n class=\"daypart\"\n cdkDrag\n [cdkDragData]=\"daypart\"\n >\n <span>{{ daypart.text }}</span>\n <span \n class=\"mdi mdi-drag-variant\"\n cdkDragHandle\n ></span>\n </div>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <td>\n <span\n class=\"add-group\"\n (click)=\"addGroup()\"\n >Add Group</span\n >\n </td>\n <td></td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"button-container\">\n <button\n (click)=\"cancelClicked()\"\n class=\"anna cancel-button\"\n >\n Cancel\n </button>\n <button\n (click)=\"onSavingDayparts()\"\n [disabled]=\"disableSaveButton\"\n class=\"anna apply-button\"\n >\n Save\n </button>\n </div>\n</div>\n","import { NgClass, NgFor, NgIf, NgTemplateOutlet } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n} from \"@angular/core\";\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { MatRadioModule } from \"@angular/material/radio\";\nimport { AnnaCoreModule, AnnaGlobalConfigService, IConfirmationPopupConfig } from \"@annalib/anna-core\";\nimport {\n AnnaDesignComponentsLibModule,\n ConfirmationPopupComponent,\n GenericMessageBoxTheme,\n MessageBoxData,\n} from \"@annalib/anna-design-components-lib\";\nimport { NgbModal, NgbModalOptions, NgbModalRef, NgbTooltip } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep } from \"lodash-es\";\nimport { debounceTime } from \"rxjs/operators\";\n\nimport {\n AduRules,\n AllowedInventoryOrTimeWindow,\n DaypartGroupsList,\n PopulateListDropdown,\n} from \"../business-rule-page/models/business-rule.model\";\n// eslint-disable-next-line max-len\nimport { BusinessRuleCommonSIBILogicService } from \"../business-rule-page/services/business-rule-common-SI-BI-logic.service\";\nimport { DaypartGroupingPopupComponent } from \"../daypart-grouping-popup/daypart-grouping-popup.component\";\nimport { ADURulesName } from \"./models/adu-rules.model\";\n\n@Component({\n selector: \"anna-feature-adu-rules\",\n templateUrl: \"./adu-rules.component.html\",\n styleUrls: [\"./adu-rules.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n MatRadioModule,\n DaypartGroupingPopupComponent,\n NgTemplateOutlet,\n AnnaDesignComponentsLibModule,\n NgbTooltip,\n NgClass,\n NgFor,\n NgIf,\n FormsModule,\n ReactiveFormsModule,\n AnnaCoreModule,\n ],\n})\nexport class AduRulesComponent implements OnInit, OnChanges {\n @Input() aduValue: AduRules;\n @Input() intialAduValue: AduRules;\n @Input() isDisabled: boolean;\n @Input() highlightChanges: boolean = false;\n @Input() disabledAduTimeWindow: boolean;\n @Input() disabledAduPostingRequired: boolean;\n @Input() editMode: boolean;\n @Input() hideRulesTooltipInfo: boolean = false;\n @Input() aduTabSelected: boolean = false;\n @Input() minimumSeparation: string;\n @Input() showMinimumSeparationInMessage: boolean = false;\n @Output() aduChange = new EventEmitter<AduRules>();\n\n // maxSpotsOto: FormGroup;\n // maxSpotsStripeDaily: FormGroup;\n // maxSpotsStripeWeekly: FormGroup;\n commenceAduForm: FormGroup;\n\n selectedAlternatives: PopulateListDropdown[];\n selectedWindow: PopulateListDropdown[];\n\n readonly commenceAduForm_MINVALUE = 85;\n readonly commenceAduForm_MAXVALUE = 150;\n readonly MINVALUE = 1;\n readonly MAXVALUE = 100;\n readonly SAME_DAYPART_GROUP_ANY_DAY = \"SAME_DAYPART_GROUP_ANY_DAY\";\n aduAndMgMessageData: MessageBoxData;\n informationPool: ADURulesName;\n readMode: boolean = true;\n readonly DEBOUNCE_TIME = 10;\n readonly NOT_EMIT_VALUE_CHANGE = { emitEvent: false, onlySelf: false };\n\n provideADUForSelectedOption: \"ProvideForUDProjection\" | \"ProvideForUDTillPostedDate\" = \"ProvideForUDProjection\";\n\n ngbModalOptions: NgbModalOptions;\n @ViewChild(\"addDaypartGroupModal\") private addDaypartGroupModal: TemplateRef<any>;\n addDaypartGroupingModalReference: NgbModalRef;\n\n @ViewChild(\"removeGroupingModal\") removeGroupingConfirmation: ConfirmationPopupComponent;\n removeGroupingConfirmationConfig: IConfirmationPopupConfig;\n modalTitleForDpGroups: string;\n\n daypartRules: DaypartGroupsList[];\n sameDpGroupAllowedInventoryOption: PopulateListDropdown;\n\n constructor(\n private fb: FormBuilder,\n private businessRuleCommonSIBILogicService: BusinessRuleCommonSIBILogicService,\n private modalService: NgbModal,\n private cdr: ChangeDetectorRef,\n private annaGlobalConfig: AnnaGlobalConfigService,\n ) {\n this.intialiseAllForm();\n this.getInformationData();\n this.removeGroupingModalConfig();\n }\n\n ngOnInit() {\n this.setMessageData();\n this.popupModalConfig();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.aduValue && changes.aduValue.currentValue) {\n this.setAllFormData();\n this.daypartRules = this.aduValue.daypartGroups.daypartGroupList;\n }\n if (changes.isDisabled) {\n this.readMode = this.isDisabled;\n this.enableDisableForm();\n }\n // if (changes.aduTabSelected != null) {\n // this.scrollToTop();\n // }\n }\n\n scrollToTop() {\n const top = document.getElementById(\"adu-table-first-row\");\n top.scrollIntoView({\n behavior: \"auto\",\n block: \"center\",\n });\n }\n\n getInformationData() {\n this.informationPool = this.businessRuleCommonSIBILogicService.getInformationDataForAduForm();\n }\n\n intialiseAllForm() {\n // const COMMON_VALIDATOR = [Validators.required, Validators.min(this.MINVALUE), Validators.max(this.MAXVALUE)];\n // this.maxSpotsOto = this.fb.group(\n // {\n // preApproved: new FormControl('', COMMON_VALIDATOR),\n // relaxed: new FormControl('', COMMON_VALIDATOR),\n // },\n // { validator: relaxedValidation('preApproved', 'relaxed') },\n // );\n\n // this.maxSpotsStripeDaily = this.fb.group(\n // {\n // preApproved: new FormControl('', COMMON_VALIDATOR),\n // relaxed: new FormControl('', COMMON_VALIDATOR),\n // },\n // { validator: relaxedValidation('preApproved', 'relaxed') },\n // );\n\n // this.maxSpotsStripeWeekly = this.fb.group(\n // {\n // preApproved: new FormControl('', COMMON_VALIDATOR),\n // relaxed: new FormControl('', COMMON_VALIDATOR),\n // },\n // { validator: relaxedValidation('preApproved', 'relaxed') },\n // );\n\n // validation changed User can only select 85-100%\n this.commenceAduForm = this.fb.group({\n preApproved: new FormControl(\"\", [\n Validators.required,\n Validators.min(this.commenceAduForm_MINVALUE),\n Validators.max(this.commenceAduForm_MAXVALUE),\n ]),\n });\n this.subscribeToValueChangeForForm();\n }\n\n subscribeToValueChangeForForm() {\n this.commenceAduFormDataOnChange();\n }\n\n // maxSpotsOtoDataOnChange() {\n // this.maxSpotsOto.valueChanges\n // .pipe(debounceTime(this.DEBOUNCE_TIME))\n // .subscribe((value: { preApproved: number; relaxed: number }) => {\n // this.aduValue.maxSpotsAllowedPerHalfHourInOTO.Current = value?.preApproved;\n // this.aduValue.maxSpotsAllowedPerHalfHourInOTORelaxed.Current = value?.relaxed;\n // this.formValueChanged();\n // });\n // }\n\n // maxSpotsStripeDailyDataOnChange() {\n // this.maxSpotsStripeDaily.valueChanges\n // .pipe(debounceTime(this.DEBOUNCE_TIME))\n // .subscribe((value: { preApproved: number; relaxed: number }) => {\n // this.aduValue.maxSpotsAllowedPerHalfHourInStripePerDay.Current = value?.preApproved;\n // this.aduValue.maxSpotsAllowedPerHalfHourInStripePerDayRelaxed.Current = value?.relaxed;\n // this.formValueChanged();\n // });\n // }\n\n // maxSpotsStripeWeeklyDataOnChange() {\n // this.maxSpotsStripeWeekly.valueChanges\n // .pipe(debounceTime(this.DEBOUNCE_TIME))\n // .subscribe((value: { preApproved: number; relaxed: number }) => {\n // this.aduValue.maxSpotsAllowedPerHalfHourInStripePerWeek.Current = value?.preApproved;\n // this.aduValue.maxSpotsAllowedPerHalfHourInStripePerWeekRelaxed.Current = value?.relaxed;\n // this.formValueChanged();\n // });\n // }\n\n commenceAduFormDataOnChange() {\n this.commenceAduForm.valueChanges\n .pipe(debounceTime(this.DEBOUNCE_TIME))\n .subscribe((data: { preApproved: number }) => {\n let value: number = data?.preApproved;\n value = this.getValueToBeInRangeForCommenceAdu(value);\n\n if (value !== data?.preApproved) {\n this.commenceAduForm.get(\"preApproved\").setValue(value, this.NOT_EMIT_VALUE_CHANGE);\n }\n\n this.aduValue.percentageDeficitAllowedBeforeAdu.Current = value;\n this.formValueChanged();\n });\n }\n OnScroll(event: WheelEvent) {\n event.preventDefault();\n }\n\n getValueToBeInRangeForCommenceAdu(value: number): number {\n let updatedValue: number = value;\n if (value > this.commenceAduForm_MAXVALUE) {\n updatedValue = this.commenceAduForm_MAXVALUE;\n }\n // if (value < this.commenceAduForm_MINVALUE && value != null) {\n // value = this.commenceAduForm_MINVALUE;\n // }\n return updatedValue;\n }\n\n setAllFormData() {\n if (this.aduValue.generateAdu.Current) {\n this.provideADUForSelectedOption = this.aduValue?.useProjectedValues?.Current\n ? \"ProvideForUDProjection\"\n : \"ProvideForUDTillPostedDate\";\n } else {\n this.provideADUForSelectedOption = \"ProvideForUDProjection\";\n }\n this.selectedAlternatives = this.aduValue.allowedInventory.preApproved.filter(\n (alternative) => alternative.isSelected,\n );\n this.commenceAduForm.get(\"preApproved\").setValue(this.aduValue.percentageDeficitAllowedBeforeAdu.Current);\n // this.maxSpotsOto.get('preApproved').setValue(this.aduValue.maxSpotsAllowedPerHalfHourInOTO.Current);\n // this.maxSpotsOto.get('relaxed').setValue(this.aduValue.maxSpotsAllowedPerHalfHourInOTORelaxed.Current);\n // this.maxSpotsStripeDaily\n // .get('preApproved')\n // .setValue(this.aduValue.maxSpotsAllowedPerHalfHourInStripePerDay.Current);\n // this.maxSpotsStripeDaily\n // .get('relaxed')\n // .setValue(this.aduValue.maxSpotsAllowedPerHalfHourInStripePerDayRelaxed.Current);\n // this.maxSpotsStripeWeekly\n // .get('preApproved')\n // .setValue(this.aduValue.maxSpotsAllowedPerHalfHourInStripePerWeek.Current);\n // this.maxSpotsStripeWeekly\n // .get('relaxed')\n // .setValue(this.aduValue.maxSpotsAllowedPerHalfHourInStripePerWeekRelaxed.Current);\n this.formValueChanged();\n }\n\n enableDisableForm() {\n if (this.isDisabled) {\n // this.maxSpotsOto.disable();\n // this.maxSpotsStripeDaily.disable();\n // this.maxSpotsStripeWeekly.disable();\n this.commenceAduForm.disable();\n } else {\n // this.maxSpotsOto.enable();\n // this.maxSpotsStripeDaily.enable();\n // this.maxSpotsStripeWeekly.enable();\n this.commenceAduForm.enable();\n }\n }\n\n checkIfAnyFormIsInvalid() {\n const allowedInventoryPreapproved = this.aduValue.allowedInventory.preApproved.filter((n) => n.isSelected)[0]\n ?.inventory;\n const allowedInventoryRelaxed = this.aduValue.allowedInventory.relaxed.filter((n) => n.isSelected)[0]\n ?.inventory;\n\n const timeWindowForAduPreapproved = this.aduValue.timeWindowForProvidingAdu.preApproved.filter(\n (n) => n.isSelected,\n )[0]?.inventory;\n const timeWindowForAduRelaxed = this.aduValue.timeWindowForProvidingAdu.relaxed.filter((n) => n.isSelected)[0]\n ?.inventory;\n const timeWindowForUdLiabilityPreapproved = this.aduValue.timeWindowForUdLiability.preApproved.filter(\n (n) => n.isSelected,\n )[0]?.inventory;\n const timeWindowForUdLiabilityRelaxed = this.aduValue.timeWindowForUdLiability.relaxed.filter(\n (n) => n.isSelected,\n )[0]?.inventory;\n\n const isInvalid =\n this.aduValue.allowedInventory.isInvalid ||\n this.aduValue.timeWindowForUdLiability.isInvalid ||\n this.aduValue.timeWindowForProvidingAdu.isInvalid ||\n !allowedInventoryPreapproved ||\n !allowedInventoryRelaxed ||\n !timeWindowForAduPreapproved ||\n !timeWindowForAduRelaxed ||\n !timeWindowForUdLiabilityPreapproved ||\n !timeWindowForUdLiabilityRelaxed ||\n this.commenceAduForm.invalid;\n // this.maxSpotsOto.invalid ||\n // this.maxSpotsStripeDaily.invalid ||\n // this.maxSpotsStripeWeekly.invalid ||\n //\n // this.maxSpotsStripeDaily.value.preApproved > this.maxSpotsStripeWeekly.value.preApproved ||\n // this.maxSpotsStripeDaily.value.relaxed > this.maxSpotsStripeWeekly.value.relaxed;\n return isInvalid;\n }\n\n aduRequiredChanged() {\n this.aduValue.generateAdu.Current = !this.aduValue.generateAdu.Current;\n // If ADU toggle set to NO; reset the form\n if (!this.aduValue.generateAdu.Current) {\n this.aduValue = cloneDeep(this.intialAduValue);\n this.aduValue.generateAdu.Current = false;\n this.daypartRules = this.aduValue.daypartGroups.daypartGroupList;\n this.setAllFormData();\n }\n this.setGenerateADUForOption();\n this.formValueChanged();\n }\n\n formValueChanged() {\n this.aduValue = cloneDeep(this.aduValue);\n this.aduChange.emit(this.aduValue);\n }\n\n checkPriority(rule: AllowedInventoryOrTimeWindow) {\n const selectedLowPriorityOption = rule.relaxed?.filter((e) => e.isSelected)[0];\n const selectedHighPriorityOption = rule.preApproved?.filter((e) => e.isSelected)[0];\n rule.isInvalid = selectedLowPriorityOption.id < selectedHighPriorityOption.id;\n }\n\n keepsLowPrioritySameAsHighPriorityForTimeWindowUdLiability() {\n if (this.aduValue?.timeWindowForUdLiability?.disableEditForRelaxed) {\n this.aduValue.timeWindowForUdLiability.relaxed = this.aduValue?.timeWindowForUdLiability?.preApproved;\n }\n }\n\n setMessageData() {\n // eslint-disable-next-line max-len\n const msg = `If you’ve chosen only the <b>Relaxed</b> rules for approval in the <b>Approvals</b> section, <b>Standard</b> ADU offers are automatically approved without your review. Otherwise, all offers require your approval. ANNA utilizes the <b>Standard</b> rule for initial offers and considers the <b>Relaxed</b> rule as a secondary option.${this.showMinimumSeparationInMessage ? `<b><i> Order separation followed for the order is ${this.minimumSeparation} as fetched from WO Traffic.</i></b>` : \"\"}`;\n\n const iconClass = \"mdi mdi-information\";\n this.aduAndMgMessageData = new MessageBoxData(\n null,\n msg,\n iconClass,\n `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm mg-adu-rule`,\n );\n }\n\n allowThreshold() {\n this.aduValue.isTresholdAllowed.Current = !this.aduValue.isTresholdAllowed.Current;\n this.formValueChanged();\n }\n\n onContainerScroll() {\n const elements = document.getElementsByClassName(\"tooltip\");\n while (elements.length > 0) {\n elements[0].remove();\n }\n }\n\n generateADURadioButtonClicked(value: \"ProvideForUDProjection\" | \"ProvideForUDTillPostedDate\") {\n this.provideADUForSelectedOption = value;\n this.setGenerateADUForOption();\n this.setUdLiabilityTimeWindowIfAudPostingRequired();\n this.formValueChanged();\n }\n\n setUdLiabilityTimeWindowIfAudPostingRequired() {\n if (this.aduValue.isUdLiabilityOrder && this.aduValue.generateAdu.Current) {\n this.aduValue.timeWindowForUdLiability.preApproved.forEach((item) => {\n if (item.inventory === \"ORIGINAL_FLIGHT_DATES\") {\n item.isSelected = true;\n } else {\n item.isSelected = false;\n }\n });\n\n this.aduValue.timeWindowForUdLiability.relaxed.forEach((item) => {\n if (item.inventory === \"ORIGINAL_FLIGHT_DATES\") {\n item.isSelected = true;\n } else {\n item.isSelected = false;\n }\n });\n }\n }\n\n setGenerateADUForOption() {\n this.aduValue.useProjectedValues.Current =\n this.aduValue.generateAdu.Current && this.provideADUForSelectedOption === \"ProvideForUDProjection\";\n }\n\n openRemoveGroupingModal() {\n this.removeGroupingConfirmation.openModal();\n }\n\n openDaypartGroupsModal() {\n // const isGroupsNotCreated = this.daypartRules.length == 2 && this.daypartRules[1].dayparts.length == 0;\n this.modalTitleForDpGroups = this.daypartRules.length === 0 ? \"Add Groups\" : \"Manage Groups\";\n if (this.daypartRules.length === 0) {\n this.daypartRules.push(new DaypartGroupsList(\"Group 1\", []));\n this.daypartRules[0].dayparts = this.aduValue.daypartGroups.allDaypartGroups;\n this.daypartRules.push(new DaypartGroupsList(\"Group 2\", []));\n // this.aduValue.daypartGroups.daypartGroupList = this.intialAduValue.daypartGroups.daypartGroupList;\n }\n this.cdr.markForCheck();\n this.addDaypartGroupingModalReference = this.modalService.open(this.addDaypartGroupModal, this.ngbModalOptions);\n }\n\n saveDaypartGroups(daypartList: DaypartGroupsList[]) {\n this.aduValue.daypartGroups.daypartGroupList = cloneDeep(daypartList);\n this.daypartRules = cloneDeep(daypartList);\n this.addDaypartGroupingModalReference.close();\n const indexOfSameDpInAllowedInventoryPreapproved = this.aduValue.allowedInventory.preApproved.findIndex(\n (item) => item.inventory === this.SAME_DAYPART_GROUP_ANY_DAY,\n );\n const indexOfSameDpInAllowedInventoryRelaxed = this.aduValue.allowedInventory.relaxed.findIndex(\n (item) => item.inventory === this.SAME_DAYPART_GROUP_ANY_DAY,\n );\n if (indexOfSameDpInAllowedInventoryPreapproved === -1) {\n this.aduValue.allowedInventory.preApproved.push(this.aduValue.sameDpGroupAllowedInventoryOption);\n }\n if (indexOfSameDpInAllowedInventoryRelaxed === -1) {\n this.aduValue.allowedInventory.relaxed.push(this.aduValue.sameDpGroupAllowedInventoryOption);\n }\n\n // this.intialAduValue.daypartGroups.daypartGroupList = cloneDeep(daypartList);\n this.cdr.markForCheck();\n this.formValueChanged();\n }\n\n removeGrouping() {\n this.aduValue.daypartGroups.daypartGroupList = [];\n\n this.daypartRules = cloneDeep(this.aduValue.daypartGroups.daypartGroupList);\n const indexOfSameDpInAllowedInventoryPreapproved = this.aduValue.allowedInventory.preApproved.findIndex(\n (item) => item.inventory === this.SAME_DAYPART_GROUP_ANY_DAY,\n );\n if (indexOfSameDpInAllowedInventoryPreapproved !== -1) {\n this.aduValue.allowedInventory.preApproved = this.aduValue.allowedInventory.preApproved.filter(\n (item) => item.inventory !== this.SAME_DAYPART_GROUP_ANY_DAY,\n );\n }\n const indexOfSameDpInAllowedInventoryRelaxed = this.aduValue.allowedInventory.relaxed.findIndex(\n (item) => item.inventory === this.SAME_DAYPART_GROUP_ANY_DAY,\n );\n\n if (indexOfSameDpInAllowedInventoryRelaxed !== -1) {\n this.aduValue.allowedInventory.relaxed = this.aduValue.allowedInventory.relaxed.filter(\n (item) => item.inventory !== this.SAME_DAYPART_GROUP_ANY_DAY,\n );\n }\n\n // this.intialAduValue.daypartGroups.daypartGroupList = cloneDeep(this.aduValue.daypartGroups.daypartGroupList);\n this.formValueChanged();\n this.cdr.detectChanges();\n this.cdr.markForCheck();\n }\n\n closeAddDaypartGroupModal() {\n this.daypartRules = cloneDeep(this.aduValue.daypartGroups.daypartGroupList);\n // this.aduValue.daypartGroups.daypartGroupList = cloneDeep(this.intialAduValue.daypartGroups.daypartGroupList);\n this.addDaypartGroupingModalReference.close();\n }\n provideOffersBasedOnSpecificWeekDaysChanged(value: boolean) {\n this.aduValue.provideOffersBasedOnSpecificWeekDays.Current = value;\n this.formValueChanged();\n }\n\n onlyForLiveOrdersChanged(value: boolean) {\n this.aduValue.onlyForLiveOrders.Current = value;\n this.formValueChanged();\n }\n\n provideAdusForShortestDurationChanged(value: boolean) {\n this.aduValue.provideAdusForShortestDuration.Current = value;\n this.formValueChanged();\n }\n\n removeGroupingModalConfig() {\n this.removeGroupingConfirmationConfig = { ...this.annaGlobalConfig.defaultConfirmationPopupConfig };\n this.removeGroupingConfirmationConfig.showCloseIcon = false;\n this.removeGroupingConfirmationConfig.title = \"Are you sure you want to remove Grouping?\";\n this.removeGroupingConfirmationConfig.windowClass = \"generic-confirm-modal\";\n }\n popupModalConfig() {\n this.ngbModalOptions = {\n windowClass: \"daypart-group-modal\",\n };\n }\n}\n","<article\n [ngClass]=\"{\n 'read-mode-inputs': readMode,\n 'edit-mode-inputs': !readMode,\n 'highlight-changes': highlightChanges,\n 'disable-highlight-changes': !highlightChanges,\n 'hide-tooltip': hideRulesTooltipInfo\n }\"\n>\n <!-- WILL SHOW input-difference-icon only if highlightChanges is true -->\n\n <anna-design-message-box\n *ngIf=\"!hideRulesTooltipInfo\"\n [messageBoxData]=\"aduAndMgMessageData\"\n ></anna-design-message-box>\n <div\n id=\"scroll-container-adu\"\n class=\"table-container\"\n (scroll)=\"onContainerScroll()\"\n >\n <table>\n <thead>\n <tr class=\"header-row\">\n <th class=\"rule-no\">RULE#</th>\n <th class=\"biz-rule\">BUSINESS RULES</th>\n <th class=\"yes-no\">YES/NO</th>\n <th class=\"standard-rule\">STANDARD RULE</th>\n <th class=\"relaxed-rule\">RELAXED RULE</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"valign-top\">\n <section>\n 1\n <i\n class=\"mi mdi-warning biz-rule-adu-discrepancy\"\n *ngIf=\"aduValue?.hasAduDiscrepancy\"\n [ngbTooltip]=\"aduDiscrepancyTooltip\"\n #t=\"ngbTooltip\"\n ></i>\n </section>\n </td>\n <td id=\"adu-table-first-row\">\n <section>\n {{ informationPool.generateAdu.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"generateAduTooltip\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n\n <div\n class=\"pod-text\"\n *ngIf=\"disabledAduPostingRequired\"\n >\n Order is of type: Payment on Delivery (PoD).\n </div>\n </section>\n\n <section\n class=\"pl-16\"\n *ngIf=\"readMode && aduValue?.generateAdu.Current\"\n >\n {{\n aduValue?.useProjectedValues?.Current\n ? informationPool.provideForUDProjection.name\n : informationPool.provideForUDTillPostedDate.name\n }}\n </section>\n <p\n class=\"pl-16 mb-0\"\n *ngIf=\"!readMode && aduValue?.generateAdu.Current\"\n >\n <mat-radio-group\n class=\"adu-radio-button-group\"\n [(ngModel)]=\"provideADUForSelectedOption\"\n [disabled]=\"aduValue?.isUdLiabilityOrder\"\n >\n <mat-radio-button\n value=\"ProvideForUDProjection\"\n (click)=\"generateADURadioButtonClicked('ProvideForUDProjection')\"\n >\n {{ informationPool.provideForUDProjection.name }}\n </mat-radio-button>\n <mat-radio-button\n value=\"ProvideForUDTillPostedDate\"\n (click)=\"generateADURadioButtonClicked('ProvideForUDTillPostedDate')\"\n >\n {{ informationPool.provideForUDTillPostedDate.name }}\n </mat-radio-button>\n </mat-radio-group>\n </p>\n </td>\n <td class=\"valign-top\">\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled || disabledAduPostingRequired\"\n [isToggled]=\"aduValue?.generateAdu.Current\"\n (toggle)=\"aduRequiredChanged()\"\n >\n </anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ aduValue?.generateAdu.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"aduValue?.generateAdu.IsChanged\"\n ></div>\n </section>\n </td>\n <td class=\"valign-top\">\n <section>-</section>\n </td>\n <td class=\"valign-top\">\n <section>-</section>\n </td>\n </tr>\n\n <ng-container *ngIf=\"aduValue?.generateAdu.Current\">\n <tr>\n <td>2</td>\n <td>\n {{ informationPool.provideADUsForLiveOrders.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"informationPool.provideADUsForLiveOrders.tooltip\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"aduValue?.onlyForLiveOrders?.Current\"\n (toggle)=\"onlyForLiveOrdersChanged($event)\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ aduValue?.onlyForLiveOrders?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"aduValue?.onlyForLiveOrders?.IsChanged\"\n ></div>\n </section>\n </td>\n <td>-</td>\n <td>-</td>\n </tr>\n <tr class=\"adu-rule-2-row\">\n <td>3</td>\n <td>\n {{ informationPool.minGrp.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"minGrp\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>-</td>\n <td>\n <form [formGroup]=\"commenceAduForm\">\n <ng-container *ngIf=\"!readMode\">\n <!--[min]=\"MINVALUE\" instead of commenceAduForm_MINVALUE intentional for backspace to work -->\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"commenceAduForm_MAXVALUE\"\n inputmode=\"numeric\"\n (wheel)=\"OnScroll($event)\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n aduValue?.percentageDeficitAllowedBeforeAdu.IsChanged,\n 'input-error-perct-field':\n commenceAduForm.controls.preApproved.errors?.required ||\n commenceAduForm.controls.preApproved.errors?.min ||\n commenceAduForm.controls.preApproved.errors?.max\n }\"\n class=\"form-control\"\n name=\"maxSpotsOto\"\n type=\"number\"\n formControlName=\"preApproved\"\n />\n\n <div\n [ngClass]=\"{\n 'input-icon-difference':\n highlightChanges &&\n aduValue?.percentageDeficitAllowedBeforeAdu.IsChanged,\n 'input-icon':\n !highlightChanges ||\n !aduValue?.percentageDeficitAllowedBeforeAdu.IsChanged,\n 'input-icon-perct-error':\n commenceAduForm.controls.preApproved.errors?.required ||\n commenceAduForm.controls.preApproved.errors?.min ||\n commenceAduForm.controls.preApproved.errors?.max\n }\"\n >\n %\n </div>\n </ng-container>\n <ng-container *ngIf=\"readMode\">\n {{ aduValue?.percentageDeficitAllowedBeforeAdu?.Current }}\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && aduValue?.percentageDeficitAllowedBeforeAdu.IsChanged\"\n ></div>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n commenceAduForm.controls?.preApproved?.errors?.max ||\n commenceAduForm.controls?.preApproved?.errors?.min\n \"\n [ngbTooltip]=\"commenceAduFormValueRangeError\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </td>\n <td>-</td>\n </tr>\n <tr>\n <td [ngClass]=\"{ 'valign-top': !readMode }\">\n <section>4</section>\n </td>\n <td [ngClass]=\"{ 'valign-top': !readMode }\">\n <section>\n {{ informationPool.daypart.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"daypartGroupingTooltip\"\n #t=\"ngbTooltip\"\n ></i>\n </section>\n </td>\n <td>-</td>\n <td\n colspan=\"2\"\n class=\"dp-groups-row\"\n >\n <ng-container *ngIf=\"readMode\">\n <ng-container *ngIf=\"aduValue.daypartGroups.daypartGroupList.length === 0\">\n -\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && aduValue.daypartGroups.isChanged\"\n ></div>\n </ng-container>\n <ng-container *ngIf=\"daypartRules.length > 0\">\n <div class=\"daypart-groups-container\">\n <div *ngFor=\"let group of daypartRules; let last = last\">\n <div>\n {{ group.groupName }}\n <ng-container\n *ngTemplateOutlet=\"\n daypartTemplate;\n context: { dayparts: group.dayparts }\n \"\n ></ng-container>\n <span *ngIf=\"!last\">, </span>\n </div>\n </div>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && aduValue.daypartGroups.isChanged\"\n ></div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!readMode\">\n <ng-container *ngIf=\"aduValue.daypartGroups.daypartGroupList.length === 0\">\n <button\n class=\"anna action-button cancel-button\"\n (click)=\"openDaypartGroupsModal()\"\n >\n Add Groups\n </button>\n </ng-container>\n <ng-container *ngIf=\"aduValue.daypartGroups.daypartGroupList.length > 0\">\n <div class=\"daypart-groups-container\">\n <div *ngFor=\"let group of aduValue.daypartGroups.daypartGroupList\">\n <div class=\"daypart-groups\">\n {{ group.groupName }}\n <ng-container\n *ngTemplateOutlet=\"\n daypartTemplate;\n context: { dayparts: group.dayparts }\n \"\n ></ng-container>\n </div>\n </div>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && aduValue.daypartGroups.isChanged\"\n ></div>\n </div>\n\n <div class=\"action-container\">\n <button\n class=\"anna action-button cancel-button\"\n (click)=\"openDaypartGroupsModal()\"\n >\n Manage Groups\n </button>\n <button\n class=\"action-button anna cancel-button\"\n (click)=\"openRemoveGroupingModal()\"\n >\n Remove Grouping\n </button>\n </div>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n <tr>\n <td>5</td>\n <td>\n {{ informationPool.allowedInventory.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowedInventory\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>-</td>\n <td>\n <anna-design-priority-dropdowns\n *ngIf=\"aduValue?.allowedInventory?.preApproved\"\n [showNeedBuyerApproval]=\"false\"\n [highPriorityList]=\"aduValue?.allowedInventory?.preApproved\"\n [lowPriorityList]=\"aduValue?.allowedInventory.relaxed\"\n [isDisabled]=\"isDisabled\"\n (highPriorityListChange)=\"checkPriority(aduValue?.allowedInventory); formValueChanged()\"\n (lowPriorityListChange)=\"checkPriority(aduValue?.allowedInventory); formValueChanged()\"\n [differences]=\"[\n highlightChanges && aduValue?.allowedInventory?.isPreApprovedChanged,\n highlightChanges && aduValue?.allowedInventory?.isRelaxedChanged\n ]\"\n >\n </anna-design-priority-dropdowns>\n </td>\n <td>\n <anna-design-priority-dropdowns\n *ngIf=\"aduValue?.allowedInventory?.preApproved\"\n [showAutoApproval]=\"false\"\n [highPriorityList]=\"aduValue?.allowedInventory?.preApproved\"\n [lowPriorityList]=\"aduValue?.allowedInventory.relaxed\"\n [isDisabled]=\"isDisabled\"\n (highPriorityListChange)=\"checkPriority(aduValue?.allowedInventory); formValueChanged()\"\n (lowPriorityListChange)=\"checkPriority(aduValue?.allowedInventory); formValueChanged()\"\n [errorInPriorityDropdown]=\"aduValue?.allowedInventory.isInvalid\"\n [differences]=\"[\n highlightChanges && aduValue?.allowedInventory?.isPreApprovedChanged,\n highlightChanges && aduValue?.allowedInventory?.isRelaxedChanged\n ]\"\n >\n </anna-design-priority-dropdowns>\n </td>\n </tr>\n <tr>\n <td>6</td>\n <td>\n {{ informationPool.provideMGsOnSpecificWeekdays.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"provideMGsOnSpecificWeekdays\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"\n isDisabled || aduValue?.disableProvideOffersBasedOnSpecificWeekDaysToggle\n \"\n [isToggled]=\"aduValue?.provideOffersBasedOnSpecificWeekDays?.Current\"\n (toggle)=\"provideOffersBasedOnSpecificWeekDaysChanged($event)\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ aduValue?.provideOffersBasedOnSpecificWeekDays?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"aduValue?.provideOffersBasedOnSpecificWeekDays?.IsChanged\"\n ></div>\n </section>\n </td>\n <td>-</td>\n <td>-</td>\n </tr>\n <tr>\n <td>7</td>\n <td>\n {{ informationPool.provideAdusForShortestDuration.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"provideAdusForShortestDuration\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"aduValue?.provideAdusForShortestDuration?.Current\"\n (toggle)=\"provideAdusForShortestDurationChanged($event)\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ aduValue?.provideAdusForShortestDuration?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"aduValue?.provideAdusForShortestDuration?.IsChanged\"\n ></div>\n </section>\n </td>\n <td>-</td>\n <td>-</td>\n </tr>\n <tr>\n <td class=\"valign-top\">\n <section>8</section>\n </td>\n <td>\n <section>\n {{ informationPool.aduTimeWindow.name }}\n </section>\n\n <section class=\"pl-16\">\n {{ informationPool.windowForUDLiability.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"timeWindowForUdLiability\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n\n <section class=\"pl-16\">\n {{ informationPool.windowForProvidingADUs.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"timeWindowForADU\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n </td>\n <td>\n <section></section>\n <section>-</section>\n <section>-</section>\n </td>\n <td>\n <section class=\"empty-block\"></section>\n\n <anna-design-priority-dropdowns\n class=\"udLiabilityDropdown\"\n *ngIf=\"aduValue?.timeWindowForUdLiability?.preApproved\"\n [showNeedBuyerApproval]=\"false\"\n [highPriorityList]=\"aduValue?.timeWindowForUdLiability?.preApproved\"\n [isDisabled]=\"isDisabled\"\n [disableDropdownInEditMode]=\"\n aduValue?.isUdLiabilityOrder && aduValue?.generateAdu.Current\n \"\n [lowPriorityList]=\"aduValue?.timeWindowForUdLiability.relaxed\"\n (highPriorityListChange)=\"\n keepsLowPrioritySameAsHighPriorityForTimeWindowUdLiability();\n checkPriority(aduValue?.timeWindowForUdLiability);\n formValueChanged()\n \"\n (lowPriorityListChange)=\"\n checkPriority(aduValue?.timeWindowForUdLiability); formValueChanged()\n \"\n [differences]=\"[\n highlightChanges && aduValue?.timeWindowForUdLiability?.isPreApprovedChanged,\n highlightChanges && aduValue?.timeWindowForUdLiability?.isRelaxedChanged\n ]\"\n >\n </anna-design-priority-dropdowns>\n\n <anna-design-priority-dropdowns\n class=\"aduWindowDropdown\"\n *ngIf=\"aduValue?.timeWindowForProvidingAdu?.preApproved\"\n [showNeedBuyerApproval]=\"false\"\n [highPriorityList]=\"aduValue?.timeWindowForProvidingAdu?.preApproved\"\n [isDisabled]=\"isDisabled\"\n [lowPriorityList]=\"aduValue?.timeWindowForProvidingAdu.relaxed\"\n (highPriorityListChange)=\"\n checkPriority(aduValue?.timeWindowForProvidingAdu); formValueChanged()\n \"\n (lowPriorityListChange)=\"\n checkPriority(aduValue?.timeWindowForProvidingAdu); formValueChanged()\n \"\n [differences]=\"[\n highlightChanges && aduValue?.timeWindowForProvidingAdu?.isPreApprovedChanged,\n highlightChanges && aduValue?.timeWindowForProvidingAdu?.isRelaxedChanged\n ]\"\n >\n </anna-design-priority-dropdowns>\n </td>\n <td>\n <section class=\"empty-block\"></section>\n\n <anna-design-priority-dropdowns\n class=\"udLiabilityDropdown\"\n *ngIf=\"aduValue?.timeWindowForUdLiability?.preApproved\"\n [showAutoApproval]=\"false\"\n [highPriorityList]=\"aduValue?.timeWindowForUdLiability?.preApproved\"\n [isDisabled]=\"isDisabled\"\n [disableDropdownInEditMode]=\"\n aduValue?.isUdLiabilityOrder && aduValue?.generateAdu?.Current\n \"\n [lowPriorityList]=\"aduValue?.timeWindowForUdLiability.relaxed\"\n (highPriorityListChange)=\"\n checkPriority(aduValue?.timeWindowForUdLiability); formValueChanged()\n \"\n (lowPriorityListChange)=\"\n checkPriority(aduValue?.timeWindowForUdLiability); formValueChanged()\n \"\n [differences]=\"[\n highlightChanges && aduValue?.timeWindowForUdLiability?.isPreApprovedChanged,\n highlightChanges && aduValue?.timeWindowForUdLiability?.isRelaxedChanged\n ]\"\n [errorInPriorityDropdown]=\"aduValue?.timeWindowForUdLiability.isInvalid\"\n [disabledLowPriorityOption]=\"aduValue?.timeWindowForUdLiability?.disableEditForRelaxed\"\n >\n </anna-design-priority-dropdowns>\n\n <anna-design-priority-dropdowns\n class=\"aduWindowDropdown\"\n *ngIf=\"aduValue?.timeWindowForProvidingAdu?.preApproved\"\n [showAutoApproval]=\"false\"\n [highPriorityList]=\"aduValue?.timeWindowForProvidingAdu?.preApproved\"\n [isDisabled]=\"isDisabled\"\n [lowPriorityList]=\"aduValue?.timeWindowForProvidingAdu.relaxed\"\n (highPriorityListChange)=\"\n checkPriority(aduValue?.timeWindowForProvidingAdu); formValueChanged()\n \"\n (lowPriorityListChange)=\"\n checkPriority(aduValue?.timeWindowForProvidingAdu); formValueChanged()\n \"\n [differences]=\"[\n highlightChanges && aduValue?.timeWindowForProvidingAdu?.isPreApprovedChanged,\n highlightChanges && aduValue?.timeWindowForProvidingAdu?.isRelaxedChanged\n ]\"\n [errorInPriorityDropdown]=\"aduValue?.timeWindowForProvidingAdu.isInvalid\"\n >\n </anna-design-priority-dropdowns>\n </td>\n </tr>\n\n <tr>\n <td>9</td>\n <td>\n {{ informationPool.allowAduTwoMinutes.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowAduTwoMinutes\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"aduValue?.isTresholdAllowed.Current\"\n (toggle)=\"allowThreshold()\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ aduValue?.isTresholdAllowed.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"aduValue?.isTresholdAllowed.IsChanged\"\n ></div>\n </section>\n </td>\n <td>-</td>\n <td>-</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n</article>\n<ng-template\n #daypartTemplate\n let-dayparts=\"dayparts\"\n >(<ng-container *ngFor=\"let daypart of dayparts; let last = last\"\n ><span>{{ daypart.text }}</span\n ><span *ngIf=\"!last\">, </span> </ng-container\n >)\n</ng-template>\n\n<ng-template\n #addDaypartGroupModal\n let-modal\n>\n <anna-feature-daypart-grouping-popup\n [modalTitle]=\"modalTitleForDpGroups\"\n [daypartGroupsForPopup]=\"daypartRules\"\n (closeModal)=\"closeAddDaypartGroupModal()\"\n (emitSavedDaypartGroups)=\"saveDaypartGroups($event)\"\n >\n </anna-feature-daypart-grouping-popup>\n</ng-template>\n\n<anna-design-confirmation-popup\n #removeGroupingModal\n [config]=\"removeGroupingConfirmationConfig\"\n (confirmClicked)=\"removeGrouping()\"\n>\n</anna-design-confirmation-popup>\n\n<ng-template #aduDiscrepancyTooltip>\n <span>The order type is set to Paid on ANNA where no audience posting is required but has user booked ADUs</span>\n</ng-template>\n\n<ng-template #generateAduTooltip>\n <span [innerHtml]=\"informationPool.generateAdu.tooltip\"></span>\n</ng-template>\n\n<ng-template #minGrp>\n <span [innerHtml]=\"informationPool.minGrp.tooltip\"></span>\n</ng-template>\n\n<ng-template #aduTimeWindow>\n <span [innerHtml]=\"informationPool.aduTimeWindow.tooltip\"></span>\n</ng-template>\n<ng-template #provideMGsOnSpecificWeekdays>\n <span [innerHtml]=\"informationPool.provideMGsOnSpecificWeekdays.tooltip\"></span>\n</ng-template>\n<ng-template #provideAdusForShortestDuration>\n <span [innerHtml]=\"informationPool.provideAdusForShortestDuration.tooltip\"></span>\n</ng-template>\n<ng-template #allowAduTwoMinutes>\n <span [innerHtml]=\"informationPool.allowAduTwoMinutes.tooltip\"></span>\n</ng-template>\n\n<ng-template #allowedInventory>\n <span [innerHtml]=\"informationPool.allowedInventory.tooltip\"></span>\n</ng-template>\n<ng-template #timeWindowForUdLiability>\n <span [innerHtml]=\"informationPool.windowForUDLiability.tooltip\"></span>\n</ng-template>\n<ng-template #timeWindowForADU>\n <span [innerHtml]=\"informationPool.windowForProvidingADUs.tooltip\"></span>\n</ng-template>\n<ng-template #daypartGroupingTooltip>\n <span [innerHtml]=\"informationPool.daypart.tooltip\"></span>\n</ng-template>\n<!-- Error message tooltip -->\n<ng-template #dailyBuyerApprovalGreater>\n The Daily Relaxed value has to be greater than or equal to the Daily Standard value.\n</ng-template>\n\n<ng-template #weeklyValueGreaterThanDaily>\n The Weekly values have to be greater than or equal to the Daily values.\n</ng-template>\n\n<ng-template #weeklyNeedBuyerApprovalValueGreaterThanDailyAndWeeklyValueGreaterThanDaily>\n <div>\n <ul>\n <li>The Weekly values have to be greater than or equal to the Daily values.</li>\n <li>The Weekly Relaxed value has to be greater than or equal to the Weekly Standard value.</li>\n </ul>\n </div>\n</ng-template>\n\n<ng-template #needBuyerApprovalHasToBeGreater>\n The Relaxed value has to be greater than or equal to the Standard value.\n</ng-template>\n\n<ng-template #weeklyNeedBuyerApprovalValueGreaterThanDaily>\n The Weekly Relaxed value has to be greater than or equal to the Weekly Standard value.\n</ng-template>\n\n<ng-template #commenceAduFormValueRangeError>\n The value has to be greater than or equal to {{ commenceAduForm_MINVALUE }}%.\n</ng-template>\n","import { Injectable } from \"@angular/core\";\nimport { IRadioButtonComponentConfig } from \"@annalib/anna-core\";\n\nimport { ApprovalSelectionOption } from \"../../business-rule-page/models/business-rule.model\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class ApprovalConfigService {\n getSellerOrBuyerApprovalOfferedMgsRadioConfig(): IRadioButtonComponentConfig {\n return {\n heading: null,\n radioGroupName: \"SellerOrBuyerApprovalOfferedMgsRadio\",\n radioButtons: [\n {\n value: ApprovalSelectionOption.AUTO_APPROVE_ALL,\n isDisabled: false,\n label: \"Auto-approve all MGs\",\n class: \"grey-background\",\n tooltip: \"All qualifying offers are approved automatically.\",\n },\n {\n value: ApprovalSelectionOption.AUTO_APPROVE_STANDARD,\n isDisabled: false,\n label: \"Auto-approve standard rule MGs only\",\n class: \"grey-background\",\n tooltip:\n \"Only offers meeting standard rules are approved automatically while offers meeting relaxed rules still require manual review.\",\n },\n {\n value: ApprovalSelectionOption.REVIEW_ALL,\n isDisabled: false,\n label: \"Manual review required for all MGs\",\n class: \"grey-background\",\n tooltip: \"Every offer requires your review and approval.\",\n },\n ],\n };\n }\n getSellerOrBuyerApprovalOfferedAdusRadioConfig(): IRadioButtonComponentConfig {\n return {\n heading: null,\n radioGroupName: \"SellerOrBuyerApprovalOfferedAdusRadio\",\n radioButtons: [\n {\n value: ApprovalSelectionOption.AUTO_APPROVE_ALL,\n isDisabled: false,\n label: \"Auto-approve all ADUs\",\n class: \"grey-background\",\n tooltip: \"All qualifying offers are approved automatically.\",\n },\n {\n value: ApprovalSelectionOption.AUTO_APPROVE_STANDARD,\n isDisabled: false,\n label: \"Auto-approve standard rule ADUs only\",\n class: \"grey-background\",\n tooltip:\n \"Only offers meeting standard rules are approved automatically while offers meeting relaxed rules still require manual review. \",\n },\n {\n value: ApprovalSelectionOption.REVIEW_ALL,\n isDisabled: false,\n label: \"Manual review required for all ADUs\",\n class: \"grey-background\",\n tooltip: \"Every offer requires your review and approval.\",\n },\n ],\n };\n }\n getSellerOrBuyerApprovalCreditingExtraAdusRadioConfig(): IRadioButtonComponentConfig {\n return {\n heading: null,\n radioGroupName: \"SellerOrBuyerApprovalCreditingExtraAdusRadio\",\n radioButtons: [\n {\n value: ApprovalSelectionOption.AUTO_APPROVE_ALL,\n isDisabled: false,\n label: \"Auto-credit all extra ADUs\",\n class: \"grey-background\",\n tooltip: \"All qualifying ADUs are credited automatically.\",\n },\n {\n value: ApprovalSelectionOption.AUTO_APPROVE_STANDARD,\n isDisabled: false,\n label: \"Auto-credit extra ADUs meeting standard rules only\",\n class: \"grey-background m-0\",\n tooltip:\n \"Only ADUs meeting standard rules are credited automatically while ADUs meeting relaxed rules require manual review. \",\n },\n {\n value: ApprovalSelectionOption.REVIEW_ALL,\n isDisabled: false,\n label: \"Manual review required for all extra ADUs\",\n class: \"grey-background\",\n tooltip: \"Every ADU requires your review for crediting.\",\n },\n ],\n };\n }\n\n getBuyerApprovalOfferedBonussRadioConfig(): IRadioButtonComponentConfig {\n return {\n heading: null,\n radioGroupName: \"BuyerApprovalOfferedBonusRadio\",\n radioButtons: [\n {\n value: ApprovalSelectionOption.AUTO_APPROVE_ALL,\n isDisabled: false,\n label: \"Auto-approve all Bonuses\",\n class: \"grey-background\",\n tooltip: \"All qualifying offers are approved automatically.\",\n },\n {\n value: ApprovalSelectionOption.AUTO_APPROVE_STANDARD,\n isDisabled: false,\n label: \"Auto-approve standard rule Bonusess only\",\n class: \"grey-background\",\n tooltip:\n \"Only offers meeting standard rules are approved automatically while offers meeting relaxed rules still require manual review.\",\n },\n {\n value: ApprovalSelectionOption.REVIEW_ALL,\n isDisabled: false,\n label: \"Manual review required for all Bonuses\",\n class: \"grey-background\",\n tooltip: \"Every offer requires your review and approval.\",\n },\n ],\n };\n }\n}\n","import { CommonModule, NgFor, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { IRadioButtonComponentConfig } from \"@annalib/anna-core\";\nimport { RadioButtonsComponent, ToggleComponent } from \"@annalib/anna-design-components-lib\";\nimport { NgbTooltipModule } from \"@ng-bootstrap/ng-bootstrap\";\n\nimport { ApprovalConfig, ApprovalSelectionOption } from \"../business-rule-page/models/business-rule.model\";\nimport { BusinessPageType, UserTypeEnum } from \"../business-rule-page/models/business-rule-page.constants\";\nimport { ApprovalConfigService } from \"./services/approval-config.service\";\n\n@Component({\n selector: \"anna-feature-approval-config\",\n imports: [\n CommonModule,\n NgIf,\n NgFor,\n RadioButtonsComponent,\n RadioButtonsComponent,\n ToggleComponent,\n FormsModule,\n NgbTooltipModule,\n ],\n templateUrl: \"./approval-config.component.html\",\n styleUrls: [\"./approval-config.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ApprovalConfigComponent implements OnChanges {\n @Input() editModeClonedCopy: boolean = false;\n @Input() approvalConfig: ApprovalConfig = null;\n @Input() userType: UserTypeEnum;\n @Input() businessRulePageType: BusinessPageType | string;\n @Input() isTrafficAnnaOrder: boolean = false;\n @Input() editMode: boolean = false;\n @Output() approvalConfigChanged = new EventEmitter<ApprovalConfig>();\n\n sellerOrBuyerApprovalOfferedMgsRadioConfig: IRadioButtonComponentConfig;\n sellerOrBuyerApprovalOfferedADUsRadioConfig: IRadioButtonComponentConfig;\n sellerOrBuyerApprovalCreditingExtraADUsRadioConfig: IRadioButtonComponentConfig;\n sellerOrBuyerApprovalOfferedBonusesRadioConfig: IRadioButtonComponentConfig;\n sellerOrBuyerApprovalConfig: \"sellerApprovalConfiguration\" | \"buyerApprovalConfiguration\" = null;\n UserTypeEnum = UserTypeEnum;\n BusinessPageType = BusinessPageType;\n showDirectOrderSection: boolean = false;\n showElectronicOrderSection: boolean = false;\n areAllCheckboxesUncheckedForDirectOrder: boolean;\n areAllCheckboxesUnCheckedForElectronicOrder: boolean;\n\n constructor(private approvalConfigService: ApprovalConfigService) {\n this.sellerOrBuyerApprovalOfferedMgsRadioConfig =\n this.approvalConfigService.getSellerOrBuyerApprovalOfferedMgsRadioConfig();\n this.sellerOrBuyerApprovalOfferedADUsRadioConfig =\n this.approvalConfigService.getSellerOrBuyerApprovalOfferedAdusRadioConfig();\n this.sellerOrBuyerApprovalCreditingExtraADUsRadioConfig =\n this.approvalConfigService.getSellerOrBuyerApprovalCreditingExtraAdusRadioConfig();\n this.sellerOrBuyerApprovalOfferedBonusesRadioConfig =\n this.approvalConfigService.getBuyerApprovalOfferedBonussRadioConfig();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.userType || changes.approvalConfig) {\n if (this.userType === UserTypeEnum.SELLER) {\n this.sellerOrBuyerApprovalConfig = \"sellerApprovalConfiguration\";\n } else {\n this.sellerOrBuyerApprovalConfig = \"buyerApprovalConfiguration\";\n }\n this.showDirectOrderSection =\n this.businessRulePageType === BusinessPageType.ADVERTISER ||\n (this.businessRulePageType === BusinessPageType.ORDER && this.isTrafficAnnaOrder);\n this.showElectronicOrderSection =\n this.businessRulePageType === BusinessPageType.ADVERTISER ||\n (this.businessRulePageType === BusinessPageType.ORDER && !this.isTrafficAnnaOrder);\n }\n }\n\n offeredMgsRadioChanged(event: any) {\n this.approvalConfig[this.sellerOrBuyerApprovalConfig].offeredMgs.selection = event;\n this.approvalConfigValueChanged();\n }\n creditingExtraAdusChanged(event: any) {\n this.approvalConfig[this.sellerOrBuyerApprovalConfig].creditingExtraAdus.selection = event;\n this.approvalConfigValueChanged();\n }\n\n updateOfferedAdus(value: boolean) {\n if (\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n ?.offeredAdus\n ) {\n return;\n }\n this.approvalConfig.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor.offeredAdus.isChecked =\n value;\n }\n updateOfferedMgsChecked(value: boolean) {\n if (\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n ?.offeredMgs\n ) {\n return;\n }\n\n this.approvalConfig.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor.offeredMgs.isChecked =\n value;\n }\n\n updateCreditingExtraAdusChecked(value: boolean) {\n if (\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n ?.creditingExtraAdus\n ) {\n return;\n }\n\n this.approvalConfig.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor.creditingExtraAdus.isChecked =\n value;\n }\n\n updateOfferedBonusChecked(value: boolean) {\n if (\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n ?.offeredBonus\n ) {\n return;\n }\n\n this.approvalConfig.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor.offeredBonus.isChecked =\n value;\n }\n\n updateOfferedAdusAndCreditingExtraAdusCheckBox(value: boolean) {\n if (\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredAdusAndCreditingExtraAdus\n ) {\n return;\n }\n\n this.approvalConfig.buyerApprovalConfigurationForSeller.buyerApprovalOnRepToolRequiredFor.offeredAdusAndCreditingExtraAdus.isChecked =\n value;\n }\n\n updateOffersMgsForReptoolCheckbox(value: boolean) {\n if (!this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor.offeredMgs) {\n return;\n }\n\n this.approvalConfig.buyerApprovalConfigurationForSeller.buyerApprovalOnRepToolRequiredFor.offeredMgs.isChecked =\n value;\n }\n\n updateOfferedBonusForReptoolCheckbox(value: boolean) {\n if (!this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor.offeredBonus) {\n return;\n }\n\n this.approvalConfig.buyerApprovalConfigurationForSeller.buyerApprovalOnRepToolRequiredFor.offeredBonus.isChecked =\n value;\n }\n\n buyerBizRulesApprovalRequiredInEOSToggleChange() {\n this.approvalConfig.buyerApprovalConfigurationForSeller.isBuyerBizRuleApprovalNeeded =\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerBizRuleApprovalNeeded;\n this.approvalConfigValueChanged();\n }\n buyerSpotsApprovalRequiredInEOSToggleChange(value: boolean) {\n this.approvalConfig.buyerApprovalConfigurationForSeller.isBuyerSpotsApprovalNeeded =\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeeded;\n this.sellerSpotsReconfirmationToggleChange(!value);\n\n this.approvalConfigValueChanged();\n }\n buyerSpotsApprovalRequiredOnRepToolToggleChange(value: boolean) {\n this.approvalConfig.buyerApprovalConfigurationForSeller.isBuyerSpotsApprovalNeededOnRepTool =\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeededOnRepTool;\n this.approvalConfigValueChanged();\n }\n sellerSpotsReconfirmationToggleChange(value: boolean) {\n this.approvalConfig.buyerApprovalConfigurationForSeller.isSellerSpotsReconfirmationNeeded = value;\n this.approvalConfigValueChanged();\n }\n offeredADUsRadioChanged(event: ApprovalSelectionOption) {\n this.approvalConfig[this.sellerOrBuyerApprovalConfig].offeredAdus.selection = event;\n this.approvalConfigValueChanged();\n }\n\n offeredBonusRadioChanged(event: ApprovalSelectionOption) {\n this.approvalConfig[this.sellerOrBuyerApprovalConfig].offeredBonus.selection = event;\n this.approvalConfigValueChanged();\n }\n\n approvalConfigValueChanged() {\n this.approvalConfigChanged.emit(this.approvalConfig);\n }\n\n checkIfAllCheckboxesUnchecked() {\n if (this.approvalConfig?.buyerApprovalConfigurationForSeller) {\n const { offeredMgs, offeredAdus, creditingExtraAdus, offeredBonus } =\n this.approvalConfig.buyerApprovalConfigurationForSeller.buyerOrSellerReconfirmationRequiredFor;\n\n this.areAllCheckboxesUncheckedForDirectOrder =\n !offeredMgs.isChecked &&\n !offeredAdus.isChecked &&\n !creditingExtraAdus.isChecked &&\n !offeredBonus.isChecked;\n\n this.areAllCheckboxesUnCheckedForElectronicOrder =\n this.approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeededOnRepTool &&\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor.offeredMgs\n .isChecked &&\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredAdusAndCreditingExtraAdus.isChecked &&\n !this.approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredBonus.isChecked;\n }\n }\n isApprovalConfigInValid(): boolean {\n const isSeller = this.userType === UserTypeEnum.SELLER;\n this.checkIfAllCheckboxesUnchecked();\n\n if (\n (isSeller && this.showDirectOrderSection && this.areAllCheckboxesUncheckedForDirectOrder) ||\n (this.showElectronicOrderSection && this.areAllCheckboxesUnCheckedForElectronicOrder)\n ) {\n return true;\n }\n\n return false;\n }\n}\n","<div\n class=\"section-header-container\"\n *ngIf=\"\n approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredMgs.showSection ||\n approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredAdus.showSection ||\n approvalConfig?.[sellerOrBuyerApprovalConfig]?.creditingExtraAdus.showSection\n \"\n>\n <header>{{ userType | titlecase }} Spots Approval</header>\n <span class=\"horizontal-divider\"></span>\n</div>\n\n<div\n class=\"no-data-message\"\n *ngIf=\"\n !approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredMgs.showSection &&\n !approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredAdus.showSection &&\n !approvalConfig?.[sellerOrBuyerApprovalConfig]?.creditingExtraAdus.showSection\n \"\n>\n No configurations for spots approval to be set for this\n {{ businessRulePageType === BusinessPageType.ADVERTISER ? \"advertiser\" : \"order\" }}. Access business rules from the\n next tab.\n</div>\n<div\n class=\"seller-buyer-configs\"\n *ngIf=\"\n approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredMgs.showSection ||\n approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredAdus.showSection ||\n approvalConfig?.[sellerOrBuyerApprovalConfig]?.creditingExtraAdus.showSection\n \"\n>\n <div\n [ngClass]=\"{ 'hide-section': !approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredMgs.showSection }\"\n class=\"config-sections\"\n >\n <header class=\"mb-8\">Offered MGs</header>\n <anna-design-radio-buttons\n class=\"config-radio\"\n [horizontalAlignment]=\"false\"\n [config]=\"sellerOrBuyerApprovalOfferedMgsRadioConfig\"\n [selectedValue]=\"approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredMgs.selection\"\n (selectionChanged)=\"offeredMgsRadioChanged($event)\"\n [disabled]=\"!editMode\"\n ></anna-design-radio-buttons>\n </div>\n <div\n [ngClass]=\"{ 'hide-section': !approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredAdus.showSection }\"\n class=\"config-sections\"\n >\n <header class=\"mb-8\">Offered ADUs</header>\n <anna-design-radio-buttons\n class=\"config-radio\"\n [horizontalAlignment]=\"false\"\n [config]=\"sellerOrBuyerApprovalOfferedADUsRadioConfig\"\n [selectedValue]=\"approvalConfig?.[sellerOrBuyerApprovalConfig]?.offeredAdus.selection\"\n (selectionChanged)=\"offeredADUsRadioChanged($event)\"\n [disabled]=\"!editMode\"\n ></anna-design-radio-buttons>\n </div>\n <div\n [ngClass]=\"{\n 'hide-section': !approvalConfig?.[sellerOrBuyerApprovalConfig]?.creditingExtraAdus.showSection\n }\"\n class=\"config-sections\"\n >\n <header class=\"mb-8\">\n Crediting ADUs over 100% delivery\n <i\n class=\"mi mdi-info-outline\"\n [ngbTooltip]=\"\n 'Offers to credit Booked ADUs will only be provided if the order is bound to over-deliver.'\n \"\n >\n </i>\n </header>\n <anna-design-radio-buttons\n class=\"config-radio\"\n [horizontalAlignment]=\"false\"\n [config]=\"sellerOrBuyerApprovalCreditingExtraADUsRadioConfig\"\n [selectedValue]=\"approvalConfig?.[sellerOrBuyerApprovalConfig]?.creditingExtraAdus.selection\"\n (selectionChanged)=\"creditingExtraAdusChanged($event)\"\n [disabled]=\"!editMode\"\n ></anna-design-radio-buttons>\n </div>\n</div>\n\n<section\n *ngIf=\"userType === UserTypeEnum.SELLER && businessRulePageType !== BusinessPageType.STATION\"\n class=\"buyer-section\"\n>\n <div class=\"section-header-container\">\n <header>Buyer Spots Approval</header>\n <span class=\"horizontal-divider\"></span>\n </div>\n <!-- here disable depends on editModeClonedCopy not editMode because of allowEditForCompletedOrder -->\n <header>Share business rules and order details with the buyer and rep on EOS?</header>\n <anna-design-toggle\n [isDisabled]=\"!editModeClonedCopy\"\n [isToggled]=\"approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerBizRuleApprovalNeeded\"\n (toggle)=\"buyerBizRulesApprovalRequiredInEOSToggleChange()\"\n >\n </anna-design-toggle>\n <div class=\"electronic-and-direct-order-container\">\n <section\n class=\"mt-20\"\n *ngIf=\"showDirectOrderSection\"\n >\n <header class=\"grey-text mb-8 min-w350\">DIRECT ORDERS</header>\n <div class=\"inner-section\">\n <header>Spots approval needed by buyer on EOS?</header>\n <anna-design-toggle\n [isDisabled]=\"!editMode\"\n [isToggled]=\"approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeeded\"\n (toggle)=\"buyerSpotsApprovalRequiredInEOSToggleChange($event)\"\n >\n </anna-design-toggle>\n <ng-container *ngIf=\"!approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeeded\">\n <header class=\"mt-20\">Seller reconfirmation post offline discussion with buyer on ANNA</header>\n <anna-design-toggle\n [isDisabled]=\"true\"\n [isToggled]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.isSellerSpotsReconfirmationNeeded\n \"\n (toggle)=\"sellerSpotsReconfirmationToggleChange($event)\"\n >\n </anna-design-toggle>\n </ng-container>\n <header class=\"mt-20 mb-8 d-flex align-items-center\">\n <ng-container\n *ngIf=\"approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeeded\"\n >\n Buyer approval on EOS required for\n <div\n *ngIf=\"areAllCheckboxesUncheckedForDirectOrder\"\n class=\"error-message\"\n >\n <i class=\"mdi mdi-alert-octagon\"></i>Select atleast one of the options below\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"!approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeeded\"\n >\n Seller reconfirmation on ANNA required for\n <div\n *ngIf=\"\n !this.approvalConfig.buyerApprovalConfigurationForSeller\n .buyerOrSellerReconfirmationRequiredFor.offeredMgs.isChecked &&\n !this.approvalConfig.buyerApprovalConfigurationForSeller\n .buyerOrSellerReconfirmationRequiredFor.offeredAdus.isChecked &&\n !this.approvalConfig.buyerApprovalConfigurationForSeller\n .buyerOrSellerReconfirmationRequiredFor.creditingExtraAdus.isChecked &&\n !this.approvalConfig.buyerApprovalConfigurationForSeller\n .buyerOrSellerReconfirmationRequiredFor.offeredBonus.isChecked\n \"\n class=\"error-message\"\n >\n <i class=\"mdi mdi-alert-octagon\"></i>Select atleast one of the options below\n </div>\n </ng-container>\n </header>\n\n <div class=\"approval-item\">\n <input\n type=\"checkbox\"\n [ngModel]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n ?.offeredMgs?.isChecked\n \"\n (ngModelChange)=\"updateOfferedMgsChecked($event)\"\n [disabled]=\"\n !editMode ||\n !approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n .offeredMgs.isEnabled\n \"\n (change)=\"approvalConfigValueChanged()\"\n />\n <label>{{\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n .offeredMgs.label\n }}</label>\n </div>\n <div class=\"approval-item\">\n <input\n type=\"checkbox\"\n [ngModel]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n ?.offeredAdus?.isChecked\n \"\n (ngModelChange)=\"updateOfferedAdus($event)\"\n [disabled]=\"\n !editMode ||\n !approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n .offeredAdus.isEnabled\n \"\n (change)=\"approvalConfigValueChanged()\"\n />\n <label>{{\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n .offeredAdus.label\n }}</label>\n </div>\n <div class=\"approval-item\">\n <input\n type=\"checkbox\"\n [ngModel]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n ?.creditingExtraAdus?.isChecked\n \"\n (ngModelChange)=\"updateCreditingExtraAdusChecked($event)\"\n [disabled]=\"\n !editMode ||\n !approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n .creditingExtraAdus.isEnabled\n \"\n (change)=\"approvalConfigValueChanged()\"\n />\n <label>{{\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n .creditingExtraAdus.label\n }}</label>\n </div>\n <div class=\"approval-item\">\n <input\n type=\"checkbox\"\n [ngModel]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n ?.offeredBonus?.isChecked\n \"\n (ngModelChange)=\"updateOfferedBonusChecked($event); approvalConfigValueChanged()\"\n [disabled]=\"\n !editMode ||\n !approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n .offeredBonus.isEnabled\n \"\n />\n <label>{{\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerOrSellerReconfirmationRequiredFor\n .offeredBonus.label\n }}</label>\n </div>\n </div>\n </section>\n <section\n class=\"mt-20\"\n *ngIf=\"showElectronicOrderSection\"\n >\n <header class=\"grey-text mb-8\">ELECTRONIC ORDERS</header>\n <div class=\"inner-section\">\n <header>Spots approval needed by buyer on rep tool?</header>\n <anna-design-toggle\n [isDisabled]=\"!editMode\"\n [isToggled]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeededOnRepTool\n \"\n (toggle)=\"buyerSpotsApprovalRequiredOnRepToolToggleChange($event)\"\n >\n </anna-design-toggle>\n <ng-container\n *ngIf=\"approvalConfig?.buyerApprovalConfigurationForSeller?.isBuyerSpotsApprovalNeededOnRepTool\"\n >\n <header class=\"mb-8\">\n Buyer approval on rep tool required for\n <div\n *ngIf=\"areAllCheckboxesUnCheckedForElectronicOrder\"\n class=\"error-message\"\n >\n <i class=\"mdi mdi-alert-octagon\"></i>Select atleast one of the options below\n </div>\n </header>\n\n <div class=\"approval-item\">\n <input\n type=\"checkbox\"\n [ngModel]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n ?.offeredMgs?.isChecked\n \"\n (ngModelChange)=\"updateOffersMgsForReptoolCheckbox($event)\"\n [disabled]=\"\n !editMode ||\n !approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredMgs.isEnabled\n \"\n (change)=\"approvalConfigValueChanged()\"\n />\n\n <label>{{\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredMgs.label\n }}</label>\n </div>\n <div class=\"approval-item\">\n <input\n type=\"checkbox\"\n [ngModel]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n ?.offeredAdusAndCreditingExtraAdus?.isChecked\n \"\n (ngModelChange)=\"updateOfferedAdusAndCreditingExtraAdusCheckBox($event)\"\n [disabled]=\"\n !editMode ||\n !approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredAdusAndCreditingExtraAdus.isEnabled\n \"\n (change)=\"approvalConfigValueChanged()\"\n />\n <label>{{\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredAdusAndCreditingExtraAdus.label\n }}</label>\n\n <label\n class=\"info-italic-msg\"\n *ngIf=\"\n !approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredAdusAndCreditingExtraAdus.isChecked\n \"\n >\n Discrepancy for electronic orders will be considered by excluding ADU and Bonus spots based\n on this selection.\n </label>\n </div>\n <div class=\"approval-item\">\n <input\n type=\"checkbox\"\n [ngModel]=\"\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n ?.offeredBonus?.isChecked\n \"\n (ngModelChange)=\"updateOfferedBonusForReptoolCheckbox($event); approvalConfigValueChanged()\"\n [disabled]=\"\n !editMode ||\n !approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredBonus.isEnabled\n \"\n />\n\n <label>{{\n approvalConfig?.buyerApprovalConfigurationForSeller?.buyerApprovalOnRepToolRequiredFor\n .offeredBonus.label\n }}</label>\n </div>\n </ng-container>\n </div>\n </section>\n </div>\n</section>\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({\n name: \"removeEndZero\",\n standalone: true,\n})\nexport class ReplaceEndPipe implements PipeTransform {\n transform(value: string): string {\n if (!value) return value;\n return value.replace(/(\\d{1,2})00 (AM|PM)$/, \"$1 $2\");\n }\n}\n","import { NgClass, NgFor, NgIf, NgTemplateOutlet } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport {\n AnnaCoreModule,\n AnnaFilterService,\n AnnaGlobalConfigService,\n IGtGeneralConfig,\n RadioButtonModel,\n} from \"@annalib/anna-core\";\nimport {\n AnnaDesignComponentsLibModule,\n GenericMessageBoxTheme,\n MessageBoxData,\n} from \"@annalib/anna-design-components-lib\";\nimport { GenericBusinessRuleCommonSIBILogicService } from \"@annalib/anna-feature-lib/anna-feature-shared-lib\";\nimport { NgbTooltip } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep, isEqual } from \"lodash-es\";\n\nimport {\n DayAndDaypartRestrictionForMgAndAdu,\n DaypartRestrictionDetails,\n DaySelected,\n} from \"../business-rule-page/models/business-rule.model\";\nimport { ReplaceEndPipe } from \"./pipe/replaceEnd.pipe\";\n\ntype DAYTYPE = \"weekdays\" | \"saturday\" | \"sunday\";\ntype MGADUTYPE = \"MG\" | \"ADU\";\n\n@Component({\n selector: \"anna-feature-daypart-restrictions\",\n templateUrl: \"./daypart-restrictions.component.html\",\n styleUrls: [\"./daypart-restrictions.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n NgIf,\n NgClass,\n NgbTooltip,\n NgFor,\n AnnaCoreModule,\n NgTemplateOutlet,\n FormsModule,\n ReplaceEndPipe,\n AnnaDesignComponentsLibModule,\n ],\n})\nexport class DaypartRestrictionsComponent implements OnInit, OnChanges {\n @Input() data: DayAndDaypartRestrictionForMgAndAdu[] = [];\n @Input() isDisabled: boolean;\n @Input() highlightChanges: boolean = false;\n @Input() noOfHighlightChanges: number = 0;\n\n @Output() dpChanges = new EventEmitter<any[]>();\n\n filterTabObjects: any[];\n tooltip: any;\n dayPartRestrictionsClonnedData: DayAndDaypartRestrictionForMgAndAdu[] = [];\n TIME_FORMAT_HTML = \"hmm A\";\n\n detectChanges = {\n rowNumber: -1,\n isMGSelected: false,\n isADUSelected: false,\n weekdays: false,\n saturday: false,\n sunday: false,\n };\n\n gtGeneralConfig: IGtGeneralConfig;\n messageForDp: MessageBoxData;\n\n readonly MG = \"MG\";\n readonly ADU = \"ADU\";\n readonly WEEKDAYS = \"weekdays\";\n readonly SATURDAY = \"saturday\";\n readonly SUNDAY = \"sunday\";\n\n constructor(\n private annaFilterService: AnnaFilterService,\n private annaGlobalConfig: AnnaGlobalConfigService,\n private businessRuleService: GenericBusinessRuleCommonSIBILogicService,\n ) {\n this.setTableConfig();\n this.setMessageBoxData();\n }\n\n ngOnInit(): void {\n this.intialFilters();\n this.dayPartRestrictionsClonnedData = cloneDeep(this.data);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.isDisabled) {\n if (this.isDisabled) {\n this.closeTooltip();\n }\n }\n\n // if (changes['data']?.currentValue) {\n // this.dayPartRestrictionsClonnedData = cloneDeep(this.data);\n // }\n }\n\n setTableConfig() {\n this.gtGeneralConfig = { ...this.annaGlobalConfig.defaultGtGeneralConfig };\n this.gtGeneralConfig.component = \"DP_RESTRICTIONS\";\n this.gtGeneralConfig.tableContainerName = \"dp-restrictions\";\n this.gtGeneralConfig.tableOuterContainerName = \"dp-restrictions-outer-container\";\n }\n\n onContainerScroll() {\n this.closeTooltip();\n const elements = document.getElementsByClassName(\"tooltip\");\n while (elements.length > 0) {\n elements[0].remove();\n }\n }\n\n intialFilters() {\n this.annaFilterService.initialValueMap = new Map();\n }\n\n trackByFn(index: any, item: any) {\n return index;\n }\n\n bindTheValueToToolTip(tooltip: any) {\n if (tooltip === this.tooltip) {\n this.closeTooltip();\n } else {\n this.openTooltip(tooltip);\n }\n }\n\n openTooltip(tooltip: any) {\n this.closeTooltip();\n this.tooltip = tooltip;\n this.tooltip.open();\n this.filterTabObjects = [new RadioButtonModel(\"time\", \"time\", false, true)];\n }\n\n closeTooltip() {\n if (this.tooltip && this.tooltip.isOpen()) {\n this.tooltip.close();\n }\n this.tooltip = null;\n }\n\n setMessageBoxData() {\n this.messageForDp = new MessageBoxData(\n null,\n // eslint-disable-next-line max-len\n \"Programs airing in Dayparts that have been unselected in 'DP Restrictions' will automatically be excluded from consideration for providing MGs and ADUs.\",\n \"mdi mdi-information\",\n `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm dp-table`,\n );\n }\n checkIfTimeChanged(\n currentDay: DaypartRestrictionDetails,\n initialDay: DaypartRestrictionDetails,\n startTime: any,\n endTime: any,\n ) {\n currentDay.restrictedStartTime.Current = startTime;\n currentDay.restrictedEndTime.Current = endTime;\n\n currentDay.isTimeEdited =\n !isEqual(initialDay.restrictedStartTime, currentDay.restrictedStartTime) ||\n !isEqual(initialDay.restrictedEndTime, currentDay.restrictedEndTime);\n }\n\n onSavingTime(event: any, id: number, column: MGADUTYPE, dayType: DAYTYPE) {\n const [startTime, endTime] = this.convertTo24HourFormat(event);\n const index = this.data.findIndex((obj: DayAndDaypartRestrictionForMgAndAdu) => obj.id === id);\n if (column === this.MG) {\n if (dayType === this.WEEKDAYS) {\n this.checkIfTimeChanged(\n this.data[index].daysSelectedForMg.weekdays,\n this.dayPartRestrictionsClonnedData[index].daysSelectedForMg.weekdays,\n startTime,\n endTime,\n );\n this.data[index].daysSelectedForMg.weekdays.time = [{ time: startTime }, { time: endTime }];\n } else if (dayType === this.SATURDAY) {\n this.checkIfTimeChanged(\n this.data[index].daysSelectedForMg.saturday,\n this.dayPartRestrictionsClonnedData[index].daysSelectedForMg.saturday,\n startTime,\n endTime,\n );\n this.data[index].daysSelectedForMg.saturday.time = [{ time: startTime }, { time: endTime }];\n } else if (dayType === this.SUNDAY) {\n this.checkIfTimeChanged(\n this.data[index].daysSelectedForMg.sunday,\n this.dayPartRestrictionsClonnedData[index].daysSelectedForMg.sunday,\n startTime,\n endTime,\n );\n this.data[index].daysSelectedForMg.sunday.time = [{ time: startTime }, { time: endTime }];\n }\n } else if (dayType === this.WEEKDAYS) {\n this.checkIfTimeChanged(\n this.data[index].daysSelectedForAdu.weekdays,\n this.dayPartRestrictionsClonnedData[index].daysSelectedForAdu.weekdays,\n startTime,\n endTime,\n );\n this.data[index].daysSelectedForAdu.weekdays.time = [{ time: startTime }, { time: endTime }];\n } else if (dayType === this.SATURDAY) {\n this.checkIfTimeChanged(\n this.data[index].daysSelectedForAdu.saturday,\n this.dayPartRestrictionsClonnedData[index].daysSelectedForAdu.saturday,\n startTime,\n endTime,\n );\n this.data[index].daysSelectedForAdu.saturday.time = [{ time: startTime }, { time: endTime }];\n } else if (dayType === this.SUNDAY) {\n this.checkIfTimeChanged(\n this.data[index].daysSelectedForAdu.sunday,\n this.dayPartRestrictionsClonnedData[index].daysSelectedForAdu.sunday,\n startTime,\n endTime,\n );\n this.data[index].daysSelectedForAdu.sunday.time = [{ time: startTime }, { time: endTime }];\n }\n\n this.dayPartValuesChanged();\n }\n\n ifCheckboxesAreUnselected(days: any) {\n return days.every((day: any) => !day.isSelected) || false;\n }\n\n dayCheckboxClicked(data: DaypartRestrictionDetails, rowNum: number, column: MGADUTYPE, dayType: DAYTYPE) {\n this.closeTooltip();\n data.isDisabled = data.days.every((day: any) => !day.isSelected);\n data.daySelectedString = \"\";\n data.days.forEach((day: DaySelected) => {\n if (day.isSelected) {\n data.daySelectedString = `${data.daySelectedString}${day.name} `;\n } else if (!day.isSelected && !this.isDisabled && day.name !== \"Saturday\" && day.name !== \"Sunday\") {\n data.daySelectedString += \"- \";\n } else {\n data.daySelectedString = `${data.daySelectedString}${day.name} `;\n }\n });\n if (column === this.MG) {\n if (dayType === this.WEEKDAYS) {\n data.isDaysEdited = !isEqual(\n this.data[rowNum].daysSelectedForMg.weekdays.days,\n this.dayPartRestrictionsClonnedData[rowNum].daysSelectedForMg.weekdays.days,\n );\n }\n if (dayType === this.SATURDAY) {\n data.isDaysEdited = !isEqual(\n this.data[rowNum].daysSelectedForMg.saturday.days,\n this.dayPartRestrictionsClonnedData[rowNum].daysSelectedForMg.saturday.days,\n );\n }\n if (dayType === this.SUNDAY) {\n data.isDaysEdited = !isEqual(\n this.data[rowNum].daysSelectedForMg.sunday.days,\n this.dayPartRestrictionsClonnedData[rowNum].daysSelectedForMg.sunday.days,\n );\n }\n } else {\n if (dayType === this.WEEKDAYS) {\n data.isDaysEdited = !isEqual(\n this.data[rowNum].daysSelectedForAdu.weekdays.days,\n this.dayPartRestrictionsClonnedData[rowNum].daysSelectedForAdu.weekdays.days,\n );\n }\n if (dayType === this.SATURDAY) {\n data.isDaysEdited = !isEqual(\n this.data[rowNum].daysSelectedForAdu.saturday.days,\n this.dayPartRestrictionsClonnedData[rowNum].daysSelectedForAdu.saturday.days,\n );\n }\n if (dayType === this.SUNDAY) {\n data.isDaysEdited = !isEqual(\n this.data[rowNum].daysSelectedForAdu.sunday.days,\n this.dayPartRestrictionsClonnedData[rowNum].daysSelectedForAdu.sunday.days,\n );\n }\n }\n\n // let startTime = dayjs('1/1/1 ' + data.restrictedStartTime?.Current).format(\"hmm A\");\n // let endTime = dayjs('1/1/1 ' + data.restrictedEndTime?.Current).format(\"hmm A\");\n // data.displayTime = data.isDisabled ? '-' : startTime + \" - \" + endTime;\n\n const isAnyDaySelect = data.days.find((x: DaySelected) => x.isSelected);\n if (isAnyDaySelect) {\n data.time[0].time = data.restrictedStartTime?.Current;\n data.time[1].time = data.restrictedEndTime?.Current;\n }\n this.dayPartValuesChanged();\n }\n\n onTimeTooltipClicked(rowNum: number, column: MGADUTYPE, dayType: DAYTYPE) {\n this.detectChanges.rowNumber = rowNum;\n this.detectChanges.isMGSelected = column === this.MG;\n this.detectChanges.isADUSelected = column === this.ADU;\n\n switch (dayType) {\n case this.WEEKDAYS:\n this.resetDayTypeProperties();\n this.detectChanges.weekdays = true;\n break;\n case this.SATURDAY:\n this.resetDayTypeProperties();\n this.detectChanges.saturday = true;\n break;\n case this.SUNDAY:\n this.resetDayTypeProperties();\n this.detectChanges.sunday = true;\n break;\n default:\n this.resetDayTypeProperties();\n break;\n }\n }\n\n resetDayTypeProperties() {\n this.detectChanges.weekdays = false;\n this.detectChanges.saturday = false;\n this.detectChanges.sunday = false;\n }\n\n copyAllMgOrAdu(copyFrom: MGADUTYPE) {\n this.closeTooltip();\n if (copyFrom === this.ADU) {\n this.data.forEach((daypart: DayAndDaypartRestrictionForMgAndAdu, index) => {\n const previousMGvalue = cloneDeep(daypart.daysSelectedForMg);\n daypart.daysSelectedForMg = cloneDeep(daypart.daysSelectedForAdu);\n\n if (!isEqual(previousMGvalue.saturday.days, daypart.daysSelectedForMg.saturday.days)) {\n daypart.daysSelectedForMg.saturday.isDaysEdited = true;\n daypart.daysSelectedForMg.saturday.isDaysChanged = false;\n daypart.daysSelectedForMg.saturday.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n }\n\n if (\n !isEqual(\n previousMGvalue.saturday.restrictedEndTime.Current,\n daypart.daysSelectedForMg.saturday.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousMGvalue.saturday.restrictedStartTime.Current,\n daypart.daysSelectedForMg.saturday.restrictedStartTime.Current,\n )\n ) {\n daypart.daysSelectedForMg.saturday.isTimeEdited = true;\n daypart.daysSelectedForMg.saturday.restrictedEndTime.IsChanged = false;\n daypart.daysSelectedForMg.saturday.restrictedStartTime.IsChanged = false;\n }\n\n if (!isEqual(previousMGvalue.sunday.days, daypart.daysSelectedForMg.sunday.days)) {\n daypart.daysSelectedForMg.sunday.isDaysEdited = true;\n daypart.daysSelectedForMg.sunday.isDaysChanged = false;\n daypart.daysSelectedForMg.sunday.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n }\n if (\n !isEqual(\n previousMGvalue.sunday.restrictedEndTime.Current,\n daypart.daysSelectedForMg.sunday.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousMGvalue.sunday.restrictedStartTime.Current,\n daypart.daysSelectedForMg.sunday.restrictedStartTime.Current,\n )\n ) {\n daypart.daysSelectedForMg.sunday.isTimeEdited = true;\n daypart.daysSelectedForMg.sunday.restrictedEndTime.IsChanged = false;\n daypart.daysSelectedForMg.sunday.restrictedStartTime.IsChanged = false;\n }\n\n if (\n !isEqual(previousMGvalue.weekdays.days, daypart.daysSelectedForMg.weekdays.days) ||\n (!isEqual(\n previousMGvalue.weekdays.restrictedEndTime.Current,\n daypart.daysSelectedForMg.weekdays.restrictedEndTime.Current,\n ) &&\n !isEqual(\n previousMGvalue.weekdays.restrictedStartTime.Current,\n daypart.daysSelectedForMg.weekdays.restrictedStartTime.Current,\n ))\n ) {\n daypart.daysSelectedForMg.weekdays.isDaysEdited = true;\n daypart.daysSelectedForMg.weekdays.isDaysChanged = false;\n daypart.daysSelectedForMg.weekdays.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n }\n\n if (\n !isEqual(\n previousMGvalue.weekdays.restrictedEndTime.Current,\n daypart.daysSelectedForMg.weekdays.restrictedEndTime.Current,\n ) &&\n !isEqual(\n previousMGvalue.weekdays.restrictedStartTime.Current,\n daypart.daysSelectedForMg.weekdays.restrictedStartTime.Current,\n )\n ) {\n daypart.daysSelectedForMg.weekdays.isTimeEdited = true;\n daypart.daysSelectedForMg.weekdays.restrictedEndTime.IsChanged = false;\n daypart.daysSelectedForMg.weekdays.restrictedStartTime.IsChanged = false;\n }\n });\n } else {\n this.data.forEach((daypart: DayAndDaypartRestrictionForMgAndAdu, index) => {\n const previousADUvalue = cloneDeep(daypart.daysSelectedForAdu);\n daypart.daysSelectedForAdu = cloneDeep(daypart.daysSelectedForMg);\n if (!isEqual(previousADUvalue.saturday.days, daypart.daysSelectedForAdu.saturday.days)) {\n daypart.daysSelectedForAdu.saturday.isDaysEdited = true;\n daypart.daysSelectedForAdu.saturday.isDaysChanged = false;\n daypart.daysSelectedForAdu.saturday.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n }\n\n if (\n !isEqual(\n previousADUvalue.saturday.restrictedEndTime.Current,\n daypart.daysSelectedForAdu.saturday.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousADUvalue.saturday.restrictedStartTime.Current,\n daypart.daysSelectedForAdu.saturday.restrictedStartTime.Current,\n )\n ) {\n daypart.daysSelectedForAdu.saturday.isTimeEdited = true;\n daypart.daysSelectedForAdu.saturday.restrictedEndTime.IsChanged = false;\n daypart.daysSelectedForAdu.saturday.restrictedStartTime.IsChanged = false;\n }\n if (!isEqual(previousADUvalue.sunday.days, daypart.daysSelectedForAdu.sunday.days)) {\n daypart.daysSelectedForAdu.sunday.isDaysEdited = true;\n daypart.daysSelectedForAdu.sunday.isDaysChanged = false;\n daypart.daysSelectedForAdu.sunday.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n }\n\n if (\n !isEqual(\n previousADUvalue.sunday.restrictedEndTime.Current,\n daypart.daysSelectedForAdu.sunday.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousADUvalue.sunday.restrictedStartTime.Current,\n daypart.daysSelectedForAdu.sunday.restrictedStartTime.Current,\n )\n ) {\n daypart.daysSelectedForAdu.sunday.isTimeEdited = true;\n daypart.daysSelectedForAdu.sunday.restrictedEndTime.IsChanged = false;\n daypart.daysSelectedForAdu.sunday.restrictedStartTime.IsChanged = false;\n }\n if (!isEqual(previousADUvalue.weekdays.days, daypart.daysSelectedForAdu.weekdays.days)) {\n daypart.daysSelectedForAdu.weekdays.isDaysEdited = true;\n daypart.daysSelectedForAdu.weekdays.isDaysChanged = false;\n daypart.daysSelectedForAdu.weekdays.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n }\n\n if (\n !isEqual(\n previousADUvalue.weekdays.restrictedEndTime.Current,\n daypart.daysSelectedForAdu.weekdays.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousADUvalue.weekdays.restrictedStartTime.Current,\n daypart.daysSelectedForAdu.weekdays.restrictedStartTime.Current,\n )\n ) {\n daypart.daysSelectedForAdu.weekdays.isTimeEdited = true;\n daypart.daysSelectedForAdu.weekdays.restrictedEndTime.IsChanged = false;\n daypart.daysSelectedForAdu.weekdays.restrictedStartTime.IsChanged = false;\n }\n });\n }\n this.dayPartValuesChanged();\n }\n\n copyDataCell(copyFrom: MGADUTYPE, row: DAYTYPE, id: number) {\n this.closeTooltip();\n const index = this.data.findIndex((obj: DayAndDaypartRestrictionForMgAndAdu) => obj.id === id);\n\n if (copyFrom === this.ADU) {\n const previousMGvalue = cloneDeep(this.dayPartRestrictionsClonnedData[index].daysSelectedForMg);\n\n if (row === this.WEEKDAYS) {\n this.data[index].daysSelectedForMg.weekdays = cloneDeep(this.data[index].daysSelectedForAdu.weekdays);\n if (!isEqual(previousMGvalue.weekdays.days, this.data[index].daysSelectedForMg.weekdays.days)) {\n this.data[index].daysSelectedForMg.weekdays.isDaysEdited = true;\n }\n\n if (\n !isEqual(\n previousMGvalue.weekdays.restrictedEndTime.Current,\n this.data[index].daysSelectedForMg.weekdays.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousMGvalue.weekdays.restrictedStartTime.Current,\n this.data[index].daysSelectedForMg.weekdays.restrictedStartTime.Current,\n )\n ) {\n this.data[index].daysSelectedForMg.weekdays.isTimeEdited = true;\n }\n this.data[index].daysSelectedForMg.weekdays.isDaysChanged = false;\n this.data[index].daysSelectedForMg.weekdays.restrictedEndTime.IsChanged = false;\n this.data[index].daysSelectedForMg.weekdays.restrictedStartTime.IsChanged = false;\n this.data[index].daysSelectedForMg.weekdays.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n } else if (row === this.SATURDAY) {\n this.data[index].daysSelectedForMg.saturday = cloneDeep(this.data[index].daysSelectedForAdu.saturday);\n\n if (!isEqual(previousMGvalue.saturday.days, this.data[index].daysSelectedForMg.saturday.days)) {\n this.data[index].daysSelectedForMg.saturday.isDaysEdited = true;\n }\n\n if (\n !isEqual(\n previousMGvalue.saturday.restrictedEndTime.Current,\n this.data[index].daysSelectedForMg.saturday.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousMGvalue.saturday.restrictedStartTime.Current,\n this.data[index].daysSelectedForMg.saturday.restrictedStartTime.Current,\n )\n ) {\n this.data[index].daysSelectedForMg.saturday.isTimeEdited = true;\n }\n this.data[index].daysSelectedForMg.saturday.isDaysChanged = false;\n this.data[index].daysSelectedForMg.saturday.restrictedStartTime.IsChanged = false;\n this.data[index].daysSelectedForMg.saturday.restrictedEndTime.IsChanged = false;\n this.data[index].daysSelectedForMg.saturday.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n } else if (row === this.SUNDAY) {\n this.data[index].daysSelectedForMg.sunday = cloneDeep(this.data[index].daysSelectedForAdu.sunday);\n if (!isEqual(previousMGvalue.sunday.days, this.data[index].daysSelectedForMg.sunday.days)) {\n this.data[index].daysSelectedForMg.sunday.isDaysEdited = true;\n }\n\n if (\n !isEqual(\n previousMGvalue.sunday.restrictedEndTime.Current,\n this.data[index].daysSelectedForMg.sunday.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousMGvalue.sunday.restrictedStartTime.Current,\n this.data[index].daysSelectedForMg.sunday.restrictedStartTime.Current,\n )\n ) {\n this.data[index].daysSelectedForMg.sunday.isTimeEdited = true;\n }\n this.data[index].daysSelectedForMg.sunday.isDaysChanged = false;\n this.data[index].daysSelectedForMg.sunday.restrictedEndTime.IsChanged = false;\n this.data[index].daysSelectedForMg.sunday.restrictedStartTime.IsChanged = false;\n this.data[index].daysSelectedForMg.sunday.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n }\n } else {\n const previousADUvalue = cloneDeep(this.dayPartRestrictionsClonnedData[index].daysSelectedForAdu);\n if (row === this.WEEKDAYS) {\n this.data[index].daysSelectedForAdu.weekdays = cloneDeep(this.data[index].daysSelectedForMg.weekdays);\n if (!isEqual(previousADUvalue.weekdays.days, this.data[index].daysSelectedForAdu.weekdays.days)) {\n this.data[index].daysSelectedForAdu.weekdays.isDaysEdited = true;\n }\n\n if (\n !isEqual(\n previousADUvalue.weekdays.restrictedEndTime.Current,\n this.data[index].daysSelectedForAdu.weekdays.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousADUvalue.weekdays.restrictedStartTime.Current,\n this.data[index].daysSelectedForAdu.weekdays.restrictedStartTime.Current,\n )\n ) {\n this.data[index].daysSelectedForAdu.weekdays.isTimeEdited = true;\n }\n this.data[index].daysSelectedForAdu.weekdays.isDaysChanged = false;\n this.data[index].daysSelectedForAdu.weekdays.restrictedEndTime.IsChanged = false;\n this.data[index].daysSelectedForAdu.weekdays.restrictedStartTime.IsChanged = false;\n this.data[index].daysSelectedForAdu.weekdays.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n } else if (row === this.SATURDAY) {\n this.data[index].daysSelectedForAdu.saturday = cloneDeep(this.data[index].daysSelectedForMg.saturday);\n if (!isEqual(previousADUvalue.saturday.days, this.data[index].daysSelectedForAdu.saturday.days)) {\n this.data[index].daysSelectedForAdu.saturday.isDaysEdited = true;\n }\n\n if (\n !isEqual(\n previousADUvalue.saturday.restrictedEndTime.Current,\n this.data[index].daysSelectedForAdu.saturday.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousADUvalue.saturday.restrictedStartTime.Current,\n this.data[index].daysSelectedForAdu.saturday.restrictedStartTime.Current,\n )\n ) {\n this.data[index].daysSelectedForAdu.saturday.isTimeEdited = true;\n }\n this.data[index].daysSelectedForAdu.saturday.isDaysChanged = false;\n this.data[index].daysSelectedForAdu.saturday.restrictedEndTime.IsChanged = false;\n this.data[index].daysSelectedForAdu.saturday.restrictedStartTime.IsChanged = false;\n this.data[index].daysSelectedForAdu.saturday.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n } else if (row === this.SUNDAY) {\n this.data[index].daysSelectedForAdu.sunday = cloneDeep(this.data[index].daysSelectedForMg.sunday);\n if (!isEqual(previousADUvalue.sunday.days, this.data[index].daysSelectedForAdu.sunday.days)) {\n this.data[index].daysSelectedForAdu.sunday.isDaysEdited = true;\n }\n\n if (\n !isEqual(\n previousADUvalue.sunday.restrictedEndTime.Current,\n this.data[index].daysSelectedForAdu.sunday.restrictedEndTime.Current,\n ) ||\n !isEqual(\n previousADUvalue.sunday.restrictedStartTime.Current,\n this.data[index].daysSelectedForAdu.sunday.restrictedStartTime.Current,\n )\n ) {\n this.data[index].daysSelectedForAdu.sunday.isTimeEdited = true;\n }\n this.data[index].daysSelectedForAdu.sunday.isDaysChanged = false;\n this.data[index].daysSelectedForAdu.sunday.restrictedEndTime.IsChanged = false;\n this.data[index].daysSelectedForAdu.sunday.restrictedStartTime.IsChanged = false;\n this.data[index].daysSelectedForAdu.sunday.days.forEach((day: DaySelected) => {\n day.isChanged = false;\n });\n }\n }\n this.dayPartValuesChanged();\n }\n\n dayPartValuesChanged() {\n this.dpChanges.emit(this.data);\n }\n dpTimerChanged() {\n this.businessRuleService.notifyBusinessRulesChanged();\n }\n\n convertTo24HourFormat(timeArray: string[][]): string[] {\n const result: string[] = [];\n timeArray.forEach((time) => {\n if (time.length === 3) {\n let hour = parseInt(time[0], 10);\n const minute = parseInt(time[1], 10);\n const period = time[2].toUpperCase();\n\n if (period === \"AM\" || period === \"PM\") {\n if (period === \"PM\" && hour < 12) {\n hour += 12;\n } else if (period === \"AM\" && hour === 12) {\n hour = 0;\n }\n\n const hourStr = hour.toString().padStart(2, \"0\");\n const minuteStr = minute.toString().padStart(2, \"0\");\n const timeStr = `${hourStr}:${minuteStr}:00`;\n result.push(timeStr);\n }\n }\n });\n return result;\n }\n}\n","<anna-design-message-box\n [messageBoxData]=\"messageForDp\"\n [headerAsBlockElement]=\"false\"\n [showHyphen]=\"false\"\n></anna-design-message-box>\n<div\n *ngIf=\"!isDisabled && data && data.length\"\n class=\"message\"\n>\n Enter restricted timing for the dayparts\n</div>\n\n<div\n class=\"table-container\"\n id=\"scroll-container-dp\"\n [ngClass]=\"{ 'read-mode': isDisabled, 'write-mode': !isDisabled }\"\n (scroll)=\"onContainerScroll()\"\n>\n <table [ngClass]=\"{ 'read-mode-inputs': isDisabled, 'table-with-change-icon': noOfHighlightChanges }\">\n <thead>\n <tr class=\"header-row\">\n <th class=\"daypart\">DAYPART</th>\n <th class=\"makegood\">\n PLACE MG WITHIN\n <span\n class=\"mdi mdi-content-copy\"\n *ngIf=\"!isDisabled && data?.length\"\n (click)=\"isDisabled ? null : copyAllMgOrAdu('MG')\"\n ngbTooltip=\"Copy to ADU\"\n placement=\"auto\"\n triggers=\"hover\"\n ></span>\n </th>\n <th class=\"adu\">\n PLACE ADU WITHIN\n <span\n class=\"mdi mdi-content-copy\"\n *ngIf=\"!isDisabled && data?.length\"\n (click)=\"isDisabled ? null : copyAllMgOrAdu('ADU')\"\n ngbTooltip=\"Copy to MG\"\n placement=\"auto\"\n triggers=\"hover\"\n ></span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let daypart of data; index as i; trackBy: trackByFn\">\n <!-- <td>\n <div class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && (daypart?.daysSelectedForMg?.daypartChanged || daypart?.daysSelectedForAdu?.daypartChanged)\">\n </div>\n </td> -->\n <td\n annaCoreShowEllipsisTextOnHover\n class=\"daypart\"\n [ngClass]=\"detectChanges.rowNumber === i && tooltip ? 'blue-background' : 'white-background'\"\n >\n {{ daypart.name }}\n </td>\n\n <td>\n <ng-container\n [ngTemplateOutlet]=\"daypartCell\"\n [ngTemplateOutletContext]=\"{\n data: daypart.daysSelectedForMg.weekdays,\n id: daypart.id,\n column: 'MG',\n dayType: 'weekdays',\n rowNum: i\n }\"\n >\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"daypartCell\"\n [ngTemplateOutletContext]=\"{\n data: daypart.daysSelectedForMg.saturday,\n id: daypart.id,\n column: 'MG',\n dayType: 'saturday',\n rowNum: i\n }\"\n >\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"daypartCell\"\n [ngTemplateOutletContext]=\"{\n data: daypart.daysSelectedForMg.sunday,\n id: daypart.id,\n column: 'MG',\n dayType: 'sunday',\n rowNum: i\n }\"\n >\n </ng-container>\n </td>\n\n <td>\n <ng-container\n [ngTemplateOutlet]=\"daypartCell\"\n [ngTemplateOutletContext]=\"{\n data: daypart.daysSelectedForAdu.weekdays,\n id: daypart.id,\n column: 'ADU',\n dayType: 'weekdays',\n rowNum: i\n }\"\n >\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"daypartCell\"\n [ngTemplateOutletContext]=\"{\n data: daypart.daysSelectedForAdu.saturday,\n id: daypart.id,\n column: 'ADU',\n dayType: 'saturday',\n rowNum: i\n }\"\n >\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"daypartCell\"\n [ngTemplateOutletContext]=\"{\n data: daypart.daysSelectedForAdu.sunday,\n id: daypart.id,\n column: 'ADU',\n dayType: 'sunday',\n rowNum: i\n }\"\n >\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n <div\n *ngIf=\"!data || !data.length\"\n class=\"no-data-container\"\n >\n <anna-core-no-data-lib\n [width]=\"'50%'\"\n [marginTop]=\"'3.25rem'\"\n ></anna-core-no-data-lib>\n </div>\n</div>\n\n<ng-template\n #daypartCell\n let-data=\"data\"\n let-id=\"id\"\n let-column=\"column\"\n let-dayType=\"dayType\"\n let-rowNum=\"rowNum\"\n>\n <div\n class=\"data-cell\"\n [ngClass]=\"{\n 'blue-background':\n detectChanges.rowNumber === rowNum &&\n tooltip &&\n ((dayType === 'weekdays' && detectChanges.weekdays) ||\n (dayType === 'saturday' && detectChanges.saturday) ||\n (dayType === 'sunday' && detectChanges.sunday)),\n 'hover-cell':\n !isDisabled &&\n !(\n detectChanges.rowNumber === rowNum &&\n tooltip &&\n ((dayType === 'weekdays' && detectChanges.weekdays) ||\n (dayType === 'saturday' && detectChanges.saturday) ||\n (dayType === 'sunday' && detectChanges.sunday))\n )\n }\"\n >\n <div\n class=\"day-checkboxes\"\n [ngClass]=\"{\n 'blue-border': !isDisabled && data.isDaysEdited\n }\"\n >\n <ng-container *ngIf=\"!isDisabled\">\n <div *ngFor=\"let day of data.days; let i = index\">\n <span class=\"day-checkbox-container\">\n <input\n id=\"{{ day.name + rowNum + column }}\"\n type=\"checkbox\"\n [(ngModel)]=\"day.isSelected\"\n (change)=\"dayCheckboxClicked(data, rowNum, column, dayType)\"\n [disabled]=\"isDisabled\"\n />\n <label for=\"{{ day.name + rowNum + column }}\">{{ day.name }}</label>\n <br *ngIf=\"i === 2\" />\n </span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"isDisabled\">\n <span class=\"day-checkbox-container\">\n <label for=\"{{ data?.daySelectedString }}\">{{ data?.daySelectedString }}</label>\n </span>\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && data?.isDaysChanged\"\n ></div>\n </div>\n <div\n class=\"time-copy-div\"\n [ngClass]=\"{ 'read-mode': isDisabled }\"\n >\n <div\n class=\"time-container\"\n *ngIf=\"!isDisabled\"\n >\n <div\n [ngClass]=\"{\n 'blue-border':\n !isDisabled &&\n (data.isTimeEdited ||\n (detectChanges.rowNumber === rowNum &&\n tooltip &&\n ((column === 'ADU' && detectChanges.isADUSelected) ||\n (column === 'MG' && this.detectChanges.isMGSelected)) &&\n ((dayType === 'weekdays' && detectChanges.weekdays) ||\n (dayType === 'saturday' && detectChanges.saturday) ||\n (dayType === 'sunday' && detectChanges.sunday)))),\n 'disabled-div': isDisabled || data.isDisabled\n }\"\n class=\"time-selected-div\"\n [ngbTooltip]=\"dateFilterTooltip\"\n placement=\"bottom auto\"\n container=\"body\"\n [autoClose]=\"false\"\n triggers=\"manual\"\n #t2=\"ngbTooltip\"\n (click)=\"bindTheValueToToolTip(t2); onTimeTooltipClicked(rowNum, column, dayType)\"\n >\n <ng-container *ngIf=\"!data.isDisabled\">\n {{ \"1/1/1 \" + data.time[0].time | AnnaDateFormatter: TIME_FORMAT_HTML | removeEndZero }}\n -\n <ng-container></ng-container>\n {{ \"1/1/1 \" + data.time[1].time | AnnaDateFormatter: TIME_FORMAT_HTML | removeEndZero }}\n </ng-container>\n <ng-container *ngIf=\"data.isDisabled\">\n <span class=\"select-time-placeholder\">-</span>\n </ng-container>\n\n <ng-container>\n <i\n *ngIf=\"\n !(\n detectChanges.rowNumber === rowNum &&\n tooltip &&\n ((column === 'ADU' && detectChanges.isADUSelected) ||\n (column === 'MG' && this.detectChanges.isMGSelected)) &&\n ((dayType === 'weekdays' && detectChanges.weekdays) ||\n (dayType === 'saturday' && detectChanges.saturday) ||\n (dayType === 'sunday' && detectChanges.sunday))\n )\n \"\n class=\"mdi mdi-menu-down icon\"\n ></i>\n <i\n *ngIf=\"\n detectChanges.rowNumber === rowNum &&\n tooltip &&\n ((column === 'ADU' && detectChanges.isADUSelected) ||\n (column === 'MG' && this.detectChanges.isMGSelected)) &&\n ((dayType === 'weekdays' && detectChanges.weekdays) ||\n (dayType === 'saturday' && detectChanges.saturday) ||\n (dayType === 'sunday' && detectChanges.sunday))\n \"\n class=\"mdi mdi-menu-up icon\"\n ></i>\n </ng-container>\n </div>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges && (data?.restrictedStartTime.IsChanged || data?.restrictedEndTime.IsChanged)\n \"\n ></div>\n </div>\n\n <div\n class=\"read-mode time-container\"\n *ngIf=\"isDisabled\"\n >\n <ng-container *ngIf=\"!data.isDisabled\">\n {{ \"1/1/1 \" + data.time[0].time | AnnaDateFormatter: TIME_FORMAT_HTML | removeEndZero }}\n -\n {{ \"1/1/1 \" + data.time[1].time | AnnaDateFormatter: TIME_FORMAT_HTML | removeEndZero }}\n </ng-container>\n\n <ng-container *ngIf=\"data.isDisabled\"> - </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges && (data?.restrictedStartTime.IsChanged || data?.restrictedEndTime.IsChanged)\n \"\n ></div>\n </div>\n\n <div\n *ngIf=\"column === 'MG'\"\n class=\"copy-icon\"\n >\n <span\n class=\"mdi mdi-content-copy hide\"\n *ngIf=\"!isDisabled\"\n (click)=\"copyDataCell('MG', dayType, id)\"\n ngbTooltip=\"Copy to ADU\"\n placement=\"auto\"\n triggers=\"hover\"\n ></span>\n </div>\n <div\n *ngIf=\"column === 'ADU'\"\n class=\"copy-icon\"\n >\n <span\n class=\"mdi mdi-content-copy hide\"\n *ngIf=\"!isDisabled\"\n (click)=\"copyDataCell('ADU', dayType, id)\"\n ngbTooltip=\"Copy to MG\"\n placement=\"auto\"\n triggers=\"hover\"\n ></span>\n </div>\n </div>\n\n <!-- <span class=\"mdi mdi-content-copy hide\"></span> -->\n <ng-template #dateFilterTooltip>\n <anna-core-anna-column-time-filter\n [tableData]=\"data.time\"\n [clonedTableData]=\"data.time\"\n [showClearAllFilter]=\"false\"\n [startFromText]=\"'Start time'\"\n [endToText]=\"'End time'\"\n [filterTabObjects]=\"filterTabObjects\"\n [showAllTimeRangeCheckboxes]=\"false\"\n [isSortAndFilterAbsent]=\"true\"\n (closeTooltip)=\"closeTooltip()\"\n (timeChangedEmitter)=\"dpTimerChanged()\"\n (timeChanges)=\"onSavingTime($event, id, column, dayType)\"\n >\n </anna-core-anna-column-time-filter>\n </ng-template>\n </div>\n</ng-template>\n","import { NgClass, NgFor, NgIf } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { AnnaCoreModule, AnnaGlobalConfigService, ICustomMultiSelect } from \"@annalib/anna-core\";\nimport {\n AnnaDesignComponentsLibModule,\n GenericMessageBoxTheme,\n MessageBoxData,\n} from \"@annalib/anna-design-components-lib\";\nimport { NgbTooltip } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep, isEqual } from \"lodash-es\";\n\nimport { DayPartList, EquivalentOrHigherDayparts } from \"../business-rule-page/models/business-rule.model\";\n\ntype EquivalentHigherType = \"EQUIVALENT\" | \"HIGHER\";\ntype MGADUTYPE = \"MG\" | \"ADU\";\n\n@Component({\n selector: \"anna-feature-equivalent-and-higher-daypart\",\n templateUrl: \"./equivalent-and-higher-daypart.component.html\",\n styleUrls: [\"./equivalent-and-higher-daypart.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgIf, AnnaDesignComponentsLibModule, NgClass, NgbTooltip, NgFor, AnnaCoreModule]\n})\nexport class EquivalentAndHigherDaypartComponent implements OnInit {\n @Input() daypartEquivalenceRules: EquivalentOrHigherDayparts[] = [];\n @Input() isDisabled: boolean;\n @Input() highlightChanges: boolean = false;\n @Input() noOfHighlightChanges: number = 0;\n @Input() hideInfoMessage: boolean = false;\n\n @Output() equivalencyRulesChanges = new EventEmitter();\n\n readonly EQUIVALENT = \"EQUIVALENT\";\n readonly HIGHER = \"HIGHER\";\n readonly MG = \"MG\";\n readonly ADU = \"ADU\";\n\n dropdownConfig: ICustomMultiSelect;\n dayPartInfoMessage: MessageBoxData;\n rowIndexUnderEdit: number;\n originalData: EquivalentOrHigherDayparts[];\n\n constructor(private annaGlobalConfig: AnnaGlobalConfigService) {}\n\n ngOnInit() {\n this.setDropdownConfig();\n this.initVariables();\n this.originalData = cloneDeep(this.daypartEquivalenceRules);\n }\n\n // ngOnChanges(changes: SimpleChanges) {\n // if (changes?.isDisabled.currentValue) {\n // this.cdr.detectChanges();\n // }\n // }\n\n initVariables() {\n this.dayPartInfoMessage = new MessageBoxData(\n null,\n \"<ul><li>Equivalent dayparts will always include the original daypart along with the other selections.</li><li>Equivalent & Higher Dayparts cannot be set for Prime (PR), Sports (SP), PAID (Paid Programming), MISC (Miscellaneous) and NON (Non Spot Revenue).</li></ul>\",\n \"mi mdi-info\",\n `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm mt-0 eq-higher-dp`,\n );\n }\n\n equivalentDaypartSelectionChangedForMg(\n dropdownDaypartDataClicked: DayPartList[],\n daypart: EquivalentOrHigherDayparts,\n ) {\n this.resetSelectedDaypart(daypart);\n const originalDaypart = this.originalData.filter(\n (dp: EquivalentOrHigherDayparts) => dp.originalDaypart.id === daypart.originalDaypart.id,\n )[0];\n\n const intialSelectedEquivalentDayparts = originalDaypart.equivalentDaypartsForMg\n .filter((x: DayPartList) => x.isSelected)\n .map((x: DayPartList) => x.id);\n const selectedEquivalentDayparts = dropdownDaypartDataClicked\n .filter((n: DayPartList) => n.isSelected)\n .map((x: DayPartList) => x.id);\n\n daypart.higherDaypartsForMg.forEach((item: any) => {\n item.isDisabled = selectedEquivalentDayparts.includes(item.id);\n });\n daypart.isEquivalentEditedForMg = !isEqual(intialSelectedEquivalentDayparts, selectedEquivalentDayparts);\n\n this.rowIndexUnderEdit = null;\n this.equivalencyValueChanged();\n }\n\n // equivalentDaypartSelectionChangedForAdu(event: DayPartList[], daypart: EquivalentOrHigherDayparts) {\n // this.resetSelectedDaypart(daypart);\n // const originalDaypart = this.originalData.filter(\n // (dp: EquivalentOrHigherDayparts) => dp.originalDaypart.id === daypart.originalDaypart.id,\n // )[0];\n\n // const intialSelectedEquivalentDayparts = originalDaypart.equivalentDaypartsForAdu\n // .filter((x: DayPartList) => x.isSelected)\n // .map((x: DayPartList) => x.id);\n // const selectedEquivalentDayparts = event.filter((n: DayPartList) => n.isSelected).map((x: DayPartList) => x.id);\n\n // daypart.higherDaypartsForAdu.forEach((item: any) => {\n // item.isDisabled = selectedEquivalentDayparts.includes(item.id);\n // });\n // daypart.isEquivalentEditedForAdu = !isEqual(intialSelectedEquivalentDayparts, selectedEquivalentDayparts);\n\n // this.rowIndexUnderEdit = null;\n // this.equivalencyValueChanged();\n // }\n\n changeBackground(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n const siblingHigherMg = target.previousElementSibling;\n const siblingEquivalentMg = target.previousElementSibling?.previousElementSibling;\n\n if (siblingHigherMg && siblingHigherMg.classList.contains(\"higher-mg\")) {\n (siblingHigherMg as HTMLElement).style.backgroundColor = \"#EBEBEB\";\n }\n\n if (siblingEquivalentMg && siblingEquivalentMg.classList.contains(\"equivalent-mg\")) {\n (siblingEquivalentMg as HTMLElement).style.backgroundColor = \"#EBEBEB\";\n }\n\n if (target.classList.contains(\"copy-mg\")) {\n target.style.backgroundColor = \"#EBEBEB\";\n }\n\n if (siblingHigherMg && siblingHigherMg.classList.contains(\"higher-adu\")) {\n (siblingHigherMg as HTMLElement).style.backgroundColor = \"#EBEBEB\";\n }\n\n if (siblingEquivalentMg && siblingEquivalentMg.classList.contains(\"equivalent-adu\")) {\n (siblingEquivalentMg as HTMLElement).style.backgroundColor = \"#EBEBEB\";\n }\n if (target.classList.contains(\"copy-adu\")) {\n target.style.backgroundColor = \"#EBEBEB\";\n }\n }\n\n resetBackground(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n const siblingHigherMg = target.previousElementSibling;\n const siblingEquivalentMg = target.previousElementSibling?.previousElementSibling;\n\n if (siblingHigherMg && siblingHigherMg.classList.contains(\"higher-mg\")) {\n (siblingHigherMg as HTMLElement).style.backgroundColor = \"\";\n }\n\n if (siblingEquivalentMg && siblingEquivalentMg.classList.contains(\"equivalent-mg\")) {\n (siblingEquivalentMg as HTMLElement).style.backgroundColor = \"\";\n }\n if (target.classList.contains(\"copy-mg\")) {\n target.style.backgroundColor = \"\";\n }\n\n if (siblingHigherMg && siblingHigherMg.classList.contains(\"higher-adu\")) {\n (siblingHigherMg as HTMLElement).style.backgroundColor = \"\";\n }\n\n if (siblingEquivalentMg && siblingEquivalentMg.classList.contains(\"equivalent-adu\")) {\n (siblingEquivalentMg as HTMLElement).style.backgroundColor = \"\";\n }\n if (target.classList.contains(\"copy-adu\")) {\n target.style.backgroundColor = \"\";\n }\n }\n\n higherDaypartSelectionChangedForMg(event: any, daypart: EquivalentOrHigherDayparts) {\n this.resetSelectedDaypart(daypart);\n const originalDaypart = this.originalData.filter(\n (dp: EquivalentOrHigherDayparts) => dp.originalDaypart.id === daypart.originalDaypart.id,\n )[0];\n\n const intialSelectedHigherDayparts = originalDaypart.higherDaypartsForMg\n .filter((x: DayPartList) => x.isSelected)\n .map((x: DayPartList) => x.id);\n const selectedEquivalentDayparts = event.filter((n: DayPartList) => n.isSelected).map((x: DayPartList) => x.id);\n\n daypart.equivalentDaypartsForMg.forEach((item: any) => {\n if (item.id !== daypart.originalDaypart.id) {\n item.isDisabled = selectedEquivalentDayparts.includes(item.id);\n }\n });\n daypart.isHigherEditedForMg = !isEqual(intialSelectedHigherDayparts, selectedEquivalentDayparts);\n\n this.rowIndexUnderEdit = null;\n this.equivalencyValueChanged();\n }\n\n // higherDaypartSelectionChangedForAdu(event: any, daypart: EquivalentOrHigherDayparts) {\n // this.resetSelectedDaypart(daypart);\n // const originalDaypart = this.originalData.filter(\n // (dp: EquivalentOrHigherDayparts) => dp.originalDaypart.id === daypart.originalDaypart.id,\n // )[0];\n\n // const intialSelectedHigherDayparts = originalDaypart.higherDaypartsForAdu\n // .filter((x: DayPartList) => x.isSelected)\n // .map((x: DayPartList) => x.id);\n // const selectedEquivalentDayparts = event.filter((n: DayPartList) => n.isSelected).map((x: DayPartList) => x.id);\n\n // daypart.equivalentDaypartsForAdu.forEach((item: any) => {\n // item.isDisabled = selectedEquivalentDayparts.includes(item.id);\n // });\n // daypart.isHigherEditedForAdu = !isEqual(intialSelectedHigherDayparts, selectedEquivalentDayparts);\n\n // this.rowIndexUnderEdit = null;\n // this.equivalencyValueChanged();\n // }\n\n setDropdownConfig() {\n this.dropdownConfig = { ...this.annaGlobalConfig.defaultMultiSelectConfig };\n this.dropdownConfig.showErrorWhenNoOptionSelected = false;\n this.dropdownConfig.classes = \"equivalent-higher-dp\";\n }\n\n dropdownOpened(daypart: EquivalentOrHigherDayparts, column: MGADUTYPE, subColumn: EquivalentHigherType) {\n this.rowIndexUnderEdit = this.daypartEquivalenceRules.findIndex(\n (n) => n.originalDaypart.id === daypart.originalDaypart.id,\n );\n this.resetSelectedDaypart(daypart);\n daypart.isEquivalentDpForMgSelected = column === this.MG && subColumn === this.EQUIVALENT;\n daypart.isHigherDpForMgSelected = column === this.MG && subColumn === this.HIGHER;\n // daypart.isEquivalentDpForAduSelected = column !== this.MG && subColumn === this.EQUIVALENT;\n // daypart.isHigherDpForAduSelected = column !== this.MG && subColumn === this.HIGHER;\n }\n\n resetSelectedDaypart(daypart: EquivalentOrHigherDayparts) {\n daypart.isEquivalentDpForMgSelected = false;\n daypart.isHigherDpForMgSelected = false;\n // daypart.isEquivalentDpForAduSelected = false;\n // daypart.isHigherDpForAduSelected = false;\n }\n\n // copyEntireMgOrAdu(copyFrom: MGADUTYPE) {\n // if (copyFrom === this.ADU) {\n // this.daypartEquivalenceRules.forEach((daypart: EquivalentOrHigherDayparts) => {\n // daypart.higherDaypartsForMg = cloneDeep(daypart.higherDaypartsForAdu);\n // daypart.equivalentDaypartsForMg = cloneDeep(daypart.equivalentDaypartsForAdu);\n\n // const givenDaypartInClonedData = this.originalData.filter(\n // (dp: EquivalentOrHigherDayparts) => dp.originalDaypart.id === daypart.originalDaypart.id,\n // )[0];\n // const selectedEquivalentDPForMg = daypart.equivalentDaypartsForMg.filter(\n // (x: DayPartList) => x.isSelected,\n // );\n // const previousSelectedEquivalentDPForMg = givenDaypartInClonedData.equivalentDaypartsForMg.filter(\n // (x: any) => x.isSelected,\n // );\n\n // const selectedHigherDPForMg = daypart.higherDaypartsForMg.filter((x: DayPartList) => x.isSelected);\n // const previousSelectedHigherForMg = givenDaypartInClonedData.higherDaypartsForMg.filter(\n // (x: any) => x.isSelected,\n // );\n\n // if (!isEqual(previousSelectedEquivalentDPForMg, selectedEquivalentDPForMg)) {\n // daypart.isEquivalentEditedForMg = true;\n // }\n\n // if (!isEqual(previousSelectedHigherForMg, selectedHigherDPForMg)) {\n // daypart.isHigherEditedForMg = true;\n // }\n // });\n // } else {\n // this.daypartEquivalenceRules.forEach((daypart: EquivalentOrHigherDayparts) => {\n // daypart.higherDaypartsForAdu = cloneDeep(daypart.higherDaypartsForMg);\n // daypart.equivalentDaypartsForAdu = cloneDeep(daypart.equivalentDaypartsForMg);\n\n // const givenDaypartInClonedData = this.originalData.filter(\n // (dp: EquivalentOrHigherDayparts) => dp.originalDaypart.id === daypart.originalDaypart.id,\n // )[0];\n // const selectedEquivalentDPForAdu = daypart.equivalentDaypartsForAdu.filter(\n // (x: DayPartList) => x.isSelected,\n // );\n // const previousSelectedEquivalentDPForAdu = givenDaypartInClonedData.equivalentDaypartsForAdu.filter(\n // (x: any) => x.isSelected,\n // );\n\n // const selectedHigherDPForAdu = daypart.higherDaypartsForAdu.filter((x: DayPartList) => x.isSelected);\n // const previousSelectedHigherForAdu = givenDaypartInClonedData.higherDaypartsForAdu.filter(\n // (x: any) => x.isSelected,\n // );\n\n // if (!isEqual(previousSelectedEquivalentDPForAdu, selectedEquivalentDPForAdu)) {\n // daypart.isEquivalentEditedForAdu = true;\n // }\n\n // if (!isEqual(previousSelectedHigherForAdu, selectedHigherDPForAdu)) {\n // daypart.isHigherEditedForAdu = true;\n // }\n // });\n // }\n // this.equivalencyValueChanged();\n // }\n\n // copyDataCell(copyFrom: MGADUTYPE, daypart: EquivalentOrHigherDayparts) {\n // const index = this.daypartEquivalenceRules.findIndex(\n // (n) => n.originalDaypart.id === daypart.originalDaypart.id,\n // );\n\n // if (copyFrom === this.ADU) {\n // this.daypartEquivalenceRules[index].higherDaypartsForMg = cloneDeep(\n // this.daypartEquivalenceRules[index].higherDaypartsForAdu,\n // );\n // this.daypartEquivalenceRules[index].equivalentDaypartsForMg = cloneDeep(\n // this.daypartEquivalenceRules[index].equivalentDaypartsForAdu,\n // );\n\n // const givenDaypartInClonedData = this.originalData.filter(\n // (dp: EquivalentOrHigherDayparts) => dp.originalDaypart.id === daypart.originalDaypart.id,\n // )[0];\n\n // const selectedEquivalentDPForMg = this.daypartEquivalenceRules[index].equivalentDaypartsForMg.filter(\n // (x: DayPartList) => x.isSelected,\n // );\n // const previousSelectedEquivalentDPForMg = givenDaypartInClonedData.equivalentDaypartsForMg.filter(\n // (x: any) => x.isSelected,\n // );\n\n // const selectedHigherDPForMg = daypart.higherDaypartsForMg.filter((x: DayPartList) => x.isSelected);\n // const previousSelectedHigherForMg = givenDaypartInClonedData.higherDaypartsForMg.filter(\n // (x: any) => x.isSelected,\n // );\n\n // if (!isEqual(previousSelectedEquivalentDPForMg, selectedEquivalentDPForMg)) {\n // daypart.isEquivalentEditedForMg = true;\n // }\n\n // if (!isEqual(previousSelectedHigherForMg, selectedHigherDPForMg)) {\n // daypart.isHigherEditedForMg = true;\n // }\n // } else {\n // this.daypartEquivalenceRules[index].higherDaypartsForAdu = cloneDeep(\n // this.daypartEquivalenceRules[index].higherDaypartsForMg,\n // );\n // this.daypartEquivalenceRules[index].equivalentDaypartsForAdu = cloneDeep(\n // this.daypartEquivalenceRules[index].equivalentDaypartsForMg,\n // );\n\n // const givenDaypartInClonedData = this.originalData.filter(\n // (dp: EquivalentOrHigherDayparts) => dp.originalDaypart.id === daypart.originalDaypart.id,\n // )[0];\n\n // const selectedEquivalentDPForAdu = this.daypartEquivalenceRules[index].equivalentDaypartsForAdu.filter(\n // (x: DayPartList) => x.isSelected,\n // );\n // const previousSelectedEquivalentDPForAdu = givenDaypartInClonedData.equivalentDaypartsForAdu.filter(\n // (x: any) => x.isSelected,\n // );\n\n // const selectedHigherDPForAdu = daypart.higherDaypartsForAdu.filter((x: DayPartList) => x.isSelected);\n // const previousSelectedHigherForAdu = givenDaypartInClonedData.higherDaypartsForAdu.filter(\n // (x: any) => x.isSelected,\n // );\n\n // if (!isEqual(previousSelectedEquivalentDPForAdu, selectedEquivalentDPForAdu)) {\n // daypart.isEquivalentEditedForAdu = true;\n // }\n\n // if (!isEqual(previousSelectedHigherForAdu, selectedHigherDPForAdu)) {\n // daypart.isHigherEditedForAdu = true;\n // }\n // }\n // this.equivalencyValueChanged();\n // }\n\n equivalencyValueChanged() {\n this.equivalencyRulesChanges.emit(this.daypartEquivalenceRules);\n }\n\n onContainerScroll() {\n const elements = document.getElementsByClassName(\"tooltip\");\n while (elements.length > 0) {\n elements[0].remove();\n }\n }\n}\n","<div>\n <anna-design-message-box\n class=\"equivalent-and-higher-daypart-message-box\"\n *ngIf=\"!hideInfoMessage\"\n [messageBoxData]=\"dayPartInfoMessage\"\n >\n </anna-design-message-box>\n\n <div\n class=\"dp-equivalence-table-container table-container\"\n (scroll)=\"onContainerScroll()\"\n >\n <table\n class=\"daypart-table equivalence-table\"\n [ngClass]=\"{ 'read-mode-inputs': isDisabled, 'table-with-change-icon': noOfHighlightChanges }\"\n >\n <thead>\n <tr>\n <th\n class=\"daypart\"\n rowspan=\"2\"\n >\n ORIGINAL DAYPART\n </th>\n <th\n class=\"makegood\"\n [attr.colspan]=\"2\"\n >\n MAKEGOOD\n <!-- <span\n class=\"mdi mdi-content-copy\"\n *ngIf=\"!isDisabled && daypartEquivalenceRules && daypartEquivalenceRules?.length\"\n (click)=\"copyEntireMgOrAdu('MG')\"\n ngbTooltip=\"Copy to ADU\"\n container=\"body\"\n placement=\"bottom\"\n triggers=\"hover\"\n ></span> -->\n </th>\n <!-- <th\n class=\"adu\"\n [attr.colspan]=\"isDisabled ? 2 : 3\"\n >\n ADU\n <span\n class=\"mdi mdi-content-copy\"\n *ngIf=\"!isDisabled && daypartEquivalenceRules && daypartEquivalenceRules?.length\"\n (click)=\"copyEntireMgOrAdu('ADU')\"\n ngbTooltip=\"Copy to MG\"\n container=\"body\"\n placement=\"bottom\"\n triggers=\"hover\"\n ></span>\n </th> -->\n </tr>\n <tr class=\"align-right-icon\">\n <th class=\"equivalent-mg\">EQUIVALENT</th>\n <th class=\"higher-mg\">HIGHER</th>\n <!-- <th\n class=\"copy-icon-header\"\n *ngIf=\"!isDisabled\"\n ></th>\n <th class=\"equivalent-adu\">EQUIVALENT</th>\n <th class=\"higher-adu\">HIGHER</th>\n <th\n class=\"copy-icon-header\"\n *ngIf=\"!isDisabled\"\n ></th> -->\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let daypart of daypartEquivalenceRules; let i = index\"\n [ngClass]=\"{\n rowUnderEdit: i === rowIndexUnderEdit,\n disableRow: daypart?.disableForEdit && !isDisabled\n }\"\n >\n <td\n annaCoreShowEllipsisTextOnHover\n class=\"daypart-text\"\n >\n {{ daypart.originalDaypart.text }}\n </td>\n <!-- MAKEGOOD -->\n\n <td\n class=\"equivalent-mg\"\n [ngClass]=\"{ hoverable: !isDisabled }\"\n >\n <div\n *ngIf=\"isDisabled\"\n class=\"disabled-text\"\n annaCoreShowEllipsisTextOnHover\n >\n {{ daypart?.equivalentDaypartsForMg | annaConvertArrayToCSV: \"text\" : \"isSelected\" }}\n <!-- <ng-container *ngFor=\"let name of daypart?.selectedEquivalentDaypartNamesForMg;let last=last\">\n {{name}}<ng-container *ngIf=\"!last\">, </ng-container>\n </ng-container>\n <ng-container *ngIf=\"daypart?.selectedEquivalentDaypartNamesForMg?.length ==0\">-</ng-container> -->\n </div>\n <ng-container *ngIf=\"!isDisabled\">\n <anna-design-multi-select\n class=\"daypart-dropdown\"\n [ngClass]=\"{\n 'blue-border-highlight':\n daypart?.isEquivalentDpForMgSelected || daypart?.isEquivalentEditedForMg\n }\"\n [loading]=\"false\"\n [items]=\"daypart?.equivalentDaypartsForMg\"\n [showAdditionalDataInSelectedText]=\"true\"\n [config]=\"dropdownConfig\"\n [disabled]=\"isDisabled || daypart?.disableForEdit\"\n [disableOptionsEnabled]=\"true\"\n [isEquivalentHigherDpComponent]=\"true\"\n [hideDropdownArrow]=\"daypart?.disableForEdit\"\n [hideOptionsEnabled]=\"false\"\n (dropdownOpenedEvent)=\"dropdownOpened(daypart, 'MG', 'EQUIVALENT')\"\n (dropdownClosedEvent)=\"equivalentDaypartSelectionChangedForMg($event, daypart)\"\n >\n </anna-design-multi-select>\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && daypart?.isEquivalentChangedForMg\"\n ></div>\n </td>\n <td\n class=\"higher-mg\"\n [ngClass]=\"{ hoverable: !isDisabled }\"\n >\n <div\n *ngIf=\"isDisabled\"\n class=\"disabled-text\"\n annaCoreShowEllipsisTextOnHover\n >\n {{ daypart?.higherDaypartsForMg | annaConvertArrayToCSV: \"text\" : \"isSelected\" }}\n <!-- <ng-container *ngFor=\"let name of daypart?.selectedHigherDaypartNamesForMg;let last=last\">\n {{name}}<ng-container *ngIf=\"!last\">, </ng-container>\n </ng-container>\n <ng-container *ngIf=\"daypart?.selectedHigherDaypartNamesForMg?.length ==0\">-</ng-container> -->\n </div>\n\n <ng-container *ngIf=\"!isDisabled\">\n <anna-design-multi-select\n class=\"daypart-dropdown\"\n [ngClass]=\"{\n 'blue-border-highlight':\n daypart?.isHigherDpForMgSelected || daypart.isHigherEditedForMg\n }\"\n [loading]=\"false\"\n [items]=\"daypart?.higherDaypartsForMg\"\n [showAdditionalDataInSelectedText]=\"false\"\n [config]=\"dropdownConfig\"\n [disabled]=\"isDisabled || daypart?.disableForEdit\"\n (dropdownOpenedEvent)=\"dropdownOpened(daypart, 'MG', 'HIGHER')\"\n [disableOptionsEnabled]=\"true\"\n [hideOptionsEnabled]=\"false\"\n [hideDropdownArrow]=\"daypart?.disableForEdit\"\n [isEquivalentHigherDpComponent]=\"true\"\n (dropdownClosedEvent)=\"higherDaypartSelectionChangedForMg($event, daypart)\"\n >\n </anna-design-multi-select>\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && daypart?.isHigherChangedForMg\"\n ></div>\n </td>\n <!-- <td\n class=\"copy-mg\"\n *ngIf=\"!isDisabled\"\n (mouseenter)=\"changeBackground($event)\"\n (mouseleave)=\"resetBackground($event)\"\n >\n <div class=\"copy-icon\">\n <span\n class=\"mdi mdi-content-copy hide\"\n (click)=\"copyDataCell('MG', daypart)\"\n container=\"body\"\n ngbTooltip=\"Copy to ADU\"\n placement=\"bottom auto\"\n triggers=\"hover\"\n ></span>\n </div>\n </td> -->\n <!-- ADU -->\n <!-- <td\n class=\"equivalent-adu\"\n [ngClass]=\"{ hoverable: !isDisabled }\"\n >\n <div\n *ngIf=\"isDisabled\"\n class=\"disabled-text\"\n annaCoreShowEllipsisTextOnHover\n >\n {{ daypart?.equivalentDaypartsForAdu | annaConvertArrayToCSV: \"text\" : \"isSelected\" }}\n \n </div>\n <ng-container *ngIf=\"!isDisabled\">\n <anna-design-multi-select\n class=\"daypart-dropdown\"\n [ngClass]=\"{\n 'blue-border-highlight':\n daypart?.isEquivalentDpForAduSelected || daypart?.isEquivalentEditedForAdu\n }\"\n [loading]=\"false\"\n [items]=\"daypart?.equivalentDaypartsForAdu\"\n [showAdditionalDataInSelectedText]=\"false\"\n [config]=\"dropdownConfig\"\n [disabled]=\"isDisabled\"\n [disableOptionsEnabled]=\"true\"\n [hideOptionsEnabled]=\"false\"\n [isEquivalentHigherDpComponent]=\"true\"\n (dropdownOpenedEvent)=\"dropdownOpened(daypart, 'ADU', 'EQUIVALENT')\"\n (dropdownClosedEvent)=\"equivalentDaypartSelectionChangedForAdu($event, daypart)\"\n >\n </anna-design-multi-select>\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && daypart?.isEquivalentChangedForAdu\"\n ></div>\n </td>\n <td\n class=\"higher-adu\"\n [ngClass]=\"{ hoverable: !isDisabled }\"\n >\n <div\n *ngIf=\"isDisabled\"\n class=\"disabled-text\"\n annaCoreShowEllipsisTextOnHover\n >\n {{ daypart?.higherDaypartsForAdu | annaConvertArrayToCSV: \"text\" : \"isSelected\" }}\n \n </div>\n <ng-container *ngIf=\"!isDisabled\">\n <anna-design-multi-select\n class=\"daypart-dropdown\"\n [ngClass]=\"{\n 'blue-border-highlight':\n daypart?.isHigherDpForAduSelected || daypart.isHigherEditedForAdu\n }\"\n [loading]=\"false\"\n [items]=\"daypart?.higherDaypartsForAdu\"\n [showAdditionalDataInSelectedText]=\"false\"\n [config]=\"dropdownConfig\"\n [disabled]=\"isDisabled\"\n (dropdownOpenedEvent)=\"dropdownOpened(daypart, 'ADU', 'HIGHER')\"\n [disableOptionsEnabled]=\"true\"\n [hideOptionsEnabled]=\"false\"\n [isEquivalentHigherDpComponent]=\"true\"\n (dropdownClosedEvent)=\"higherDaypartSelectionChangedForAdu($event, daypart)\"\n >\n </anna-design-multi-select>\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && daypart.isHigherChangedForAdu\"\n ></div>\n </td>\n <td\n class=\"copy-adu\"\n *ngIf=\"!isDisabled\"\n (mouseenter)=\"changeBackground($event)\"\n (mouseleave)=\"resetBackground($event)\"\n >\n <div class=\"copy-icon\">\n <span\n class=\"mdi mdi-content-copy hide\"\n (click)=\"copyDataCell('ADU', daypart)\"\n ngbTooltip=\"Copy to MG\"\n container=\"body\"\n placement=\"bottom auto\"\n triggers=\"hover\"\n ></span>\n </div>\n </td> -->\n </tr>\n </tbody>\n </table>\n <div\n *ngIf=\"!daypartEquivalenceRules || !daypartEquivalenceRules.length\"\n class=\"no-data-container\"\n >\n <anna-core-no-data-lib\n [width]=\"'50%'\"\n [marginTop]=\"'3.25rem'\"\n ></anna-core-no-data-lib>\n </div>\n </div>\n</div>\n","import { NgClass, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n} from \"@angular/core\";\nimport {\n AnnaCoreModule,\n AnnaFilterService,\n AnnaGlobalConfigService,\n AnnaGtHelperService,\n AnnaNonEditableGenericTableComponent,\n AnnaSortService,\n IGtGeneralConfig,\n IGtTableHeader,\n ITotalRowInfo,\n} from \"@annalib/anna-core\";\nimport {\n AnnaDesignComponentsLibModule,\n GenericMessageBoxTheme,\n MessageBoxData,\n} from \"@annalib/anna-design-components-lib\";\nimport { cloneDeep, sortBy } from \"lodash-es\";\n\nimport { Inventory } from \"../business-rule-page/models/business-rule.model\";\n\n@Component({\n selector: \"anna-feature-excluded-or-special-program\",\n templateUrl: \"./excluded-or-special-program.component.html\",\n styleUrls: [\"./excluded-or-special-program.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgIf, AnnaDesignComponentsLibModule, AnnaCoreModule, NgClass],\n})\nexport class ExcludedOrSpecialProgramComponent implements OnInit, OnChanges {\n @Input() tableHeaders: IGtTableHeader[];\n @Input() nonSelectedInventories: Inventory[] = [];\n @Input() selectedInventories: Inventory[] | any[] = [];\n @Input() componentName: \"EXCLUDED\" | \"SPECIAL\";\n @Input() noOfHighlightChanges: number = 0;\n @Input() editMode: boolean = false;\n @Input() isHistoryPage: boolean = false;\n @Input() showTotalRow: boolean = true;\n\n @Output() inventoriesSelected = new EventEmitter<Inventory[]>();\n @Output() inventoriesNotSelected = new EventEmitter<Inventory[]>();\n @Output() modalClose = new EventEmitter();\n\n tableDisplayData: Inventory[] = [];\n clonedTableDisplayData: Inventory[] = [];\n tableAllDataWithoutAnyColumnFilter: Inventory[] = [];\n selectedICCount: number;\n\n totalRowInfo: ITotalRowInfo[] = [];\n gtGeneralConfig: IGtGeneralConfig;\n gtDimension = { rowHeight: 22, headerHeight: 40, dataOnTopHeight: 0, marginFromBottom: 0 };\n messageForProgram: MessageBoxData;\n disableClearAllBtn: boolean = true;\n @ViewChild(AnnaNonEditableGenericTableComponent) nonEditableGTComponent: AnnaNonEditableGenericTableComponent;\n\n constructor(\n private annaGlobalConfig: AnnaGlobalConfigService,\n private annaFilterService: AnnaFilterService,\n private annaSortService: AnnaSortService,\n private gtHelperService: AnnaGtHelperService,\n ) {\n this.setTableConfig();\n }\n\n ngOnInit() {\n this.initFilters();\n const selectedInventories = sortBy(this.selectedInventories, \"programName\");\n const nonSelectedInventories = sortBy(this.nonSelectedInventories, \"programName\");\n\n this.tableDisplayData = cloneDeep([...selectedInventories, ...nonSelectedInventories]);\n this.createTotalRow();\n this.selectedICCount = selectedInventories.length;\n this.tableAllDataWithoutAnyColumnFilter = cloneDeep(this.tableDisplayData);\n this.annaSortService.noSortingAppliedData = cloneDeep(this.tableAllDataWithoutAnyColumnFilter);\n this.disableClearAllBtn = this.gtHelperService.enableOrDisableClearAllBtn();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes?.componentName?.currentValue) {\n this.setMessageBoxData();\n }\n }\n\n setMessageBoxData() {\n if (this.componentName === \"EXCLUDED\") {\n this.messageForProgram = new MessageBoxData(\n null,\n // eslint-disable-next-line max-len\n \"<ul><li>The program(s) selected below will not be used to provide MakeGoods/ADUs for any other program.</li><li>MakeGoods/ADUs will be given in the selected program only if the preemptions/under-delivery are in the same program.</li><li>Programs airing in Dayparts that have been unselected in 'DP Restrictions' will automatically be excluded from consideration for providing MGs and ADUs.</li></ul>\",\n \"mdi mdi-information\",\n `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm excluded-programs`,\n );\n } else {\n this.messageForProgram = new MessageBoxData(\n null,\n // eslint-disable-next-line max-len\n \"MakeGoods/ADUs will be given in the selected program(s) only if the preemptions/under-delivery are in the same program.\",\n \"mdi mdi-information\",\n `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm program-table`,\n );\n }\n }\n\n changeSelectedInventories() {\n const selectedInventories = this.tableAllDataWithoutAnyColumnFilter.filter((item) => item.isSelected);\n const nonSelectedInventories = this.tableAllDataWithoutAnyColumnFilter.filter((item) => !item.isSelected);\n\n this.inventoriesSelected.emit(selectedInventories);\n this.inventoriesNotSelected.emit(nonSelectedInventories);\n }\n\n toggleCheckbox(event: { columnKeys: string; isCheckboxSelected: boolean; rowData: Inventory }) {\n const tableDataRowIndex = this.tableDisplayData.findIndex(\n (obj: Inventory) => obj.programName === event.rowData.programName,\n );\n const tableDataClonedRowIndex = this.tableAllDataWithoutAnyColumnFilter.findIndex(\n (obj) => obj.programName === event.rowData.programName,\n );\n\n switch (event.columnKeys) {\n case \"makeGoodSelected\":\n this.tableDisplayData[tableDataRowIndex].makeGoodSelected = event.isCheckboxSelected;\n this.tableAllDataWithoutAnyColumnFilter[tableDataClonedRowIndex].makeGoodSelected =\n event.isCheckboxSelected;\n break;\n\n case \"aduSelected\":\n this.tableDisplayData[tableDataRowIndex].aduSelected = event.isCheckboxSelected;\n this.tableAllDataWithoutAnyColumnFilter[tableDataClonedRowIndex].aduSelected = event.isCheckboxSelected;\n break;\n // no default\n }\n if (\n this.tableDisplayData[tableDataRowIndex].makeGoodSelected ||\n this.tableDisplayData[tableDataRowIndex].aduSelected\n ) {\n this.tableDisplayData[tableDataRowIndex].isSelected = true;\n this.tableDisplayData[tableDataRowIndex].type = this.componentName;\n this.tableAllDataWithoutAnyColumnFilter[tableDataClonedRowIndex].type = this.componentName;\n this.tableAllDataWithoutAnyColumnFilter[tableDataClonedRowIndex].isSelected = true;\n } else {\n this.tableDisplayData[tableDataRowIndex].isSelected = false;\n this.tableDisplayData[tableDataRowIndex].type = \"-\";\n this.tableAllDataWithoutAnyColumnFilter[tableDataClonedRowIndex].isSelected = false;\n this.tableAllDataWithoutAnyColumnFilter[tableDataClonedRowIndex].type = \"-\";\n }\n\n this.selectedICCount = this.tableDisplayData.filter((n) => n.isSelected).length;\n this.updateTotalRow();\n this.changeSelectedInventories();\n }\n\n filterAppliedToTable(data: Inventory[]) {\n this.tableDisplayData = cloneDeep(data);\n this.selectedICCount = this.tableDisplayData.filter((n) => n.isSelected).length;\n this.disableClearAllBtn = this.gtHelperService.enableOrDisableClearAllBtn();\n this.updateTotalRow();\n }\n\n sortingAppliedToTable(data: Inventory[]) {\n this.tableDisplayData = cloneDeep(data);\n this.disableClearAllBtn = this.gtHelperService.enableOrDisableClearAllBtn();\n }\n\n clearAllFilter() {\n this.nonEditableGTComponent?.setScrollToInitialPosition();\n this.tableDisplayData = cloneDeep(this.tableAllDataWithoutAnyColumnFilter);\n this.gtHelperService.initTableFilters(this.tableAllDataWithoutAnyColumnFilter);\n this.disableClearAllBtn = this.gtHelperService.enableOrDisableClearAllBtn();\n this.initFilters();\n this.createTotalRow();\n this.selectedICCount = this.tableAllDataWithoutAnyColumnFilter.filter((n) => n.isSelected).length;\n }\n\n initFilters() {\n this.annaFilterService.tooltipMap = new Map();\n this.annaFilterService.initialValueMap = new Map();\n this.annaSortService.columnSortState = new Map();\n this.annaFilterService.tooltipSelectedMap = new Map();\n this.annaFilterService.selectedRadio = null;\n this.annaFilterService.appliedFiltersArray = [];\n }\n\n setTableConfig() {\n this.gtGeneralConfig = { ...this.annaGlobalConfig.defaultGtGeneralConfig };\n this.gtGeneralConfig.component = \"EXCLUDEINVENTORYPOPUP\";\n this.gtGeneralConfig.totalRow = true;\n this.gtGeneralConfig.tableContainerName = \"excluded-inventory-popup\";\n this.gtGeneralConfig.tableOuterContainerName = \"excluded-or-special-inventory-popup-outer-container\";\n }\n\n createTotalRow() {\n if (this.showTotalRow) {\n this.gtGeneralConfig.totalRow = true;\n this.totalRowInfo = [];\n this.totalRowInfo.push({\n colspan: 4,\n data: this.annaFilterService.appliedFiltersArray.length > 0 ? \"All filtered result\" : \"All\",\n colName: \"all-col\",\n });\n const selectedMgRowsCount: number = this.tableDisplayData.filter((n) => n.makeGoodSelected).length;\n this.totalRowInfo.push({\n colspan: 1,\n data: \"\",\n colName: \"mg-total\",\n iconData: {\n class: this.setCheckboxClass(selectedMgRowsCount),\n },\n isIconColumn: true,\n });\n const selectedADURowsCount: number = this.tableDisplayData.filter((n) => n.aduSelected).length;\n this.totalRowInfo.push({\n colspan: 1,\n data: \"\",\n colName: \"adu-total\",\n isIconColumn: true,\n iconData: {\n class: this.setCheckboxClass(selectedADURowsCount),\n },\n });\n } else {\n this.gtGeneralConfig.totalRow = false;\n }\n }\n\n setCheckboxClass(selectedRowsCount: number) {\n let checkBoxClass = \"mi mdi-indeterminate-check-box check-box\";\n if (selectedRowsCount === 0) {\n checkBoxClass = \"mi mdi-check-box-outline-blank check-box\";\n } else if (selectedRowsCount === this.tableDisplayData.length) {\n checkBoxClass = \"mi mdi-check-box check-box\";\n }\n return checkBoxClass;\n }\n\n updateTotalRow() {\n if (this.showTotalRow) {\n this.gtGeneralConfig.totalRow = true;\n\n this.totalRowInfo.find((row) => row.colName === \"all-col\").data =\n this.annaFilterService.appliedFiltersArray.length > 0 ? \"All filtered result\" : \"All\";\n\n const selectedMgRowsCount: number = this.tableDisplayData.filter((n) => n.makeGoodSelected).length;\n if (selectedMgRowsCount === 0) {\n this.totalRowInfo.find((row) => row.colName === \"mg-total\").iconData.class =\n \"mi mdi-check-box-outline-blank check-box\";\n } else if (selectedMgRowsCount === this.tableDisplayData.length) {\n this.totalRowInfo.find((row) => row.colName === \"mg-total\").iconData.class =\n \" mi mdi-check-box check-box\";\n } else {\n this.totalRowInfo.find((row) => row.colName === \"mg-total\").iconData.class =\n \"mi mdi-indeterminate-check-box check-box\";\n }\n const selectedADURowsCount: number = this.tableDisplayData.filter((n) => n.aduSelected).length;\n if (selectedADURowsCount === 0) {\n this.totalRowInfo.find((row) => row.colName === \"adu-total\").iconData.class =\n \"mi mdi-check-box-outline-blank check-box\";\n } else if (selectedADURowsCount === this.tableDisplayData.length) {\n this.totalRowInfo.find((row) => row.colName === \"adu-total\").iconData.class =\n \" mi mdi-check-box check-box\";\n } else {\n this.totalRowInfo.find((row) => row.colName === \"adu-total\").iconData.class =\n \"mi mdi-indeterminate-check-box check-box\";\n }\n } else {\n this.gtGeneralConfig.totalRow = false;\n }\n }\n\n totalRowIconClicked(colName: \"adu-total\" | \"mg-total\") {\n switch (colName) {\n case \"adu-total\": {\n const selectedAduCheckedRowsCount: number = this.tableDisplayData.filter((n) => n.aduSelected).length;\n if (selectedAduCheckedRowsCount === 0 || selectedAduCheckedRowsCount !== this.tableDisplayData.length) {\n this.tableDisplayData.forEach((n) => {\n n.isSelected = true;\n n.aduSelected = true;\n n.type = n.isSelected ? this.componentName : \"-\";\n const index: number = this.tableAllDataWithoutAnyColumnFilter.findIndex(\n (item) => n.programName === item.programName,\n );\n this.tableAllDataWithoutAnyColumnFilter[index].aduSelected = true;\n this.tableAllDataWithoutAnyColumnFilter[index].isSelected = true;\n this.tableAllDataWithoutAnyColumnFilter[index].type = n.isSelected ? this.componentName : \"-\";\n });\n } else {\n this.tableDisplayData.forEach((n) => {\n n.aduSelected = false;\n const isSelected: boolean = cloneDeep(n.makeGoodSelected);\n n.isSelected = isSelected;\n n.type = n.isSelected ? this.componentName : \"-\";\n const index: number = this.tableAllDataWithoutAnyColumnFilter.findIndex(\n (item) => n.programName === item.programName,\n );\n this.tableAllDataWithoutAnyColumnFilter[index].aduSelected = false;\n this.tableAllDataWithoutAnyColumnFilter[index].type = n.isSelected ? this.componentName : \"-\";\n this.tableAllDataWithoutAnyColumnFilter[index].isSelected = isSelected;\n });\n }\n break;\n }\n case \"mg-total\": {\n const selectedMgUnCheckedRowsCount: number = this.tableDisplayData.filter(\n (n) => n.makeGoodSelected,\n ).length;\n if (\n selectedMgUnCheckedRowsCount === 0 ||\n selectedMgUnCheckedRowsCount !== this.tableDisplayData.length\n ) {\n this.tableDisplayData.forEach((n) => {\n n.makeGoodSelected = true;\n n.isSelected = true;\n n.type = n.isSelected ? this.componentName : \"-\";\n const index: number = this.tableAllDataWithoutAnyColumnFilter.findIndex(\n (item) => n.programName === item.programName,\n );\n this.tableAllDataWithoutAnyColumnFilter[index].makeGoodSelected = true;\n this.tableAllDataWithoutAnyColumnFilter[index].type = n.isSelected ? this.componentName : \"-\";\n this.tableAllDataWithoutAnyColumnFilter[index].isSelected = true;\n });\n } else {\n this.tableDisplayData.forEach((n) => {\n n.makeGoodSelected = false;\n const isSelected: boolean = cloneDeep(n.aduSelected);\n n.isSelected = isSelected;\n n.type = n.isSelected ? this.componentName : \"-\";\n const index: number = this.tableAllDataWithoutAnyColumnFilter.findIndex(\n (item) => n.programName === item.programName,\n );\n this.tableAllDataWithoutAnyColumnFilter[index].makeGoodSelected = false;\n this.tableAllDataWithoutAnyColumnFilter[index].type = n.isSelected ? this.componentName : \"-\";\n this.tableAllDataWithoutAnyColumnFilter[index].isSelected = isSelected;\n });\n }\n break;\n }\n // no default\n }\n this.selectedICCount = this.tableDisplayData.filter((n) => n.isSelected).length;\n this.updateTotalRow();\n this.changeSelectedInventories();\n }\n}\n","<anna-design-message-box\n *ngIf=\"!isHistoryPage\"\n [messageBoxData]=\"messageForProgram\"\n [headerAsBlockElement]=\"false\"\n [showHyphen]=\"false\"\n></anna-design-message-box>\n\n<ng-container *ngIf=\"tableDisplayData && tableDisplayData?.length; else noData\">\n <div class=\"count-reset-container\">\n <span class=\"info-text\">\n {{ selectedICCount }}/{{ tableDisplayData.length }}\n selected\n </span>\n\n <button\n class=\"clear-all-btn\"\n (click)=\"clearAllFilter()\"\n [disabled]=\"disableClearAllBtn\"\n >\n Reset all filters\n </button>\n </div>\n\n <anna-core-non-editable-generic-table-lib\n [tableBorderBottomClassRequired]=\"false\"\n [clickableRow]=\"false\"\n [ngClass]=\"{ 'inventory-table-with-change-icon': noOfHighlightChanges, 'read-mode': !editMode }\"\n [showSkeletonLoading]=\"false\"\n [tableHeaders]=\"tableHeaders\"\n [tableData]=\"tableDisplayData\"\n [clonedTableData]=\"tableAllDataWithoutAnyColumnFilter\"\n [totalRowInfo]=\"totalRowInfo\"\n [gtGeneralConfig]=\"gtGeneralConfig\"\n [gtDimension]=\"gtDimension\"\n (totalRowIconClicked)=\"totalRowIconClicked($event)\"\n (filterAppliedToTable)=\"filterAppliedToTable($event)\"\n (sortingAppliedToTable)=\"sortingAppliedToTable($event)\"\n (toggleCheckbox)=\"toggleCheckbox($event)\"\n >\n </anna-core-non-editable-generic-table-lib>\n</ng-container>\n\n<ng-template #noData>\n <div class=\"empty-table-div\">\n <ng-container *ngIf=\"editMode\">\n {{ componentName === \"EXCLUDED\" ? \"No Programs to exclude\" : \"No Special Programs to select\" }}\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{\n componentName === \"EXCLUDED\"\n ? \"No Programs are excluded\"\n : \"No Special\n Programs are selected\"\n }}\n </ng-container>\n </div>\n</ng-template>\n","import { FormGroup, ValidatorFn } from \"@angular/forms\";\n\nexport function relaxedValidation(preApproved: string, relaxed: string): ValidatorFn | any {\n return (group: FormGroup) => {\n const autoApproved = group.controls[preApproved];\n const relaxedControl = group.controls[relaxed];\n\n if (autoApproved.value > relaxedControl.value && autoApproved.value !== relaxedControl.value) {\n relaxedControl.setErrors({ relaxedValidation: true });\n } // relaxedValidation is true then only set error as null\n else if (relaxedControl.errors?.relaxedValidation) {\n relaxedControl.setErrors(null);\n }\n };\n}\n","export class GeneralRulesTableHeader {\n static readonly RULE_NUMBER = \"RULE#\";\n static readonly BUSINESS_RULES = \"BUSINESS RULES\";\n static readonly STANDARD_RULE = \"STANDARD RULE\";\n static readonly RELAXED_RULE = \"RELAXED RULE\";\n}\n\nexport class GeneralBusinessRulesConstant {\n static readonly postingType = \"Posting type\";\n static readonly measurementAgency = \"Measurement Agency\";\n static readonly maxSpotsPerHalfHourInOTO =\n \"Max spots allowed <b>per half hour</b> in OTO Program <span class='grey-text'>(includes booked spots, MG and ADU offers)</span>\";\n static readonly maxSpotsPerOtoForDifferentDurations =\n \"Max spots allowed <b>per OTO Program</b> for the following durations <span class='grey-text'>(includes booked spots, MG and ADU offers)</span>\";\n static readonly thirtyMinToOneHourDuration = \"30 min - 1 hour\";\n static readonly oneHourToTwoHoursDuration = \"1 hour - 2 hours\";\n static readonly twoHoursToThreeHoursDuration = \"2 hours - 3 hours\";\n static readonly moreThanTwoHoursDuration = \"2+ hours\";\n static readonly moreThanThreeHourDuration = \"3+ hours\";\n static readonly maxSpotsPerHalfHourInStrip =\n \"Max spots allowed <b>per half hour</b> in Strip Program <span class='grey-text'>(includes booked spots, MG and ADU offers)</span>\";\n static readonly maxSpotsPerStripForDifferentDurations =\n \"Max spots allowed <b>per Strip Program</b> for the following durations <span class='grey-text'>(includes booked spots, MG and ADU offers)</span>\";\n static readonly dayPartGroups = \"Daypart Groups\";\n static readonly advertiserSeparation = \"Advertiser Separation\";\n}\n","import { NgClass, NgFor, NgForOf, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n AbstractControlOptions,\n FormControl,\n FormGroup,\n FormsModule,\n ReactiveFormsModule,\n ValidatorFn,\n Validators,\n} from \"@angular/forms\";\nimport { AnnaCoreModule, AnnaGlobalConfigService, ICustomSingleSelect } from \"@annalib/anna-core\";\nimport {\n AnnaDesignComponentsLibModule,\n GenericMessageBoxTheme,\n MessageBoxData,\n SingleSelectIdText,\n} from \"@annalib/anna-design-components-lib\";\nimport { NgbTimepicker, NgbTooltip } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep } from \"lodash-es\";\n\nimport { GeneralRules } from \"../business-rule-page/models/business-rule.model\";\nimport { relaxedValidation } from \"../make-good-rules/validators/relaxedValidation\";\nimport { GeneralBusinessRulesConstant, GeneralRulesTableHeader } from \"./models/general-rules-constant\";\n\n@Component({\n selector: \"anna-feature-general-rules\",\n templateUrl: \"./general-rules.component.html\",\n styleUrls: [\"./general-rules.component.scss\"],\n changeDetection: ChangeDetectionStrategy.Default,\n imports: [\n NgClass,\n NgIf,\n NgForOf,\n NgFor,\n AnnaDesignComponentsLibModule,\n NgbTooltip,\n NgbTimepicker,\n FormsModule,\n ReactiveFormsModule,\n AnnaCoreModule,\n ],\n})\nexport class GeneralRulesComponent implements OnChanges {\n @Input() disableAdvertiserSeparation: boolean = false;\n @Input() advertiserSeparationClonedValue: string = \"\";\n @Input() generalRules: GeneralRules;\n @Input() highlightChanges: boolean = false;\n @Input() editMode: boolean = false;\n @Output() generalRuleChange = new EventEmitter<GeneralRules>();\n\n generalRulesMessageBoxData: MessageBoxData;\n GeneralRulesTableHeader = GeneralRulesTableHeader;\n GeneralBusinessRulesConstant = GeneralBusinessRulesConstant;\n readonly MINVALUE = 1;\n readonly MAXVALUE = 100;\n readonly DEFAULT_MIN_SEPARATION_TIME = \"00:00:00\";\n\n maxSpotsPerHalfAnHourInOto: FormGroup;\n maxSpotsPerOTOProgForHalfHourToOneHour: FormGroup;\n maxSpotsPerOTOProgForOneHourToTwoHours: FormGroup;\n maxSpotsPerOTOProgForTwoHoursToThreeHours: FormGroup;\n maxSpotsPerOTOProgForMoreThanThreeHour: FormGroup;\n\n maxSpotsPerHalfAnHourInStripProgramDaily: FormGroup;\n maxSpotsPerStripForHalfHourToOneHourDaily: FormGroup;\n maxSpotsPerStripForOneHourToTwoHoursDaily: FormGroup;\n maxSpotsPerStripForMoreThanTwoHourDaily: FormGroup;\n\n maxSpotsPerHalfAnHourInStripProgramWeekly: FormGroup;\n maxSpotsPerStripHalfHourToOneHourWeekly: FormGroup;\n maxSpotsPerStripForOneHourToTwoHoursWeekly: FormGroup;\n maxSpotsPerStripForMoreThanTwoHourWeekly: FormGroup;\n\n minSeperationTimeControl: FormControl;\n selectedMinSeparationTime: { hour: number; minute: number; second: number } | null;\n\n postingTypeDropdownConfig: ICustomSingleSelect;\n measurementAgencyDropdownConfig: ICustomSingleSelect;\n selectedPostedType: SingleSelectIdText;\n selectedMeasurementAgency: SingleSelectIdText;\n\n readonly DEBOUNCE_TIME = 30;\n readonly NOT_EMIT_VALUE_CHANGE = { emitEvent: false, onlySelf: false };\n\n constructor(private annaGlobalService: AnnaGlobalConfigService) {\n this.setMessageBoxData();\n this.initializeForm();\n this.setPostingTypeDropdownConfig();\n this.setMeasurementAgencyDropdownConfig();\n }\n\n setPostingTypeDropdownConfig() {\n this.postingTypeDropdownConfig = { ...this.annaGlobalService.defaultSingleSelectConfig };\n this.postingTypeDropdownConfig.placeholder = \"Select\";\n }\n\n setMeasurementAgencyDropdownConfig() {\n this.measurementAgencyDropdownConfig = { ...this.annaGlobalService.defaultSingleSelectConfig };\n this.measurementAgencyDropdownConfig.placeholder = \"Select\";\n }\n ngOnChanges(change: SimpleChanges) {\n if (change.generalRules?.currentValue) {\n this.setAllFormData();\n this.selectedPostedType = this.generalRules.postingTypeBusinessRule.postingTypesDropdownData.find(\n (item) => item.isSelected === true,\n );\n this.selectedMeasurementAgency =\n this.generalRules.measurementAgencyBizRule.measurementAgencyDropdownData.find(\n (item) => item.isSelected === true,\n );\n }\n }\n\n setAllFormData() {\n this.initializeTimeFormatControl();\n const formGroups = [\n { formGroup: this.maxSpotsPerHalfAnHourInOto, data: this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour },\n {\n formGroup: this.maxSpotsPerOTOProgForHalfHourToOneHour,\n data: this.generalRules.maxSpotsAllowedInOTO.halfHourToOneHour,\n },\n {\n formGroup: this.maxSpotsPerOTOProgForOneHourToTwoHours,\n data: this.generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour,\n },\n {\n formGroup: this.maxSpotsPerOTOProgForTwoHoursToThreeHours,\n data: this.generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours,\n },\n {\n formGroup: this.maxSpotsPerOTOProgForMoreThanThreeHour,\n data: this.generalRules.maxSpotsAllowedInOTO.moreThanThreeHours,\n },\n {\n formGroup: this.maxSpotsPerHalfAnHourInStripProgramDaily,\n data: this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour,\n },\n {\n formGroup: this.maxSpotsPerStripForHalfHourToOneHourDaily,\n data: this.generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour,\n },\n {\n formGroup: this.maxSpotsPerStripForOneHourToTwoHoursDaily,\n data: this.generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour,\n },\n {\n formGroup: this.maxSpotsPerStripForMoreThanTwoHourDaily,\n data: this.generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours,\n },\n {\n formGroup: this.maxSpotsPerHalfAnHourInStripProgramWeekly,\n data: this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour,\n },\n {\n formGroup: this.maxSpotsPerStripHalfHourToOneHourWeekly,\n data: this.generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour,\n },\n {\n formGroup: this.maxSpotsPerStripForOneHourToTwoHoursWeekly,\n data: this.generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour,\n },\n {\n formGroup: this.maxSpotsPerStripForMoreThanTwoHourWeekly,\n data: this.generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours,\n },\n ];\n\n formGroups.forEach(({ formGroup, data }) => {\n formGroup.get(\"preApproved\").setValue(data.preApproved.Current, { emitEvent: false });\n formGroup.get(\"relaxed\").setValue(data.relaxed.Current, { emitEvent: false });\n });\n }\n\n createFormGroup(inclueMaxValue: boolean = false) {\n let COMMON_VALIDATOR;\n if (inclueMaxValue) {\n COMMON_VALIDATOR = [Validators.required, Validators.min(this.MINVALUE), Validators.max(this.MAXVALUE)];\n } else {\n COMMON_VALIDATOR = [Validators.required, Validators.min(this.MINVALUE)];\n }\n\n const formOptions: AbstractControlOptions = { validators: relaxedValidation(\"preApproved\", \"relaxed\") };\n return new FormGroup(\n {\n preApproved: new FormControl(null, COMMON_VALIDATOR),\n relaxed: new FormControl(null, COMMON_VALIDATOR),\n },\n formOptions,\n );\n }\n\n initializeForm() {\n this.maxSpotsPerHalfAnHourInOto = this.createFormGroup(true);\n this.maxSpotsPerOTOProgForHalfHourToOneHour = this.createFormGroup();\n this.maxSpotsPerOTOProgForOneHourToTwoHours = this.createFormGroup();\n this.maxSpotsPerOTOProgForTwoHoursToThreeHours = this.createFormGroup();\n this.maxSpotsPerOTOProgForMoreThanThreeHour = this.createFormGroup();\n this.maxSpotsPerHalfAnHourInStripProgramDaily = this.createFormGroup(true);\n this.maxSpotsPerHalfAnHourInStripProgramWeekly = this.createFormGroup(true);\n this.maxSpotsPerStripForHalfHourToOneHourDaily = this.createFormGroup();\n this.maxSpotsPerStripHalfHourToOneHourWeekly = this.createFormGroup();\n this.maxSpotsPerStripForOneHourToTwoHoursDaily = this.createFormGroup();\n this.maxSpotsPerStripForOneHourToTwoHoursWeekly = this.createFormGroup();\n this.maxSpotsPerStripForMoreThanTwoHourDaily = this.createFormGroup();\n this.maxSpotsPerStripForMoreThanTwoHourWeekly = this.createFormGroup();\n\n this.subscribeToFormChange();\n }\n\n onPostingTypeChanged(postingType: any) {\n this.generalRules.postingTypeBusinessRule.postingTypesDropdownData.forEach((item) => {\n if (item.id === postingType.id) {\n item.isSelected = true;\n } else {\n item.isSelected = false;\n }\n });\n this.selectedPostedType = cloneDeep(postingType);\n\n this.formValueChanged();\n }\n onMeasurementAgencyChanged(measurementAgency: any) {\n this.generalRules.measurementAgencyBizRule.measurementAgencyDropdownData.forEach((item) => {\n if (item.id === measurementAgency.id) {\n item.isSelected = true;\n } else {\n item.isSelected = false;\n }\n });\n this.selectedMeasurementAgency = cloneDeep(measurementAgency);\n\n this.formValueChanged();\n }\n\n isAdvertiserSeparationNeededChanged() {\n const currentValue = !this.generalRules.advertiserSeperation.isAdvertiserSeparationNeeded.Current;\n this.generalRules.advertiserSeperation.isAdvertiserSeparationNeeded.Current = currentValue;\n if (!currentValue) {\n const clonedValue = cloneDeep(this.advertiserSeparationClonedValue);\n this.generalRules.advertiserSeperation.advertiserSeparationValue.Current = clonedValue;\n this.selectedMinSeparationTime = this.convertToTimeObject(clonedValue);\n this.minSeperationTimeControl.setValue(clonedValue, { emitEvent: false });\n this.minSeperationTimeControl.updateValueAndValidity();\n }\n this.formValueChanged();\n }\n\n onMaxSpotsAllowedPerHalfAnHourInOTOPreapprovedChanged(event: any) {\n if (event.target.value === \"\") {\n this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current = null;\n this.maxSpotsPerHalfAnHourInOto\n .get(\"preApproved\")\n .setValue(this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current);\n this.formValueChanged();\n return;\n }\n this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current = +event.target.value;\n this.maxSpotsPerHalfAnHourInOto\n .get(\"preApproved\")\n .setValue(this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current);\n const maxSpotsAllowedPerHalfHour = this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current;\n\n this.maxSpotsPerOTOProgForHalfHourToOneHour.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 2);\n this.maxSpotsPerOTOProgForOneHourToTwoHours.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 4);\n this.maxSpotsPerOTOProgForTwoHoursToThreeHours.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 6);\n this.maxSpotsPerOTOProgForMoreThanThreeHour.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 8);\n this.formValueChanged();\n }\n\n onMaxSpotsAllowedPerHalfAnHourInOTORRelaxedChanged(event: any) {\n if (event.target.value === \"\") {\n this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current = null;\n this.maxSpotsPerHalfAnHourInOto\n .get(\"relaxed\")\n .setValue(this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current);\n this.formValueChanged();\n return;\n }\n this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current = +event.target.value;\n this.maxSpotsPerHalfAnHourInOto\n .get(\"relaxed\")\n .setValue(this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current);\n const maxSpotsAllowedPerHalfHour = this.generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current;\n\n this.maxSpotsPerOTOProgForHalfHourToOneHour.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 2);\n this.maxSpotsPerOTOProgForOneHourToTwoHours.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 4);\n this.maxSpotsPerOTOProgForTwoHoursToThreeHours.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 6);\n this.maxSpotsPerOTOProgForMoreThanThreeHour.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 8);\n this.formValueChanged();\n }\n\n onMaxSpotsAllowedPerHalfAnHourInStripDailyPreApprovedChanged(event: any) {\n if (event.target.value === \"\") {\n this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved.Current = null;\n this.maxSpotsPerHalfAnHourInStripProgramDaily\n .get(\"preApproved\")\n .setValue(this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved.Current);\n this.formValueChanged();\n return;\n }\n this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved.Current = +event.target.value;\n this.maxSpotsPerHalfAnHourInStripProgramDaily\n .get(\"preApproved\")\n .setValue(this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved.Current);\n const maxSpotsAllowedPerHalfHour =\n this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved.Current;\n\n this.maxSpotsPerStripForHalfHourToOneHourDaily.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 2);\n this.maxSpotsPerStripForOneHourToTwoHoursDaily.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 4);\n this.maxSpotsPerStripForMoreThanTwoHourDaily.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 6);\n this.formValueChanged();\n }\n\n onMaxSpotsAllowedPerHalfAnHourInStripWeeklyPreApprovedChanged(event: any) {\n if (event.target.value === \"\") {\n this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved.Current = null;\n this.maxSpotsPerHalfAnHourInStripProgramWeekly\n .get(\"preApproved\")\n .setValue(this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved.Current);\n this.formValueChanged();\n return;\n }\n this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved.Current = +event.target.value;\n this.maxSpotsPerHalfAnHourInStripProgramWeekly\n .get(\"preApproved\")\n .setValue(this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved.Current);\n\n const maxSpotsAllowedPerHalfHour =\n this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved.Current;\n\n this.maxSpotsPerStripHalfHourToOneHourWeekly.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 2);\n this.maxSpotsPerStripForOneHourToTwoHoursWeekly.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 4);\n this.maxSpotsPerStripForMoreThanTwoHourWeekly.get(\"preApproved\").setValue(maxSpotsAllowedPerHalfHour * 6);\n this.formValueChanged();\n }\n\n onMaxSpotsAllowedPerHalfAnHourInStripDailyRelaxedChanged(event: any) {\n if (event.target.value === \"\") {\n this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed.Current = null;\n this.maxSpotsPerHalfAnHourInStripProgramDaily\n .get(\"relaxed\")\n .setValue(this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed.Current);\n this.formValueChanged();\n return;\n }\n this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed.Current = +event.target.value;\n this.maxSpotsPerHalfAnHourInStripProgramDaily\n .get(\"relaxed\")\n .setValue(this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed.Current);\n const maxSpotsAllowedPerHalfHour = this.generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed.Current;\n\n this.maxSpotsPerStripForHalfHourToOneHourDaily.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 2);\n this.maxSpotsPerStripForOneHourToTwoHoursDaily.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 4);\n this.maxSpotsPerStripForMoreThanTwoHourDaily.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 6);\n this.formValueChanged();\n }\n\n onMaxSpotsAllowedPerHalfAnHourInStripWeeklyRelaxedChanged(event: any) {\n if (event.target.value === \"\") {\n this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed.Current = null;\n this.maxSpotsPerHalfAnHourInStripProgramWeekly\n .get(\"relaxed\")\n .setValue(this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed.Current);\n this.formValueChanged();\n return;\n }\n this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed.Current = +event.target.value;\n this.maxSpotsPerHalfAnHourInStripProgramWeekly\n .get(\"relaxed\")\n .setValue(this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed.Current);\n const maxSpotsAllowedPerHalfHour = this.generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed.Current;\n\n this.maxSpotsPerStripHalfHourToOneHourWeekly.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 2);\n this.maxSpotsPerStripForOneHourToTwoHoursWeekly.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 4);\n this.maxSpotsPerStripForMoreThanTwoHourWeekly.get(\"relaxed\").setValue(maxSpotsAllowedPerHalfHour * 6);\n this.formValueChanged();\n }\n\n subscribeToFormChange() {\n this.maxSpotsPerOTOProgForHalfHourToOneHourOnChange();\n this.maxSpotsPerOTOProgForOneHourToTwoHoursOnChange();\n this.maxSpotsPerOTOProgForTwoHoursToThreeHoursOnChange();\n this.maxSpotsPerOTOProgForMoreThanThreeHoursOnChange();\n this.maxSpotsAllowedPerStripeDailyForThirtyMinToOneHourOnChange();\n this.maxSpotsAllowedPerStripeDailyForOneHourToTwoHoursOnChange();\n this.maxSpotsAllowedPerStripeDailyForMoreThanTwoHoursOnChange();\n this.maxSpotsAllowedPerStripeWeeklyForThirtyMinToOneHourOnChange();\n this.maxSpotsAllowedPerStripeWeeklyForOneHourToTwoHoursOnChange();\n this.maxSpotsAllowedPerStripeWeeklyForMoreThanTwoHoursOnChange();\n }\n\n maxSpotsPerOTOProgForHalfHourToOneHourOnChange() {\n this.maxSpotsPerOTOProgForHalfHourToOneHour.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.preApproved.Current = +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsPerOTOProgForOneHourToTwoHoursOnChange() {\n this.maxSpotsPerOTOProgForOneHourToTwoHours.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.preApproved.Current = +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsPerOTOProgForTwoHoursToThreeHoursOnChange() {\n this.maxSpotsPerOTOProgForTwoHoursToThreeHours.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.preApproved.Current =\n +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsPerOTOProgForMoreThanThreeHoursOnChange() {\n this.maxSpotsPerOTOProgForMoreThanThreeHour.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.preApproved.Current = +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsAllowedPerStripeDailyForThirtyMinToOneHourOnChange() {\n this.maxSpotsPerStripForHalfHourToOneHourDaily.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour.preApproved.Current =\n +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsAllowedPerStripeDailyForOneHourToTwoHoursOnChange() {\n this.maxSpotsPerStripForOneHourToTwoHoursDaily.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour.preApproved.Current =\n +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsAllowedPerStripeDailyForMoreThanTwoHoursOnChange() {\n this.maxSpotsPerStripForMoreThanTwoHourDaily.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours.preApproved.Current =\n +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsAllowedPerStripeWeeklyForThirtyMinToOneHourOnChange() {\n this.maxSpotsPerStripHalfHourToOneHourWeekly.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour.preApproved.Current =\n +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsAllowedPerStripeWeeklyForOneHourToTwoHoursOnChange() {\n this.maxSpotsPerStripForOneHourToTwoHoursWeekly.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour.preApproved.Current =\n +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n maxSpotsAllowedPerStripeWeeklyForMoreThanTwoHoursOnChange() {\n this.maxSpotsPerStripForMoreThanTwoHourWeekly.valueChanges.subscribe(\n (value: { preApproved: number; relaxed: number }) => {\n if (value?.preApproved) {\n this.generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours.preApproved.Current =\n +value.preApproved;\n }\n if (value?.relaxed) {\n this.generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours.relaxed.Current = +value.relaxed;\n }\n this.formValueChanged();\n },\n );\n }\n\n checkIfAnyFormIsInvalid() {\n const isInvalid =\n this.maxSpotsPerHalfAnHourInOto.invalid ||\n this.maxSpotsPerOTOProgForHalfHourToOneHour.invalid ||\n this.maxSpotsPerOTOProgForOneHourToTwoHours.invalid ||\n this.maxSpotsPerOTOProgForTwoHoursToThreeHours.invalid ||\n this.maxSpotsPerOTOProgForMoreThanThreeHour.invalid ||\n this.maxSpotsPerHalfAnHourInStripProgramDaily.invalid ||\n this.maxSpotsPerStripForHalfHourToOneHourDaily.invalid ||\n this.maxSpotsPerStripForOneHourToTwoHoursDaily.invalid ||\n this.maxSpotsPerStripForMoreThanTwoHourDaily.invalid ||\n this.maxSpotsPerHalfAnHourInStripProgramWeekly.invalid ||\n this.maxSpotsPerStripHalfHourToOneHourWeekly.invalid ||\n this.maxSpotsPerStripForOneHourToTwoHoursWeekly.invalid ||\n this.maxSpotsPerStripForMoreThanTwoHourWeekly.invalid ||\n this.maxSpotsPerHalfAnHourInStripProgramDaily.value.preApproved >\n this.maxSpotsPerHalfAnHourInStripProgramWeekly.value.preApproved ||\n this.maxSpotsPerStripForHalfHourToOneHourDaily.value.preApproved >\n this.maxSpotsPerStripHalfHourToOneHourWeekly.value.preApproved ||\n this.maxSpotsPerStripForOneHourToTwoHoursDaily.value.preApproved >\n this.maxSpotsPerStripForOneHourToTwoHoursWeekly.value.preApproved ||\n this.maxSpotsPerStripForMoreThanTwoHourDaily.value.preApproved >\n this.maxSpotsPerStripForMoreThanTwoHourWeekly.value.preApproved ||\n this.maxSpotsPerHalfAnHourInStripProgramDaily.value.relaxed >\n this.maxSpotsPerHalfAnHourInStripProgramWeekly.value.relaxed ||\n this.maxSpotsPerStripForHalfHourToOneHourDaily.value.relaxed >\n this.maxSpotsPerStripHalfHourToOneHourWeekly.value.relaxed ||\n this.maxSpotsPerStripForOneHourToTwoHoursDaily.value.relaxed >\n this.maxSpotsPerStripForOneHourToTwoHoursWeekly.value.relaxed ||\n this.maxSpotsPerStripForMoreThanTwoHourDaily.value.relaxed >\n this.maxSpotsPerStripForMoreThanTwoHourWeekly.value.relaxed ||\n this.minSeperationTimeControl.invalid;\n\n return isInvalid;\n }\n\n formValueChanged() {\n this.generalRules = cloneDeep(this.generalRules);\n this.generalRuleChange.emit(this.generalRules);\n }\n\n onContainerScroll() {\n const elements = document.getElementsByClassName(\"tooltip\");\n while (elements.length > 0) {\n elements[0].remove();\n }\n }\n\n setMessageBoxData() {\n const msg = `<b>Standard rules</b> will not need your approval. <b>Relaxed rules</b> should be set for offering MGs that need your approval.`;\n const iconClass = \"mdi mdi-information\";\n this.generalRulesMessageBoxData = new MessageBoxData(\n null,\n msg,\n iconClass,\n `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm mg-adu-rule`,\n );\n }\n\n initializeTimeFormatControl() {\n const timeString = this.generalRules?.advertiserSeperation?.advertiserSeparationValue?.Current;\n this.selectedMinSeparationTime = timeString ? this.convertToTimeObject(timeString) : null;\n this.minSeperationTimeControl = new FormControl(\n this.generalRules?.advertiserSeperation?.advertiserSeparationValue?.Current,\n [this.timeFormatValidator()],\n );\n }\n\n convertToTimeObject(time: string): { hour: number; minute: number; second: number } | null {\n if (!time) {\n return null;\n }\n const timeArr = time.split(\":\");\n return timeArr.length === 3\n ? {\n hour: parseInt(timeArr[0], 10),\n minute: parseInt(timeArr[1], 10),\n second: parseInt(timeArr[2], 10),\n }\n : null;\n }\n\n getStringValueOfOrderMinSeparation(time: { hour: number; minute: number; second: number } | null): string {\n if (!time) {\n return \"\";\n }\n let stringTime = \"\";\n stringTime = this.addZeroToTimeValue(stringTime, time.hour, true);\n stringTime += this.addZeroToTimeValue(stringTime, time.minute, true);\n stringTime += this.addZeroToTimeValue(stringTime, time.second, false);\n return stringTime;\n }\n\n addZeroToTimeValue(currentFormattedTime: string, value: number, addColon: boolean): string {\n let updatedFormattedTime = value < 10 ? `0${value}` : value.toString();\n if (addColon) {\n updatedFormattedTime = `${updatedFormattedTime}:`;\n }\n return updatedFormattedTime;\n }\n\n updateMinSeparationTime(time: { hour: number; minute: number; second: number } | null) {\n if (time) {\n const timeString = this.getStringValueOfOrderMinSeparation(time);\n this.selectedMinSeparationTime = time;\n this.minSeperationTimeControl.setValue(timeString, { emitEvent: false });\n this.generalRules.advertiserSeperation.advertiserSeparationValue.Current = timeString;\n this.minSeperationTimeControl.updateValueAndValidity();\n this.formValueChanged();\n } else {\n this.selectedMinSeparationTime = null;\n this.minSeperationTimeControl.setValue(\"\", { emitEvent: false });\n this.generalRules.advertiserSeperation.advertiserSeparationValue.Current = \"\";\n this.minSeperationTimeControl.updateValueAndValidity();\n this.formValueChanged();\n }\n }\n\n focusOnHourValue() {\n if (document.activeElement.tagName === \"BODY\") {\n (document.querySelector(\".ngb-tp-hour input.ngb-tp-input\") as HTMLElement)?.focus();\n }\n }\n\n timeFormatValidator(): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const isAdvSeperationRequired =\n this.generalRules?.advertiserSeperation?.isAdvertiserSeparationNeeded?.Current;\n const isAdvSeperationValueEmpty =\n !control.value || (typeof control.value === \"string\" && control.value.trim() === \"\");\n if (isAdvSeperationRequired && isAdvSeperationValueEmpty) {\n return { required: true };\n }\n\n if (!isAdvSeperationRequired && isAdvSeperationValueEmpty) {\n return null;\n }\n\n if (isAdvSeperationRequired && !isAdvSeperationValueEmpty) {\n const value = String(control.value);\n\n // Check if value contains placeholder segments\n if (value.includes(\"HH\") || value.includes(\"MM\") || value.includes(\"SS\")) {\n return { invalidTimeFormat: true };\n }\n\n const timePattern = /^([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n\n if (!timePattern.test(value)) {\n return { invalidTimeFormat: true };\n }\n }\n return null;\n };\n }\n}\n","<section\n [ngClass]=\"{\n 'highlight-changes': highlightChanges,\n 'read-mode-inputs': !editMode,\n 'edit-mode-inputs': editMode\n }\"\n>\n <anna-design-message-box [messageBoxData]=\"generalRulesMessageBoxData\"></anna-design-message-box>\n <div\n id=\"scroll-container-general\"\n class=\"table-container\"\n (scroll)=\"onContainerScroll()\"\n >\n <table>\n <thead>\n <tr class=\"header-row\">\n <th class=\"rule-no\">{{ GeneralRulesTableHeader.RULE_NUMBER }}</th>\n <th class=\"biz-rule\">{{ GeneralRulesTableHeader.BUSINESS_RULES }}</th>\n <th class=\"yes-no\">YES/NO</th>\n <th class=\"standard-rule\">{{ GeneralRulesTableHeader.STANDARD_RULE }}</th>\n <th class=\"relaxed-rule\">{{ GeneralRulesTableHeader.RELAXED_RULE }}</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"valign-top\">\n <section>1</section>\n </td>\n <td class=\"valign-top\">\n <section>\n {{ GeneralBusinessRulesConstant.measurementAgency }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"measurementAgencyTooltip\"\n placement=\"auto\"\n ></i>\n </section>\n </td>\n <td></td>\n <td\n class=\"valign-top\"\n colspan=\"2\"\n class=\"single-block\"\n >\n <section>\n <ng-container *ngIf=\"editMode\">\n <anna-design-single-select\n [ngClass]=\"{\n 'orange-background':\n highlightChanges && generalRules.measurementAgencyBizRule.isChanged\n }\"\n class=\"posting-type-general-rule-dropdown\"\n [config]=\"measurementAgencyDropdownConfig\"\n [disabled]=\"generalRules.measurementAgencyBizRule.disableMeasurementAgencyDropdown\"\n [items]=\"generalRules.measurementAgencyBizRule.measurementAgencyDropdownData\"\n [selectedItem]=\"selectedMeasurementAgency\"\n (valueChanged)=\"onMeasurementAgencyChanged($event)\"\n ></anna-design-single-select>\n <i\n *ngIf=\"generalRules.measurementAgencyBizRule.disableMeasurementAgencyDropdown\"\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"disableMeasurementAgencyAndPostingTypeTooltip\"\n placement=\"auto\"\n ></i>\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ selectedMeasurementAgency?.text }}\n </ng-container>\n <ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && generalRules.measurementAgencyBizRule?.isChanged\"\n ></div>\n </ng-container>\n </section>\n </td>\n </tr>\n <tr>\n <td class=\"valign-top\">\n <section>2</section>\n </td>\n <td class=\"valign-top\">\n <section>\n {{ GeneralBusinessRulesConstant.postingType }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"postingTypeTooltip\"\n placement=\"auto\"\n ></i>\n </section>\n </td>\n <td></td>\n <td\n class=\"valign-top\"\n colspan=\"2\"\n class=\"single-block\"\n >\n <section>\n <ng-container *ngIf=\"editMode\">\n <anna-design-single-select\n [ngClass]=\"{\n 'orange-background':\n highlightChanges && generalRules.postingTypeBusinessRule.isChanged\n }\"\n class=\"posting-type-general-rule-dropdown\"\n [config]=\"postingTypeDropdownConfig\"\n [disabled]=\"generalRules.postingTypeBusinessRule.disablePostingTypeDropdown\"\n [items]=\"generalRules.postingTypeBusinessRule.postingTypesDropdownData\"\n [selectedItem]=\"selectedPostedType\"\n (valueChanged)=\"onPostingTypeChanged($event)\"\n ></anna-design-single-select>\n <i\n *ngIf=\"generalRules.postingTypeBusinessRule.disablePostingTypeDropdown\"\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"disableMeasurementAgencyAndPostingTypeTooltip\"\n placement=\"auto\"\n ></i>\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ selectedPostedType?.text }}\n </ng-container>\n <ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"highlightChanges && generalRules.postingTypeBusinessRule.isChanged\"\n ></div>\n </ng-container>\n </section>\n </td>\n </tr>\n <tr class=\"advertiser-separation-row\">\n <td>3</td>\n <td>\n <section>\n {{ GeneralBusinessRulesConstant.advertiserSeparation }}\n <i\n class=\"mdi mdi-information-outline biz-rule-icon\"\n [ngbTooltip]=\"advertiserSeparationTooltip\"\n placement=\"auto\"\n ></i>\n </section>\n </td>\n <td>\n <section>\n <anna-design-toggle\n *ngIf=\"editMode\"\n [isToggled]=\"generalRules?.advertiserSeperation?.isAdvertiserSeparationNeeded?.Current\"\n (toggle)=\"isAdvertiserSeparationNeededChanged()\"\n [isDisabled]=\"disableAdvertiserSeparation\"\n >\n </anna-design-toggle>\n <ng-container *ngIf=\"!editMode\">\n {{\n generalRules?.advertiserSeperation?.isAdvertiserSeparationNeeded?.Current\n ? \"Yes\"\n : \"No\"\n }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules?.advertiserSeperation?.isAdvertiserSeparationNeeded?.IsChanged\n \"\n ></div>\n </section>\n </td>\n <td colspan=\"2\">\n <section>\n <div\n class=\"d-flex\"\n *ngIf=\"generalRules?.advertiserSeperation?.isAdvertiserSeparationNeeded?.Current\"\n >\n <ng-container *ngIf=\"editMode\">\n <div\n #timepickerContainer\n class=\"min-time-container\"\n [ngClass]=\"{\n 'input-error': minSeperationTimeControl.invalid\n }\"\n (click)=\"focusOnHourValue()\"\n >\n <ngb-timepicker\n #timepicker\n class=\"min-time\"\n [ngModel]=\"selectedMinSeparationTime\"\n [seconds]=\"true\"\n [spinners]=\"false\"\n [size]=\"'small'\"\n [readonlyInputs]=\"disableAdvertiserSeparation\"\n (ngModelChange)=\"updateMinSeparationTime($event)\"\n />\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules?.advertiserSeperation?.advertiserSeparationValue?.Current }}\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules?.advertiserSeperation?.advertiserSeparationValue?.IsChanged\n \"\n ></div>\n </div>\n </section>\n </td>\n </tr>\n <tr>\n <td class=\"valign-top\">\n <section>4</section>\n </td>\n\n <td class=\"valign-top\">\n <section>\n <span [innerHTML]=\"GeneralBusinessRulesConstant.maxSpotsPerHalfHourInOTO\"></span>\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"halfHourRuleTooltip\"\n placement=\"top\"\n ></i>\n </section>\n </td>\n <td></td>\n <td>\n <section>\n <form [formGroup]=\"maxSpotsPerHalfAnHourInOto\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.IsChanged,\n 'input-error':\n maxSpotsPerHalfAnHourInOto.controls.preApproved.errors ||\n maxSpotsPerHalfAnHourInOto.controls.preApproved.value == null\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n (input)=\"onMaxSpotsAllowedPerHalfAnHourInOTOPreapprovedChanged($event)\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.IsChanged\n \"\n ></div>\n </form>\n </section>\n </td>\n <td>\n <section>\n <form [formGroup]=\"maxSpotsPerHalfAnHourInOto\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.IsChanged,\n 'input-error':\n maxSpotsPerHalfAnHourInOto.controls.relaxed.errors ||\n maxSpotsPerHalfAnHourInOto.controls.relaxed.value == null\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n (input)=\"onMaxSpotsAllowedPerHalfAnHourInOTORRelaxedChanged($event)\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current }}\n </ng-container>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerHalfAnHourInOto.controls.relaxed.errors?.relaxedValidation ||\n maxSpotsPerHalfAnHourInOto.controls.relaxed.errors?.required ||\n maxSpotsPerHalfAnHourInOto.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"needRelaxedRuleToBeGreater\"\n ></i>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.IsChanged\n \"\n ></div>\n </form>\n </section>\n </td>\n </tr>\n <tr class=\"grey-bg\">\n <td class=\"valign-top\">\n <section>4a.</section>\n </td>\n\n <td class=\"valign-top\">\n <section class=\"max-spots-header\">\n <span\n >Max spots allowed <b>per OTO Program</b> for the following durations\n <span class=\"grey-text\">(includes booked spots, MG and ADU offers)</span>\n <i\n class=\"mi mdi-info-outline biz-rule-icon sub-rule-info-icon\"\n [ngbTooltip]=\"programLimitTooltip\"\n placement=\"top\"\n ></i\n ></span>\n </section>\n </td>\n <td></td>\n <td\n colspan=\"2\"\n class=\"single-block\"\n >\n <section class=\"empty-block\"></section>\n </td>\n </tr>\n <tr>\n <td>\n <section class=\"empty-block\"></section>\n </td>\n\n <td class=\"valign-top\">\n <section class=\"pl-16 pt-15\">\n {{ GeneralBusinessRulesConstant.thirtyMinToOneHourDuration }}\n </section>\n <section class=\"pl-16 pt-15\">\n {{ GeneralBusinessRulesConstant.oneHourToTwoHoursDuration }}\n </section>\n <section class=\"pl-16 pt-15\">\n {{ GeneralBusinessRulesConstant.twoHoursToThreeHoursDuration }}\n </section>\n <section class=\"pl-16 pt-15\">\n {{ GeneralBusinessRulesConstant.moreThanThreeHourDuration }}\n </section>\n </td>\n <td></td>\n <td class=\"valign-top\">\n <section class=\"pt-15\">\n <form [formGroup]=\"maxSpotsPerOTOProgForHalfHourToOneHour\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.preApproved\n .IsChanged,\n\n 'input-error':\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.preApproved.errors ||\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.preApproved.value ==\n null,\n warning:\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current &&\n generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.preApproved\n .Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved\n .Current *\n 2\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.preApproved.Current }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current &&\n generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.preApproved.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current * 2\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.preApproved.IsChanged\n \"\n ></div>\n </form>\n </section>\n <section class=\"pt-15\">\n <form [formGroup]=\"maxSpotsPerOTOProgForOneHourToTwoHours\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.preApproved\n .IsChanged,\n\n 'input-error':\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.preApproved.errors ||\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.preApproved.value ==\n null,\n warning:\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current &&\n generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.preApproved.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved\n .Current *\n 4\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.preApproved.Current }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current &&\n generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.preApproved.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current * 4\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.preApproved.IsChanged\n \"\n ></div>\n </form>\n </section>\n <section class=\"pt-15\">\n <form [formGroup]=\"maxSpotsPerOTOProgForTwoHoursToThreeHours\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.preApproved\n .IsChanged,\n\n 'input-error':\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.preApproved.errors ||\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.preApproved.value ==\n null,\n warning:\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current &&\n generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.preApproved\n .Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved\n .Current *\n 6\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.preApproved.Current }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current &&\n generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.preApproved.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current * 6\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.preApproved.IsChanged\n \"\n ></div>\n </form>\n </section>\n <section class=\"pt-15\">\n <form [formGroup]=\"maxSpotsPerOTOProgForMoreThanThreeHour\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.preApproved\n .IsChanged,\n\n 'input-error':\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.preApproved.errors ||\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.preApproved.value ==\n null,\n warning:\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current &&\n generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.preApproved\n .Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved\n .Current *\n 8\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.preApproved.Current }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current &&\n generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.preApproved.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.preApproved.Current * 8\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.preApproved.IsChanged\n \"\n ></div>\n </form>\n </section>\n </td>\n <td class=\"valign-top\">\n <section class=\"pt-15\">\n <form [formGroup]=\"maxSpotsPerOTOProgForHalfHourToOneHour\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.relaxed.errors ||\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.relaxed.value == null,\n warning:\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current &&\n generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.relaxed.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current * 2\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.relaxed.Current }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current &&\n generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.relaxed.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current * 2\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.relaxed.errors\n ?.relaxedValidation ||\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.relaxed.errors?.required ||\n maxSpotsPerOTOProgForHalfHourToOneHour.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"needRelaxedRuleToBeGreater\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.halfHourToOneHour.relaxed.IsChanged\n \"\n ></div>\n </form>\n </section>\n <section class=\"pt-15\">\n <form [formGroup]=\"maxSpotsPerOTOProgForOneHourToTwoHours\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.relaxed.errors ||\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.relaxed.value == null,\n warning:\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current &&\n generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.relaxed.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current * 4\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.relaxed.Current }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current &&\n generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.relaxed.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current * 4\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.relaxed.errors\n ?.relaxedValidation ||\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.relaxed.errors?.required ||\n maxSpotsPerOTOProgForOneHourToTwoHours.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"needRelaxedRuleToBeGreater\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.oneHourToTwoHour.relaxed.IsChanged\n \"\n ></div>\n </form>\n </section>\n <section class=\"pt-15\">\n <form [formGroup]=\"maxSpotsPerOTOProgForTwoHoursToThreeHours\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.relaxed\n .IsChanged,\n\n 'input-error':\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.relaxed.errors ||\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.relaxed.value ==\n null,\n warning:\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current &&\n generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.relaxed.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current * 6\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.relaxed.Current }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current &&\n generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.relaxed.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current * 6\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.relaxed.errors\n ?.relaxedValidation ||\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.relaxed.errors?.required ||\n maxSpotsPerOTOProgForTwoHoursToThreeHours.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"needRelaxedRuleToBeGreater\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.twoHoursToThreeHours.relaxed.IsChanged\n \"\n ></div>\n </form>\n </section>\n <section class=\"pt-15\">\n <form [formGroup]=\"maxSpotsPerOTOProgForMoreThanThreeHour\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.relaxed.errors ||\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.relaxed.value == null,\n warning:\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current &&\n generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.relaxed.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current * 8\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n {{ generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.relaxed.Current }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current &&\n generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.relaxed.Current >\n generalRules.maxSpotsAllowedInOTO.perHalfAnHour.relaxed.Current * 8\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.relaxed.errors\n ?.relaxedValidation ||\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.relaxed.errors?.required ||\n maxSpotsPerOTOProgForMoreThanThreeHour.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"needRelaxedRuleToBeGreater\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInOTO.moreThanThreeHours.relaxed.IsChanged\n \"\n ></div>\n </form>\n </section>\n </td>\n </tr>\n <tr>\n <td class=\"valign-top\">\n <section>5</section>\n </td>\n\n <td class=\"valign-top\">\n <section>\n <span [innerHTML]=\"GeneralBusinessRulesConstant.maxSpotsPerHalfHourInStrip\"></span>\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"halfHourRuleTooltip\"\n placement=\"top\"\n ></i>\n </section>\n </td>\n <td></td>\n <td>\n <section class=\"half-hour-strip-section\">\n <div class=\"daily-weekly-container\">\n <div class=\"daily-container\">\n <span *ngIf=\"editMode\">Daily</span>\n <form [formGroup]=\"maxSpotsPerHalfAnHourInStripProgramDaily\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n class=\"form-control\"\n (input)=\"\n onMaxSpotsAllowedPerHalfAnHourInStripDailyPreApprovedChanged($event)\n \"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .preApproved.IsChanged,\n 'input-error':\n maxSpotsPerHalfAnHourInStripProgramDaily.controls.preApproved\n .errors ||\n maxSpotsPerHalfAnHourInStripProgramDaily.controls.preApproved\n .value == null\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Daily:\n {{\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved\n .Current\n }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n <div>\n <span *ngIf=\"editMode\">Weekly</span>\n <form [formGroup]=\"maxSpotsPerHalfAnHourInStripProgramWeekly\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n class=\"form-control\"\n type=\"number\"\n (input)=\"\n onMaxSpotsAllowedPerHalfAnHourInStripWeeklyPreApprovedChanged(\n $event\n )\n \"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .preApproved.IsChanged,\n 'input-error':\n maxSpotsPerHalfAnHourInStripProgramWeekly.controls.preApproved\n .errors ||\n maxSpotsPerHalfAnHourInStripProgramWeekly.controls.preApproved\n .value == null ||\n maxSpotsPerHalfAnHourInStripProgramDaily?.value.preApproved >\n maxSpotsPerHalfAnHourInStripProgramWeekly?.value.preApproved\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Weekly:\n {{\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved\n .Current\n }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved\n .IsChanged\n \"\n ></div>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerHalfAnHourInStripProgramDaily?.value.preApproved >\n maxSpotsPerHalfAnHourInStripProgramWeekly?.value.preApproved\n \"\n [ngbTooltip]=\"weeklyValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </div>\n </div>\n </section>\n </td>\n <td>\n <section>\n <div class=\"daily-weekly-container\">\n <div class=\"daily-container\">\n <span *ngIf=\"editMode\">Daily</span>\n <form [formGroup]=\"maxSpotsPerHalfAnHourInStripProgramDaily\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n class=\"form-control\"\n type=\"number\"\n (input)=\"\n onMaxSpotsAllowedPerHalfAnHourInStripDailyRelaxedChanged($event)\n \"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .IsChanged,\n 'input-error':\n maxSpotsPerHalfAnHourInStripProgramDaily.controls.relaxed\n .errors ||\n maxSpotsPerHalfAnHourInStripProgramDaily.controls.relaxed\n .value == null\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Daily:\n {{ generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed.Current }}\n </ng-container>\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerHalfAnHourInStripProgramDaily.controls.relaxed.errors\n ?.relaxedValidation ||\n maxSpotsPerHalfAnHourInStripProgramDaily.controls.relaxed.errors\n ?.required ||\n maxSpotsPerHalfAnHourInStripProgramDaily.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"dailyBuyerApprovalGreater\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed.IsChanged\n \"\n ></div>\n </form>\n </div>\n <div>\n <span *ngIf=\"editMode\">Weekly</span>\n <form [formGroup]=\"maxSpotsPerHalfAnHourInStripProgramWeekly\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n class=\"form-control\"\n type=\"number\"\n (input)=\"\n onMaxSpotsAllowedPerHalfAnHourInStripWeeklyRelaxedChanged($event)\n \"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .IsChanged,\n 'input-error':\n maxSpotsPerHalfAnHourInStripProgramWeekly.controls.relaxed\n .errors ||\n maxSpotsPerHalfAnHourInStripProgramWeekly.controls.relaxed\n .value == null ||\n maxSpotsPerHalfAnHourInStripProgramDaily.value.relaxed >\n maxSpotsPerHalfAnHourInStripProgramWeekly.value.relaxed\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Weekly:\n {{\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed.Current\n }}\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .IsChanged\n \"\n ></div>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerHalfAnHourInStripProgramDaily.value.relaxed >\n maxSpotsPerHalfAnHourInStripProgramWeekly.value.relaxed &&\n !maxSpotsPerHalfAnHourInStripProgramWeekly.controls.relaxed.errors\n ?.relaxedValidation\n \"\n [ngbTooltip]=\"weeklyValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerHalfAnHourInStripProgramWeekly.controls.relaxed.errors\n ?.relaxedValidation &&\n !(\n maxSpotsPerHalfAnHourInStripProgramDaily.value.relaxed >\n maxSpotsPerHalfAnHourInStripProgramWeekly.value.relaxed\n )\n \"\n [ngbTooltip]=\"weeklyNeedBuyerApprovalValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n (maxSpotsPerHalfAnHourInStripProgramDaily.value.relaxed >\n maxSpotsPerHalfAnHourInStripProgramWeekly.value.relaxed &&\n maxSpotsPerHalfAnHourInStripProgramWeekly.controls.relaxed.errors\n ?.relaxedValidation) ||\n maxSpotsPerHalfAnHourInStripProgramWeekly.controls.relaxed.errors\n ?.min ||\n maxSpotsPerHalfAnHourInStripProgramWeekly.controls.relaxed.errors\n ?.required\n \"\n [ngbTooltip]=\"\n weeklyNeedBuyerApprovalValueGreaterThanDailyAndWeeklyValueGreaterThanDaily\n \"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </div>\n </div>\n </section>\n </td>\n </tr>\n <tr class=\"white-bg\">\n <td class=\"valign-top\">\n <section>5a.</section>\n </td>\n\n <td class=\"valign-top\">\n <section class=\"max-spots-header\">\n <span>\n Max spots allowed <b>per Strip Program</b> for the following durations\n <span class=\"grey-text\">(includes booked spots, MG and ADU offers)</span>\n <i\n class=\"mi mdi-info-outline biz-rule-icon sub-rule-info-icon\"\n [ngbTooltip]=\"programLimitTooltip\"\n placement=\"top\"\n ></i>\n </span>\n </section>\n </td>\n <td></td>\n <td\n colspan=\"2\"\n class=\"single-block\"\n >\n <section class=\"empty-block\"></section>\n </td>\n </tr>\n <tr>\n <td>\n <section class=\"empty-block\"></section>\n </td>\n\n <td class=\"valign-top\">\n <div\n *ngIf=\"editMode\"\n class=\"empty-block-header\"\n ></div>\n <section class=\"pl-16 pt-15\">\n {{ GeneralBusinessRulesConstant.thirtyMinToOneHourDuration }}\n </section>\n <section class=\"pl-16 pt-15\">\n {{ GeneralBusinessRulesConstant.oneHourToTwoHoursDuration }}\n </section>\n <section class=\"pl-16 pt-15\">\n {{ GeneralBusinessRulesConstant.moreThanTwoHoursDuration }}\n </section>\n </td>\n <td></td>\n <td class=\"pt-0\">\n <div\n *ngIf=\"editMode\"\n class=\"daily-weekly-header\"\n >\n <b>Daily</b>\n <b>Weekly</b>\n </div>\n\n <section class=\"pt-15\">\n <div class=\"daily-weekly-container\">\n <div class=\"daily-container\">\n <form [formGroup]=\"maxSpotsPerStripForHalfHourToOneHourDaily\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour\n .preApproved.IsChanged,\n 'input-error':\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.preApproved\n .errors ||\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.preApproved\n .value == null,\n warning:\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .preApproved.Current &&\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour\n .preApproved.Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .preApproved.Current *\n 2\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Daily:\n {{\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour.preApproved\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour.preApproved\n .Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved\n .Current *\n 2\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour.preApproved\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n <div>\n <form [formGroup]=\"maxSpotsPerStripHalfHourToOneHourWeekly\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour\n .preApproved.IsChanged,\n 'input-error':\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.preApproved\n .errors ||\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.preApproved\n .value == null ||\n maxSpotsPerStripForHalfHourToOneHourDaily.value.preApproved >\n maxSpotsPerStripHalfHourToOneHourWeekly.value.preApproved,\n warning:\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .preApproved.Current &&\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour\n .preApproved.Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .preApproved.Current *\n 2 &&\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.preApproved\n .value != null\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Weekly:\n {{\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour.preApproved\n .Current\n }}\n </ng-container>\n\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour.preApproved\n .Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved\n .Current *\n 2\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForHalfHourToOneHourDaily.value.preApproved >\n maxSpotsPerStripHalfHourToOneHourWeekly.value.preApproved\n \"\n [ngbTooltip]=\"weeklyValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour.preApproved\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n </div>\n </section>\n <section class=\"pt-15\">\n <div class=\"daily-weekly-container\">\n <div class=\"daily-container\">\n <form [formGroup]=\"maxSpotsPerStripForOneHourToTwoHoursDaily\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour\n .preApproved.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.preApproved\n .errors ||\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.preApproved\n .value == null,\n warning:\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .preApproved.Current &&\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour\n .preApproved.Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .preApproved.Current *\n 4\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Daily:\n {{\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour.preApproved\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour.preApproved\n .Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved\n .Current *\n 4\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour.preApproved\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n <div>\n <form [formGroup]=\"maxSpotsPerStripForOneHourToTwoHoursWeekly\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour\n .preApproved.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.preApproved\n .errors ||\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.preApproved\n .value == null ||\n maxSpotsPerStripForOneHourToTwoHoursDaily.value.preApproved >\n maxSpotsPerStripForOneHourToTwoHoursWeekly.value\n .preApproved,\n warning:\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .preApproved.Current &&\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour\n .preApproved.Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .preApproved.Current *\n 4\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Weekly:\n {{\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour.preApproved\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour.preApproved\n .Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved\n .Current *\n 4\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForOneHourToTwoHoursDaily.value.preApproved >\n maxSpotsPerStripForOneHourToTwoHoursWeekly.value.preApproved\n \"\n [ngbTooltip]=\"weeklyValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour.preApproved\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n </div>\n </section>\n <section class=\"pt-15\">\n <div class=\"daily-weekly-container\">\n <div class=\"daily-container\">\n <form [formGroup]=\"maxSpotsPerStripForMoreThanTwoHourDaily\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours\n .preApproved.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.preApproved\n .errors ||\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.preApproved\n .value == null,\n warning:\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .preApproved.Current &&\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours\n .preApproved.Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .preApproved.Current *\n 6\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Daily:\n {{\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours.preApproved\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours.preApproved\n .Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.preApproved\n .Current *\n 6\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours.preApproved\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n <div>\n <form [formGroup]=\"maxSpotsPerStripForMoreThanTwoHourWeekly\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours\n .preApproved.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.preApproved\n .errors ||\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.preApproved\n .value == null ||\n maxSpotsPerStripForMoreThanTwoHourDaily.value.preApproved >\n maxSpotsPerStripForMoreThanTwoHourWeekly.value.preApproved,\n warning:\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .preApproved.Current &&\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours\n .preApproved.Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .preApproved.Current *\n 6\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Weekly:\n {{\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours.preApproved\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.preApproved.value &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours.preApproved\n .Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.preApproved\n .Current *\n 6\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForMoreThanTwoHourDaily.value.preApproved >\n maxSpotsPerStripForMoreThanTwoHourWeekly.value.preApproved\n \"\n [ngbTooltip]=\"weeklyValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours.preApproved\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n </div>\n </section>\n </td>\n <td class=\"pt-0\">\n <div\n *ngIf=\"editMode\"\n class=\"daily-weekly-header\"\n >\n <b>Daily</b>\n <b>Weekly</b>\n </div>\n\n <section class=\"pt-15\">\n <div class=\"daily-weekly-container\">\n <div class=\"daily-container\">\n <form [formGroup]=\"maxSpotsPerStripForHalfHourToOneHourDaily\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour\n .relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.relaxed\n .errors ||\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.relaxed\n .value == null,\n warning:\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour\n .relaxed.Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .relaxed.Current *\n 2\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Daily:\n {{\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour.relaxed\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour.relaxed\n .Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current *\n 2\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.relaxed.errors\n ?.relaxedValidation ||\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.relaxed.errors\n ?.required ||\n maxSpotsPerStripForHalfHourToOneHourDaily.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"dailyBuyerApprovalGreater\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.halfHourToOneHour.relaxed\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n <div>\n <form [formGroup]=\"maxSpotsPerStripHalfHourToOneHourWeekly\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour\n .relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.relaxed\n .errors ||\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.relaxed\n .value == null ||\n maxSpotsPerStripForHalfHourToOneHourDaily.value.relaxed >\n maxSpotsPerStripHalfHourToOneHourWeekly.value.relaxed,\n warning:\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour\n .relaxed.Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .relaxed.Current *\n 2\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Weekly:\n {{\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour.relaxed\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour.relaxed\n .Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current *\n 2\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.halfHourToOneHour.relaxed\n .IsChanged\n \"\n ></div>\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForHalfHourToOneHourDaily.value.relaxed >\n maxSpotsPerStripHalfHourToOneHourWeekly.value.relaxed &&\n !maxSpotsPerStripHalfHourToOneHourWeekly.controls.relaxed.errors\n ?.relaxedValidation\n \"\n [ngbTooltip]=\"weeklyValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.relaxed.errors\n ?.relaxedValidation &&\n !(\n maxSpotsPerStripForHalfHourToOneHourDaily.value.relaxed >\n maxSpotsPerStripHalfHourToOneHourWeekly.value.relaxed\n )\n \"\n [ngbTooltip]=\"weeklyNeedBuyerApprovalValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n (maxSpotsPerStripForHalfHourToOneHourDaily.value.relaxed >\n maxSpotsPerStripHalfHourToOneHourWeekly.value.relaxed &&\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.relaxed.errors\n ?.relaxedValidation) ||\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.relaxed.errors?.min ||\n maxSpotsPerStripHalfHourToOneHourWeekly.controls.relaxed.errors\n ?.required\n \"\n [ngbTooltip]=\"\n weeklyNeedBuyerApprovalValueGreaterThanDailyAndWeeklyValueGreaterThanDaily\n \"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </div>\n </div>\n </section>\n <section class=\"pt-15\">\n <div class=\"daily-weekly-container\">\n <div class=\"daily-container\">\n <form [formGroup]=\"maxSpotsPerStripForOneHourToTwoHoursDaily\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour\n .relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.relaxed\n .errors ||\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.relaxed\n .value == null,\n warning:\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour\n .relaxed.Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .relaxed.Current *\n 4\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Daily:\n {{\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour.relaxed\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour.relaxed\n .Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current *\n 4\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.relaxed.errors\n ?.relaxedValidation ||\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.relaxed.errors\n ?.required ||\n maxSpotsPerStripForOneHourToTwoHoursDaily.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"dailyBuyerApprovalGreater\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.oneHourToTwoHour.relaxed\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n <div>\n <form [formGroup]=\"maxSpotsPerStripForOneHourToTwoHoursWeekly\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour\n .relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.relaxed\n .errors ||\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.relaxed\n .value == null ||\n maxSpotsPerStripForOneHourToTwoHoursDaily.value.relaxed >\n maxSpotsPerStripForOneHourToTwoHoursWeekly.value.relaxed,\n warning:\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour\n .relaxed.Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .relaxed.Current *\n 4\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Weekly:\n {{\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour.relaxed\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour.relaxed\n .Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current *\n 4\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.oneHourToTwoHour.relaxed\n .IsChanged\n \"\n ></div>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForOneHourToTwoHoursDaily.value.relaxed >\n maxSpotsPerStripForOneHourToTwoHoursWeekly.value.relaxed &&\n !maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.relaxed.errors\n ?.relaxedValidation\n \"\n [ngbTooltip]=\"weeklyValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.relaxed.errors\n ?.relaxedValidation &&\n !(\n maxSpotsPerStripForOneHourToTwoHoursDaily.value.relaxed >\n maxSpotsPerStripForOneHourToTwoHoursWeekly.value.relaxed\n )\n \"\n [ngbTooltip]=\"weeklyNeedBuyerApprovalValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n (maxSpotsPerStripForOneHourToTwoHoursDaily.value.relaxed >\n maxSpotsPerStripForOneHourToTwoHoursWeekly.value.relaxed &&\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.relaxed.errors\n ?.relaxedValidation) ||\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.relaxed.errors\n ?.min ||\n maxSpotsPerStripForOneHourToTwoHoursWeekly.controls.relaxed.errors\n ?.required\n \"\n [ngbTooltip]=\"\n weeklyNeedBuyerApprovalValueGreaterThanDailyAndWeeklyValueGreaterThanDaily\n \"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </div>\n </div>\n </section>\n <section class=\"pt-15\">\n <div class=\"daily-weekly-container\">\n <div class=\"daily-container\">\n <form [formGroup]=\"maxSpotsPerStripForMoreThanTwoHourDaily\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours\n .relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.relaxed\n .errors ||\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.relaxed\n .value == null,\n warning:\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours\n .relaxed.Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour\n .relaxed.Current *\n 6\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Daily:\n {{\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours.relaxed\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours.relaxed\n .Current >\n generalRules.maxSpotsAllowedInStripDaily.perHalfAnHour.relaxed\n .Current *\n 6\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.relaxed.errors\n ?.relaxedValidation ||\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.relaxed.errors\n ?.required ||\n maxSpotsPerStripForMoreThanTwoHourDaily.controls.relaxed.errors?.min\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"dailyBuyerApprovalGreater\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripDaily.moreThanTwoHours.relaxed\n .IsChanged\n \"\n ></div>\n </form>\n </div>\n <div>\n <form [formGroup]=\"maxSpotsPerStripForMoreThanTwoHourWeekly\">\n <ng-container *ngIf=\"editMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n class=\"form-control\"\n type=\"number\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours\n .relaxed.IsChanged,\n\n 'input-error':\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.relaxed\n .errors ||\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.relaxed\n .value == null ||\n maxSpotsPerStripForMoreThanTwoHourDaily.value.relaxed >\n maxSpotsPerStripForMoreThanTwoHourWeekly.value.relaxed,\n warning:\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours\n .relaxed.Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour\n .relaxed.Current *\n 6\n }\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"!editMode\">\n Weekly:\n {{\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours.relaxed\n .Current\n }}\n </ng-container>\n <i\n class=\"mdi warning-icon mdi-alert\"\n *ngIf=\"\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.relaxed.value &&\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current &&\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours.relaxed\n .Current >\n generalRules.maxSpotsAllowedInStripWeekly.perHalfAnHour.relaxed\n .Current *\n 6\n \"\n placement=\"top auto\"\n container=\"body\"\n [ngbTooltip]=\"valueExceedsDefaultHalfHourRule\"\n ></i>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n highlightChanges &&\n generalRules.maxSpotsAllowedInStripWeekly.moreThanTwoHours.relaxed\n .IsChanged\n \"\n ></div>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForMoreThanTwoHourDaily.value.relaxed >\n maxSpotsPerStripForMoreThanTwoHourWeekly.value.relaxed &&\n !maxSpotsPerStripForMoreThanTwoHourWeekly.controls.relaxed.errors\n ?.relaxedValidation\n \"\n [ngbTooltip]=\"weeklyValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.relaxed.errors\n ?.relaxedValidation &&\n !(\n maxSpotsPerStripForMoreThanTwoHourDaily.value.relaxed >\n maxSpotsPerStripForMoreThanTwoHourWeekly.value.relaxed\n )\n \"\n [ngbTooltip]=\"weeklyNeedBuyerApprovalValueGreaterThanDaily\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n (maxSpotsPerStripForMoreThanTwoHourDaily.value.relaxed >\n maxSpotsPerStripForMoreThanTwoHourWeekly.value.relaxed &&\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.relaxed.errors\n ?.relaxedValidation) ||\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.relaxed.errors?.min ||\n maxSpotsPerStripForMoreThanTwoHourWeekly.controls.relaxed.errors\n ?.required\n \"\n [ngbTooltip]=\"\n weeklyNeedBuyerApprovalValueGreaterThanDailyAndWeeklyValueGreaterThanDaily\n \"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </div>\n </div>\n </section>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</section>\n\n<ng-template #halfHourRuleTooltip>\n <ul>\n <li>The values set here will determine the default limits for various program durations.</li>\n <li>\n A buffer period of up to 7 minutes is allowed in the program duration limit. For example, if a program’s\n length is 1:07:00, it will be restricted to spots specified for the duration 30 min - 1 hour.\n </li>\n </ul>\n</ng-template>\n\n<ng-template #programLimitTooltip>\n Customize max spots for various program durations to prioritize your preferences over the default half hour rule.\n</ng-template>\n\n<ng-template #disableMeasurementAgencyAndPostingTypeTooltip>\n This business rule is locked for edits because the order is no longer in the upcoming state. The selected setting\n will remain in effect for the entire flight period.\n</ng-template>\n<ng-template #valueExceedsDefaultHalfHourRule> The value exceeds the equivalent half-hour rule. </ng-template>\n\n<ng-template #needRelaxedRuleToBeGreater>\n The Relaxed value has to be greater than or equal to the Standard value.\n</ng-template>\n\n<ng-template #weeklyValueGreaterThanDaily>\n The Weekly values have to be greater than or equal to the Daily values.\n</ng-template>\n\n<ng-template #weeklyNeedBuyerApprovalValueGreaterThanDailyAndWeeklyValueGreaterThanDaily>\n <ul>\n <li>The Weekly values have to be greater than or equal to the Daily values.</li>\n <li>The Weekly Relaxed value has to be greater than or equal to the Weekly Standard value.</li>\n </ul>\n</ng-template>\n\n<ng-template #dailyBuyerApprovalGreater>\n The Daily Relaxed value has to be greater than or equal to the Daily Standard value.\n</ng-template>\n\n<ng-template #weeklyNeedBuyerApprovalValueGreaterThanDaily>\n The Weekly Relaxed value has to be greater than or equal to the Weekly Standard value.\n</ng-template>\n<ng-template #measurementAgencyTooltip>\n Specifies the audience reporting agency for posted data. The posted data and audience estimates will be mapped to\n all applicable orders and spots based on the chosen agency.\n</ng-template>\n<ng-template #postingTypeTooltip>\n <ul>\n <li>\n Live + Same Day, Live + 1, Live + 3 and Live + 7 are all ways Nielsen measures time-shifted viewing. They\n represent different windows of time after the original broadcast when Nielsen considers a viewer's\n engagement with a program to still count towards its overall audience numbers.\n </li>\n <li>\n If you choose \"Live + 1\", ANNA will consider only Live + 1 posted data for all offers, posted information\n and reports.\n </li>\n </ul>\n</ng-template>\n\n<ng-template #advertiserSeparationTooltip>\n Specifies the minimum separation between two spots of the same advertiser.\n</ng-template>\n","import { NgClass, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { AnnaCoreModule, AnnaGlobalConfigService } from \"@annalib/anna-core\";\nimport {\n AnnaDesignComponentsLibModule,\n GenericMessageBoxTheme,\n MessageBoxData,\n} from \"@annalib/anna-design-components-lib\";\nimport { NgbTooltip } from \"@ng-bootstrap/ng-bootstrap\";\nimport { debounceTime } from \"rxjs/operators\";\n\nimport {\n AllowedInventoryOrTimeWindow,\n MakeGoodRulesResponse,\n PopulateListDropdown,\n} from \"../business-rule-page/models/business-rule.model\";\nimport { BusinessPageType } from \"../business-rule-page/models/business-rule-page.constants\";\n// eslint-disable-next-line max-len\nimport { BusinessRuleCommonSIBILogicService } from \"../business-rule-page/services/business-rule-common-SI-BI-logic.service\";\nimport { MGRulesTooltip } from \"./models/make-good-rules.model\";\nimport { relaxedValidation } from \"./validators/relaxedValidation\";\n\n@Component({\n selector: \"anna-feature-make-good-rules\",\n templateUrl: \"./make-good-rules.component.html\",\n styleUrls: [\"./make-good-rules.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n NgIf,\n AnnaDesignComponentsLibModule,\n NgbTooltip,\n FormsModule,\n ReactiveFormsModule,\n AnnaCoreModule,\n ]\n})\nexport class MakeGoodRulesComponent implements OnInit, OnChanges {\n @Input() makeGoodValue: MakeGoodRulesResponse;\n // !!isDisabled use it only for read mode and write mode not to disable dropdown\n @Input() isDisabled: boolean = false;\n @Input() highlightChanges: boolean = false;\n @Input() editMode: boolean;\n @Input() hideRulesTooltipInfo: boolean = false;\n @Input() mgTabSelected: boolean = false;\n @Input() minimumSeparation: string;\n @Input() businessRulePageType: BusinessPageType = null;\n\n @Input() isTrafficAnnaOrder: boolean = false;\n @Input() showMinimumSeparationInMessage: boolean = false;\n @Output() makeGoodValueChange = new EventEmitter();\n\n showWarningIconOfSettingMinPercentRating: boolean = false;\n // readonly maxPercentage = 100;\n // readonly minPercentage = 1;\n // readonly minValue = 1;\n oldMinRatingFormPreApprovedValue: number | any;\n\n // maxSpotsOto: FormGroup;\n // maxSpotsStripeDaily: FormGroup;\n // maxSpotsStripeWeekly: FormGroup;\n maxGrpForm: FormGroup;\n maxPercentGrpForm: FormGroup;\n minRatingForm: FormGroup;\n maxPESpotsToBeGroupedForm: FormGroup;\n // minPreemptedRatingForm: FormGroup;\n ratingRangeForMg: FormGroup;\n\n secondHeading = \"Relaxed\";\n firstHeading = \"Standard\";\n\n selectedProgrammingChangesPreApproved: PopulateListDropdown = null;\n selectedProgrammingChangesRelaxed: PopulateListDropdown = null;\n\n // dropdownConfig: ICustomSingleSelect;\n programingDropdownHeight: number = 150;\n informationPool: MGRulesTooltip;\n\n Math = Math;\n aduAndMgMessageData: MessageBoxData;\n readMode: boolean = true;\n\n readonly MINVALUE = 1;\n readonly MAXVALUE = 100;\n readonly DEBOUNCE_TIME = 10;\n readonly NOT_EMIT_VALUE_CHANGE = { emitEvent: false, onlySelf: false };\n readonly EMIT_VALUE_CHANGE_FOR_PARENT = { emitEvent: false, onlySelf: true };\n\n readonly EQUIVALENT_RATING_PROGRAM = \"Equivalent Ratings Program in Same Daypart\";\n constructor(\n private builder: FormBuilder,\n private businessRuleCommonSIBILogicService: BusinessRuleCommonSIBILogicService,\n private annaGlobalConfig: AnnaGlobalConfigService,\n ) {\n // this.setDropdownConfig();\n this.createAndIntialseAllForm();\n this.getInformationPool();\n }\n\n ngOnInit() {\n this.setMessageData();\n }\n\n setMessageData() {\n // eslint-disable-next-line max-len\n const msg = `If you’ve chosen only the <b>Relaxed</b> rules for approval in the <b>Approvals</b> section, <b>Standard</b> MG offers are automatically approved without your review. Otherwise, all offers require your approval. ANNA utilizes the <b>Standard</b> rule for initial offers and considers the <b>Relaxed</b> rule as a secondary option.${this.showMinimumSeparationInMessage ? `<b><i> Order separation followed for the order is ${this.minimumSeparation} as fetched from WO Traffic.</i></b>` : \"\"}`;\n\n const iconClass = \"mdi mdi-information\";\n this.aduAndMgMessageData = new MessageBoxData(\n null,\n msg,\n iconClass,\n `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm mg-adu-rule`,\n );\n }\n\n getInformationPool() {\n this.informationPool = this.businessRuleCommonSIBILogicService.getInformationDataForMgForm();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.makeGoodValue && changes.makeGoodValue.currentValue) {\n this.resetPreviousSetVariables();\n this.setAllFormValue();\n }\n\n if (changes.isDisabled) {\n this.enableDisableForm();\n this.readMode = this.isDisabled;\n }\n\n // if (changes[\"mgTabSelected\"] != null) {\n // this.scrollToTop();\n // }\n }\n\n scrollToTop() {\n const top = document.getElementById(\"mg-table-first-row\");\n top.scrollIntoView({\n behavior: \"auto\",\n block: \"center\",\n });\n }\n\n resetPreviousSetVariables() {\n this.oldMinRatingFormPreApprovedValue = null;\n }\n\n enableDisableForm() {\n if (this.isDisabled) {\n this.maxGrpForm.disable();\n this.maxPESpotsToBeGroupedForm.disable();\n this.minRatingForm.disable();\n // this.maxSpotsOto.disable();\n // this.maxSpotsStripeDaily.disable();\n // this.maxSpotsStripeWeekly.disable();\n this.maxPercentGrpForm.disable();\n this.ratingRangeForMg.disable();\n } else {\n this.maxGrpForm.enable();\n this.maxPESpotsToBeGroupedForm.enable();\n this.minRatingForm.enable();\n // this.maxSpotsOto.enable();\n // this.maxSpotsStripeDaily.enable();\n // this.maxSpotsStripeWeekly.enable();\n this.maxPercentGrpForm.enable();\n this.ratingRangeForMg.enable();\n }\n }\n\n // !!! doing the same thing multiple times i.e. remove from html\n // 1. min we can do that we won't allow user to type it\n // remove highlightChanges and keep in parent\n // do we need digitOnly when we have inputmode=\"numeric\" pattern=\"[0-9]*\"\n // why value=\"\" is empty?\n // when wechange some form value do we have to call the function to bind it\n createAndIntialseAllForm() {\n const COMMON_VALIDATOR = [Validators.required, Validators.min(this.MINVALUE), Validators.max(this.MAXVALUE)];\n this.maxGrpForm = this.builder.group(\n {\n preApproved: new FormControl(\"\", COMMON_VALIDATOR),\n relaxed: new FormControl(\"\", COMMON_VALIDATOR),\n },\n { validator: relaxedValidation(\"preApproved\", \"relaxed\") },\n );\n\n this.maxPESpotsToBeGroupedForm = this.builder.group(\n {\n preApproved: new FormControl(\"\", COMMON_VALIDATOR),\n relaxed: new FormControl(\"\", COMMON_VALIDATOR),\n },\n { validator: relaxedValidation(\"preApproved\", \"relaxed\") },\n );\n\n this.minRatingForm = this.builder.group({\n preApproved: new FormControl(\"\", COMMON_VALIDATOR),\n relaxed: new FormControl(\"\", COMMON_VALIDATOR),\n });\n\n // this.maxSpotsOto = this.builder.group(\n // {\n // preApproved: new FormControl('', COMMON_VALIDATOR),\n // relaxed: new FormControl('', COMMON_VALIDATOR),\n // },\n // { validator: relaxedValidation('preApproved', 'relaxed') },\n // );\n\n // this.maxSpotsStripeDaily = this.builder.group(\n // {\n // preApproved: new FormControl('', COMMON_VALIDATOR),\n // relaxed: new FormControl('', COMMON_VALIDATOR),\n // },\n // { validator: relaxedValidation('preApproved', 'relaxed') },\n // );\n\n // this.maxSpotsStripeWeekly = this.builder.group(\n // {\n // preApproved: new FormControl('', COMMON_VALIDATOR),\n // relaxed: new FormControl('', COMMON_VALIDATOR),\n // },\n // { validator: relaxedValidation('preApproved', 'relaxed') },\n // );\n\n this.maxPercentGrpForm = this.builder.group({\n preApproved: new FormControl(\"\", COMMON_VALIDATOR),\n });\n\n this.ratingRangeForMg = this.builder.group({\n minimum: new FormControl(\"\", [Validators.required, Validators.min(-25), Validators.max(0)]),\n maximum: new FormControl(\"\", [Validators.required, Validators.min(0), Validators.max(25)]),\n });\n this.subscribeToValueChangeForForm();\n }\n\n subscribeToValueChangeForForm() {\n this.setMaxGrpFormDataOnChange();\n this.setMaxPESpotsToBeGroupedFormDataOnChange();\n this.setMinRatingFormDataOnChange();\n this.setMaxPercentGrpDataOnChange();\n this.setRatingRangeForMgDataOnChange();\n }\n\n setMaxGrpFormDataOnChange() {\n this.maxGrpForm.valueChanges\n .pipe(debounceTime(this.DEBOUNCE_TIME))\n .subscribe((value: { preApproved: number; relaxed: number }) => {\n const newPreapprovedValue = value?.preApproved;\n const newRelaxedValue = value?.relaxed;\n this.makeGoodValue.maxSpotsAllowedForEachSpot.Current = newPreapprovedValue;\n this.makeGoodValue.maxSpotsAllowedForEachSpotRelaxed.Current = newRelaxedValue;\n this.formValueChanged();\n });\n }\n\n setMaxPESpotsToBeGroupedFormDataOnChange() {\n this.maxPESpotsToBeGroupedForm.valueChanges\n .pipe(debounceTime(this.DEBOUNCE_TIME))\n .subscribe((value: { preApproved: number; relaxed: number }) => {\n const newPreapprovedValue = value?.preApproved;\n const newRelaxedValue = value?.relaxed;\n this.makeGoodValue.maxSpotsToBeGrouped.Current = newPreapprovedValue;\n this.makeGoodValue.maxSpotsToBeGroupedRelaxed.Current = newRelaxedValue;\n this.formValueChanged();\n });\n }\n\n maxGRPFormPreapprovedValuChanged(value: number) {\n const newPreapprovedValue = +value;\n if (newPreapprovedValue === 1) {\n this.showWarningIconOfSettingMinPercentRating = true;\n const minRatingVal = this.MAXVALUE;\n this.makeGoodValue.minPercentageRating.Current = minRatingVal;\n this.minRatingForm.get(\"preApproved\").setValue(minRatingVal);\n } else if (newPreapprovedValue > 1) {\n this.showWarningIconOfSettingMinPercentRating = false;\n }\n }\n\n setMinRatingFormDataOnChange() {\n this.minRatingForm.valueChanges\n .pipe(debounceTime(this.DEBOUNCE_TIME))\n .subscribe((value: { preApproved: number; relaxed: number }) => {\n this.makeGoodValue.minPercentageRating.Current = value?.preApproved;\n this.makeGoodValue.minPercentageRatingRelaxed.Current = value?.relaxed;\n if (this.makeGoodValue.minPercentageRating.Current !== 100) {\n this.showWarningIconOfSettingMinPercentRating = false;\n }\n this.formValueChanged();\n });\n }\n\n // setMaxSpotsOtoDataOnChange() {\n // this.maxSpotsOto.valueChanges\n // .pipe(debounceTime(this.DEBOUNCE_TIME))\n // .subscribe((value: { preApproved: number; relaxed: number }) => {\n // this.makeGoodValue.maxSpotsAllowedPerHalfHourInOTO.Current = value?.preApproved;\n // this.makeGoodValue.maxSpotsAllowedPerHalfHourInOTORelaxed.Current = value?.relaxed;\n // this.formValueChanged();\n // });\n // }\n\n // setMaxSpotsStripeDailyDataOnChange() {\n // this.maxSpotsStripeDaily.valueChanges\n // .pipe(debounceTime(this.DEBOUNCE_TIME))\n // .subscribe((value: { preApproved: number; relaxed: number }) => {\n // this.makeGoodValue.maxSpotsAllowedPerHalfHourInStripePerDay.Current = value?.preApproved;\n // this.makeGoodValue.maxSpotsAllowedPerHalfHourInStripePerDayRelaxed.Current = value?.relaxed;\n // this.formValueChanged();\n // });\n // }\n\n // setMaxSpotsStripeWeeklyDataOnChange() {\n // this.maxSpotsStripeWeekly.valueChanges\n // .pipe(debounceTime(this.DEBOUNCE_TIME))\n // .subscribe((value: { preApproved: number; relaxed: number }) => {\n // this.makeGoodValue.maxSpotsAllowedPerHalfHourInStripePerWeek.Current = value?.preApproved;\n // this.makeGoodValue.maxSpotsAllowedPerHalfHourInStripePerWeekRelaxed.Current = value?.relaxed;\n // this.formValueChanged();\n // });\n // }\n\n setMaxPercentGrpDataOnChange() {\n this.maxPercentGrpForm.valueChanges\n .pipe(debounceTime(this.DEBOUNCE_TIME))\n .subscribe((value: { preApproved: number }) => {\n this.makeGoodValue.maxPercentageOfGrpAllowedToMakeGood.Current = value?.preApproved;\n this.formValueChanged();\n });\n }\n\n setRatingRangeForMgDataOnChange() {\n this.ratingRangeForMg.valueChanges\n .pipe(debounceTime(this.DEBOUNCE_TIME))\n .subscribe((value: { minimum: number; maximum: number }) => {\n // range is [-25 to 0 and 0 to 25] and user use arrow button so no need to call getValueToBeInRange()\n this.makeGoodValue.lowerLimitPercentageForProgramChange.Current = value?.minimum;\n this.makeGoodValue.upperLimitPercentageForProgramChange.Current = value?.maximum;\n this.formValueChanged();\n });\n }\n\n resetAllForm() {\n // this.maxSpotsOto.reset();\n // this.maxSpotsStripeDaily.reset();\n // this.maxSpotsStripeWeekly.reset();\n this.maxPercentGrpForm.reset();\n // this.maxSpotsOto.reset();\n this.maxGrpForm.reset();\n this.maxPESpotsToBeGroupedForm.reset();\n this.minRatingForm.reset();\n }\n\n setAllFormValue() {\n this.selectedProgrammingChangesPreApproved =\n this.makeGoodValue.programChangeAllowedInventory.preApproved.filter((x) => x.isSelected)[0];\n this.selectedProgrammingChangesRelaxed = this.makeGoodValue.programChangeAllowedInventory.relaxed.filter(\n (x) => x.isSelected,\n )[0];\n\n // eslint-disable-next-line max-len\n // for preApproved not adding NOT_EMIT_VALUE_CHANGE so that it emits the value and minRatingDisabled var get updated properly.\n this.maxGrpForm.get(\"preApproved\").setValue(this.makeGoodValue.maxSpotsAllowedForEachSpot.Current);\n this.maxGrpForm.get(\"relaxed\").setValue(this.makeGoodValue.maxSpotsAllowedForEachSpotRelaxed.Current);\n\n this.maxPESpotsToBeGroupedForm.get(\"preApproved\").setValue(this.makeGoodValue.maxSpotsToBeGrouped.Current);\n this.maxPESpotsToBeGroupedForm.get(\"relaxed\").setValue(\n this.makeGoodValue.maxSpotsToBeGroupedRelaxed.Current,\n );\n\n this.oldMinRatingFormPreApprovedValue = this.makeGoodValue.minPercentageRating.Current;\n this.minRatingForm.get(\"preApproved\").setValue(this.makeGoodValue.minPercentageRating.Current);\n this.minRatingForm.get(\"relaxed\").setValue(this.makeGoodValue.minPercentageRatingRelaxed.Current);\n\n this.maxPercentGrpForm\n .get(\"preApproved\")\n .setValue(this.makeGoodValue.maxPercentageOfGrpAllowedToMakeGood.Current);\n\n // this.maxSpotsOto.get('preApproved').setValue(this.makeGoodValue.maxSpotsAllowedPerHalfHourInOTO.Current);\n // this.maxSpotsOto.get('relaxed').setValue(this.makeGoodValue.maxSpotsAllowedPerHalfHourInOTORelaxed.Current);\n\n // this.maxSpotsStripeDaily\n // .get('preApproved')\n // .setValue(this.makeGoodValue.maxSpotsAllowedPerHalfHourInStripePerDay.Current);\n // this.maxSpotsStripeDaily\n // .get('relaxed')\n // .setValue(this.makeGoodValue.maxSpotsAllowedPerHalfHourInStripePerDayRelaxed.Current);\n\n // this.maxSpotsStripeWeekly\n // .get('preApproved')\n // .setValue(this.makeGoodValue.maxSpotsAllowedPerHalfHourInStripePerWeek.Current);\n // this.maxSpotsStripeWeekly\n // .get('relaxed')\n // .setValue(this.makeGoodValue.maxSpotsAllowedPerHalfHourInStripePerWeekRelaxed.Current);\n\n this.ratingRangeForMg.get(\"minimum\").setValue(this.makeGoodValue?.lowerLimitPercentageForProgramChange.Current);\n this.ratingRangeForMg.get(\"maximum\").setValue(this.makeGoodValue?.upperLimitPercentageForProgramChange.Current);\n this.formValueChanged();\n }\n\n checkIfAnyFormIsInvalid() {\n const allowedInventoryPreapproved = this.makeGoodValue.allowedInventory.preApproved.filter(\n (n) => n.isSelected,\n )[0]?.inventory;\n const allowedInventoryRelaxed = this.makeGoodValue.allowedInventory.relaxed.filter((n) => n.isSelected)[0]\n ?.inventory;\n const specialDaypartAllowedInventoryPreapproved =\n this.makeGoodValue.specialDaypartAllowedInventory.preApproved.filter((n) => n.isSelected)[0]?.inventory;\n const specialDaypartAllowedInventoryRelaxed = this.makeGoodValue.specialDaypartAllowedInventory.relaxed.filter(\n (n) => n.isSelected,\n )[0]?.inventory;\n const timeWindowPreapproved = this.makeGoodValue.timeWindow.preApproved.filter((n) => n.isSelected)[0]\n ?.inventory;\n const timeWindowRelaxed = this.makeGoodValue.timeWindow.relaxed.filter((n) => n.isSelected)[0]?.inventory;\n\n const programmingChangePreapproved = this.makeGoodValue.programChangeAllowedInventory.preApproved.filter(\n (x) => x.isSelected,\n )[0];\n const programmingChangeRelaxed = this.makeGoodValue.programChangeAllowedInventory.relaxed.filter(\n (x) => x.isSelected,\n )[0];\n const isInvalid =\n this.makeGoodValue.specialDaypartAllowedInventory.isInvalid ||\n this.makeGoodValue.allowedInventory.isInvalid ||\n this.makeGoodValue.timeWindow.isInvalid ||\n this.makeGoodValue.programChangeAllowedInventory.isInvalid ||\n !allowedInventoryPreapproved ||\n !allowedInventoryRelaxed ||\n !specialDaypartAllowedInventoryPreapproved ||\n !specialDaypartAllowedInventoryRelaxed ||\n !timeWindowPreapproved ||\n !timeWindowRelaxed ||\n !programmingChangePreapproved ||\n !programmingChangeRelaxed ||\n // this.maxSpotsOto.invalid ||\n this.maxPercentGrpForm.invalid ||\n // this.maxSpotsStripeDaily.invalid ||\n // this.maxSpotsStripeWeekly.invalid ||\n Math.floor(100 / this.maxGrpForm.value.relaxed) < this.minRatingForm.value.relaxed ||\n Math.floor(100 / this.maxGrpForm.value.preApproved) < this.minRatingForm.value.preApproved ||\n this.maxGrpForm.invalid ||\n this.maxPESpotsToBeGroupedForm.invalid ||\n this.minRatingForm.invalid;\n // this.maxSpotsStripeDaily.invalid ||\n // this.maxSpotsStripeDaily.value.preApproved > this.maxSpotsStripeWeekly.value.preApproved ||\n // this.maxSpotsStripeDaily.value.relaxed > this.maxSpotsStripeWeekly.value.relaxed;\n return isInvalid;\n }\n\n mgAllowedForSpecialDaypart() {\n this.makeGoodValue.isMakeGoodAllowedForSpecialDayparts.Current =\n !this.makeGoodValue.isMakeGoodAllowedForSpecialDayparts.Current;\n this.formValueChanged();\n }\n\n enableGroupingForMg() {\n this.makeGoodValue.enableGrouping.Current = !this.makeGoodValue.enableGrouping.Current;\n this.formValueChanged();\n }\n\n checkPriority(rule: AllowedInventoryOrTimeWindow) {\n const selectedLowPriorityOption = rule.relaxed?.filter((e) => e.isSelected)[0];\n const selectedHighPriorityOption = rule.preApproved?.filter((e) => e.isSelected)[0];\n rule.isInvalid = selectedLowPriorityOption.id < selectedHighPriorityOption.id;\n }\n\n formValueChanged() {\n this.makeGoodValueChange.emit(this.makeGoodValue);\n }\n\n allowThreshold() {\n this.makeGoodValue.isTresholdAllowed.Current = !this.makeGoodValue.isTresholdAllowed.Current;\n this.formValueChanged();\n }\n\n allowWeekdayOnWeekends(value: boolean) {\n this.makeGoodValue.isWeekdayAllowedOnWeekends.Current = value;\n this.formValueChanged();\n }\n\n allowWeekendOnWeekdays(value: boolean) {\n this.makeGoodValue.isWeekdendAllowedOnWeekdays.Current = value;\n this.formValueChanged();\n }\n\n provideOffersBasedOnPreemptionDaysChanged(value: boolean) {\n this.makeGoodValue.provideOffersBasedOnPreemptionDays.Current = value;\n\n if (value && !this.makeGoodValue.disableProvideOffersBasedOnSpecificWeekDaysToggle) {\n this.makeGoodValue.provideOffersBasedOnSpecificWeekDays.Current = false;\n }\n this.formValueChanged();\n }\n provideOffersBasedOnSpecificWeekDaysChanged(value: boolean) {\n if (this.makeGoodValue.disableProvideOffersBasedOnSpecificWeekDaysToggle) {\n return;\n }\n\n this.makeGoodValue.provideOffersBasedOnSpecificWeekDays.Current = value;\n if (value) {\n this.makeGoodValue.provideOffersBasedOnPreemptionDays.Current = false;\n }\n\n this.formValueChanged();\n }\n\n generateMgsForUnresolvedSpots() {\n this.makeGoodValue.generateMgsForUnresolvedSpots.Current =\n !this.makeGoodValue.generateMgsForUnresolvedSpots.Current;\n this.formValueChanged();\n }\n\n // programmingPreApprovedChanged(value: any) {\n // this.selectedProgrammingChangesPreApproved = value;\n // this.makeGoodValue.programChangeAllowedInventory.preApproved.forEach((item: PopulateListDropdown) => {\n // item.isSelected = item.inventoryText == value.inventoryText ? true : false;\n // });\n // this.formValueChanged();\n // }\n\n // programmingNeedApprovedChanged(value: any) {\n // this.selectedProgrammingChangesRelaxed = value;\n // this.makeGoodValue.programChangeAllowedInventory.relaxed.forEach((item: PopulateListDropdown) => {\n // item.isSelected = item.inventoryText == value.inventoryText ? true : false;\n // });\n // this.formValueChanged();\n // }\n\n programmingRelaxedValueChanged() {\n this.selectedProgrammingChangesRelaxed = this.makeGoodValue.programChangeAllowedInventory.relaxed.filter(\n (x) => x.isSelected,\n )[0];\n this.formValueChanged();\n }\n\n // setDropdownConfig() {\n // this.dropdownConfig = { ...this.annaGlobalConfig.defaultSingleSelectConfig };\n // this.dropdownConfig.showSearchBar = false;\n // this.dropdownConfig.classes = 'no-wrap-text programming-mg-dropdown'\n // this.dropdownConfig.maxHeightOfList = 150;\n // this.dropdownConfig.minHeightOfList = 30;\n // }\n\n onContainerScroll() {\n const elements = document.getElementsByClassName(\"tooltip\");\n while (elements.length > 0) {\n elements[0].remove();\n }\n }\n}\n","<article\n [ngClass]=\"{\n 'read-mode-inputs': readMode,\n 'edit-mode-inputs': !readMode,\n 'highlight-changes': highlightChanges,\n 'disable-highlight-changes': !highlightChanges,\n 'hide-tooltip': hideRulesTooltipInfo\n }\"\n>\n <!-- WILL SHOW input-difference-icon only if highlightChanges is true -->\n\n <anna-design-message-box\n *ngIf=\"!hideRulesTooltipInfo\"\n [messageBoxData]=\"aduAndMgMessageData\"\n ></anna-design-message-box>\n <div\n id=\"scroll-container-mg\"\n class=\"table-container\"\n (scroll)=\"onContainerScroll()\"\n >\n <table>\n <thead>\n <tr class=\"header-row\">\n <th class=\"rule-no\">RULE#</th>\n <th class=\"biz-rule\">BUSINESS RULES</th>\n <th class=\"yes-no\">YES/NO</th>\n <th class=\"standard-rule\">STANDARD RULE</th>\n <th class=\"relaxed-rule\">RELAXED RULE</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>1</td>\n <td>\n {{ informationPool.generateMGsForUnresolvedSpots.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"informationPool?.generateMGsForUnresolvedSpots.tooltip\"\n #t=\"ngbTooltip\"\n container=\"body\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled || makeGoodValue?.disableGenerateMgsForUnresolvedSpotsToggle\"\n [isToggled]=\"makeGoodValue?.generateMgsForUnresolvedSpots?.Current\"\n (toggle)=\"generateMgsForUnresolvedSpots()\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.generateMgsForUnresolvedSpots?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.generateMgsForUnresolvedSpots?.IsChanged\"\n ></div>\n </td>\n <td>-</td>\n <td>-</td>\n </tr>\n\n <tr>\n <td>2</td>\n <td id=\"mg-table-first-row\">\n {{ informationPool.allowedMg.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowedMg\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>-</td>\n <td>\n <anna-design-priority-dropdowns\n [showNeedBuyerApproval]=\"false\"\n [differences]=\"[\n highlightChanges && makeGoodValue?.allowedInventory?.isPreApprovedChanged,\n highlightChanges && makeGoodValue?.allowedInventory?.isRelaxedChanged\n ]\"\n [highPriorityList]=\"makeGoodValue?.allowedInventory?.preApproved\"\n [lowPriorityList]=\"makeGoodValue?.allowedInventory?.relaxed\"\n [isDisabled]=\"isDisabled\"\n (highPriorityListChange)=\"\n checkPriority(makeGoodValue?.allowedInventory); formValueChanged()\n \"\n (lowPriorityListChange)=\"checkPriority(makeGoodValue?.allowedInventory); formValueChanged()\"\n >\n </anna-design-priority-dropdowns>\n </td>\n <td>\n <anna-design-priority-dropdowns\n [showAutoApproval]=\"false\"\n [differences]=\"[\n highlightChanges && makeGoodValue?.allowedInventory?.isPreApprovedChanged,\n highlightChanges && makeGoodValue?.allowedInventory?.isRelaxedChanged\n ]\"\n [highPriorityList]=\"makeGoodValue?.allowedInventory?.preApproved\"\n [lowPriorityList]=\"makeGoodValue?.allowedInventory?.relaxed\"\n [isDisabled]=\"isDisabled\"\n (highPriorityListChange)=\"\n checkPriority(makeGoodValue?.allowedInventory); formValueChanged()\n \"\n (lowPriorityListChange)=\"checkPriority(makeGoodValue?.allowedInventory); formValueChanged()\"\n [errorInPriorityDropdown]=\"makeGoodValue?.allowedInventory.isInvalid\"\n >\n </anna-design-priority-dropdowns>\n </td>\n </tr>\n\n <tr>\n <td>3</td>\n <td>\n {{ informationPool.mgTimeWindow.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"mgTimeWindow\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>-</td>\n <td>\n <anna-design-priority-dropdowns\n [showNeedBuyerApproval]=\"false\"\n *ngIf=\"makeGoodValue?.timeWindow.preApproved\"\n [differences]=\"[\n highlightChanges && makeGoodValue?.timeWindow?.isPreApprovedChanged,\n highlightChanges && makeGoodValue?.timeWindow?.isRelaxedChanged\n ]\"\n [highPriorityList]=\"makeGoodValue?.timeWindow.preApproved\"\n [isDisabled]=\"isDisabled\"\n [lowPriorityList]=\"makeGoodValue?.timeWindow?.relaxed\"\n (highPriorityListChange)=\"checkPriority(makeGoodValue?.timeWindow); formValueChanged()\"\n (lowPriorityListChange)=\"checkPriority(makeGoodValue?.timeWindow); formValueChanged()\"\n >\n </anna-design-priority-dropdowns>\n </td>\n <td>\n <anna-design-priority-dropdowns\n [showAutoApproval]=\"false\"\n *ngIf=\"makeGoodValue?.timeWindow.preApproved\"\n [differences]=\"[\n highlightChanges && makeGoodValue?.timeWindow?.isPreApprovedChanged,\n highlightChanges && makeGoodValue?.timeWindow?.isRelaxedChanged\n ]\"\n [highPriorityList]=\"makeGoodValue?.timeWindow.preApproved\"\n [isDisabled]=\"isDisabled\"\n [lowPriorityList]=\"makeGoodValue?.timeWindow?.relaxed\"\n (highPriorityListChange)=\"checkPriority(makeGoodValue?.timeWindow); formValueChanged()\"\n (lowPriorityListChange)=\"checkPriority(makeGoodValue?.timeWindow); formValueChanged()\"\n [errorInPriorityDropdown]=\"makeGoodValue?.timeWindow.isInvalid\"\n >\n </anna-design-priority-dropdowns>\n </td>\n </tr>\n\n <tr>\n <td class=\"valign-top\">\n <section>4</section>\n </td>\n <td>\n <section>Allowed days for MGs</section>\n <section class=\"pl-16\">\n {{ informationPool.allowedDays1.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowedDays1\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n <section class=\"pl-16\">\n {{ informationPool.allowedDays2.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowedDays2\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n </td>\n <td>\n <section class=\"empty-block\"></section>\n\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"makeGoodValue?.isWeekdayAllowedOnWeekends?.Current\"\n (toggle)=\"allowWeekdayOnWeekends($event)\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.isWeekdayAllowedOnWeekends?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.isWeekdayAllowedOnWeekends?.IsChanged\"\n ></div>\n </section>\n\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"makeGoodValue?.isWeekdendAllowedOnWeekdays?.Current\"\n (toggle)=\"allowWeekendOnWeekdays($event)\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.isWeekdendAllowedOnWeekdays?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.isWeekdendAllowedOnWeekdays?.IsChanged\"\n ></div>\n </section>\n </td>\n <td>\n <section class=\"empty-block\"></section>\n <section>-</section>\n <section>-</section>\n </td>\n <td>\n <section class=\"empty-block\"></section>\n <section>-</section>\n <section>-</section>\n </td>\n </tr>\n <tr>\n <td class=\"valign-top\">\n <section>5</section>\n </td>\n <td>\n <section>Specific days for MGs</section>\n <section class=\"pl-16\">\n {{ informationPool.allowMgForSpecificDaysOfPE.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowMgForSpecificDaysOfPE\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n <section class=\"pl-16\">\n {{ informationPool.allowMgForSpecificDaysEachWeek.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowMgForSpecificDaysEachWeek\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n </td>\n <td>\n <section class=\"empty-block\"></section>\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"makeGoodValue?.provideOffersBasedOnPreemptionDays?.Current\"\n (toggle)=\"provideOffersBasedOnPreemptionDaysChanged($event)\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.provideOffersBasedOnPreemptionDays?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.provideOffersBasedOnPreemptionDays?.IsChanged\"\n ></div>\n </section>\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"\n isDisabled || makeGoodValue?.disableProvideOffersBasedOnSpecificWeekDaysToggle\n \"\n [isToggled]=\"makeGoodValue?.provideOffersBasedOnSpecificWeekDays?.Current\"\n (toggle)=\"provideOffersBasedOnSpecificWeekDaysChanged($event)\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.provideOffersBasedOnSpecificWeekDays?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.provideOffersBasedOnSpecificWeekDays?.IsChanged\"\n ></div>\n </section>\n </td>\n <td>\n <section class=\"empty-block\"></section>\n <section>-</section>\n <section>-</section>\n </td>\n <td>\n <section class=\"empty-block\"></section>\n <section>-</section>\n <section>-</section>\n </td>\n </tr>\n <tr>\n <td class=\"valign-top\"><section>6</section></td>\n <td>\n <section>\n {{ informationPool.enableGrouping.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"enableGrouping\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n <section\n class=\"pl-16\"\n *ngIf=\"makeGoodValue?.enableGrouping?.Current\"\n >\n {{ informationPool.maxNoOfPESpotsForGrouping.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"informationPool.maxNoOfPESpotsForGrouping.tooltip\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n </td>\n <td class=\"valign-top\">\n <form [formGroup]=\"minRatingForm\">\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"makeGoodValue?.enableGrouping?.Current\"\n (toggle)=\"enableGroupingForMg()\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.enableGrouping?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.enableGrouping?.IsChanged\"\n ></div>\n </form>\n </td>\n <td>\n <section>-</section>\n <section *ngIf=\"makeGoodValue?.enableGrouping?.Current\">\n <form [formGroup]=\"maxPESpotsToBeGroupedForm\">\n <ng-container *ngIf=\"!readMode\">\n <input\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges && makeGoodValue?.maxSpotsToBeGrouped?.IsChanged,\n 'input-error':\n maxPESpotsToBeGroupedForm.controls.preApproved.errors?.min ||\n maxPESpotsToBeGroupedForm.controls.preApproved.errors?.max ||\n maxPESpotsToBeGroupedForm.controls.preApproved.errors?.required\n }\"\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n class=\"form-control\"\n type=\"number\"\n formControlName=\"preApproved\"\n />\n </ng-container>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.maxSpotsToBeGrouped?.Current }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.maxSpotsToBeGrouped?.IsChanged\"\n ></div>\n </form>\n </section>\n </td>\n <td>\n <section>-</section>\n <section *ngIf=\"makeGoodValue?.enableGrouping?.Current\">\n <form [formGroup]=\"maxPESpotsToBeGroupedForm\">\n <ng-container *ngIf=\"!readMode\">\n <input\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n makeGoodValue?.maxSpotsToBeGroupedRelaxed?.IsChanged,\n 'input-error':\n maxPESpotsToBeGroupedForm.controls.relaxed.errors?.min ||\n maxPESpotsToBeGroupedForm.controls.relaxed.errors?.max ||\n maxPESpotsToBeGroupedForm.controls.relaxed.errors?.required\n }\"\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n class=\"form-control\"\n type=\"number\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.maxSpotsToBeGroupedRelaxed?.Current }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.maxSpotsToBeGroupedRelaxed?.IsChanged\"\n ></div>\n </form>\n </section>\n </td>\n </tr>\n\n <tr>\n <td>7</td>\n <td>\n {{ informationPool.allowMgTwoMinutes.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowMgTwoMinutes\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>\n <form [formGroup]=\"minRatingForm\">\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"makeGoodValue?.isTresholdAllowed?.Current\"\n (toggle)=\"allowThreshold()\"\n ></anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.isTresholdAllowed?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.isTresholdAllowed?.IsChanged\"\n ></div>\n </form>\n </td>\n <td>-</td>\n <td>-</td>\n </tr>\n\n <tr>\n <td>8</td>\n <td>\n {{ informationPool.sportsAndSpecials.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"sportsAndSpecials\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>\n <section>\n <div [ngClass]=\"{ 'hide-toggle': readMode }\">\n <anna-design-toggle\n [isDisabled]=\"isDisabled\"\n [isToggled]=\"makeGoodValue?.isMakeGoodAllowedForSpecialDayparts?.Current\"\n (toggle)=\"mgAllowedForSpecialDaypart()\"\n >\n </anna-design-toggle>\n </div>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.isMakeGoodAllowedForSpecialDayparts?.Current ? \"Yes\" : \"No\" }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.isMakeGoodAllowedForSpecialDayparts?.IsChanged\"\n ></div>\n </section>\n </td>\n <td>\n <div [ngClass]=\"{ 'd-flex': readMode }\">\n <ng-container *ngIf=\"makeGoodValue?.isMakeGoodAllowedForSpecialDayparts?.Current\">\n <anna-design-priority-dropdowns\n [showNeedBuyerApproval]=\"false\"\n *ngIf=\"makeGoodValue?.specialDaypartAllowedInventory?.preApproved\"\n [differences]=\"[\n highlightChanges &&\n makeGoodValue?.specialDaypartAllowedInventory?.isPreApprovedChanged,\n highlightChanges &&\n makeGoodValue?.specialDaypartAllowedInventory?.isRelaxedChanged\n ]\"\n [highPriorityList]=\"makeGoodValue?.specialDaypartAllowedInventory?.preApproved\"\n [lowPriorityList]=\"makeGoodValue?.specialDaypartAllowedInventory?.relaxed\"\n [isDisabled]=\"isDisabled\"\n (highPriorityListChange)=\"\n checkPriority(makeGoodValue?.specialDaypartAllowedInventory); formValueChanged()\n \"\n (lowPriorityListChange)=\"\n checkPriority(makeGoodValue?.specialDaypartAllowedInventory); formValueChanged()\n \"\n >\n </anna-design-priority-dropdowns>\n </ng-container>\n\n <ng-container *ngIf=\"!makeGoodValue?.isMakeGoodAllowedForSpecialDayparts?.Current\">\n -\n </ng-container>\n </div>\n </td>\n <td>\n <div [ngClass]=\"{ 'd-flex': readMode }\">\n <ng-container *ngIf=\"makeGoodValue?.isMakeGoodAllowedForSpecialDayparts?.Current\">\n <anna-design-priority-dropdowns\n [showAutoApproval]=\"false\"\n *ngIf=\"makeGoodValue?.specialDaypartAllowedInventory?.relaxed\"\n [showAutoApproval]=\"false\"\n [differences]=\"[\n highlightChanges &&\n makeGoodValue?.specialDaypartAllowedInventory?.isPreApprovedChanged,\n highlightChanges &&\n makeGoodValue?.specialDaypartAllowedInventory?.isRelaxedChanged\n ]\"\n [highPriorityList]=\"makeGoodValue?.specialDaypartAllowedInventory?.preApproved\"\n [lowPriorityList]=\"makeGoodValue?.specialDaypartAllowedInventory?.relaxed\"\n [isDisabled]=\"isDisabled\"\n (highPriorityListChange)=\"\n checkPriority(makeGoodValue?.specialDaypartAllowedInventory); formValueChanged()\n \"\n (lowPriorityListChange)=\"\n checkPriority(makeGoodValue?.specialDaypartAllowedInventory); formValueChanged()\n \"\n [errorInPriorityDropdown]=\"makeGoodValue?.specialDaypartAllowedInventory.isInvalid\"\n >\n </anna-design-priority-dropdowns>\n </ng-container>\n <ng-container *ngIf=\"!makeGoodValue?.isMakeGoodAllowedForSpecialDayparts?.Current\">\n -\n </ng-container>\n </div>\n </td>\n </tr>\n\n <tr>\n <td class=\"valign-top\">\n <section>9</section>\n </td>\n <td>\n <section>\n {{ informationPool.programmingChangesTooltip.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"programmingChangesTooltip\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n <section\n *ngIf=\"selectedProgrammingChangesRelaxed?.inventoryText === EQUIVALENT_RATING_PROGRAM\"\n class=\"pl-16\"\n >\n {{ informationPool.allowedRatingForMg.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"allowedRatingForMg\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </section>\n </td>\n <td>\n <section>-</section>\n <section *ngIf=\"selectedProgrammingChangesRelaxed?.inventoryText === EQUIVALENT_RATING_PROGRAM\">\n -\n </section>\n </td>\n <td>\n <div [ngClass]=\"{ 'd-flex': readMode }\">\n <ng-container *ngIf=\"!readMode\">\n <anna-design-priority-dropdowns\n [showNeedBuyerApproval]=\"false\"\n *ngIf=\"makeGoodValue?.programChangeAllowedInventory?.relaxed\"\n [differences]=\"[\n highlightChanges &&\n makeGoodValue?.programChangeAllowedInventory?.isPreApprovedChanged,\n highlightChanges &&\n makeGoodValue?.programChangeAllowedInventory?.isRelaxedChanged\n ]\"\n [highPriorityList]=\"makeGoodValue?.programChangeAllowedInventory?.preApproved\"\n [lowPriorityList]=\"makeGoodValue?.programChangeAllowedInventory?.relaxed\"\n [isDisabled]=\"isDisabled\"\n (highPriorityListChange)=\"\n checkPriority(makeGoodValue?.programChangeAllowedInventory); formValueChanged()\n \"\n (lowPriorityListChange)=\"\n checkPriority(makeGoodValue?.programChangeAllowedInventory);\n programmingRelaxedValueChanged()\n \"\n [errorInPriorityDropdown]=\"makeGoodValue?.programChangeAllowedInventory.isInvalid\"\n >\n </anna-design-priority-dropdowns>\n </ng-container>\n\n <ng-container *ngIf=\"readMode\">\n <div annaCoreShowEllipsisTextOnHover>\n {{ selectedProgrammingChangesPreApproved?.inventoryText }}\n </div>\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"readMode && makeGoodValue?.programChangeAllowedInventory?.isPreApprovedChanged\"\n ></div>\n </div>\n <section\n *ngIf=\"\n editMode &&\n selectedProgrammingChangesRelaxed?.inventoryText === EQUIVALENT_RATING_PROGRAM\n \"\n class=\"empty-block-for-prime\"\n ></section>\n\n <section *ngIf=\"selectedProgrammingChangesRelaxed?.inventoryText === EQUIVALENT_RATING_PROGRAM\">\n -\n </section>\n </td>\n <td>\n <ng-container *ngIf=\"!readMode\">\n <anna-design-priority-dropdowns\n [showAutoApproval]=\"false\"\n *ngIf=\"makeGoodValue?.programChangeAllowedInventory?.relaxed\"\n [differences]=\"[\n highlightChanges &&\n makeGoodValue?.programChangeAllowedInventory?.isPreApprovedChanged,\n highlightChanges && makeGoodValue?.programChangeAllowedInventory?.isRelaxedChanged\n ]\"\n [highPriorityList]=\"makeGoodValue?.programChangeAllowedInventory?.preApproved\"\n [lowPriorityList]=\"makeGoodValue?.programChangeAllowedInventory?.relaxed\"\n [isDisabled]=\"isDisabled\"\n (highPriorityListChange)=\"\n checkPriority(makeGoodValue?.programChangeAllowedInventory); formValueChanged()\n \"\n (lowPriorityListChange)=\"\n checkPriority(makeGoodValue?.programChangeAllowedInventory);\n programmingRelaxedValueChanged()\n \"\n [errorInPriorityDropdown]=\"makeGoodValue?.programChangeAllowedInventory.isInvalid\"\n >\n </anna-design-priority-dropdowns>\n </ng-container>\n <ng-container *ngIf=\"readMode\">\n <div>{{ selectedProgrammingChangesRelaxed?.inventoryText }}</div>\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.programChangeAllowedInventory?.isRelaxedChanged\"\n ></div>\n <section\n *ngIf=\"\n editMode &&\n selectedProgrammingChangesRelaxed?.inventoryText === EQUIVALENT_RATING_PROGRAM\n \"\n class=\"empty-block-for-prime\"\n ></section>\n\n <section *ngIf=\"selectedProgrammingChangesRelaxed?.inventoryText === EQUIVALENT_RATING_PROGRAM\">\n <ng-container *ngIf=\"!readMode\">\n <form [formGroup]=\"ratingRangeForMg\">\n <input\n annaCoreDigitOnly\n inputmode=\"numeric\"\n formControlName=\"minimum\"\n class=\"form-control\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n makeGoodValue?.lowerLimitPercentageForProgramChange.IsChanged\n }\"\n pattern=\"[0-9]*\"\n [min]=\"-25\"\n [max]=\"0\"\n type=\"number\"\n step=\"5\"\n onkeydown=\"return false\"\n />\n <div\n [ngClass]=\"{\n 'input-icon-difference':\n highlightChanges &&\n makeGoodValue?.lowerLimitPercentageForProgramChange.IsChanged,\n 'input-icon':\n !highlightChanges ||\n !makeGoodValue?.lowerLimitPercentageForProgramChange.IsChanged\n }\"\n >\n %\n </div>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.lowerLimitPercentageForProgramChange.IsChanged\"\n ></div>\n\n <span class=\"plr-4\">to</span>\n <span\n *ngIf=\"ratingRangeForMg.get('maximum').value !== 0\"\n class=\"signed-input\"\n >\n +\n </span>\n <span\n *ngIf=\"ratingRangeForMg.get('maximum').value === 0\"\n class=\"signed-input empty\"\n ></span>\n <input\n annaCoreDigitOnly\n inputmode=\"numeric\"\n formControlName=\"maximum\"\n class=\"form-control text-indent\"\n [ngClass]=\"{\n 'no-text-indentation': ratingRangeForMg.get('maximum').value === 0\n }\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n makeGoodValue?.upperLimitPercentageForProgramChange.IsChanged\n }\"\n pattern=\"[0-9]*\"\n [min]=\"0\"\n [max]=\"25\"\n type=\"number\"\n step=\"5\"\n onkeydown=\"return false\"\n />\n <div\n [ngClass]=\"{\n 'input-icon-difference':\n highlightChanges &&\n makeGoodValue?.upperLimitPercentageForProgramChange.IsChanged,\n 'input-icon':\n !highlightChanges ||\n !makeGoodValue?.upperLimitPercentageForProgramChange.IsChanged\n }\"\n >\n %\n </div>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.upperLimitPercentageForProgramChange.IsChanged\"\n ></div>\n </form>\n </ng-container>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.lowerLimitPercentageForProgramChange?.Current }}% to\n {{ makeGoodValue?.upperLimitPercentageForProgramChange?.Current }}%\n <div\n class=\"input-difference-icon\"\n *ngIf=\"\n makeGoodValue?.lowerLimitPercentageForProgramChange.IsChanged ||\n makeGoodValue?.upperLimitPercentageForProgramChange.IsChanged\n \"\n ></div>\n </ng-container>\n </section>\n </td>\n </tr>\n\n <tr>\n <td>10</td>\n <td>\n {{ informationPool.maxMg.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"maxMg\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>-</td>\n <td>\n <form [formGroup]=\"maxGrpForm\">\n <ng-container *ngIf=\"!readMode\">\n <input\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges && makeGoodValue?.maxSpotsAllowedForEachSpot?.IsChanged,\n 'input-error':\n maxGrpForm.controls.preApproved.errors?.min ||\n maxGrpForm.controls.preApproved.errors?.max ||\n maxGrpForm.controls.preApproved.errors?.required\n }\"\n name=\"maxSpotsOto\"\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n class=\"form-control\"\n type=\"number\"\n formControlName=\"preApproved\"\n (ngModelChange)=\"maxGRPFormPreapprovedValuChanged($event)\"\n />\n </ng-container>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.maxSpotsAllowedForEachSpot?.Current }}\n </ng-container>\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.maxSpotsAllowedForEachSpot?.IsChanged\"\n ></div>\n </form>\n </td>\n <td>\n <form [formGroup]=\"maxGrpForm\">\n <ng-container *ngIf=\"!readMode\">\n <input\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges &&\n makeGoodValue?.maxSpotsAllowedForEachSpotRelaxed?.IsChanged,\n 'input-error':\n maxGrpForm.controls.relaxed.errors?.min ||\n maxGrpForm.controls.relaxed.errors?.max ||\n maxGrpForm.controls.relaxed.errors?.relaxedValidation ||\n maxGrpForm.controls.relaxed.errors?.required ||\n maxGrpForm.controls.relaxed.value == null\n }\"\n name=\"maxSpotsOto\"\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n class=\"mg-value form-control\"\n type=\"number\"\n formControlName=\"relaxed\"\n />\n </ng-container>\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.maxSpotsAllowedForEachSpotRelaxed?.Current }}\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.maxSpotsAllowedForEachSpotRelaxed?.IsChanged\"\n ></div>\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n maxGrpForm.controls.relaxed.errors?.min ||\n maxGrpForm.controls.relaxed.errors?.relaxedValidation ||\n maxGrpForm.controls.relaxed.errors?.required\n \"\n [ngbTooltip]=\"needBuyerApprovalHasToBeGreater\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </td>\n </tr>\n\n <tr>\n <td>11</td>\n <td>\n {{ informationPool.minPercentageOfPreempted.name }}\n <i\n class=\"mi mdi-info-outline biz-rule-icon\"\n [ngbTooltip]=\"minPercentageOfPreempted\"\n #t=\"ngbTooltip\"\n aria-hidden=\"true\"\n ></i>\n </td>\n <td>-</td>\n <td>\n <form [formGroup]=\"minRatingForm\">\n <ng-container *ngIf=\"!readMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n inputmode=\"numeric\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges && makeGoodValue?.minPercentageRating.IsChanged,\n 'input-error-perct-field':\n minRatingForm.controls.preApproved.errors?.required ||\n minRatingForm.controls.preApproved.errors?.min ||\n minRatingForm.controls.preApproved.errors?.max ||\n Math.floor(100 / this.maxGrpForm.value.preApproved) <\n minRatingForm?.value?.preApproved\n }\"\n name=\"maxSpotsOto\"\n class=\"form-control\"\n type=\"number\"\n formControlName=\"preApproved\"\n step=\"1\"\n />\n <div\n [ngClass]=\"{\n 'input-icon-difference':\n highlightChanges && makeGoodValue?.minPercentageRating.IsChanged,\n 'input-icon':\n !highlightChanges || !makeGoodValue?.minPercentageRating.IsChanged,\n 'input-icon-perct-error':\n minRatingForm.controls.preApproved.errors?.required ||\n minRatingForm.controls.preApproved.errors?.min ||\n minRatingForm.controls.preApproved.errors?.max ||\n Math.floor(100 / this.maxGrpForm.value.preApproved) <\n minRatingForm?.value?.preApproved\n }\"\n >\n %\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.minPercentageRating.Current }}%\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.minPercentageRating.IsChanged\"\n ></div>\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"\n Math.floor(100 / maxGrpForm?.value?.preApproved) < minRatingForm?.value?.preApproved\n \"\n [ngbTooltip]=\"percentageValueToBeSetBasedOnPreviousValueInStandard\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n\n <i\n class=\"mi mdi-info-outline biz-rule-icon standard-value-icon\"\n *ngIf=\"showWarningIconOfSettingMinPercentRating && !isDisabled\"\n [ngbTooltip]=\"standardValueSetTo100\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </td>\n <td>\n <form [formGroup]=\"minRatingForm\">\n <ng-container *ngIf=\"!readMode\">\n <input\n annaCoreDigitOnly\n [min]=\"MINVALUE\"\n [max]=\"MAXVALUE\"\n inputmode=\"numeric\"\n [ngClass]=\"{\n 'changed-entity':\n highlightChanges && makeGoodValue?.minPercentageRatingRelaxed.IsChanged,\n 'input-error-perct-field':\n minRatingForm.controls.relaxed.errors?.required ||\n minRatingForm.controls.relaxed.errors?.min ||\n minRatingForm.controls.relaxed.errors?.max ||\n Math.floor(100 / maxGrpForm?.value?.relaxed) < minRatingForm?.value?.relaxed\n }\"\n name=\"maxSpotsOto\"\n class=\"mg-value form-control\"\n type=\"number\"\n formControlName=\"relaxed\"\n step=\"1\"\n />\n\n <div\n [ngClass]=\"{\n 'input-icon-difference':\n highlightChanges && makeGoodValue?.minPercentageRatingRelaxed.IsChanged,\n 'input-icon-perct-error':\n minRatingForm.controls.relaxed.errors?.required ||\n minRatingForm.controls.relaxed.errors?.min ||\n minRatingForm.controls.relaxed.errors?.max ||\n Math.floor(100 / maxGrpForm?.value?.relaxed) <\n minRatingForm?.value?.relaxed,\n 'input-icon':\n !highlightChanges || !makeGoodValue?.minPercentageRatingRelaxed.IsChanged\n }\"\n >\n %\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"readMode\">\n {{ makeGoodValue?.minPercentageRatingRelaxed?.Current }}%\n </ng-container>\n\n <div\n class=\"input-difference-icon\"\n *ngIf=\"makeGoodValue?.minPercentageRatingRelaxed.IsChanged\"\n ></div>\n\n <i\n class=\"mdi mdi-alert-octagon\"\n *ngIf=\"Math.floor(100 / maxGrpForm?.value?.relaxed) < minRatingForm?.value?.relaxed\"\n [ngbTooltip]=\"percentageValueToBeSetBasedOnPreviousValueInRelaxed\"\n placement=\"top auto\"\n container=\"body\"\n #t=\"ngbTooltip\"\n ></i>\n </form>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</article>\n\n<ng-template #maxSpotsOTO>\n <span [innerHtml]=\"informationPool.maxSpotsOTO.tooltip\"></span>\n</ng-template>\n\n<ng-template #maxSpotsStrip>\n <span [innerHtml]=\"informationPool.maxSpotsStrip.tooltip\"></span>\n</ng-template>\n\n<ng-template #maxGrp>\n <span [innerHtml]=\"informationPool.maxGrp.tooltip\"></span>\n</ng-template>\n\n<ng-template #allowedMg>\n <span [innerHtml]=\"informationPool.allowedMg.tooltip\"></span>\n</ng-template>\n\n<ng-template #sportsAndSpecials>\n <span [innerHtml]=\"informationPool.sportsAndSpecials.tooltip\"></span>\n</ng-template>\n\n<ng-template #mgTimeWindow>\n <span [innerHtml]=\"informationPool.mgTimeWindow.tooltip\"></span>\n</ng-template>\n\n<ng-template #allowMgTwoMinutes>\n <span [innerHtml]=\"informationPool.allowMgTwoMinutes.tooltip\"></span>\n</ng-template>\n\n<ng-template #maxMg>\n <span [innerHtml]=\"informationPool.maxMg.tooltip\"></span>\n</ng-template>\n\n<ng-template #minPercentageOfPreempted>\n <span [innerHtml]=\"informationPool.minPercentageOfPreempted.tooltip\"></span>\n</ng-template>\n\n<ng-template #enableGrouping>\n <span [innerHtml]=\"informationPool.enableGrouping.tooltip\"></span>\n</ng-template>\n\n<ng-template #allowedDays1>\n {{ informationPool.allowedDays1.tooltip }}\n</ng-template>\n\n<ng-template #allowedDays2>\n {{ informationPool.allowedDays2.tooltip }}\n</ng-template>\n\n<ng-template #allowMgForSpecificDaysEachWeek>\n <span [innerHtml]=\"informationPool.allowMgForSpecificDaysEachWeek.tooltip\"></span>\n</ng-template>\n<ng-template #allowMgForSpecificDaysOfPE>\n <span [innerHtml]=\"informationPool.allowMgForSpecificDaysOfPE.tooltip\"></span>\n</ng-template>\n<ng-template #programmingChangesTooltip>\n <span [innerHtml]=\"informationPool.programmingChangesTooltip.tooltip\"></span>\n</ng-template>\n\n<ng-template #allowedRatingForMg>\n <span [innerHtml]=\"informationPool.allowedRatingForMg.tooltip\"></span>\n</ng-template>\n\n<!-- Error message tooltip -->\n<ng-template #dailyBuyerApprovalGreater>\n The Daily Relaxed value has to be greater than or equal to the Daily Standard value.\n</ng-template>\n\n<ng-template #weeklyValueGreaterThanDaily>\n The Weekly values have to be greater than or equal to the Daily values.\n</ng-template>\n\n<ng-template #needBuyerApprovalHasToBeGreater>\n The Relaxed value has to be greater than or equal to the Standard value.\n</ng-template>\n\n<ng-template #weeklyNeedBuyerApprovalValueGreaterThanDaily>\n The Weekly Relaxed value has to be greater than or equal to the Weekly Standard value.\n</ng-template>\n\n<ng-template #weeklyNeedBuyerApprovalValueGreaterThanDailyAndWeeklyValueGreaterThanDaily>\n <ul>\n <li>The Weekly values have to be greater than or equal to the Daily values.</li>\n <li>The Weekly Relaxed value has to be greater than or equal to the Weekly Standard value.</li>\n </ul>\n</ng-template>\n\n<ng-template #percentageValueToBeSetBasedOnPreviousValueInRelaxed>\n The Relaxed value has to be lesser than or equal to {{ Math.floor(100 / maxGrpForm.value.relaxed) }}% as the Relaxed\n value in #10 is set to {{ makeGoodValue?.maxSpotsAllowedForEachSpotRelaxed.Current }}.\n</ng-template>\n\n<ng-template #percentageValueToBeSetBasedOnPreviousValueInStandard>\n The Standard value has to be lesser than or equal to\n {{ Math.floor(100 / maxGrpForm?.value?.preApproved) }}% as the Standard value in #10 is set to\n {{ makeGoodValue?.maxSpotsAllowedForEachSpot.Current }}.\n</ng-template>\n<ng-template #standardValueSetTo100>The Standard value is set to 100 since #10 = 1.</ng-template>\n","import { NgClass, NgIf } from \"@angular/common\";\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n ViewChildren,\n} from \"@angular/core\";\n// sub-entries of ANNA Lib import statement\nimport { AnnaGlobalConfigService, IConfirmationPopupConfig, IGtTableHeader } from \"@annalib/anna-core\";\nimport {\n AnnaDesignComponentsLibModule,\n ConfirmationPopupComponent,\n IWizardTab,\n WizardConstant,\n WizardStepState,\n} from \"@annalib/anna-design-components-lib\";\n// User defined Imports\nimport { cloneDeep, isEqual, omit, uniqBy } from \"lodash-es\";\nimport { ToastrService } from \"ngx-toastr\";\n\nimport { AduRulesComponent } from \"../adu-rules/adu-rules.component\";\nimport { ApprovalConfigComponent } from \"../approval-config/approval-config.component\";\nimport { DaypartRestrictionsComponent } from \"../daypart-restrictions/daypart-restrictions.component\";\n// eslint-disable-next-line max-len\nimport { EquivalentAndHigherDaypartComponent } from \"../equivalent-and-higher-daypart/equivalent-and-higher-daypart.component\";\n// eslint-disable-next-line max-len\nimport { ExcludedOrSpecialProgramComponent } from \"../excluded-or-special-program/excluded-or-special-program.component\";\nimport { GeneralRulesComponent } from \"../general-rules/general-rules.component\";\nimport { MakeGoodRulesComponent } from \"../make-good-rules/make-good-rules.component\";\nimport { AduRules, ApprovalConfig, BizRulesResponse, GeneralRules, Inventory } from \"./models/business-rule.model\";\nimport {\n BusinessPageType,\n BusinessRuleSectionName,\n DaypartRestrictionTimesToastrMessage,\n UserTypeEnum,\n} from \"./models/business-rule-page.constants\";\n\n@Component({\n selector: \"anna-feature-business-rule-page\",\n templateUrl: \"./business-rule-page.component.html\",\n styleUrls: [\"./business-rule-page.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgIf,\n AnnaDesignComponentsLibModule,\n NgClass,\n DaypartRestrictionsComponent,\n GeneralRulesComponent,\n EquivalentAndHigherDaypartComponent,\n ExcludedOrSpecialProgramComponent,\n MakeGoodRulesComponent,\n AduRulesComponent,\n ApprovalConfigComponent,\n ],\n})\nexport class BusinessRulePageComponent implements OnInit, OnChanges, AfterViewInit {\n @Input({ required: true }) wizardTabs: IWizardTab[] = [];\n @Input({ required: true }) wizardTabsCloned: IWizardTab[] = [];\n @Input({ required: true }) selectedWizardTab: IWizardTab = null;\n @Input() hideBusinessRules: boolean = false;\n @Input({ required: true }) businessRuleLoading: boolean;\n @Input({ required: true }) bizRuleErrorMessage: string = null;\n @Input({ required: true }) businessRulesData: BizRulesResponse = null;\n @Input({ required: true }) initialBusinessRule: BizRulesResponse = null;\n\n @Input() userType: UserTypeEnum = UserTypeEnum.SELLER;\n @Input({ required: true }) bizRuleFor: \"STATION\" | \"ADVERTISER\" | \"ORDER\";\n\n @Input({ required: true }) inventoryCodesTableHeaders: IGtTableHeader[] = [];\n\n @Input({ required: true }) aclWritePermission: boolean = true;\n @Input() isTrafficAnnaOrder: boolean = false;\n @Input({ required: true }) businessRulePageType: BusinessPageType = null;\n\n @Input() editMode: boolean = false;\n @Input() disableSomeBizRulesIfAnPoDOrder = false;\n @Output() stayOnPageAndCloseModal = new EventEmitter<void>();\n @Output() checkIfEditEnabled = new EventEmitter<void>();\n @Output() checkIfNotifyEnabled = new EventEmitter<void>();\n @Output() checkSaveEnabled = new EventEmitter<void>();\n\n aduRules: AduRules = null;\n makeGoodRules: any = null;\n inventorySelectionChanged: boolean = false;\n BusinessRuleSectionName = BusinessRuleSectionName;\n\n // Wizard form\n currentTabHasError: boolean = false;\n currentTabHasPendingChanges: boolean = false;\n hasAnyHighlightChangesInEntireBizRules: boolean = false;\n\n discardUnsavedChangesConfirmConfig: IConfirmationPopupConfig;\n @ViewChild(\"discardUnsavedChangesConfirmModal\")\n private discardUnsavedChangesConfirmModal: ConfirmationPopupComponent;\n @ViewChildren(\"makeGood\") mgRules: QueryList<MakeGoodRulesComponent>;\n @ViewChildren(\"adu\") adu: QueryList<AduRulesComponent>;\n @ViewChildren(\"general\") generalRules: QueryList<GeneralRulesComponent>;\n @ViewChildren(\"approvals\") approvalConfig: QueryList<ApprovalConfigComponent>;\n generalRulesList: GeneralRules = null;\n // initialGeneralRules: GeneralRules = null;\n // Wizard form\n\n mgTabSelected: boolean = false;\n aduTabSelected: boolean = false;\n editModeClonedCopy: boolean;\n\n constructor(\n private toastr: ToastrService,\n private annaGlobalConfig: AnnaGlobalConfigService,\n ) {}\n\n ngOnInit() {\n this.setDiscardUnsavedChangesConfirmConfig();\n }\n\n ngAfterViewInit() {\n this.mgRules.changes.subscribe((mgComp: QueryList<MakeGoodRulesComponent>) => {\n if (mgComp.last) {\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.MG_RULES));\n }\n });\n\n this.approvalConfig.changes.subscribe((approvals: QueryList<ApprovalConfigComponent>) => {\n if (approvals.last) {\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.APPROVALS));\n }\n });\n\n this.adu.changes.subscribe((aduComp: QueryList<MakeGoodRulesComponent>) => {\n if (aduComp.last) {\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.ADU_RULES));\n }\n });\n this.generalRules?.changes.subscribe((generalComp: QueryList<GeneralRulesComponent>) => {\n if (generalComp.last) {\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.GENERAL_RULES));\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes && changes?.businessRulesData?.currentValue) {\n this.onSuccessGettingBusinessRules();\n }\n\n if (changes?.editMode) {\n this.editModeClonedCopy = cloneDeep(this.editMode);\n if (this.businessRulesData?.allowEditForCompletedOrder) {\n this.editMode = false;\n }\n this.updateBusinessRuleWizardList();\n }\n }\n\n onWizardTabChanged(wizardInfo: { selectedWizardTab: IWizardTab; wizardTabList: IWizardTab[] }) {\n this.wizardTabs = cloneDeep(wizardInfo.wizardTabList);\n this.selectedWizardTab = wizardInfo.selectedWizardTab;\n this.wizardTabSelected(this.selectedWizardTab);\n }\n\n updateBusinessRuleWizardList() {\n this.hasAnyHighlightChangesInEntireBizRules = false;\n this.wizardTabs.forEach((wizardTab: IWizardTab) => {\n const numberOfChangeInGivenTab =\n this.businessRulesData?.highlightChanges &&\n this.businessRulesData[wizardTab.differenceIdentifyingKey as keyof BizRulesResponse];\n if (numberOfChangeInGivenTab) {\n this.hasAnyHighlightChangesInEntireBizRules = true;\n wizardTab.iconClass = `input-difference-icon`;\n wizardTab.rightAdditionalMessage = `(${numberOfChangeInGivenTab})`;\n } else {\n wizardTab.iconClass = null;\n wizardTab.rightAdditionalMessage = null;\n }\n });\n this.wizardTabs = cloneDeep(this.wizardTabs);\n }\n\n onSuccessGettingBusinessRules() {\n this.showDaypartTimeRestrictionToastrs();\n this.aduRules = this.businessRulesData.aduRules;\n this.makeGoodRules = cloneDeep(this.businessRulesData.makeGoodRules);\n this.generalRulesList = cloneDeep(this.businessRulesData.generalRules);\n this.businessRulesData.selectedSpecialInventories.forEach((inventory) => {\n inventory.makeGoodCheckboxIsChangedIconActionKey[0].showIcon =\n this.businessRulesData.highlightChanges && inventory.isMakeGoodSelectedChanged;\n inventory.aduCheckboxIsChangedIconActionKey[0].showIcon =\n this.businessRulesData.highlightChanges && inventory.isAduSelectedChanged;\n });\n this.businessRulesData.selectedExcludedInventories.forEach((inventory) => {\n inventory.makeGoodCheckboxIsChangedIconActionKey[0].showIcon =\n this.businessRulesData.highlightChanges && inventory.isMakeGoodSelectedChanged;\n inventory.aduCheckboxIsChangedIconActionKey[0].showIcon =\n this.businessRulesData.highlightChanges && inventory.isAduSelectedChanged;\n });\n this.businessRulesData.nonSelectedInventories.forEach((inventory) => {\n inventory.makeGoodCheckboxIsChangedIconActionKey[0].showIcon =\n this.businessRulesData.highlightChanges && inventory.isMakeGoodSelectedChanged;\n inventory.aduCheckboxIsChangedIconActionKey[0].showIcon =\n this.businessRulesData.highlightChanges && inventory.isAduSelectedChanged;\n });\n // this.initialGeneralRules = cloneDeep(this.initialBusinessRule.generalRules);\n this.updateBusinessRuleWizardList();\n this.detectInventorySelectionChanges();\n this.checkIfEditEnabled.emit();\n this.checkIfNotifyEnabled.emit();\n this.setDefaultActiveTab();\n this.checkIfSaveEnabled(this.selectedWizardTab);\n }\n\n showDaypartTimeRestrictionToastrs() {\n if (\n !this.makeGoodRules &&\n this.businessRulesData?.inheritedLevel !== \"STATION\" &&\n this.bizRuleFor !== \"STATION\"\n ) {\n const toastrMessage: string =\n this.bizRuleFor === \"ADVERTISER\"\n ? DaypartRestrictionTimesToastrMessage.advertiser\n : DaypartRestrictionTimesToastrMessage.order;\n this.toastr.info(toastrMessage);\n }\n }\n\n setDefaultActiveTab() {\n const activeTab = this.selectedWizardTab ? this.selectedWizardTab : this.wizardTabs[0];\n this.selectedWizardTab = cloneDeep(activeTab);\n }\n\n isBusinessRuleValid() {\n const mgFormInvalid = this.mgFormsInvalid();\n const aduFormInvalid = this.aduFormsInvalid();\n const approvalsInvalid = this.approvalConfigInvalid();\n const generalFormInvalid = this.generalFormInvalid();\n if (mgFormInvalid || aduFormInvalid || generalFormInvalid || approvalsInvalid) {\n return false;\n }\n return true;\n }\n\n generalFormInvalid() {\n if (this.generalRules?.last) {\n return this.generalRules.last.checkIfAnyFormIsInvalid();\n }\n return false;\n }\n generalValueChanged(generalRules: GeneralRules) {\n this.businessRulesData.generalRules = cloneDeep(generalRules);\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.GENERAL_RULES));\n }\n approvalConfigChanged(approvalConfigs: ApprovalConfig) {\n this.businessRulesData.approvalConfig = approvalConfigs;\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.APPROVALS));\n }\n\n IsOnlyBusinessRuleFormChanged(): boolean {\n const businessRulesNow: BizRulesResponse = cloneDeep(this.businessRulesData);\n if (!businessRulesNow) return false;\n\n const businessRuleChanged = !isEqual(\n omit(this.initialBusinessRule, [\n \"selectedExcludedInventories\",\n \"selectedSpecialInventories\",\n \"nonSelectedInventories\",\n \"approvalConfig\",\n \"highlightChanges\",\n ]),\n omit(this.businessRulesData, [\n \"selectedExcludedInventories\",\n \"selectedSpecialInventories\",\n \"nonSelectedInventories\",\n \"approvalConfig\",\n \"highlightChanges\",\n ]),\n );\n\n // const changes1 = differenceWith(toPairs(this.initialBusinessRule), toPairs(businessRulesNow), isEqual)\n if (businessRuleChanged || this.inventorySelectionChanged) {\n return true;\n }\n return false;\n }\n sortAndOmitPrograms(programs: Inventory[]): any[] {\n return programs\n .map(({ makeGoodCheckboxIsChangedIconActionKey, aduCheckboxIsChangedIconActionKey, ...rest }) => rest) // Remove specified keys\n .sort((a, b) => a.programName.localeCompare(b.programName)); // Sort by programName\n }\n isAnyApprovalConfiguarationChanged() {\n return !isEqual(this.businessRulesData?.approvalConfig, this.initialBusinessRule?.approvalConfig);\n }\n\n public openConfirmationPopup() {\n this.discardUnsavedChangesConfirmModal.openModal();\n }\n\n mgFormsInvalid() {\n if (this.mgRules && this.mgRules.last) {\n return this.mgRules.last.checkIfAnyFormIsInvalid();\n }\n return false;\n }\n\n aduFormsInvalid() {\n if (this.adu && this.adu.last) {\n return this.adu.last.checkIfAnyFormIsInvalid();\n }\n return false;\n }\n approvalConfigInvalid() {\n if (this.approvalConfig && this.approvalConfig.last) {\n return this.approvalConfig.last.isApprovalConfigInValid();\n }\n return false;\n }\n\n excludedInventoriesSelected(selectedExcludedInventories: Inventory[]) {\n this.businessRulesData.selectedExcludedInventories = selectedExcludedInventories;\n this.detectInventorySelectionChanges();\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.EXCLUDED_PROGRAM));\n }\n\n specialInventoriesSelected(selectedSpecialInventories: Inventory[]) {\n this.businessRulesData.selectedSpecialInventories = selectedSpecialInventories;\n this.detectInventorySelectionChanges();\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.SPECIAL_PROGRAM));\n }\n\n nonSelectedInventory(nonSelectedInventories: any, type: \"EXCLUDED\" | \"SPECIAL\") {\n const uniqueNonSelectedInventories: any[] = uniqBy(nonSelectedInventories, \"programName\");\n this.businessRulesData.nonSelectedInventories = uniqueNonSelectedInventories;\n this.detectInventorySelectionChanges();\n\n if (type === \"EXCLUDED\") {\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.EXCLUDED_PROGRAM));\n } else {\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.SPECIAL_PROGRAM));\n }\n }\n\n detectInventorySelectionChanges() {\n const anyChangeInExcludedInventory = !isEqual(\n this.sortAndOmitPrograms(this.initialBusinessRule.selectedExcludedInventories),\n this.sortAndOmitPrograms(this.businessRulesData.selectedExcludedInventories),\n );\n const anyChangeInSpecialInventory = !isEqual(\n this.sortAndOmitPrograms(this.initialBusinessRule.selectedSpecialInventories),\n this.sortAndOmitPrograms(this.businessRulesData.selectedSpecialInventories),\n );\n\n this.inventorySelectionChanged = anyChangeInExcludedInventory || anyChangeInSpecialInventory;\n }\n\n resetBizRuleChangesAndCloseModal() {\n this.inventorySelectionChanged = false;\n this.businessRulesData = cloneDeep(this.initialBusinessRule);\n }\n\n stayOnBizRulePageAndCloseModal() {\n this.stayOnPageAndCloseModal.emit();\n }\n\n aduChange(aduRules: AduRules) {\n this.businessRulesData.aduRules = cloneDeep(aduRules);\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.ADU_RULES));\n }\n\n dayPartRestrictionsChanged(dpRules: any) {\n this.businessRulesData.dayAndDaypartRestrictionForMgAndAdu = cloneDeep(dpRules);\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.DAYPART_RESTRICTION));\n }\n\n equivalencyRulesChanged(equivalencyRules: any) {\n this.businessRulesData.equivalentAndHigherDaypartForMgAndAdu = cloneDeep(equivalencyRules);\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.EQUIVALENT_DAYPARTS));\n }\n\n makeGoodValueChanged(mgRules: any) {\n this.businessRulesData.makeGoodRules = cloneDeep(mgRules);\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.MG_RULES));\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.GENERAL_RULES));\n this.checkIfSaveEnabled(this.getTabBasedOnHeading(BusinessRuleSectionName.APPROVALS));\n }\n\n getTabBasedOnHeading(tabHeading: string) {\n const searchedTab = this.wizardTabs.filter((tab: IWizardTab) => tab.heading === tabHeading)[0];\n if (searchedTab) return searchedTab;\n return null;\n }\n\n checkIfSaveEnabled(tab: IWizardTab) {\n this.checkSaveEnabled.emit();\n this.wizardTabSelected(tab);\n }\n\n setDiscardUnsavedChangesConfirmConfig() {\n const businessRuleLevel =\n // eslint-disable-next-line no-nested-ternary\n this.businessRulePageType === BusinessPageType.STATION\n ? \"station\"\n : this.businessRulePageType === BusinessPageType.ADVERTISER\n ? \"advertiser\"\n : \"order\";\n const msg = `Any unsaved changes made by you may be lost and you will no longer be editing this ${businessRuleLevel}. Are you sure you want to leave this page?`;\n\n this.discardUnsavedChangesConfirmConfig = {\n ...this.annaGlobalConfig.defaultUnsavedChangesConfirmationPopupConfig,\n };\n this.discardUnsavedChangesConfirmConfig.title = msg;\n this.discardUnsavedChangesConfirmConfig.windowClass = \"generic-confirm-modal\";\n }\n\n wizardTabSelected(tabSelected: IWizardTab) {\n if (!tabSelected) return;\n\n this.mgTabSelected = false;\n this.aduTabSelected = false;\n if (tabSelected.heading === BusinessRuleSectionName.MG_RULES) {\n this.mgTabSelected = true;\n } else if (tabSelected.heading === BusinessRuleSectionName.ADU_RULES) {\n this.aduTabSelected = true;\n }\n\n const tabHasPendingChanges = this.checkIfCurrentTabHasPendingChange(tabSelected);\n const tabHasError = !this.checkIfCurrentTabFormIsValid(tabSelected);\n\n if (tabSelected.heading === this.selectedWizardTab.heading) {\n this.currentTabHasPendingChanges = tabHasPendingChanges;\n this.currentTabHasError = tabHasError;\n }\n const currentWizardIndex = this.wizardTabs.findIndex((x: IWizardTab) => x.heading === tabSelected.heading);\n const currentWizardTab = this.wizardTabs[currentWizardIndex];\n if (currentWizardIndex === -1) return;\n if (tabHasPendingChanges) {\n this.wizardTabs[currentWizardIndex] = this.setCurrentAndPreviousStepState(\n currentWizardTab,\n WizardStepState.pending,\n );\n this.wizardTabs = cloneDeep(this.wizardTabs);\n }\n\n if (tabHasError) {\n this.wizardTabs[currentWizardIndex] = this.setCurrentAndPreviousStepState(\n currentWizardTab,\n WizardStepState.error,\n );\n this.wizardTabs = cloneDeep(this.wizardTabs);\n }\n if (!tabHasError && !tabHasPendingChanges) {\n // only if it's not current selectedWizardTab we override the value\n // For current selectedWizardTab, icon has to be active (blue circle) so we are not overriding the value.\n // if (currentWizardTab.heading != this.selectedWizardTab?.heading) {\n if (\n this.wizardTabs[currentWizardIndex].stepState === WizardStepState.error ||\n currentWizardTab.heading !== this.selectedWizardTab?.heading\n ) {\n this.wizardTabs[currentWizardIndex].stepState =\n this.wizardTabs[currentWizardIndex].previousValidStepState;\n this.wizardTabs = cloneDeep(this.wizardTabs);\n }\n // }\n }\n }\n\n checkIfCurrentTabFormIsValid(tabSelected: IWizardTab): boolean {\n if (tabSelected.heading === BusinessRuleSectionName.APPROVALS) {\n return !this.approvalConfigInvalid();\n } else if (tabSelected.heading === BusinessRuleSectionName.MG_RULES) {\n // this.mgTabSelected = true;\n return !this.mgFormsInvalid();\n } else if (tabSelected.heading === BusinessRuleSectionName.ADU_RULES) {\n // this.aduTabSelected = true;\n return !this.aduFormsInvalid();\n } else if (tabSelected.heading === BusinessRuleSectionName.GENERAL_RULES) {\n return !this.generalFormInvalid();\n }\n return true;\n }\n\n checkIfCurrentTabHasPendingChange(tabSelected: IWizardTab): boolean {\n // if (\n // tabSelected.heading === BusinessRuleSectionName.APPROVALS &&\n // this.showBuyerContactSection &&\n // this.businessRulesData?.isBuyerBizRuleApprovalNeeded &&\n // this.isBuyerContactNullOrNotValid()\n // ) {\n // return true;\n // }\n return false;\n }\n\n setCurrentAndPreviousStepState(tab: IWizardTab, newState: WizardStepState): IWizardTab {\n if (WizardConstant.ValidStates.includes(newState)) {\n tab.previousValidStepState = newState;\n } else if (WizardConstant.ValidStates.includes(tab.stepState)) {\n tab.previousValidStepState = tab.stepState;\n } else {\n const previousValidStepState = this.wizardTabsCloned.filter((x: IWizardTab) => x.heading === tab.heading)[0]\n ?.stepState;\n tab.previousValidStepState = previousValidStepState;\n }\n tab.stepState = newState;\n return tab;\n }\n getLatestBusinessRuleData(): BizRulesResponse {\n return this.businessRulesData;\n }\n}\n","<anna-design-generic-wizard-form\n *ngIf=\"businessRuleLoading || (!businessRuleLoading && !hideBusinessRules)\"\n [ngClass]=\"{ 'highlight-changes': hasAnyHighlightChangesInEntireBizRules }\"\n [wizardTabs]=\"wizardTabs\"\n [selectedWizardTab]=\"selectedWizardTab\"\n [wizardTabsCloned]=\"wizardTabsCloned\"\n [currentTabHasError]=\"currentTabHasError\"\n [currentTabHasPendingChanges]=\"currentTabHasPendingChanges\"\n [editMode]=\"editMode && !businessRuleLoading && aclWritePermission\"\n [tabClass]=\"'biz-rule-tabs'\"\n (wizardTabsChanged)=\"onWizardTabChanged($event)\"\n [errorMessage]=\"bizRuleErrorMessage\"\n>\n <div\n class=\"view\"\n [ngClass]=\"{ 'business-form-disable': !editMode }\"\n >\n <ng-container *ngIf=\"businessRuleLoading\">\n <div class=\"col-6 pl-0 pt-12\">\n <anna-design-skt-loader\n [count]=\"1\"\n [theme]=\"{ height: '10vh', 'margin-bottom': '0.625rem' }\"\n ></anna-design-skt-loader>\n <anna-design-skt-loader\n [count]=\"1\"\n [theme]=\"{ height: '10vh' }\"\n ></anna-design-skt-loader>\n </div>\n <anna-design-skt-loader\n class=\"col-6 pr-0 pt-12\"\n [count]=\"1\"\n [theme]=\"{ height: '20vh', 'margin-bottom': '0.5rem' }\"\n ></anna-design-skt-loader>\n </ng-container>\n\n <ng-container *ngIf=\"!businessRuleLoading\">\n <div [ngClass]=\"{ 'display-none': selectedWizardTab?.heading !== BusinessRuleSectionName.APPROVALS }\">\n <anna-feature-approval-config\n #approvals\n [editModeClonedCopy]=\"editModeClonedCopy\"\n [approvalConfig]=\"businessRulesData?.approvalConfig\"\n [userType]=\"userType\"\n [isTrafficAnnaOrder]=\"isTrafficAnnaOrder\"\n [businessRulePageType]=\"businessRulePageType\"\n [editMode]=\"editMode && aclWritePermission && !businessRulesData?.allowEditForCompletedOrder\"\n (approvalConfigChanged)=\"approvalConfigChanged($event)\"\n >\n </anna-feature-approval-config>\n </div>\n\n <ng-container *ngIf=\"selectedWizardTab?.heading === BusinessRuleSectionName.DAYPART_RESTRICTION\">\n <anna-feature-daypart-restrictions\n [data]=\"businessRulesData?.dayAndDaypartRestrictionForMgAndAdu\"\n [isDisabled]=\"!aclWritePermission || !editMode || businessRulesData?.allowEditForCompletedOrder\"\n [highlightChanges]=\"businessRulesData?.highlightChanges\"\n [noOfHighlightChanges]=\"businessRulesData?.numberOfDpRestrictionRulesChanged\"\n (dpChanges)=\"dayPartRestrictionsChanged($event)\"\n >\n </anna-feature-daypart-restrictions>\n </ng-container>\n\n <ng-container *ngIf=\"selectedWizardTab?.heading === BusinessRuleSectionName.EQUIVALENT_DAYPARTS\">\n <anna-feature-equivalent-and-higher-daypart\n [daypartEquivalenceRules]=\"businessRulesData?.equivalentAndHigherDaypartForMgAndAdu\"\n [isDisabled]=\"!aclWritePermission || !editMode || businessRulesData?.allowEditForCompletedOrder\"\n [highlightChanges]=\"businessRulesData?.highlightChanges\"\n [noOfHighlightChanges]=\"businessRulesData?.numberEquivalencyRulesChanged\"\n (equivalencyRulesChanges)=\"equivalencyRulesChanged($event)\"\n >\n </anna-feature-equivalent-and-higher-daypart>\n </ng-container>\n\n <ng-container *ngIf=\"selectedWizardTab?.heading === BusinessRuleSectionName.EXCLUDED_PROGRAM\">\n <anna-feature-excluded-or-special-program\n class=\"excluded\"\n [tableHeaders]=\"inventoryCodesTableHeaders\"\n [editMode]=\"editMode && aclWritePermission && !businessRulesData?.allowEditForCompletedOrder\"\n [selectedInventories]=\"businessRulesData?.selectedExcludedInventories\"\n [nonSelectedInventories]=\"businessRulesData?.nonSelectedInventories\"\n [componentName]=\"'EXCLUDED'\"\n [noOfHighlightChanges]=\"businessRulesData?.numberOfExcludedProgramsSelectionChanged\"\n (inventoriesNotSelected)=\"nonSelectedInventory($event, 'EXCLUDED')\"\n (inventoriesSelected)=\"excludedInventoriesSelected($event)\"\n >\n </anna-feature-excluded-or-special-program>\n </ng-container>\n\n <ng-container *ngIf=\"selectedWizardTab?.heading === BusinessRuleSectionName.SPECIAL_PROGRAM\">\n <anna-feature-excluded-or-special-program\n class=\"special\"\n [tableHeaders]=\"inventoryCodesTableHeaders\"\n [editMode]=\"editMode && aclWritePermission && !businessRulesData?.allowEditForCompletedOrder\"\n [selectedInventories]=\"businessRulesData?.selectedSpecialInventories\"\n [nonSelectedInventories]=\"businessRulesData?.nonSelectedInventories\"\n [componentName]=\"'SPECIAL'\"\n (inventoriesNotSelected)=\"nonSelectedInventory($event, 'SPECIAL')\"\n [noOfHighlightChanges]=\"businessRulesData?.numberOfSpecialProgramsSelectionChanged\"\n (inventoriesSelected)=\"specialInventoriesSelected($event)\"\n >\n </anna-feature-excluded-or-special-program>\n </ng-container>\n\n <div\n *ngIf=\"!bizRuleErrorMessage\"\n [ngClass]=\"{ 'display-none': selectedWizardTab?.heading !== BusinessRuleSectionName.GENERAL_RULES }\"\n >\n <anna-feature-general-rules\n #general\n [advertiserSeparationClonedValue]=\"\n initialBusinessRule?.generalRules?.advertiserSeperation?.advertiserSeparationValue?.Current\n \"\n [disableAdvertiserSeparation]=\"bizRuleFor === 'ORDER'\"\n [generalRules]=\"generalRulesList\"\n [editMode]=\"editMode && aclWritePermission && !businessRulesData?.allowEditForCompletedOrder\"\n [highlightChanges]=\"businessRulesData?.highlightChanges\"\n (generalRuleChange)=\"generalValueChanged($event)\"\n >\n </anna-feature-general-rules>\n </div>\n\n <div\n *ngIf=\"!bizRuleErrorMessage\"\n [ngClass]=\"{ 'display-none': selectedWizardTab?.heading !== BusinessRuleSectionName.MG_RULES }\"\n >\n <anna-feature-make-good-rules\n #makeGood\n [mgTabSelected]=\"mgTabSelected\"\n [makeGoodValue]=\"makeGoodRules\"\n [highlightChanges]=\"businessRulesData?.highlightChanges\"\n [showMinimumSeparationInMessage]=\"bizRuleFor === 'ORDER'\"\n [isTrafficAnnaOrder]=\"isTrafficAnnaOrder\"\n [businessRulePageType]=\"businessRulePageType\"\n [minimumSeparation]=\"businessRulesData?.minimumSeparation\"\n [isDisabled]=\"!aclWritePermission || !editMode || businessRulesData?.allowEditForCompletedOrder\"\n [editMode]=\"editMode && !businessRulesData?.allowEditForCompletedOrder\"\n (makeGoodValueChange)=\"makeGoodValueChanged($event)\"\n ></anna-feature-make-good-rules>\n </div>\n\n <div\n *ngIf=\"!bizRuleErrorMessage\"\n [ngClass]=\"{ 'display-none': selectedWizardTab?.heading !== BusinessRuleSectionName.ADU_RULES }\"\n >\n <anna-feature-adu-rules\n #adu\n [aduTabSelected]=\"aduTabSelected\"\n [intialAduValue]=\"initialBusinessRule?.aduRules\"\n [aduValue]=\"aduRules\"\n [highlightChanges]=\"businessRulesData?.highlightChanges\"\n [editMode]=\"editMode && !businessRulesData?.allowEditForCompletedOrder\"\n [disabledAduPostingRequired]=\"disableSomeBizRulesIfAnPoDOrder\"\n [disabledAduTimeWindow]=\"disableSomeBizRulesIfAnPoDOrder\"\n [showMinimumSeparationInMessage]=\"bizRuleFor === 'ORDER'\"\n [minimumSeparation]=\"businessRulesData?.minimumSeparation\"\n [isDisabled]=\"!aclWritePermission || !editMode || businessRulesData?.allowEditForCompletedOrder\"\n (aduChange)=\"aduChange($event)\"\n >\n </anna-feature-adu-rules>\n </div>\n </ng-container>\n </div>\n</anna-design-generic-wizard-form>\n\n<!-- Modal components -->\n<anna-design-confirmation-popup\n #discardUnsavedChangesConfirmModal\n [config]=\"discardUnsavedChangesConfirmConfig\"\n (confirmClicked)=\"resetBizRuleChangesAndCloseModal()\"\n (cancelClicked)=\"stayOnBizRulePageAndCloseModal()\"\n>\n</anna-design-confirmation-popup>\n","import { BizRulesResponse, Inventory } from \"../../business-rule-page/models/business-rule.model\";\n\nexport class BusinessHistoryTable {\n selectedExcludedPrograms: InventoryReadMode[] = [];\n selectedSpecialPrograms: InventoryReadMode[] = [];\n\n constructor(bizRuleData: BizRulesResponse) {\n this.selectedExcludedPrograms = bizRuleData.selectedExcludedInventories\n .filter((x: Inventory) => x.isSelected)\n .map((x: Inventory) => ({\n ...x,\n aduSelected: x.aduSelected ? \"Yes\" : \"No\",\n makeGoodSelected: x.makeGoodSelected ? \"Yes\" : \"No\",\n }));\n this.selectedSpecialPrograms = bizRuleData.selectedSpecialInventories\n .filter((x: Inventory) => x.isSelected)\n .map((x: Inventory) => ({\n ...x,\n aduSelected: x.aduSelected ? \"Yes\" : \"No\",\n makeGoodSelected: x.makeGoodSelected ? \"Yes\" : \"No\",\n }));\n }\n}\n\n// SAME as Inventory class just type of makeGoodSelected and aduSelected is string\nexport interface InventoryReadMode {\n programName: string;\n startEndTime: string;\n startTimeForFilter: string;\n endTimeForFilter: string;\n daypart: string;\n type: string;\n days: string;\n\n isSelected: boolean;\n\n makeGoodCheckboxIsChangedIconActionKey: { showIcon: boolean; iconClass: string; isDisabledKey: boolean }[];\n aduCheckboxIsChangedIconActionKey: { showIcon: boolean; iconClass: string; isDisabledKey: boolean }[];\n\n makeGoodSelected: string;\n aduSelected: string;\n}\n","import { NgClass, NgFor, NgIf, TitleCasePipe, UpperCasePipe } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { AnnaCoreModule, IGtTableHeader } from \"@annalib/anna-core\";\nimport { AnnaDesignComponentsLibModule } from \"@annalib/anna-design-components-lib\";\nimport { BizHistoryType, BizRuleStatus } from \"@annalib/anna-feature-lib/anna-feature-shared-lib\";\nimport { NgbModule, NgbTooltip, NgbTooltipModule } from \"@ng-bootstrap/ng-bootstrap\";\n\nimport { AduRulesComponent } from \"../adu-rules/adu-rules.component\";\nimport { ApprovalConfigComponent } from \"../approval-config/approval-config.component\";\nimport { BizRulesResponse } from \"../business-rule-page/models/business-rule.model\";\nimport { BizHistoryRuleUrl, BusinessPageType, UserTypeEnum } from \"../business-rule-page/models/business-rule-page.constants\";\nimport { DaypartRestrictionsComponent } from \"../daypart-restrictions/daypart-restrictions.component\";\nimport { EquivalentAndHigherDaypartComponent } from \"../equivalent-and-higher-daypart/equivalent-and-higher-daypart.component\";\nimport { ExcludedOrSpecialProgramComponent } from \"../excluded-or-special-program/excluded-or-special-program.component\";\nimport { GeneralRulesComponent } from \"../general-rules/general-rules.component\";\nimport { MakeGoodRulesComponent } from \"../make-good-rules/make-good-rules.component\";\nimport { BusinessHistoryTable } from \"./models/biz-rule-history.model\";\n\n@Component({\n selector: \"anna-feature-business-rules-history\",\n templateUrl: \"./business-rules-history.component.html\",\n styleUrls: [\"./business-rules-history.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgIf,\n NgClass,\n NgFor,\n DaypartRestrictionsComponent,\n EquivalentAndHigherDaypartComponent,\n ExcludedOrSpecialProgramComponent,\n GeneralRulesComponent,\n MakeGoodRulesComponent,\n AduRulesComponent,\n AnnaDesignComponentsLibModule,\n NgbModule,\n NgbTooltip,\n NgbTooltipModule,\n AnnaCoreModule,\n UpperCasePipe,\n TitleCasePipe,\n ApprovalConfigComponent,\n ]\n})\nexport class BusinessRulesHistoryComponent implements OnInit, OnChanges {\n @Input() bizRuleData: BizRulesResponse;\n @Input() bizRuleDataForHistoryTable: BusinessHistoryTable;\n @Input() loading: boolean = true;\n @Input() sellerOrBuyerApprovalKey:\n | \"isSellerApprovalRequiredForPreApprovedSpots\"\n | \"isBuyerApprovalRequiredForPreApprovedSpots\";\n @Input() businessRuleSectiontabs: { id: number; name: string; url: BizHistoryRuleUrl }[] = [];\n\n // @Input() sellerOrBuyerApprovalValue: boolean;\n @Input() showBuyerBizRulesApprovalNeededToggle: boolean;\n @Input() userType: UserTypeEnum = null;\n\n type: BizHistoryType;\n orderId: string;\n bizRuleStatus: BizRuleStatus;\n isTrafficAnnaOrder: boolean;\n\n orderCurrentTabUrl: any;\n BizHistoryType = BizHistoryType;\n bizRuleUrl = BizHistoryRuleUrl;\n excludedOrSpecialTableHeaders: IGtTableHeader[] = [];\n businessRulePageType: BusinessPageType;\n containerClass: string = \"\";\n\n constructor(private route: ActivatedRoute) {\n this.setExcludedorSpecialCodesPopUpTableHeaders();\n }\n\n ngOnInit(): void {\n this.detectURLChanges();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes && changes?.bizRuleData?.currentValue) {\n this.bizRuleStatus = this.bizRuleData.businessRulesStatus;\n }\n if (changes && changes?.businessRuleSectiontabs?.currentValue) {\n this.orderCurrentTabUrl = this.businessRuleSectiontabs[0].url;\n }\n }\n\n detectURLChanges() {\n this.route.queryParams.subscribe((params: any) => {\n this.type = params.type as BizHistoryType;\n if (this.type === BizHistoryType.ADVERTISER) {\n this.businessRulePageType = BusinessPageType.ADVERTISER;\n } else if (this.type === BizHistoryType.ORDER) {\n this.businessRulePageType = BusinessPageType.ORDER;\n } else {\n this.businessRulePageType = BusinessPageType.STATION;\n this.containerClass = \"station-biz-rule\";\n }\n this.isTrafficAnnaOrder = params.isRepOrder !== \"true\";\n this.orderId = params.orderId;\n });\n }\n\n tabChangeClicked(event: { url: BizHistoryRuleUrl }) {\n this.orderCurrentTabUrl = event.url;\n }\n\n errorHandler() {\n this.loading = false;\n }\n\n setExcludedorSpecialCodesPopUpTableHeaders() {\n this.excludedOrSpecialTableHeaders = [\n {\n headerInfo: [\n {\n name: \"PROGRAM\",\n objectKey: \"programName\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"programName\"],\n },\n ],\n visible: true,\n width: \"30ch\",\n },\n {\n headerInfo: [\n {\n name: \"DP\",\n objectKey: \"daypart\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"daypart\"],\n },\n ],\n visible: true,\n width: \"10ch\",\n },\n {\n headerInfo: [\n {\n name: \"DAYS\",\n objectKey: \"days\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"days\"],\n },\n ],\n visible: true,\n width: \"12ch\",\n },\n {\n headerInfo: [\n {\n name: \"TIME\",\n objectKey: \"startEndTime\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true, true],\n isFilterRequired: [true, true],\n filter: \"TIME\",\n filterSortObjectKeys: [\"startTimeForFilter\", \"endTimeForFilter\"],\n },\n ],\n visible: true,\n width: \"11ch\",\n },\n {\n headerInfo: [\n {\n name: \"MG\",\n objectKey: \"makeGoodSelected\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"makeGoodSelected\"],\n },\n ],\n visible: true,\n width: \"7ch\",\n },\n {\n headerInfo: [\n {\n name: \"ADU\",\n objectKey: \"aduSelected\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"aduSelected\"],\n },\n ],\n visible: true,\n width: \"7ch\",\n },\n ];\n }\n\n onContainerScroll() {\n const elements = document.getElementsByClassName(\"tooltip\");\n while (elements.length > 0) {\n elements[0].remove();\n }\n }\n}\n","<div\n class=\"heading\"\n *ngIf=\"type === BizHistoryType.STATION\"\n>\n {{ type | uppercase }} BUSINESS RULES HISTORY\n</div>\n<div\n class=\"heading\"\n *ngIf=\"type !== BizHistoryType.STATION\"\n>\n {{ type | uppercase }} HISTORY\n</div>\n\n<ng-container *ngIf=\"!loading && bizRuleData\">\n <div class=\"status-details\">\n <div class=\"left-section\">\n <span *ngIf=\"bizRuleData?.ogName && userType === 'BUYER'\"\n >OG: <b>{{ bizRuleData?.ogName }}</b></span\n >\n <span\n >Station: <b>{{ bizRuleData?.stationName }}</b></span\n >\n <span *ngIf=\"type !== BizHistoryType.STATION\"\n >Advertiser: <b>{{ bizRuleData?.advertiserName }} </b></span\n >\n <span *ngIf=\"type === BizHistoryType.ORDER\"\n >Order #: <b>{{ orderId }}</b></span\n >\n </div>\n\n <div class=\"right-section\">\n <span\n >Updated On: <b>{{ bizRuleData?.lastEditedAt }} </b></span\n >\n <span class=\"mlr-4\"> | </span>\n <span\n >Updated By:\n <b>\n <ng-container *ngIf=\"bizRuleData?.lastUserTypeToEdit === 'SELLER'\">\n Seller ({{ bizRuleData?.lastSellerToEdit }})\n </ng-container>\n <ng-container *ngIf=\"bizRuleData.lastUserTypeToEdit === 'BUYER'\">\n Buyer ({{ bizRuleData?.lastBuyerToEdit }})\n </ng-container></b\n >\n </span>\n <span class=\"mlr-4\"> | </span>\n <span\n >Status: <b>{{ bizRuleStatus | annaReplaceChar: \"_\" : \" \" | titlecase }}</b></span\n >\n </div>\n </div>\n\n <div\n class=\"comment-container\"\n *ngIf=\"bizRuleData?.comment\"\n >\n <h5>{{ bizRuleData?.lastUserTypeToEdit | titlecase }} Comment</h5>\n {{ bizRuleData?.comment }}\n </div>\n\n <div class=\"station {{ containerClass }} {{ userType }} business-rules-div\">\n <div class=\"row tab-nav-bar\">\n <div\n class=\"biz-rules-tab\"\n *ngFor=\"let tab of businessRuleSectiontabs\"\n >\n <span\n class=\"tab-element\"\n (click)=\"tabChangeClicked(tab)\"\n [ngClass]=\"{ 'tab-active': tab.url === orderCurrentTabUrl }\"\n >\n <span>{{ tab.name }}</span>\n </span>\n </div>\n </div>\n\n <div\n class=\"table-data approval-section-container no-border-bottom\"\n *ngIf=\"orderCurrentTabUrl === bizRuleUrl.Approvals\"\n (scroll)=\"onContainerScroll()\"\n >\n <anna-feature-approval-config\n [approvalConfig]=\"bizRuleData?.approvalConfig\"\n [userType]=\"userType\"\n [isTrafficAnnaOrder]=\"isTrafficAnnaOrder\"\n [businessRulePageType]=\"type | uppercase\"\n [editMode]=\"false\"\n >\n </anna-feature-approval-config>\n </div>\n\n <div\n class=\"table-data daypart-restriction-container\"\n *ngIf=\"orderCurrentTabUrl === bizRuleUrl.DaypartRestriction\"\n >\n <anna-feature-daypart-restrictions\n [data]=\"bizRuleData?.dayAndDaypartRestrictionForMgAndAdu\"\n [isDisabled]=\"true\"\n [highlightChanges]=\"false\"\n >\n </anna-feature-daypart-restrictions>\n </div>\n\n <div\n class=\"table-data equivalent-and-higher-daypart-container\"\n *ngIf=\"orderCurrentTabUrl === bizRuleUrl.EquivalentAndHigherDaypart\"\n >\n <anna-feature-equivalent-and-higher-daypart\n [daypartEquivalenceRules]=\"bizRuleData?.equivalentAndHigherDaypartForMgAndAdu\"\n [isDisabled]=\"true\"\n [highlightChanges]=\"false\"\n [hideInfoMessage]=\"false\"\n >\n </anna-feature-equivalent-and-higher-daypart>\n </div>\n\n <div\n class=\"table-data\"\n [ngClass]=\"{ 'no-border-bottom': !bizRuleDataForHistoryTable?.selectedExcludedPrograms?.length }\"\n *ngIf=\"orderCurrentTabUrl === bizRuleUrl.ExcludePrograms\"\n >\n <anna-feature-excluded-or-special-program\n [tableHeaders]=\"excludedOrSpecialTableHeaders\"\n [editMode]=\"false\"\n [selectedInventories]=\"bizRuleDataForHistoryTable?.selectedExcludedPrograms\"\n [componentName]=\"'EXCLUDED'\"\n [showTotalRow]=\"false\"\n >\n </anna-feature-excluded-or-special-program>\n </div>\n\n <div\n class=\"table-data\"\n [ngClass]=\"{ 'no-border-bottom': !bizRuleDataForHistoryTable?.selectedSpecialPrograms?.length }\"\n *ngIf=\"orderCurrentTabUrl === bizRuleUrl.SpecialPrograms\"\n >\n <anna-feature-excluded-or-special-program\n [tableHeaders]=\"excludedOrSpecialTableHeaders\"\n [editMode]=\"false\"\n [selectedInventories]=\"bizRuleDataForHistoryTable?.selectedSpecialPrograms\"\n [componentName]=\"'SPECIAL'\"\n [isHistoryPage]=\"true\"\n [showTotalRow]=\"false\"\n >\n </anna-feature-excluded-or-special-program>\n </div>\n\n <div\n class=\"mg-adu-table table-data\"\n *ngIf=\"orderCurrentTabUrl === bizRuleUrl.General\"\n >\n <anna-feature-general-rules\n #general\n [generalRules]=\"bizRuleData?.generalRules\"\n [editMode]=\"false\"\n [highlightChanges]=\"false\"\n >\n </anna-feature-general-rules>\n </div>\n\n <div\n class=\"mg-adu-table table-data\"\n *ngIf=\"orderCurrentTabUrl === bizRuleUrl.MG\"\n >\n <anna-feature-make-good-rules\n #makeGood\n [makeGoodValue]=\"bizRuleData?.makeGoodRules\"\n [highlightChanges]=\"false\"\n [isDisabled]=\"true\"\n [editMode]=\"false\"\n [hideRulesTooltipInfo]=\"false\"\n ></anna-feature-make-good-rules>\n </div>\n\n <div\n class=\"table-data mg-adu-table\"\n *ngIf=\"orderCurrentTabUrl === bizRuleUrl.ADU\"\n >\n <anna-feature-adu-rules\n #adu\n [intialAduValue]=\"bizRuleData?.aduRules\"\n [aduValue]=\"bizRuleData?.aduRules\"\n [highlightChanges]=\"false\"\n [isDisabled]=\"true\"\n [editMode]=\"false\"\n [hideRulesTooltipInfo]=\"false\"\n >\n </anna-feature-adu-rules>\n </div>\n </div>\n</ng-container>\n\n<div *ngIf=\"loading\">\n <anna-design-skt-loader\n class=\"col-6 m-auto\"\n [theme]=\"{ display: 'block', width: '33rem', height: '2rem', margin: 'auto' }\"\n ></anna-design-skt-loader>\n\n <anna-design-skt-loader\n class=\"col-12 p-0\"\n [theme]=\"{ display: 'block', width: '95vw', height: '10rem', margin: 'auto' }\"\n ></anna-design-skt-loader>\n <anna-design-skt-loader\n class=\"col-12 p-0\"\n [theme]=\"{ display: 'block', width: '95vw', height: '20rem', margin: '1.25rem auto' }\"\n ></anna-design-skt-loader>\n</div>\n\n<div\n *ngIf=\"!loading && !bizRuleData\"\n class=\"history-no-data\"\n>\n <anna-core-no-data-lib [width]=\"'55%'\"></anna-core-no-data-lib>\n</div>\n\n<ng-template\n #selectedDp\n let-data=\"data\"\n>\n <ng-container *ngIf=\"data && data?.length\">\n <ng-container *ngFor=\"let dp of data; let last = last\">\n {{ dp }}\n <ng-container *ngIf=\"!last\">{{ \", \" }}</ng-container>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!data || data?.length === 0\"> - </ng-container>\n</ng-template>\n","import { NgClass, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n} from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport {\n AnnaCoreModule,\n AnnaFilterService,\n AnnaGlobalConfigService,\n AnnaSortService,\n IGtGeneralConfig,\n IGtTableHeader,\n} from \"@annalib/anna-core\";\nimport { IdText } from \"@annalib/anna-design-components-lib\";\nimport { BizHistoryType } from \"@annalib/anna-feature-lib/anna-feature-shared-lib\";\nimport { NgbModal, NgbModalOptions, NgbModalRef } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep } from \"lodash-es\";\n\nimport { HistoryData } from \"./models/business-rules-history-popup.model\";\n\n@Component({\n selector: \"anna-feature-business-rules-history-popup\",\n templateUrl: \"./business-rules-history-popup.component.html\",\n styleUrls: [\"./business-rules-history-popup.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgIf, AnnaCoreModule, NgClass]\n})\nexport class BusinessRulesHistoryPopupComponent implements OnInit, OnChanges {\n @Input() loading: boolean = true;\n @Input() historyTableData: HistoryData[];\n @Input() componentName: BizHistoryType;\n @Input() advertiserIdText: IdText;\n @Input() stationIdText: IdText;\n @Output() closeModal = new EventEmitter();\n\n historyPopupRef: NgbModalRef;\n BizHistoryType = BizHistoryType;\n tableHeaders: IGtTableHeader[];\n gtGeneralConfig: IGtGeneralConfig;\n gtDimension = { rowHeight: 22, headerHeight: 40, dataOnTopHeight: 290, marginFromBottom: 0 };\n\n historyTableDataCloned: HistoryData[];\n\n @ViewChild(\"historyPopupModal\") private historyPopupModal: TemplateRef<any>;\n\n constructor(\n private modalService: NgbModal,\n private router: Router,\n private annaFilterService: AnnaFilterService,\n private annaSortService: AnnaSortService,\n private annaGlobalConfig: AnnaGlobalConfigService,\n ) {}\n\n ngOnInit(): void {\n this.setTableConfigData();\n setTimeout(() => {\n this.openModal();\n }, 0);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this.initFilters();\n if (changes?.historyTableData?.currentValue) {\n this.historyTableDataCloned = cloneDeep(this.historyTableData);\n this.annaSortService.noSortingAppliedData = cloneDeep(this.historyTableDataCloned);\n }\n }\n\n initFilters() {\n this.annaFilterService.tooltipMap = new Map();\n this.annaFilterService.initialValueMap = new Map();\n this.annaFilterService.tooltipSelectedMap = new Map();\n this.annaSortService.columnSortState = new Map();\n this.annaFilterService.selectedRadio = null;\n this.annaFilterService.appliedFiltersArray = [];\n }\n\n setTableConfigData() {\n this.tableHeaders = this.getTableHeaders();\n\n this.gtGeneralConfig = { ...this.annaGlobalConfig.defaultGtGeneralConfig };\n this.gtGeneralConfig.tableContainerName = \"history-popup-container\";\n }\n\n openModal() {\n const ngbModalOptions: NgbModalOptions = {\n windowClass: \"biz-history-modal\",\n };\n this.historyPopupRef = this.modalService.open(this.historyPopupModal, ngbModalOptions);\n }\n\n createParamsForStationHistory(\n revisionNumber: number,\n stationId: number | string,\n ): {\n stationId: number;\n historyNo: number;\n type: BizHistoryType;\n } {\n return {\n type: BizHistoryType.STATION,\n stationId: +stationId,\n historyNo: +revisionNumber,\n };\n }\n\n createParamsForAdvertiserHistory(\n revisionNumber: number | string,\n stationId: number | string,\n advertiserId: number | string,\n eosUserType: \"REP\" | \"BUYER\" = \"BUYER\",\n ): {\n stationId: number;\n historyNo: number | string;\n type: BizHistoryType;\n advertiserId: number | string;\n EosUserType: \"REP\" | \"BUYER\";\n } {\n return {\n type: BizHistoryType.ADVERTISER,\n stationId: +stationId,\n advertiserId,\n historyNo: revisionNumber,\n EosUserType: eosUserType,\n };\n }\n\n redirectToBizHistory(row: { data: HistoryData }) {\n const link = document.createElement(\"a\");\n let url: string = \"\";\n switch (this.componentName) {\n case BizHistoryType.STATION:\n url = this.router\n .createUrlTree([`/business-rule-history`], {\n queryParams: this.createParamsForStationHistory(row.data.revisionNumber, this.stationIdText.id),\n })\n .toString();\n link.target = \"_blank\";\n link.href = `#${url}`;\n link.setAttribute(\"visibility\", \"hidden\");\n link.click();\n break;\n\n case BizHistoryType.ADVERTISER:\n // eslint-disable-next-line no-case-declarations\n const historyRevisionNo = row.data.navigateTo.split(\"=\")[1];\n if (row.data.navigateTo.includes(\"ADVERTISER-BUSINESS-RULES-HISTORY\")) {\n url = this.router\n .createUrlTree([`/business-rule-history`], {\n queryParams: this.createParamsForAdvertiserHistory(\n historyRevisionNo,\n this.stationIdText.id,\n this.advertiserIdText.id,\n ),\n })\n .toString();\n } else if (row.data.navigateTo.includes(\"BUYER-CONTACT-HISTORY\")) {\n url = this.router\n .createUrlTree([`/buyer-contact-history`], {\n queryParams: this.createParamsForAdvertiserHistory(\n historyRevisionNo,\n this.stationIdText.id,\n this.advertiserIdText.id,\n ),\n })\n .toString();\n } else if (row.data.navigateTo.includes(\"REP-CONTACT-HISTORY\")) {\n url = this.router\n .createUrlTree([`/rep-contact-history`], {\n queryParams: this.createParamsForAdvertiserHistory(\n historyRevisionNo,\n this.stationIdText.id,\n this.advertiserIdText.id,\n 'REP'\n ),\n })\n .toString();\n }\n link.target = \"_blank\";\n link.href = `#${url}`;\n link.setAttribute(\"visibility\", \"hidden\");\n link.click();\n break;\n\n case BizHistoryType.ORDER:\n url = this.router\n .createUrlTree([`/business-rule-history`], {\n queryParams: this.createParamsForAdvertiserHistory(\n row.data.revisionNumber,\n this.stationIdText.id,\n this.advertiserIdText.id,\n ),\n })\n .toString();\n link.target = \"_blank\";\n link.href = `#${url}`;\n link.setAttribute(\"visibility\", \"hidden\");\n link.click();\n break;\n // no default\n }\n }\n\n filterAppliedToTable(filteredData: HistoryData[]) {\n this.historyTableData = cloneDeep(filteredData);\n }\n\n sortingAppliedToTable(sortedData: HistoryData[]) {\n this.historyTableData = cloneDeep(sortedData);\n }\n\n closeHistoryPopup() {\n this.historyPopupRef.close();\n this.closeModal.emit();\n }\n\n getTableHeaders(): IGtTableHeader[] {\n return [\n {\n headerInfo: [\n {\n name: \"STATUS\",\n objectKey: \"status\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"status\"],\n },\n ],\n visible: true,\n width: \"304px\",\n },\n {\n headerInfo: [\n {\n name: \"USER\",\n objectKey: \"user\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"user\"],\n },\n ],\n visible: true,\n width: \"129px\",\n },\n {\n headerInfo: [\n {\n name: \"UPDATED ON\",\n objectKey: \"updatedOn\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: false,\n isSortRequired: [false],\n isFilterRequired: [false],\n filter: \"TIME\",\n filterSortObjectKeys: [\"updatedOn\"],\n },\n ],\n visible: true,\n width: \"120px\",\n },\n {\n headerInfo: [\n {\n name: \"\",\n objectKey: \"textActionsViewLink\",\n actionKey: \"textActionsViewLink\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"CLICKABLE_DATA\",\n showTooltipIcon: false,\n },\n ],\n visible: true,\n width: \"60px\",\n },\n ];\n }\n}\n","<ng-template\n #historyPopupModal\n let-modal\n>\n <div class=\"modal-header\">\n <i\n class=\"mi mdi-close-icon mdi-font-md close float-end\"\n (click)=\"closeHistoryPopup()\"\n ></i>\n <h3\n class=\"modal-title\"\n *ngIf=\"componentName === BizHistoryType.ADVERTISER\"\n >\n Advertiser History\n </h3>\n <h3\n class=\"modal-title\"\n *ngIf=\"componentName === BizHistoryType.STATION\"\n >\n Station Business Rules History\n </h3>\n </div>\n\n <div class=\"modal-body\">\n <div class=\"meta-data\">\n <span>\n Station: <b>{{ stationIdText?.text }}</b></span\n >\n <span *ngIf=\"componentName === BizHistoryType.ADVERTISER\"\n >Advertiser: <b>{{ advertiserIdText?.text }}</b></span\n >\n </div>\n\n <anna-core-non-editable-generic-table-lib\n [ngClass]=\"{ 'biz-history-popup-no-data-table': !loading && historyTableData && !historyTableData.length }\"\n class=\"biz-history-gt-table\"\n [fixNumberOfRowsForPopup]=\"true\"\n [showSkeletonLoading]=\"loading\"\n [tableHeaders]=\"tableHeaders\"\n [tableData]=\"historyTableData\"\n [clonedTableData]=\"historyTableDataCloned\"\n [gtGeneralConfig]=\"gtGeneralConfig\"\n [gtDimension]=\"gtDimension\"\n (clickableDataClicked)=\"redirectToBizHistory($event)\"\n (filterAppliedToTable)=\"filterAppliedToTable($event)\"\n (sortingAppliedToTable)=\"sortingAppliedToTable($event)\"\n >\n </anna-core-non-editable-generic-table-lib>\n </div>\n</ng-template>\n","import { TextAction } from \"@annalib/anna-core\";\nimport { BizHistoryType } from \"@annalib/anna-feature-lib/anna-feature-shared-lib\";\n\nexport class HistoryList {\n histories: HistoryData[] = [];\n constructor(historyList: any, type: BizHistoryType) {\n for (let i = 0; i < historyList?.length; i++) {\n this.histories.push(new HistoryData(historyList[i], i, type));\n }\n }\n}\n\nexport class HistoryData {\n user: number;\n status: string;\n updatedOn: string;\n revisionNumber: number;\n textActionsViewLink: TextAction[] = [];\n navigateTo?: \"BUYER-CONTACT-HISTORY\" | \"REP-CONTACT-HISTORY\" | \"ADVERTISER-BUSINESS-RULES-HISTORY\";\n constructor(data: any, index: number, type: BizHistoryType) {\n this.user = data.UserName;\n this.status = data.Status;\n this.updatedOn = data.UpdatedOn;\n this.revisionNumber = data.Id;\n if (type === BizHistoryType.ADVERTISER) {\n this.textActionsViewLink =\n data.NavigateTo === null\n ? [{ id: 1, name: \"-\", class: \"no-data\", isDisabled: true }]\n : (this.textActionsViewLink = [{ id: 1, name: \"View\", class: \"edit-action\", isDisabled: false }]);\n } else {\n // eslint-disable-next-line no-lonely-if\n if (index === 0) {\n this.status = `${data.Status} (Current)`;\n this.textActionsViewLink = [{ id: 1, name: \"-\", class: \"no-data\", isDisabled: true }];\n } else {\n this.textActionsViewLink = [{ id: 1, name: \"View\", class: \"edit-action\", isDisabled: false }];\n }\n }\n\n this.navigateTo = data.NavigateTo;\n }\n}\n","export class BuyerContactHistoryDetails {\n updatedByUser: string;\n updatedOnTime: string;\n advertiserName: string;\n orderNumber: string;\n stationName: string;\n ogName: string;\n buyerContacts: BuyerContactsForHistory[] = [];\n constructor(data: any) {\n this.updatedByUser = data.UpdatedByUser || \"\";\n this.updatedOnTime = data.UpdatedOnTime || \"\";\n this.advertiserName = data.AdvertiserName || null;\n this.orderNumber = data.OrderNumber || null;\n this.stationName = data.StationName || \"\";\n this.ogName = data.ogName || null;\n data?.BuyerContacts?.forEach((buyer: any) => {\n this.buyerContacts.push(new BuyerContactsForHistory(buyer));\n });\n }\n}\nexport class BuyerContactsForHistory {\n buyerName: string;\n email: string;\n phoneNumber: string;\n constructor(data: any) {\n this.buyerName = data.FullName;\n this.email = data.Email;\n this.phoneNumber = data.ContactNumber || \"-\";\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport {\n AnnaGlobalConfigService,\n AnnaNonEditableGenericTableComponent,\n IGtGeneralConfig,\n IGtTableHeader,\n} from \"@annalib/anna-core\";\nimport cloneDeep from \"lodash-es/cloneDeep\";\n\nimport { BusinessPageType } from \"../business-rule-page/models/business-rule-page.constants\";\nimport { BuyerContactHistoryDetails, BuyerContactsForHistory } from \"./models/buyer-contact-history.model\";\n\n@Component({\n selector: \"anna-feature-buyer-contact-history\",\n imports: [CommonModule, AnnaNonEditableGenericTableComponent],\n templateUrl: \"./buyer-contact-history.component.html\",\n styleUrls: [\"./buyer-contact-history.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BuyerContactHistoryComponent implements OnChanges, OnInit {\n type: BusinessPageType = BusinessPageType.ADVERTISER;\n @Input() buyerContactHistoryDetails: BuyerContactHistoryDetails;\n @Input() loading: boolean;\n @Input() tableHeaders: IGtTableHeader[];\n @Input() userType: \"SELLER\" | \"BUYER\" = \"SELLER\";\n gtGeneralConfig: IGtGeneralConfig;\n gtDimension = { rowHeight: 25, headerHeight: 40, dataOnTopHeight: 168, marginFromBottom: 0 };\n eosUserType: \"BUYER\" | \"REP\";\n buyerContactTableData: BuyerContactsForHistory[] = [];\n\n constructor(\n private globalConfig: AnnaGlobalConfigService,\n private route: ActivatedRoute,\n ) {\n this.setTableConfigData();\n }\n ngOnChanges(changes: SimpleChanges) {\n if (changes?.buyerContactHistoryDetails) {\n this.buyerContactTableData = this.buyerContactHistoryDetails\n ? cloneDeep(this.buyerContactHistoryDetails?.buyerContacts)\n : [];\n }\n }\n ngOnInit(): void {\n this.detectURLChanges();\n }\n detectURLChanges() {\n this.route.queryParams.subscribe((params: any) => {\n this.type = params.type.toUpperCase() as BusinessPageType;\n });\n }\n setTableConfigData() {\n this.gtGeneralConfig = { ...this.globalConfig.defaultGtGeneralConfig };\n this.gtGeneralConfig.verticalScrollOffsetForFilterTooltip = 200;\n }\n}\n","<div class=\"heading\">{{ type | uppercase }} HISTORY</div>\n<div class=\"status-details\">\n <div class=\"left-section\">\n <span *ngIf=\"buyerContactHistoryDetails?.ogName && userType === 'BUYER'\"\n >OG: <b>{{buyerContactHistoryDetails?.ogName }}</b></span\n >\n <span\n >Station: <b>{{ buyerContactHistoryDetails?.stationName ? buyerContactHistoryDetails?.stationName : '-'}}</b></span\n >\n <span *ngIf=\"type === 'ADVERTISER'\"\n >Advertiser: <b>{{ buyerContactHistoryDetails?.advertiserName ? buyerContactHistoryDetails?.advertiserName : '-' }} </b></span\n >\n <span *ngIf=\"type === 'ORDER'\"\n >Order #: <b>{{ buyerContactHistoryDetails?.orderNumber ? buyerContactHistoryDetails?.orderNumber : '-' }}</b></span\n >\n </div>\n <div class=\"right-section\">\n <span\n >Updated By:\n <b> {{ buyerContactHistoryDetails?.updatedByUser || '-' }} </b>\n </span>\n <span class=\"mlr-4\"> | </span>\n <span\n >Updated On: <b>{{ buyerContactHistoryDetails?.updatedOnTime || '-' }} </b></span\n >\n </div>\n\n \n</div>\n\n<div class=\"history-table-container\">\n <anna-core-non-editable-generic-table-lib\n [showSkeletonLoading]=\"loading\"\n [tableHeaders]=\"tableHeaders\"\n [tableData]=\"buyerContactTableData\"\n [clonedTableData]=\"buyerContactTableData\"\n [gtGeneralConfig]=\"gtGeneralConfig\"\n [gtDimension]=\"gtDimension\"\n [clickableRow]=\"false\"\n >\n </anna-core-non-editable-generic-table-lib>\n</div>","export enum BuyerLevel {\n ORDER = \"ORDER\",\n ADVERTISER = \"ADVERTISER\",\n}\nexport enum BuyerLevelText {\n ORDER = \"Order\",\n ADVERTISER = \"Advertiser\",\n}\nexport enum EOSApplicationUserType {\n BUYER = \"BUYER\",\n REP = \"REP\",\n}\nexport enum EOSUserTypeText {\n BUYER = \"buyer\",\n REP = \"rep\",\n}\nexport enum BuyerRepContactPopupActionEnum {\n ADD = \"ADD\",\n EDIT = \"EDIT\",\n}\nexport class RepAndBuyerContactDetails {\n initials: string;\n firstName: string;\n lastName: string;\n phoneNumber: string;\n email: string;\n disableEdit: boolean;\n buyerLevel: string;\n isEditMode: boolean = false;\n isDeleted: boolean = false;\n allowEmailEdit: boolean = true;\n isFirstNameInvalid: boolean = false;\n isLastNameInvalid: boolean = false;\n isPhoneNumberInvalid: boolean = false;\n isEmailInvalid: boolean = false;\n isDuplicateEmail: boolean = false;\n buyerLevelMsg?: string;\n\n constructor(data: any, userType: EOSApplicationUserType) {\n this.firstName = data.FirstName || null;\n this.lastName = data.LastName || \"\";\n this.initials = RepAndBuyerContactDetails.computeInitials(this.firstName, this.lastName);\n this.phoneNumber = data.Phone || \"\";\n this.email = data.Email || \"\";\n this.disableEdit = data.DisableEdit || false;\n this.buyerLevel =\n data.ContactLevel === BuyerLevel.ADVERTISER ? BuyerLevelText.ADVERTISER : BuyerLevelText.ORDER;\n const userText = userType === EOSApplicationUserType.BUYER ? EOSUserTypeText.BUYER : EOSUserTypeText.REP;\n this.buyerLevelMsg =\n data.ContactLevel === BuyerLevel.ADVERTISER ? `Advertiser-level ${userText}` : `Order-level ${userText}`;\n }\n\n static computeInitials(firstName: string, lastName: string): string {\n const firstInitial = firstName ? firstName.charAt(0).toUpperCase() : \"\";\n const lastInitial = lastName ? lastName.charAt(0).toUpperCase() : firstName?.charAt(1).toUpperCase();\n return `${firstInitial}${lastInitial}`;\n }\n}\n\nexport class RepAndBuyerContactList {\n users: RepAndBuyerContactDetails[] = [];\n hideEditButton: boolean;\n constructor(data: any, userType: EOSApplicationUserType) {\n this.hideEditButton = !data.ShowEditButton;\n data?.EosUsers?.forEach((buyer: any) => {\n this.users.push(new RepAndBuyerContactDetails(buyer, userType));\n });\n }\n}\nexport class BuyerContactRequest {\n firstName: string;\n lastName: string;\n email: string;\n phone: string;\n constructor(data: RepAndBuyerContactDetails) {\n this.firstName = data.firstName ? data.firstName.trim() : null;\n this.lastName = data.lastName ? data.lastName.trim() : null;\n this.email = data.email ? data.email.trim().toLowerCase() : null;\n this.phone = data.phoneNumber ? data.phoneNumber.trim() : null;\n }\n}\n","import { CommonModule, NgFor, NgForOf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport {\n FixedRowsPopupTableDirective,\n RegexPatternsService,\n ShowEllipsisTextOnHoverDirective,\n} from \"@annalib/anna-core\";\nimport { NgbTooltip } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep, isEqual } from \"lodash-es\";\n\nimport { BusinessPageType } from \"../business-rule-page/models/business-rule-page.constants\";\nimport {\n BuyerContactRequest,\n BuyerRepContactPopupActionEnum,\n EOSApplicationUserType,\n RepAndBuyerContactDetails,\n RepAndBuyerContactList,\n} from \"../buyer-contact-section/models/buyer-contact.model\";\nimport { BUYER_CONTACT_SERVICE_TOKEN, IBuyerContactBackendService } from \"./services/buyer-contact-token.service\";\n\n@Component({\n selector: \"anna-feature-add-edit-buyer-contact-popup\",\n imports: [\n CommonModule,\n ShowEllipsisTextOnHoverDirective,\n NgFor,\n NgForOf,\n FixedRowsPopupTableDirective,\n ReactiveFormsModule,\n FormsModule,\n NgbTooltip,\n ],\n templateUrl: \"./add-edit-buyer-contact-popup.component.html\",\n styleUrls: [\"./add-edit-buyer-contact-popup.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AddEditBuyerContactPopupComponent implements OnChanges, OnInit {\n @Input() actionType: BuyerRepContactPopupActionEnum = BuyerRepContactPopupActionEnum.ADD;\n @Input() businessRulesLevel: BusinessPageType = BusinessPageType.ADVERTISER;\n @Input() buyerContactList: RepAndBuyerContactList;\n @Input() canDeleteAllBuyers: boolean;\n @Input() userType: EOSApplicationUserType = EOSApplicationUserType.BUYER;\n @Input() stationId: number;\n @Output() closeModal = new EventEmitter<boolean>();\n @Output() saveBuyerEmitter = new EventEmitter<any>();\n BusinessPageType = BusinessPageType;\n buyers: RepAndBuyerContactDetails[] = [];\n clonnedBuyers: RepAndBuyerContactDetails[] = [];\n disableSaveButton: boolean = true;\n isSingleBuyerPresent: boolean = false;\n isFormValid: boolean = false;\n isSingleBuyerPresentButAllContactsDeleted: boolean = false;\n modalTitle: string;\n topMessage: string;\n validDomains: string[] = [];\n EOSApplicationUserType = EOSApplicationUserType;\n BuyerRepContactPopupActionEnum = BuyerRepContactPopupActionEnum;\n\n constructor(\n private regexPatternService: RegexPatternsService,\n @Inject(BUYER_CONTACT_SERVICE_TOKEN) public consumingProjectBizRulesService: IBuyerContactBackendService,\n ) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.buyerContactList) {\n if (this.buyerContactList.users.length === 0) {\n this.addBuyer();\n } else {\n this.buyers = cloneDeep(this.buyerContactList.users);\n }\n this.clonnedBuyers = cloneDeep(this.buyers);\n this.isSingleBuyerPresent = this.isOnlySingleBuyerPresent();\n this.isSingleBuyerPresentButAllContactsDeleted = this.checkIfAllExistingBuyerContactsDeleted();\n }\n if (changes.stationId.currentValue) {\n if (this.userType === EOSApplicationUserType.REP) {\n this.loadValidDomains();\n }\n }\n }\n ngOnInit() {\n this.setModalTitleAndTopMessage();\n this.checkSaveEnableDisable();\n }\n setModalTitleAndTopMessage() {\n const isBuyer = this.userType === EOSApplicationUserType.BUYER;\n const isAddAction = this.actionType === BuyerRepContactPopupActionEnum.ADD;\n const isAdvertiserLevel = this.businessRulesLevel === BusinessPageType.ADVERTISER;\n\n if (isAddAction) {\n this.modalTitle = isBuyer ? \"Add Buyers\" : \"Add Reps\";\n } else {\n this.modalTitle = isBuyer ? \"Edit Buyers\" : \"Edit Reps\";\n }\n\n if (isBuyer) {\n if (isAddAction) {\n this.topMessage = isAdvertiserLevel\n ? \"Please add the buyer(s) for this advertiser in the section below.\"\n : \"Please add the buyer(s) for this order in the section below.\";\n } else {\n this.topMessage = isAdvertiserLevel\n ? \"Update the buyer(s) for this advertiser in the section below.\"\n : \"Update the buyer(s) for this order in the section below. You can only add/edit the order level buyers here.\";\n }\n } else {\n // eslint-disable-next-line no-lonely-if\n if (isAddAction) {\n this.topMessage = isAdvertiserLevel\n ? \"Please add the Reps for this advertiser in the section below. They will have view access to advertiser and it's electronic orders on EOS but no modification rights.\"\n : \"Please add the Reps for this order in the section below. They will have view access on EOS but no modification rights. Advertiser Reps that have already been added are not editable here.\";\n } else {\n this.topMessage = isAdvertiserLevel\n ? \"Update the rep(s) for this advertiser in the section below. They will have view access to advertiser and it's electronic orders on EOS but no modification rights.\"\n : \"Update the rep(s) for this order in the section below. They will have view access on EOS but no modification rights. You can only add/edit the order level reps here.\";\n }\n }\n }\n\n addBuyer() {\n this.buyers.push({\n initials: \"\",\n firstName: \"\",\n lastName: \"\",\n phoneNumber: \"\",\n email: \"\",\n disableEdit: false,\n buyerLevel: this.businessRulesLevel === BusinessPageType.ADVERTISER ? \"Advertiser\" : \"Order\",\n isEditMode: true,\n isDeleted: false,\n allowEmailEdit: true,\n isFirstNameInvalid: false,\n isLastNameInvalid: false,\n isPhoneNumberInvalid: false,\n isEmailInvalid: false,\n isDuplicateEmail: false,\n });\n this.isSingleBuyerPresent = this.isOnlySingleBuyerPresent();\n this.isSingleBuyerPresentButAllContactsDeleted = this.checkIfAllExistingBuyerContactsDeleted();\n this.checkSaveEnableDisable();\n }\n\n deleteBuyer(index: number) {\n this.buyers[index].isDeleted = true;\n this.checkSaveEnableDisable();\n this.buyers.forEach((buyer) => {\n this.validateEmail(buyer);\n });\n }\n\n editBuyer(buyer: RepAndBuyerContactDetails) {\n buyer.isEditMode = true;\n buyer.allowEmailEdit = false;\n }\n\n checkSaveEnableDisable() {\n this.isSingleBuyerPresent = this.isOnlySingleBuyerPresent();\n this.isSingleBuyerPresentButAllContactsDeleted = this.checkIfAllExistingBuyerContactsDeleted();\n this.isFormValid = this.isContactFormValid();\n if (this.actionType === BuyerRepContactPopupActionEnum.ADD) {\n this.disableSaveButton = !this.isFormValid;\n }\n if (this.actionType === BuyerRepContactPopupActionEnum.EDIT) {\n this.disableSaveButton =\n !this.isFormValid ||\n isEqual(\n this.deepOmit(this.clonnedBuyers, [\"isEditMode\", \"allowEmailEdit\"]),\n this.deepOmit(this.buyers, [\"isEditMode\", \"allowEmailEdit\"]),\n );\n }\n }\n deepOmit<T extends Record<string, any>>(obj: T, keysToOmit: string[]): T {\n if (Array.isArray(obj)) {\n return obj.map((item) => this.deepOmit(item, keysToOmit)) as unknown as T;\n } else if (typeof obj === \"object\" && obj !== null) {\n return Object.keys(obj).reduce((acc: any, key) => {\n if (!keysToOmit.includes(key)) {\n acc[key] = this.deepOmit(obj[key], keysToOmit);\n }\n return acc;\n }, {} as T);\n }\n return obj;\n }\n loadValidDomains() {\n this.consumingProjectBizRulesService.validateEmailDomains(this.stationId).subscribe((response) => {\n this.validDomains = response.body.map((domain: string) =>\n domain.startsWith(\"@\") ? domain.substring(1).toLowerCase() : domain.toLowerCase(),\n );\n });\n }\n isContactFormValid(): boolean {\n const invalidBuyers = this.buyers.filter(\n (buyer) =>\n buyer.isEmailInvalid ||\n buyer.isFirstNameInvalid ||\n buyer.isLastNameInvalid ||\n buyer.isPhoneNumberInvalid ||\n buyer.isDuplicateEmail ||\n buyer.email.trim() === \"\" ||\n buyer.firstName.trim() === \"\",\n );\n return invalidBuyers.length === 0;\n }\n isOnlySingleBuyerPresent(): boolean {\n const filteredBuyers = this.buyers.filter(\n (buyer) =>\n !buyer.isDeleted &&\n buyer.firstName.trim().length > 0 &&\n buyer.email.trim().length > 0 &&\n !buyer.isEmailInvalid &&\n !buyer.isFirstNameInvalid &&\n !buyer.isDuplicateEmail &&\n !buyer.isLastNameInvalid &&\n !buyer.isPhoneNumberInvalid,\n );\n return filteredBuyers.length === 1;\n }\n checkIfAllExistingBuyerContactsDeleted() {\n const filteredBuyers = this.buyers.filter((buyer) => !buyer.isDeleted);\n return filteredBuyers.length === 1;\n }\n\n resetBuyer(buyer: RepAndBuyerContactDetails, index: number) {\n if (this.clonnedBuyers && this.clonnedBuyers[index]) {\n const previousBuyerDetails = this.clonnedBuyers[index];\n this.buyers[index] = previousBuyerDetails;\n buyer.isEditMode = false;\n this.buyers = cloneDeep(this.buyers);\n this.checkSaveEnableDisable();\n } else {\n this.removeBuyerFromList(index);\n }\n }\n removeBuyerFromList(index: number) {\n this.buyers = this.buyers.filter((buyer, i) => index !== i);\n this.buyers.forEach((buyer) => {\n this.validateEmail(buyer);\n });\n this.checkSaveEnableDisable();\n }\n\n validateBuyerFirstName(buyer: RepAndBuyerContactDetails) {\n const namePattern = this.regexPatternService.buyerNamePattern;\n buyer.isFirstNameInvalid =\n !buyer.firstName.trim() || buyer.firstName.length > 20 || !namePattern.test(buyer.firstName);\n this.checkSaveEnableDisable();\n }\n validateBuyerLastName(buyer: RepAndBuyerContactDetails) {\n const namePattern = this.regexPatternService.buyerNamePattern;\n if (buyer.lastName.trim() === \"\") {\n buyer.isLastNameInvalid = false;\n } else {\n buyer.isLastNameInvalid = buyer.lastName.length > 20 || !namePattern.test(buyer.lastName);\n }\n this.checkSaveEnableDisable();\n }\n validateEmail(buyer: RepAndBuyerContactDetails) {\n const { emailPattern } = this.regexPatternService;\n\n const emailDomain = buyer.email.split(\"@\")[1]?.toLowerCase();\n\n const duplicate =\n this.buyers.filter((b) => b.email.toLowerCase() === buyer.email.toLowerCase() && b.isDeleted === false)\n .length > 1;\n buyer.isDuplicateEmail = duplicate;\n buyer.isEmailInvalid =\n buyer.email.length === 0 ||\n !emailPattern.test(buyer.email) ||\n (this.userType === EOSApplicationUserType.REP && !this.validDomains.includes(emailDomain));\n this.checkSaveEnableDisable();\n }\n\n validatePhoneNumber(buyer: RepAndBuyerContactDetails) {\n const { phonePattern } = this.regexPatternService;\n if (buyer.phoneNumber.trim() === \"\") {\n buyer.isPhoneNumberInvalid = false;\n } else {\n buyer.isPhoneNumberInvalid = !phonePattern.test(buyer.phoneNumber);\n }\n\n this.checkSaveEnableDisable();\n }\n closePopup() {\n this.closeModal.emit(true);\n }\n saveBuyerContacts() {\n const buyersToBeSaved: BuyerContactRequest[] = this.buyers\n .filter(\n (buyer) =>\n !buyer.isDeleted &&\n (this.businessRulesLevel === BusinessPageType.ORDER\n ? buyer.buyerLevel.toUpperCase() === \"ORDER\"\n : true),\n )\n .map((buyer) => new BuyerContactRequest(buyer));\n\n this.saveBuyerEmitter.emit(buyersToBeSaved);\n }\n}\n","<section class=\"main-modal\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ modalTitle }}</h3>\n </div>\n <div class=\"modal-body\">\n <div class=\"top-msg\">\n {{ topMessage }}\n </div>\n\n <div\n class=\"buyer-contact-table-container\"\n annaCoreFixedRowsInPopupTable\n [popupRowHeight]=\"33\"\n [popupHeaderHeight]=\"32\"\n >\n <table class=\"table-container\">\n <thead>\n <tr>\n <th>FIRST NAME</th>\n <th>LAST NAME</th>\n <th>EMAIL</th>\n <th>PHONE NUMBER</th>\n <th>{{ userType === EOSApplicationUserType.BUYER ? \"BUYER LEVEL\" : \"REP LEVEL\" }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let buyer of buyers; let i = index\">\n <td>\n <ng-container *ngIf=\"buyer.isEditMode\">\n <input\n [(ngModel)]=\"buyer.firstName\"\n (input)=\"validateBuyerFirstName(buyer)\"\n [ngClass]=\"{ error: buyer.isFirstNameInvalid }\"\n maxlength=\"20\"\n placeholder=\"Enter first name\"\n />\n <i\n *ngIf=\"\n buyer.isFirstNameInvalid &&\n userType === EOSApplicationUserType.BUYER\n \"\n class=\"mdi mdi-alert-octagon\"\n container=\"body\"\n [ngbTooltip]=\"nameValidation\"\n placement=\"bottom\"\n ></i>\n </ng-container>\n <ng-container *ngIf=\"!buyer.isEditMode\">\n <span\n annaCoreShowEllipsisTextOnHover\n [ngClass]=\"{ 'deleted-text': buyer.isDeleted }\"\n >{{ buyer.firstName ? buyer.firstName : \"-\" }}</span\n >\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"buyer.isEditMode\">\n <input\n [(ngModel)]=\"buyer.lastName\"\n [ngClass]=\"{ error: buyer.isLastNameInvalid }\"\n (input)=\"validateBuyerLastName(buyer)\"\n maxlength=\"20\"\n placeholder=\"Enter last name\"\n />\n <i\n *ngIf=\"\n buyer.isLastNameInvalid &&\n userType === EOSApplicationUserType.BUYER\n \"\n class=\"mdi mdi-alert-octagon\"\n container=\"body\"\n [ngbTooltip]=\"nameValidation\"\n placement=\"bottom\"\n ></i>\n </ng-container>\n <ng-container *ngIf=\"!buyer.isEditMode\">\n <span\n annaCoreShowEllipsisTextOnHover\n [ngClass]=\"{ 'deleted-text': buyer.isDeleted }\"\n >{{ buyer.lastName ? buyer.lastName : \"-\" }}</span\n >\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"buyer.isEditMode && buyer.allowEmailEdit\">\n <input\n [(ngModel)]=\"buyer.email\"\n (input)=\"validateEmail(buyer)\"\n [ngClass]=\"{ 'email-error': buyer.isEmailInvalid || buyer.isDuplicateEmail }\"\n placeholder=\"Enter email\"\n />\n <i\n *ngIf=\"\n buyer.isEmailInvalid &&\n !buyer.isDuplicateEmail &&\n userType === EOSApplicationUserType.BUYER\n \"\n class=\"mdi mdi-alert-octagon\"\n container=\"body\"\n [ngbTooltip]=\"'Please enter valid email.'\"\n placement=\"bottom\"\n ></i>\n <i\n *ngIf=\"\n buyer.isEmailInvalid &&\n !buyer.isDuplicateEmail &&\n userType === EOSApplicationUserType.REP\n \"\n class=\"mdi mdi-alert-octagon\"\n container=\"body\"\n [ngbTooltip]=\"domainTooltip\"\n placement=\"bottom\"\n ></i>\n <i\n *ngIf=\"!buyer.isEmailInvalid && buyer.isDuplicateEmail\"\n class=\"mdi mdi-alert-octagon\"\n container=\"body\"\n [ngbTooltip]=\"'This email is already associated with an existing user'\"\n placement=\"bottom\"\n ></i>\n </ng-container>\n <ng-container *ngIf=\"!buyer.isEditMode || !buyer.allowEmailEdit\">\n <span\n annaCoreShowEllipsisTextOnHover\n [ngClass]=\"{ 'deleted-text': buyer.isDeleted }\"\n >{{ buyer.email ? buyer.email : \"-\" }}</span\n >\n </ng-container>\n </td>\n <td>\n <ng-container *ngIf=\"buyer.isEditMode\">\n <input\n [(ngModel)]=\"buyer.phoneNumber\"\n (input)=\"validatePhoneNumber(buyer)\"\n [ngClass]=\"{ error: buyer.isPhoneNumberInvalid }\"\n placeholder=\"Enter phone no.\"\n />\n <i\n *ngIf=\"buyer.isPhoneNumberInvalid\"\n class=\"mdi mdi-alert-octagon\"\n container=\"body\"\n placement=\"bottom\"\n [ngbTooltip]=\"'Phone format: (000)000-0000'\"\n ></i>\n </ng-container>\n <ng-container *ngIf=\"!buyer.isEditMode\">\n <span\n annaCoreShowEllipsisTextOnHover\n [ngClass]=\"{ 'deleted-text': buyer.isDeleted }\"\n >{{ buyer.phoneNumber ? buyer.phoneNumber : \"-\" }}</span\n >\n </ng-container>\n </td>\n <td>\n <span\n [ngClass]=\"{ 'deleted-text': buyer.isDeleted }\"\n annaCoreShowEllipsisTextOnHover\n >{{ buyer.buyerLevel }}</span\n >\n </td>\n <td>\n <div\n class=\"icons-container\"\n *ngIf=\"\n !buyer.isDeleted &&\n !(\n businessRulesLevel === BusinessPageType.ORDER &&\n buyer.buyerLevel === 'Advertiser'\n )\n \"\n >\n <i\n *ngIf=\"actionType === BuyerRepContactPopupActionEnum.EDIT && !buyer.isEditMode\"\n class=\"mdi mdi-delete\"\n (click)=\"deleteBuyer(i)\"\n [ngClass]=\"{ 'disabled-icons': isSingleBuyerPresent && !canDeleteAllBuyers }\"\n ></i>\n\n <i\n *ngIf=\"actionType === BuyerRepContactPopupActionEnum.EDIT && !buyer.isEditMode\"\n class=\"mdi mdi-pencil\"\n (click)=\"editBuyer(buyer)\"\n ></i>\n\n <i\n *ngIf=\"actionType === BuyerRepContactPopupActionEnum.EDIT && buyer.isEditMode\"\n [ngClass]=\"{\n 'disabled-icons': isSingleBuyerPresentButAllContactsDeleted && !clonnedBuyers[i]\n }\"\n class=\"mdi mdi-close-circle-outline\"\n (click)=\"resetBuyer(buyer, i)\"\n ></i>\n\n <i\n *ngIf=\"actionType === BuyerRepContactPopupActionEnum.ADD\"\n [ngClass]=\"{ 'disabled-icons': buyers.length === 1 }\"\n class=\"mdi mdi-close-circle-outline\"\n (click)=\"removeBuyerFromList(i)\"\n ></i>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <a\n (click)=\"addBuyer()\"\n class=\"add-buyer-link\"\n [class.disabled]=\"!isFormValid\"\n >{{ userType === EOSApplicationUserType.BUYER ? \"Add Buyer\" : \"Add Rep\" }}</a\n >\n\n <div class=\"button-container\">\n <button\n class=\"anna cancel-button\"\n (click)=\"closePopup()\"\n >\n Cancel\n </button>\n <button\n class=\"anna apply-button\"\n [disabled]=\"disableSaveButton\"\n (click)=\"saveBuyerContacts()\"\n >\n Save\n </button>\n </div>\n </div>\n</section>\n<ng-template #domainTooltip>\n Please use an email that ends with '{{ validDomains?.length > 1 ? validDomains.join(\", \") : validDomains[0] }}'.\n</ng-template>\n\n<ng-template #nameValidation>\n <div>\n <ul>\n <li>Name should start with a letter</li>\n <li>Characters allowed: A-Z, a-z, . , ‘, -</li>\n <li>Maximum characters allowed:20</li>\n </ul>\n </div>\n</ng-template>\n","import { CommonModule, NgFor, NgForOf } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, Input, OnInit } from \"@angular/core\";\nimport { NgbTooltip } from \"@ng-bootstrap/ng-bootstrap\";\n\nimport { BusinessPageType } from \"../business-rule-page/models/business-rule-page.constants\";\nimport { RepAndBuyerContactDetails } from \"../buyer-contact-section/models/buyer-contact.model\";\n\n@Component({\n selector: \"anna-feature-avatar\",\n imports: [CommonModule, NgForOf, NgFor, NgbTooltip],\n templateUrl: \"./avatar.component.html\",\n styleUrls: [\"./avatar.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AvatarComponent implements OnInit {\n @Input() initials: string = null;\n @Input() buyer: RepAndBuyerContactDetails;\n @Input() businessRulesPageType: BusinessPageType;\n @Input() tooltipMessage: string = null;\n @Input() colorOptions: string[] = [\"#F2BDEF\", \"#CDEF80\", \"#92BDED\"];\n\n BusinessPageType = BusinessPageType;\n avatarBgColor: string = \"\";\n static colorIndex: number = 0;\n\n ngOnInit(): void {\n this.assignSequentialColor();\n }\n assignSequentialColor(): void {\n this.avatarBgColor = this.colorOptions[AvatarComponent.colorIndex];\n AvatarComponent.colorIndex = (AvatarComponent.colorIndex + 1) % this.colorOptions.length;\n }\n}\n","<div\n class=\"avatar-circle\"\n [style.backgroundColor]=\"avatarBgColor\"\n [ngbTooltip]=\"avatarTooltip\"\n placement=\"bottom\"\n container=\"body\"\n>\n {{ buyer.initials }}\n</div>\n\n<ng-template #avatarTooltip>\n <ng-container *ngIf=\"businessRulesPageType === BusinessPageType.ORDER\">\n <span class=\"black-text-avatar\">{{ buyer.buyerLevelMsg }} </span>\n <br />\n </ng-container>\n <span class=\"bold-text-avatar\"> {{ buyer.firstName }} {{ buyer.lastName || \"\" }} </span>\n <br />\n <span class=\"grey-text-avatar\">\n {{ buyer.email }} <span *ngIf=\"buyer.phoneNumber\"> | {{ buyer.phoneNumber }}</span>\n </span>\n</ng-template>\n","import { CommonModule, NgFor, NgForOf, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n} from \"@angular/core\";\nimport { NgbModal, NgbModalOptions, NgbModalRef, NgbTooltip, NgbTooltipModule } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep } from \"lodash-es\";\n\nimport { AddEditBuyerContactPopupComponent } from \"../add-edit-buyer-contact-popup/add-edit-buyer-contact-popup.component\";\nimport { AvatarComponent } from \"../avatar/avatar.component\";\nimport { BusinessPageType } from \"../business-rule-page/models/business-rule-page.constants\";\nimport {\n BuyerContactRequest,\n BuyerRepContactPopupActionEnum,\n EOSApplicationUserType,\n RepAndBuyerContactDetails,\n RepAndBuyerContactList,\n} from \"./models/buyer-contact.model\";\n\n@Component({\n selector: \"anna-feature-buyer-rep-contact-section\",\n imports: [\n CommonModule,\n AvatarComponent,\n NgFor,\n NgForOf,\n NgbTooltip,\n NgbTooltipModule,\n AddEditBuyerContactPopupComponent,\n NgIf,\n ],\n standalone: true,\n templateUrl: \"./buyer-rep-contact-section.component.html\",\n styleUrls: [\"./buyer-rep-contact-section.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BuyerContactSectionComponent implements OnInit, OnChanges {\n @Input({ required: true }) buyerContactList: RepAndBuyerContactList = null;\n @Input({ required: true }) repUserContactList: RepAndBuyerContactList = null;\n @Input({ required: true }) isBusinessRulesInEditMode: boolean = false;\n @Input({ required: true }) businessRulesPageType: BusinessPageType;\n @Input({ required: true }) isBuyerBizRulesApprovalRequired: boolean = false;\n @Input({ required: true }) aclWritePermission: boolean = true;\n @Input() isTrafficOrder: boolean = false;\n @Input() stationId: number;\n @Input() hideRepTooltipForRepUsers: boolean = false;\n @Output() saveBuyerEmitter = new EventEmitter<any>();\n BusinessPageType = BusinessPageType;\n EOSApplicationUserType = EOSApplicationUserType;\n BuyerRepContactPopupActionEnum = BuyerRepContactPopupActionEnum;\n\n MAX_COUNT_OF_AVATARS_TO_DISPLAY: number = 5;\n\n userType: EOSApplicationUserType;\n firstFiveBuyers: RepAndBuyerContactDetails[] = [];\n remainingBuyers: RepAndBuyerContactDetails[] = [];\n remainingCount: number = 0;\n\n @ViewChild(\"buyerContactModal\") private buyerContactModal: TemplateRef<any>;\n\n buyerContactModalReference: NgbModalRef;\n ngbModalOptions: NgbModalOptions;\n typeOfAction: BuyerRepContactPopupActionEnum = BuyerRepContactPopupActionEnum.ADD;\n addBuyerToolTip: string = null;\n userList: RepAndBuyerContactList;\n canDeleteAllBuyers: boolean = false;\n\n constructor(private modalService: NgbModal) {\n this.popupModalConfig();\n }\n\n ngOnInit(): void {\n AvatarComponent.colorIndex = 0;\n }\n ngOnChanges(changes: SimpleChanges) {\n if (changes.buyerContactList) {\n AvatarComponent.colorIndex = 0;\n if (!this.isTrafficOrder && this.buyerContactList?.users?.length === 0) {\n this.addBuyerToolTip = \"Please add Buyers to proceed\";\n } else {\n this.addBuyerToolTip = null;\n }\n }\n\n if (changes.buyerContactList || changes.repUserContactList || changes.isBuyerBizRulesApprovalRequired) {\n this.checkCanDeleteAllBuyers();\n }\n }\n\n openModal(actionType: BuyerRepContactPopupActionEnum, userType: EOSApplicationUserType) {\n if (\n userType === EOSApplicationUserType.REP &&\n (this.isTrafficOrder || this.buyerContactList?.users?.length === 0)\n ) {\n return;\n }\n this.userType = userType;\n this.userList =\n this.userType === EOSApplicationUserType.BUYER\n ? cloneDeep(this.buyerContactList)\n : cloneDeep(this.repUserContactList);\n this.typeOfAction = actionType;\n this.checkCanDeleteAllBuyers();\n this.buyerContactModalReference = this.modalService.open(this.buyerContactModal, this.ngbModalOptions);\n }\n closeModal(event: boolean) {\n this.buyerContactModalReference.close();\n }\n popupModalConfig() {\n this.ngbModalOptions = {\n backdrop: \"static\",\n keyboard: false,\n windowClass: \"\",\n };\n }\n saveBuyerContact(event: BuyerContactRequest[]) {\n this.closeModal(true);\n const objEmitter = {\n userList: event,\n userType: this.userType,\n };\n this.saveBuyerEmitter.emit(objEmitter);\n }\n checkCanDeleteAllBuyers(): void {\n const isRep = this.userType === EOSApplicationUserType.REP;\n const isBuyer = this.userType === EOSApplicationUserType.BUYER;\n\n const isSingleBuyerWithRep =\n (this.repUserContactList?.users?.length ?? 0) > 0 &&\n (this.buyerContactList?.users?.length ?? 0) === 1 &&\n isBuyer;\n\n this.canDeleteAllBuyers = (!this.isBuyerBizRulesApprovalRequired && !isSingleBuyerWithRep) || isRep;\n }\n}\n","<div class=\"buyer-rep-section\">\n <div\n [ngClass]=\"{\n error: isBusinessRulesInEditMode && buyerContactList?.users?.length === 0 && isBuyerBizRulesApprovalRequired\n }\"\n class=\"buyer-container-view\"\n >\n <span class=\"buyers-heading\">Buyers: </span>\n <div\n class=\"avatars-container\"\n *ngIf=\"buyerContactList?.users?.length > 0\"\n >\n <anna-feature-avatar\n #AvatarComponent\n *ngFor=\"let buyer of buyerContactList?.users | slice: 0 : MAX_COUNT_OF_AVATARS_TO_DISPLAY\"\n [buyer]=\"buyer\"\n [businessRulesPageType]=\"businessRulesPageType\"\n >\n </anna-feature-avatar>\n\n <div\n *ngIf=\"buyerContactList?.users?.length > MAX_COUNT_OF_AVATARS_TO_DISPLAY\"\n class=\"avatar-circle remaining-buyers\"\n container=\"body\"\n [triggers]=\"'manual'\"\n [ngbTooltip]=\"remainingBuyersTooltipContent\"\n tooltipClass=\"custom-tooltip-2\"\n #tooltip=\"ngbTooltip\"\n (mouseenter)=\"tooltip.open()\"\n placement=\"bottom\"\n >\n +{{ buyerContactList?.users?.length - MAX_COUNT_OF_AVATARS_TO_DISPLAY }}\n </div>\n </div>\n\n <div\n class=\"message-container\"\n *ngIf=\"buyerContactList?.users?.length === 0 && isBuyerBizRulesApprovalRequired\"\n >\n <span\n *ngIf=\"isBusinessRulesInEditMode\"\n class=\"mdi mdi-alert-octagon\"\n ></span>\n No buyers added\n </div>\n <div\n class=\"message-container\"\n *ngIf=\"buyerContactList?.users?.length === 0 && !isBuyerBizRulesApprovalRequired\"\n >\n No buyers need to be added as per the set configurations\n </div>\n\n <div\n *ngIf=\"!buyerContactList?.hideEditButton && aclWritePermission\"\n class=\"edit-icon\"\n (click)=\"\n buyerContactList?.users?.length > 0\n ? openModal(BuyerRepContactPopupActionEnum.EDIT, EOSApplicationUserType.BUYER)\n : openModal(BuyerRepContactPopupActionEnum.ADD, EOSApplicationUserType.BUYER)\n \"\n >\n <span\n *ngIf=\"buyerContactList?.users?.length > 0\"\n class=\"mdi mdi-pencil\"\n ></span>\n <span\n *ngIf=\"buyerContactList?.users?.length === 0 || buyerContactList == null\"\n class=\"mdi mdi-plus\"\n ></span>\n </div>\n </div>\n <div class=\"buyer-container-view\">\n <span class=\"buyers-heading\"\n >Reps:\n <span\n class=\"d-flex\"\n *ngIf=\"repUserContactList?.users?.length > 0 && !hideRepTooltipForRepUsers\"\n ><i\n class=\"mi mdi-info-outline\"\n [ngbTooltip]=\"repUserForElectronicOrders\"\n placement=\"auto\"\n container=\"body\"\n ></i></span\n ></span>\n <div\n class=\"avatars-container\"\n *ngIf=\"repUserContactList?.users?.length > 0\"\n >\n <anna-feature-avatar\n #AvatarComponent\n *ngFor=\"let rep of repUserContactList?.users | slice: 0 : MAX_COUNT_OF_AVATARS_TO_DISPLAY\"\n [buyer]=\"rep\"\n [businessRulesPageType]=\"businessRulesPageType\"\n >\n </anna-feature-avatar>\n\n <div\n *ngIf=\"repUserContactList?.users?.length > MAX_COUNT_OF_AVATARS_TO_DISPLAY\"\n class=\"avatar-circle remaining-buyers\"\n container=\"body\"\n [triggers]=\"'manual'\"\n [ngbTooltip]=\"remainingRepsTooltipContent\"\n tooltipClass=\"custom-tooltip-2\"\n #tooltip=\"ngbTooltip\"\n (mouseenter)=\"tooltip.open()\"\n placement=\"bottom\"\n >\n +{{ repUserContactList?.users?.length - MAX_COUNT_OF_AVATARS_TO_DISPLAY }}\n </div>\n </div>\n <div\n class=\"message-container\"\n *ngIf=\"repUserContactList?.users?.length === 0\"\n >\n <span class=\"mdi mdi-alert\"></span>\n Only required for<span class=\"bold-italics\"> electronic </span>orders\n </div>\n <div\n *ngIf=\"!repUserContactList?.hideEditButton && aclWritePermission\"\n class=\"edit-icon\"\n [ngClass]=\"{ disabled: isTrafficOrder || buyerContactList?.users?.length === 0 }\"\n [ngbTooltip]=\"addBuyerToolTip\"\n container=\"body\"\n triggers=\"mouseenter:mouseleave\"\n tooltipClass=\"biz-btn-tooltip\"\n (click)=\"\n repUserContactList?.users?.length > 0\n ? openModal(BuyerRepContactPopupActionEnum.EDIT, EOSApplicationUserType.REP)\n : openModal(BuyerRepContactPopupActionEnum.ADD, EOSApplicationUserType.REP)\n \"\n >\n <span\n *ngIf=\"repUserContactList?.users?.length > 0\"\n class=\"mdi mdi-pencil\"\n ></span>\n <span\n *ngIf=\"repUserContactList?.users?.length === 0 || repUserContactList == null\"\n class=\"mdi mdi-plus\"\n ></span>\n </div>\n </div>\n</div>\n<ng-template #remainingBuyersTooltipContent>\n <div\n class=\"remaining-buyer-tooltip\"\n [ngClass]=\"{ 'buyer-tooltip': buyerContactList?.users.length - MAX_COUNT_OF_AVATARS_TO_DISPLAY > 1 }\"\n *ngFor=\"let user of buyerContactList?.users | slice: MAX_COUNT_OF_AVATARS_TO_DISPLAY\"\n >\n <ng-container *ngTemplateOutlet=\"userDetailsTemplate; context: { user: user }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #remainingRepsTooltipContent>\n <div\n class=\"remaining-buyer-tooltip\"\n [ngClass]=\"{ 'buyer-tooltip': repUserContactList?.users?.length - MAX_COUNT_OF_AVATARS_TO_DISPLAY > 1 }\"\n *ngFor=\"let user of repUserContactList?.users | slice: MAX_COUNT_OF_AVATARS_TO_DISPLAY\"\n >\n <ng-container *ngTemplateOutlet=\"userDetailsTemplate; context: { user: user }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template\n #userDetailsTemplate\n let-user=\"user\"\n>\n <ng-container *ngIf=\"businessRulesPageType === BusinessPageType.ORDER\">\n <ul>\n <li class=\"black-text-avatar\">{{ user.buyerLevelMsg }}</li>\n </ul>\n <div class=\"bold-text ml-12\">{{ user.firstName }} {{ user.lastName || \"\" }}</div>\n </ng-container>\n <ng-container *ngIf=\"businessRulesPageType === BusinessPageType.ADVERTISER\">\n <ul>\n <li class=\"bold-text\">{{ user.firstName }} {{ user.lastName || \"\" }}</li>\n </ul>\n </ng-container>\n <span class=\"grey-text\">\n {{ user.email }} <span *ngIf=\"user.phoneNumber\">| {{ user.phoneNumber }}</span>\n </span>\n</ng-template>\n\n<ng-template\n #buyerContactModal\n let-modal\n>\n <anna-feature-add-edit-buyer-contact-popup\n [buyerContactList]=\"userList\"\n [businessRulesLevel]=\"businessRulesPageType\"\n [actionType]=\"typeOfAction\"\n [stationId]=\"stationId\"\n [userType]=\"userType\"\n [canDeleteAllBuyers]=\"canDeleteAllBuyers\"\n (closeModal)=\"closeModal($event)\"\n (saveBuyerEmitter)=\"saveBuyerContact($event)\"\n >\n </anna-feature-add-edit-buyer-contact-popup>\n</ng-template>\n<ng-template #repUserForElectronicOrders>\n <ul>\n <li>\n Only required for <b><i>electronic</i></b> orders\n </li>\n <li>Reps will have view access on EOS but no modification rights</li>\n </ul>\n</ng-template>\n","import { InjectionToken } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport { IBulkCopyBizRulesPayload } from \"../mass-copy-biz-rules-popup/models/mass-copy-biz-rules.model\";\n\nexport const COPY_BUSINESS_RULE_POPUP_SERVICE: InjectionToken<IBusinessRuleTabService> =\n new InjectionToken<IBusinessRuleTabService>(\"BusinessRuleTabService\");\n\nexport interface IBusinessRuleTabService {\n getStationBusinessRules(stationId: number, isCallMadeFromCopyBizRules: boolean): Observable<any>;\n getOrderBusinessRules(stationId: number, orderId: string, isCallMadeFromCopyBizRules: boolean): Observable<any>;\n getAdvertiserBusinessRules(\n stationId: number,\n advertiserId: number,\n isCallMadeFromCopyBizRules: boolean,\n ): Observable<any>;\n getAdvertiserAndOrder(stationId: number, ogId?: number): Observable<any>;\n getAdvertiserAndOrderListForMassCopy(stationId: number, advertiserId?: number, orderId?: string): Observable<any>;\n initiateBulkCopyOfBusinessRules(payload: IBulkCopyBizRulesPayload): Observable<any>;\n // fetchMassCopyStatus(transactionId: string): Observable<any>;\n}\n","import sortBy from \"lodash-es/sortBy\";\n\nexport class RuleConstants {\n static readonly MG = \"make_good_rules\";\n static readonly ADU = \"adu_rules\";\n static readonly DP = \"day_and_daypart_restrictions\";\n static readonly EQ_ANF_HIGH_DP = \"Equivalent_and_higher_daypart\";\n static readonly EXIC_AND_SIC = \"excluded_programs_and_special_programs\";\n}\n\nexport class MessageConstants {\n static readonly SERVER_ERROR_MSG = \"Something went wrong! Please try again.\";\n}\n\nexport class DropDownPlaceholders {\n static readonly SELECT_ADVERTISER = \"Select Advertiser\";\n static readonly SELECT_ORDER = \"Select Order\";\n static readonly SELECT_ADVERTISERS = \"Select Advertisers\";\n static readonly NO_ADVERTISERS = \"No Advertisers\";\n static readonly NO_ORDERS = \"No Orders\";\n static readonly SELECT_STATION = \"Select Station\";\n static readonly NO_STATION = \"No Station\";\n}\n\nexport class AdvertiserAndOrders {\n listOfAdvertiserAndOrder: Array<AdvertisersIdText> = [];\n listOfAdvertiserAndOrderWithoutStatus: Array<AdvertisersIdText> = [];\n constructor(data: any, currentAdvertiserNameOrOrderId: string) {\n data.AdvertisersWithOrders.forEach((item: any) => {\n if (item.IsBizRuleSavedOnce && item.AdvertiserName !== currentAdvertiserNameOrOrderId) {\n this.listOfAdvertiserAndOrder.push(new AdvertisersIdText(item, true, null));\n }\n this.listOfAdvertiserAndOrderWithoutStatus.push(\n new AdvertisersIdText(item, false, currentAdvertiserNameOrOrderId),\n );\n });\n this.listOfAdvertiserAndOrder = sortBy(this.listOfAdvertiserAndOrder, \"text\");\n this.listOfAdvertiserAndOrderWithoutStatus = sortBy(this.listOfAdvertiserAndOrderWithoutStatus, \"text\");\n }\n}\n\nexport class AdvertisersIdText {\n id: number;\n text: string;\n orders?: OrderIdText[] = [];\n isSelected: boolean = false;\n\n constructor(item: any, addBizRuleStatusToAdvName: boolean = true, currentAdvertiserNameOrOrderId: string = \"\") {\n this.id = item.AdvertiserId;\n this.text = addBizRuleStatusToAdvName\n ? `${item.AdvertiserName} (${item.AdvertiserBizRuleStatus})`\n : item.AdvertiserName;\n item.Orders.forEach((order: any) => {\n if (order.BuyerOrderId !== currentAdvertiserNameOrOrderId) this.orders.push(new OrderIdText(order));\n });\n this.orders = sortBy(this.orders, \"text\");\n }\n}\n\nexport class OrderIdText {\n id: number;\n text: string;\n\n constructor(order: any) {\n this.id = order.BuyerOrderId;\n this.text = `${order.BuyerOrderId} (${order.OrderBizRuleStatus})`;\n }\n}\nexport class StationIdText {\n id: number;\n text: string;\n advertisersWithOrders: AdvertiserAndOrders;\n isSelected: boolean = false;\n constructor(data: any, currentAdvertiserNameOrOrderId: string, defaultStationId: number) {\n this.id = data.StationId;\n this.text = data.StationName;\n if (defaultStationId === data.StationId) {\n this.advertisersWithOrders = new AdvertiserAndOrders(data, currentAdvertiserNameOrOrderId);\n } else {\n this.advertisersWithOrders = new AdvertiserAndOrders(data, null);\n }\n }\n}\n\nexport class StationWithAdvertisersAndOrders {\n listOfStations: Array<StationIdText> = [];\n constructor(data: any, currentAdvertiserNameOrOrderId: string, defaultStationId: number) {\n if (data) {\n data.forEach((item: any) => {\n this.listOfStations.push(new StationIdText(item, currentAdvertiserNameOrOrderId, defaultStationId));\n });\n }\n if (this.listOfStations) {\n this.listOfStations = sortBy(this.listOfStations, \"text\");\n }\n }\n}\n","/* eslint-disable no-unsafe-optional-chaining */\nimport { NgFor, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n} from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport {\n AnnaGlobalConfigService,\n IConfirmationPopupConfig,\n ICustomMultiSelect,\n ICustomSingleSelect,\n IRadioButtonComponentConfig,\n} from \"@annalib/anna-core\";\nimport { AnnaDesignComponentsLibModule, IdText, SingleSelectIdText } from \"@annalib/anna-design-components-lib\";\nimport { GenericBusinessRuleCommonSIBILogicService } from \"@annalib/anna-feature-lib/anna-feature-shared-lib\";\nimport { NgbModal, NgbModalOptions, NgbModalRef } from \"@ng-bootstrap/ng-bootstrap\";\nimport { cloneDeep, sortBy } from \"lodash-es\";\nimport { ToastrService } from \"ngx-toastr\";\n\nimport { BizRulesResponse } from \"../business-rule-page/models/business-rule.model\";\nimport {\n BusinessRuleLevelConstant,\n BusinessRuleSectionNameForCopyBizRule,\n} from \"../business-rule-page/models/business-rule-page.constants\";\nimport { COPY_BUSINESS_RULE_POPUP_SERVICE, IBusinessRuleTabService } from \"./copy-business-rule-backend-service.token\";\nimport {\n AdvertiserAndOrders,\n AdvertisersIdText,\n DropDownPlaceholders,\n MessageConstants,\n OrderIdText,\n StationWithAdvertisersAndOrders,\n} from \"./models/copy-biz-rules.model\";\n\n@Component({\n selector: \"anna-feature-app-copy-biz-rules-popup\",\n templateUrl: \"./copy-biz-rules-popup.component.html\",\n styleUrls: [\"./copy-biz-rules-popup.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgIf, AnnaDesignComponentsLibModule, NgFor, FormsModule],\n})\nexport class CopyBizRulesPopupComponent implements OnInit, OnChanges {\n @Input() station: IdText;\n @Input() defaultSelectedCopyFrom: BusinessRuleLevelConstant;\n @Input() modalTitle: string = \"Copy Business Rules From\";\n @Input() copyToText: string;\n @Input() currentBizRules: BizRulesResponse;\n @Input() radioConfig: IRadioButtonComponentConfig;\n @Input() isStationLevelBizRuleTab: boolean = false;\n @Input() OwnershipGroup: IdText;\n @Input() isPayForPerformanceOrder: boolean = false;\n @Output() initiateLoader = new EventEmitter<boolean>();\n @Output() sendCopiedBizRules = new EventEmitter<BizRulesResponse>();\n @Output() copyBizRulesChanged = new EventEmitter<boolean>();\n\n @ViewChild(\"copyBusinessRuleModal\") private copyRulesTemplate: TemplateRef<any>;\n copyRulesModalReference: NgbModalRef;\n\n rulesThatCanBeCopied = [\n { name: BusinessRuleSectionNameForCopyBizRule.DAY_AND_DAYPART_RESTICTIONS, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.EQUIVALENT_AND_HIGHER_DAYPARTS, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.EXCLUDED_PROGRAM_AND_SPECIAL_PROGRAM, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.GENERAL_RULES, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.MG_RULES, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.ADU_RULES, isSelected: true },\n ];\n\n rulesThatCanBeCopiedClone = cloneDeep(this.rulesThatCanBeCopied);\n\n stationList: StationWithAdvertisersAndOrders;\n stationListClone: StationWithAdvertisersAndOrders;\n\n advertiserList: AdvertiserAndOrders;\n selectedAdvertisers: AdvertisersIdText[] = [];\n orderListForAdvertiser: any | OrderIdText[] = [];\n\n selectedRadioToCopyFrom: BusinessRuleLevelConstant;\n selectedOrder: SingleSelectIdText;\n config: IConfirmationPopupConfig;\n businessRuleLevelConstant = BusinessRuleLevelConstant;\n selectedStation: SingleSelectIdText;\n\n advMultiSelectConfig: ICustomMultiSelect;\n advSingleSelectConfig: ICustomSingleSelect;\n orderSingleSelectConfig: ICustomSingleSelect;\n stationSingleSelectConfig: ICustomSingleSelect;\n\n copyButtonDisabled: boolean = true;\n loading: boolean = true;\n isExcludedSpecialProgramPresent: boolean = false;\n isdefaultStationIdPresentInList: boolean;\n\n constructor(\n private modalService: NgbModal,\n private annaGlobalConfig: AnnaGlobalConfigService,\n @Inject(COPY_BUSINESS_RULE_POPUP_SERVICE)\n public consumingProjectBusinessRuleService: IBusinessRuleTabService,\n private toastr: ToastrService,\n private businessRuleService: GenericBusinessRuleCommonSIBILogicService,\n ) {\n this.config = { ...this.annaGlobalConfig.defaultConfirmationPopupConfig };\n this.createStationSingleSelectConfig();\n this.createAdvSingleSelectConfig();\n this.createOrderSingleSelectConfig();\n this.createAdvMultiSelectConfig();\n }\n\n ngOnInit() {\n this.selectedRadioToCopyFrom = this.defaultSelectedCopyFrom;\n if (this.station?.text?.includes(\"(Sandbox)\")) {\n this.station.text = this.station.text.replace(/\\s*\\(Sandbox\\)/, \"\");\n }\n this.selectedStation = new SingleSelectIdText(+this.station.id, this.station.text, null, null, null, true);\n this.getorderListForAdvertiser();\n // this.checkIfCopyButtonEnabled();\n this.checkExcludedSpecialProgram();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes?.station?.currentValue) {\n if (this.station?.text?.includes(\"(Sandbox)\")) {\n this.station.text = this.station.text.replace(/\\s*\\(Sandbox\\)/, \"\");\n this.selectedStation = new SingleSelectIdText(\n +this.station.id,\n this.station.text,\n null,\n null,\n null,\n true,\n );\n }\n }\n }\n\n getorderListForAdvertiser() {\n this.consumingProjectBusinessRuleService\n .getAdvertiserAndOrder(+this.station.id, this.OwnershipGroup ? +this.OwnershipGroup.id : null)\n .subscribe(\n (res: any) => {\n this.loading = true;\n const currentAdvertiserNameOrOrderId = this.copyToText.replace(/^[^-]*-/, \"\").trim();\n this.prepareStationDropdownData(res.body, currentAdvertiserNameOrOrderId);\n this.loading = false;\n },\n (error: any) => {\n this.toastr.error(MessageConstants.SERVER_ERROR_MSG);\n },\n );\n }\n\n createAdvSingleSelectConfig() {\n this.advSingleSelectConfig = { ...this.annaGlobalConfig.defaultSingleSelectConfig };\n this.advSingleSelectConfig.showSearchBar = true;\n this.advSingleSelectConfig.placeholder = DropDownPlaceholders.SELECT_ADVERTISER;\n }\n\n createStationSingleSelectConfig() {\n this.stationSingleSelectConfig = { ...this.annaGlobalConfig.defaultSingleSelectConfig };\n this.stationSingleSelectConfig.showSearchBar = true;\n this.stationSingleSelectConfig.placeholder = DropDownPlaceholders.SELECT_STATION;\n }\n\n createOrderSingleSelectConfig() {\n this.orderSingleSelectConfig = { ...this.annaGlobalConfig.defaultSingleSelectConfig };\n this.orderSingleSelectConfig.showSearchBar = true;\n this.orderSingleSelectConfig.placeholder = DropDownPlaceholders.SELECT_ORDER;\n }\n\n createAdvMultiSelectConfig() {\n this.advMultiSelectConfig = { ...this.annaGlobalConfig.defaultMultiSelectConfig };\n this.advMultiSelectConfig.showErrorWhenNoOptionSelected = false;\n this.advMultiSelectConfig.showSearchBar = true;\n this.advMultiSelectConfig.placeholder = DropDownPlaceholders.SELECT_ADVERTISERS;\n }\n\n checkIfDefaultStation() {\n if (\n (this.selectedRadioToCopyFrom === BusinessRuleLevelConstant.STATION && this.isStationLevelBizRuleTab) ||\n !this.isdefaultStationIdPresentInList\n ) {\n this.selectedStation = null;\n if (this.stationList?.listOfStations) {\n this.stationList.listOfStations = this.stationList.listOfStations.filter(\n (station) => station.id !== this.station.id,\n );\n }\n } else {\n this.selectedStation = new SingleSelectIdText(+this.station.id, this.station.text, null, null, null, true);\n this.stationList = cloneDeep(this.stationListClone);\n this.checkAndPopulateAdvertiserDropdown();\n }\n }\n\n prepareStationDropdownData(response: any, currentAdvertiserNameOrOrderId: string) {\n if (response) {\n this.isdefaultStationIdPresentInList = response.some(\n (station: any) => station.StationId === this.station.id,\n );\n }\n if (!this.isdefaultStationIdPresentInList) {\n this.selectedStation = null;\n }\n this.stationList = new StationWithAdvertisersAndOrders(\n response,\n currentAdvertiserNameOrOrderId,\n +this.station.id,\n );\n this.stationListClone = cloneDeep(this.stationList);\n // this.checkAndPopulateAdvertiserDropdown()\n this.checkIfDefaultStation();\n this.checkIfCopyButtonEnabled();\n }\n\n openModal() {\n const ngbModalOptions: NgbModalOptions = {\n windowClass: \"copy-biz-rule-modal\",\n centered: true,\n size: \"sm\",\n };\n\n this.rulesThatCanBeCopied.forEach((rule) => {\n rule.isSelected = true;\n });\n\n // this.getorderListForAdvertiser();\n this.checkExcludedSpecialProgram();\n this.copyRulesModalReference = this.modalService.open(this.copyRulesTemplate, ngbModalOptions);\n }\n\n copyFromRadioButtonChange(event: any) {\n this.selectedRadioToCopyFrom = event;\n this.resetAllDropdownFilter();\n this.selectedOrder = null;\n this.checkIfCopyButtonEnabled();\n this.businessRuleService.notifyBusinessRulesChanged();\n }\n\n advertiserSelectionChange(advertiserList: AdvertisersIdText[]) {\n this.selectedOrder = null;\n this.selectedAdvertisers = [];\n this.selectedAdvertisers = advertiserList.filter((item: AdvertisersIdText) => item.isSelected);\n this.checkAndPopulateOrderDropdown();\n this.checkIfCopyButtonEnabled();\n this.businessRuleService.notifyBusinessRulesChanged();\n }\n\n advertiserSingleSelected(event: SingleSelectIdText) {\n this.selectedAdvertisers = [];\n this.selectedAdvertisers.push({ id: event.id, text: event.text, isSelected: true });\n this.checkIfCopyButtonEnabled();\n this.businessRuleService.notifyBusinessRulesChanged();\n }\n\n stationSingleSelected(event: SingleSelectIdText) {\n this.selectedStation = event;\n if (this.selectedStation.text === this.station.text) {\n this.rulesThatCanBeCopied = cloneDeep(this.rulesThatCanBeCopiedClone);\n } else {\n this.rulesThatCanBeCopied = this.rulesThatCanBeCopied.filter(\n (rule) =>\n rule.name !== BusinessRuleSectionNameForCopyBizRule.EXCLUDED_PROGRAM_AND_SPECIAL_PROGRAM &&\n rule.name !== BusinessRuleSectionNameForCopyBizRule.DAY_AND_DAYPART_RESTICTIONS &&\n rule.name !== BusinessRuleSectionNameForCopyBizRule.EQUIVALENT_AND_HIGHER_DAYPARTS,\n );\n }\n this.checkExcludedSpecialProgram();\n this.checkAndPopulateAdvertiserDropdown();\n this.checkIfCopyButtonEnabled();\n this.businessRuleService.notifyBusinessRulesChanged();\n }\n\n orderSelectionChange(event: SingleSelectIdText) {\n this.selectedOrder = event;\n this.checkIfCopyButtonEnabled();\n this.businessRuleService.notifyBusinessRulesChanged();\n }\n\n checkAndPopulateAdvertiserDropdown() {\n this.selectedOrder = null;\n this.advertiserList = null;\n this.orderListForAdvertiser = [];\n this.selectedAdvertisers = [];\n if (this.stationList?.listOfStations) {\n this.stationList.listOfStations = this.stationList?.listOfStations?.map((station) => {\n if (station.id === this.selectedStation?.id) {\n station.isSelected = true;\n this.advertiserList = station.advertisersWithOrders;\n } else {\n station.isSelected = false;\n }\n return station;\n });\n }\n\n if (this.advertiserList) {\n this.advertiserList.listOfAdvertiserAndOrderWithoutStatus =\n this.advertiserList?.listOfAdvertiserAndOrderWithoutStatus.map((x: AdvertisersIdText) => ({\n ...x,\n isSelected: false,\n }));\n }\n this.updateDropdownPlaceholder();\n }\n\n checkAndPopulateOrderDropdown() {\n this.orderListForAdvertiser = [];\n const orderListForAdvertisersNestedArr: any[] = [];\n\n this.selectedAdvertisers.forEach((item: AdvertisersIdText) => {\n orderListForAdvertisersNestedArr.push(item.orders);\n });\n this.orderListForAdvertiser = orderListForAdvertisersNestedArr.flat();\n\n this.updateDropdownPlaceholder();\n\n if (this.orderListForAdvertiser?.length) {\n this.orderListForAdvertiser = sortBy(this.orderListForAdvertiser, \"text\");\n }\n this.copyButtonDisabled = true;\n }\n\n checkExcludedSpecialProgram() {\n const excludedSpecialProgramRule = this.rulesThatCanBeCopied.find(\n (rule) => rule.name === BusinessRuleSectionNameForCopyBizRule.EXCLUDED_PROGRAM_AND_SPECIAL_PROGRAM,\n );\n this.isExcludedSpecialProgramPresent = !!excludedSpecialProgramRule;\n }\n\n closeModal() {\n if (this.copyRulesModalReference) {\n this.copyRulesModalReference.close();\n }\n }\n\n resetCopyBizRuleAndCloseModal() {\n this.closeModal();\n this.resetcopyBizPopup();\n }\n\n resetAllDropdownFilter() {\n this.checkIfDefaultStation();\n this.rulesThatCanBeCopied = cloneDeep(this.rulesThatCanBeCopiedClone);\n this.checkExcludedSpecialProgram();\n this.selectedAdvertisers = [];\n this.selectedOrder = null;\n if (!this.isdefaultStationIdPresentInList) {\n this.advertiserList = null;\n }\n if (this.advertiserList) {\n this.advertiserList.listOfAdvertiserAndOrderWithoutStatus =\n this.advertiserList.listOfAdvertiserAndOrderWithoutStatus.map((x: AdvertisersIdText) => ({\n ...x,\n isSelected: false,\n }));\n }\n this.orderListForAdvertiser = [];\n this.updateDropdownPlaceholder();\n }\n\n updateDropdownPlaceholder() {\n if (!this.advertiserList?.listOfAdvertiserAndOrder?.length) {\n this.advSingleSelectConfig.placeholder = DropDownPlaceholders.NO_ADVERTISERS;\n } else {\n this.advSingleSelectConfig.placeholder = DropDownPlaceholders.SELECT_ADVERTISER;\n }\n this.advSingleSelectConfig = cloneDeep(this.advSingleSelectConfig);\n\n if (!this.advertiserList?.listOfAdvertiserAndOrderWithoutStatus?.length) {\n this.advMultiSelectConfig.placeholder = DropDownPlaceholders.NO_ADVERTISERS;\n } else {\n this.advMultiSelectConfig.placeholder = DropDownPlaceholders.SELECT_ADVERTISERS;\n }\n this.advMultiSelectConfig = cloneDeep(this.advMultiSelectConfig);\n this.createOrderSingleSelectConfig();\n if (!this.orderListForAdvertiser?.length) {\n this.orderSingleSelectConfig.placeholder = DropDownPlaceholders.NO_ORDERS;\n } else {\n this.orderSingleSelectConfig.placeholder = DropDownPlaceholders.SELECT_ORDER;\n }\n this.orderSingleSelectConfig.placeholder = cloneDeep(this.orderSingleSelectConfig.placeholder);\n }\n\n copyBusinessRules() {\n this.initiateLoader.emit(true);\n if (this.selectedRadioToCopyFrom === BusinessRuleLevelConstant.STATION) {\n this.fetchAndCopyStationLevelBizRules();\n } else if (this.selectedRadioToCopyFrom === BusinessRuleLevelConstant.ADVERTISER) {\n this.fetchAndCopyAdvertiserLevelBizRules();\n } else {\n this.fetchAndCopyOrderLevelBizRules();\n }\n }\n\n fetchAndCopyStationLevelBizRules() {\n this.consumingProjectBusinessRuleService.getStationBusinessRules(+this.selectedStation.id, true).subscribe(\n (res) => {\n const bizRulesToCopyFrom = new BizRulesResponse(res.body);\n this.copyRulesFromSelected(bizRulesToCopyFrom);\n this.initiateLoader.emit(false);\n },\n (error: any) => {\n this.toastr.error(MessageConstants.SERVER_ERROR_MSG);\n this.initiateLoader.emit(false);\n },\n );\n }\n\n fetchAndCopyAdvertiserLevelBizRules() {\n this.consumingProjectBusinessRuleService\n .getAdvertiserBusinessRules(+this.selectedStation?.id, this.selectedAdvertisers[0]?.id, true)\n .subscribe(\n (res) => {\n const bizRulesToCopyFrom = new BizRulesResponse(res.body);\n this.copyRulesFromSelected(bizRulesToCopyFrom);\n this.initiateLoader.emit(false);\n },\n (error: any) => {\n this.toastr.error(MessageConstants.SERVER_ERROR_MSG);\n this.initiateLoader.emit(false);\n },\n );\n }\n\n fetchAndCopyOrderLevelBizRules() {\n this.consumingProjectBusinessRuleService\n .getOrderBusinessRules(+this.selectedStation.id, this.selectedOrder.id.toString(), true)\n .subscribe(\n (res) => {\n const bizRulesToCopyFrom = new BizRulesResponse(res.body);\n this.copyRulesFromSelected(bizRulesToCopyFrom);\n this.initiateLoader.emit(false);\n },\n (error: any) => {\n this.toastr.error(MessageConstants.SERVER_ERROR_MSG);\n this.initiateLoader.emit(false);\n },\n );\n }\n\n copyRulesFromSelected(bizRulesToCopyFrom: BizRulesResponse) {\n const bizRulesToCopy = this.rulesThatCanBeCopied.filter((x) => x.isSelected).map((y) => y.name);\n const { disableProvideOffersBasedOnSpecificWeekDaysToggle } = this.currentBizRules.makeGoodRules;\n bizRulesToCopy.forEach((rule) => {\n if (rule === BusinessRuleSectionNameForCopyBizRule.MG_RULES) {\n const { provideOffersBasedOnSpecificWeekDays } = this.currentBizRules.makeGoodRules;\n const { disableGenerateMgsForUnresolvedSpotsToggle } = this.currentBizRules.makeGoodRules;\n const { generateMgsForUnresolvedSpots } = this.currentBizRules.makeGoodRules;\n\n this.currentBizRules.makeGoodRules = cloneDeep(bizRulesToCopyFrom.makeGoodRules);\n\n if (disableGenerateMgsForUnresolvedSpotsToggle) {\n this.currentBizRules.makeGoodRules.disableGenerateMgsForUnresolvedSpotsToggle =\n disableGenerateMgsForUnresolvedSpotsToggle;\n this.currentBizRules.makeGoodRules.generateMgsForUnresolvedSpots =\n cloneDeep(generateMgsForUnresolvedSpots);\n }\n\n if (disableProvideOffersBasedOnSpecificWeekDaysToggle) {\n this.currentBizRules.makeGoodRules.disableProvideOffersBasedOnSpecificWeekDaysToggle =\n disableProvideOffersBasedOnSpecificWeekDaysToggle;\n this.currentBizRules.makeGoodRules.provideOffersBasedOnSpecificWeekDays = cloneDeep(\n provideOffersBasedOnSpecificWeekDays,\n );\n }\n\n this.currentBizRules.highlightChanges = false;\n }\n if (rule === BusinessRuleSectionNameForCopyBizRule.ADU_RULES) {\n // We shouldn't update the aduDiscrepancy, it will be updated when user approved the biz rule\n // otherwise show the value of the currentOrder\n const initialValueOfHasAduDiscrepancy = this.currentBizRules.aduRules.hasAduDiscrepancy;\n const { provideOffersBasedOnSpecificWeekDays } = this.currentBizRules.aduRules;\n\n this.currentBizRules.aduRules = cloneDeep(bizRulesToCopyFrom.aduRules);\n this.currentBizRules.aduRules.hasAduDiscrepancy = initialValueOfHasAduDiscrepancy;\n if (disableProvideOffersBasedOnSpecificWeekDaysToggle) {\n this.currentBizRules.aduRules.disableProvideOffersBasedOnSpecificWeekDaysToggle =\n disableProvideOffersBasedOnSpecificWeekDaysToggle;\n this.currentBizRules.aduRules.provideOffersBasedOnSpecificWeekDays = cloneDeep(\n provideOffersBasedOnSpecificWeekDays,\n );\n }\n this.currentBizRules.highlightChanges = false;\n }\n if (rule === BusinessRuleSectionNameForCopyBizRule.DAY_AND_DAYPART_RESTICTIONS) {\n this.currentBizRules.dayAndDaypartRestrictionForMgAndAdu = cloneDeep(\n bizRulesToCopyFrom.dayAndDaypartRestrictionForMgAndAdu,\n );\n this.currentBizRules.highlightChanges = false;\n }\n if (rule === BusinessRuleSectionNameForCopyBizRule.GENERAL_RULES) {\n const postingType = this.currentBizRules.generalRules.postingTypeBusinessRule;\n const measurementAgency = this.currentBizRules.generalRules.measurementAgencyBizRule;\n this.currentBizRules.generalRules = cloneDeep(bizRulesToCopyFrom.generalRules);\n if (postingType.disablePostingTypeDropdown) {\n this.currentBizRules.generalRules.postingTypeBusinessRule = cloneDeep(postingType);\n }\n if (\n this.selectedStation.text !== this.station.text ||\n measurementAgency.disableMeasurementAgencyDropdown\n ) {\n this.currentBizRules.generalRules.measurementAgencyBizRule = cloneDeep(measurementAgency);\n }\n if (bizRulesToCopyFrom.generalRules.postingTypeBusinessRule.disablePostingTypeDropdown) {\n this.currentBizRules.generalRules.postingTypeBusinessRule.disablePostingTypeDropdown =\n postingType.disablePostingTypeDropdown;\n }\n if (bizRulesToCopyFrom.generalRules.measurementAgencyBizRule.disableMeasurementAgencyDropdown) {\n this.currentBizRules.generalRules.measurementAgencyBizRule.disableMeasurementAgencyDropdown =\n measurementAgency.disableMeasurementAgencyDropdown;\n }\n\n this.currentBizRules.highlightChanges = false;\n }\n if (rule === BusinessRuleSectionNameForCopyBizRule.EQUIVALENT_AND_HIGHER_DAYPARTS) {\n this.currentBizRules.equivalentAndHigherDaypartForMgAndAdu = cloneDeep(\n bizRulesToCopyFrom.equivalentAndHigherDaypartForMgAndAdu,\n );\n this.currentBizRules.highlightChanges = false;\n }\n if (rule === BusinessRuleSectionNameForCopyBizRule.EXCLUDED_PROGRAM_AND_SPECIAL_PROGRAM) {\n this.currentBizRules.selectedExcludedInventories = cloneDeep(\n bizRulesToCopyFrom.selectedExcludedInventories,\n );\n this.currentBizRules.selectedSpecialInventories = cloneDeep(\n bizRulesToCopyFrom.selectedSpecialInventories,\n );\n this.currentBizRules.nonSelectedInventories = cloneDeep(bizRulesToCopyFrom.nonSelectedInventories);\n this.currentBizRules.highlightChanges = false;\n }\n });\n\n if (this.isPayForPerformanceOrder) {\n this.currentBizRules.aduRules.generateAdu.Current = true;\n }\n\n this.sendCopiedBizRules.emit(this.currentBizRules);\n this.resetCopyBizRuleAndCloseModal();\n }\n\n resetcopyBizPopup() {\n this.selectedRadioToCopyFrom = this.defaultSelectedCopyFrom;\n this.rulesThatCanBeCopied = this.rulesThatCanBeCopiedClone.map((x: any) => ({ ...x, isSelected: true }));\n this.checkExcludedSpecialProgram();\n this.resetAllDropdownFilter();\n if (\n (this.selectedRadioToCopyFrom === BusinessRuleLevelConstant.STATION && this.isStationLevelBizRuleTab) ||\n !this.isdefaultStationIdPresentInList\n ) {\n this.selectedStation = null;\n if (this.stationList?.listOfStations) {\n this.stationList.listOfStations = this.stationList.listOfStations.filter(\n (station) => station.id !== this.station.id,\n );\n }\n } else {\n this.selectedStation = new SingleSelectIdText(+this.station.id, this.station.text, null, null, null, true);\n this.stationList = cloneDeep(this.stationListClone);\n }\n this.checkIfCopyButtonEnabled();\n }\n\n checkIfCopyButtonEnabled() {\n const selectedBizRulesList = this.rulesThatCanBeCopied.filter((x) => x.isSelected);\n if (this.selectedStation == null) {\n this.copyButtonDisabled = true;\n return;\n }\n if (selectedBizRulesList.length > 0) this.copyButtonDisabled = false;\n else {\n this.copyButtonDisabled = true;\n return;\n }\n if (this.selectedRadioToCopyFrom === BusinessRuleLevelConstant.STATION) {\n if (this.isStationLevelBizRuleTab && this.selectedStation == null) {\n this.copyButtonDisabled = true;\n return;\n }\n\n this.copyButtonDisabled = this.selectedStation == null;\n } else if (this.selectedRadioToCopyFrom === BusinessRuleLevelConstant.ADVERTISER) {\n this.copyButtonDisabled = !this.selectedAdvertisers?.length;\n } else {\n this.copyButtonDisabled = this.selectedOrder == null;\n }\n }\n businessRulesSelectionChanged() {\n this.checkIfCopyButtonEnabled();\n this.businessRuleService.notifyBusinessRulesChanged();\n }\n}\n","<ng-template\n #copyBusinessRuleModal\n let-modal\n>\n <section class=\"main-modal\">\n <div class=\"modal-header\">\n <span>\n <h3 class=\"modal-title\">{{ modalTitle }}</h3>\n </span>\n </div>\n\n <div class=\"modal-body\">\n <div class=\"meta-data\">\n <span *ngIf=\"OwnershipGroup?.text\"\n >OG: <b>{{ OwnershipGroup?.text }}</b></span\n >\n <span\n >Station: <b>{{ station.text }}</b></span\n >\n <span\n >Copy to: <b>{{ copyToText }}</b></span\n >\n </div>\n <div class=\"radio-header\">\n <span class=\"copy-from-text\">Copy From</span>\n <span class=\"greyline\"></span>\n </div>\n <div class=\"radio-button-div\">\n <anna-design-radio-buttons\n [config]=\"radioConfig\"\n [selectedValue]=\"selectedRadioToCopyFrom\"\n (selectionChanged)=\"copyFromRadioButtonChange($event)\"\n [disabled]=\"false\"\n class=\"copy-business-rule-radio\"\n ></anna-design-radio-buttons>\n </div>\n\n <div class=\"dropdown-container\">\n <div\n class=\"advertisern-dropdown\"\n *ngIf=\"selectedRadioToCopyFrom === businessRuleLevelConstant.STATION\"\n >\n <label>Station</label>\n <anna-design-single-select\n [loading]=\"loading\"\n [selectedItem]=\"selectedStation\"\n [config]=\"stationSingleSelectConfig\"\n [items]=\"stationList?.listOfStations\"\n (valueChanged)=\"stationSingleSelected($event)\"\n [disabled]=\"!stationList?.listOfStations?.length\"\n >\n </anna-design-single-select>\n </div>\n <div\n class=\"advertisern-dropdown\"\n *ngIf=\"selectedRadioToCopyFrom === businessRuleLevelConstant.ADVERTISER\"\n >\n <label>Station</label>\n <anna-design-single-select\n [loading]=\"loading\"\n [selectedItem]=\"selectedStation\"\n [config]=\"stationSingleSelectConfig\"\n [items]=\"stationList?.listOfStations\"\n (valueChanged)=\"stationSingleSelected($event)\"\n [disabled]=\"!stationList?.listOfStations?.length\"\n >\n </anna-design-single-select>\n <label>Advertiser</label>\n <anna-design-single-select\n [loading]=\"loading\"\n [selectedItem]=\"selectedAdvertisers[0]\"\n [config]=\"advSingleSelectConfig\"\n [items]=\"advertiserList?.listOfAdvertiserAndOrder\"\n (valueChanged)=\"advertiserSingleSelected($event)\"\n [disabled]=\"!advertiserList?.listOfAdvertiserAndOrder?.length\"\n >\n </anna-design-single-select>\n </div>\n <ng-container *ngIf=\"selectedRadioToCopyFrom === businessRuleLevelConstant.ORDER\">\n <label>Station</label>\n <anna-design-single-select\n [loading]=\"loading\"\n [selectedItem]=\"this.selectedStation\"\n [config]=\"stationSingleSelectConfig\"\n [items]=\"stationList?.listOfStations\"\n (valueChanged)=\"stationSingleSelected($event)\"\n [disabled]=\"!stationList?.listOfStations?.length\"\n >\n </anna-design-single-select>\n\n <label>Advertiser</label>\n <anna-design-multi-select\n [loading]=\"loading\"\n [config]=\"advMultiSelectConfig\"\n [items]=\"advertiserList?.listOfAdvertiserAndOrderWithoutStatus\"\n (selectionChangedEmitAllItems)=\"advertiserSelectionChange($event)\"\n [disabled]=\"!advertiserList?.listOfAdvertiserAndOrderWithoutStatus?.length\"\n (dropdownClosedEvent)=\"advertiserSelectionChange($event)\"\n >\n </anna-design-multi-select>\n\n <label>Order</label>\n <anna-design-single-select\n [loading]=\"loading\"\n [selectedItem]=\"selectedOrder\"\n [config]=\"orderSingleSelectConfig\"\n [disabled]=\"!orderListForAdvertiser?.length\"\n [items]=\"orderListForAdvertiser\"\n (valueChanged)=\"orderSelectionChange($event)\"\n >\n </anna-design-single-select>\n </ng-container>\n </div>\n\n <div class=\"checkbox-for-copy\">\n <label\n >Select business rules you want to copy.<span *ngIf=\"!isExcludedSpecialProgramPresent\">\n Please note that ‘DP restrictions’, ‘Equivalent & Higher DPs’, and ‘Excluded & Special Programs’\n can’t be copied across stations.</span\n ></label\n >\n <div *ngFor=\"let rule of rulesThatCanBeCopied\">\n <input\n id=\"{{ rule.name }}\"\n type=\"checkbox\"\n [(ngModel)]=\"rule.isSelected\"\n (change)=\"businessRulesSelectionChanged()\"\n />\n <label for=\"{{ rule.name }}\">{{ rule.name }}</label>\n </div>\n </div>\n\n <div class=\"button-container\">\n <button\n class=\"anna cancel-button\"\n (click)=\"resetCopyBizRuleAndCloseModal()\"\n >\n Cancel\n </button>\n <button\n class=\"anna apply-button\"\n [disabled]=\"copyButtonDisabled\"\n (click)=\"copyBusinessRules()\"\n >\n Copy\n </button>\n </div>\n </div>\n </section>\n</ng-template>\n","import { cloneDeep } from \"lodash-es\";\n\nexport interface OrderListForInheritBizApprovalBackend {\n BuyerOrderId: string;\n AlternateOrderId: string;\n}\n\nexport class InheritedOrder {\n buyerOrderId: string;\n buyerAndAlternateOrderId: string;\n isDisabledKey: boolean;\n\n inheritAndApproveNow: boolean;\n inheritButApproveLater: boolean;\n retainExisting: boolean;\n\n constructor(data: any) {\n this.inheritAndApproveNow = true;\n this.inheritButApproveLater = false;\n this.retainExisting = false;\n this.isDisabledKey = false;\n\n this.buyerOrderId = data.BuyerOrderId;\n this.buyerAndAlternateOrderId = data.AlternateOrderId\n ? `${data.BuyerOrderId} (${data.AlternateOrderId})`\n : `${data.BuyerOrderId}`;\n }\n}\n\nexport interface ApprovalPopupSteps {\n id: ApprovalPopupType;\n stepNo: number;\n}\n\nexport class InheritedOrderList {\n approvalPopupSteps: ApprovalPopupSteps[] = [];\n\n ordersWithoutSetBizRules: InheritedOrder[] = [];\n ApprovedOrdersInheritingBizRules: InheritedOrder[] = [];\n ordersAwaitingApproval: InheritedOrder[] = [];\n\n clonedOrdersWithoutSetBizRules: InheritedOrder[] = [];\n clonedApprovedOrdersInheritingBizRules: InheritedOrder[] = [];\n clonedOrdersAwaitingApproval: InheritedOrder[] = [];\n\n constructor(BEData: any) {\n let approvedOrderInheritBizRuleStep = null;\n let ordersAwaitingApproval = null;\n if (BEData?.ApprovedOrdersInheritingBizRules?.length && BEData?.OrdersAwaitingApproval?.length) {\n approvedOrderInheritBizRuleStep = 1;\n ordersAwaitingApproval = 2;\n }\n\n if (BEData?.OrdersWithoutSetBizRules?.length) {\n this.approvalPopupSteps.push({ id: ApprovalPopupType.OrdersWithoutSetBizRules, stepNo: null });\n\n BEData.OrdersWithoutSetBizRules.forEach((order: any) => {\n this.ordersWithoutSetBizRules.push(new InheritedOrder(order));\n });\n }\n\n if (BEData?.ApprovedOrdersInheritingBizRules?.length) {\n this.approvalPopupSteps.push({\n id: ApprovalPopupType.ApprovedOrdersInheritingBizRules,\n stepNo: approvedOrderInheritBizRuleStep,\n });\n\n BEData.ApprovedOrdersInheritingBizRules.forEach((order: any) => {\n this.ApprovedOrdersInheritingBizRules.push(new InheritedOrder(order));\n });\n }\n\n if (BEData?.OrdersAwaitingApproval?.length) {\n this.approvalPopupSteps.push({\n id: ApprovalPopupType.OrdersAwaitingApproval,\n stepNo: ordersAwaitingApproval,\n });\n\n BEData.OrdersAwaitingApproval.forEach((order: any) => {\n this.ordersAwaitingApproval.push(new InheritedOrder(order));\n });\n }\n\n this.clonedOrdersWithoutSetBizRules = cloneDeep(this.ordersWithoutSetBizRules);\n this.clonedApprovedOrdersInheritingBizRules = cloneDeep(this.ApprovedOrdersInheritingBizRules);\n this.clonedOrdersAwaitingApproval = cloneDeep(this.ordersAwaitingApproval);\n }\n}\n\nexport enum ApprovalPopupType {\n OrdersWithoutSetBizRules = \"OrdersWithoutSetBizRules\",\n ApprovedOrdersInheritingBizRules = \"ApprovedOrdersInheritingBizRules\",\n OrdersAwaitingApproval = \"OrdersAwaitingApproval\",\n}\n\nexport enum ApprovalTableColName {\n InheritAndApproveNow = \"inheritAndApproveNow\",\n InheritButApproveLater = \"inheritButApproveLater\",\n RetainExisting = \"retainExisting\",\n}\n\nexport enum ApprovalTableTotalRowColName {\n InheritAndApproveNow = \"totalInheritAndApproveNow\",\n InheritButApproveLater = \"totalInheritButApproveLater\",\n RetainExisting = \"totalRetainExisting\",\n}\n\nexport interface OrdersToBeInheritedActionType {\n ApproveAndInherit: string[];\n ModifyAndApproveLater: string[];\n ApproveAndRetainExisting: string[];\n}\n","import { Injectable } from \"@angular/core\";\nimport { IGtTableHeader } from \"@annalib/anna-core\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class InheritBizRuleApprovalPopupService {\n getOrdersWithoutSetBizRulesHeaders() {\n const gtTableHeaders: IGtTableHeader[] = [\n {\n headerInfo: [\n {\n name: \"STN ORDER# (ALT ORDER#)\",\n objectKey: \"buyerAndAlternateOrderId\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"buyerAndAlternateOrderId\"],\n },\n ],\n visible: true,\n width: \"168px\",\n },\n {\n headerInfo: [\n {\n name: \"INHERIT & \",\n objectKey: \"inheritAndApproveNow\",\n isDisabledKey: \"isDisabled\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"SINGLE_RADIO\",\n showTooltipIcon: false,\n },\n {\n name: \"APPROVE NOW\",\n objectKey: \"\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"\",\n showTooltipIcon: false,\n },\n ],\n visible: true,\n width: \"100px\",\n },\n {\n headerInfo: [\n {\n name: \"INHERIT BUT MODIFY & \",\n objectKey: \"inheritButApproveLater\",\n isDisabledKey: \"isDisabled\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"SINGLE_RADIO\",\n showTooltipIcon: false,\n },\n {\n name: \"APPROVE LATER\",\n objectKey: \"\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"\",\n showTooltipIcon: false,\n },\n ],\n visible: true,\n width: \"140px\",\n },\n ];\n return gtTableHeaders;\n }\n\n getApprovedOrdersInheritingBizRules() {\n const gtTableHeaders: IGtTableHeader[] = [\n {\n headerInfo: [\n {\n name: \"STN ORDER# (ALT ORDER#)\",\n objectKey: \"buyerAndAlternateOrderId\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"buyerAndAlternateOrderId\"],\n },\n ],\n visible: true,\n width: \"168px\",\n },\n {\n headerInfo: [\n {\n name: \"INHERIT & \",\n objectKey: \"inheritAndApproveNow\",\n isDisabledKey: \"isDisabled\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"SINGLE_RADIO\",\n showTooltipIcon: false,\n },\n {\n name: \"APPROVE NOW\",\n objectKey: \"\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"\",\n showTooltipIcon: false,\n },\n ],\n visible: true,\n width: \"100px\",\n },\n {\n headerInfo: [\n {\n name: \"RETAIN EXISTING\",\n objectKey: \"retainExisting\",\n isDisabledKey: \"isDisabled\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"SINGLE_RADIO\",\n showTooltipIcon: false,\n },\n ],\n visible: true,\n width: \"140px\",\n },\n ];\n return gtTableHeaders;\n }\n\n getOrdersAwaitingApproval() {\n const gtTableHeaders: IGtTableHeader[] = [\n {\n headerInfo: [\n {\n name: \"STN ORDER# (ALT ORDER#)\",\n objectKey: \"buyerAndAlternateOrderId\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"STRING\",\n showTooltipIcon: true,\n isSortRequired: [true],\n isFilterRequired: [true],\n filter: \"CHECKBOX\",\n filterSortObjectKeys: [\"buyerAndAlternateOrderId\"],\n },\n ],\n visible: true,\n width: \"168px\",\n },\n {\n headerInfo: [\n {\n name: \"INHERIT & \",\n objectKey: \"inheritAndApproveNow\",\n isDisabledKey: \"isDisabled\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"SINGLE_RADIO\",\n showTooltipIcon: false,\n },\n {\n name: \"APPROVE NOW\",\n objectKey: \"\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"\",\n showTooltipIcon: false,\n },\n ],\n visible: true,\n width: \"100px\",\n },\n {\n headerInfo: [\n {\n name: \"INHERIT BUT MODIFY & \",\n objectKey: \"inheritButApproveLater\",\n isDisabledKey: \"isDisabled\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"SINGLE_RADIO\",\n showTooltipIcon: false,\n },\n {\n name: \"APPROVE LATER\",\n objectKey: \"\",\n typeOfHeaderData: \"STRING\",\n typeOfBodyData: \"\",\n showTooltipIcon: false,\n },\n ],\n visible: true,\n width: \"140px\",\n },\n ];\n return gtTableHeaders;\n }\n}\n","import { NgClass, NgIf } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n AnnaCoreModule,\n AnnaFilterService,\n AnnaGlobalConfigService,\n AnnaSortService,\n IGtGeneralConfig,\n IGtTableHeader,\n ITotalRowInfo,\n} from \"@annalib/anna-core\";\nimport { BizRuleStatus } from \"@annalib/anna-feature-lib/anna-feature-shared-lib\";\nimport { cloneDeep } from \"lodash-es\";\n\nimport {\n ApprovalPopupSteps,\n ApprovalPopupType,\n ApprovalTableColName,\n ApprovalTableTotalRowColName,\n InheritedOrder,\n InheritedOrderList,\n OrderListForInheritBizApprovalBackend,\n OrdersToBeInheritedActionType,\n} from \"./models/inherit-biz-rule-approval-popup.model\";\nimport { InheritBizRuleApprovalPopupService } from \"./services/inherit-biz-rule-approval-popup.service\";\n\n@Component({\n selector: \"anna-feature-inherit-biz-rule-approval-popup\",\n templateUrl: \"./inherit-biz-rule-approval-popup.component.html\",\n styleUrls: [\"./inherit-biz-rule-approval-popup.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgIf, AnnaCoreModule, NgClass]\n})\nexport class InheritBizRuleApprovalPopupComponent implements OnChanges {\n @Input() loading: boolean = true;\n @Input() orderList: {\n OrdersWithoutSetBizRules: OrderListForInheritBizApprovalBackend[];\n OrdersAwaitingApproval: OrderListForInheritBizApprovalBackend[];\n ApprovedOrdersInheritingBizRules: OrderListForInheritBizApprovalBackend[];\n };\n\n @Input() noOrdersForGivenAdvertiser: boolean = false;\n\n @Input() advertiserName: string = null;\n @Input() stationName: string = null;\n @Input() isBuyerConfigChangedFromNoToYes: boolean = false;\n @Input() isBuyerInvolved: boolean = false;\n @Input() bizRuleStatus: BizRuleStatus;\n BizRuleStatus = BizRuleStatus;\n\n @Output() inheritApprovalPopupApply = new EventEmitter<OrdersToBeInheritedActionType>();\n @Output() modalClose = new EventEmitter();\n\n tableDisplayData: InheritedOrder[] = [];\n clonedTableData: InheritedOrder[] = [];\n\n tableHeaders: IGtTableHeader[] = [];\n totalRowInfo: ITotalRowInfo[] = [];\n gtGeneralConfig: IGtGeneralConfig;\n gtDimension = { rowHeight: 22, headerHeight: 40, dataOnTopHeight: 350, marginFromBottom: 0 };\n\n inheritButApproveLaterCount: number = 0;\n inheritAndApproveNowCount: number = 0;\n retainExistingCount: number = 0;\n\n ApprovalPopupType = ApprovalPopupType;\n allPopupData: InheritedOrderList;\n currentPopupToShow: ApprovalPopupSteps;\n\n constructor(\n private annaSortService: AnnaSortService,\n private annaFilterService: AnnaFilterService,\n private annaGlobalConfig: AnnaGlobalConfigService,\n private inheritBizRuleApprovalPopupService: InheritBizRuleApprovalPopupService,\n ) {\n this.setTableConfig();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes?.orderList?.currentValue) {\n this.allPopupData = new InheritedOrderList(this.orderList);\n this.currentPopupToShow = this.allPopupData.approvalPopupSteps[0];\n this.setTableDisplayDataAndHeaderBasedOnPopupOpened();\n }\n }\n\n setTableDisplayDataAndHeaderBasedOnPopupOpened() {\n this.annaSortService.columnSortState = new Map();\n this.annaFilterService.initialValueMap = new Map();\n this.annaFilterService.appliedFiltersArray = [];\n\n if (this.currentPopupToShow?.id === ApprovalPopupType.OrdersWithoutSetBizRules) {\n this.tableHeaders = this.inheritBizRuleApprovalPopupService.getOrdersWithoutSetBizRulesHeaders();\n this.tableDisplayData = this.allPopupData.ordersWithoutSetBizRules;\n this.clonedTableData = cloneDeep(this.allPopupData.clonedOrdersWithoutSetBizRules);\n this.createTotalRowAndUpdateCount();\n } else if (this.currentPopupToShow?.id === ApprovalPopupType.ApprovedOrdersInheritingBizRules) {\n this.tableHeaders = this.inheritBizRuleApprovalPopupService.getApprovedOrdersInheritingBizRules();\n this.tableDisplayData = this.allPopupData.ApprovedOrdersInheritingBizRules;\n this.clonedTableData = cloneDeep(this.allPopupData.clonedApprovedOrdersInheritingBizRules);\n this.createTotalRowAndUpdateCount();\n } else if (this.currentPopupToShow?.id === ApprovalPopupType.OrdersAwaitingApproval) {\n this.tableHeaders = this.inheritBizRuleApprovalPopupService.getOrdersAwaitingApproval();\n this.tableDisplayData = this.allPopupData.ordersAwaitingApproval;\n this.clonedTableData = cloneDeep(this.allPopupData.clonedOrdersAwaitingApproval);\n this.createTotalRowAndUpdateCount();\n } else {\n this.tableHeaders = [];\n this.tableDisplayData = [];\n this.clonedTableData = [];\n }\n\n this.annaSortService.noSortingAppliedData = cloneDeep(this.clonedTableData);\n }\n\n toggleCheckbox(event: { columnKeys: string; isCheckboxSelected: boolean; rowData: InheritedOrder }) {\n const tableDataRowIndex = this.tableDisplayData.findIndex(\n (obj: InheritedOrder) => obj.buyerAndAlternateOrderId === event.rowData.buyerAndAlternateOrderId,\n );\n const rowIndexWithoutColumnFilter = this.clonedTableData.findIndex(\n (obj: InheritedOrder) => obj.buyerAndAlternateOrderId === event.rowData.buyerAndAlternateOrderId,\n );\n\n if (\n this.currentPopupToShow.id === ApprovalPopupType.OrdersWithoutSetBizRules ||\n this.currentPopupToShow.id === ApprovalPopupType.OrdersAwaitingApproval\n ) {\n if (event.columnKeys === ApprovalTableColName.InheritAndApproveNow) {\n this.tableDisplayData[tableDataRowIndex].inheritAndApproveNow = event.isCheckboxSelected;\n this.tableDisplayData[tableDataRowIndex].inheritButApproveLater = cloneDeep(!event.isCheckboxSelected);\n this.clonedTableData[rowIndexWithoutColumnFilter].inheritAndApproveNow = event.isCheckboxSelected;\n this.clonedTableData[rowIndexWithoutColumnFilter].inheritButApproveLater = cloneDeep(\n !event.isCheckboxSelected,\n );\n } else if (event.columnKeys === ApprovalTableColName.InheritButApproveLater) {\n this.tableDisplayData[tableDataRowIndex].inheritButApproveLater = event.isCheckboxSelected;\n this.tableDisplayData[tableDataRowIndex].inheritAndApproveNow = cloneDeep(!event.isCheckboxSelected);\n this.clonedTableData[rowIndexWithoutColumnFilter].inheritButApproveLater = event.isCheckboxSelected;\n this.clonedTableData[rowIndexWithoutColumnFilter].inheritAndApproveNow = cloneDeep(\n !event.isCheckboxSelected,\n );\n }\n } else if (this.currentPopupToShow.id === ApprovalPopupType.ApprovedOrdersInheritingBizRules) {\n if (event.columnKeys === ApprovalTableColName.RetainExisting) {\n this.tableDisplayData[tableDataRowIndex].retainExisting = event.isCheckboxSelected;\n this.tableDisplayData[tableDataRowIndex].inheritAndApproveNow = cloneDeep(!event.isCheckboxSelected);\n this.clonedTableData[rowIndexWithoutColumnFilter].retainExisting = event.isCheckboxSelected;\n this.clonedTableData[rowIndexWithoutColumnFilter].inheritAndApproveNow = cloneDeep(\n !event.isCheckboxSelected,\n );\n } else if (event.columnKeys === ApprovalTableColName.InheritAndApproveNow) {\n this.tableDisplayData[tableDataRowIndex].inheritAndApproveNow = event.isCheckboxSelected;\n this.tableDisplayData[tableDataRowIndex].retainExisting = cloneDeep(!event.isCheckboxSelected);\n this.clonedTableData[rowIndexWithoutColumnFilter].inheritAndApproveNow = event.isCheckboxSelected;\n this.clonedTableData[rowIndexWithoutColumnFilter].retainExisting = cloneDeep(!event.isCheckboxSelected);\n }\n }\n\n this.createTotalRowAndUpdateCount();\n }\n\n createTotalRowAndUpdateCount() {\n this.totalRowInfo = [];\n this.totalRowInfo.push({\n colspan: 1,\n data: this.annaFilterService.appliedFiltersArray.length > 0 ? \"All filtered result\" : \"All\",\n colName: \"all-col\",\n });\n\n if (this.currentPopupToShow.id === ApprovalPopupType.OrdersWithoutSetBizRules) {\n const inheritAndApproveNow: number = this.tableDisplayData.filter((n) => n.inheritAndApproveNow).length;\n const inheritButApproveLater: number = this.tableDisplayData.filter((n) => n.inheritButApproveLater).length;\n\n this.totalRowInfo.push(\n this.setTotalRowObject(inheritAndApproveNow, ApprovalTableTotalRowColName.InheritAndApproveNow),\n );\n this.totalRowInfo.push(\n this.setTotalRowObject(inheritButApproveLater, ApprovalTableTotalRowColName.InheritButApproveLater),\n );\n } else if (this.currentPopupToShow.id === ApprovalPopupType.ApprovedOrdersInheritingBizRules) {\n const inheritAndApproveNow: number = this.tableDisplayData.filter((n) => n.inheritAndApproveNow).length;\n const retainExisting: number = this.tableDisplayData.filter((n) => n.retainExisting).length;\n\n this.totalRowInfo.push(\n this.setTotalRowObject(inheritAndApproveNow, ApprovalTableTotalRowColName.InheritAndApproveNow),\n );\n this.totalRowInfo.push(this.setTotalRowObject(retainExisting, ApprovalTableTotalRowColName.RetainExisting));\n } else if (this.currentPopupToShow.id === ApprovalPopupType.OrdersAwaitingApproval) {\n const inheritAndApproveNow: number = this.tableDisplayData.filter((n) => n.inheritAndApproveNow).length;\n const inheritButApproveLater: number = this.tableDisplayData.filter((n) => n.inheritButApproveLater).length;\n\n this.totalRowInfo.push(\n this.setTotalRowObject(inheritAndApproveNow, ApprovalTableTotalRowColName.InheritAndApproveNow),\n );\n this.totalRowInfo.push(\n this.setTotalRowObject(inheritButApproveLater, ApprovalTableTotalRowColName.InheritButApproveLater),\n );\n }\n\n this.inheritAndApproveNowCount = this.clonedTableData.filter(\n (x: InheritedOrder) => x.inheritAndApproveNow,\n )?.length;\n this.inheritButApproveLaterCount = this.clonedTableData.filter(\n (x: InheritedOrder) => x.inheritButApproveLater,\n )?.length;\n this.retainExistingCount = this.clonedTableData.filter((x: InheritedOrder) => x.retainExisting)?.length;\n }\n\n setTotalRowObject(columnCheckCount: number, className: ApprovalTableTotalRowColName): ITotalRowInfo {\n const radioUncheckClass = \" mdi mdi-radiobox-blank\";\n const radioCheckClass = \" mdi mdi-radiobox-marked\";\n const iconData = {\n class: columnCheckCount === this.tableDisplayData.length ? radioCheckClass : radioUncheckClass,\n };\n\n return {\n colspan: 1,\n data: \"\",\n colName: className,\n iconData,\n isIconColumn: true,\n };\n }\n\n totalRowIconClicked(colName: ApprovalTableTotalRowColName) {\n if (\n this.currentPopupToShow.id === ApprovalPopupType.OrdersWithoutSetBizRules ||\n this.currentPopupToShow.id === ApprovalPopupType.OrdersAwaitingApproval\n ) {\n const approveNowUnCheckedRowsCount: number = this.tableDisplayData.filter(\n (n) => n.inheritAndApproveNow,\n ).length;\n const selectAllCheckboxForInheritAndApproveNowCondition =\n approveNowUnCheckedRowsCount === 0 || approveNowUnCheckedRowsCount !== this.tableDisplayData.length;\n\n // same radio button is clicked\n if (\n colName === ApprovalTableTotalRowColName.InheritAndApproveNow &&\n approveNowUnCheckedRowsCount === this.tableDisplayData.length\n )\n return;\n\n if (\n colName === ApprovalTableTotalRowColName.InheritAndApproveNow &&\n selectAllCheckboxForInheritAndApproveNowCondition\n ) {\n this.tableDisplayData.forEach((n) => {\n n.inheritAndApproveNow = true;\n n.inheritButApproveLater = false;\n const index: number = this.clonedTableData.findIndex(\n (item: InheritedOrder) => n.buyerAndAlternateOrderId === item.buyerAndAlternateOrderId,\n );\n this.clonedTableData[index].inheritAndApproveNow = true;\n this.clonedTableData[index].inheritButApproveLater = false;\n });\n } else {\n this.tableDisplayData.forEach((n) => {\n n.inheritAndApproveNow = false;\n n.inheritButApproveLater = true;\n const index: number = this.clonedTableData.findIndex(\n (item: InheritedOrder) => n.buyerAndAlternateOrderId === item.buyerAndAlternateOrderId,\n );\n this.clonedTableData[index].inheritAndApproveNow = false;\n this.clonedTableData[index].inheritButApproveLater = true;\n });\n }\n } else if (this.currentPopupToShow.id === ApprovalPopupType.ApprovedOrdersInheritingBizRules) {\n const retainExistingUnCheckedRowsCount: number = this.tableDisplayData.filter(\n (n) => n.retainExisting,\n ).length;\n const selectAllCheckboxForRetainExistingCondition =\n retainExistingUnCheckedRowsCount === 0 ||\n retainExistingUnCheckedRowsCount !== this.tableDisplayData.length;\n\n if (\n colName === ApprovalTableTotalRowColName.RetainExisting &&\n selectAllCheckboxForRetainExistingCondition\n ) {\n this.tableDisplayData.forEach((n) => {\n n.retainExisting = true;\n n.inheritAndApproveNow = false;\n const index: number = this.clonedTableData.findIndex(\n (item: InheritedOrder) => n.buyerAndAlternateOrderId === item.buyerAndAlternateOrderId,\n );\n this.clonedTableData[index].retainExisting = true;\n this.clonedTableData[index].inheritAndApproveNow = false;\n });\n } else {\n this.tableDisplayData.forEach((n) => {\n n.inheritAndApproveNow = true;\n n.retainExisting = false;\n const index: number = this.clonedTableData.findIndex(\n (item: InheritedOrder) => n.buyerAndAlternateOrderId === item.buyerAndAlternateOrderId,\n );\n this.clonedTableData[index].inheritAndApproveNow = true;\n this.clonedTableData[index].retainExisting = false;\n });\n }\n }\n this.createTotalRowAndUpdateCount();\n }\n\n previousClicked() {\n // indexing starts at 0 but steps number is starting with 1, so we need to subtract 1 from it.\n const currentStepIndex = this.currentPopupToShow.stepNo - 1;\n this.setAllPopupTableDataBeforeGoingToNextPopup();\n this.currentPopupToShow = this.allPopupData.approvalPopupSteps[currentStepIndex - 1];\n this.setTableDisplayDataAndHeaderBasedOnPopupOpened();\n }\n\n nextClicked() {\n const currentStepIndex = this.currentPopupToShow.stepNo - 1;\n this.setAllPopupTableDataBeforeGoingToNextPopup();\n this.currentPopupToShow = this.allPopupData.approvalPopupSteps[currentStepIndex + 1];\n this.setTableDisplayDataAndHeaderBasedOnPopupOpened();\n }\n\n setAllPopupTableDataBeforeGoingToNextPopup() {\n if (this.currentPopupToShow?.id === ApprovalPopupType.OrdersWithoutSetBizRules) {\n this.allPopupData.ordersWithoutSetBizRules = cloneDeep(this.clonedTableData);\n this.allPopupData.clonedOrdersWithoutSetBizRules = cloneDeep(this.clonedTableData);\n } else if (this.currentPopupToShow?.id === ApprovalPopupType.ApprovedOrdersInheritingBizRules) {\n this.allPopupData.ApprovedOrdersInheritingBizRules = cloneDeep(this.clonedTableData);\n this.allPopupData.clonedApprovedOrdersInheritingBizRules = cloneDeep(this.clonedTableData);\n } else if (this.currentPopupToShow?.id === ApprovalPopupType.OrdersAwaitingApproval) {\n this.allPopupData.ordersAwaitingApproval = cloneDeep(this.clonedTableData);\n this.allPopupData.clonedOrdersAwaitingApproval = cloneDeep(this.clonedTableData);\n }\n }\n\n onConfirmClicked() {\n this.setAllPopupTableDataBeforeGoingToNextPopup();\n let ordersToBeInheritedAction: OrdersToBeInheritedActionType;\n if (this.noOrdersForGivenAdvertiser) {\n ordersToBeInheritedAction = null;\n } else {\n const inheritAndApproveNow = [\n ...this.allPopupData.ordersWithoutSetBizRules\n .filter((x) => x.inheritAndApproveNow)\n .map((x: InheritedOrder) => x.buyerOrderId),\n ...this.allPopupData.ApprovedOrdersInheritingBizRules.filter((x) => x.inheritAndApproveNow).map(\n (x: InheritedOrder) => x.buyerOrderId,\n ),\n ...this.allPopupData.ordersAwaitingApproval\n .filter((x) => x.inheritAndApproveNow)\n .map((x: InheritedOrder) => x.buyerOrderId),\n ];\n const inheritButApproveLater = [\n ...this.allPopupData.ordersWithoutSetBizRules\n .filter((x) => x.inheritButApproveLater)\n .map((x: InheritedOrder) => x.buyerOrderId),\n ...this.allPopupData.ApprovedOrdersInheritingBizRules.filter((x) => x.inheritButApproveLater).map(\n (x: InheritedOrder) => x.buyerOrderId,\n ),\n ...this.allPopupData.clonedOrdersAwaitingApproval\n .filter((x) => x.inheritButApproveLater)\n .map((x: InheritedOrder) => x.buyerOrderId),\n ];\n const retainExisting = [\n ...this.allPopupData.ordersWithoutSetBizRules\n .filter((x) => x.retainExisting)\n .map((x: InheritedOrder) => x.buyerOrderId),\n ...this.allPopupData.ApprovedOrdersInheritingBizRules.filter((x) => x.retainExisting).map(\n (x: InheritedOrder) => x.buyerOrderId,\n ),\n ...this.allPopupData.ordersAwaitingApproval\n .filter((x) => x.retainExisting)\n .map((x: InheritedOrder) => x.buyerOrderId),\n ];\n ordersToBeInheritedAction = {\n ApproveAndInherit: inheritAndApproveNow,\n ModifyAndApproveLater: inheritButApproveLater,\n ApproveAndRetainExisting: retainExisting,\n };\n }\n\n this.inheritApprovalPopupApply.emit(ordersToBeInheritedAction);\n this.clearFilterAndCloseModal();\n }\n\n filterAppliedToTable(data: InheritedOrder[]) {\n this.tableDisplayData = cloneDeep(data);\n this.createTotalRowAndUpdateCount();\n }\n\n sortingAppliedToTable(data: InheritedOrder[]) {\n this.tableDisplayData = cloneDeep(data);\n }\n\n setTableConfig() {\n this.gtGeneralConfig = { ...this.annaGlobalConfig.defaultGtGeneralConfig };\n this.gtGeneralConfig.component = \"EXCLUDEINVENTORYPOPUP\";\n this.gtGeneralConfig.totalRow = true;\n this.gtGeneralConfig.tableContainerName = \"inherit-biz-rule-approval-popup\";\n this.gtGeneralConfig.tableOuterContainerName = \"inherit-biz-rule-approval-popup-container\";\n }\n\n cancelClicked() {\n this.clearFilterAndCloseModal();\n }\n\n clearFilterAndCloseModal() {\n this.annaFilterService.tooltipSelectedMap = new Map();\n this.annaFilterService.appliedFiltersArray = [];\n this.modalClose.emit();\n }\n}\n","<section>\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">Approval</h3>\n <i\n *ngIf=\"currentPopupToShow?.stepNo\"\n class=\"mi mdi-close-icon mdi-font-md close pull-right\"\n (click)=\"cancelClicked()\"\n ></i>\n </div>\n\n <div\n class=\"modal-body\"\n class=\"{{ currentPopupToShow?.id }} approval-popup-container\"\n >\n <div\n class=\"no-order-confirm\"\n *ngIf=\"noOrdersForGivenAdvertiser\"\n >\n Are you sure you want to approve the advertiser business rules? <br />\n These approved rules will be used for providing offers starting from the next revision cycle.\n <ng-container *ngIf=\"isBuyerConfigChangedFromNoToYes\"\n >These rules and the orders will also be shared with the buyer post approval as per the set\n configurations.\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"!noOrdersForGivenAdvertiser\">\n <span class=\"mt-20 info-text\">\n Station: <b>{{ stationName }}</b>\n </span>\n <span class=\"mt-20 info-text ml-8\">\n Advertiser: <b>{{ advertiserName }}</b>\n </span>\n\n <div class=\"top msg\">\n <ng-container *ngIf=\"currentPopupToShow?.id === ApprovalPopupType.OrdersWithoutSetBizRules\">\n The orders will inherit the approved advertiser business rules. Please indicate your preference for\n each order.\n </ng-container>\n <ng-container *ngIf=\"currentPopupToShow?.id === ApprovalPopupType.ApprovedOrdersInheritingBizRules\">\n <header>\n {{ currentPopupToShow?.stepNo ? currentPopupToShow?.stepNo + \".\" : \"\" }}\n Approved orders Inheriting advertiser business rules\n </header>\n These orders are currently following the advertiser business rules. Select\n <b>‘Retain Existing’</b> for orders that shouldn’t reflect these latest changes.\n </ng-container>\n <ng-container *ngIf=\"currentPopupToShow?.id === ApprovalPopupType.OrdersAwaitingApproval\">\n <header>\n {{ currentPopupToShow?.stepNo ? currentPopupToShow?.stepNo + \".\" : \"\" }}\n Orders awaiting approval\n </header>\n These orders are currently following the advertiser business rules. Select\n <b>‘Inherit But Modify & Approve Later’</b> for orders that require further changes.\n </ng-container>\n </div>\n\n <div class=\"count\">\n <ng-container *ngIf=\"currentPopupToShow?.id === ApprovalPopupType.OrdersWithoutSetBizRules\">\n <b\n >{{ inheritAndApproveNowCount }} Inherit & Approve Now and\n {{ inheritButApproveLaterCount }} Inherit but Modify & Approve Later\n </b>\n orders selected\n </ng-container>\n <ng-container *ngIf=\"currentPopupToShow?.id === ApprovalPopupType.ApprovedOrdersInheritingBizRules\">\n <b\n >{{ inheritAndApproveNowCount }} Inherit & Approve Now and {{ retainExistingCount }} Retain\n Existing\n </b>\n orders selected\n </ng-container>\n <ng-container *ngIf=\"currentPopupToShow?.id === ApprovalPopupType.OrdersAwaitingApproval\">\n <b\n >{{ inheritAndApproveNowCount }} Inherit & Approve Now and\n {{ inheritButApproveLaterCount }} Inherit but Modify & Approve Later\n </b>\n orders selected\n </ng-container>\n </div>\n\n <anna-core-non-editable-generic-table-lib\n [tableBorderBottomClassRequired]=\"false\"\n [fixNumberOfRowsForPopup]=\"true\"\n [ngClass]=\"{\n 'inherit-biz-rule-approval-no-data-table':\n !loading && tableDisplayData && tableDisplayData.length === 0\n }\"\n [showSkeletonLoading]=\"loading\"\n [tableHeaders]=\"tableHeaders\"\n [tableData]=\"tableDisplayData\"\n [clonedTableData]=\"clonedTableData\"\n [totalRowInfo]=\"totalRowInfo\"\n [gtGeneralConfig]=\"gtGeneralConfig\"\n [gtDimension]=\"gtDimension\"\n (totalRowIconClicked)=\"totalRowIconClicked($event)\"\n (filterAppliedToTable)=\"filterAppliedToTable($event)\"\n (sortingAppliedToTable)=\"sortingAppliedToTable($event)\"\n (toggleCheckbox)=\"toggleCheckbox($event)\"\n >\n </anna-core-non-editable-generic-table-lib>\n\n <div\n class=\"bottom msg\"\n *ngIf=\"\n !currentPopupToShow?.stepNo || currentPopupToShow?.stepNo === allPopupData.approvalPopupSteps.length\n \"\n >\n These approved rules will be used for providing offers starting from the next revision cycle. <br />\n <ng-container\n *ngIf=\"\n (bizRuleStatus === BizRuleStatus.AWAITING_APPROVAL && !isBuyerInvolved) ||\n (bizRuleStatus !== BizRuleStatus.AWAITING_APPROVAL && !isBuyerConfigChangedFromNoToYes)\n \"\n >\n Are you sure you want to approve the advertiser business rules and take selected action for all\n orders mentioned above?\n </ng-container>\n <ng-container\n *ngIf=\"\n (bizRuleStatus === BizRuleStatus.AWAITING_APPROVAL && isBuyerInvolved) ||\n (bizRuleStatus !== BizRuleStatus.AWAITING_APPROVAL && isBuyerConfigChangedFromNoToYes)\n \"\n >\n Are you sure you want to approve the advertiser business rules and take selected action on all\n orders? These rules and the orders will also be shared with the buyer post approval as per the set\n configurations.\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"btn-container\">\n <button\n *ngIf=\"!currentPopupToShow?.stepNo\"\n class=\"anna cancel-button\"\n (click)=\"cancelClicked()\"\n >\n Cancel\n </button>\n\n <button\n *ngIf=\"currentPopupToShow?.stepNo\"\n class=\"anna cancel-button\"\n [disabled]=\"currentPopupToShow?.stepNo === 1\"\n (click)=\"previousClicked()\"\n >\n Previous\n </button>\n\n <button\n *ngIf=\"\n !currentPopupToShow?.stepNo || currentPopupToShow?.stepNo === allPopupData.approvalPopupSteps.length\n \"\n class=\"anna apply-button\"\n (click)=\"onConfirmClicked()\"\n >\n Confirm\n </button>\n\n <button\n *ngIf=\"\n currentPopupToShow?.stepNo && currentPopupToShow?.stepNo !== allPopupData.approvalPopupSteps.length\n \"\n class=\"anna apply-button\"\n (click)=\"nextClicked()\"\n >\n Next({{ currentPopupToShow?.stepNo }}/{{ allPopupData.approvalPopupSteps.length }})\n </button>\n </div>\n </div>\n</section>\n","\nimport { MultiSelectIdText } from \"@annalib/anna-design-components-lib\";\n\nexport enum MassCopyType {\n BULK_COPY = \"BULK_COPY\",\n INCREMENTAL_COPY = \"INCREMENTAL_COPY\",\n}\n\nexport class MassCopyAdvertiserOrderList {\n advertisers: MultiSelectIdText[] = [];\n orders: MultiSelectIdText[] = [];\n\n constructor(data: { Advertisers: any[]; Orders: any[] }) {\n this.advertisers = data.Advertisers.map(\n (adv) => new MultiSelectIdText(adv.AdvertiserId, adv.AdvertiserName, false, false, false, null, null),\n );\n\n this.orders = data.Orders.map(\n (order) =>\n new MultiSelectIdText(\n order.OrderId,\n order.OrderId,\n false,\n false,\n false,\n `(${order.AdvertiserName})`,\n \"additional-data-color-text italic\",\n ),\n );\n }\n}\nexport interface IBulkCopyBizRulesPayload {\n RequestedByUserId: number;\n StationId: number;\n SourceCopyEntityType: string;\n SourceEntityId: number | string;\n CopyMode: string;\n SelectedStationIds: number[];\n SelectedAdvertiserIds: number[];\n SelectedOrderIds: string[];\n BizRulesSectionsToBeCopied: IBizRulesSections;\n}\n\nexport interface IBizRulesSections {\n DaypartRestrictions: boolean;\n EquivalentOrHigherDayparts: boolean;\n ExcludedAndSpecialPrograms: boolean;\n General: boolean;\n MakeGoodBizRules: boolean;\n ADUBizRules: boolean;\n}","import { CommonModule, NgIf } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, Inject, Input, TemplateRef, ViewChild } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport {\n AnnaCircularProgressComponent,\n AnnaGlobalConfigService,\n IConfirmationPopupConfig,\n ICustomMultiSelect,\n} from \"@annalib/anna-core\";\nimport {\n GenericMessageBoxTheme,\n IdText,\n MessageBoxComponent,\n MessageBoxData,\n MultiSelectComponent,\n MultiSelectIdText,\n} from \"@annalib/anna-design-components-lib\";\nimport { NotificationsService } from \"@annalib/anna-feature-lib\";\nimport { NgbModal, NgbModalOptions, NgbModalRef } from \"@ng-bootstrap/ng-bootstrap\";\nimport { ToastrService } from \"ngx-toastr\";\n\nimport {\n BusinessPageType,\n BusinessRuleSectionNameForCopyBizRule,\n} from \"../business-rule-page/models/business-rule-page.constants\";\nimport {\n COPY_BUSINESS_RULE_POPUP_SERVICE,\n IBusinessRuleTabService,\n} from \"../copy-biz-rules-popup/copy-business-rule-backend-service.token\";\nimport { MessageConstants } from \"../copy-biz-rules-popup/models/copy-biz-rules.model\";\nimport {\n IBulkCopyBizRulesPayload,\n MassCopyAdvertiserOrderList,\n MassCopyType,\n} from \"./models/mass-copy-biz-rules.model\";\n\n@Component({\n selector: \"anna-feature-mass-copy-biz-rules-popup\",\n imports: [\n CommonModule,\n MultiSelectComponent,\n NgIf,\n MessageBoxComponent,\n FormsModule,\n AnnaCircularProgressComponent,\n ],\n templateUrl: \"./mass-copy-biz-rules-popup.component.html\",\n styleUrls: [\"./mass-copy-biz-rules-popup.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MassCopyBizRulesPopupComponent {\n @Input() copyType: MassCopyType = MassCopyType.BULK_COPY;\n @Input() modalTitle: string = \"Copy All Business Rules to\";\n @Input() station: IdText;\n @Input() advertiserIdText: IdText;\n @Input() orderId: string;\n MassCopyType = MassCopyType;\n BusinessPageType = BusinessPageType;\n @Input() businessRulePageType: BusinessPageType;\n @ViewChild(\"massCopyBusinessRuleModal\") private copyRulesTemplate: TemplateRef<any>;\n copyRulesModalReference: NgbModalRef;\n loading: boolean = false;\n isCircularProgressLoader = false;\n config: IConfirmationPopupConfig;\n\n advertiserOrderForMassCopy: MassCopyAdvertiserOrderList;\n advMultiSelectConfig: ICustomMultiSelect;\n orderMultiSelectConfig: ICustomMultiSelect;\n showPopupProgressLoader: boolean = false;\n massCopyMessageData: MessageBoxData;\n rulesThatCanBeCopied = [\n { name: BusinessRuleSectionNameForCopyBizRule.DAY_AND_DAYPART_RESTICTIONS, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.EQUIVALENT_AND_HIGHER_DAYPARTS, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.EXCLUDED_PROGRAM_AND_SPECIAL_PROGRAM, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.GENERAL_RULES, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.MG_RULES, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.ADU_RULES, isSelected: true },\n ];\n selectedAdvertisers: MultiSelectIdText[] = [];\n selectedOrders: MultiSelectIdText[] = [];\n copyButtonDisabled: boolean = true;\n percentDone: number = 0;\n translateLoader: boolean;\n\n constructor(\n private modalService: NgbModal,\n private globalConfig: AnnaGlobalConfigService,\n private notificationService: NotificationsService,\n private toastr: ToastrService,\n @Inject(COPY_BUSINESS_RULE_POPUP_SERVICE)\n public consumingProjectBusinessRuleService: IBusinessRuleTabService,\n ) {\n this.config = { ...this.globalConfig.defaultConfirmationPopupConfig };\n this.createAdvMultiSelectConfig();\n this.createOrderMultiSelectConfig();\n this.setMessageData();\n }\n // ngOnInit() {\n // }\n openModal() {\n const ngbModalOptions: NgbModalOptions = {\n windowClass: \"mass-copy-biz-rule-modal \",\n centered: true,\n size: \"sm\",\n };\n this.translateLoader = false;\n this.rulesThatCanBeCopied = [\n { name: BusinessRuleSectionNameForCopyBizRule.DAY_AND_DAYPART_RESTICTIONS, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.EQUIVALENT_AND_HIGHER_DAYPARTS, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.EXCLUDED_PROGRAM_AND_SPECIAL_PROGRAM, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.GENERAL_RULES, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.MG_RULES, isSelected: true },\n { name: BusinessRuleSectionNameForCopyBizRule.ADU_RULES, isSelected: true },\n ];\n this.isCircularProgressLoader = false;\n this.percentDone = 0;\n this.showPopupProgressLoader = false;\n this.fetchAdvertiserAndOrderList();\n this.selectedAdvertisers = [];\n this.selectedOrders = [];\n this.checkIfCopyButtonEnabled();\n this.copyRulesModalReference = this.modalService.open(this.copyRulesTemplate, ngbModalOptions);\n }\n advertiserSelectionChange(advertiserList: MultiSelectIdText[]) {\n this.selectedAdvertisers = advertiserList.filter((item: MultiSelectIdText) => item.isSelected);\n this.checkIfCopyButtonEnabled();\n }\n orderSelectionChange(orderList: MultiSelectIdText[]) {\n this.selectedOrders = orderList.filter((item: MultiSelectIdText) => item.isSelected);\n this.checkIfCopyButtonEnabled();\n }\n fetchAdvertiserAndOrderList() {\n this.loading = true;\n this.consumingProjectBusinessRuleService\n // eslint-disable-next-line no-unsafe-optional-chaining\n .getAdvertiserAndOrderListForMassCopy(+this.station?.id, +this.advertiserIdText?.id, this.orderId)\n .subscribe(\n (response) => {\n this.advertiserOrderForMassCopy = new MassCopyAdvertiserOrderList(response.body);\n if (\n !this.advertiserOrderForMassCopy ||\n this.advertiserOrderForMassCopy?.advertisers?.length === 0\n ) {\n this.advMultiSelectConfig.placeholder = \"No Advertisers\";\n }\n if (!this.advertiserOrderForMassCopy || this.advertiserOrderForMassCopy?.orders?.length === 0) {\n this.orderMultiSelectConfig.placeholder = \"No Orders\";\n }\n this.loading = false;\n },\n (error) => {\n this.loading = false;\n },\n );\n }\n setMessageData() {\n const msg =\n \"These changes will be applied to all orders identical to their advertisers (if selected below), except those with custom business rules. You can copy them separately to these orders if needed.\";\n const iconClass = \"mdi mdi-information\";\n this.massCopyMessageData = new MessageBoxData(\n null,\n msg,\n iconClass,\n `${GenericMessageBoxTheme.informationBlue.messageBoxClass} sm mass-copy`,\n );\n }\n checkIfCopyButtonEnabled() {\n const isOrderPage = this.businessRulePageType === BusinessPageType.ORDER;\n const hasSelectedRules = this.rulesThatCanBeCopied.some((rule) => rule.isSelected);\n const hasRequiredSelections = isOrderPage\n ? this.selectedOrders.length > 0\n : this.selectedAdvertisers.length > 0 || this.selectedOrders.length > 0;\n\n this.copyButtonDisabled = !(hasSelectedRules && hasRequiredSelections);\n }\n\n createAdvMultiSelectConfig() {\n this.advMultiSelectConfig = { ...this.globalConfig.defaultMultiSelectConfig };\n this.advMultiSelectConfig.showErrorWhenNoOptionSelected = false;\n this.advMultiSelectConfig.showSearchBar = true;\n this.advMultiSelectConfig.placeholder = \"Select Advertisers\";\n }\n createOrderMultiSelectConfig() {\n this.orderMultiSelectConfig = { ...this.globalConfig.defaultMultiSelectConfig };\n this.orderMultiSelectConfig.showErrorWhenNoOptionSelected = false;\n this.orderMultiSelectConfig.showSearchBar = true;\n this.orderMultiSelectConfig.placeholder = \"Select Orders\";\n }\n closeModal() {\n if (this.copyRulesModalReference) {\n this.copyRulesModalReference.close();\n }\n }\n businessRulesSelectionChanged() {\n this.checkIfCopyButtonEnabled();\n }\n copyBusinessRules() {\n const payload = this.createCopyPayload();\n this.showPopupProgressLoader = true;\n\n const interval = setInterval(() => {\n if (this.percentDone < 15) {\n this.percentDone += 5;\n } else {\n clearInterval(interval);\n this.isCircularProgressLoader = true;\n this.consumingProjectBusinessRuleService.initiateBulkCopyOfBusinessRules(payload).subscribe(\n (response) => {\n this.translateLoader = true;\n this.notificationService.triggerLoaderFromStart();\n this.closeModal();\n },\n (error) => {\n this.toastr.error(MessageConstants.SERVER_ERROR_MSG);\n this.closeModal();\n },\n );\n }\n }, 500);\n }\n createCopyPayload() {\n let sourceId;\n if (this.businessRulePageType === BusinessPageType.STATION) {\n sourceId = this.station.id;\n } else if (this.businessRulePageType === BusinessPageType.ADVERTISER) {\n sourceId = this.advertiserIdText.id;\n } else {\n sourceId = this.orderId;\n }\n const payload: IBulkCopyBizRulesPayload = {\n RequestedByUserId: JSON.parse(localStorage.getItem(\"userProfileData\"))\n ? +JSON.parse(localStorage.getItem(\"userProfileData\")).userId\n : null,\n StationId: +this.station.id,\n SourceCopyEntityType: this.businessRulePageType,\n SourceEntityId: sourceId.toString(),\n CopyMode: this.copyType,\n SelectedStationIds: [],\n SelectedAdvertiserIds: this.selectedAdvertisers?.map((adv) => adv.id) || [],\n SelectedOrderIds: this.selectedOrders?.map((order) => order.id) || [],\n BizRulesSectionsToBeCopied: {\n DaypartRestrictions: this.getIsSelectedValueForBizRules(\n BusinessRuleSectionNameForCopyBizRule.DAY_AND_DAYPART_RESTICTIONS,\n ),\n EquivalentOrHigherDayparts: this.getIsSelectedValueForBizRules(\n BusinessRuleSectionNameForCopyBizRule.EQUIVALENT_AND_HIGHER_DAYPARTS,\n ),\n ExcludedAndSpecialPrograms: this.getIsSelectedValueForBizRules(\n BusinessRuleSectionNameForCopyBizRule.EXCLUDED_PROGRAM_AND_SPECIAL_PROGRAM,\n ),\n General: this.getIsSelectedValueForBizRules(BusinessRuleSectionNameForCopyBizRule.GENERAL_RULES),\n MakeGoodBizRules: this.getIsSelectedValueForBizRules(BusinessRuleSectionNameForCopyBizRule.MG_RULES),\n ADUBizRules: this.getIsSelectedValueForBizRules(BusinessRuleSectionNameForCopyBizRule.ADU_RULES),\n },\n };\n return payload;\n }\n getIsSelectedValueForBizRules(ruleName: string): boolean {\n const rule = this.rulesThatCanBeCopied.find((r) => r.name === ruleName);\n return rule ? rule.isSelected : false;\n }\n}\n","<ng-template\n #massCopyBusinessRuleModal\n let-modal\n>\n <section\n class=\"main-modal\"\n [ngClass]=\"{ circular: isCircularProgressLoader, fade: translateLoader }\"\n >\n <section *ngIf=\"!isCircularProgressLoader\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ showPopupProgressLoader ? \"Copying in progress\" : modalTitle }}</h3>\n </div>\n\n <div class=\"modal-body\">\n <section *ngIf=\"!showPopupProgressLoader\">\n <div class=\"meta-data\">\n <span\n >Station: <b>{{ station?.text }}</b></span\n >\n <span *ngIf=\"advertiserIdText\">\n Advertiser: <b>{{ advertiserIdText?.text }}</b>\n </span>\n <span *ngIf=\"orderId\">\n Order#: <b>{{ orderId }}</b>\n </span>\n </div>\n <anna-design-message-box\n *ngIf=\"businessRulePageType !== BusinessPageType.ORDER\"\n [messageBoxData]=\"massCopyMessageData\"\n ></anna-design-message-box>\n\n <div class=\"dropdown-container\">\n <ng-container *ngIf=\"businessRulePageType !== BusinessPageType.ORDER\">\n <label>Advertiser</label>\n <anna-design-multi-select\n [loading]=\"loading\"\n [config]=\"advMultiSelectConfig\"\n [items]=\"advertiserOrderForMassCopy?.advertisers\"\n (selectionChangedEmitAllItems)=\"advertiserSelectionChange($event)\"\n [disabled]=\"!advertiserOrderForMassCopy?.advertisers?.length\"\n (dropdownClosedEvent)=\"advertiserSelectionChange($event)\"\n >\n </anna-design-multi-select\n ></ng-container>\n\n <label>Orders</label>\n <anna-design-multi-select\n [loading]=\"loading\"\n [config]=\"orderMultiSelectConfig\"\n [items]=\"advertiserOrderForMassCopy?.orders\"\n (selectionChangedEmitAllItems)=\"orderSelectionChange($event)\"\n [disabled]=\"!advertiserOrderForMassCopy?.orders?.length\"\n (dropdownClosedEvent)=\"orderSelectionChange($event)\"\n >\n </anna-design-multi-select>\n </div>\n <div\n class=\"checkbox-for-copy\"\n *ngIf=\"copyType === MassCopyType.BULK_COPY\"\n >\n <label>Select business rules you want to copy.</label>\n <div *ngFor=\"let rule of rulesThatCanBeCopied\">\n <input\n id=\"{{ rule.name }}\"\n type=\"checkbox\"\n [(ngModel)]=\"rule.isSelected\"\n (change)=\"businessRulesSelectionChanged()\"\n />\n <label for=\"{{ rule.name }}\">{{ rule.name }}</label>\n </div>\n </div>\n <div class=\"bottom-msg\">\n The rules will be copied and approved for all<span\n *ngIf=\"businessRulePageType !== BusinessPageType.ORDER\"\n >\n advertisers and</span\n >\n orders selected above. Are you sure?\n </div>\n <div class=\"button-container\">\n <button\n class=\"anna cancel-button\"\n (click)=\"closeModal()\"\n >\n Cancel\n </button>\n <button\n class=\"anna apply-button\"\n (click)=\"copyBusinessRules()\"\n [disabled]=\"copyButtonDisabled\"\n >\n Copy\n </button>\n </div>\n </section>\n <section\n class=\"circular-progress-container mb-20\"\n *ngIf=\"showPopupProgressLoader\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n circularProgressTemplate;\n context: {\n headerText:\n copyType === MassCopyType.BULK_COPY\n ? 'Copying Business Rules'\n : 'Copying Incremental Changes',\n percentDone: percentDone,\n animationDuration: 50,\n additionalClass: ''\n }\n \"\n ></ng-container>\n </section>\n </div>\n </section>\n <section\n class=\"circular-progress-container\"\n *ngIf=\"isCircularProgressLoader\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n circularProgressTemplate;\n context: {\n headerText:\n copyType === MassCopyType.BULK_COPY\n ? 'Copying Business Rules'\n : 'Copying Incremental Changes',\n percentDone: percentDone,\n animationDuration: 200,\n additionalClass: translateLoader ? 'translate-loader' : ''\n }\n \"\n ></ng-container>\n </section>\n </section>\n</ng-template>\n<ng-template\n #circularProgressTemplate\n let-headerText=\"headerText\"\n let-percentDone=\"percentDone\"\n let-animationDuration=\"animationDuration\"\n let-additionalClass=\"additionalClass\"\n>\n <section\n class=\"circular-progress-container\"\n [ngClass]=\"additionalClass\"\n >\n <div class=\"progress-header\">{{ headerText }}</div>\n <div class=\"circular-container\">\n <anna-core-circular-progress\n [percent]=\"percentDone\"\n [radius]=\"22\"\n [outerStrokeWidth]=\"5\"\n [innerStrokeWidth]=\"5\"\n [outerStrokeColor]=\"'#43A047'\"\n [innerStrokeColor]=\"'#d5d5d5'\"\n [animationDuration]=\"animationDuration\"\n ></anna-core-circular-progress>\n </div>\n </section>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1","i2.BusinessRuleCommonSIBILogicService","i3","i4","i6","i1.ApprovalConfigService","cloneDeep","sortBy","i5","i2.InheritBizRuleApprovalPopupService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;MAGa,2BAA2B,GACpC,IAAI,cAAc,CAA8B,mCAAmC;;ACJvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IAEY;AAAZ,CAAA,UAAY,uBAAuB,EAAA;AAC/B,IAAA,uBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,uBAAA,CAAA,qBAAA,CAAA,GAAA,iBAAuC;AACvC,IAAA,uBAAA,CAAA,qBAAA,CAAA,GAAA,yBAA+C;AAC/C,IAAA,uBAAA,CAAA,kBAAA,CAAA,GAAA,mBAAsC;AACtC,IAAA,uBAAA,CAAA,iBAAA,CAAA,GAAA,kBAAoC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