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KAAK4nB,iBAC/F5nB,KAAK63D,kBACP,CAKOnjB,oBACL10C,KAAKs4C,YAAYj4B,QACnB,CAKOw3C,mBACL73D,KAAKs4C,YAAYhW,OACnB,0FA5BCsB,yBACAA,+BACAA,2BAEA3pB,MAASC,KAAA,CAAC,oBANAy9C,MAAiC51D,MAAA,IAL7CoY,OAAU,CACTC,SAAU,mCACVC,8zBAGWs9C,IC+UN,IAAMG,GAAN,QAAMA,MAAS/1D,MAAA,IAzKrBg2D,OAAS,CACRC,aAAc,CACZ55B,GACAlC,GACAgD,GACAI,GACA0C,GACAS,GACAoB,GACAoC,GACAiH,GACAkB,GACAyB,GACAQ,GACAiE,GACAY,GACAiB,GACAxrB,GACApN,GACAu5B,GACA1/B,GACA4/B,GACAe,GACAU,GACAM,GACArhB,GACA0hB,GACAc,GACAE,GACAQ,GACAI,GACA7gB,GACAghB,GACAG,GACAI,GACAphC,GACAmiC,GACAU,GACAO,GACA+B,GACAuF,GACA4F,GACAqG,GACAwB,GACAhwB,GACAk1B,GACA31B,IAEFi2B,QAAS,CACPC,KACAC,MACAl6B,KACAm6B,KACAC,MACAC,KACAC,MACAC,MACAC,MACAC,KACAC,KACAC,MACAC,KACAC,MACAC,IAAgB76B,QAAQ,CACtB86B,OAAQ,CACN5U,QAAS6U,KACTC,WAjJF,SAAUC,GAAkBC,GAChC,OAAO,IAAIC,KAAoBD,EAAY,iBAAkB,QAC/D,EAgJQE,KAAM,CAACh5D,KAAYV,IAErB25D,0BAA2B,CACzBnV,QAASoV,KACTxI,SAlJF,MAAOyI,GAIJp4B,OAAOtT,GACZ,SAAOxsB,OAAGwsB,EAAO7mB,IACnB,IA8IIwyD,gBAAiB,KACjBC,SAAS,IAEX37B,IAEF47B,QAAS,CACP53B,GACAS,GACAoB,GACAoC,GACAiH,GACAkB,GACAyB,GACAQ,GACAiE,GACAY,GACAiB,GACAxrB,GACApN,GACAu5B,GACA1/B,GACA4/B,GACAe,GACAU,GACAM,GACArhB,GACA0hB,GACA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A,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,cACA,iBACA,eACA,kBACA,eACA,kBACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,WACA,cACA,WACA,cACA,YACA,eACA,aACA,gBACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,qBACA,kBACA,qBACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,WACA,cACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,WACA,cACA,YACA,eACA,UACA,aACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,eACA,kBACA,cACA,iBACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,iBACA,oBACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,aACA,gBACA,YACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,eACA,kBACA,YACA,eACA,YACA,eACA,WACA,iBACA,oBACA,cACA,UACA,aACA,iBACA,oBACA,WACA,cACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,mBAIA,SAAA+6D,EAAAz7B,GACA,IAAAz9B,GAAAm5D,EAAA17B,GACA,OAAAs7B,EAAA/4D,GACA,CACA,SAAAm5D,EAAA17B,GACA,IAAAs7B,EAAAK,EAAAj7D,EAAAs/B,GAAA,CACA,IAAA3Y,GAAA,IAAApS,MAAA,uBAAA+qB,EAAA,KACA,MAAA3Y,GAAA62B,KAAA,mBACA72B,EACA,CACA,OAAA3mB,EAAAs/B,EACA,CACAy7B,EAAAx0D,KAAA,WACA,OAAAtG,OAAAsG,KAAAvG,EACA,EACA+6D,EAAAG,QAAAF,EACA9/B,EAAA88B,QAAA+C,EACAA,EAAAl5D,GAAA","names":["WorkItems","FileExtensionType","RREmailType","TypeOfReport","ReportTypes","ReportSubTabs","DashboardReportTypes","TabIndexes","ReportTypesTitles","Motion","Bill","Statement","BcrPdf","BcrDocx","ActionBarEmail","SendToRapporteurEmail","BCR","RR","OB","ODR","COSR","Reports","OutstandingItems","Current","Draft","OutstandingCurrent","OutstandingDraft","Previous","SectionTypes","ArrangementTypes","BusinessDaysTemplates","FormTemplate","FormFieldNames","Day","Section","WorkItem","Blank","Tuesday","Wednesday","Thursday","leadersQuestions","orderOfBusiness","motions","taoiseach","pqOral","topicalIssues","privateNoticeQuestion","governmentBusiness","privateMembersBusiness","privateMembersBill","questionsOnPromisedLegislation","sos","deferredDivisions","dayArrangements","adjournment","custom","expressionsOfSympathy","messages","announcements","billsForIntroduction","referralToCommittee","parties","department","SectionsApi","WorkItemTypes","WorkItemTypeValues","ReportStatuses","Stages","Amendments","TitleTranslationStatuses","TitleSdlTranslationStatuses","TitleSdlTranslationTypes","bills","statements","Circulated","Update","OutdatedByDraft","OutdatedByCirculated","OutdatedByUpdate","Deleted","FirstStage","OrderForSecondStage","SecondStage","OrderForCommitteeStage","CommitteeStage","OrderForReport","ReportStage","OrderForFifthStage","FifthStage","AllStages","AmendmentsFromTheSeanad","Amendment","AmendmentToAmendment","InTranslation","TranslationReceived","TranslationWithdrawn","Initial","SentForTranslation","InFinalReview","Translated","Preparation","Translation","Review","Finalisation","AppConfigService","constructor","httpHandler","config","this","localSettings$","config$","values$","BehaviorSubject","http","HttpClient","init","get","pipe","tap","value","localSettings","next","switchMap","fetchConfig","takeUntil","filter","v","prop","pluck","getValue","set","of","setCookie","property","days","getAll","map","Object","assign","__decorate","Injectable","providedIn","DashboardService","oirHttp","report","Subject","reportDeleted","asObservable","reportData","outstandingItemsStore","reportDataArrived","outstandingDataArrived","outstandingItem","isOutstanding","viewOutstandingItems","data","reportWasDeleted","reportsDataArr","outstandingItemsData","getReport","pageNumber","queryType","path","getOutstandingItems","deleteReport","id","reportType","reportTypeUrl","delete","getPreviousReports","dateFrom","dateTill","QueryTypes","GLOBALS","timeFormat","dateFormat","dateTimeFormat","dayNameFormat","errorToastTranslationStart","timeFormatRegex","workItemOtherValue","rteArrangementMaxLength","recursiveMaxLimit","UserRole","SectionTemplates","ReportUtils","sortList","list","sorted","sort","a","b","charAt","reverse","getRteInputTrueLength","length","toArray","replace","match","SharedService","isDayBeforeToday","date","passedDate","moment","convertDate","utc","format","today","isBefore","getCurrentDate","convertDateStringToBEAcceptableValue","showOrHideFormFieldsBasedOnTemplate","form","templateId","isEmpty","forEach","controlName","controls","enable","getMultiselectValues","multiselectData","formField","key","item","find","selectItem","clearFormFields","field","setValue","generateId","array","Uint32Array","window","crypto","getRandomValues","toString","substring","cleanObjectNullValue","object","keys","undefined","convertNumberToBoolean","isStartTimeBeforeEndTime","startTime","endTime","convertBoolenToNumber","param","convertDateStringToTime","isNotFormattedDate","setTimeToDate","time","h","split","m","showFieldIfOtherFieldValueIs","subscription","fieldToCheck","valueToCheck","fieldToHide","disable","add","valueChanges","subscribe","isArray","val","parseInt","addValidatorIfOtherFieldHasValue","validatorsToSet","fieldToAddValidatorTo","setValidators","updateValueAndValidity","emitEvent","clearValidators","filterTypeAheadArrayForNoPillsInputTypeAheadBasedOnTitle","formArray","valuesToFilter","res","push","cloneDeep","indexOf","title","validateDates","dates","currentWeek","dateRange","isSameYear","year","weekStart","subtract","toDate","yearOnThursday","isoWeekday","weekEnd","isoWeek","trim","isValid","convertTime","test","getTimeFromDate","isDayDefaultSittinDayByDate","day","getDayNameFromDate","search","timeDifference","start","end","diff","compareDaysArrays","a1","a2","k","getArrangementDataFromWorkItemForm","arrangements","arrangmentsGroup","element","arrangement","arrangementData","arrangementOfWorkItemId","arrangementId","arrangementOfWorkItemDescription","isDissentingMembersAssigned","dissenting","isArrangementAppearOnFront","dissentingMembers","arrangementMembers","member","name","getWorkItemTypeInfoValueFromWorkItemForm","workItemType","convertRecipientsToString","x","join","addDevEmails","recipientsEmails","i","devEmails","validateArrangementLength","setErrors","maxlength","ReportService","sharedService","translateService","toastService","isDraft","sittingToggle","daysChanged","isDateEditMode","partyChanged","departmentsChanged","sectionArrangementChanged","daysArrangementChanged","workItemsArrangementChanged","sectionTypesData","titleTranslationRequest","savedAsDraft","dateChanged","members","sectionArrangement","dayArrangement","workItemArrangement","party","departments","toggled","dayRangeChange","sectionTypes","titleTranslationRequested","onSaveAsDraft","isDraftSaved","index","setTimeout","createReportDraft","post","body","catchError","error","processError","isEditMode","getSectionTypesData","sectionArrangementData","dayArrangementData","workItemArrangementData","membersData","partiesData","departmentsData","passData","toggleChanged","dateChangeCheck","getDayOfTheWeek","postReport","model","circulatedDraft","reportId","updateReport","updateMinorReport","getParties","getDepartments","getArrangements","arrangementType","getMembers","getSectionsList","getSectionData","type","getSectionTypes","getMailsList","getStagesToConsider","specificStage","getDefaultBusinessDayTemplate","bsDayDate","getWorkItems","billsEndpoint","generatePrintPreview","fileExtensionType","responseType","observe","query","actionBarSendEmail","to","cc","bcc","subject","url","emailHeadersToSend","receiver","ccReceiver","bccReceiver","actionBarSendEmailOb","obId","emailHeader","circulateReport","bcrUpdateDto","mailInputDto","reviseCirculateReport","previewRapporteurReport","bcrId","getRapporteurReport","rrId","getRecipients","postRapporteurReport","reportModel","sendRapporteurReportEmail","generateRapporteurReportPrintPreview","generateOrderOfBusinessPrintPreview","sendToRapporteur","searchReport","getReportTitles","getOrderOfBusinessReport","postOrderOfBusinessReport","previewOrderOfBusiness","saveCirculatedOBAsDraft","circulateOBReport","getAvailableSectionDates","duplicateBusinessSection","sectionToBeCopiedId","destinationReportId","destinationDayId","triggerTitleTranslation","isSaveRequiredBeforeTranslation","requestTitleTranslation","requestTitleTranslationWithdraw","put","cause","addNotification","instant","Error","BcrMotionHubService","dashboardDetailsUpdate","createConnection","connection","signalR","withUrl","build","startConnection","stopConnection","stop","catch","err","console","log","on","updated","DashboardComponent","dashboardService","reportService","bcrMotionHubService","queryTypes","tabIndex","activeIndex","activeSubTab","reportSubTabs","totalPages","reports","outstandingItems","outstandingCount","selectedTab","onTabChange","dashboardReportTypes","ngUnsubscribe","ngOnInit","listenToHubAndUpdateList","getReports","event","tabChange","ngAfterViewInit","ngOnDestroy","_this","_asyncToGenerator","complete","outstandingItemsHubSubscription","unsubscribe","handleTabClose","previousReportsTabElements","setInterval","previousReportsTab","onPageChange","clearInterval","onPreviousReportFormChange","previousReportForm","onOutstandingItemPageChange","onSubTabChange","page","outstandingItemsTab","take","response","totalCount","count","ViewChild","args","Component","selector","template","SearchComponent","fb","typeOfReport","panelClosed","totalReports","currentPage","itemsPerPage","result","tagsModel","createTagsModel","searchForm","group","reportTitles$","titles","titleName","reportTypes","onSearchByTitleChange","panelToggled","removeTag","MouseEvent","dateRangePicker","clearInput","splice","applyFilter","tags","getRangePickerTag","getArrangementTag","getReportTypeTag","clearAndReset","getPaginationOptions","totalItems","perPageCounter","Math","min","searchModel","reportTypeCriteria","arrangementText","pageNo","pageSize","isSearchModelEmpty","paginationList","updateList","isFormValid","dateRangeIndex","findIndex","readonly","arrangrementIndex","typeIndex","recievedReports","CreateReportComponent","formBuilder","router","datePickerOptions","minDate","selectedRange","preselectDates","reportTypesTitles","reportTypeSelectData","heading","selected","hidden","animate","disabled","invalidInputDate","disableCreate","createReportForm","Validators","required","reportDatesRange","getReportTypeName","preselectSuggestedDays","onBlur","document","querySelector","disableCreateButton","selectingRange","allowPreselect","patchValue","disableOtherWeeks","classList","querySelectorAll","dateAttr","getAttribute","eventDate","currentDate","remove","disableDateRangeDays","btn","addEventListener","startOf","Date","enteredDates","target","openCancelModal","cancelConfirmModalComponent","toggle","cancelModalDecision","reset","createDraftReport","startDate","endDate","navigate","joReportId","ReportStoreService","reportDataChanged","reportObDataChanged","reportData$","reportObData$","clearData","setBusinessDayStartAndEndTime","newStartTimeValue","getBusinessDayArrayElementIndexByDayDate","businessScheduleDetail","businessScheduleDays","bsDayStartTime","recalculateReportDaysTime","emitReportUpdate","getBusinessDayEndTime","bsDayEndTime","setSittingDayStatus","sittingToggleData","isBSDaySitting","bsDayNotSittingReason","setDayReasonText","dayInstanceReasonData","disableHeaderForDefaultSection","bdSectionId","headerIndex","businessDaySectionHeaders","businessDaySectionPositionNo","header","wasSectionRemoved","businessDaySectionType","bdSectionTypeId","sectionData","businessDaySectionId","enableHeaderForDefaultSection","lastPosition","maxBy","updateSectionPosition","bsSectionStartTime","bsSectionEndTime","headers","getSectionDataFromApi","position","storeSectionData","mergeMap","getSectionsData","getAndSetNonDefaultBusinessDayTemplate","businessScheduleDay","updateNonDefaultDayWithDayTemplate","setDefaultDaySection","randomSectionId","duration","calculateDurationTime","businessDaySectionTypeId","businessScheduleDayId","bsDayId","businessDaySectionDuration","businessDaySectionTemplateId","businessDaySectionTitle","bsDaySectionTitle","sectionId","sectionTypeId","forceRefresh","sectionIndex","from","delay","daySectionTemplateId","emitUpdate","isSectionArrangementUsed","isSectionNoteUsed","isSectionNextWeekBusinessUsed","arrangementOfSections","partiesToAskQuestions","workItems","updateDaySectionData","updateExistingSectionHeader","setCustomArrangements","proposalTitle","isArrangementDataCleared","businessScheduleArrangementProposal","businessDayArrangements","isbusinessDayArrangementsChanged","dayArrangementsCleared","getCustomArrangements","getArrangementProposalTitle","setDaySectionExpanded","expanded","daySectionExpanded","setDayAndSectionExpanded","bsSectionId","sectionExpanded","setNewSectionHeader","sectionHeader","isCopy","newSectionHeader","businessDay","momentSectionStart","lastItem","isNewSection","hour","minute","recalculateBusinessDayEndTime","setSectionFormValidity","bsDaySectionId","dayIndex","headerId","isDataValid","findPreviousHeaderEndTime","previousLastHeaderWithEndTime","findLast","takeLodash","deleteNewCustomSectionAndHeader","bsSectionTypeId","setReportData","obj","getTime","scheduleDay","setObReportData","reportObData","emitObReportUpdate","convertBusinessDaySectionIdFromStringToNull","arrayToMap","items","e","bdSection","asMinutes","getReportData","bsDetailFirstDay","bsDetailLastDay","doesSectionHaveAllRequiredData","sectionHeaders","isSectionFormsValid","sectionFormValidityData","sittingDay","deleteCustomProps","oldDayHeaders","bsDayTemplateId","populateDaySections","populateOldDaySections","daySectionHeader","sortBy","assignHeaderSectionDuration","minutes","durationHours","durationMinutes","hours","addDurationToDateTime","hoursToMinutes","sectionTemplate","oldBusinessDaySectionHeaders","indexOfday","deletedSections","EditorConfig","toolbar","fontSize","options","removePlugins","placeholder","licenseKey","ViewReportComponent","navigationService","route","reportStore","appConfigService","changeDetectorRef","overlayService","configurationService","exsistingDates","newDates","daysOfWeek","isReadOnly","isEditModeDate","isEditModeDayTemplate","noteForm","UntypedFormGroup","note","UntypedFormControl","disableConfirm","deletedDays","hasReportLoaded","Editor","OirCkEditor","recursiveLimit","defaultView","ckEditorConfig","documentId","snapshot","paramMap","dayId","detectChanges","populateReportView","isOutdated","hide","userName","requestDetails","unsavedSection","foundSection","businessDayCustomSectionDetails","section","adjustedReport","getAdjustedReportToPost","concat","last","expectedStartTime","expectedEndTime","dueDate","isSuccess","titleTranslationSuccess","rangeForm","ngOnChanges","queryParams","params","getElementById","scrollIntoView","observeChanges","onReady","defaultHeader","getElementsByTagName","style","textAlign","fontFamily","lineHeight","color","clearNavigation","observer","disconnect","onCancel","cancelEditing","isDayInstanceFormValid","hasForms","formValid","dayInstanceComponents","dayInstanceComponent","dayInstanceForm","invalid","canCirculate","dayInstance","areSectionFormsValid","reportLastDay","isReportOutdated","isAfter","checkMaxChars","innerHTML","keyCode","preventDefault","reportHeader","checkNoteChars","reportNote","preselectDays","disableConfirmButton","dateRangeChanged","getReportDates","getReportNotes","postReports","reportStatusId","saveReport","updateWorkitemPositions","apiURL","description","checkDays","getSelectedDateString","reportDays","initNavigation","reportDaysOrig","reportDaysCompare","selectedDates","getSelectedDate","diffDays","newDatesIso","y","addNewDay","fallbackDate","defaultEditorText","file","Blob","navigator","msSaveOrOpenBlob","fileURL","URL","createObjectURL","open","generateWordPreview","filename","link","createElement","download","href","click","getDatesInRange","convertedStartDate","convertedEndDate","currDate","lastDate","clone","editMode","editDatesCancel","openCirculateBCR","action","circulateBcrModalComponent","onConcurrentUserListChange","users","mainUser","user","canEditResource","openCirculateRevisedBCR","updateBcr","newUpdateNumber","reportVersion","toFixed","dayCount","ckEditor","isCirculatedDraft","sendEmailFile","actionbarEmailModalComponent","reportVerison","reportTitle","generateReportTitle","revisedBcrNumber","updateBcrString","dayText","toUpperCase","dateText","savedHeader","remainingText","slice","headerLine1","headerLine2","headerLine3","datePart","headerLine4","additionalText","onEditorChange","isSitingDay","isBSDayCustom","step","asDays","navigationTitle","taskManagerNode","tree","select","addNode","currentNode","elementToObserve","MutationObserver","ariaLabel","toISOString","subtree","childList","attributes","sectionDetails","row","businessDaySectionWorkItemPositionNo","isWithdraw","openSectionComponents","dayComp","sectionComponents","reduce","prev","curr","sectionComp","canToggle","comp","populateSectionWithData","Inject","DOCUMENT","ViewChildren","OrderOfBusinessComponent","configToolbar","recipients","orderOfBusinessViewForm","orderOFBusinessHeader","maxLength","createOB","previewOrGetOrderOfBusiness","emails","recipientEmail","recipientId","defaultHeaderText","cancelObModalDecision","reportStatus","saveAsDraft","headerWithHTML","confirmCancelModalComponent","openCirculateOB","circulateModalComponent","businessScheduleDetailLastDay","actionBarEmailModalObComponent","hideDays","children","setAttribute","hideDayArrangement","checkHeaderMaxChars","onHeaderChange","isHeaderTextEmpty","isFormInvalid","getApi","obDetailFirstDay","businessScheduleDetailFirstDay","obDetailLastDay","obDetailFirstLastDays","isSingleDay","obVersion","announcementOfBusinessDays","announcementOfProposedArrangementsDays","postAPI","status","version","RapportuersReportComponent","activatedRoute","emailType","isChecked","createRR","previewOrGetRapporteursReport","rapporteurForm","rapporteur","rapporteursData$","recipients$","recipient","checkAnnouncementMaxChars","announcementWithHTML","onAnnouncementTextChange","isAnnouncementTextEmpty","openRepporteurReportModal","emailSendType","rapporteurId","rapporteurNote","defaultAnnouncementText","sendReportModal","openReportModal","saveReportAsDraft","rrFileName","cancelDraft","cancelReportDialog","openCancelDialog","joReportRapporteurNote","rapporteurReportDays","rrVersion","rapporteurName","PageComponent","titleService","configuration","monitoringService","oirAuthService","authService","safPanelExists","forkJoin","_roleId","moduleName","appInsightsKey","hasRole","module","homeUrl","listenRouterEvents","hasAccess","instance","getActiveAccount","changeOfRoutes","events","NavigationEnd","firstChild","outlet","setTitle","routes","redirectTo","pathMatch","component","AccessDeniedComponent","NotFoundComponent","routing","RouterModule","forRoot","useHash","AppComponent","translate","initialize","then","handleRedirectPromise","tokenResponse","setActiveAccount","getAllAccounts","acquireTokenSilent","scopes","showMessage","addLangs","use","message","SpanStylePipe","transform","Pipe","pure","AmendmentByValuePipe","formattedNames","environment","msalConfig","auth","clientId","authority","redirectUri","knownAuthorities","cache","cacheLocation","BrowserCacheLocation","LocalStorage","storeAuthStateInCookie","system","loggerOptions","logLevel","LogLevel","Verbose","piiLoggingEnabled","production","ActionInProgressService","actionInProgress","actionStarted","actionEnded","ResponseInterceptor","actionInProgressService","intercept","req","includes","HttpHeaders","handle","HttpResponse","throwError","UserAuthInterceptor","userAuth","userGuid","userEmail","append","JSON","stringify","userInfoReq","DeleteModalComponent","decision","EventEmitter","confirm","emit","confirmDeleteModal","close","cancel","Output","WorkItemInstanceComponent","saveWorkItem","editWorkItem","removeWorkItem","workItemId","workItem","getWorkItemTitle","isWorkItemOutstanding","businessDaySectionWorkItemPlaceholder","workItemTitles","workItemTitleLangTag","onEdit","onUpdateWorkItem","formValue","onRemove","commonDeleteModal","deleteModalDecision","onClose","currentLang","Input","DayInstanceComponent","_readonly","adjustReadonlyControls","dayTitle","reportStoreService","disableSectionDrag","dayTemplate","dayTemplateData","mask","Subscription","pattern","reasonText","isSittingDay","populateForm","subscribeToFormChange","setDayId","onDayTemplateChange","onDrop","moveItemInArray","previousIndex","currentIndex","onDaySectionToggle","collapsed","getDayEndTime","addRemovedSection","hideOtherSections","evt","daySections","Array","hideOthers","daySection","toggleVisibilityByClassAndEditId","display","dateOnly","reusableDayId","debounceTime","AddNewSectionComponent","arrangementsFormArray","addNewSectionForm","keyUp","showWorkItems","hasWorkItems","minimumCharacter","departmentMultiselectLookup","newSectionType","newSectionTitle","newSectionTitleGa","isStartTimeFixed","sectionStartTime","sectionEndTime","sectionDuration","sectionDetailsFreeTextBox","nextWeeksBusiness","nextWeeksBusinessFreeTextBox","sectionArrangements","sectionArrangementFormGroup","arrangementsProposedTitle","isHiddenOnDailBusiness","partiesData$","departmentData$","departmentObj","departmentId","departmentName","membersData$","sectionTypesData$","sectionType","types","bdSectionTypeName","selectSectionTemplate","subscribeToFormValueChange","onArrangementToggle","onDetailsToggleChange","onNextWeeksBusinessChange","hasValue","firstArrangementInputHasValue","firstArrangement","getForm","getArrangementData","afterAccordionToggle","isOpen","onAccordionClose","closeAccordion","toggleableAccordion","durationChange","minutesToAdd","addNewSection","sectionTimeAndPositionData","getNewSectionTimeAndPositionData","customSectionData","businessDaySectionNote","businessDaySectionPositionTemplateId","businessDaySectionTitleGle","sectionDetailNextWeekBusiness","collectArrangementData","isVisibleOnDailBusiness","newSectionHeaders","onAddWorkItem","getWorkItemValueFromWorkItemForm","onArrangementChange","onNoArrangementResults","arrangementFormControl","maxMinArrangementChar","innerText","onRemoveWorkItem","workItemBillOrMotion","billSponsors","workItemDataWithTags","motionSponsors","parse","billStagesToConsider","billStages","workItemTypeInfo","arrangementOfWorkItems","arrangementOfWorkItemProposal","isDeferredDivisions","amendmentType","newSectionData","lastIndex","lastElement","findLastIndex","positionIndex","control","arrangementOfSectionId","arrangementOfSectionDescription","disableFields","populateNewSectionTitle","checkWorkItems","workItemsForm","generateWorkItemsTypeData","onAddNewSectionTemplateChange","selectedValue","fieldsToDisable","addArrangementFormControl","arrangementForm","dissentMembersBox","dissentMembers","clearArrangementsForm","removeAt","distinctUntilChanged","onlySelf","isWorkItemCheckRequired","valid","onSectionTypeChange","gaTitleController","editor","getData","isWorkItemLimitReached","isBillsForIntroduction","isReferralToCommittee","DayArrangementComponent","dayArrangementForm","hasInitialArrangements","proposal","arrengements","arrengement","save","arrangementDescription","isDissentingMember","onDayArrangementAccordionToggle","isOpening","populateDayArrangementForm","afterDayArrangementAccordionToggle","disableDayArrangement","arrangementsProposalTitle","addArrangementControl","dayHasArrangements","dayArrangementAccordion","MoveSectionModalComponent","_bsDayDate","formattedBsDayDate","sectionCopyCurrentBcr","toDuplicate","second","selectedDate","availableSectionDates","fetchDates","actionLabel","moveSectionModal","proceedSelectedDate","copySectionData","removeSectionData","sectionDates","sectionDate","filterValidSectionDates","datesSelectValues","bsDayDateString","bcrReportTitle","getRawValue","dateDetails","bcrReportId","_","isSame","RequestTitleTranslationModalComponent","translationRequested","isVisible","requestTitleTranslationModal","sendRequest","confirmWithdrawal","withdrawConfirmationModal","payload","SectionsFormComponent","sectionForm","sectionTimeChanged","toggleAccordion","workItemsUpdated","workItemsDirty","addNewItems","canMoveSections","isUnsavedDay","canRequestTitleTranslation","TranslationStatuses","businessDaySectionHeader","addControl","sectionTitleEn","sectionTitleGa","titleChange","startDuration","endDuration","durationTime","showSectionDetails","showNextWeeksBusiness","durationTimeChange","itemExsist","workItemsInstance","toggleAddWorkItem","enableWorkItemSection","patchFormValues","setDurationOnChange","populateArrangementForm","workItemsAreValid","markAsPristine","saveSection","skipToggleAccordion","sectionToSave","moveSection","moveSectionModalComponent","sectionCancel","getDepartmentId","getSectionStartTime","getSectionEndTime","getIsHiddenOnDailBusiness","getSectionDetailsFreeTextBox","getSectionArrangements","has","getArrangementsProposedTitle","getDisableTitleInputs","translation","statusId","sectionTitlesFormGroup","disableTitleInputs","disableEndTime","enVal","gaVal","isUnsavedSection","sectionHasArrangements","updateWorkItemPositions","bsDay","updatedSection","arr","details","titleTranslationPayload","titleTranslationModal","englishTitleController","irishTitleController","dirty","SectionComponent","sectionIsValid","deleteNewSection","newSectionDeleteModal","toggleDeleteModal","removeSection","onDefaultOpened","afterSectionAccordionToggle","disableSection","closeSection","onCancelClick","setOpenImageUrl","ActionBarEmailModalComponent","sendEmailAction","defaultEmail","toEmail","ccEmail","bccEmail","emailSubject","emailBody","startBcrTime","endtDate","endBcrTime","updateBcrNumber","emailSubjectDefaultValue","emailBodyDefaultValue","onModalClose","actionBarEmailModal","cancelEmailModal","CirculateBcrModalComponent","ccEmalis","bccEmalis","circulateTriggered","newRevisionNumber","createMailText","emailBodyRevisedDefaultValue","circulateBcrModal","circulate","bsDetailId","cancelCirculateModal","CancelConfirmModalComponent","confirmCancelModal","CurrentDraftReportComponent","pageChange","previousReportFormChange","showFilter","changeData","openDeleteReportModal","dashboardDeleteModal","openDeleteModal","openOutstandingModal","isOutstandingItems","outstandingItemsModal","openOutstandingItemsModal","triggerPreviousReportFormValueEmit","isEqual","previousReportFormOldVal","DeleteConfirmationModalComponent","dasboardService","reportTypeToDelete","reportToDelete","modalTitle","modalText","toLowerCase","deleteModal","cancelDelete","confirmDelete","OutstandingItemsComponent","totalOutstandingItems","outstandingItemPageChange","outstandingQueryType","goToLink","motionUrl","OutstandingWorkItemsModalComponent","dbService","itemId","onContinue","cancelOutstandingItems","AnnouncementBusinessItemComponent","_announcementOfBusinessDays","sectionPosition","motionsWithoutDebates","motionsWithoutDebate","gbAfterMwd","dayOfTheWeek","dayName","dayTitleGovernment","dayTitleBusiness","dayTitleBill","closeDayAccordionBusinessItem","accordionComponent","afterToggle","AnnouncementProposedArrangementComponent","closeDayAccordionProposedArrangment","ActionBarEmailModalObComponent","versionObInModal","versionOb","emailDefaultValue","reportName","orderOfBusinessInModal","emailFormData","actionBarEmailModalOb","CirculateModalComponent","circulateModal","orderOfBusinessInput","commonMailInput","ConfirmCancelModalComponent","cancelObConfirmed","cancelModal","AnnouncementDaysComponent","rapporteurReportDay","dayAnnouncementTitle","CancelReportComponent","cancelReportModal","cancelAction","cancelReport","SendToRapporteurComponent","reportEmailForm","toInput","ccInput","bccInput","reportInputData","sendRapporteurReportModal","patchFormDefaultValues","recipientsData","cancelSendReport","sendReport","emailToastNotification","rapporteurReportInput","titleString","bodyString","EmitterCollapsiblePanelComponent","setTabIndex","TabIndexPipe","emitterCollapsablePanel","dom","ngAfterViewChecked","scroll","getElementsByClassName","scrollTop","ContentChildren","AccordionHeaderComponent","showButton","buttonTitle","iconName","showTime","onButtonClick","imageUrl","CustomModalComponent","visible","modalHeight","nativeElement","show","registerListener","viewHeight","offsetHeight","innerHeight","removeOverflow","renderer","addOverflow","visibleState","checkOverlay","keyDownEventListener","el","TAB_KEYCODE","showCancel","cancelNoAction","class","modalClose","overflowClass","focusable","noCloseAction","modalDialog","listen","code","contains","shiftKey","handleTabKeyDown","handleShiftTabKeyDown","CustomMultiselectComponent","modelChange","dataObj","multiselectModel","headings","active","animating","propagateChange","propagateTouch","activePills","stagesToCheck","initOptions","refreshModel","dropdown","placement","autoClose","changes","writeValue","hasOwnProperty","registerOnChange","fn","registerOnTouched","setDisabledState","displayTitle","pills","selectKeyDown","which","setFocusOnSearchBox","clearSelected","num","searchInputs","focus","clearSearchInput","searchValue","dropdownToggled","clickEventListener","keyDownEventLisener","onDropDownOpen","button","closest","stageSelect","option","handleStageOptionSelect","refreshTitle","selectAllValues","dataItem","removePill","$event","isButtonPress","screenX","screenY","itemRemoved","selectedIndex","inputs","child","textContent","stopPropagation","onSearch","values","clearUnselected","modelItem","modelPropertyName","selectAll","groupValuesByHeading","headingsGroup","ArrayHelper","groupBy","headingGroup","results","checkHeadingsVisibility","disableMainStages","disableOtherStages","removeAttribute","NgbDropdown","providers","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","KeyPress","Tab","Enter","Backspace","Shift","HTML_TAG_REGEX","SPACE_REGEX","CustomTypeaheadComponent","isRichTextEditor","_isRichTextEditor","onInputChange","inputDisabled","maxHeightPx","maxHeight","editorLoaded","inputPadding","typeaheadModel","maxPills","_debounce$","isFormatRequired","inputElement","elementRef","input","debounce","fromEvent","scan","text","searchText","resizeInput","srcElement","tmp","padding","font","paddingLeft","paddingRight","width","parentNode","appendChild","clientWidth","padRight","removeChild","getBoundingClientRect","stateChange","ddBounds","ddt","top","height","setCkEditorStyle","currentValue","titlePropertyName","showPills","blurInput","pillsOnEnter","enteredValue","textQuery","validateQuery","pillEnteredValue","optionKeyDown","inputFieldTypeAhead","getCurrentValue","propagateSelectedOptionChange","searchQuery","onValueSearch","getResponseObject","responsePropertyName","s","clearActive","processing","spinnerActive","buildRequestParameters","HttpParams","listener","returnModelProperty","fetchData","apiUrl","toPromise","r","NgbDropdownToggle","Moment","toInteger","isNumber","isNaN","padNumber","MyFormatter","NgbDateParserFormatter","dateInput","Number","String","dayAndMonth","month","getPadNumber","DatePickerModel","dayLabels","DatePickerOptions","maxDate","Esc","Space","Up","Down","DatePickerCustomComponent","ngbCalendar","formats","rangeFormats","isSelectingRange","showNoOfMonths","showWeekNumbers","outsideDays","openedCalendar","closedCalendar","currentDateView","current","getToday","calendarModel","showDatePicker","numbers","monthNames","currentMonth","getMonth","fill","_x","ConvertStringToNumber","daterangeplaceholder","rangeModel","initModel","previousDateValue","firstChange","modelChanges","toDateString","modelRangeFormat","getDateRange","previousValue","toDateObj","modelFormat","fromDateModel","toDateModel","datepicker","navigateTo","datePassed","dateIsNotInRange","keyUpCircle","resetInput","fromDate","keyupEventHandler","isDateValid","closeCalendar","inputValue","updateDateRangeValue","updateDateValue","dateValue","fromDateNgbDate","toDateNgbDate","clearValues","toNgbdate","after","previousDateRangeValue","setProperty","keypress","handleDatePickerEnterKey","focusDatePicker","onDateSelect","eventObj","navigatePrevious","prevMonthDate","getPrev","NgbDate","navigateNext","nextMonthDate","getNext","selectMonthView","monthNo","navObj","showDropDownYear","showDropDownMonth","monthInput","selectYearView","yearInput","calendarNavigated","newDateView","monthKeyPress","yearKeyPress","scrollToDDItem","activeElement","tagName","scrollVal","monthInputs","className","yearInputs","behavior","struct","onDateRangeSelection","parsed","isHovered","hoveredDate","before","isInside","isRange","equals","NgbInputDatepicker","NgbDatepicker","useClass","ToggleableAccordionComponent","openImageUrl","shouldDisable","subAccordion","defaultOpened","beforeToggle","toggledWhenOpened","toggledWhenDefaultOpened","closeImageUrl","isOpened","setSectionIcon","defaultClosed","btnToggle","$sender","currentTarget","parent","offsetParent","iconClassList","parentElement","nextElementSibling","collapsablePanel","changeDetection","ChangeDetectionStrategy","OnPush","WorkItemFormComponent","workItemForm","dialogService","saveButtonTitle","accordionClosed","workItemTypesPerSection","workItemTypeData","workItemBillOrMotionData","workItemBillOrMotionDataWithTags","sponsor","currentStage","workItemTypes","noConfirm","amendmentTypes","billMotionStatementData","referralBillStage","billStage","workItemChange","onWorkItemChange","isSectionBillsForIntroduction","isSectionReferralCommittee","onWorkItemSelect","maxSearchSelectChar","onSave","processCancelationDecision","workItemAccordion","confirmCancel","disableWorkItem","confirmButton","OirDialogButton","YES","cancelButton","NO","DIALOG_POSITION","CENTER","onConfirm","afterWorkItemAccordionToggle","workItemHasArrangements","enableBillStages","stagesData","stageToConsiderId","stageToConsiderName","maxArrangementChar","fillWorkItemBillOrMotionData","_val","adjustWorkItemData","populateBillStagesToConsider","workItemChangeHandler","clearHtmlTags","isSectionGovernmentBusiness","isSectionDeferredDivisions","checkBillStage","setBillStage","stageId","statementId","motionId","billID","getTitleTag","titleLangTag","selectedStages","setWorkItemSponsor","setBillsSponsor","setMotionsSponsor","currentSelectedWorkItem","sponsorsIds","billSponsorDepartmentName","billSponsorDepartmentId","setBillsStage","sponsors","sponsorIDsDivider","sponsorsDivider","billSponsorDepartmentID","sponsorChamberMemberID","sponsorChamberMemberFirstName","sponsorChamberMemberLastName","billIndexEng","billIndexGle","billStageID","billStageName","billStageId","motionID","motionSponsorId","AddNewSectionDeleteModalComponent","deleteCustomSection","closeDeleteModal","AppModule","NgModule","declarations","imports","CommonModule","BrowserModule","ClientFrameworkModule","BrowserAnimationsModule","NgbModule","NgxPaginationModule","TextMaskModule","OverlayModule","FormsModule","ReactiveFormsModule","TabViewModule","CKEditorModule","DragDropModule","TranslateModule","loader","TranslateLoader","useFactory","HttpLoaderFactory","httpClient","TranslateHttpLoader","deps","missingTranslationHandler","MissingTranslationHandler","TranslationHandlerService","defaultLanguage","isolate","exports","APP_BASE_HREF","useValue","HTTP_INTERCEPTORS","APP_INITIALIZER","injector","initResult","TranslateService","reloadLang","Injector","MsalInterceptor","MSAL_INSTANCE","MSALInstanceFactory","endpoint","ClientId","Instance","TenantId","msalInstance","PublicClientApplication","accounts","addEventCallback","eventType","EventType","LOGIN_SUCCESS","account","MSAL_GUARD_CONFIG","MSALGuardConfigFactory","interactionType","InteractionType","Redirect","authRequest","MSAL_INTERCEPTOR_CONFIG","MSALInterceptorConfigFactory","protectedResourceMap","Map","MsalService","MsalGuard","MsalBroadcastService","bootstrap","enableProdMode","promise","platformBrowserDynamic","bootstrapModule","___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___","__webpack_require__","___CSS_LOADER_EXPORT___","___CSS_LOADER_API_IMPORT___","webpackContext","webpackContextResolve","o","resolve"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./src/app/shared/report.enum.ts","./src/app/services/app-config.service.ts","./src/app/dashboard/dashboard-services/dashboard-service.service.ts","./src/app/shared/models/queryType.constant.ts","./src/app/shared/globals.ts","./src/app/shared/models/section.model.ts","./src/app/shared/utils/report.utils.ts","./src/app/services/shared.service.ts","./src/app/services/report.service.ts","./src/app/services/bcr-motion-hub.service.ts","./src/app/dashboard/dashboard.component.ts","./src/app/search/search.component.ts","./src/app/create-report/create-report.component.ts","./src/app/services/report-store.service.ts","./src/app/shared/models/editor-config.model.ts","./src/app/bcr-report/view-report.component.ts","./src/app/order-of-business/order-of-business.component.ts","./src/app/rapportuers-report/rapportuers-report.component.ts","./src/app/page.component.ts","./src/app/app.routes.ts","./src/app/app.component.ts","./src/app/pipes/span-style.pipe.ts","./src/app/pipes/amendment-by-value.pipe.ts","./src/environments/environment.prod.ts","./src/environments/base.environment.ts","./src/app/services/action-in-progress.service.ts","./src/app/shared/interceptors/response.interceptor.ts","./src/app/shared/interceptors/user-auth.interceptor.ts","./src/app/shared/modals/delete-modal/delete-modal.component.ts","./src/app/shared/components/work-item-instance/work-item-instance.component.ts","./src/app/bcr-report/day-instance/day-instance.component.ts","./src/app/bcr-report/day-instance/add-new-section/add-new-section.component.ts","./src/app/bcr-report/day-instance/day-arrangement/day-arrangement.component.ts","./src/app/bcr-report/day-instance/section/modals/move-section-modal/move-section-modal.component.ts","./src/app/bcr-report/day-instance/section/modals/request-title-translation-modal/request-title-translation-modal.component.ts","./src/app/bcr-report/day-instance/section/sections-form/sections-form.component.ts","./src/app/bcr-report/day-instance/section/section.component.ts","./src/app/bcr-report/modals/action-bar-email-modal/action-bar-email-modal.component.ts","./src/app/bcr-report/modals/circulate-bcr-modal/circulate-bcr-modal.component.ts","./src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component.ts","./src/app/dashboard/current-draft-report/current-draft-report.component.ts","./src/app/dashboard/delete-confirmation-modal/delete-confirmation-modal.component.ts","./src/app/dashboard/outstanding-items/outstanding-items.component.ts","./src/app/dashboard/outstanding-work-items-modal/outstanding-work-items-modal.component.ts","./src/app/order-of-business/announcement-business-item/announcement-business-item.component.ts","./src/app/order-of-business/announcement-proposed-arrangement/announcement-proposed-arrangement.component.ts","./src/app/order-of-business/modals/action-bar-email-modal-ob/action-bar-email-modal-ob.component.ts","./src/app/order-of-business/modals/circulate-modal/circulate-modal.component.ts","./src/app/order-of-business/modals/confirm-cancel-modal/confirm-cancel-modal.component.ts","./src/app/rapportuers-report/announcement-days/announcement-days.component.ts","./src/app/rapportuers-report/modals/cancel-report/cancel-report.component.ts","./src/app/rapportuers-report/modals/send-to-rapporteur/send-to-rapporteur.component.ts","./src/app/shared/components/emitter-collapsible-panel/emitter-collapsible-panel.component.ts","./src/app/shared/components/accordion-header/accordion-header.component.ts","./src/app/shared/components/custom-modal/custom-modal.component.ts","./src/app/shared/components/custom-multiselect/custom-multiselect.component.ts","./src/app/shared/components/custom-typeahead/custom-typeahead.component.ts","./src/app/shared/components/datepicker-custom/datepicker-custom.service.ts","./src/app/shared/components/datepicker-custom/datepicker-custom.model.ts","./src/app/shared/components/datepicker-custom/datepicker-custom.component.ts","./src/app/shared/components/toggleable-accordion/toggleable-accordion.component.ts","./src/app/shared/components/work-item-form/work-item-form.component.ts","./src/app/shared/modals/add-new-section-delete-modal/add-new-section-delete-modal.component.ts","./src/app/app.module.ts","./src/main.ts","./src/app/bcr-report/day-instance/add-new-section/add-new-section.component.less","./src/app/bcr-report/day-instance/day-arrangement/day-arrangement.component.less","./src/app/bcr-report/day-instance/day-instance.component.less","./src/app/bcr-report/day-instance/section/modals/move-section-modal/move-section-modal.component.less","./src/app/bcr-report/day-instance/section/modals/request-title-translation-modal/request-title-translation-modal.component.less","./src/app/bcr-report/day-instance/section/section.component.less","./src/app/bcr-report/day-instance/section/sections-form/sections-form.component.less","./src/app/bcr-report/modals/action-bar-email-modal/action-bar-email-modal.component.less","./src/app/bcr-report/modals/circulate-bcr-modal/circulate-bcr-modal.component.less","./src/app/bcr-report/view-report.component.less","./src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component.less","./src/app/create-report/create-report.component.less","./src/app/dashboard/current-draft-report/current-draft-report.component.less","./src/app/dashboard/dashboard.component.less","./src/app/dashboard/delete-confirmation-modal/delete-confirmation-modal.component.less","./src/app/dashboard/outstanding-items/outstanding-items.component.less","./src/app/dashboard/outstanding-work-items-modal/outstanding-work-items-modal.component.less","./src/app/order-of-business/announcement-business-item/announcement-business-item.component.less","./src/app/order-of-business/announcement-proposed-arrangement/announcement-proposed-arrangement.component.less","./src/app/order-of-business/modals/action-bar-email-modal-ob/action-bar-email-modal-ob.component.less","./src/app/order-of-business/modals/circulate-modal/circulate-modal.component.less","./src/app/order-of-business/modals/confirm-cancel-modal/confirm-cancel-modal.component.less","./src/app/order-of-business/order-of-business.component.less","./src/app/page.component.less","./src/app/rapportuers-report/announcement-days/announcement-days.component.less","./src/app/rapportuers-report/modals/cancel-report/cancel-report.component.less","./src/app/rapportuers-report/modals/send-to-rapporteur/send-to-rapporteur.component.less","./src/app/rapportuers-report/rapportuers-report.component.less","./src/app/search/search.component.less","./src/app/shared/components/accordion-header/accordion-header.component.less","./src/app/shared/components/custom-modal/custom-modal.component.less","./src/app/shared/components/custom-multiselect/custom-multiselect.component.less","./src/app/shared/components/custom-typeahead/custom-typeahead.component.less","./src/app/shared/components/datepicker-custom/datepicker-custom.component.less","./src/app/shared/components/emitter-collapsible-panel/emitter-collapsible-panel.component.less","./src/app/shared/components/toggleable-accordion/toggleable-accordion.component.less","./src/app/shared/components/work-item-form/work-item-form.component.less","./src/app/shared/components/work-item-instance/work-item-instance.component.less","./src/app/shared/modals/add-new-section-delete-modal/add-new-section-delete-modal.component.less","./src/app/shared/modals/delete-modal/delete-modal.component.less","./node_modules/moment/locale/ sync ^\\.\\/.*$"],"sourcesContent":["export enum WorkItems {\r\n Motion = 1,\r\n Bill,\r\n Statement\r\n}\r\n\r\nexport enum FileExtensionType {\r\n BcrPdf = 1,\r\n BcrDocx = 2\r\n}\r\n\r\nexport enum RREmailType {\r\n ActionBarEmail = 1,\r\n SendToRapporteurEmail = 2\r\n}\r\n\r\nexport enum TypeOfReport {\r\n BCR = 1,\r\n RR = 2,\r\n OB = 3,\r\n}\r\n\r\nexport enum ReportTypes {\r\n 'BCR' = 1,\r\n 'ODR' = 2,\r\n 'COSR' = 3,\r\n}\r\n\r\nexport enum ReportSubTabs {\r\n Reports = 1,\r\n OutstandingItems = 2\r\n}\r\n\r\nexport enum DashboardReportTypes {\r\n Current = 'Current',\r\n Draft = 'Draft',\r\n OutstandingCurrent = 'OutstandingCurrent',\r\n OutstandingDraft = 'OutstandingDraft',\r\n Previous = 'Previous'\r\n}\r\n\r\nexport enum TabIndexes {\r\n Current = 1,\r\n Draft = 2,\r\n Previous = 3,\r\n}\r\n\r\nexport enum ReportTypesTitles {\r\n BCR = 'Business Committee Report',\r\n ODR = 'One day Business Committee Report',\r\n COSR = 'Committee of Selection Report',\r\n}\r\n\r\nexport const SectionTypes = {\r\n 1: 'businessDayLeadersQuestionsSectionDetails',\r\n 2: 'businessDayOrderOfBusinessSectionDetails',\r\n 3: 'businessDayMotionsWithoutDebateSectionDetails',\r\n 4: 'businessDayCommonSectionDetails',\r\n 5: 'businessDaySectionsPQOralDetails',\r\n 6: 'businessDayCommonSectionDetails',\r\n 7: 'businessDayCommonSectionDetails',\r\n 8: 'businessDayGovernmentBusinessSectionDetails',\r\n 9: 'businessDayPrivateMembersBusinessSectionDetails',\r\n 10: 'privateMemberBillSectionDetails',\r\n 11: 'businessDayCommonSectionDetails',\r\n 12: 'businessDayCommonSectionDetails',\r\n 13: 'deferredDivisionsSectionDetails',\r\n 14: 'businessDayArrangements',\r\n 15: 'businessDayAdjournmentSectionDetails',\r\n 17: 'businessDayCustomSectionDetails',\r\n 18: 'businessDayCommonSectionDetails',\r\n 19: 'businessDayCommonSectionDetails',\r\n 20: 'businessDayCommonSectionDetails',\r\n 21: 'businessDayBillsForIntroductionSectionDetails',\r\n 22: 'businessDayReferralToCommitteeSectionDetails',\r\n}\r\n\r\nexport enum ArrangementTypes {\r\n Day = 1,\r\n Section = 2,\r\n WorkItem = 3\r\n}\r\n\r\nexport enum BusinessDaysTemplates {\r\n Blank = 1,\r\n Tuesday,\r\n Wednesday,\r\n Thursday\r\n}\r\n\r\nexport enum FormTemplate {\r\n leadersQuestions = 1,\r\n orderOfBusiness = 2,\r\n motions = 3,\r\n taoiseach = 4,\r\n pqOral = 5,\r\n topicalIssues = 6,\r\n privateNoticeQuestion = 7,\r\n governmentBusiness = 8,\r\n privateMembersBusiness = 9,\r\n privateMembersBill = 10,\r\n questionsOnPromisedLegislation = 11,\r\n sos = 12,\r\n deferredDivisions = 13,\r\n dayArrangements = 14,\r\n adjournment = 15,\r\n custom = 17,\r\n expressionsOfSympathy = 18,\r\n messages = 19,\r\n announcements = 20,\r\n billsForIntroduction = 21,\r\n referralToCommittee = 22,\r\n}\r\n\r\nexport enum FormFieldNames {\r\n parties = 1,\r\n department = 5\r\n}\r\n\r\nexport const SectionsApi = {\r\n 1: 'leadersquestions',\r\n 3: 'motion',\r\n 5: 'pqoral',\r\n 8: 'governmentbusiness',\r\n 9: 'privatememberbusiness',\r\n 10: 'privatemembersbill',\r\n 13: 'deferreddivisions',\r\n 17: 'customsection',\r\n 21: 'billsforintroduction',\r\n 22: 'referraltocommittees',\r\n};\r\n\r\nexport enum WorkItemTypes {\r\n bills = 'bills',\r\n motions = 'motions',\r\n statements = 'statements',\r\n}\r\n\r\nexport enum WorkItemTypeValues {\r\n motions = 1,\r\n bills,\r\n statements\r\n}\r\n\r\nexport enum ReportStatuses {\r\n Draft = 1,\r\n Circulated = 2,\r\n Update = 3,\r\n OutdatedByDraft = 4,\r\n OutdatedByCirculated = 5,\r\n OutdatedByUpdate = 6,\r\n Deleted = 9,\r\n}\r\n\r\nexport enum Stages {\r\n FirstStage = 1,\r\n OrderForSecondStage,\r\n SecondStage,\r\n OrderForCommitteeStage,\r\n CommitteeStage,\r\n OrderForReport,\r\n ReportStage,\r\n OrderForFifthStage,\r\n FifthStage,\r\n AllStages,\r\n AmendmentsFromTheSeanad\r\n}\r\n\r\nexport enum Amendments {\r\n Amendment = 1,\r\n AmendmentToAmendment\r\n}\r\n\r\nexport enum TitleTranslationStatuses {\r\n InTranslation = 1,\r\n TranslationReceived,\r\n TranslationWithdrawn\r\n}\r\n\r\nexport enum TitleSdlTranslationStatuses {\r\n Initial,\r\n SentForTranslation,\r\n InTranslation,\r\n InFinalReview,\r\n Translated\r\n}\r\n\r\nexport enum TitleSdlTranslationTypes {\r\n Preparation = 'Preparation',\r\n Translation = 'Translation',\r\n Review = 'Review',\r\n Finalisation = 'Finalisation',\r\n}\r\n","import { HttpBackend, HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport {\r\n ConfigurationService,\r\n IAppEndpoint,\r\n IAppSettings\r\n} from 'proceduralsystem-clientcomponents';\r\nimport { BehaviorSubject, Observable, of } from 'rxjs';\r\nimport { filter, map, pluck, switchMap, takeUntil, tap } from 'rxjs/operators';\r\n\r\nexport interface AppConfig extends IAppSettings {\r\n RoleId: string;\r\n UserId: string;\r\n UserRoleMemberId: string;\r\n ReturnUrl: string;\r\n AADGroupBillsAdmin: string;\r\n CustomHeader: string;\r\n defaultLang: string;\r\n\r\n ApiEndpoint: IAppEndpoint;\r\n AppId,\r\n BillsAdminWebUrl: string;\r\n UserGrade: string;\r\n AccessToken: string;\r\n Role: string;\r\n DelegateRoleMemberId: string;\r\n\r\n RoleRank: string;\r\n\r\n MotionEndpointUrl: string;\r\n\r\n CKEditor5LicenseKey: string;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AppConfigService {\r\n private http: HttpClient;\r\n private localSettings: AppConfig;\r\n private localSettings$: Observable | null = null;\r\n private config$: Observable | null = null;\r\n private values$ = new BehaviorSubject(null);\r\n\r\n constructor(\r\n private httpHandler: HttpBackend,\r\n private config: ConfigurationService,\r\n ) {\r\n this.http = new HttpClient(httpHandler);\r\n }\r\n\r\n init(): Observable {\r\n this.localSettings$ = this.http.get(\"./app.config.json\").pipe(\r\n tap((value) => {\r\n this.localSettings = value;\r\n this.values$.next(value);\r\n }),\r\n switchMap(() => this.fetchConfig()),\r\n takeUntil(this.values$.pipe(filter(v => !!v))) \r\n );\r\n\r\n return this.localSettings$;\r\n }\r\n\r\n get(prop: T): Observable {\r\n if (!this.config$) {\r\n this.config$ = this.fetchConfig();\r\n }\r\n\r\n return this.config$.pipe(pluck(prop));\r\n }\r\n\r\n getValue(prop: T): AppConfig[T] {\r\n const config = this.values$.getValue();\r\n\r\n return config ? config[prop] : null;\r\n }\r\n\r\n set(prop: T, value: string): void {\r\n let config = this.values$.getValue();\r\n if (!config) {\r\n config = {} as AppConfig;\r\n }\r\n if (prop) {\r\n // eslint-disable-next-line\r\n // @ts-ignore\r\n config[prop] = value;\r\n\r\n this.values$.next(config);\r\n if (this.config$) {\r\n this.config$ = of(config);\r\n }\r\n }\r\n }\r\n\r\n setCookie(property: string, value: string, days = 30): void {\r\n this.config.setCookie(property, value, days);\r\n }\r\n\r\n private fetchConfig(): Observable {\r\n return of(this.localSettings).pipe(\r\n switchMap((v) => this.config.getAll(v)),\r\n map(v => Object.assign(v, this.localSettings)),\r\n tap(v => this.values$.next(v))\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { OirHttpService } from 'proceduralsystem-clientcomponents';\r\nimport {\r\n Dashboard,\r\n OutstandingItems\r\n} from 'src/app/shared/models/dashboard.model';\r\nimport { TypeOfReport } from 'src/app/shared/report.enum';\r\nimport { AppConfigService } from '../../services/app-config.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DashboardService {\r\n public report = new Subject();\r\n public reportDeleted = this.report.asObservable();\r\n public reportData = new Subject();\r\n public outstandingItemsStore = new Subject();\r\n public reportDataArrived = this.reportData.asObservable();\r\n public outstandingDataArrived = this.outstandingItemsStore.asObservable();\r\n public outstandingItem = new Subject();\r\n public isOutstanding = this.outstandingItem.asObservable();\r\n public reportTypeUrl: string;\r\n\r\n constructor(\r\n private oirHttp: OirHttpService,\r\n private config: AppConfigService\r\n ) {}\r\n\r\n public viewOutstandingItems(data: any) {\r\n this.outstandingItem.next(data);\r\n }\r\n public reportWasDeleted(data: any) {\r\n this.report.next(data);\r\n }\r\n public reportsDataArr(data: any) {\r\n this.reportData.next(data);\r\n }\r\n public outstandingItemsData(data: any) {\r\n this.outstandingItemsStore.next(data);\r\n }\r\n public getReport(\r\n pageNumber: number,\r\n queryType: number\r\n ): Observable {\r\n return this.oirHttp.get({\r\n path: `/reports?Page=${pageNumber}&QueryType=${queryType}`\r\n });\r\n }\r\n public getOutstandingItems(\r\n pageNumber: number,\r\n queryType: number\r\n ): Observable {\r\n return this.oirHttp.get({\r\n path: `/reports/outstanding?Page=${pageNumber}&QueryType=${queryType}`\r\n });\r\n }\r\n public deleteReport(id: number, reportType: number): Observable {\r\n switch (reportType) {\r\n case TypeOfReport.RR:\r\n this.reportTypeUrl = `/api/RapporteurReport?rrId=${id}`;\r\n break;\r\n case TypeOfReport.OB:\r\n this.reportTypeUrl = `/api/OB/?obId=${id}`;\r\n break;\r\n default:\r\n this.reportTypeUrl = `/bcr?reportId=${id}`;\r\n break;\r\n }\r\n\r\n return this.oirHttp.delete({\r\n path: this.reportTypeUrl\r\n });\r\n }\r\n\r\n public getPreviousReports(\r\n pageNumber: number,\r\n reportType: number,\r\n dateFrom: string,\r\n dateTill: string\r\n ): Observable {\r\n return this.oirHttp.get({\r\n path: `/previousreports?Page=${pageNumber}&ReportType=${reportType}&DateFrom=${dateFrom}&DateTill=${dateTill}`\r\n });\r\n }\r\n}\r\n","export enum QueryTypes {\r\n Current = 1,\r\n Draft = 2,\r\n Previous = 3\r\n}\r\n","export const GLOBALS = {\r\n timeFormat: 'HH:mm',\r\n dateFormat: 'DD/MM/YYYY',\r\n dateTimeFormat: 'DD/MM/YYYY HH:mm',\r\n dayNameFormat: 'dddd DD/MM/YYYY',\r\n errorToastTranslationStart: 'ERROR_TOAST.ERROR_CODE.',\r\n timeFormatRegex: /^(\\d{2}):(\\d{2}).*/,\r\n workItemOtherValue: 'other',\r\n rteArrangementMaxLength: 5000,\r\n recursiveMaxLimit:20\r\n };\r\n\r\n export const UserRole = {\r\n journalOffice: \"JournalOffice\"\r\n }","export const SectionTemplates = {\r\n leadersQuestions: [\r\n 'parties',\r\n 'sectionDetails',\r\n 'sectionArrangements',\r\n ],\r\n\r\n orderOfBusiness: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n motions: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n taoiseach: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n pqOral: [\r\n 'department',\r\n 'sectionDetails',\r\n 'sectionArrangements',\r\n ],\r\n\r\n topicalIssues: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n privateNoticeQuestion: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n governmentBusiness: [\r\n 'sectionDetails',\r\n 'nextWeeksBusiness',\r\n 'sectionArrangements'\r\n ],\r\n\r\n privateMembersBusiness: [\r\n 'parties',\r\n 'sectionDetails',\r\n 'nextWeeksBusiness',\r\n 'sectionArrangements'\r\n ],\r\n\r\n privateMembersBill: [\r\n 'sectionDetails',\r\n 'nextWeeksBusiness',\r\n 'sectionArrangements'\r\n ],\r\n\r\n questionsOnPromisedLegislation: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n sos: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n deferredDivisions: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n dayArrangements: [],\r\n\r\n adjournment: [],\r\n\r\n custom: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n expressionsOfSympathy: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n messages: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n announcements: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n billsForIntroduction: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n\r\n referralToCommittee: [\r\n 'sectionDetails',\r\n 'sectionArrangements'\r\n ],\r\n};\r\n","import { toArray } from 'lodash-es';\r\n\r\nexport class ReportUtils {\r\n\r\n public static sortList(prop: string, list: any): any {\r\n if (!list) {\r\n return ;\r\n }\r\n\r\n const sorted = list.sort((a, b) => {\r\n if (a[prop] > b[prop]) {\r\n return 1;\r\n }\r\n return a[prop] === b[prop] ? 0 : -1;\r\n });\r\n // Reverse order if - is supplied.\r\n if (prop.charAt(0) === '-') {\r\n sorted.reverse();\r\n }\r\n\r\n return sorted;\r\n }\r\n\r\n public static getRteInputTrueLength(value: string): number {\r\n // Using toArray to cover emojis.\r\n return value && value.length\r\n ? toArray(value.replace(/<\\/?[^>]+>/g, '')\r\n .replace(/^(\\s+|\\s+)$/g, '')\r\n .replace(/&(amp|lt|gt|quot|#39|nbsp);/g, match => {\r\n switch (match) {\r\n case '&': return '&';\r\n case '<': return '<';\r\n case '>': return '>';\r\n case '\"': return '\"';\r\n case ''': return \"'\";\r\n case ' ': return ' ';\r\n default: return match;\r\n }\r\n })).length\r\n : 0;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport * as moment from 'moment';\r\nimport { GLOBALS } from '../shared/globals';\r\nimport { isEmpty, cloneDeep, isArray } from 'lodash-es';\r\nimport { UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';\r\nimport { Subscription } from 'rxjs';\r\nimport { FormTemplate, WorkItemTypes, WorkItemTypeValues } from '../shared/report.enum';\r\nimport { SectionTemplates } from '../shared/models/section.model';\r\nimport { ArrangementOfWorkItem } from '../shared/models/report.model';\r\nimport { TypeaheadValue } from 'proceduralsystem-clientcomponents';\r\nimport { ReportUtils } from '../shared/utils/report.utils';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SharedService {\r\n\r\n /**\r\n * Function to check is it day before today\r\n * @param date Date\r\n */\r\n public isDayBeforeToday(date: string): boolean {\r\n const passedDate = moment(this.convertDate(date)).utc().format(GLOBALS.dateFormat);\r\n const today = moment().utc().format(GLOBALS.dateFormat);\r\n\r\n return (moment(this.convertDate(date)).utc().isBefore(moment().utc().format()) && passedDate !== today);\r\n }\r\n\r\n /**\r\n * @description Method to get current date in DD/MM/YYYY format\r\n *\r\n * @returns {string} Date value\r\n */\r\n public getCurrentDate(): string {\r\n return moment.utc().format(GLOBALS.dateFormat);\r\n }\r\n\r\n /**\r\n * Convert date string to BE Acceptable date value\r\n * @param date\r\n */\r\n public convertDateStringToBEAcceptableValue(date: string): string {\r\n if (!date) {\r\n return null;\r\n }\r\n\r\n return moment.utc(date, [GLOBALS.dateTimeFormat]).format();\r\n }\r\n\r\n /**\r\n * Function to enable needed fields in form\r\n * @param form Form Group\r\n * @param templateId Sectipon template id\r\n */\r\n public showOrHideFormFieldsBasedOnTemplate(form: UntypedFormGroup, templateId: number): void {\r\n if (!isEmpty(SectionTemplates[FormTemplate[templateId]])) {\r\n SectionTemplates[FormTemplate[templateId]].forEach((controlName) => {\r\n if (form.controls[controlName]) {\r\n form.controls[controlName].enable();\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Function to get multiselect value\r\n * @param multiselectData Data\r\n * @param form From group\r\n * @param formField Form field\r\n * @param key Data key\r\n */\r\n public getMultiselectValues(multiselectData: any, form: UntypedFormGroup, formField: string, key: string) {\r\n if (!isEmpty(multiselectData) && !isEmpty(form.controls[formField].value)) {\r\n return form.controls[formField].value.map(\r\n item => multiselectData.find(selectItem => selectItem[key] === item));\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Function to clear form fields\r\n * @param form\r\n * @param field\r\n */\r\n public clearFormFields(form: UntypedFormGroup, field: Array) {\r\n field.forEach((item) => {\r\n form.controls[item].setValue(null);\r\n });\r\n }\r\n\r\n /**\r\n * Function to generate random Id\r\n */\r\n public generateId(): string {\r\n const array = new Uint32Array(1);\r\n window.crypto.getRandomValues(array);\r\n return array[0].toString().substring(0,3);\r\n }\r\n\r\n /**\r\n * Function to clear object null values\r\n * @param object Object with data\r\n */\r\n public cleanObjectNullValue(object: any) {\r\n Object.keys(object).forEach((key) => {\r\n if ((object[key] === null && key !== 'businessDaySectionDuration') || (object[key] === undefined && key !== 'businessDaySectionDuration')) {\r\n delete object[key];\r\n }\r\n });\r\n return object;\r\n }\r\n\r\n /**\r\n * Function to convert number to boolean\r\n * @param data Passed data\r\n */\r\n public convertNumberToBoolean(data: any): boolean {\r\n switch (data) {\r\n case 0:\r\n return false;\r\n case 1:\r\n return true;\r\n default:\r\n return data;\r\n }\r\n }\r\n\r\n /**\r\n * Function to check is start time is before end time\r\n * @param startTime Start Time\r\n * @param endTime End Time\r\n */\r\n public isStartTimeBeforeEndTime(startTime: string, endTime: string): boolean {\r\n return moment(startTime, GLOBALS.timeFormat).isBefore(moment(endTime, GLOBALS.timeFormat));\r\n }\r\n\r\n /**\r\n * Function to convert boolean to number\r\n * @param param Passed param\r\n */\r\n public convertBoolenToNumber(param: any): number {\r\n if (param === true) {\r\n return 1;\r\n } else if (param === false) {\r\n return 0;\r\n } else {\r\n return param;\r\n }\r\n }\r\n\r\n /**\r\n * Convert date string to time value\r\n * @param date\r\n */\r\n public convertDateStringToTime(date: string): any {\r\n if (!date) {\r\n return null;\r\n }\r\n\r\n return this.isNotFormattedDate(date) ?\r\n moment.utc(date, GLOBALS.dateTimeFormat).format(GLOBALS.timeFormat) :\r\n moment.utc(date).format(GLOBALS.timeFormat);\r\n }\r\n\r\n /**\r\n * Method to set time to given date\r\n * @param date\r\n * @param time\r\n */\r\n public setTimeToDate(date: string, time: string): any {\r\n const h = time.split(':')[0];\r\n const m = time.split(':')[1];\r\n return moment.utc(this.convertDate(date)).set({ h: +h, m: +m }).format();\r\n }\r\n\r\n /**\r\n * @description Show field only when other field's value is equal to passed value\r\n *\r\n * @param {Subscription} [subscription]\r\n * @param {UntypedFormGroup} [form]\r\n * @param {string} [fieldToCheck]\r\n * @param {string} [valueToCheck]\r\n * @param {string} [fieldToHide]\r\n */\r\n public showFieldIfOtherFieldValueIs(\r\n subscription: Subscription,\r\n form: UntypedFormGroup,\r\n fieldToCheck: string,\r\n valueToCheck: any,\r\n fieldToHide: string\r\n ): void {\r\n form.controls[fieldToHide].disable();\r\n subscription.add(form.controls[fieldToCheck].valueChanges.subscribe(value => {\r\n if ((isArray(value) && !!value.find(val => (val === valueToCheck || parseInt(val, 10) === valueToCheck))) ||\r\n value === valueToCheck ||\r\n parseInt(value, 10) === valueToCheck) {\r\n form.controls[fieldToHide].enable();\r\n } else {\r\n form.controls[fieldToHide].disable();\r\n }\r\n }));\r\n }\r\n\r\n /**\r\n * Methot to add validator(s) to specific field if other specific field has any value\r\n * @param subscription\r\n * @param form\r\n * @param fieldToCheck\r\n * @param validatorsToSet\r\n * @param fieldToAddValidatorTo\r\n */\r\n public addValidatorIfOtherFieldHasValue(\r\n subscription: Subscription,\r\n form: UntypedFormGroup,\r\n fieldToCheck: string,\r\n validatorsToSet: any[],\r\n fieldToAddValidatorTo: string\r\n ): void {\r\n subscription.add(form.controls[fieldToCheck].valueChanges.subscribe(value => {\r\n if ((value && !isArray(value)) || (value && isArray(value) && !isEmpty(value))) {\r\n form.controls[fieldToAddValidatorTo].setValidators(validatorsToSet);\r\n form.controls[fieldToAddValidatorTo].updateValueAndValidity({ emitEvent: false });\r\n } else {\r\n form.controls[fieldToAddValidatorTo].clearValidators();\r\n form.controls[fieldToAddValidatorTo].updateValueAndValidity({ emitEvent: false });\r\n }\r\n }));\r\n }\r\n\r\n public filterTypeAheadArrayForNoPillsInputTypeAheadBasedOnTitle(formArray: UntypedFormArray, controlName: string, valuesToFilter: any[]): any[] {\r\n const res: any[] = [];\r\n formArray.controls.forEach((form: UntypedFormGroup) => {\r\n if (!isEmpty(form.controls[controlName].value)) {\r\n res.push(form.controls[controlName].value);\r\n }\r\n });\r\n\r\n return cloneDeep(valuesToFilter).filter(val => res.indexOf(!isEmpty(val) ? val.title : -1) === -1);\r\n }\r\n\r\n /**\r\n * Validate dates based on user input\r\n * @param enteredDates\r\n */\r\n public validateDates(dates: any, currentWeek: number, dateRange: boolean): any {\r\n const isSameYear = moment.utc().year() === moment.utc(dates[0], GLOBALS.dateFormat).year();\r\n const weekStart = moment.utc().subtract(1, 'days').toDate();\r\n const dateToCheck = moment(dates[0], 'DD/MM/YYYY');\r\n const yearOnThursday = dateToCheck.isoWeekday(4).year();\r\n const weekEnd = moment.utc().year(yearOnThursday).isoWeek(currentWeek).isoWeekday(7).toDate();\r\n \r\n const errors = [moment.utc(dates[0].trim(), GLOBALS.dateFormat).isoWeek() !== currentWeek,\r\n !moment.utc(dates[0].trim(), GLOBALS.dateFormat).isValid(),\r\n isSameYear ? moment.utc(dates[0].trim(), GLOBALS.dateFormat).toDate() >= weekEnd : false,\r\n moment.utc(dates[0].trim(), GLOBALS.dateFormat).toDate() < weekStart,\r\n (dateRange ? moment.utc(dates[0].trim(), GLOBALS.dateFormat).toDate() >= moment.utc(dates[1].trim(), GLOBALS.dateFormat).toDate() : false),\r\n (dateRange ? moment.utc(dates[1].trim(), GLOBALS.dateFormat).isoWeek() !== currentWeek : false),\r\n (dateRange ? !moment.utc(dates[1].trim(), GLOBALS.dateFormat).isValid() : false),\r\n (dateRange ? moment.utc(dates[1].trim(), GLOBALS.dateFormat).toDate() <= moment.utc(dates[0].trim(), GLOBALS.dateFormat).toDate() : false),\r\n (dateRange && isSameYear ? moment.utc(dates[1].trim(), GLOBALS.dateFormat).toDate() > weekEnd : false),\r\n (dateRange ? moment.utc(dates[1].trim(), GLOBALS.dateFormat).toDate() < weekStart : false)];\r\n\r\n return errors.indexOf(true) !== -1;\r\n }\r\n\r\n /**\r\n * Convert date string to BE Acceptable date value\r\n * @param date\r\n */\r\n public convertDate(date: string): string {\r\n if (!date) {\r\n return null;\r\n }\r\n\r\n return this.isNotFormattedDate(date) ?\r\n moment.utc(date, GLOBALS.dateTimeFormat).format() :\r\n date;\r\n }\r\n\r\n /**\r\n * Check if date isn't already converted and convert to time value\r\n * @param date\r\n */\r\n public convertTime(date: string): string {\r\n if (!date) {\r\n return null;\r\n }\r\n\r\n return !GLOBALS.timeFormatRegex.test(date) ?\r\n this.getTimeFromDate(date) :\r\n date;\r\n }\r\n\r\n /**\r\n * Method to check if day (by date) is default sitting day (2day, 3day, 4day)\r\n * @param date\r\n */\r\n public isDayDefaultSittinDayByDate(date: string): boolean {\r\n const day = this.getDayNameFromDate(date);\r\n\r\n return day ? ((day.search(/Tuesday/i) === 0) ||\r\n (day.search(/Wednesday/i) === 0) ||\r\n (day.search(/Thursday/i) === 0)) : null;\r\n }\r\n\r\n /**\r\n * Method to time value from date\r\n * @param date\r\n */\r\n public getTimeFromDate(date: string): string {\r\n return date ? moment.utc(this.convertDate(date)).format(GLOBALS.timeFormat) : null;\r\n }\r\n\r\n /**\r\n * Metho to get the name of date day\r\n * @param date\r\n */\r\n public getDayNameFromDate(date: string): string {\r\n return date ? moment.utc(this.convertDate(date)).format(GLOBALS.dayNameFormat) : null;\r\n }\r\n\r\n /**\r\n * Method to calculate time difference\r\n * @param start Start time\r\n * @param end End time\r\n */\r\n public timeDifference(start, end): any {\r\n return moment.utc(moment(end, 'HH:mm').diff(moment(start, 'HH:mm'))).format('H:m');\r\n }\r\n\r\n /**\r\n * Compare 2 arrays and return difference\r\n * @param a1\r\n * @param a2\r\n */\r\n public compareDaysArrays(a1, a2) {\r\n let a = {}, diff = [];\r\n\r\n for (const day of a1) {\r\n a[day] = true;\r\n }\r\n\r\n for (const day of a2) {\r\n if (a[day]) {\r\n delete a[day];\r\n } else {\r\n a[day] = true;\r\n }\r\n }\r\n\r\n for (let k in a) {\r\n diff.push(k);\r\n }\r\n\r\n return diff;\r\n }\r\n\r\n /**\r\n * Method to get arrangement data from work item form (if exists)\r\n * @param data\r\n */\r\n public getArrangementDataFromWorkItemForm(data: any): ArrangementOfWorkItem[] {\r\n const arrangements: ArrangementOfWorkItem[] = [];\r\n if (!isEmpty(data.arrangmentsGroup)) {\r\n data.arrangmentsGroup.forEach(element => {\r\n if (!isEmpty(element.arrangement)) {\r\n const arrangementData: ArrangementOfWorkItem = {\r\n arrangementOfWorkItemId: element.arrangementId || 0,\r\n arrangementOfWorkItemDescription: element.arrangement,\r\n isDissentingMembersAssigned: element.dissenting,\r\n isArrangementAppearOnFront: element.isArrangementAppearOnFront,\r\n dissentingMembers: (element.dissenting && !isEmpty(element.arrangementMembers)) ?\r\n element.arrangementMembers.map(member => ({ id: member.value, name: member.title })) :\r\n null\r\n };\r\n arrangements.push(arrangementData);\r\n }\r\n });\r\n }\r\n\r\n return arrangements;\r\n }\r\n\r\n /**\r\n * Method to get workItemTypeInfo value from workItem form workItemType control value\r\n * @param workItemType\r\n */\r\n public getWorkItemTypeInfoValueFromWorkItemForm(workItemType: string): number {\r\n switch (workItemType) {\r\n case WorkItemTypes.bills:\r\n return WorkItemTypeValues.bills;\r\n case WorkItemTypes.motions:\r\n return WorkItemTypeValues.motions;\r\n case WorkItemTypes.statements:\r\n return WorkItemTypeValues.statements;\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Method to check if date is not already formatted\r\n * @param date\r\n */\r\n private isNotFormattedDate(date: string): boolean {\r\n return !/\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z/.test(date) &&\r\n !/\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z/.test(date)\r\n }\r\n\r\n /**\r\n * Create `;` delimited recipient string for BE\r\n */\r\n public convertRecipientsToString(value: TypeaheadValue[]) {\r\n return value.length > 1 ? value.map(x => x.title).join('; ') : value[0].title;\r\n }\r\n\r\n /**\r\n * addDevEmails\r\n */\r\n public addDevEmails(recipientsEmails: TypeaheadValue[]): any {\r\n const devEmails = [\r\n 'akmal.kadirov@oireachtas.ie',\r\n 'selim.kayali@oireachtas.ie',\r\n 'dmitrijs.ivascenko@oireachtas.ie',\r\n 'artems.boroviks@oireachtas.ie',\r\n 'janis.kope@oireachtas.ie',\r\n 'arturs.korotkovs@oireachtas.ie',\r\n 'fidan.heydarli@oireachtas.ie',\r\n 'anastasija.gutmane@oireachtas.ie',\r\n 'viesturs.berzins@oireachtas.ie',\r\n 'lilit.grigoryan@oireachtas.ie',\r\n 'ineta.lapina@oireachtas.ie',\r\n 'viktorija.resetnikova@oireachtas.ie',\r\n 'Contact_Group',\r\n 'TEST'\r\n ];\r\n // Only temporary for Development.\r\n let i = 100000;\r\n devEmails.forEach(element => {\r\n recipientsEmails.push({ title: element, value: i });\r\n i++;\r\n });\r\n return recipientsEmails;\r\n }\r\n\r\n public validateArrangementLength(form: UntypedFormControl, value: string) {\r\n form.setErrors(\r\n ReportUtils.getRteInputTrueLength(value) > GLOBALS.rteArrangementMaxLength\r\n ? {'maxlength': true}\r\n : null\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable, of, Subject } from 'rxjs';\r\nimport { OirHttpService, ToastNotificationsService } from 'proceduralsystem-clientcomponents';\r\nimport { FileExtensionType, SectionsApi } from '../shared/report.enum';\r\nimport { isEmpty } from 'lodash-es';\r\nimport { SharedService } from './shared.service';\r\nimport { AvailableSectionDate, Party, Report, TitleTranslationPayload, TitleTranslationWithdrawPayload } from '../shared/models/report.model';\r\nimport { OrderOfBusiness } from 'src/app/shared/models/order-of-business.model';\r\nimport { RapporteurReport } from '../shared/models/rapporteur-report.model';\r\nimport { catchError } from 'rxjs/operators';\r\nimport { GLOBALS } from '../shared/globals';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { OirHTTPErrorResponse } from 'proceduralsystem-clientcomponents/services/error/error.handler';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ReportService {\r\n private isDraft = new BehaviorSubject([]);\r\n private reportData = new Subject();\r\n private sittingToggle = new Subject();\r\n private daysChanged = new Subject();\r\n private isDateEditMode = new Subject();\r\n private partyChanged = new BehaviorSubject([]);\r\n private departmentsChanged = new BehaviorSubject([]);\r\n private sectionArrangementChanged = new BehaviorSubject([]);\r\n private daysArrangementChanged = new BehaviorSubject([]);\r\n private workItemsArrangementChanged = new BehaviorSubject([]);\r\n private dissentingMembers = new BehaviorSubject([]);\r\n private sectionTypesData = new BehaviorSubject([]);\r\n private titleTranslationRequest = new Subject();\r\n public savedAsDraft = this.isDraft.asObservable();\r\n public dateChanged = this.isDateEditMode.asObservable();\r\n public members = this.dissentingMembers.asObservable();\r\n public sectionArrangement = this.sectionArrangementChanged.asObservable();\r\n public dayArrangement = this.daysArrangementChanged.asObservable();\r\n public workItemArrangement = this.workItemsArrangementChanged.asObservable();\r\n public party = this.partyChanged.asObservable();\r\n public departments = this.departmentsChanged.asObservable();\r\n public report = this.reportData.asObservable();\r\n public toggled = this.sittingToggle.asObservable();\r\n public dayRangeChange = this.daysChanged.asObservable();\r\n public sectionTypes = this.sectionTypesData.asObservable();\r\n public titleTranslationRequested = this.titleTranslationRequest.asObservable();\r\n\r\n constructor(\r\n private oirHttp: OirHttpService,\r\n private sharedService: SharedService,\r\n private translateService: TranslateService,\r\n private toastService: ToastNotificationsService\r\n ) {}\r\n\r\n /**\r\n * Function to trigger which tab to open on save as draft\r\n * @param isDraftSaved Boolean\r\n * @param index Index of tab to open\r\n */\r\n public onSaveAsDraft(isDraftSaved: boolean, index: number): void {\r\n const data = {\r\n isDraftSaved,\r\n index\r\n };\r\n this.isDraft.next(data);\r\n setTimeout(() => {\r\n this.isDraft.next(null);\r\n }, 100);\r\n }\r\n /**\r\n * Send api call to save draft report\r\n * @param data\r\n */\r\n public createReportDraft(data): Observable {\r\n return this.oirHttp.post({\r\n path: '/bcr',\r\n body: data\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n public isEditMode(data: any): void {\r\n this.isDateEditMode.next(data);\r\n }\r\n\r\n public getSectionTypesData(data: any): void {\r\n this.sectionTypesData.next(data);\r\n }\r\n\r\n public sectionArrangementData(data: any): void {\r\n this.sectionArrangementChanged.next(data);\r\n }\r\n\r\n public dayArrangementData(data: any): void {\r\n this.daysArrangementChanged.next(data);\r\n }\r\n\r\n public workItemArrangementData(data: any): void {\r\n this.workItemsArrangementChanged.next(data);\r\n }\r\n\r\n public membersData(data: any): void {\r\n this.dissentingMembers.next(data);\r\n }\r\n\r\n public partiesData(data: Party[]): void {\r\n this.partyChanged.next(data);\r\n }\r\n\r\n public departmentsData(data: any): void {\r\n this.departmentsChanged.next(data);\r\n }\r\n\r\n public passData(data: any): void {\r\n this.reportData.next(data);\r\n }\r\n\r\n public toggleChanged(data: any): void {\r\n this.sittingToggle.next(data);\r\n }\r\n\r\n public dateChangeCheck(data: any): void {\r\n this.daysChanged.next(data);\r\n }\r\n\r\n public getReport(id: string): Observable {\r\n return this.oirHttp.get({\r\n path: `/bcr/${id}`\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n public getDayOfTheWeek(): Observable {\r\n return this.oirHttp\r\n .get({\r\n path: '/referencedata/customdaytemplates'\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n public postReport(id: string, model: any): Observable {\r\n return this.oirHttp\r\n .post({\r\n path: `/bcr/${id}`,\r\n body: model\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n public circulatedDraft(reportId: string, model: any): Observable {\r\n return this.oirHttp\r\n .post({\r\n path: `/bcr/circulatedDraft/${reportId}`,\r\n body: model\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n public updateReport(id: string, model: any): Observable {\r\n return this.oirHttp\r\n .post({\r\n path: `/bcr/update/${id}`,\r\n body: model\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n public updateMinorReport(id: string, model: any): Observable {\r\n return this.oirHttp\r\n .post({\r\n path: `/bcr/updateMinor/${id}`,\r\n body: model\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n public getParties(): Observable {\r\n return this.oirHttp.get({\r\n path: '/referencedata/parties'\r\n });\r\n }\r\n\r\n public getDepartments(): Observable {\r\n return this.oirHttp.get({\r\n path: '/referencedata/departments'\r\n });\r\n }\r\n\r\n public getArrangements(arrangementType: number): Observable {\r\n return this.oirHttp.get({\r\n path: `/referencedata/arrangements?arrangmentsGroup=${arrangementType}`\r\n });\r\n }\r\n\r\n public getMembers(): Observable {\r\n return this.oirHttp.get({\r\n path: '/referencedata/members'\r\n });\r\n }\r\n\r\n public getSectionsList(id: number, date: string): Observable {\r\n return this.oirHttp.get({\r\n path: `/referencedata/customdaystemplateDetails?dayOfWeek=${id}&refDate=${date}`\r\n });\r\n }\r\n public getSectionData(id: number | string, type: number): Observable {\r\n if (!isEmpty(SectionsApi[type])) {\r\n return this.oirHttp.get({\r\n path: `/section/${SectionsApi[type]}/${id}`\r\n });\r\n } else {\r\n // To avoid erros, will be removed after all API will be defined in enum\r\n return this.oirHttp.get({\r\n path: `/section/${id}`\r\n });\r\n }\r\n }\r\n public getSectionTypes(): Observable {\r\n return this.oirHttp.get({\r\n path: '/referencedata/sectiontypes'\r\n });\r\n }\r\n public getMailsList(): Observable {\r\n return this.oirHttp.get({\r\n path: '/referencedata/recipients'\r\n });\r\n }\r\n\r\n /**\r\n * Get stages to be considered for Work item type \"bills\"\r\n */\r\n public getStagesToConsider(specificStage = ''): Observable {\r\n return this.oirHttp.get({\r\n path: `/referencedata/stagestoconsider${specificStage}`\r\n });\r\n }\r\n\r\n /**\r\n * Function to get day template for custom day\r\n * @param bsDayDate Date\r\n * @param templateId Template id\r\n */\r\n public getDefaultBusinessDayTemplate(\r\n bsDayDate: string,\r\n templateId: number\r\n ): Observable {\r\n return this.getSectionsList(\r\n templateId,\r\n this.sharedService.convertDate(bsDayDate)\r\n );\r\n }\r\n\r\n /**\r\n * Gets work items array for select options in work-items.component.ts\r\n * @param type 'bills', 'motions' or 'statements'\r\n */\r\n public getWorkItems(type: string, billsEndpoint?: string): Observable {\r\n return this.oirHttp.get({\r\n path: `/referencedata/${billsEndpoint ? billsEndpoint : type}`\r\n });\r\n }\r\n\r\n /**\r\n * Get PDF preview of report\r\n * @param reportId - report id\r\n * @param fileExtensionType - generated file tpe\r\n */\r\n public generatePrintPreview(reportId: number, fileExtensionType: FileExtensionType = FileExtensionType.BcrPdf): Observable {\r\n return this.oirHttp.get({\r\n path: `/api/DocumentGenerator/generateBCR/${reportId}`,\r\n responseType: fileExtensionType === FileExtensionType.BcrPdf ? 'arraybuffer' as 'json' : 'blob',\r\n observe: fileExtensionType === FileExtensionType.BcrPdf ? 'body' : 'response',\r\n query: {\r\n fileExtensionType\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Create emailHeaders for API and post them to endpoint\r\n */\r\n public actionBarSendEmail(\r\n to: string,\r\n cc: string,\r\n bcc: string,\r\n subject: string,\r\n body: string,\r\n report: Report\r\n ): Observable {\r\n const url = `/bcr/send/${report.reportId}`;\r\n const emailHeadersToSend = {\r\n receiver: to,\r\n ccReceiver: cc,\r\n bccReceiver: bcc,\r\n subject,\r\n body\r\n };\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: emailHeadersToSend\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Method to send Email via post request in order of business\r\n */\r\n public actionBarSendEmailOb(obId: number, emailHeader: any) {\r\n const url = `/api/OB/send/${obId}`;\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: emailHeader\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Create emailHeaders for API and post them to endpoint\r\n */\r\n public circulateReport(\r\n to: string,\r\n cc: string,\r\n bcc: string,\r\n subject: string,\r\n body: string,\r\n report: Report,\r\n id: any\r\n ): Observable {\r\n const url = `/circulateBcr/${id}`;\r\n const emailHeadersToSend = {\r\n bcrUpdateDto: report,\r\n mailInputDto: {\r\n receiver: to,\r\n ccReceiver: cc,\r\n bccReceiver: bcc,\r\n subject,\r\n body\r\n }\r\n };\r\n\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: emailHeadersToSend\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Create emailHeaders for API and post them to endpoint\r\n */\r\n public reviseCirculateReport(\r\n to: string,\r\n cc: string,\r\n bcc: string,\r\n subject: string,\r\n body: string,\r\n report: Report,\r\n id: any\r\n ): Observable {\r\n const url = `/bcr/revise/${id}`;\r\n const emailHeadersToSend = {\r\n bcrUpdateDto: report,\r\n mailInputDto: {\r\n receiver: to,\r\n ccReceiver: cc,\r\n bccReceiver: bcc,\r\n subject,\r\n body\r\n }\r\n };\r\n\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: emailHeadersToSend\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Function to call API and preview Rapporteur Report\r\n * @param bcrId BCR report id\r\n */\r\n public previewRapporteurReport(\r\n bcrId: number | string\r\n ): Observable {\r\n const url = `/api/RapporteurReport/preview/${bcrId}`;\r\n return this.oirHttp.get({\r\n path: url\r\n });\r\n }\r\n\r\n /**\r\n * Function to call API and get exsisting Rapporteur Report\r\n * @param rrId Rapporteur Report id\r\n */\r\n public getRapporteurReport(\r\n rrId: number | string\r\n ): Observable {\r\n const url = `/api/RapporteurReport/${rrId}`;\r\n return this.oirHttp.get({\r\n path: url\r\n });\r\n }\r\n\r\n /**\r\n * Function to call API and get Recipients\r\n */\r\n public getRecipients(): Observable {\r\n const url = `/referencedata/recipients`;\r\n return this.oirHttp.get({\r\n path: url\r\n });\r\n }\r\n\r\n /**\r\n * Function to post Rapporteur Report\r\n * @param reportModel Rapporteur Report Data Model\r\n */\r\n public postRapporteurReport(reportModel: any): Observable {\r\n const url = `/api/RapporteurReport/create`;\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: reportModel\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Function to send email to Rapporteur\r\n * @param rrId Rapporteur Id\r\n * @param emailHeader Email Headers\r\n */\r\n public sendRapporteurReportEmail(\r\n rrId: string,\r\n emailHeader: any\r\n ): Observable {\r\n const url = `/api/RapporteurReport/send/${rrId}`;\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: emailHeader\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Get PDF preview of Rapporteur Report\r\n * @param reportId Report Id\r\n */\r\n public generateRapporteurReportPrintPreview(model: any): Observable {\r\n return this.oirHttp\r\n .post({\r\n path: `/api/DocumentGenerator/generateRR`,\r\n body: model,\r\n responseType: 'arraybuffer' as 'json'\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Get PDF preview of Order of business\r\n * @param reportId Report Id\r\n */\r\n public generateOrderOfBusinessPrintPreview(\r\n reportId: number | string\r\n ): Observable {\r\n return this.oirHttp.get({\r\n path: `/api/DocumentGenerator/generateOB/${reportId}`,\r\n responseType: 'arraybuffer' as 'json'\r\n });\r\n }\r\n\r\n /**\r\n * Function to send report to Rapporteur\r\n * @param emailHeader Email Headers\r\n */\r\n public sendToRapporteur(emailHeader: any): Observable {\r\n const url = `/api/RapporteurReport/sendtorapporteur`;\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: emailHeader\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Function to search Reports\r\n * @param model Search model\r\n */\r\n public searchReport(model: any): Observable {\r\n const url = `/Search`;\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: model\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Report titles reference data\r\n */\r\n public getReportTitles(): Observable {\r\n const url = `/referencedata/reporttitles`;\r\n return this.oirHttp.get({\r\n path: url\r\n });\r\n }\r\n\r\n /**\r\n * Method to get Order of business report\r\n * @param obId id of order of busienss\r\n */\r\n public getOrderOfBusinessReport(\r\n obId: number | string\r\n ): Observable {\r\n const url = `/api/OB/${obId}`;\r\n return this.oirHttp.get({\r\n path: url\r\n });\r\n }\r\n\r\n /**\r\n * Function to post Order of Business\r\n * @param orderOfBusinessModel Order of Business Data Model\r\n */\r\n public postOrderOfBusinessReport(\r\n reportModel: any\r\n ): Observable {\r\n const url = `/api/OB/create`;\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: reportModel\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Function to call API and preview Order of Business\r\n * @param bcrId BCR report id\r\n */\r\n public previewOrderOfBusiness(\r\n bcrId: number | string\r\n ): Observable {\r\n const url = `/api/OB/preview/${bcrId}`;\r\n return this.oirHttp.get({\r\n path: url\r\n });\r\n }\r\n\r\n /**\r\n * Save Ciruclate Ob as Draft\r\n */\r\n public saveCirculatedOBAsDraft(reportModel: any): Observable {\r\n const url = `/saveCirculatedOBAsDraft`;\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: reportModel\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Function to send report to Rapporteur\r\n * @param emailHeader Email Headers\r\n */\r\n public circulateOBReport(emailHeader: any): Observable {\r\n const url = `/api/OB/circulateOb`;\r\n return this.oirHttp\r\n .post({\r\n path: url,\r\n body: emailHeader\r\n }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Get Available Section Dates for move or duplicate\r\n */\r\n public getAvailableSectionDates(): Observable {\r\n const path = `/bcr/getavailabledates`;\r\n return this.oirHttp\r\n .get({ path }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n /**\r\n * Function to send business section duplication to specific date\r\n * @param sectionToBeCopiedId Section ID\r\n * @param destinationReportId Report ID\r\n * @param destinationDayId Day ID\r\n */\r\n public duplicateBusinessSection(\r\n sectionToBeCopiedId: number,\r\n destinationReportId: number,\r\n destinationDayId: number\r\n ): Observable {\r\n const path = `/bcr/duplicatesection/${sectionToBeCopiedId}/${destinationReportId}/${destinationDayId}`;\r\n\r\n return this.oirHttp\r\n .post({ path }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n public triggerTitleTranslation(data: TitleTranslationPayload | TitleTranslationWithdrawPayload, isSaveRequiredBeforeTranslation: boolean): void {\r\n this.titleTranslationRequest.next({data, isSaveRequiredBeforeTranslation});\r\n }\r\n\r\n public requestTitleTranslation(body: TitleTranslationPayload): Observable {\r\n const path = `/api/Translation`;\r\n return this.oirHttp\r\n .post({ path, body }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n public requestTitleTranslationWithdraw(body: TitleTranslationWithdrawPayload): Observable {\r\n const path = `/api/Translation`;\r\n return this.oirHttp\r\n .put({ path, body }).pipe(\r\n catchError(error => this.processError(error))\r\n );\r\n }\r\n\r\n private processError(error: OirHTTPErrorResponse): Observable {\r\n if (error && error.cause) {\r\n this.toastService.addNotification({\r\n title: 'ERROR_TOAST.TITLE',\r\n error: this.translateService.instant(\r\n !error.cause.Error || error.cause.Error === '101' ? GLOBALS.errorToastTranslationStart + error.cause.Error : error.cause.Error\r\n )\r\n });\r\n }\r\n\r\n return of(null);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport * as signalR from '@microsoft/signalr';\r\nimport { Subject } from 'rxjs';\r\nimport { AppConfigService } from './app-config.service';\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class BcrMotionHubService {\r\n public dashboardDetailsUpdate = new Subject();\r\n\r\n private connection: signalR.HubConnection;\r\n\r\n constructor(private config: AppConfigService) {}\r\n\r\n /**\r\n * Creating connection to Hub-outstandingItemsHub\r\n */\r\n public createConnection(): void {\r\n this.connection = new signalR.HubConnectionBuilder()\r\n .withUrl(`${this.config.getValue('ApiEndpoint').url}/outstandingItemsHub`)\r\n .build();\r\n this.startConnection();\r\n }\r\n\r\n /**\r\n * Methode to close connection\r\n */\r\n public stopConnection(): void {\r\n this.connection\r\n .stop()\r\n .catch(err => console.log('error while stopping connection', err));\r\n }\r\n\r\n /**\r\n * Methode to start connection and listens to dashboardDetailsUpdate Methode\r\n */\r\n public startConnection(): void {\r\n this.connection\r\n .start()\r\n .catch(err => console.log('error while starting connection', err));\r\n this.connection.on('dashboardDetailsUpdate', (updated: boolean) => {\r\n this.dashboardDetailsUpdate.next(updated);\r\n });\r\n }\r\n}\r\n","import { Component, OnInit, AfterViewInit, OnDestroy, ViewChild } from '@angular/core';\r\nimport { DashboardService } from './dashboard-services/dashboard-service.service';\r\nimport { QueryTypes } from '../shared/models/queryType.constant';\r\nimport { take, takeUntil } from 'rxjs/operators';\r\nimport { Subject, Subscription } from 'rxjs';\r\nimport { DashboardReportTypes, TabIndexes, ReportSubTabs } from '../shared/report.enum';\r\nimport { CurrentDraftReportComponent } from './current-draft-report/current-draft-report.component';\r\nimport { SharedService } from '../services/shared.service';\r\nimport { ReportService } from '../services/report.service';\r\nimport { isEmpty } from 'lodash-es';\r\nimport { OutstandingItemsComponent } from './outstanding-items/outstanding-items.component';\r\nimport { BcrMotionHubService } from '../services/bcr-motion-hub.service';\r\n\r\n@Component({\r\n selector: 'oir-dashboard',\r\n templateUrl: './dashboard.component.html',\r\n styleUrls: ['./dashboard.component.less']\r\n})\r\nexport class DashboardComponent implements OnInit, AfterViewInit, OnDestroy {\r\n\r\n @ViewChild('previousReportsTab') previousReportsTab: CurrentDraftReportComponent;\r\n @ViewChild('outstandingItemsTab') outstandingItemsTab: OutstandingItemsComponent;\r\n\r\n public queryTypes = QueryTypes;\r\n public tabIndex = TabIndexes;\r\n public activeIndex = 1;\r\n public activeSubTab = 1;\r\n public reportSubTabs = ReportSubTabs;\r\n public totalPages = {};\r\n public reports = {};\r\n public outstandingItems = {};\r\n public outstandingCount = {};\r\n public isOutstanding = false;\r\n public selectedTab = false;\r\n public onTabChange = true;\r\n public dashboardReportTypes = DashboardReportTypes;\r\n\r\n private ngUnsubscribe: Subject = new Subject();\r\n private outstandingItemsHubSubscription: Subscription;\r\n\r\n constructor(\r\n private dashboardService: DashboardService,\r\n private sharedService: SharedService,\r\n private reportService: ReportService,\r\n private bcrMotionHubService: BcrMotionHubService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.bcrMotionHubService.createConnection();\r\n this.listenToHubAndUpdateList();\r\n // On report delete update\r\n this.dashboardService.report.pipe(takeUntil(this.ngUnsubscribe)).subscribe(res => {\r\n this.getReports(0, res);\r\n });\r\n // Subscription to open draft tab on Save As Draft\r\n this.reportService.savedAsDraft.pipe(takeUntil(this.ngUnsubscribe)).subscribe(res => {\r\n if (!isEmpty(res)) {\r\n this.selectedTab = res.isDraftSaved;\r\n const event = {\r\n index: res.index - 1\r\n };\r\n this.tabChange(event);\r\n }\r\n });\r\n\r\n this.dashboardService.isOutstanding.pipe(takeUntil(this.ngUnsubscribe)).subscribe((res) => {\r\n if (res) {\r\n this.isOutstanding = res;\r\n this.onTabChange = false;\r\n this.getOutstandingItems(0, TabIndexes.Current);\r\n } else {\r\n this.isOutstanding = false;\r\n this.onTabChange = true;\r\n }\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.getReports(0, TabIndexes.Current);\r\n }\r\n\r\n async ngOnDestroy(): Promise {\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n await this.bcrMotionHubService.stopConnection();\r\n if (this.outstandingItemsHubSubscription) {\r\n this.outstandingItemsHubSubscription.unsubscribe();\r\n this.outstandingItemsHubSubscription = null;\r\n }\r\n }\r\n\r\n /**\r\n * Function to navigate to outstanding items tab\r\n * @param event Event\r\n */\r\n public handleTabClose(event: any): void {\r\n if (event.index === 0) {\r\n this.isOutstanding = false;\r\n this.onTabChange = true;\r\n } else {\r\n this.isOutstanding = true;\r\n this.onTabChange = false;\r\n }\r\n }\r\n\r\n /**\r\n * Changes the current tab\r\n * @param event Captured DOM event\r\n */\r\n public tabChange(event): void {\r\n // Small delay added due to some response issue with tabs.\r\n this.activeIndex = event.index + 1;\r\n if ((event.index + 1) !== TabIndexes.Previous) {\r\n // Add one because tab inexdes start at 0, query types start at 1.\r\n this.onTabChange = true;\r\n this.isOutstanding = false;\r\n this.getReports(0, event.index + 1);\r\n } else if ((event.index + 1) === TabIndexes.Previous) {\r\n const previousReportsTabElements = setInterval(() => {\r\n if (this.previousReportsTab) {\r\n this.previousReportsTab.onPageChange(1, event.index + 1);\r\n clearInterval(previousReportsTabElements);\r\n }\r\n }, 100);\r\n }\r\n }\r\n\r\n /**\r\n * Get reports on page change\r\n * @param res Data\r\n */\r\n public onPageChange(res): void {\r\n if (res.queryType !== QueryTypes.Previous) {\r\n this.getReports(res.pageNumber, res.queryType);\r\n } else if (this.previousReportsTab) {\r\n this.onPreviousReportFormChange(this.previousReportsTab.previousReportForm.value, res.pageNumber);\r\n }\r\n }\r\n\r\n /**\r\n * Get outstanding items on page change\r\n * @param res Data\r\n */\r\n public onOutstandingItemPageChange(res): void {\r\n this.getOutstandingItems(res.pageNumber, res.queryType);\r\n }\r\n\r\n /**\r\n * Function to Populate tab with data\r\n * @param event event\r\n * @param queryType query type\r\n */\r\n public onSubTabChange(event, queryType: number) {\r\n this.activeSubTab = event.index + 1;\r\n if (event.index + 1 === ReportSubTabs.Reports) {\r\n this.getReports(0, queryType);\r\n } else {\r\n this.getOutstandingItems(0, queryType);\r\n }\r\n }\r\n\r\n /**\r\n * Method to handle previous report form change emit\r\n * @param val value\r\n */\r\n public onPreviousReportFormChange(val: any, page = 0): void {\r\n const data = {\r\n reportType: val.reportType,\r\n dateFrom: this.sharedService.convertDate(val.dateRange ? val.dateRange.split(' - ')[0] : null) || '',\r\n dateTill: this.sharedService.convertDate(val.dateRange ? val.dateRange.split(' - ')[1] : null) || ''\r\n };\r\n this.getPreviousReports(data, page);\r\n }\r\n\r\n /**\r\n * Methode to listen for hub and reload list on update\r\n */\r\n private listenToHubAndUpdateList(): void {\r\n this.outstandingItemsHubSubscription =\r\n this.bcrMotionHubService.dashboardDetailsUpdate.asObservable()\r\n .subscribe(() => {\r\n if (this.outstandingItemsTab) {\r\n this.outstandingItemsTab.onPageChange(1, this.activeIndex);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Function to get reports\r\n * @param pageNumber Page number\r\n * @param queryType Query type\r\n */\r\n private getReports(pageNumber: number, queryType: number): void {\r\n this.dashboardService.getReport(pageNumber, queryType).pipe(take(1)).subscribe(response => {\r\n this.totalPages[queryType] = response.totalCount;\r\n this.reports[queryType] = response.reports;\r\n const data = {\r\n totalPages: this.totalPages,\r\n reports: this.reports\r\n };\r\n this.dashboardService.reportsDataArr(data);\r\n });\r\n }\r\n\r\n /**\r\n * Function to get outstanding items\r\n * @param pageNumber Page number\r\n * @param queryType Query type\r\n */\r\n private getOutstandingItems(pageNumber: number, queryType: number): void {\r\n this.dashboardService.getOutstandingItems(pageNumber, queryType).pipe(take(1)).subscribe(res => {\r\n this.outstandingCount[queryType] = res.count;\r\n this.outstandingItems[queryType] = res.outstandingItems;\r\n const outstandingItemsData = {\r\n outstandingItems: this.outstandingItems,\r\n outstandingCount: this.outstandingCount,\r\n queryType\r\n };\r\n this.dashboardService.outstandingItemsData(outstandingItemsData);\r\n });\r\n }\r\n\r\n /**\r\n * Method to get previous reports\r\n * @param data\r\n */\r\n private getPreviousReports(data: any, page: number): void {\r\n this.dashboardService.getPreviousReports(page, data.reportType, data.dateFrom, data.dateTill)\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n this.totalPages[QueryTypes.Previous] = res.totalCount;\r\n this.reports[QueryTypes.Previous] = res.reports;\r\n this.dashboardService.reportsDataArr({\r\n totalPages: this.totalPages,\r\n reports: this.reports\r\n });\r\n });\r\n }\r\n}\r\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\nimport {\r\n SelectValue,\r\n PaginationOptions,\r\n DatePickerComponent\r\n} from 'proceduralsystem-clientcomponents';\r\nimport { UntypedFormGroup, UntypedFormBuilder } from '@angular/forms';\r\nimport { TypeOfReport } from '../shared/report.enum';\r\nimport { ReportService } from '../services/report.service';\r\nimport { ScrollTagModel } from 'proceduralsystem-clientcomponents/components/tag-scroll/tag-scroll.model';\r\nimport { isEmpty, findIndex } from 'lodash-es';\r\nimport { SharedService } from '../services/shared.service';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { take, map, takeUntil } from 'rxjs/operators';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'oir-search',\r\n templateUrl: './search.component.html',\r\n styleUrls: ['./search.component.less']\r\n})\r\nexport class SearchComponent implements OnInit {\r\n @ViewChild('dateRangePicker') dateRangePicker: DatePickerComponent;\r\n\r\n public searchForm: UntypedFormGroup;\r\n public reportTypes: SelectValue[];\r\n public reportTitles$: Observable;\r\n public paginationList: any;\r\n public typeOfReport = TypeOfReport;\r\n public tagsModel: ScrollTagModel;\r\n public panelClosed = true;\r\n public totalReports = 0;\r\n public currentPage = 1;\r\n public itemsPerPage = 10;\r\n public result = false;\r\n\r\n private ngUnsubscribe: Subject = new Subject();\r\n\r\n constructor(\r\n private reportService: ReportService,\r\n private sharedService: SharedService,\r\n private fb: UntypedFormBuilder,\r\n private translateService: TranslateService\r\n ) {\r\n this.tagsModel = this.createTagsModel();\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.searchForm = this.fb.group({\r\n title: [],\r\n dateRange: '',\r\n reportType: [],\r\n arrangement: ''\r\n });\r\n\r\n // Stream to get reportTitles\r\n this.reportTitles$ = this.reportService.getReportTitles().pipe(\r\n take(1),\r\n map(titles =>\r\n titles.map((title, i) => ({ value: i, title: title.titleName }))\r\n )\r\n );\r\n\r\n // Report Type select value\r\n this.reportTypes = [\r\n {\r\n value: 1,\r\n title: this.translateService.instant(\r\n 'DASHBOARD.PREVIOUS_REPORT_TYPE_BCR_SELECT.VALUE'\r\n )\r\n },\r\n {\r\n value: 3,\r\n title: this.translateService.instant(\r\n 'DASHBOARD.PREVIOUS_REPORT_TYPE_OB_SELECT.VALUE'\r\n )\r\n },\r\n {\r\n value: 2,\r\n title: this.translateService.instant(\r\n 'DASHBOARD.PREVIOUS_REPORT_TYPE_RR_SELECT.VALUE'\r\n )\r\n }\r\n ];\r\n\r\n this.onSearchByTitleChange();\r\n }\r\n\r\n /**\r\n * Function to check panel is opened or closed\r\n * @param event Event\r\n */\r\n public panelToggled(event: any): void {\r\n this.panelClosed = event;\r\n }\r\n\r\n /**\r\n * Function to remove filter tags\r\n * @param item Item to remove\r\n */\r\n public removeTag(item: any): void {\r\n // If range tag removed\r\n if (!isEmpty(this.searchForm.controls.dateRange.value)) {\r\n if (item.key === 'range') {\r\n const event = new MouseEvent('click');\r\n this.searchForm.controls.dateRange.setValue(null);\r\n this.dateRangePicker.clearInput(event);\r\n this.searchForm.controls.reportType.updateValueAndValidity();\r\n }\r\n }\r\n\r\n // If arrangement tag removed\r\n if (!isEmpty(this.searchForm.controls.arrangement.value)) {\r\n if (item.key === 'arrangement') {\r\n this.searchForm.controls.arrangement.setValue(null);\r\n this.searchForm.controls.arrangement.updateValueAndValidity();\r\n }\r\n }\r\n\r\n // If report type tag removed\r\n if (!isEmpty(this.searchForm.controls.reportType.value)) {\r\n this.searchForm.controls.reportType.value.forEach((element, i) => {\r\n if (item.key === element) {\r\n if (this.searchForm.controls.reportType.value[i] === element) {\r\n this.searchForm.controls.reportType.value.splice(i, 1);\r\n this.searchForm.controls.reportType.setValue(\r\n this.searchForm.controls.reportType.value\r\n );\r\n this.searchForm.controls.reportType.updateValueAndValidity();\r\n }\r\n }\r\n });\r\n }\r\n\r\n // Search reports after tags removed\r\n this.searchReport();\r\n }\r\n\r\n /**\r\n * Function to applly filter tags\r\n */\r\n public applyFilter(): void {\r\n this.panelClosed = true;\r\n this.tagsModel.tags = [];\r\n this.getRangePickerTag();\r\n this.getArrangementTag();\r\n this.getReportTypeTag();\r\n this.currentPage = 1;\r\n this.searchReport();\r\n }\r\n\r\n /**\r\n * Function to clear and reset advanced filter\r\n * @param event Event\r\n */\r\n public clearAndReset(event: any): void {\r\n this.tagsModel = this.createTagsModel();\r\n this.dateRangePicker.clearInput(event);\r\n this.searchForm.controls.dateRange.setValue(null);\r\n this.searchForm.controls.arrangement.setValue([]);\r\n this.searchForm.controls.reportType.setValue([]);\r\n this.searchForm.updateValueAndValidity();\r\n this.searchReport();\r\n }\r\n\r\n /**\r\n * Function to define pagination options\r\n * @param id Pagination id\r\n */\r\n public getPaginationOptions(): PaginationOptions {\r\n return {\r\n id: 'search-report',\r\n itemsPerPage: this.itemsPerPage,\r\n currentPage: this.currentPage,\r\n totalItems: this.totalReports\r\n };\r\n }\r\n\r\n /**\r\n * Page change event\r\n * @param pageNumber Page number\r\n */\r\n public onPageChange(pageNumber: number): void {\r\n this.currentPage = pageNumber;\r\n this.searchReport();\r\n }\r\n\r\n /**\r\n * @description Function to calculate and display items count per page\r\n * @param currentPage Current page number\r\n * @param itemsPerPage Option to how mutch items to show per page\r\n * @param totalPages Total items count\r\n */\r\n public perPageCounter(): string {\r\n const start =\r\n this.currentPage * this.itemsPerPage - (this.itemsPerPage - 1);\r\n const end = Math.min(start + this.itemsPerPage - 1, this.totalReports);\r\n return this.translateService.instant('SEARCH_PAGE_COUNTER.TEXT', [\r\n start,\r\n end,\r\n this.totalReports\r\n ]);\r\n }\r\n\r\n /**\r\n * Function to search reports\r\n */\r\n public searchReport(): void {\r\n // Search model\r\n const searchModel = {\r\n reportTypeCriteria: !isEmpty(this.searchForm.controls.reportType.value)\r\n ? this.searchForm.controls.reportType.value\r\n : null,\r\n title: !isEmpty(this.searchForm.controls.title.value)\r\n ? this.searchForm.controls.title.value[0].title\r\n : null,\r\n dateFrom: !isEmpty(this.searchForm.controls.dateRange.value)\r\n ? this.sharedService.convertDateStringToBEAcceptableValue(\r\n this.searchForm.controls.dateRange.value.split('-')[0]\r\n )\r\n : null,\r\n dateTill: !isEmpty(this.searchForm.controls.dateRange.value)\r\n ? this.sharedService.convertDateStringToBEAcceptableValue(\r\n this.searchForm.controls.dateRange.value.split('-')[1]\r\n )\r\n : null,\r\n arrangementText: !isEmpty(this.searchForm.controls.arrangement.value)\r\n ? this.searchForm.controls.arrangement.value\r\n : null,\r\n pageNo: this.currentPage - 1,\r\n pageSize: this.itemsPerPage\r\n };\r\n\r\n // Call search report API\r\n if (!this.isSearchModelEmpty()) {\r\n this.reportService\r\n .searchReport(searchModel)\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe(res => {\r\n this.updateList(res.reports);\r\n this.totalReports = res.count;\r\n this.result = true;\r\n });\r\n } else {\r\n this.paginationList = [];\r\n this.totalReports = 0;\r\n this.result = false;\r\n }\r\n }\r\n\r\n /**\r\n * Function to check is search form is valid\r\n */\r\n public isFormValid(): boolean {\r\n return !isEmpty(this.searchForm.controls.reportType.value) ||\r\n !isEmpty(this.searchForm.controls.title.value) ||\r\n !isEmpty(this.searchForm.controls.dateRange.value) ||\r\n !isEmpty(this.searchForm.controls.arrangement.value)\r\n ? true\r\n : false;\r\n }\r\n\r\n /**\r\n * Checking is search model is not empty\r\n */\r\n private isSearchModelEmpty(): boolean {\r\n if (\r\n isEmpty(this.searchForm.controls.reportType.value) &&\r\n isEmpty(this.searchForm.controls.title.value) &&\r\n isEmpty(this.searchForm.controls.dateRange.value) &&\r\n isEmpty(this.searchForm.controls.arrangement.value)\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Function to clear search result if title is empty\r\n */\r\n private onSearchByTitleChange(): void {\r\n this.searchForm.controls.title.valueChanges.subscribe(val => {\r\n if (isEmpty(val) && this.isSearchModelEmpty()) {\r\n this.searchReport();\r\n }\r\n if (isEmpty(val) && !this.isSearchModelEmpty()) {\r\n this.searchReport();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Function to create tag model\r\n */\r\n private createTagsModel(): ScrollTagModel {\r\n return { tags: [] };\r\n }\r\n\r\n /**\r\n * Function to get range picker values and add them as tags\r\n */\r\n private getRangePickerTag(): void {\r\n if (!isEmpty(this.searchForm.controls.dateRange.value)) {\r\n const dateRangeIndex = findIndex(this.tagsModel.tags, ['key', 'range']);\r\n if (dateRangeIndex > -1) {\r\n this.tagsModel.tags[dateRangeIndex].title =\r\n this.searchForm.controls.dateRange.value;\r\n } else {\r\n this.tagsModel.tags.push({\r\n title: this.searchForm.controls.dateRange.value,\r\n key: 'range',\r\n readonly: false\r\n });\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to get arrangments and apply them as tags\r\n */\r\n private getArrangementTag(): void {\r\n if (!isEmpty(this.searchForm.controls.arrangement.value)) {\r\n const arrangrementIndex = findIndex(this.tagsModel.tags, [\r\n 'key',\r\n 'arrangement'\r\n ]);\r\n if (arrangrementIndex > -1) {\r\n this.tagsModel.tags[arrangrementIndex].title =\r\n this.searchForm.controls.arrangement.value;\r\n } else {\r\n this.tagsModel.tags.push({\r\n title: this.searchForm.controls.arrangement.value,\r\n key: 'arrangement',\r\n readonly: false\r\n });\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to get report type and apply them as tags\r\n */\r\n private getReportTypeTag(): void {\r\n if (!isEmpty(this.searchForm.controls.reportType.value)) {\r\n this.searchForm.controls.reportType.value.forEach(element => {\r\n const typeIndex = findIndex(this.tagsModel.tags, ['key', element]);\r\n if (typeIndex > -1) {\r\n this.tagsModel.tags[typeIndex].title = this.typeOfReport[element];\r\n } else {\r\n this.tagsModel.tags.push({\r\n title: this.typeOfReport[element],\r\n key: element,\r\n readonly: false\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Function to update pagination list\r\n * @param reportData Pagination data\r\n */\r\n private updateList(reportData: any): void {\r\n this.paginationList = [];\r\n if (reportData && reportData.length > 0) {\r\n for (const recievedReports of reportData) {\r\n this.paginationList.push(recievedReports);\r\n }\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { DatePickerCustomComponent } from \"./../shared/components/datepicker-custom/datepicker-custom.component\";\r\nimport { DatePickerOptions } from \"proceduralsystem-clientcomponents\";\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from \"@angular/forms\";\r\nimport { CancelConfirmModalComponent } from \"./cancel-confirm-modal/cancel-confirm-modal.component\";\r\nimport * as moment from \"moment\";\r\nimport { SharedService } from \"../services/shared.service\";\r\nimport { GLOBALS } from \"../shared/globals\";\r\nimport { ReportService } from \"../services/report.service\";\r\nimport { take } from \"rxjs/operators\";\r\nimport { Router } from \"@angular/router\";\r\nimport { find } from \"lodash-es\";\r\nimport { CreateReport } from \"../shared/models/report.model\";\r\nimport { ReportTypes, ReportTypesTitles } from \"../shared/report.enum\";\r\n\r\n@Component({\r\n selector: \"oir-create-report\",\r\n templateUrl: \"./create-report.component.html\",\r\n styleUrls: [\"./create-report.component.less\"],\r\n})\r\nexport class CreateReportComponent implements OnInit {\r\n public createReportForm: UntypedFormGroup;\r\n public datePickerOptions: DatePickerOptions = {\r\n minDate: moment.utc().format(GLOBALS.dateFormat),\r\n };\r\n public dateRange = true;\r\n public selectedRange: string =\r\n moment.utc().add(1, \"weeks\").isoWeekday(2).format(GLOBALS.dateFormat) +\r\n \" - \" +\r\n moment.utc().add(1, \"weeks\").isoWeekday(4).format(GLOBALS.dateFormat);\r\n public preselectDates = true;\r\n public reportTypes = ReportTypes;\r\n public reportTypesTitles = ReportTypesTitles;\r\n\r\n public reportTypeSelectData = [\r\n {\r\n value: this.reportTypes.BCR,\r\n title: this.reportTypesTitles.BCR,\r\n heading: this.reportTypesTitles.BCR,\r\n },\r\n {\r\n value: this.reportTypes.ODR,\r\n title: this.reportTypesTitles.ODR,\r\n heading: this.reportTypesTitles.ODR,\r\n selected: false,\r\n hidden: false,\r\n animate: false,\r\n disabled: false,\r\n },\r\n {\r\n value: this.reportTypes.COSR,\r\n title: this.reportTypesTitles.COSR,\r\n heading: this.reportTypesTitles.COSR,\r\n selected: false,\r\n hidden: false,\r\n animate: false,\r\n disabled: true,\r\n },\r\n ];\r\n\r\n public invalidInputDate = false;\r\n public disableCreate = false;\r\n\r\n private currentWeek: number;\r\n\r\n @ViewChild(\"reportDatesRange\") reportDatesRange: DatePickerCustomComponent;\r\n @ViewChild(\"cancelConfirmModalComponent\")\r\n cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n constructor(\r\n private sharedService: SharedService,\r\n private formBuilder: UntypedFormBuilder,\r\n private reportService: ReportService,\r\n private router: Router\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.createReportForm = this.formBuilder.group({\r\n reportType: [\"\", Validators.required],\r\n reportDatesRange: [\"\", Validators.required],\r\n });\r\n }\r\n\r\n /**\r\n * Return report type title by type select value\r\n */\r\n public getReportTypeName(): string {\r\n return find(\r\n this.reportTypeSelectData,\r\n (val) => val.value === this.createReportForm.get(\"reportType\").value\r\n ).title;\r\n }\r\n\r\n /**\r\n * Force blur event to preselect days (need client component fixes)\r\n */\r\n public preselectSuggestedDays(): void {\r\n this.reportDatesRange.onBlur(\r\n document.querySelector(`.reportDatesRange .datepicker`)\r\n );\r\n }\r\n\r\n /**\r\n * Disable create draft button\r\n */\r\n public disableCreateButton(event: any): void {\r\n this.disableCreate = event.selectingRange;\r\n }\r\n\r\n /**\r\n * Change `preselectDates` boolean to true to trigger date range preselect\r\n */\r\n public allowPreselect(event: number): void {\r\n this.dateRange = event !== this.reportTypes.ODR;\r\n if (!this.dateRange) {\r\n this.createReportForm.get(\"reportDatesRange\").patchValue(\"\");\r\n this.createReportForm.get(\"reportDatesRange\").updateValueAndValidity();\r\n this.disableCreate = false;\r\n }\r\n this.preselectDates = event !== this.reportTypes.ODR;\r\n setTimeout(() => {\r\n if (this.preselectDates) {\r\n this.preselectSuggestedDays();\r\n this.preselectDates = !this.preselectDates;\r\n }\r\n }, 50);\r\n }\r\n\r\n /**\r\n * Disable dates not in selection week\r\n */\r\n public disableOtherWeeks(event: any): void {\r\n this.invalidInputDate = event.selectingRange;\r\n document.querySelector(\".calender-navigate\").classList.add(\"disabled\");\r\n if (!event.selectingRange && event.date === \"\") {\r\n event.date = moment.utc().format(GLOBALS.dateFormat);\r\n }\r\n // Delay day iteration to ensure DOM element exists. Required due to client component limitations.\r\n setTimeout(() => {\r\n document\r\n .querySelectorAll(\".ta_cr_reportDatesRange .ngb-dp-day\")\r\n .forEach(function (v) {\r\n let dateAttr = v.getAttribute(\"aria-label\");\r\n let eventDate = moment.utc(event.date, GLOBALS.dateFormat);\r\n let currentDate = moment.utc();\r\n let date = moment.utc(dateAttr);\r\n\r\n if (\r\n date.isoWeek() !== eventDate.isoWeek() ||\r\n date.isBefore(currentDate.subtract(1, \"days\"))\r\n ) {\r\n v.classList.add(\"disable-picker\");\r\n } else {\r\n v.classList.remove(\"disable-picker\");\r\n }\r\n });\r\n }, 50);\r\n }\r\n\r\n /**\r\n * Method to allow date range only present and future dates\r\n */\r\n public disableDateRangeDays(): void {\r\n if (this.preselectDates) {\r\n this.preselectSuggestedDays();\r\n this.preselectDates = !this.preselectDates;\r\n }\r\n // Delay day iteration to ensure DOM element exists. Required due to client component limitations.\r\n setTimeout(() => {\r\n document.querySelectorAll(\".ngb-dp-arrow-btn\").forEach((btn) => {\r\n btn.addEventListener(\"click\", () => {\r\n this.disableDateRangeDays();\r\n });\r\n });\r\n\r\n document\r\n .querySelectorAll(\".dropdownMonth .dropdown-item\")\r\n .forEach((item) => {\r\n item.addEventListener(\"click\", () => {\r\n this.disableDateRangeDays();\r\n });\r\n });\r\n\r\n document\r\n .querySelectorAll(\".dropdownYear .dropdown-item\")\r\n .forEach((item) => {\r\n item.addEventListener(\"click\", () => {\r\n this.disableDateRangeDays();\r\n });\r\n });\r\n\r\n if (document.querySelector(\".ta_cr_reportDatesRange .datepicker\")) {\r\n const today = moment().startOf(\"day\");\r\n document\r\n .querySelectorAll(\".ta_cr_reportDatesRange .ngb-dp-day\")\r\n .forEach(function (v) {\r\n const dates = moment.utc(new Date(v.getAttribute(\"aria-label\")));\r\n if (dates.isBefore(today)) {\r\n v.classList.add(\"disable-picker\");\r\n } else {\r\n v.classList.remove(\"disable-picker\");\r\n }\r\n });\r\n }\r\n }, 50);\r\n }\r\n\r\n /**\r\n * Validate dates based on user input\r\n */\r\n public validateDates(enteredDates: any): void {\r\n let dates = this.selectedRange;\r\n if (enteredDates) {\r\n dates = enteredDates.target\r\n ? enteredDates.target.value.split(\"-\")\r\n : enteredDates.split(\"-\");\r\n }\r\n\r\n this.currentWeek = moment.utc(dates[0], GLOBALS.dateFormat).isoWeek();\r\n this.invalidInputDate = this.sharedService.validateDates(\r\n dates,\r\n this.currentWeek,\r\n this.dateRange\r\n );\r\n }\r\n\r\n /**\r\n * Opens cancel confirmation modal\r\n */\r\n public openCancelModal(): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Closes cancel confirmation modal and clears form if confirmed\r\n */\r\n public cancelModalDecision(event: boolean): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n if (event) {\r\n this.createReportForm.reset();\r\n }\r\n }\r\n\r\n /**\r\n * Send call to API to create draft report\r\n */\r\n public createDraftReport() {\r\n const dates = this.createReportForm\r\n .get(\"reportDatesRange\")\r\n .value.split(\"-\");\r\n const body: CreateReport = {\r\n startDate: this.sharedService.convertDateStringToBEAcceptableValue(\r\n dates[0]\r\n ),\r\n endDate:\r\n this.createReportForm.get(\"reportType\").value === this.reportTypes.ODR\r\n ? this.sharedService.convertDateStringToBEAcceptableValue(\r\n this.createReportForm.get(\"reportDatesRange\").value\r\n )\r\n : this.sharedService.convertDateStringToBEAcceptableValue(dates[1]),\r\n };\r\n this.reportService\r\n .createReportDraft(body)\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.router.navigate([\"/bcr-report/\" + res.joReportId]);\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n Report,\r\n BusinessDayArrangement,\r\n BusinessScheduleDay,\r\n BusinessDayCommonSectionDetail,\r\n BusinessDayLeadersQuestionsSectionDetail,\r\n BusinessDaySectionsPQOralDetail,\r\n BusinessDayMotionsWithoutDebateSectionDetail,\r\n BusinessDaySectionHeader\r\n} from '../shared/models/report.model';\r\nimport { SharedService } from './shared.service';\r\nimport { SectionTypes, FormTemplate } from '../shared/report.enum';\r\nimport { isEmpty, findIndex, isArray, sortBy, findLast, take as takeLodash, maxBy, cloneDeep } from 'lodash-es';\r\nimport { take, tap, mergeMap, delay } from 'rxjs/operators';\r\nimport { ReportService } from './report.service';\r\nimport { Observable, from, Subject } from 'rxjs';\r\nimport * as moment from 'moment';\r\nimport { GLOBALS } from '../shared/globals';\r\nimport { OrderOfBusiness } from '../shared/models/order-of-business.model';\r\nimport { ReportUtils } from '../shared/utils/report.utils';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\n\r\n// LOGIC TO KEEP IN MIND\r\n// In 'Add new section' accordion we can create new sections and\r\n// headers for said sections\r\n// To be able to manipulate 'new' sections and headers we assigned to // them fake IDs with typeof string (same property as real one)\r\n// Thats why we have functionlaity to change these fake IDs to 0 before // sending data to db\r\nexport class ReportStoreService {\r\n\r\n public reportData: Report;\r\n public reportData$: Observable;\r\n\r\n public reportObData: OrderOfBusiness;\r\n public reportObData$: Observable;\r\n\r\n private reportDataChanged = new Subject();\r\n private reportObDataChanged = new Subject();\r\n\r\n constructor(\r\n private sharedService: SharedService,\r\n private reportService: ReportService\r\n ) {\r\n this.reportData$ = this.reportDataChanged.asObservable();\r\n this.reportObData$ = this.reportObDataChanged.asObservable();\r\n }\r\n\r\n /**\r\n * Function to clear data on destroy\r\n */\r\n public clearData(): void {\r\n this.reportData = null;\r\n this.reportDataChanged.next(null);\r\n }\r\n\r\n /**\r\n * Function to set business day instance time\r\n * @param componentId component Id\r\n * @param startTime start time\r\n * @param endtTime end time\r\n */\r\n public setBusinessDayStartAndEndTime(bsDayDate: string, newStartTimeValue: any): void {\r\n if (!isEmpty(this.reportData)) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayStartTime =\r\n this.sharedService.setTimeToDate(this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayDate, newStartTimeValue);\r\n\r\n this.recalculateReportDaysTime();\r\n this.emitReportUpdate();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Method to get end time of businessDay by id\r\n * @param bsDayId business day id\r\n */\r\n public getBusinessDayEndTime(bsDayDate: string): string {\r\n if (isEmpty(this.reportData)) {\r\n return null;\r\n }\r\n\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n return (index > -1) ?\r\n this.sharedService.convertTime(this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayEndTime) :\r\n null;\r\n }\r\n\r\n /**\r\n * Function to get sitting day status\r\n * @param bsDayId toggle id\r\n * @param sittingToggleData toggle data\r\n */\r\n public setSittingDayStatus(bsDayDate: string, sittingToggleData: any): void {\r\n if (!isEmpty(this.reportData)) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].isBSDaySitting = sittingToggleData;\r\n // Clear bsDayNotSittingReason if sittingToggleData is true\r\n if (sittingToggleData) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayNotSittingReason = null;\r\n }\r\n this.emitReportUpdate();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to get day not sitting reason text\r\n * @param bsDayId field id\r\n * @param dayInstanceReasonData field data\r\n */\r\n public setDayReasonText(bsDayDate: string, dayInstanceReasonData: any): void {\r\n if (!isEmpty(this.reportData)) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n // !Important - Only update value - No need to emit report update\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayNotSittingReason = dayInstanceReasonData;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Method to disable default section\r\n * @param bsDayDate\r\n * @param bdSectionId\r\n */\r\n public disableHeaderForDefaultSection(bsDayDate: string, bdSectionId: number | string): void {\r\n if (isEmpty(this.reportData)) {\r\n return this.recalculateReportDaysTime(true);\r\n }\r\n\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n\r\n const headerIndex = findIndex(this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders, ['bdSectionId', bdSectionId]);\r\n if (headerIndex > -1) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders[headerIndex].businessDaySectionPositionNo = null;\r\n // Recalculate position in section data\r\n const header = this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders[headerIndex];\r\n header.wasSectionRemoved = true;\r\n\r\n if (!isEmpty(this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[header.businessDaySectionType.bdSectionTypeId]])) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[header.businessDaySectionType.bdSectionTypeId]].forEach(sectionData => {\r\n if (sectionData.businessDaySectionId === header.bdSectionId) {\r\n sectionData.businessDaySectionPositionNo = header.businessDaySectionPositionNo;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n \r\n this.recalculateReportDaysTime(true);\r\n }\r\n\r\n /**\r\n * Method to enable default section\r\n * @param bsDayDate\r\n * @param bdSectionId\r\n */\r\n public enableHeaderForDefaultSection(bsDayDate: string, bdSectionId: number | string): void {\r\n if (!isEmpty(this.reportData)) {\r\n\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n const headerIndex = findIndex(this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders, ['bdSectionId', bdSectionId]);\r\n if (headerIndex > -1) {\r\n const lastPosition = maxBy(this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders, 'businessDaySectionPositionNo');\r\n const header = this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders[headerIndex];\r\n \r\n header.wasSectionRemoved = false;\r\n header.businessDaySectionPositionNo = lastPosition ? lastPosition.businessDaySectionPositionNo + 1 : 0;\r\n }\r\n }\r\n }\r\n this.recalculateReportDaysTime(true);\r\n }\r\n\r\n /**\r\n * Method to update section position after drop\r\n * @param bsDayDate\r\n * @param businessDaySectionHeaders\r\n */\r\n public updateSectionPosition(bsDayDate: string, businessDaySectionHeaders: BusinessDaySectionHeader[]): void {\r\n if (isEmpty(this.reportData)) {\r\n return;\r\n }\r\n\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index === -1) {\r\n return this.recalculateReportDaysTime(true);\r\n }\r\n\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders =\r\n businessDaySectionHeaders.map((header, i) => {\r\n\r\n // Because we convert start & end times we must convert them back (if they exist), be careful to pass the correct format\r\n const bsSectionStartTime = header.bsSectionStartTime ? moment(this.sharedService.convertDate(bsDayDate)).utc().format(GLOBALS.dateFormat) +\r\n ' ' + header.bsSectionStartTime : null;\r\n const bsSectionEndTime = header.bsSectionEndTime ? moment(this.sharedService.convertDate(bsDayDate)).utc().format(GLOBALS.dateFormat) +\r\n ' ' + header.bsSectionEndTime : null;\r\n\r\n return {\r\n ...header,\r\n businessDaySectionPositionNo: header.businessDaySectionPositionNo !== null ? i + 1 : null,\r\n bsSectionStartTime,\r\n bsSectionEndTime\r\n };\r\n });\r\n\r\n // Recalculate position in section data\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders.forEach(headers => {\r\n if (!isEmpty(this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[headers.businessDaySectionType.bdSectionTypeId]])) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[headers.businessDaySectionType.bdSectionTypeId]].forEach(sectionData => {\r\n if (sectionData.businessDaySectionId === headers.bdSectionId) {\r\n sectionData.businessDaySectionPositionNo = headers.businessDaySectionPositionNo;\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.recalculateReportDaysTime(true);\r\n }\r\n\r\n /**\r\n * Function to get data from API and return as data\r\n * @param id Section id\r\n */\r\n private getSectionDataFromApi(id: number | string, type: number, date: string, position: number): Observable {\r\n return this.reportService.getSectionData(id, type)\r\n .pipe(\r\n take(1),\r\n tap(res => this.storeSectionData(position, res, type, date, false)),\r\n // Because of possibility that user can change start time before requesting any section data\r\n // We need to show data that considers localy updated start time\r\n // So we simply store section (where it is updated while stored) and then return it from store\r\n mergeMap(() => this.getSectionsData(id, type, date, position))\r\n );\r\n }\r\n\r\n /**\r\n * Method to get and set day template for non default business day\r\n * @param bsDayDate\r\n * @param templateId\r\n */\r\n public getAndSetNonDefaultBusinessDayTemplate(bsDayDate: string, templateId: number, businessScheduleDay: BusinessScheduleDay): void {\r\n\r\n this.reportService.getSectionsList(templateId, this.sharedService.convertDate(bsDayDate))\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n this.updateNonDefaultDayWithDayTemplate(bsDayDate, res, templateId, businessScheduleDay);\r\n });\r\n }\r\n\r\n /**\r\n * Function to set default day sections\r\n * @param businessScheduleDay Business Schedule Day\r\n */\r\n public setDefaultDaySection(businessScheduleDay: any) {\r\n businessScheduleDay.businessDaySectionHeaders.forEach(header => {\r\n const randomSectionId = this.sharedService.generateId();\r\n const hasStartEndTime = (!isEmpty(header.bsSectionStartTime) && !isEmpty(header.bsSectionEndTime));\r\n const duration = hasStartEndTime ? this.calculateDurationTime(header.bsSectionStartTime, header.bsSectionEndTime) : 0;\r\n header.bdSectionId = randomSectionId;\r\n header.businessDaySectionTypeId = header.businessDaySectionType.bdSectionTypeId;\r\n const sectionData = {\r\n businessScheduleDayId: businessScheduleDay.bsDayId,\r\n businessDaySectionId: randomSectionId,\r\n bsSectionStartTime: this.sharedService.convertDate(header.bsSectionStartTime),\r\n bsSectionEndTime: this.sharedService.convertDate(header.bsSectionEndTime),\r\n businessDaySectionDuration: duration,\r\n businessDaySectionTemplateId: header.businessDaySectionType.bdSectionTypeId,\r\n businessDaySectionTitle: header.bsDaySectionTitle,\r\n businessDaySectionTypeId: header.businessDaySectionType.bdSectionTypeId,\r\n businessDaySectionPositionNo: header.businessDaySectionPositionNo,\r\n };\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(businessScheduleDay.bsDayDate);\r\n if (header.businessDaySectionType && header.businessDaySectionType.bdSectionTypeId) {\r\n if (!isArray(this.reportData.businessScheduleDetail.businessScheduleDays[index]\r\n [SectionTypes[header.businessDaySectionType.bdSectionTypeId]])) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index]\r\n [SectionTypes[header.businessDaySectionType.bdSectionTypeId]] = [sectionData];\r\n } else {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index]\r\n [SectionTypes[header.businessDaySectionType.bdSectionTypeId]].push(sectionData);\r\n }\r\n }\r\n });\r\n this.emitReportUpdate();\r\n }\r\n\r\n /**\r\n * Function to get section data from local store\r\n * If data not existing in local store then from API\r\n * @param id Section id\r\n */\r\n public getSectionsData(sectionId: number | string, sectionTypeId: number, bsDayDate: string, position: number, forceRefresh = false): Observable {\r\n if (!isEmpty(this.reportData) && !forceRefresh) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n if (this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[sectionTypeId]]) {\r\n const sectionIndex = findIndex(this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[sectionTypeId]],\r\n ['businessDaySectionId', sectionId]);\r\n if (sectionIndex > -1) {\r\n return from(\r\n // Delay to allow change detection to complete\r\n [this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[sectionTypeId]][sectionIndex]]).pipe(delay(100));\r\n }\r\n }\r\n }\r\n }\r\n return this.getSectionDataFromApi(sectionId, sectionTypeId, bsDayDate, position);\r\n }\r\n\r\n /**\r\n * Function to store section data\r\n * @param sectionData section data\r\n * @param businessScheduleDayId day id\r\n * @param daySectionTemplateId template id\r\n * @param emitUpdate indicator to emit update\r\n */\r\n public storeSectionData(position: number, sectionData: any, daySectionTemplateId?: number, bsDayDate?: string, emitUpdate = true): void {\r\n\r\n if (position === null) {\r\n sectionData.businessDaySectionPositionNo = null;\r\n } else {\r\n sectionData.businessDaySectionPositionNo = !isEmpty(sectionData.businessDaySectionPositionNo) ?\r\n sectionData.businessDaySectionPositionNo : position;\r\n }\r\n // converting values from true and false to 1 if true, to 0 if false\r\n sectionData.isSectionArrangementUsed = this.sharedService.convertBoolenToNumber(sectionData.isSectionArrangementUsed);\r\n\r\n // converting values from true and false to 1 if true, to 0 if false\r\n sectionData.isSectionNoteUsed = this.sharedService.convertBoolenToNumber(sectionData.isSectionNoteUsed);\r\n\r\n // converting values from true and false to 1 if true, to 0 if false\r\n sectionData.isSectionNextWeekBusinessUsed = this.sharedService.convertBoolenToNumber(sectionData.isSectionNextWeekBusinessUsed);\r\n\r\n // if arrangement of section is null conver it to empty array, becuse API not taking null value\r\n sectionData.arrangementOfSections = sectionData.arrangementOfSections === null ? [] : sectionData.arrangementOfSections;\r\n\r\n // replacing null value to empty array becouse API not taking null\r\n switch (daySectionTemplateId) {\r\n case FormTemplate.leadersQuestions:\r\n sectionData.partiesToAskQuestions = sectionData.partiesToAskQuestions || [];\r\n break;\r\n case FormTemplate.pqOral:\r\n sectionData.departments = sectionData.departments || [];\r\n break;\r\n case FormTemplate.governmentBusiness:\r\n if (sectionData.workItems) {\r\n sectionData.workItems = ReportUtils.sortList('businessDaySectionWorkItemPositionNo', sectionData.workItems);\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n if (isEmpty(this.reportData)) {\r\n return;\r\n }\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n\r\n if (index === -1) {\r\n return;\r\n }\r\n sectionData = {\r\n ...sectionData,\r\n businessScheduleDayId: this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayId\r\n };\r\n\r\n // Checking if section already exists\r\n const sectionIndex = findIndex(\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[daySectionTemplateId]],\r\n ['businessDaySectionId', sectionData.businessDaySectionId]);\r\n this.updateDaySectionData(sectionIndex, index, daySectionTemplateId, sectionData);\r\n this.updateExistingSectionHeader(bsDayDate, sectionData);\r\n\r\n if (emitUpdate) {\r\n this.emitReportUpdate();\r\n }\r\n }\r\n\r\n /**\r\n * Function to save custom arrangements\r\n * @param arrangementData arrangement data\r\n * @param bsDayId bussines day id\r\n */\r\n public setCustomArrangements(arrangementData: BusinessDayArrangement[], proposalTitle: string, bsDayDate: string, isArrangementDataCleared: boolean): void {\r\n if (!isEmpty(this.reportData)) {\r\n const businessScheduleDays = this.reportData.businessScheduleDetail.businessScheduleDays;\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n businessScheduleDays[index].businessScheduleArrangementProposal = proposalTitle;\r\n businessScheduleDays[index].businessDayArrangements = arrangementData;\r\n businessScheduleDays[index].isbusinessDayArrangementsChanged = arrangementData.length === 0 ? false : true;\r\n if (isArrangementDataCleared) {\r\n businessScheduleDays[index].dayArrangementsCleared = true;\r\n }\r\n }\r\n this.emitReportUpdate();\r\n }\r\n }\r\n\r\n /**\r\n * Function to get arrangements data\r\n * @param bsDayId bussines day id\r\n */\r\n public getCustomArrangements(bsDayDate: string): BusinessDayArrangement[] {\r\n const businessScheduleDays = this.reportData.businessScheduleDetail.businessScheduleDays;\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n return businessScheduleDays[index].businessDayArrangements;\r\n }\r\n }\r\n\r\n /**\r\n * Function to get saved proposal title for arrangements\r\n * @param bsDayId Bussines day id\r\n */\r\n public getArrangementProposalTitle(bsDayDate: string): string {\r\n const businessScheduleDays = this.reportData.businessScheduleDetail.businessScheduleDays;\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n return businessScheduleDays[index].businessScheduleArrangementProposal;\r\n }\r\n }\r\n\r\n /**\r\n * Method to store value that indicates if business day section is expanded\r\n * Used to keep section expanded after reports business days list is re-rendered\r\n * @param bsDayDate\r\n * @param expanded\r\n */\r\n public setDaySectionExpanded(bsDayDate: string, expanded: boolean): void {\r\n if (!isEmpty(this.reportData)) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n // !Important - Only update value - No need to emit report update\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].daySectionExpanded = expanded;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to set expanded Day and section inside this day\r\n * @param bsDayId Day id\r\n * @param bsSectionId Section id\r\n * @param expanded Boolean to expand or not\r\n */\r\n public setDayAndSectionExpanded(bsDayId: number, bsSectionId: number, expanded: boolean): void {\r\n if (!isEmpty(this.reportData)) {\r\n const businessScheduleDays = this.reportData.businessScheduleDetail.businessScheduleDays;\r\n // Searching for day index whitch should be expanded\r\n const index = findIndex(businessScheduleDays, ['bsDayId', bsDayId]);\r\n if (index > -1) {\r\n // Searching for section index whitch should be expanded\r\n const sectionIndex = findIndex(businessScheduleDays[index].businessDaySectionHeaders, ['bdSectionId', bsSectionId]);\r\n if (sectionIndex > -1) {\r\n // Setting Day expanded\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].daySectionExpanded = expanded;\r\n // Setting Section expanded\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].\r\n businessDaySectionHeaders[sectionIndex].sectionExpanded = expanded;\r\n // Emmit report update\r\n this.emitReportUpdate();\r\n\r\n // Reset sectionExpanded to false after report was updated\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].\r\n businessDaySectionHeaders[sectionIndex].sectionExpanded = false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to set day new section header\r\n * @param bsDayDate Day date\r\n * @param sectionHeader New header\r\n */\r\n public setNewSectionHeader(bsDayDate: string, sectionHeader: any, isCopy = false): void {\r\n if (!isEmpty(this.reportData)) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n const newSectionHeader = cloneDeep(sectionHeader);\r\n const businessDay = this.reportData.businessScheduleDetail.businessScheduleDays[index]\r\n const businessDaySectionHeaders = businessDay.businessDaySectionHeaders.filter(header => header.businessDaySectionPositionNo);\r\n\r\n // Adjusting if comes from different day\r\n if (isCopy) {\r\n const momentSectionStart = moment.utc(newSectionHeader.bsSectionStartTime, 'HH:mm');\r\n const lastItem = businessDaySectionHeaders[businessDaySectionHeaders.length - 1];\r\n const hasStartEndTime = (!isEmpty(newSectionHeader.bsSectionStartTime) && !isEmpty(newSectionHeader.bsSectionEndTime));\r\n const duration = hasStartEndTime\r\n ? moment.utc(\r\n moment.utc(newSectionHeader.bsSectionEndTime, 'HH:mm')\r\n .diff(momentSectionStart)\r\n ).format('HH:mm')\r\n : 0;\r\n\r\n newSectionHeader.isNewSection = true;\r\n newSectionHeader.businessDaySectionPositionNo = businessDaySectionHeaders.length + 1;\r\n newSectionHeader.bdSectionId = 0;\r\n\r\n if (!lastItem) {\r\n businessDay.bsDayStartTime = moment.utc(businessDay.bsDayDate, GLOBALS.dateTimeFormat)\r\n .set({\r\n hour: momentSectionStart.get('hour'),\r\n minute: momentSectionStart.get('minute')\r\n }).format();\r\n\r\n businessDay.bsDayEndTime = moment.utc(businessDay.bsDayStartTime)\r\n .add(duration).format();\r\n businessDay.bsDayEndTime = moment.utc(businessDay.bsDayStartTime)\r\n .add(duration).format();\r\n\r\n newSectionHeader.bsSectionStartTime = businessDay.bsDayStartTime;\r\n newSectionHeader.bsSectionEndTime = businessDay.bsDayEndTime;\r\n } else {\r\n newSectionHeader.bsSectionStartTime = lastItem.bsSectionEndTime;\r\n newSectionHeader.bsSectionEndTime = moment.utc(lastItem.bsSectionEndTime)\r\n .add(duration).format();\r\n newSectionHeader.businessDaySectionPositionNo = lastItem.businessDaySectionPositionNo + 1;\r\n }\r\n }\r\n\r\n // Adding new section headers\r\n businessDay.businessDaySectionHeaders.push(newSectionHeader);\r\n\r\n // Recalculate time\r\n this.recalculateBusinessDayEndTime(bsDayDate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to set form validity\r\n * @param isValid Boolean form valid or not\r\n * @param bsDayDate Day date\r\n * @param bsDaySectionId Section ID\r\n */\r\n public setSectionFormValidity(isValid: boolean, bsDayDate: string, bsDaySectionId: string | number, emitUpdate: boolean): void {\r\n if (!isEmpty(this.reportData)) {\r\n const dayIndex = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (dayIndex > -1) {\r\n const day = this.reportData.businessScheduleDetail.businessScheduleDays[dayIndex].businessDaySectionHeaders;\r\n const headerId = findIndex(day, ['bdSectionId', bsDaySectionId]);\r\n if (headerId > -1) {\r\n day[headerId].isDataValid = isValid;\r\n }\r\n }\r\n if (emitUpdate) {\r\n this.emitReportUpdate();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to find previous header end time and patch it to correct field\r\n * @param bsDayDate Day date\r\n * @param bsDaySectionId Section id\r\n */\r\n public findPreviousHeaderEndTime(bsDayDate: string, bsDaySectionId: number | string): string {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n const headerId =\r\n findIndex(this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders,\r\n ['bdSectionId', bsDaySectionId]);\r\n const previousLastHeaderWithEndTime = findLast(\r\n takeLodash(\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders, headerId),\r\n (element) => !!element.bsSectionEndTime);\r\n if (headerId === 0) {\r\n return this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayStartTime;\r\n } else {\r\n return previousLastHeaderWithEndTime !== undefined ? previousLastHeaderWithEndTime.bsSectionEndTime :\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayStartTime;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function do delete added custom section and header\r\n * @param bsSectionId Section id\r\n * @param bsDayDate Day Date\r\n * @param bsSectionTypeId Section type\r\n */\r\n public deleteNewCustomSectionAndHeader(bsSectionId: string, bsDayDate: string, bsSectionTypeId: string): void {\r\n if (!isEmpty(this.reportData)) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n\r\n // Searching header index\r\n const headerId =\r\n findIndex(this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders,\r\n ['bdSectionId', bsSectionId]);\r\n if (headerId > -1) {\r\n // Remove section header\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders.splice(headerId, 1);\r\n this.recalculateBusinessDayEndTime(bsDayDate);\r\n }\r\n\r\n // Searching sectionId index\r\n const sectionId = findIndex(\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[bsSectionTypeId]],\r\n ['businessDaySectionId', bsSectionId]);\r\n if (sectionId > -1) {\r\n // Remove section data\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[bsSectionTypeId]].splice(sectionId, 1);\r\n }\r\n }\r\n }\r\n this.emitReportUpdate();\r\n }\r\n\r\n /**\r\n * Function to set report data\r\n * @param obj data object\r\n */\r\n public setReportData(obj: Report): void {\r\n if (obj) {\r\n obj.businessScheduleDetail.businessScheduleDays.sort((a, b) => {\r\n return new Date(this.sharedService.convertDate(a.bsDayDate)).getTime() -\r\n new Date(this.sharedService.convertDate(b.bsDayDate)).getTime();\r\n });\r\n \r\n obj.businessScheduleDetail.businessScheduleDays.forEach(scheduleDay => {\r\n if (scheduleDay.businessDaySectionHeaders) {\r\n // CR-57221 local property\r\n scheduleDay.businessDaySectionHeaders.forEach(header => header.wasSectionRemoved = !!header.wasSectionRemoved);\r\n }\r\n });\r\n }\r\n this.reportData = obj;\r\n this.emitReportUpdate();\r\n }\r\n\r\n /**\r\n * Function to set order of business report data\r\n */\r\n public setObReportData(obj: OrderOfBusiness): void {\r\n this.reportObData = obj;\r\n this.emitObReportUpdate();\r\n }\r\n\r\n /**\r\n * Function to map report data\r\n * If 'businessDaySectionId' is string convert it to null\r\n * @param arrayToMap Array to map\r\n */\r\n private convertBusinessDaySectionIdFromStringToNull(arrayToMap: string): Report {\r\n const report: Report = this.reportData;\r\n report.businessScheduleDetail.businessScheduleDays = report.businessScheduleDetail.businessScheduleDays.map((items) => {\r\n return {\r\n ...items,\r\n [arrayToMap]: isArray(items[arrayToMap]) ? items[arrayToMap].map((bdSection) => {\r\n return {\r\n ...bdSection,\r\n businessDaySectionId: typeof bdSection.businessDaySectionId === 'string' ? 0 : bdSection.businessDaySectionId,\r\n businessDaySectionDuration: moment.duration(bdSection.businessDaySectionDuration).asMinutes()\r\n };\r\n }) : []\r\n };\r\n });\r\n return report;\r\n }\r\n\r\n\r\n\r\n /**\r\n * Function to get final object whirtch will be sent to API\r\n */\r\n public getReportData(): Report {\r\n const report: Report = this.reportData;\r\n report.businessScheduleDetail.bsDetailFirstDay =\r\n this.sharedService.convertDate(report.businessScheduleDetail.bsDetailFirstDay);\r\n report.businessScheduleDetail.bsDetailLastDay =\r\n this.sharedService.convertDate(report.businessScheduleDetail.bsDetailLastDay);\r\n report.businessScheduleDetail.businessScheduleDays = report.businessScheduleDetail.businessScheduleDays.map((items) => {\r\n return {\r\n ...items,\r\n bsDayDate: this.sharedService.convertDate(items.bsDayDate),\r\n bsDayStartTime: this.sharedService.convertDate(items.bsDayStartTime),\r\n bsDayEndTime: this.sharedService.convertDate(items.bsDayEndTime),\r\n businessDayArrangements: items.isbusinessDayArrangementsChanged === true ? items.businessDayArrangements : null,\r\n businessDaySectionHeaders: items.businessDaySectionHeaders.map(header => {\r\n return {\r\n ...header,\r\n bdSectionId: typeof header.bdSectionId === 'string' ? 0 : header.bdSectionId,\r\n bsSectionStartTime: this.sharedService.convertDate(header.bsSectionStartTime),\r\n bsSectionEndTime: this.sharedService.convertDate(header.bsSectionEndTime),\r\n businessDaySectionTypeId: header.businessDaySectionType.bdSectionTypeId,\r\n };\r\n })\r\n };\r\n });\r\n\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayLeadersQuestionsSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayCustomSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDaySectionsPQOralDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayCommonSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayOrderOfBusinessSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayMotionsWithoutDebateSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayGovernmentBusinessSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayPrivateMembersBusinessSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayBillsForIntroductionSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('businessDayReferralToCommitteeSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('deferredDivisionsSectionDetails');\r\n this.convertBusinessDaySectionIdFromStringToNull('privateMemberBillSectionDetails');\r\n return report;\r\n }\r\n\r\n /**\r\n * Method to check if section has all required data\r\n * Used to display according icon\r\n * @param bsDayDate Day date\r\n * @param bsSectionId Section id\r\n */\r\n public doesSectionHaveAllRequiredData(bsDayDate: string, bsSectionId: string | number): boolean {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index > -1) {\r\n const sectionHeaders = this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders;\r\n const headerId = findIndex(sectionHeaders, ['bdSectionId', bsSectionId]);\r\n if (headerId > -1) {\r\n return sectionHeaders[headerId].isDataValid;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to collect all section validity information\r\n */\r\n public isSectionFormsValid(): Array {\r\n if (!isEmpty(this.reportData)) {\r\n const sectionFormValidityData = [];\r\n this.reportData.businessScheduleDetail.businessScheduleDays.forEach(day => {\r\n day.businessDaySectionHeaders = day.businessDaySectionHeaders.map(item => {\r\n return {\r\n ...item,\r\n sittingDay: day.isBSDaySitting\r\n };\r\n });\r\n day.businessDaySectionHeaders.forEach(header => {\r\n sectionFormValidityData.push(header);\r\n });\r\n });\r\n return sectionFormValidityData;\r\n }\r\n }\r\n\r\n /**\r\n * Function to delete custom added props\r\n */\r\n public deleteCustomProps(): void {\r\n const report: Report = this.reportData;\r\n report.businessScheduleDetail.businessScheduleDays.forEach(day => {\r\n delete day.daySectionExpanded;\r\n delete day.isbusinessDayArrangementsChanged;\r\n day.businessDaySectionHeaders.forEach(header => {\r\n delete header.isNewSection;\r\n delete header.sectionExpanded;\r\n delete header.sittingDay;\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Method to update and store non default sitting day with day template data\r\n * @param bsDayDate\r\n * @param day\r\n * @param templateId\r\n */\r\n private updateNonDefaultDayWithDayTemplate(bsDayDate: string, day: BusinessScheduleDay[], templateId: number, oldDayHeaders: BusinessScheduleDay): void {\r\n if (isEmpty(this.reportData)) {\r\n return;\r\n }\r\n\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (index === -1) {\r\n return;\r\n }\r\n\r\n // Update day start time, if it is blank template set Start time null\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayStartTime =\r\n !isEmpty(day) ?\r\n this.sharedService.convertDate(day[0].bsDayStartTime) : null;\r\n\r\n // Update day end time, if it is blank template set End time null\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayEndTime =\r\n !isEmpty(day) ?\r\n this.sharedService.convertDate(day[0].bsDayEndTime) : null;\r\n\r\n // Update day section headers\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders =\r\n !isEmpty(day) ? day[0].businessDaySectionHeaders : [];\r\n // Add missing property `businessDaySectionTypeId` required for BE when saving new templated day\r\n for (const header of this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders) {\r\n header.businessDaySectionTypeId = header.businessDaySectionType.bdSectionTypeId;\r\n }\r\n\r\n // Update day template id\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayTemplateId =\r\n !isEmpty(day) ? templateId : null;\r\n\r\n // Remove all day sections details\r\n Object.keys(SectionTypes).forEach(key => {\r\n delete this.reportData.businessScheduleDetail.businessScheduleDays[index][SectionTypes[key]];\r\n });\r\n\r\n // Populate day sections\r\n if (!isEmpty(day)) {\r\n this.populateDaySections(day[0].businessDaySectionHeaders, index);\r\n }\r\n\r\n if (!isEmpty(oldDayHeaders.businessDaySectionHeaders)) {\r\n this.populateOldDaySections(bsDayDate, oldDayHeaders.businessDaySectionHeaders);\r\n }\r\n\r\n this.emitReportUpdate();\r\n }\r\n\r\n /**\r\n * Method to recalculate bu\r\n * @param bsDayId\r\n * @param emitUpdate indicator to emit update\r\n */\r\n private recalculateBusinessDayEndTime(bsDayDate: string, emitUpdate = true) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n // Also skip days with no start time, becouse if there will be no start time it will apply Invalid date to End time\r\n if (index > -1 && !isEmpty(this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayStartTime)) {\r\n let endTime: any = moment.utc(this.sharedService.convertDate(this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayStartTime)).format();\r\n\r\n // Loop through businessDay section headers to calculate duration of each section to add to end time\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders.forEach(daySectionHeader => {\r\n if (daySectionHeader.bsSectionStartTime && daySectionHeader.bsSectionEndTime && daySectionHeader.businessDaySectionPositionNo !== null) {\r\n\r\n const timeDifference = this.sharedService.timeDifference(\r\n this.sharedService.getTimeFromDate(daySectionHeader.bsSectionStartTime),\r\n this.sharedService.getTimeFromDate(daySectionHeader.bsSectionEndTime)\r\n );\r\n const h = timeDifference.split(':')[0];\r\n const m = timeDifference.split(':')[1];\r\n endTime = moment.utc(endTime).add(m, 'minutes').add(h, 'hours').format();\r\n }\r\n });\r\n\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayEndTime = endTime;\r\n\r\n if (emitUpdate) {\r\n this.emitReportUpdate();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Method to get array index of businessDay in report businessScheduleDays array by bsDayDate\r\n * @param bsDayId\r\n */\r\n private getBusinessDayArrayElementIndexByDayDate(date: string): number {\r\n return findIndex(this.reportData.businessScheduleDetail.businessScheduleDays, ['bsDayDate', date]);\r\n }\r\n\r\n /**\r\n * Method to emit report data change\r\n */\r\n private emitReportUpdate(): void {\r\n this.reportDataChanged.next(this.reportData);\r\n }\r\n\r\n /**\r\n * Method to emit order of business report data change\r\n */\r\n private emitObReportUpdate(): void {\r\n this.reportObDataChanged.next(this.reportObData);\r\n }\r\n\r\n\r\n\r\n /**\r\n * Method to update sections header when section is updated\r\n * @param bsDayDate\r\n * @param sectionData\r\n */\r\n private updateExistingSectionHeader(\r\n bsDayDate: string,\r\n sectionData: BusinessDayCommonSectionDetail |\r\n BusinessDayLeadersQuestionsSectionDetail |\r\n BusinessDaySectionsPQOralDetail |\r\n BusinessDayMotionsWithoutDebateSectionDetail\r\n ): void {\r\n if (!isEmpty(this.reportData)) {\r\n const index = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n\r\n if (index > -1) {\r\n\r\n // Check if section id is same as header id\r\n const headerIndex = findIndex(this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders, ['bdSectionId', sectionData.businessDaySectionId]);\r\n\r\n if (headerIndex > -1) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders[headerIndex].bsSectionStartTime = sectionData.bsSectionStartTime;\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index].businessDaySectionHeaders[headerIndex].bsSectionEndTime = sectionData.bsSectionEndTime;\r\n }\r\n\r\n this.recalculateReportDaysTime();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Method to recalculate end time for all days and all day section start & end time\r\n * Since start time for all section is not editable it is taken from day's start time\r\n * And again since start time is not editable it means that it must be same as previous sections (that has it) end time\r\n * So we can kind of use 'chain' logic for each section with next one to update times\r\n * This method can be used both when section is updated or when day's start time is updated\r\n * @param emitUpdate flag to emit update\r\n */\r\n private recalculateReportDaysTime(emitUpdate = false): void {\r\n if (isEmpty(this.reportData)) {\r\n return;\r\n }\r\n this.reportData.businessScheduleDetail.businessScheduleDays.forEach(businessDay => {\r\n // Sort busines day header by position number\r\n businessDay.businessDaySectionHeaders = sortBy(businessDay.businessDaySectionHeaders, ['businessDaySectionPositionNo']);\r\n\r\n businessDay.businessDaySectionHeaders.forEach((header, i) => {\r\n\r\n // Skip headers with no time and disabled headers\r\n if (header.bsSectionStartTime && header.bsSectionEndTime && header.businessDaySectionPositionNo !== null) {\r\n\r\n // Take all headers from beginning till current header and reverse list\r\n const previousLastHeaderWithEndTime = findLast(takeLodash(businessDay.businessDaySectionHeaders, i), (element) => !!element.bsSectionEndTime);\r\n\r\n // Calculate existing time difference for current header\r\n const duration = this.calculateDurationTime(header.bsSectionStartTime, header.bsSectionEndTime);\r\n\r\n this.assignHeaderSectionDuration(header, previousLastHeaderWithEndTime, businessDay, duration);\r\n }\r\n\r\n });\r\n\r\n // Update end time for day\r\n this.recalculateBusinessDayEndTime(businessDay.bsDayDate, false);\r\n\r\n });\r\n\r\n if (emitUpdate) {\r\n this.emitReportUpdate();\r\n }\r\n }\r\n\r\n /**\r\n * Method to calculate duration between two dates\r\n * @param start ISO date\r\n * @param end ISO date\r\n */\r\n private calculateDurationTime(start: string, end: string): string {\r\n start = moment(this.sharedService.convertDate(start)).utc().format(GLOBALS.timeFormat);\r\n end = moment(this.sharedService.convertDate(end)).utc().format(GLOBALS.timeFormat);\r\n const minutes = moment(end, GLOBALS.timeFormat).diff(moment(start, GLOBALS.timeFormat), 'minutes', true);\r\n const durationHours = minutes / 60;\r\n const durationMinutes = minutes % 60;\r\n return moment.utc().hours(durationHours).minutes(durationMinutes).format(GLOBALS.timeFormat);\r\n }\r\n\r\n /**\r\n * Method to add duration to date time\r\n * @param date as ISO\r\n * @param duration as HH:MM\r\n */\r\n private addDurationToDateTime(date: string, duration: string): string {\r\n date = this.sharedService.convertDate(date);\r\n const hoursToMinutes = moment.duration(duration).asMinutes();\r\n\r\n return moment.utc(date).add(hoursToMinutes, 'minutes').format();\r\n }\r\n\r\n private updateDaySectionData(sectionIndex: number, dayIndex: number, daySectionTemplateId: number, sectionData: any): void {\r\n if (sectionIndex > -1) {\r\n // If exists overwriting data\r\n this.reportData.businessScheduleDetail.businessScheduleDays[dayIndex][SectionTypes[daySectionTemplateId]][sectionIndex] =\r\n this.sharedService.cleanObjectNullValue(sectionData);\r\n } else {\r\n // Checking if array exists\r\n if (!isArray(this.reportData.businessScheduleDetail.businessScheduleDays[dayIndex][SectionTypes[daySectionTemplateId]])) {\r\n // If array not exists creating array with section\r\n this.reportData.businessScheduleDetail.businessScheduleDays[dayIndex][SectionTypes[daySectionTemplateId]] =\r\n [this.sharedService.cleanObjectNullValue(sectionData)];\r\n } else {\r\n // If array exists pushing new section data\r\n this.reportData.businessScheduleDetail.businessScheduleDays[dayIndex][SectionTypes[daySectionTemplateId]].push(\r\n this.sharedService.cleanObjectNullValue(sectionData));\r\n }\r\n }\r\n }\r\n\r\n private populateDaySections(businessDaySectionHeaders: BusinessDaySectionHeader[], index: number): void {\r\n businessDaySectionHeaders.forEach(header => {\r\n const randomSectionId = this.sharedService.generateId();\r\n const hasStartEndTime = (!isEmpty(header.bsSectionStartTime) && !isEmpty(header.bsSectionEndTime));\r\n const duration = hasStartEndTime ? this.calculateDurationTime(header.bsSectionStartTime, header.bsSectionEndTime) : 0;\r\n header.bdSectionId = randomSectionId;\r\n header.businessDaySectionTypeId = header.businessDaySectionType.bdSectionTypeId;\r\n const sectionTemplate = {\r\n businessScheduleDayId: this.reportData.businessScheduleDetail.businessScheduleDays[index].bsDayId,\r\n businessDaySectionId: randomSectionId,\r\n bsSectionStartTime: this.sharedService.convertDate(header.bsSectionStartTime),\r\n bsSectionEndTime: this.sharedService.convertDate(header.bsSectionEndTime),\r\n businessDaySectionDuration: duration,\r\n businessDaySectionTemplateId: header.businessDaySectionType.bdSectionTypeId,\r\n businessDaySectionTitle: header.bsDaySectionTitle,\r\n businessDaySectionTypeId: header.businessDaySectionType.bdSectionTypeId,\r\n businessDaySectionPositionNo: header.businessDaySectionPositionNo,\r\n };\r\n if (header.businessDaySectionType && header.businessDaySectionType.bdSectionTypeId) {\r\n if (!isArray(this.reportData.businessScheduleDetail.businessScheduleDays[index]\r\n [SectionTypes[header.businessDaySectionType.bdSectionTypeId]])) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index]\r\n [SectionTypes[header.businessDaySectionType.bdSectionTypeId]] = [sectionTemplate];\r\n } else {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[index]\r\n [SectionTypes[header.businessDaySectionType.bdSectionTypeId]].push(sectionTemplate);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private populateOldDaySections(bsDayDate: string, oldBusinessDaySectionHeaders: BusinessDaySectionHeader[]): void {\r\n const indexOfday = this.getBusinessDayArrayElementIndexByDayDate(bsDayDate);\r\n if (indexOfday === -1) {\r\n return;\r\n }\r\n oldBusinessDaySectionHeaders.forEach((item: any) => {\r\n if (typeof item.bdSectionId !== 'string') {\r\n if (isEmpty(this.reportData.businessScheduleDetail.businessScheduleDays[indexOfday].deletedSections)) {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[indexOfday].deletedSections = [item.bdSectionId];\r\n } else {\r\n this.reportData.businessScheduleDetail.businessScheduleDays[indexOfday].deletedSections.push(item.bdSectionId);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private assignHeaderSectionDuration(\r\n header: BusinessDaySectionHeader,\r\n previousLastHeaderWithEndTime: BusinessDaySectionHeader,\r\n businessDay: BusinessScheduleDay,\r\n duration: string\r\n ): void {\r\n // Align start time with last previous end time or use the start time of the day\r\n header.bsSectionStartTime = !isEmpty(previousLastHeaderWithEndTime) ? previousLastHeaderWithEndTime.bsSectionEndTime : businessDay.bsDayStartTime;\r\n\r\n // Recalculate end time by adding duration to new start time\r\n header.bsSectionEndTime = this.addDurationToDateTime(header.bsSectionStartTime, duration);\r\n\r\n const sectionTypeId = header.businessDaySectionType.bdSectionTypeId || header.businessDaySectionTypeId;\r\n\r\n // Check if section data exists and update it\r\n if (!isEmpty(businessDay[SectionTypes[sectionTypeId]])) {\r\n const sectionIndex = findIndex(businessDay[SectionTypes[sectionTypeId]], ['businessDaySectionId', header.bdSectionId]);\r\n if (sectionIndex > -1) {\r\n businessDay[SectionTypes[sectionTypeId]][sectionIndex].bsSectionStartTime = header.bsSectionStartTime;\r\n businessDay[SectionTypes[sectionTypeId]][sectionIndex].bsSectionEndTime = header.bsSectionEndTime;\r\n businessDay[SectionTypes[sectionTypeId]][sectionIndex].businessDaySectionDuration = duration;\r\n }\r\n }\r\n }\r\n}\r\n","import { CKEditorToolbarItems, OirCkEditorConfig } from \"proceduralsystem-ckeditor\";\r\n\r\ninterface localCKEditorConfig extends OirCkEditorConfig {\r\n toolbar: {\r\n items: Array\r\n };\r\n fontSize: {\r\n options: Array\r\n } | undefined;\r\n title: string | undefined;\r\n}\r\n\r\nexport const EditorConfig: localCKEditorConfig = {\r\n toolbar: {\r\n items: [\r\n CKEditorToolbarItems.Bold,\r\n CKEditorToolbarItems.Italic,\r\n CKEditorToolbarItems.Underline,\r\n CKEditorToolbarItems.Strikethrough,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.NumberedList,\r\n CKEditorToolbarItems.BulletedList,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.Outdent,\r\n CKEditorToolbarItems.Indent,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.Alignment,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.Heading,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.FontFamily,\r\n CKEditorToolbarItems.FontSize,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.SpecialCharacters,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.FontColor,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.FullScreen,\r\n CKEditorToolbarItems.SEPARATOR,\r\n CKEditorToolbarItems.Table,\r\n CKEditorToolbarItems.RemoveFormat\r\n ]\r\n },\r\n fontSize: {\r\n options: ['default', 8, 9, 10, 111, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72]\r\n },\r\n removePlugins: ['Title', 'Markdown', 'Image', 'ImageToolbar', 'ImageCaption', 'ImageStyle', 'ImageResize', 'LinkImage', 'Heading'],\r\n placeholder: '',\r\n title: '',\r\n licenseKey: ''\r\n}\r\n\r\nexport interface OirCkEditorInstance {\r\n elementRef: {\r\n nativeElement: HTMLElement\r\n }\r\n}","import {AfterViewInit, ChangeDetectorRef, Component, Inject, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren} from '@angular/core';\r\nimport {NavigationService, OverlayService, ToastNotificationsService} from 'proceduralsystem-clientcomponents';\r\nimport {ActivatedRoute, Router} from '@angular/router';\r\nimport {UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';\r\nimport * as moment from 'moment';\r\nimport {extendMoment} from 'moment-range';\r\nimport {last, switchMap, take, takeUntil} from 'rxjs/operators';\r\nimport {ReportService} from '../services/report.service';\r\nimport {DatePickerCustomComponent} from './../shared/components/datepicker-custom/datepicker-custom.component';\r\nimport {GLOBALS} from '../shared/globals';\r\nimport {BusinessDayCommonSectionDetail, BusinessScheduleDay, ConcurrentUser, Report} from '../shared/models/report.model';\r\nimport {ReportStoreService} from '../services/report-store.service';\r\nimport {SharedService} from '../services/shared.service';\r\nimport {ArrangementTypes, FileExtensionType, FormTemplate, ReportStatuses, SectionTypes, TabIndexes} from '../shared/report.enum';\r\nimport {concat, Observable, Subject} from 'rxjs';\r\nimport {cloneDeep, compact, isEmpty} from 'lodash-es';\r\nimport {DayInstanceComponent} from './day-instance/day-instance.component';\r\nimport {CirculateBcrModalComponent} from './modals/circulate-bcr-modal/circulate-bcr-modal.component';\r\nimport {ActionBarEmailModalComponent} from './modals/action-bar-email-modal/action-bar-email-modal.component';\r\nimport {CancelConfirmModalComponent} from '../create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\nimport {TranslateService} from '@ngx-translate/core';\r\nimport {AppConfigService} from '../services/app-config.service';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport OirCkEditor from 'proceduralsystem-ckeditor';\r\nimport { OirCkEditorConfig } from 'proceduralsystem-ckeditor';\r\nimport { EditorConfig } from '../shared/models/editor-config.model';\r\n\r\n@Component({\r\n selector: \"oir-view-report\",\r\n templateUrl: \"./view-report.component.html\",\r\n styleUrls: [\"./view-report.component.less\"],\r\n})\r\nexport class ViewReportComponent implements OnInit, OnDestroy, AfterViewInit {\r\n @ViewChild(\"ckEditor\") ckEditor: any;\r\n\r\n public observer: MutationObserver;\r\n public exsistingDates: Array = [];\r\n public newDates: Array = [];\r\n public daysOfWeek: Array = [];\r\n public startDate;\r\n public defaultHeader: string;\r\n public endDate;\r\n public selectedRange: string;\r\n public fallbackDate: string;\r\n public isReadOnly = false;\r\n public isEditModeDate = false;\r\n public isEditModeDayTemplate = false;\r\n public day: BusinessScheduleDay;\r\n public dateChanged = false;\r\n public report;\r\n public rangeForm: UntypedFormGroup;\r\n public noteForm: UntypedFormGroup = new UntypedFormGroup({\r\n note: new UntypedFormControl(\"\"),\r\n });\r\n public dayInstance: UntypedFormGroup;\r\n public iterableDiff;\r\n public weekDays: string;\r\n public dayCount: number;\r\n public reportStatusId: number;\r\n public preselectDates = true;\r\n public dateRange = true;\r\n public invalidInputDate = false;\r\n public textWithHTML: string;\r\n public textStripped: string;\r\n public disableConfirm = false;\r\n public revisedBcrNumber: string;\r\n public updateBcrString: string;\r\n public ReportStatuses = ReportStatuses;\r\n public reportTitle: string;\r\n public reportNote: string;\r\n public reportVersion: number;\r\n\r\n private currentWeek: number;\r\n private deletedDays = [];\r\n private documentId: string;\r\n private dateText: string;\r\n private dayText: string;\r\n private ngUnsubscribe = new Subject();\r\n private hasReportLoaded = false;\r\n private userEdits: string;\r\n private userName: string;\r\n private window: Window;\r\n public isReportOutdated: boolean\r\n\r\n Editor = OirCkEditor;\r\n ckEditorConfig: OirCkEditorConfig;\r\n\r\n public recursiveLimit = 0;\r\n\r\n @ViewChild(\"reportDatesRange\") reportDatesRange: DatePickerCustomComponent;\r\n @ViewChildren(\"dayInstanceComponent\")\r\n dayInstanceComponents: QueryList;\r\n @ViewChild(\"circulateBcrModalComponent\")\r\n circulateBcrModalComponent: CirculateBcrModalComponent;\r\n @ViewChild(\"actionBarEmailModalComponent\")\r\n actionbarEmailModalComponent: ActionBarEmailModalComponent;\r\n @ViewChild(\"cancelConfirmModalComponent\")\r\n cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private navigationService: NavigationService,\r\n private reportService: ReportService,\r\n private route: ActivatedRoute,\r\n private reportStore: ReportStoreService,\r\n private router: Router,\r\n private sharedService: SharedService,\r\n private toastService: ToastNotificationsService,\r\n private appConfigService: AppConfigService,\r\n private changeDetectorRef: ChangeDetectorRef,\r\n private overlayService: OverlayService,\r\n private configurationService: AppConfigService,\r\n @Inject(DOCUMENT) private document: Document\r\n ) {\r\n this.window = this.document.defaultView;\r\n this.ckEditorConfig = {\r\n ...EditorConfig,\r\n licenseKey: this.configurationService.getValue('CKEditor5LicenseKey')\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n // Getting current document id\r\n this.documentId = this.route.snapshot.paramMap.get(\"documentId\");\r\n\r\n // Calling API to get Days of the week\r\n this.reportService\r\n .getDayOfTheWeek()\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n for (const day of res) {\r\n this.daysOfWeek.push(day.dayId);\r\n }\r\n });\r\n\r\n // Calling API to get Party data\r\n this.reportService\r\n .getParties()\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.reportService.partiesData(res);\r\n });\r\n\r\n // Calling API to get Departments data\r\n this.reportService\r\n .getDepartments()\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.reportService.departmentsData(res);\r\n });\r\n\r\n // Calling API to get Arrangements section data\r\n this.reportService\r\n .getArrangements(ArrangementTypes.Section)\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.reportService.sectionArrangementData(res);\r\n });\r\n\r\n // Calling API to get Arrangements day data\r\n this.reportService\r\n .getArrangements(ArrangementTypes.Day)\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.reportService.dayArrangementData(res);\r\n });\r\n\r\n // Calling API to get Arrangements work items data\r\n this.reportService\r\n .getArrangements(ArrangementTypes.WorkItem)\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.reportService.workItemArrangementData(res);\r\n });\r\n\r\n // Calling API to get Members data\r\n this.reportService\r\n .getMembers()\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.reportService.membersData(res);\r\n });\r\n\r\n // Calling API to get Section type data\r\n this.reportService\r\n .getSectionTypes()\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.reportService.getSectionTypesData(res);\r\n });\r\n\r\n // Subscribe to report data change in report store service\r\n this.reportStore.reportData$\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe((report) => {\r\n this.report = cloneDeep(report);\r\n if (report) {\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n if (!this.hasReportLoaded) {\r\n this.hasReportLoaded = true;\r\n this.populateReportView();\r\n this.isOutdated()\r\n\r\n // Deployed version sometimes having overlay stucked.\r\n if (this.overlayService.model.value === true) {\r\n setTimeout(() => this.overlayService.hide(true), 100);\r\n }\r\n }\r\n });\r\n\r\n this.appConfigService\r\n .get(\"UserName\")\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe((userName) => {\r\n this.userName = userName;\r\n });\r\n\r\n this.reportService.titleTranslationRequested\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe((requestDetails) => {\r\n const { data, isSaveRequiredBeforeTranslation } = requestDetails;\r\n\r\n if (!data) {\r\n return;\r\n }\r\n\r\n if (isSaveRequiredBeforeTranslation) {\r\n let unsavedSection;\r\n\r\n this.report.businessScheduleDetail.businessScheduleDays.forEach(\r\n (day) => {\r\n const foundSection =\r\n day.businessDayCustomSectionDetails &&\r\n day.businessDayCustomSectionDetails.find(\r\n (section) => section.businessDaySectionId === data.id\r\n );\r\n\r\n if (foundSection) {\r\n unsavedSection = foundSection;\r\n }\r\n }\r\n );\r\n\r\n const adjustedReport = this.getAdjustedReportToPost();\r\n\r\n concat(\r\n this.reportService.postReport(this.documentId, adjustedReport),\r\n this.reportService.getReport(this.documentId)\r\n )\r\n .pipe(\r\n take(2),\r\n last(),\r\n switchMap((report: Report) => {\r\n this.reportStore.setReportData(report);\r\n\r\n if (unsavedSection) {\r\n const expectedStartTime = moment\r\n .utc(unsavedSection.bsSectionStartTime)\r\n .format(\"DD/MM/YYYY HH:mm:ss\");\r\n const expectedEndTime = moment\r\n .utc(unsavedSection.bsSectionEndTime)\r\n .format(\"DD/MM/YYYY HH:mm:ss\");\r\n\r\n report.businessScheduleDetail.businessScheduleDays.forEach(\r\n (day) => {\r\n const foundSection = day.businessDaySectionHeaders.find(\r\n (header) =>\r\n header.bsSectionStartTime === expectedStartTime &&\r\n header.bsSectionEndTime === expectedEndTime\r\n );\r\n\r\n if (foundSection) {\r\n data.id = foundSection.bdSectionId;\r\n this.reportStore.setDayAndSectionExpanded(\r\n day.bsDayId,\r\n foundSection.bdSectionId as number,\r\n true\r\n );\r\n }\r\n }\r\n );\r\n }\r\n\r\n return !!data.dueDate\r\n ? this.reportService.requestTitleTranslation(data)\r\n : this.reportService.requestTitleTranslationWithdraw(data);\r\n })\r\n )\r\n .subscribe((isSuccess: boolean) =>\r\n this.titleTranslationSuccess(isSuccess, !data.dueDate)\r\n );\r\n } else if (!!data.dueDate) {\r\n this.reportService\r\n .requestTitleTranslation(data)\r\n .pipe(take(1))\r\n .subscribe((isSuccess: boolean) =>\r\n this.titleTranslationSuccess(isSuccess)\r\n );\r\n } else {\r\n this.reportService\r\n .requestTitleTranslationWithdraw(data)\r\n .pipe(take(1))\r\n .subscribe((isSuccess: boolean) =>\r\n this.titleTranslationSuccess(isSuccess, true)\r\n );\r\n }\r\n });\r\n this.rangeForm = new UntypedFormGroup({\r\n reportDatesRange: new UntypedFormControl(\r\n this.selectedRange,\r\n Validators.required\r\n ),\r\n });\r\n }\r\n\r\n ngOnChanges() {\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n // Calling API to get report\r\n this.reportService\r\n .getReport(this.documentId)\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n this.reportStore.setReportData(res);\r\n // Subscribe to get activated route queryParams\r\n this.route.queryParams\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe((params) => {\r\n // If params exsist\r\n if (!isEmpty(params)) {\r\n const bsDayId = parseInt(params.bsDayId, 10);\r\n const bsSectionId = parseInt(params.bsSectionId, 10);\r\n this.reportStore.setDayAndSectionExpanded(\r\n bsDayId,\r\n bsSectionId,\r\n true\r\n );\r\n // Scroll to opened section\r\n setTimeout(() => document.getElementById(params.bsSectionId).scrollIntoView(), 200);\r\n\r\n this.observeChanges();\r\n }\r\n });\r\n });\r\n }\r\n\r\n onReady() {\r\n setTimeout(() => {\r\n if (\r\n this.window &&\r\n this.window[0] &&\r\n this.defaultHeader &&\r\n this.recursiveLimit <= GLOBALS.recursiveMaxLimit\r\n ) {\r\n this.window[0].document.getElementsByTagName(\r\n \"body\"\r\n )[0].style.textAlign = \"center\";\r\n this.window[0].document.getElementsByTagName(\r\n \"body\"\r\n )[0].style.fontFamily = \"'Montserrat-Regular', sans-serif\";\r\n this.window[0].document.getElementsByTagName(\"body\")[0].style.fontSize =\r\n \"15px\";\r\n this.window[0].document.getElementsByTagName(\r\n \"body\"\r\n )[0].style.lineHeight = \"20px\";\r\n this.window[0].document.getElementsByTagName(\"body\")[0].style.color =\r\n \"rgb(68, 68, 68)\";\r\n } else {\r\n setTimeout(() => {\r\n this.recursiveLimit++;\r\n this.onReady();\r\n }, 1000);\r\n }\r\n }, 1000);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.clearNavigation();\r\n if (this.observer) {\r\n this.observer.disconnect();\r\n }\r\n this.reportStore.clearData();\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Method to trigger cancelConfirmModal when accordion close toggle occurs\r\n */\r\n public onCancel(): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Method to hande cancelConfirmModal response\r\n * @param event Event\r\n */\r\n public cancelModalDecision(event): void {\r\n if (event) {\r\n this.cancelEditing();\r\n }\r\n }\r\n\r\n /**\r\n * Function to check Day instance form validity\r\n */\r\n public isDayInstanceFormValid(): boolean {\r\n let hasForms = false;\r\n let formValid = true;\r\n if (this.dayInstanceComponents) {\r\n this.dayInstanceComponents.toArray().forEach((dayInstanceComponent) => {\r\n if (dayInstanceComponent.dayInstanceForm) {\r\n hasForms = true;\r\n formValid = dayInstanceComponent.dayInstanceForm.invalid\r\n ? false\r\n : formValid;\r\n }\r\n });\r\n }\r\n return hasForms ? formValid : false;\r\n }\r\n\r\n /**\r\n * Function to check is user able to circulate report\r\n */\r\n public canCirculate(): boolean {\r\n let formValid = false;\r\n\r\n if (!this.dayInstanceComponents) {\r\n return formValid;\r\n }\r\n\r\n for (const dayInstance of this.dayInstanceComponents.toArray()) {\r\n formValid =\r\n !dayInstance.dayInstanceForm.controls.sittingDay.value &&\r\n !dayInstance.dayInstanceForm.invalid;\r\n\r\n if (dayInstance.dayInstanceForm.controls.sittingDay.value) {\r\n if (isEmpty(this.reportStore.isSectionFormsValid())) {\r\n continue;\r\n }\r\n formValid = this.areSectionFormsValid();\r\n }\r\n\r\n if (!formValid) {\r\n break;\r\n }\r\n }\r\n return this.isDayInstanceFormValid() && formValid;\r\n }\r\n\r\n private areSectionFormsValid(): boolean {\r\n let formValid = true;\r\n for (const headers of this.reportStore.isSectionFormsValid()) {\r\n if (\r\n !headers.isDataValid &&\r\n headers.businessDaySectionPositionNo !== null &&\r\n headers.sittingDay\r\n ) {\r\n formValid = false;\r\n break;\r\n }\r\n }\r\n return formValid;\r\n }\r\n\r\n public isOutdated() {\r\n const reportLastDay = moment(this.report.businessScheduleDetail.bsDetailLastDay, 'DD/MM/YYYY')\r\n const today = moment()\r\n this.isReportOutdated = today.isAfter(reportLastDay, 'day')\r\n }\r\n\r\n /**\r\n * Check if length of text is under or equal to 1000 characters\r\n */\r\n public checkMaxChars(event): any {\r\n const length = event.target.innerHTML\r\n ? event.target.innerHTML\r\n .replace(/<\\/?[^>]+(>|$)/g, \"\")\r\n .replace(/[Â↵\\n]/g, \"\")\r\n .length\r\n : 0;\r\n if (\r\n length !== 0 &&\r\n length >= 1000 &&\r\n event.keyCode !== 46 &&\r\n event.keyCode !== 8 &&\r\n event.keyCode !== 37 &&\r\n event.keyCode !== 39\r\n ) {\r\n event.preventDefault();\r\n } else {\r\n setTimeout(() => {\r\n this.reportStore.reportData.reportHeader = this.defaultHeader;\r\n }, 100);\r\n }\r\n }\r\n\r\n public checkNoteChars(event): void {\r\n const length = event.target.innerHTML\r\n .replace(/<\\/?[^>]+(>|$)/g, \"\")\r\n .replace(/[Â↵\\n]/g, \"\")\r\n .length;\r\n if (\r\n length !== 0 &&\r\n length >= 3000 &&\r\n event.keyCode !== 46 &&\r\n event.keyCode !== 8 &&\r\n event.keyCode !== 37 &&\r\n event.keyCode !== 39\r\n ) {\r\n event.preventDefault();\r\n } else {\r\n setTimeout(() => {\r\n this.reportStore.reportData.reportNote =\r\n this.noteForm.controls.note.value;\r\n }, 100);\r\n }\r\n }\r\n\r\n /**\r\n * Force blur event to preselect days (need client component fixes)\r\n */\r\n public preselectDays(): void {\r\n if (this.preselectDates) {\r\n this.reportDatesRange.onBlur(\r\n document.querySelector(`.reportDatesRange .datepicker`)\r\n );\r\n this.preselectDates = !this.preselectDates;\r\n }\r\n setTimeout(() => {\r\n document.querySelector(\".calender-navigate\").classList.add(\"disabled\");\r\n }, 1);\r\n }\r\n\r\n /**\r\n * Disable create draft button\r\n */\r\n public disableConfirmButton(event: any): void {\r\n this.disableConfirm = event.selectingRange;\r\n }\r\n\r\n /**\r\n * Function to convert date\r\n * @param date date variable\r\n */\r\n public convertDate(date: string) {\r\n return this.sharedService.convertDate(date);\r\n }\r\n\r\n /**\r\n * Event emmiter on date change\r\n */\r\n public dateRangeChanged(date): void {\r\n if (date) {\r\n const dates = date.split(\" - \");\r\n this.startDate = dates[0];\r\n this.endDate = dates[1] ? dates[1] : dates[0];\r\n this.selectedRange =\r\n this.startDate + (this.dateRange ? \" - \" + this.endDate : \"\");\r\n this.rangeForm.get(\"reportDatesRange\").clearValidators();\r\n this.rangeForm.get(\"reportDatesRange\").updateValueAndValidity();\r\n this.getReportDates(this.startDate, this.endDate);\r\n this.onReady();\r\n }\r\n }\r\n\r\n public getReportNotes(): string {\r\n return this.noteForm.controls.note.value;\r\n }\r\n\r\n /**\r\n * Function to save report\r\n */\r\n public postReports(): void {\r\n const report = this.getAdjustedReportToPost();\r\n\r\n if (\r\n this.reportStatusId === ReportStatuses.Circulated ||\r\n this.reportStatusId === ReportStatuses.Update\r\n ) {\r\n this.saveReport(\r\n report,\r\n this.reportService.circulatedDraft(this.documentId, report)\r\n );\r\n } else {\r\n this.saveReport(\r\n report,\r\n this.reportService.postReport(this.documentId, report)\r\n );\r\n }\r\n }\r\n\r\n private getAdjustedReportToPost(): Report {\r\n const report = this.reportStore.getReportData();\r\n this.reportStore.deleteCustomProps();\r\n report.reportHeader = this.defaultHeader;\r\n report.reportNote = this.noteForm.controls.note.value;\r\n\r\n report.businessScheduleDetail.businessScheduleDays.forEach(\r\n (e: BusinessScheduleDay) => {\r\n this.updateWorkitemPositions(\r\n e[SectionTypes[FormTemplate.governmentBusiness]]\r\n );\r\n this.updateWorkitemPositions(\r\n e[SectionTypes[FormTemplate.billsForIntroduction]]\r\n );\r\n this.updateWorkitemPositions(\r\n e[SectionTypes[FormTemplate.referralToCommittee]]\r\n );\r\n this.updateWorkitemPositions(\r\n e[SectionTypes[FormTemplate.deferredDivisions]]\r\n );\r\n }\r\n );\r\n\r\n return report;\r\n }\r\n\r\n /**\r\n * Function to save report\r\n * @param report report\r\n * @param apiURL Api url\r\n */\r\n public saveReport(report: Report, apiURL: Observable): void {\r\n apiURL.pipe(take(1)).subscribe(() => {\r\n const title = this.translateService.instant(\r\n \"TOAST.SAVE_REPORT_DRAFT.TITLE\"\r\n );\r\n const description = this.translateService.instant(\r\n \"TOAST.SAVE_REPORT_DRAFT.BODY\",\r\n this.dateRange\r\n ? [\r\n `${moment\r\n .utc(report.businessScheduleDetail.bsDetailFirstDay)\r\n .format(GLOBALS.dateFormat)} -\r\n ${moment\r\n .utc(report.businessScheduleDetail.bsDetailLastDay)\r\n .format(GLOBALS.dateFormat)}`,\r\n ]\r\n : [\r\n `${moment\r\n .utc(report.businessScheduleDetail.bsDetailFirstDay)\r\n .format(GLOBALS.dateFormat)}`,\r\n ]\r\n );\r\n\r\n this.toastService.addNotification({ title, description });\r\n this.deletedDays = [];\r\n this.router.navigate([\"/dashboard\"]);\r\n this.reportService.onSaveAsDraft(true, TabIndexes.Draft);\r\n });\r\n }\r\n\r\n /**\r\n * Function whitch on date change check if days exist\r\n * If exsist exsisting days stays new days is added\r\n * If not exsist in selected date range day's are removed\r\n */\r\n public checkDays(): void {\r\n const report: Report = this.reportStore.getReportData();\r\n const date = this.getSelectedDateString();\r\n\r\n this.initNavigation(date);\r\n this.isEditModeDate = false;\r\n this.reportService.isEditMode(false);\r\n let reportDays;\r\n const reportDaysOrig = report.businessScheduleDetail.businessScheduleDays;\r\n\r\n const reportDaysCompare = [];\r\n reportDaysOrig.forEach((element) => {\r\n reportDaysCompare.push(element.bsDayDate);\r\n });\r\n\r\n const selectedDates = this.getSelectedDate();\r\n const diffDays = this.sharedService.compareDaysArrays(\r\n reportDaysCompare,\r\n selectedDates\r\n );\r\n\r\n const newDatesIso = this.newDates.map((x) => moment.utc(x).format());\r\n\r\n if (diffDays.length > 0) {\r\n reportDays = [];\r\n for (let x of newDatesIso) {\r\n if (!reportDaysOrig.find((y) => y.bsDayDate === x)) {\r\n const day = moment(x).day();\r\n if (this.sharedService.isDayDefaultSittinDayByDate(x)) {\r\n this.reportService\r\n .getDefaultBusinessDayTemplate(x, day)\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n res[0].bsDayDate = x;\r\n reportDays.push(res[0]);\r\n this.report.businessScheduleDetail.businessScheduleDays =\r\n reportDays;\r\n this.reportStore.setReportData(this.report);\r\n this.reportStore.setDefaultDaySection(res[0]);\r\n });\r\n } else {\r\n reportDays.push(this.addNewDay(x, true));\r\n }\r\n continue;\r\n }\r\n reportDays.push(reportDaysOrig.find((y) => y.bsDayDate === x));\r\n }\r\n\r\n reportDaysOrig.forEach((day) => {\r\n if (diffDays.indexOf(day.bsDayDate) !== -1 && day.bsDayId !== 0) {\r\n return this.deletedDays.push(day.bsDayId);\r\n }\r\n });\r\n } else {\r\n reportDays = report.businessScheduleDetail.businessScheduleDays;\r\n }\r\n\r\n this.dateChanged = true;\r\n this.fallbackDate = this.selectedRange;\r\n\r\n this.report.businessScheduleDetail.businessScheduleDays = reportDays;\r\n this.report.businessScheduleDetail.deletedDays = this.deletedDays;\r\n this.report.reportHeader = this.defaultHeader;\r\n delete this.report.reportId;\r\n\r\n if (!this.dateRange) {\r\n this.defaultEditorText(this.startDate, this.endDate);\r\n }\r\n this.reportStore.setReportData(this.report);\r\n this.onReady();\r\n }\r\n\r\n /**\r\n * Call service to get PDF preview of report\r\n */\r\n public generatePrintPreview(): void {\r\n this.reportService\r\n .generatePrintPreview(this.report.reportId)\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n const file: Blob = new Blob([res], { type: \"application/pdf\" });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(file);\r\n } else {\r\n const fileURL: string = URL.createObjectURL(file);\r\n window.open(fileURL);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Call service to get MSWord preview of report\r\n */\r\n public generateWordPreview(): void {\r\n const MSWORD_CONTENT_TYPE =\r\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\r\n this.reportService\r\n .generatePrintPreview(this.report.reportId, FileExtensionType.BcrDocx)\r\n .pipe(take(1))\r\n .subscribe((res) => {\r\n console.log(\"Response:\", res);\r\n const filename = res.headers\r\n .get(\"Content-Disposition\")\r\n .split(\";\")[1]\r\n .trim()\r\n .split(\"=\")[1]\r\n .replace(/\"/g, \"\");\r\n const file: Blob = new Blob([res.body], {\r\n type: MSWORD_CONTENT_TYPE,\r\n });\r\n const link = document.createElement(\"a\");\r\n link.download = filename;\r\n link.href = URL.createObjectURL(file);\r\n link.target = \"_blank\";\r\n link.click();\r\n });\r\n }\r\n\r\n /**\r\n * Get all dates in selected range as date ISO strings\r\n * @param startDate - start date\r\n * @param endDate - end date\r\n */\r\n private getDatesInRange(startDate: string, endDate: string): string[] {\r\n const dates = [] as string[];\r\n const convertedStartDate = startDate.split(\"/\").reverse().join(\"-\");\r\n const convertedEndDate = endDate.split(\"/\").reverse().join(\"-\");\r\n const currDate = moment.utc(startDate, GLOBALS.dateFormat).startOf(\"day\");\r\n const lastDate = moment.utc(endDate, GLOBALS.dateFormat).startOf(\"day\");\r\n\r\n dates.push(moment.utc(convertedStartDate).format());\r\n while (currDate.add(1, \"days\").diff(lastDate) < 0) {\r\n dates.push(moment.utc(currDate.clone()).format());\r\n }\r\n dates.push(moment.utc(convertedEndDate).format());\r\n\r\n return dates;\r\n }\r\n\r\n /**\r\n * Validate dates based on user input\r\n */\r\n public validateDates(enteredDates: any): void {\r\n let dates;\r\n if (enteredDates) {\r\n if (enteredDates.target) {\r\n dates = enteredDates.target.value.split(\"-\");\r\n } else {\r\n dates = enteredDates.split(\"-\");\r\n }\r\n } else {\r\n dates = this.selectedRange;\r\n }\r\n\r\n this.invalidInputDate = this.sharedService.validateDates(\r\n dates,\r\n this.currentWeek,\r\n this.dateRange\r\n );\r\n\r\n if (!this.invalidInputDate) {\r\n this.startDate = dates[0];\r\n this.endDate = dates[1] ? dates[1] : dates[0];\r\n this.defaultEditorText(this.startDate, this.endDate);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Function to enable edit mode\r\n */\r\n public editMode(): void {\r\n this.isEditModeDate = true;\r\n this.isEditModeDayTemplate = true;\r\n this.reportService.isEditMode(true);\r\n setTimeout(() => {\r\n this.rangeForm.get(\"reportDatesRange\").setValidators(Validators.required);\r\n this.rangeForm\r\n .get(\"reportDatesRange\")\r\n .patchValue(this.startDate + \" - \" + this.endDate);\r\n this.rangeForm.get(\"reportDatesRange\").updateValueAndValidity();\r\n }, 50);\r\n }\r\n\r\n /**\r\n * Cancel editing draft and return to dashboard\r\n */\r\n public cancelEditing() {\r\n const title =\r\n this.reportStatusId === ReportStatuses.Circulated\r\n ? this.translateService.instant(\"TOAST.CANCEL_REPORT_CIRCULATED.TITLE\")\r\n : this.translateService.instant(\"TOAST.CANCEL_REPORT_DRAFT.TITLE\");\r\n const description =\r\n this.reportStatusId === ReportStatuses.Circulated\r\n ? this.translateService.instant(\"TOAST.CANCEL_REPORT_CIRCULATED.BODY\")\r\n : this.translateService.instant(\"TOAST.CANCEL_REPORT_DRAFT.BODY\");\r\n this.toastService.addNotification({ title, description });\r\n this.router.navigate([\"/dashboard\"]);\r\n }\r\n\r\n /**\r\n * Function to cancel date editing\r\n */\r\n public editDatesCancel(): void {\r\n this.isEditModeDate = false;\r\n this.reportService.isEditMode(false);\r\n const dates = this.fallbackDate.split(\" - \");\r\n this.startDate = dates[0];\r\n this.selectedRange = this.fallbackDate;\r\n this.endDate = !!dates[1] ? dates[1] : dates[0];\r\n this.validateDates(this.selectedRange);\r\n this.preselectDates = !this.preselectDates;\r\n this.defaultHeader = this.reportStore.reportData.reportHeader;\r\n }\r\n\r\n /**\r\n * Method to open circulate bcr modal\r\n */\r\n public openCirculateBCR(action: string): void {\r\n this.circulateBcrModalComponent.open(action);\r\n }\r\n\r\n public onConcurrentUserListChange(users: ConcurrentUser[]): void {\r\n const { userName: mainUser = null } =\r\n users.find((user) => user.canEditResource) || {};\r\n this.isReadOnly = this.userName !== mainUser;\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n /**\r\n * Method to open revise circulate bcr modal\r\n */\r\n public openCirculateRevisedBCR(action: string): void {\r\n this.circulateBcrModalComponent.open(action);\r\n }\r\n\r\n /**\r\n * Method to update BCR\r\n */\r\n public updateBcr(): void {\r\n const report = this.reportStore.getReportData();\r\n const newUpdateNumber = (this.reportVersion + 0.01).toFixed(2);\r\n const description =\r\n this.dayCount === 1\r\n ? this.translateService.instant(\r\n \"TOAST.BUSINESS_COMMITTEE_REPORT_UPDATE_SINGLE_DAY.BODY\",\r\n [this.startDate, newUpdateNumber]\r\n )\r\n : this.translateService.instant(\r\n \"TOAST.BUSINESS_COMMITTEE_REPORT_UPDATE.BODY\",\r\n [this.startDate, this.endDate, newUpdateNumber]\r\n );\r\n report.reportHeader = this.ckEditor.data;\r\n report.reportNote = this.noteForm.controls.note.value;\r\n\r\n const result$ = this.report.isCirculatedDraft\r\n ? this.reportService.updateMinorReport(this.documentId, report)\r\n : this.reportService.updateReport(this.documentId, report);\r\n\r\n result$.pipe(take(1)).subscribe(() => {\r\n this.toastService.addNotification({\r\n title: this.translateService.instant(\r\n \"TOAST.BUSINESS_COMMITTEE_REPORT_UPDATE.TITLE\"\r\n ),\r\n description,\r\n });\r\n this.router.navigate([\"/dashboard\"]);\r\n });\r\n }\r\n\r\n /**\r\n * Method to send file from action bar\r\n */\r\n public sendEmailFile(): void {\r\n this.actionbarEmailModalComponent.open();\r\n }\r\n\r\n /**\r\n * Method to populate all needed data for view report component\r\n */\r\n private populateReportView(): void {\r\n this.startDate = moment\r\n .utc(\r\n this.report.businessScheduleDetail.bsDetailFirstDay,\r\n GLOBALS.dateTimeFormat\r\n )\r\n .format(GLOBALS.dateFormat);\r\n this.endDate = moment\r\n .utc(\r\n this.report.businessScheduleDetail.bsDetailLastDay,\r\n GLOBALS.dateTimeFormat\r\n )\r\n .format(GLOBALS.dateFormat);\r\n this.reportStatusId = this.report.reportStatusId;\r\n this.reportVersion = this.report.reportVerison;\r\n this.dateRange = this.startDate !== this.endDate;\r\n this.selectedRange =\r\n this.startDate + (this.dateRange ? \" - \" + this.endDate : \"\");\r\n this.fallbackDate = this.selectedRange;\r\n this.defaultHeader = this.report.reportHeader;\r\n this.dateRange =\r\n this.report.businessScheduleDetail.bsDetailFirstDay !==\r\n this.report.businessScheduleDetail.bsDetailLastDay;\r\n this.currentWeek = moment(\r\n this.report.businessScheduleDetail.bsDetailFirstDay,\r\n GLOBALS.dateFormat\r\n ).isoWeek();\r\n const date = this.dateRange\r\n ? `(${this.startDate}-${this.endDate})`\r\n : `(${this.startDate})`;\r\n this.initNavigation(date);\r\n this.dayCount = this.getReportDates(this.startDate, this.endDate);\r\n this.reportTitle = this.generateReportTitle(\r\n date,\r\n this.reportStatusId,\r\n false,\r\n this.reportVersion\r\n );\r\n this.revisedBcrNumber = this.report.reportVerison.toString().split(\".\")[0];\r\n this.updateBcrString = this.report.reportVerison.toString().split(\".\")[1];\r\n\r\n this.noteForm.controls.note.setValue(\r\n !isEmpty(this.report.reportNote) ? this.report.reportNote : null\r\n );\r\n }\r\n\r\n /**\r\n * Function with default ckEditor text\r\n * @param start Start time\r\n * @param end End time\r\n */\r\n private defaultEditorText(start: string, end: string): void {\r\n if (this.dateRange) {\r\n this.dayText = `${moment\r\n .utc(start, GLOBALS.dateFormat)\r\n .format(\"dddd\")\r\n .toUpperCase()}\r\n ${this.translateService.instant(\"VIEW_REPORT.REPORT_HEADER.LINE_3\")}\r\n ${moment.utc(end, GLOBALS.dateFormat).format(\"dddd\").toUpperCase()}`;\r\n this.dateText = `${moment\r\n .utc(start, GLOBALS.dateFormat)\r\n .format(\"D MMMM\")\r\n .toUpperCase()} -\r\n ${moment\r\n .utc(end, GLOBALS.dateFormat)\r\n .format(\"D MMMM YYYY\")\r\n .toUpperCase()}`;\r\n } else {\r\n this.dayText = moment\r\n .utc(start, GLOBALS.dateFormat)\r\n .format(\"dddd\")\r\n .toUpperCase();\r\n this.dateText = moment\r\n .utc(start, GLOBALS.dateFormat)\r\n .format(\"D MMMM YYYY\")\r\n .toUpperCase();\r\n }\r\n\r\n const savedHeader = this.defaultHeader.match(/

.*?<\\/p>/g)\r\n\r\n const textParts = this.defaultHeader.split(/(]*>)/)\r\n const remainingText = textParts.slice(9).join('')\r\n\r\n let headerLine1 = savedHeader ? savedHeader[0] : `

${this.translateService.instant(\"VIEW_REPORT.REPORT_HEADER.LINE_1\")}

`;\r\n let headerLine2 = `

${this.translateService.instant(\"VIEW_REPORT.REPORT_HEADER.LINE_2\")}

`;\r\n let headerLine3 = `

${this.dayText}, ${this.dateText}

`;\r\n let datePart = moment(moment(start, GLOBALS.dateFormat).format())\r\n .subtract(1, \"weeks\")\r\n .isoWeekday(4)\r\n .format(\"D MMMM YYYY\")\r\n .toUpperCase();\r\n\r\n let headerLine4 = `

(${this.translateService.instant(\"VIEW_REPORT.REPORT_HEADER.LINE_5\")} ${datePart})

`;\r\n let additionalText = remainingText !== undefined ? remainingText : '';\r\n this.defaultHeader = `${headerLine1}\\n${headerLine2}\\n${headerLine3}\\n${headerLine4}\\n${additionalText}`\r\n }\r\n\r\n onEditorChange(event){\r\n this.defaultHeader = event\r\n }\r\n\r\n /**\r\n * Empty model for new day\r\n * @param day Date\r\n * @param isSitingDay Sitting day default value\r\n */\r\n private addNewDay(day, isSitingDay) {\r\n const newDay: BusinessScheduleDay = {\r\n bsDayId: 0,\r\n bsDayDate: day,\r\n bsDayStartTime: null,\r\n bsDayEndTime: null,\r\n deletedSections: [],\r\n bsDayNotSittingReason: null,\r\n isBSDayCustom: 0,\r\n bsDayTemplateId: 0,\r\n isBSDaySitting: isSitingDay,\r\n businessDaySectionHeaders: [],\r\n businessDayArrangements: [],\r\n businessDayCustomSectionDetails: [],\r\n daySectionExpanded: true,\r\n };\r\n return newDay;\r\n }\r\n\r\n /**\r\n * Function to get day diffrence\r\n * @param startDate Start day\r\n * @param endDate End day\r\n */\r\n private getReportDates(startDate, endDate): number {\r\n const end = moment.utc(endDate, GLOBALS.dateFormat);\r\n const start = moment.utc(startDate, GLOBALS.dateFormat);\r\n this.report.businessScheduleDetail.bsDetailFirstDay = moment\r\n .utc(start, GLOBALS.dateFormat)\r\n .format(GLOBALS.dateFormat);\r\n this.report.businessScheduleDetail.bsDetailLastDay = moment\r\n .utc(end, GLOBALS.dateFormat)\r\n .format(GLOBALS.dateFormat);\r\n this.newDates = [];\r\n const step: number = moment.duration(end.diff(start)).asDays();\r\n for (let i = 0; i <= step; i++) {\r\n this.newDates.push(moment.utc(start, GLOBALS.dateFormat).format());\r\n start.add(1, \"day\");\r\n }\r\n return step + 1;\r\n }\r\n\r\n /**\r\n * Function to generate report title\r\n * @param date Report date\r\n * @param reportStatusId Report status id\r\n * @param navigationTitle boolean to identify is it navigation title item or not\r\n * @param reportVersion Circulated report version\r\n */\r\n private generateReportTitle(\r\n date: string,\r\n reportStatusId: number,\r\n navigationTitle?: boolean,\r\n reportVersion?: number\r\n ): string {\r\n if (reportStatusId === ReportStatuses.Draft) {\r\n return navigationTitle\r\n ? this.translateService.instant(\"DASHBOARD.NAVIGATION_ITEM.DRAFT\", [\r\n date,\r\n ])\r\n : this.translateService.instant(\"VIEW_REPORT.PAGETITLE\");\r\n }\r\n return this.translateService.instant(\r\n \"DASHBOARD.NAVIGATION_ITEM.CIRCULATED\",\r\n [date, reportVersion]\r\n );\r\n }\r\n\r\n /**\r\n * Function to init navigation\r\n * @param params Params to init navigation\r\n */\r\n private initNavigation(params: any): void {\r\n const title = this.generateReportTitle(\r\n params,\r\n this.reportStatusId,\r\n true,\r\n this.reportVersion\r\n );\r\n const parentTitle = \"Dashboard\";\r\n const taskManagerNode = this.navigationService.model.tree.find(\r\n (x) => x.title === parentTitle\r\n );\r\n this.navigationService.select(taskManagerNode);\r\n this.navigationService.addNode({\r\n title,\r\n path: `/bcr-report/${this.documentId}`,\r\n });\r\n }\r\n\r\n /**\r\n * Function to clear navigation\r\n */\r\n private clearNavigation(): void {\r\n this.navigationService.select(this.navigationService.currentNode);\r\n const taskManagerNode = this.navigationService.model.tree.find(\r\n (x) => x.title === \"Dashboard\"\r\n );\r\n taskManagerNode.expanded = false;\r\n }\r\n\r\n /**\r\n * Function to observe changes in date range calendar\r\n */\r\n private observeChanges(): void {\r\n const elementToObserve = document.querySelector(\r\n \".report-dates .datepicker\"\r\n );\r\n this.observer = new MutationObserver(() => {\r\n document.querySelectorAll(\".ngb-dp-day\").forEach((v) => {\r\n const ariaLabel = v.getAttribute(\"aria-label\");\r\n const dates = moment.utc(ariaLabel).startOf(\"day\").toISOString();\r\n if (\r\n moment(dates).isoWeek() !== this.currentWeek ||\r\n moment.utc(dates).isBefore(moment.utc().subtract(1, \"days\"))\r\n ) {\r\n v.classList.add(\"disable-picker\");\r\n } else {\r\n v.classList.remove(\"disable-picker\");\r\n }\r\n });\r\n });\r\n this.observer.observe(elementToObserve, {\r\n subtree: true,\r\n childList: true,\r\n attributes: true,\r\n });\r\n }\r\n\r\n /**\r\n * Function to adjust workitem positions\r\n */\r\n private updateWorkitemPositions(\r\n sectionDetails: BusinessDayCommonSectionDetail[]\r\n ): void {\r\n if (sectionDetails && sectionDetails.length) {\r\n sectionDetails.forEach((row) => {\r\n if (row.workItems) {\r\n row.workItems = row.workItems.map((i, index) => ({\r\n ...i,\r\n businessDaySectionWorkItemPositionNo: index,\r\n }));\r\n }\r\n });\r\n }\r\n }\r\n\r\n private getSelectedDateString(): string {\r\n return this.dateRange\r\n ? `(${this.startDate}-${this.endDate})`\r\n : `(${this.startDate})`;\r\n }\r\n\r\n private getSelectedDate(): string[] {\r\n return this.dateRange\r\n ? this.getDatesInRange(this.startDate.trim(), this.endDate.trim())\r\n : [moment.utc(this.startDate.trim(), GLOBALS.dateFormat).format()];\r\n }\r\n\r\n private titleTranslationSuccess(\r\n isSuccess?: boolean,\r\n isWithdraw = false\r\n ): void {\r\n if (isSuccess !== true) {\r\n return;\r\n }\r\n\r\n // Fetch section details for new translation details\r\n const openSectionComponents = this.dayInstanceComponents\r\n .toArray()\r\n .filter((dayComp) => dayComp && dayComp.sectionComponents)\r\n .map((dayComp) => dayComp.sectionComponents.toArray())\r\n .reduce((prev, curr) => prev.concat(curr))\r\n .filter((sectionComp) => !sectionComp.canToggle);\r\n\r\n if (openSectionComponents.length) {\r\n openSectionComponents.forEach((comp) =>\r\n comp.populateSectionWithData(true)\r\n );\r\n }\r\n\r\n const title = this.translateService.instant(\r\n isWithdraw\r\n ? \"TOAST.REQ_TITLE_TRANSLATION_WITHDRAW.TITLE\"\r\n : \"TOAST.REQ_TITLE_TRANSLATION.TITLE\"\r\n );\r\n const description = this.translateService.instant(\r\n isWithdraw\r\n ? \"TOAST.REQ_TITLE_TRANSLATION_WITHDRAW.BODY\"\r\n : \"TOAST.REQ_TITLE_TRANSLATION.BODY\"\r\n );\r\n\r\n this.toastService.addNotification({ title, description });\r\n }\r\n}\r\n","import { Component, OnInit, ViewChild, OnDestroy, ChangeDetectorRef, Inject } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport {\r\n ToastNotificationsService,\r\n NavigationService,\r\n TypeaheadValue\r\n} from 'proceduralsystem-clientcomponents';\r\nimport { ConfirmCancelModalComponent } from './modals/confirm-cancel-modal/confirm-cancel-modal.component';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { CirculateModalComponent } from './modals/circulate-modal/circulate-modal.component';\r\nimport { ActionBarEmailModalObComponent } from './modals/action-bar-email-modal-ob/action-bar-email-modal-ob.component';\r\nimport { ReportStoreService } from '../services/report-store.service';\r\nimport { take, takeUntil } from 'rxjs/operators';\r\nimport {\r\n AnnouncementOfBusinessDays,\r\n OrderOfBusiness,\r\n WorkItemsProposedArrangementsDays,\r\n AnnouncementOfProposedArrangementsDays\r\n} from '../shared/models/order-of-business.model';\r\nimport { Subject, Observable } from 'rxjs';\r\nimport { cloneDeep, isEmpty } from 'lodash-es';\r\nimport { ReportService } from '../services/report.service';\r\nimport { ReportStatuses } from '../shared/report.enum';\r\nimport * as moment from 'moment';\r\nimport { SharedService } from '../services/shared.service';\r\nimport { GLOBALS } from '../shared/globals';\r\nimport {TranslateService} from '@ngx-translate/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport OirCkEditor from 'proceduralsystem-ckeditor';\r\nimport { OirCkEditorConfig } from 'proceduralsystem-ckeditor';\r\nimport { EditorConfig } from 'src/app/shared/models/editor-config.model';\r\nimport { AppConfigService } from 'src/app/services/app-config.service';\r\n\r\n@Component({\r\n selector: 'oir-order-of-business',\r\n templateUrl: './order-of-business.component.html',\r\n styleUrls: ['./order-of-business.component.less']\r\n})\r\nexport class OrderOfBusinessComponent implements OnInit, OnDestroy {\r\n\r\n @ViewChild('confirmCancelModalComponent') confirmCancelModalComponent: ConfirmCancelModalComponent;\r\n @ViewChild('circulateModalComponent') circulateModalComponent: CirculateModalComponent;\r\n @ViewChild('actionBarEmailModalObComponent') actionBarEmailModalObComponent: ActionBarEmailModalObComponent;\r\n\r\n public report: OrderOfBusiness;\r\n public defaultHeader: string;\r\n public orderOFBusinessHeader: string;\r\n public reportHeader: string;\r\n public headerTextStripped: string;\r\n public defaultHeaderText: string;\r\n public headerWithHTML: string;\r\n public announcementOfBusinessDays: Array;\r\n public announcementOfProposedArrangementsDays: Array;\r\n public workItemsProposedArrangementsDays: Array;\r\n public obDetailFirstDay: string;\r\n public obDetailLastDay: string;\r\n public obDetailFirstLastDays: string;\r\n public orderOfBusinessViewForm: UntypedFormGroup;\r\n public configToolbar = [\r\n { name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike'] },\r\n { name: 'styles', items: ['Styles'] },\r\n { name: 'paragraph', items: ['BulletedList', 'NumberedList'] },\r\n { name: 'insert', items: ['Table'] },\r\n { name: 'tools', items: ['Maximize'] },\r\n ];\r\n public ReportStatuses = ReportStatuses;\r\n public obFileName: string;\r\n public obVersion: string;\r\n public orderOfBusiness: OrderOfBusiness;\r\n public recipients: TypeaheadValue[] = [];\r\n public isHeaderTextEmpty: boolean;\r\n public reportTitle: string;\r\n public reportStatus: number;\r\n public isSingleDay: boolean;\r\n public isReportOutdated: boolean;\r\n\r\n private ngUnsubscribe = new Subject();\r\n private documentId: string;\r\n private window: Window;\r\n\r\n Editor = OirCkEditor;\r\n ckEditorConfig: OirCkEditorConfig;\r\n\r\n public recursiveLimit = 0;\r\n\r\n constructor(\r\n private router: Router,\r\n private fb: UntypedFormBuilder,\r\n private route: ActivatedRoute,\r\n private translateService: TranslateService,\r\n private toastService: ToastNotificationsService,\r\n private reportStore: ReportStoreService,\r\n private reportService: ReportService,\r\n private sharedService: SharedService,\r\n private changeDetectorRef: ChangeDetectorRef,\r\n private navigationService: NavigationService,\r\n private configurationService: AppConfigService,\r\n @Inject(DOCUMENT) private document: Document\r\n ) {\r\n this.window = this.document.defaultView;\r\n this.ckEditorConfig = {\r\n ...EditorConfig,\r\n licenseKey: this.configurationService.getValue('CKEditor5LicenseKey')\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n this.orderOfBusinessViewForm = this.fb.group({\r\n orderOFBusinessHeader: ['', [Validators.required, Validators.maxLength(1050)]],\r\n });\r\n this.documentId = this.route.snapshot.paramMap.get('documentId');\r\n this.route.data.pipe(take(1)).subscribe(data => {\r\n if (data.createOB) {\r\n this.previewOrGetOrderOfBusiness(this.documentId, this.reportService.previewOrderOfBusiness(this.documentId));\r\n } else {\r\n this.previewOrGetOrderOfBusiness(this.documentId, this.reportService.getOrderOfBusinessReport(this.documentId));\r\n }\r\n });\r\n\r\n this.reportService.getMailsList().pipe(take(1)).subscribe(res => {\r\n res.map((emails) => {\r\n if (emails.recipientEmail !== null) {\r\n this.recipients.push({ value: emails.recipientId, title: emails.recipientEmail});\r\n }\r\n });\r\n });\r\n // Only temporary for development team.\r\n this.recipients = this.sharedService.addDevEmails(this.recipients);\r\n\r\n // Subscribe to report data change in report store service\r\n this.reportStore.reportObData$\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe(report => {\r\n this.report = cloneDeep(report);\r\n if (report) {\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n });\r\n }\r\n\r\n onReady() {\r\n if (this.window && this.window[0] && this.defaultHeaderText && this.recursiveLimit <= GLOBALS.recursiveMaxLimit) {\r\n this.window[0].document.getElementsByTagName('body')[0].style.textAlign = \"center\";\r\n this.window[0].document.getElementsByTagName('body')[0].style.fontFamily = \"'Montserrat-Regular', sans-serif\";\r\n this.window[0].document.getElementsByTagName('body')[0].style.fontSize = \"15px\";\r\n this.window[0].document.getElementsByTagName('body')[0].style.lineHeight = \"20px\";\r\n this.window[0].document.getElementsByTagName('body')[0].style.color = \"rgb(68, 68, 68)\";\r\n }\r\n else {\r\n setTimeout(() => {\r\n this.recursiveLimit++;\r\n this.onReady();\r\n }, 1000);\r\n }\r\n }\r\n\r\n /**\r\n * Clearing navigation on destroy\r\n */\r\n public ngOnDestroy(): void {\r\n this.clearNavigation();\r\n }\r\n\r\n\r\n /**\r\n * Call service to get PDF preview of report\r\n */\r\n public generatePrintPreview(): void {\r\n this.reportService.generateOrderOfBusinessPrintPreview(this.documentId).pipe(take(1)).subscribe(res => {\r\n const file: Blob = new Blob([res], { type: 'application/pdf' });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(file);\r\n } else {\r\n const fileURL: string = URL.createObjectURL(file);\r\n window.open(fileURL);\r\n }\r\n });\r\n }\r\n /**\r\n * Method to confirm cancel modal functionality\r\n * @param event\r\n */\r\n public cancelObModalDecision(event): void {\r\n if (event) {\r\n const title = this.reportStatus === ReportStatuses.Circulated ?\r\n this.translateService.instant('TOAST.CANCEL_ORDER_OF_BUSINESS_CIRCULATED.HEADING') :\r\n this.translateService.instant('TOAST.CANCEL_ORDER_OF_BUSINESS_DRAFT.HEADING');\r\n const description = this.reportStatus === ReportStatuses.Circulated ?\r\n this.translateService.instant('TOAST.CANCEL_ORDER_OF_BUSINESS_CIRCULATED.BODY') :\r\n this.translateService.instant('TOAST.CANCEL_ORDER_OF_BUSINESS_DRAFT.BODY');\r\n\r\n this.toastService.addNotification({ title, description });\r\n this.router.navigate(['/dashboard']);\r\n }\r\n }\r\n\r\n /**\r\n * Method for Save as draft button functionality\r\n * Calling api post request\r\n */\r\n public saveAsDraft(): void {\r\n const reportData = {\r\n reportId: this.documentId,\r\n reportHeader: !isEmpty(this.headerWithHTML) ? this.headerWithHTML : this.defaultHeaderText,\r\n };\r\n this.saveReport(this.reportService.saveCirculatedOBAsDraft(reportData));\r\n }\r\n\r\n /**\r\n * Method to open Cancel modal\r\n */\r\n public openCancelModal(): void {\r\n this.confirmCancelModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Method to open Circulate OB modal\r\n */\r\n public openCirculateOB(): void {\r\n const reportData = {\r\n reportId: this.documentId,\r\n reportHeader: !isEmpty(this.headerWithHTML) ? this.headerWithHTML : this.defaultHeaderText,\r\n };\r\n this.circulateModalComponent.open(reportData);\r\n }\r\n\r\n public isOutdated() {\r\n const reportLastDay = moment(this.orderOfBusiness.businessScheduleDetailLastDay, 'DD/MM/YYYY')\r\n const today = moment()\r\n this.isReportOutdated = today.isAfter(reportLastDay, 'day')\r\n }\r\n\r\n /**\r\n * Method to send file from action bar\r\n */\r\n public sendEmailFile(): void {\r\n this.actionBarEmailModalObComponent.open();\r\n }\r\n\r\n /**\r\n * Function to hide days\r\n * @param event event\r\n * @param index index\r\n */\r\n public hideDays(event, index: number): void {\r\n const days = document.querySelector('.proposed-week-announcement').children;\r\n // tslint:disable-next-line: prefer-for-of\r\n for (let i = 0; i < days.length; i++) {\r\n days[i].setAttribute(\r\n 'style', 'display: ' + (i !== index && event ? 'none' : 'block')\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Function to hide days\r\n * @param event event\r\n * @param index index\r\n */\r\n public hideDayArrangement(event, index: number): void {\r\n const days = document.querySelector('.proposed-week-arrangement').children;\r\n // tslint:disable-next-line: prefer-for-of\r\n for (let i = 0; i < days.length; i++) {\r\n days[i].setAttribute(\r\n 'style', 'display: ' + (i !== index && event ? 'none' : 'block')\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Check if Headers length of text is under or equal to 1000 characters\r\n */\r\n public checkHeaderMaxChars(event: any): void {\r\n const length = event.target.innerHTML\r\n .replace(/<\\/?[^>]+(>|$)/g, '')\r\n .replace(/[Â↵\\n]/g, '')\r\n .length;\r\n if (length !== 0 && length >= 1000 && event.keyCode !== 46\r\n && event.keyCode !== 8 && event.keyCode !== 37 && event.keyCode !== 39) {\r\n event.preventDefault();\r\n } else {\r\n // need timeout to detect changes\r\n setTimeout(() => {\r\n this.headerWithHTML = event.target.innerHTML;\r\n }, 100);\r\n }\r\n }\r\n\r\n /**\r\n * Function to check is Announcement Text is empty\r\n * @param event Event\r\n */\r\n public onHeaderChange(event): void {\r\n this.isHeaderTextEmpty = !isEmpty(event) ? false : true;\r\n }\r\n\r\n /**\r\n * Function to check is form Invalid\r\n */\r\n public isFormInvalid(): boolean {\r\n return this.isHeaderTextEmpty;\r\n }\r\n\r\n /**\r\n * Function to get or preview Order of Busines\r\n * @param id Report id\r\n * @param getApi preview or get report API\r\n */\r\n public previewOrGetOrderOfBusiness(id: string, getApi: Observable): void {\r\n getApi.pipe(take(1)).subscribe(res => {\r\n this.orderOfBusiness = res;\r\n this.isOutdated()\r\n this.defaultHeaderText = res.reportHeader;\r\n this.reportStatus = res.reportStatus;\r\n this.obDetailFirstDay = this.sharedService.convertDate(res.businessScheduleDetailFirstDay);\r\n this.obDetailLastDay = this.sharedService.convertDate(res.businessScheduleDetailLastDay);\r\n this.obDetailFirstLastDays = `(${this.obDetailFirstDay} - ${this.obDetailLastDay})`;\r\n this.isSingleDay = this.obDetailFirstDay === this.obDetailLastDay;\r\n this.obDetailFirstLastDays = this.obDetailFirstDay === this.obDetailLastDay ?\r\n `(${moment.utc(this.obDetailFirstDay).format(GLOBALS.dateFormat)})` :\r\n `(${moment.utc(this.obDetailFirstDay).format(GLOBALS.dateFormat)} - ${moment.utc(this.obDetailLastDay).format(GLOBALS.dateFormat)})`;\r\n this.obVersion = res.reportVersion;\r\n this.announcementOfBusinessDays = res.announcementOfBusinessDays.sort((a, b) => {\r\n return new Date(this.sharedService.convertDate(a.bsDayDate)).getTime() -\r\n new Date(this.sharedService.convertDate(b.bsDayDate)).getTime();\r\n });\r\n this.announcementOfProposedArrangementsDays = res.announcementOfProposedArrangementsDays.sort((a, b) => {\r\n return new Date(this.sharedService.convertDate(a.bsDayDate)).getTime() -\r\n new Date(this.sharedService.convertDate(b.bsDayDate)).getTime();\r\n });\r\n this.reportTitle = res.reportStatus === ReportStatuses.Draft ?\r\n this.translateService.instant('ORDER_OF_BUSINESS.PAGE_TITLE_DRAFT', [this.obDetailFirstLastDays]) :\r\n this.translateService.instant('ORDER_OF_BUSINESS.PAGE_TITLE_CIRCULATED',\r\n [this.obDetailFirstLastDays, res.reportVersion]);\r\n this.initNavigation(id, this.obDetailFirstLastDays, res.reportStatus, res.reportVersion);\r\n this.onReady();\r\n });\r\n }\r\n\r\n /**\r\n * Function to save Report\r\n * @param postAPI Post API\r\n * @param reportData Report data\r\n */\r\n private saveReport(postAPI: Observable): void {\r\n postAPI.pipe(take(1)).subscribe(() => {\r\n this.toastService.addNotification({\r\n title: this.translateService.instant('TOAST.ORDER_OF_BUSINESS_DRAFT.TITLE'),\r\n description: this.translateService.instant('TOAST.ORDER_OF_BUSINESS_DRAF.BODY', [this.obDetailFirstLastDays])});\r\n this.router.navigate(['dashboard/']);\r\n });\r\n }\r\n\r\n /**\r\n * Function to create navigation node\r\n * @param params page id\r\n * @param date report name\r\n */\r\n private initNavigation(params: any, date: string, status: number, version: number): void {\r\n const title = status === ReportStatuses.Draft ?\r\n this.translateService.instant('DASHBOARD.NAVIGATION_ITEM_ORDER_OF_BUSINESS.DRAFT', [date]) :\r\n this.translateService.instant('DASHBOARD.NAVIGATION_ITEM_ORDER_OF_BUSINESS.CIRCULATED', [date, version]);\r\n const parentTitle = 'Dashboard';\r\n const taskManagerNode = this.navigationService.model.tree.find(\r\n x => x.title === parentTitle\r\n );\r\n this.navigationService.select(taskManagerNode);\r\n this.navigationService.addNode({\r\n title, path: `/order-of-business/${params}`\r\n });\r\n }\r\n\r\n /**\r\n * Function to clear navigation node\r\n */\r\n private clearNavigation(): void {\r\n this.navigationService.select(this.navigationService.currentNode);\r\n const taskManagerNode = this.navigationService.model.tree.find(\r\n x => x.title === 'Dashboard'\r\n );\r\n taskManagerNode.expanded = false;\r\n }\r\n\r\n\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewChild,\r\n OnDestroy,\r\n Inject,\r\n AfterViewInit\r\n} from '@angular/core';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { SendToRapporteurComponent } from './modals/send-to-rapporteur/send-to-rapporteur.component';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { NavigationService, ToastNotificationsService } from 'proceduralsystem-clientcomponents';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { CancelReportComponent } from './modals/cancel-report/cancel-report.component';\r\nimport { ReportService } from '../services/report.service';\r\nimport { take, map } from 'rxjs/operators';\r\nimport { Observable } from 'rxjs';\r\nimport * as moment from 'moment';\r\nimport { GLOBALS } from '../shared/globals';\r\nimport { SharedService } from '../services/shared.service';\r\nimport { RapporteurReportDays } from '../shared/models/rapporteur-report.model';\r\nimport { isEmpty } from 'lodash-es';\r\nimport { RREmailType, ReportStatuses } from '../shared/report.enum';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport OirCkEditor from 'proceduralsystem-ckeditor';\r\nimport { OirCkEditorConfig } from 'proceduralsystem-ckeditor';\r\nimport { EditorConfig } from 'src/app/shared/models/editor-config.model';\r\nimport { AppConfigService } from 'src/app/services/app-config.service';\r\n\r\n@Component({\r\n selector: 'oir-rapportuers-report',\r\n templateUrl: './rapportuers-report.component.html',\r\n styleUrls: ['./rapportuers-report.component.less']\r\n})\r\nexport class RapportuersReportComponent\r\n implements OnInit, OnDestroy,AfterViewInit\r\n{\r\n @ViewChild('sendReportModal') sendReportModal: SendToRapporteurComponent;\r\n @ViewChild('cancelReportDialog') cancelReportDialog: CancelReportComponent;\r\n\r\n public rapporteurForm: UntypedFormGroup;\r\n public rapporteursData$: Observable;\r\n public recipients$: Observable;\r\n public dayArrangement: RapporteurReportDays[];\r\n public emailType = RREmailType;\r\n public isAnnouncementTextEmpty: boolean;\r\n public defaultHeaderText: string;\r\n public defaultAnnouncementText: string;\r\n public headerWithHTML: string;\r\n public announcementWithHTML: string;\r\n public rrId: string;\r\n public rrFileName: string;\r\n public rrVersion: string;\r\n public reportTitle: string;\r\n public isSingleDay: boolean;\r\n public reportStatus: number;\r\n public reportStatusId = ReportStatuses;\r\n private window: Window;\r\n public isReportOutdated: boolean;\r\n\r\n Editor = OirCkEditor;\r\n ckEditorConfig: OirCkEditorConfig;\r\n\r\n public recursiveLimit = 0;\r\n\r\n public configToolbar = [\r\n { name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike'] },\r\n { name: 'styles', items: ['Styles'] },\r\n { name: 'paragraph', items: ['BulletedList', 'NumberedList'] },\r\n { name: 'insert', items: ['Table'] },\r\n { name: 'tools', items: ['Maximize'] }\r\n ];\r\n\r\n private isChecked = true;\r\n\r\n constructor(\r\n private activatedRoute: ActivatedRoute,\r\n private reportService: ReportService,\r\n private sharedService: SharedService,\r\n private router: Router,\r\n private fb: UntypedFormBuilder,\r\n private translateService: TranslateService,\r\n private navigationService: NavigationService,\r\n private toastService: ToastNotificationsService,\r\n private configurationService: AppConfigService,\r\n @Inject(DOCUMENT) private document: Document\r\n ) {\r\n this.window = this.document.defaultView;\r\n this.ckEditorConfig = {\r\n ...EditorConfig,\r\n licenseKey: this.configurationService.getValue('CKEditor5LicenseKey')\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.rrId = this.activatedRoute.snapshot.paramMap.get('documentId');\r\n this.activatedRoute.data.pipe(take(1)).subscribe(data => {\r\n if (data.createRR) {\r\n this.previewOrGetRapporteursReport(\r\n this.rrId,\r\n this.reportService.previewRapporteurReport(this.rrId)\r\n );\r\n } else {\r\n this.previewOrGetRapporteursReport(\r\n this.rrId,\r\n this.reportService.getRapporteurReport(this.rrId)\r\n );\r\n }\r\n });\r\n\r\n this.rapporteurForm = this.fb.group({\r\n rapporteur: [[], Validators.required]\r\n });\r\n\r\n // Stream to get rapporteurs\r\n this.rapporteursData$ = this.reportService.getMembers().pipe(\r\n take(1),\r\n map(members =>\r\n members.map(member => ({ value: member.id, title: member.name }))\r\n )\r\n );\r\n\r\n // Stream to get recipients\r\n this.recipients$ = this.reportService.getRecipients().pipe(\r\n take(1),\r\n map(recipients => {\r\n const filteredRecipients = recipients.filter(\r\n val => val.recipientEmail !== null\r\n );\r\n return filteredRecipients.map(recipient => ({\r\n value: recipient.recipientId,\r\n title: recipient.recipientEmail\r\n }));\r\n })\r\n );\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.onReady()\r\n }\r\n\r\n /**\r\n * After content is checked changing aligment of Announcement ckEditor instance\r\n */\r\n\r\n /**\r\n * Clearing navigation on destroy\r\n */\r\n public ngOnDestroy(): void {\r\n this.clearNavigation();\r\n }\r\n\r\n /**\r\n * Check if Headers length of text is under or equal to 1000 characters\r\n */\r\n public checkHeaderMaxChars(event: any): void {\r\n const length = event.target.innerHTML\r\n .replace(/<\\/?[^>]+(>|$)/g, '')\r\n .replace(/[Â↵\\n]/g, '')\r\n .length;\r\n if (\r\n length !== 0 &&\r\n length >= 1000 &&\r\n event.keyCode !== 46 &&\r\n event.keyCode !== 8 &&\r\n event.keyCode !== 37 &&\r\n event.keyCode !== 39\r\n ) {\r\n event.preventDefault();\r\n } else {\r\n // need timeout to detect changes\r\n setTimeout(() => {\r\n this.headerWithHTML = event.target.innerHTML;\r\n }, 100);\r\n }\r\n }\r\n\r\n /**\r\n * Check if Announcement length of text is under or equal to 500 characters\r\n */\r\n public checkAnnouncementMaxChars(event: any): void {\r\n const length = event.target.innerHTML\r\n .replace(/<\\/?[^>]+(>|$)/g, '')\r\n .replace(/[Â↵\\n]/g, '')\r\n .length;\r\n if (\r\n length !== 0 &&\r\n length >= 500 &&\r\n event.keyCode !== 46 &&\r\n event.keyCode !== 8 &&\r\n event.keyCode !== 37 &&\r\n event.keyCode !== 39\r\n ) {\r\n event.preventDefault();\r\n } else {\r\n // need timeout to detect changes\r\n setTimeout(() => {\r\n this.announcementWithHTML = event.target.innerHTML;\r\n }, 100);\r\n }\r\n }\r\n\r\n /**\r\n * Function to check is Announcement Text is empty\r\n * @param event Event\r\n */\r\n public onAnnouncementTextChange(event): void {\r\n this.isAnnouncementTextEmpty = !isEmpty(event) ? false : true;\r\n }\r\n\r\n /**\r\n * Function to check is form Invalid\r\n */\r\n public isFormInvalid(): boolean {\r\n return this.rapporteurForm.invalid || this.isAnnouncementTextEmpty;\r\n }\r\n\r\n /**\r\n * Function to open Repporteur Report Modal\r\n */\r\n public openRepporteurReportModal(emailSendType: number): void {\r\n const reportData = {\r\n reportId: this.rrId,\r\n rapporteurId: !isEmpty(this.rapporteurForm.controls.rapporteur.value)\r\n ? this.rapporteurForm.controls.rapporteur.value[0].value\r\n : null,\r\n reportHeader: !isEmpty(this.headerWithHTML)\r\n ? this.headerWithHTML\r\n : this.defaultHeaderText,\r\n rapporteurNote: !isEmpty(this.announcementWithHTML)\r\n ? this.announcementWithHTML\r\n : this.defaultAnnouncementText\r\n };\r\n this.sendReportModal.openReportModal(emailSendType, reportData);\r\n }\r\n\r\n /**\r\n * Function to hide days\r\n * @param event event\r\n * @param index index\r\n */\r\n public hideDays(event, index: number) {\r\n const days = document.querySelector('.rr_daysAnnouncement').children;\r\n // tslint:disable-next-line: prefer-for-of\r\n for (let i = 0; i < days.length; i++) {\r\n days[i].setAttribute(\r\n 'style',\r\n 'display: ' + (i !== index && event ? 'none' : 'block')\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Function to save report as draft\r\n * After save navigate to dashboard\r\n * Show toast message\r\n */\r\n public saveReportAsDraft(): void {\r\n const reportData = {\r\n reportId: this.rrId,\r\n rapporteurId: !isEmpty(this.rapporteurForm.controls.rapporteur.value)\r\n ? this.rapporteurForm.controls.rapporteur.value[0].value\r\n : null,\r\n reportHeader: !isEmpty(this.headerWithHTML)\r\n ? this.headerWithHTML\r\n : this.defaultHeaderText,\r\n rapporteurNote: !isEmpty(this.announcementWithHTML)\r\n ? this.announcementWithHTML\r\n : this.defaultAnnouncementText\r\n };\r\n this.reportService\r\n .postRapporteurReport(reportData)\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.router.navigate(['dashboard/']);\r\n const title = this.translateService.instant(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_DRAFT.TITLE'\r\n );\r\n const description = this.translateService.instant(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_DRAFT.BODY',\r\n [this.rrFileName]\r\n );\r\n this.toastService.addNotification({ title, description });\r\n });\r\n }\r\n\r\n /**\r\n * Function to cancel\r\n * Show Modal to confirm cancelation of report\r\n * If Yes navigate to dashboard and show toast message\r\n * If No close modal stay on same page\r\n */\r\n public cancelDraft(): void {\r\n this.cancelReportDialog.openCancelDialog();\r\n }\r\n\r\n /**\r\n * Call service to get PDF preview of report\r\n */\r\n public generatePrintPreview(): void {\r\n const reportData = {\r\n reportId: this.rrId,\r\n rapporteurId: !isEmpty(this.rapporteurForm.controls.rapporteur.value)\r\n ? this.rapporteurForm.controls.rapporteur.value[0].value\r\n : null,\r\n reportHeader: !isEmpty(this.headerWithHTML)\r\n ? this.headerWithHTML\r\n : this.defaultHeaderText,\r\n rapporteurNote: !isEmpty(this.announcementWithHTML)\r\n ? this.announcementWithHTML\r\n : this.defaultAnnouncementText\r\n };\r\n this.reportService\r\n .generateRapporteurReportPrintPreview(reportData)\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n const file: Blob = new Blob([res], { type: 'application/pdf' });\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(file);\r\n } else {\r\n const fileURL: string = URL.createObjectURL(file);\r\n window.open(fileURL);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Function to get or preview Repporteur Report\r\n * @param id Report id\r\n * @param getApi preview or get report API\r\n */\r\n private previewOrGetRapporteursReport(\r\n id: string,\r\n getApi: Observable\r\n ): void {\r\n getApi.pipe(take(1)).subscribe(res => {\r\n this.isOutdated(res)\r\n this.defaultHeaderText = res.reportHeader;\r\n this.defaultAnnouncementText = res.joReportRapporteurNote;\r\n this.isAnnouncementTextEmpty = isEmpty(res.joReportRapporteurNote);\r\n this.dayArrangement = res.rapporteurReportDays;\r\n const startDate = this.sharedService.convertDate(\r\n res.businessScheduleDetailFirstDay\r\n );\r\n const endDate = this.sharedService.convertDate(\r\n res.businessScheduleDetailLastDay\r\n );\r\n this.rrVersion = res.reportVersion;\r\n this.reportStatus = res.reportStatus;\r\n this.isSingleDay = startDate === endDate;\r\n this.rrFileName =\r\n startDate === endDate\r\n ? `(${moment.utc(startDate).format(GLOBALS.dateFormat)})`\r\n : `(${moment.utc(startDate)\r\n .format(GLOBALS.dateFormat)} - ${moment\r\n .utc(endDate)\r\n .format(GLOBALS.dateFormat)})`;\r\n this.rapporteurForm.patchValue(\r\n {\r\n rapporteur: !isEmpty(res.rapporteur)\r\n ? [\r\n {\r\n value: res.rapporteur.rapporteurId,\r\n title: res.rapporteur.rapporteurName\r\n }\r\n ]\r\n : []\r\n },\r\n { emitEvent: false }\r\n );\r\n this.reportTitle =\r\n res.reportStatus === ReportStatuses.Draft\r\n ? this.translateService.instant(\r\n 'VIEW_RAPPORTEURS_REPORT.PAGE_TITLE_DRAFT',\r\n [this.rrFileName]\r\n )\r\n : this.translateService.instant(\r\n 'VIEW_RAPPORTEURS_REPORT.PAGE_TITLE_CIRCULATED',\r\n [this.rrFileName, res.reportVersion]\r\n );\r\n this.initNavigation(\r\n id,\r\n this.rrFileName,\r\n res.reportStatus,\r\n res.reportVersion\r\n );\r\n });\r\n }\r\n\r\n public isOutdated(report) {\r\n const reportLastDay = moment(report.businessScheduleDetailLastDay, 'DD/MM/YYYY')\r\n const today = moment()\r\n this.isReportOutdated = today.isAfter(reportLastDay, 'day')\r\n }\r\n\r\n /**\r\n * Function to create navigation node\r\n * @param params page id\r\n * @param date report name\r\n */\r\n private initNavigation(\r\n params: any,\r\n date: string,\r\n status: number,\r\n version: number\r\n ): void {\r\n const title =\r\n status === ReportStatuses.Draft\r\n ? this.translateService.instant(\r\n 'DASHBOARD.NAVIGATION_ITEM_RAPPORTEURS_REPORT.DRAFT',\r\n [date]\r\n )\r\n : this.translateService.instant(\r\n 'DASHBOARD.NAVIGATION_ITEM_RAPPORTEURS_REPORT.CIRCULATED',\r\n [date, version]\r\n );\r\n const parentTitle = 'Dashboard';\r\n const taskManagerNode = this.navigationService.model.tree.find(\r\n x => x.title === parentTitle\r\n );\r\n this.navigationService.select(taskManagerNode);\r\n this.navigationService.addNode({\r\n path: `/rapporteurs-report/${params}`,\r\n title\r\n });\r\n }\r\n\r\n /**\r\n * Function to clear navigation node\r\n */\r\n private clearNavigation(): void {\r\n this.navigationService.select(this.navigationService.currentNode);\r\n const taskManagerNode = this.navigationService.model.tree.find(\r\n x => x.title === 'Dashboard'\r\n );\r\n taskManagerNode.expanded = false;\r\n }\r\n\r\n onReady() {\r\n if (this.window && this.window[0] && this.defaultHeaderText && this.recursiveLimit <= GLOBALS.recursiveMaxLimit) {\r\n this.window[0].document.getElementsByTagName('body')[0].style.textAlign = \"center\";\r\n this.window[0].document.getElementsByTagName('body')[0].style.fontFamily = \"'Montserrat-Regular', sans-serif\";\r\n this.window[0].document.getElementsByTagName('body')[0].style.fontSize = \"15px\";\r\n this.window[0].document.getElementsByTagName('body')[0].style.lineHeight = \"20px\";\r\n this.window[0].document.getElementsByTagName('body')[0].style.color = \"rgb(68, 68, 68)\";\r\n } else {\r\n setTimeout(() => {\r\n this.recursiveLimit++;\r\n this.onReady()\r\n }, 500);\r\n }\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\r\nimport {\r\n MonitoringService,\r\n NavigationService,\r\n OirAuthService\r\n} from 'proceduralsystem-clientcomponents';\r\nimport { forkJoin } from 'rxjs';\r\nimport { filter, map, mergeMap, take, tap } from 'rxjs/operators';\r\nimport { AppConfigService } from './services/app-config.service';\r\nimport { UserRole } from './shared/globals';\r\nimport { MsalService } from '@azure/msal-angular';\r\nimport { ReportStoreService } from './services/report-store.service';\r\n\r\n@Component({\r\n selector: 'app-page',\r\n templateUrl: './page.component.html',\r\n styleUrls: ['./page.component.less']\r\n})\r\nexport class PageComponent implements OnInit {\r\n safPanelExists = false;\r\n\r\n constructor(\r\n private titleService: Title,\r\n private configuration: AppConfigService,\r\n private navigationService: NavigationService,\r\n private router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private monitoringService: MonitoringService,\r\n private oirAuthService: OirAuthService,\r\n private authService: MsalService,\r\n private reportStore: ReportStoreService\r\n ) {\r\n\r\n this.reportStore.reportData$.pipe(\r\n tap(report => {\r\n if (!!report !== this.safPanelExists) {\r\n this.safPanelExists = !this.safPanelExists;\r\n }\r\n })\r\n ).subscribe();\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n forkJoin([\r\n this.configuration.get('UserName'),\r\n this.configuration.get('UserRoleMemberId'),\r\n this.configuration.get('ModuleName'),\r\n this.configuration.get('AppInsightsKey')\r\n ])\r\n .pipe(take(1))\r\n .subscribe(([userName, _roleId, moduleName, appInsightsKey]) => {\r\n this.monitoringService.init(appInsightsKey, userName);\r\n\r\n if (this.hasRole) {\r\n this.navigationService.init({\r\n module: { title: moduleName, path: '' },\r\n homeUrl: '/create-report',\r\n tree: [\r\n { title: 'Dashboard', path: '/dashboard' },\r\n { title: 'Search', path: '/search' },\r\n { title: 'Create report', path: '/create-report' }\r\n ]\r\n });\r\n\r\n this.listenRouterEvents();\r\n }\r\n });\r\n }\r\n\r\n get hasRole(): boolean {\r\n return this.oirAuthService.hasRole(UserRole.journalOffice);\r\n }\r\n\r\n get hasAccess(): boolean {\r\n return this.authService.instance.getActiveAccount() !== null;\r\n }\r\n\r\n changeOfRoutes() {\r\n setTimeout(() => {\r\n this.safPanelExists =\r\n document.querySelector('.saf') !== null;\r\n }, 100);\r\n }\r\n\r\n private listenRouterEvents(): void {\r\n this.router.events\r\n .pipe(\r\n filter(event => event instanceof NavigationEnd),\r\n map(() => this.activatedRoute),\r\n map(route => {\r\n while (route.firstChild) {\r\n route = route.firstChild;\r\n }\r\n\r\n return route;\r\n }),\r\n filter(route => route.outlet === 'primary'),\r\n mergeMap(route => route.data)\r\n )\r\n .subscribe(event => {\r\n this.titleService.setTitle(event.title);\r\n });\r\n }\r\n}\r\n","import { Routes, RouterModule } from '@angular/router';\r\nimport { DashboardComponent } from './dashboard/dashboard.component';\r\nimport { SearchComponent } from './search/search.component';\r\nimport { CreateReportComponent } from './create-report/create-report.component';\r\nimport { ViewReportComponent } from './bcr-report/view-report.component';\r\nimport { OrderOfBusinessComponent } from './order-of-business/order-of-business.component';\r\nimport { RapportuersReportComponent } from './rapportuers-report/rapportuers-report.component';\r\nimport { PageComponent } from './page.component';\r\nimport { AccessDeniedComponent } from 'proceduralsystem-clientcomponents/components/access-denied/access-denied.component';\r\nimport { NotFoundComponent } from 'proceduralsystem-clientcomponents/components/not-found/not-found.component';\r\n\r\nconst routes: Routes = [\r\n { path: '', redirectTo: 'create-report', pathMatch: 'full' },\r\n {\r\n path: '',\r\n component: PageComponent,\r\n children: [\r\n {\r\n path: 'dashboard',\r\n component: DashboardComponent\r\n },\r\n {\r\n path: 'bcr-report/:documentId',\r\n component: ViewReportComponent\r\n },\r\n {\r\n path: 'create-rapporteurs-report/:documentId',\r\n data: { createRR: true },\r\n component: RapportuersReportComponent\r\n },\r\n {\r\n path: 'rapporteurs-report/:documentId',\r\n data: { createRR: false },\r\n component: RapportuersReportComponent\r\n },\r\n {\r\n path: 'create-order-of-business/:documentId',\r\n data: { createOB: true },\r\n component: OrderOfBusinessComponent\r\n },\r\n {\r\n path: 'order-of-business/:documentId',\r\n data: { createOB: false },\r\n component: OrderOfBusinessComponent\r\n },\r\n {\r\n path: 'search',\r\n component: SearchComponent\r\n },\r\n {\r\n path: 'create-report',\r\n component: CreateReportComponent\r\n },\r\n { path: 'access-denied', component: AccessDeniedComponent },\r\n { path: '**', component: NotFoundComponent }\r\n ]\r\n }\r\n];\r\n\r\nexport const routing = RouterModule.forRoot(routes, {\r\n useHash: false\r\n});\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { AppConfigService } from './services/app-config.service';\r\nimport { MsalService } from '@azure/msal-angular';\r\nimport { take } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n template: ''\r\n})\r\nexport class AppComponent implements OnInit {\r\n constructor(\r\n private readonly config: AppConfigService,\r\n private authService: MsalService,\r\n private readonly translate: TranslateService\r\n ) {\r\n this.authService.instance.initialize().then(() => {\r\n this.authService.instance.handleRedirectPromise().then((tokenResponse) => {\r\n if (tokenResponse) {\r\n this.authService.instance.setActiveAccount(this.authService.instance.getAllAccounts()[0]);\r\n } else {\r\n this.authService.acquireTokenSilent({\r\n scopes: this.config.getValue('ApiEndpoint').scopes\r\n }).pipe(take(1)).subscribe(() => {\r\n this.authService.instance.setActiveAccount(this.authService.instance.getAllAccounts()[0]);\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.showMessage('BCR application started');\r\n this.showMessage(`v. ${this.config.getValue('VersionNumber')}`);\r\n\r\n this.translate.addLangs(['en', 'ga']);\r\n this.translate.use('en');\r\n }\r\n\r\n private showMessage(message: string): void {\r\n console.log(\r\n `%c${message}`,\r\n 'color: #b39841; font-family: Arial; font-size: 1.5em; font-weight: bold;'\r\n );\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"SpanStyle\",\r\n pure: false,\r\n})\r\nexport class SpanStylePipe implements PipeTransform {\r\n transform(value: string): string {\r\n return value && typeof value === \"string\"\r\n ? value.replace(/background:white|\\n|\\t/g, \"\")\r\n : value;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { Amendments } from \"../shared/report.enum\";\r\n\r\n@Pipe({\r\n name: \"amendmentByValue\",\r\n})\r\nexport class AmendmentByValuePipe implements PipeTransform {\r\n private readonly formattedNames = {\r\n [Amendments.Amendment]: \"Amendment\",\r\n [Amendments.AmendmentToAmendment]: \"Amendment to an amendment\"\r\n };\r\n\r\n transform(value: number): string {\r\n if (!value) {\r\n return `${value}`;\r\n }\r\n const formattedName = this.formattedNames[value];\r\n return formattedName ? formattedName : `${value}`;\r\n }\r\n}","import { msalConfig } from './base.environment';\r\n\r\nexport const environment = {\r\n msalConfig,\r\n production: true\r\n};\r\n","import { LogLevel, Configuration, BrowserCacheLocation } from '@azure/msal-browser';\r\n\r\nexport const msalConfig: Configuration = {\r\n auth: {\r\n clientId: '', // This is the ONLY mandatory field that you need to supply. SPA application Client Id\r\n authority: 'https://login.microsoftonline.com/ce71ecf0-0b97-47b2-966c-b4ecc8db23f2', // Defaults to \"https://login.microsoftonline.com/common\"\r\n redirectUri: '/', // Points to window.location.origin. You must register this URI on Azure portal/App Registration.\r\n knownAuthorities: ['https://login.microsoftonline.com/ce71ecf0-0b97-47b2-966c-b4ecc8db23f2']\r\n },\r\n cache: {\r\n cacheLocation: BrowserCacheLocation.LocalStorage, // Configures cache location. \"sessionStorage\" is more secure, but \"localStorage\" gives you SSO between tabs.\r\n storeAuthStateInCookie: false, // Set this to \"true\" if you are having issues on IE11 or Edge\r\n },\r\n system: {\r\n loggerOptions: {\r\n/* loggerCallback(logLevel: LogLevel, message: string) {\r\n console.log(message);\r\n },*/\r\n logLevel: LogLevel.Verbose,\r\n piiLoggingEnabled: false\r\n }\r\n }\r\n}\r\n\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ActionInProgressService {\r\n\r\n public actionInProgress = false;\r\n\r\n /**\r\n * Method to set actionInProgress flag as active\r\n */\r\n public actionStarted(): void {\r\n this.actionInProgress = true;\r\n }\r\n\r\n /**\r\n * Method to set actionInProgress flag as inactive\r\n */\r\n public actionEnded(): void {\r\n this.actionInProgress = false;\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpResponse, HttpErrorResponse, HttpHeaders } from '@angular/common/http';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { map, catchError } from 'rxjs/operators';\r\nimport { ActionInProgressService } from 'src/app/services/action-in-progress.service';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class ResponseInterceptor implements HttpInterceptor {\r\n\r\n constructor(\r\n private actionInProgressService: ActionInProgressService\r\n ) { }\r\n\r\n /**\r\n * Interceptor intercepts every outgoing/incoming http request\r\n * @param req\r\n * @param next\r\n */\r\n public intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n if (req.url.includes('blob.core.windows.net/docslaid-documents')) {\r\n req = req.clone({\r\n headers: new HttpHeaders({\r\n 'x-ms-blob-type': 'BlockBlob',\r\n 'Content-Type': 'application/octet-stream'\r\n })\r\n });\r\n }\r\n return next.handle(req).pipe(\r\n map((event: HttpEvent) => {\r\n if (event instanceof HttpResponse) {\r\n this.actionInProgressService.actionEnded();\r\n }\r\n\r\n return event;\r\n }),\r\n catchError((error: HttpErrorResponse) => {\r\n this.actionInProgressService.actionEnded();\r\n\r\n return throwError(error);\r\n }));\r\n }\r\n}\r\n\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { ConfigurationService } from 'proceduralsystem-clientcomponents';\r\nimport { ActionInProgressService } from 'src/app/services/action-in-progress.service';\r\nimport { AppConfigService } from 'src/app/services/app-config.service';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class UserAuthInterceptor implements HttpInterceptor {\r\n\r\n constructor(\r\n private configurationService: ConfigurationService,\r\n private actionInProgressService: ActionInProgressService,\r\n private readonly config: AppConfigService,\r\n ) { }\r\n\r\n /**\r\n * Interceptor intercepts every outgoing/incoming http request\r\n * @param req\r\n * @param next\r\n */\r\n public intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n const userAuth: any = {\r\n userGuid: this.config.getValue('UserId'),\r\n userEmail: this.configurationService.getValue('UserName'),\r\n };\r\n let headers = req.headers;\r\n headers.append('userAuth', JSON.stringify(userAuth))\r\n headers.append('Cache-Control', 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0')\r\n headers.append('Pragma', 'no-cache')\r\n headers.append('Expires', '0')\r\n const userInfoReq: any = req.clone({\r\n headers: headers\r\n });\r\n\r\n this.actionInProgressService.actionStarted();\r\n\r\n return next.handle(userInfoReq);\r\n }\r\n}\r\n\r\n","import { Component, Output, EventEmitter, ViewChild } from '@angular/core';\r\nimport { CustomModalComponent } from '../../components/custom-modal/custom-modal.component';\r\n\r\n@Component({\r\n selector: 'oir-delete-modal',\r\n templateUrl: './delete-modal.component.html',\r\n styleUrls: ['./delete-modal.component.less']\r\n})\r\nexport class DeleteModalComponent {\r\n\r\n @Output() decision: EventEmitter = new EventEmitter();\r\n @ViewChild('confirmDeleteModal') confirmDeleteModal: CustomModalComponent;\r\n\r\n /**\r\n * Method to confirm cancel modal and clear input fields\r\n */\r\n public confirm(): void {\r\n this.decision.emit(true);\r\n this.confirmDeleteModal.close();\r\n }\r\n\r\n /**\r\n * Method to cancel modal\r\n */\r\n public cancel(): void {\r\n this.decision.emit(false);\r\n this.confirmDeleteModal.close();\r\n }\r\n\r\n /**\r\n * Toggle the cancel modal\r\n */\r\n public toggle(): void {\r\n this.confirmDeleteModal.toggle();\r\n }\r\n}\r\n","import { Component, Input, Output, EventEmitter, ViewChild, OnInit } from '@angular/core';\r\nimport { WorkItem } from '../../models/report.model';\r\nimport { DeleteModalComponent } from '../../modals/delete-modal/delete-modal.component';\r\nimport {TranslateService} from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'oir-work-item-instance',\r\n templateUrl: './work-item-instance.component.html',\r\n styleUrls: ['./work-item-instance.component.less']\r\n})\r\nexport class WorkItemInstanceComponent implements OnInit {\r\n\r\n @Input() index: number;\r\n @Input() workItem: WorkItem;\r\n @Input() sectionData;\r\n @Input() sectionType;\r\n @Input() disableWorkItem: boolean;\r\n\r\n @Output() saveWorkItem: EventEmitter = new EventEmitter();\r\n @Output() editWorkItem: EventEmitter = new EventEmitter();\r\n @Output() removeWorkItem: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('commonDeleteModal') commonDeleteModal: DeleteModalComponent;\r\n\r\n public editMode = false;\r\n public workItemId: number;\r\n\r\n constructor(\r\n private translateService: TranslateService\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.workItemId = this.workItem.workItemId;\r\n }\r\n\r\n /**\r\n * Method to get work item title\r\n */\r\n public getWorkItemTitle(): string {\r\n if (this.isWorkItemOutstanding()) {\r\n return this.workItem.businessDaySectionWorkItemPlaceholder;\r\n }\r\n\r\n return this.workItem.workItemTitles\r\n ? this.workItem.workItemTitles[0]\r\n : this.workItem[`workItemTitle${this.workItemTitleLangTag}`];\r\n }\r\n\r\n /**\r\n * Method to check if work item is outstanding\r\n */\r\n public isWorkItemOutstanding(): boolean {\r\n return this.workItem.isWorkItemOutstanding;\r\n }\r\n\r\n /**\r\n * Method to handle edit click\r\n */\r\n public onEdit(): void {\r\n this.editMode = true;\r\n this.editWorkItem.emit(this.editMode);\r\n }\r\n\r\n /**\r\n * Method to handle work item update emit\r\n * @param data\r\n */\r\n public onUpdateWorkItem(data: any): void {\r\n this.saveWorkItem.emit({\r\n formValue: data,\r\n index: this.index\r\n });\r\n this.editWorkItem.emit(false);\r\n }\r\n\r\n /**\r\n * Method to handle work item remove click\r\n */\r\n public onRemove(): void {\r\n this.commonDeleteModal.toggle();\r\n }\r\n\r\n /**\r\n * Function to confirm delete\r\n * @param event event\r\n */\r\n public deleteModalDecision(event: boolean): void {\r\n if (event) {\r\n this.removeWorkItem.emit(this.index);\r\n }\r\n }\r\n\r\n /**\r\n * Method to handle accordion closing\r\n */\r\n public onClose(): void {\r\n this.editMode = false;\r\n this.editWorkItem.emit(this.editMode);\r\n }\r\n\r\n private get workItemTitleLangTag(): string {\r\n return this.translateService.currentLang === 'en' ? 'Eng' : 'Gle';\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input, ViewChild, OnDestroy, ViewChildren, QueryList } from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\r\nimport {\r\n CollapsiblePanelComponent,\r\n SelectValue\r\n} from 'proceduralsystem-clientcomponents';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport {\r\n BusinessScheduleDay,\r\n BusinessDaySectionHeader\r\n} from 'src/app/shared/models/report.model';\r\nimport { Subscription } from 'rxjs';\r\nimport { ReportStoreService } from 'src/app/services/report-store.service';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { debounceTime, filter } from 'rxjs/operators';\r\nimport { GLOBALS } from 'src/app/shared/globals';\r\nimport { BusinessDaysTemplates } from 'src/app/shared/report.enum';\r\nimport { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\r\nimport { sortBy } from 'lodash-es';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { SectionComponent } from './section/section.component';\r\n\r\n@Component({\r\n selector: 'oir-day-instance',\r\n templateUrl: './day-instance.component.html',\r\n styleUrls: ['./day-instance.component.less']\r\n})\r\nexport class DayInstanceComponent implements OnInit, OnDestroy {\r\n @ViewChildren('sectionComponent') sectionComponents: QueryList;\r\n @Input() businessScheduleDay: BusinessScheduleDay;\r\n @Input() showDayTemplateField: boolean;\r\n @Input() showTemplateFieldOther: boolean;\r\n\r\n private _readonly = false;\r\n\r\n get readonly(): boolean {\r\n return this._readonly;\r\n }\r\n\r\n @Input() set readonly(value: boolean) {\r\n this._readonly = value;\r\n this.adjustReadonlyControls();\r\n }\r\n\r\n @ViewChild('panel') panel: CollapsiblePanelComponent;\r\n\r\n public disableSectionDrag = {};\r\n public dayInstanceForm: UntypedFormGroup;\r\n public isSittingDay: boolean;\r\n public isDayDefaultSittinDayByDate = true;\r\n public isEditMode = false;\r\n public isDayBeforeToday = false;\r\n public dayTemplate = BusinessDaysTemplates.Blank;\r\n public dayTemplateData: SelectValue[] = [\r\n {\r\n value: BusinessDaysTemplates.Blank,\r\n title: this.translateService.instant(\r\n 'VIEW_REPORT_DAY_INSTANCE.DAY_TEMPLATE_INPUT.VALUE.BLANK'\r\n )\r\n },\r\n {\r\n value: BusinessDaysTemplates.Tuesday,\r\n title: this.translateService.instant(\r\n 'VIEW_REPORT_DAY_INSTANCE.DAY_TEMPLATE_INPUT.VALUE.TUESDAY'\r\n )\r\n },\r\n {\r\n value: BusinessDaysTemplates.Wednesday,\r\n title: this.translateService.instant(\r\n 'VIEW_REPORT_DAY_INSTANCE.DAY_TEMPLATE_INPUT.VALUE.WEDNESDAY'\r\n )\r\n },\r\n {\r\n value: BusinessDaysTemplates.Thursday,\r\n title: this.translateService.instant(\r\n 'VIEW_REPORT_DAY_INSTANCE.DAY_TEMPLATE_INPUT.VALUE.THURSDAY'\r\n )\r\n }\r\n ];\r\n public mask = [/\\d/, /\\d/, ':', /\\d/, /\\d/];\r\n public reusableDayId: string;\r\n\r\n get startTime(): string {\r\n return this.sharedService.getTimeFromDate(\r\n this.businessScheduleDay.bsDayStartTime\r\n );\r\n }\r\n\r\n get endTime(): string {\r\n return this.sharedService.getTimeFromDate(\r\n this.businessScheduleDay.bsDayEndTime\r\n );\r\n }\r\n\r\n get dayTitle(): string {\r\n return this.sharedService.getDayNameFromDate(\r\n this.businessScheduleDay.bsDayDate\r\n );\r\n }\r\n\r\n private subscription: Subscription = new Subscription();\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private reportService: ReportService,\r\n private reportStoreService: ReportStoreService,\r\n private sharedService: SharedService,\r\n private translateService: TranslateService\r\n ) {}\r\n\r\n public ngOnInit(): void {\r\n this.businessScheduleDay.businessDaySectionHeaders = sortBy(\r\n this.businessScheduleDay.businessDaySectionHeaders.map(item => {\r\n return {\r\n ...item,\r\n bsSectionStartTime: this.sharedService.convertDateStringToTime(\r\n item.bsSectionStartTime\r\n ),\r\n bsSectionEndTime: this.sharedService.convertDateStringToTime(\r\n item.bsSectionEndTime\r\n )\r\n };\r\n }),\r\n 'businessDaySectionPositionNo'\r\n );\r\n\r\n this.dayInstanceForm = this.formBuilder.group({\r\n startTime: [\r\n '',\r\n [Validators.required, Validators.pattern('^([0-9]{2}):([0-9]{2})$')]\r\n ],\r\n sittingDay: null,\r\n reasonText: [\r\n '',\r\n [\r\n Validators.required,\r\n Validators.maxLength(250)\r\n ]\r\n ]\r\n });\r\n\r\n this.isSittingDay = this.businessScheduleDay.isBSDaySitting;\r\n\r\n this.populateForm();\r\n\r\n this.subscribeToFormChange();\r\n\r\n this.isDayDefaultSittinDayByDate =\r\n this.sharedService.isDayDefaultSittinDayByDate(\r\n this.businessScheduleDay.bsDayStartTime\r\n );\r\n\r\n this.subscription.add(\r\n this.reportService.dateChanged.subscribe(res => (this.isEditMode = res))\r\n );\r\n\r\n this.setDayId(this.businessScheduleDay.bsDayId);\r\n\r\n // Checking is day before today\r\n this.isDayBeforeToday = this.sharedService.isDayBeforeToday(\r\n this.businessScheduleDay.bsDayDate\r\n );\r\n\r\n this.adjustReadonlyControls();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n }\r\n\r\n /**\r\n * Method to handle day template value change\r\n * @param value\r\n */\r\n public onDayTemplateChange(value: number): void {\r\n this.reportStoreService.getAndSetNonDefaultBusinessDayTemplate(\r\n this.businessScheduleDay.bsDayDate,\r\n value,\r\n this.businessScheduleDay\r\n );\r\n }\r\n\r\n /**\r\n * Method to handle when section is droped\r\n * @param event\r\n */\r\n public onDrop(event: CdkDragDrop): void {\r\n moveItemInArray(\r\n this.businessScheduleDay.businessDaySectionHeaders,\r\n event.previousIndex,\r\n event.currentIndex\r\n );\r\n this.reportStoreService.updateSectionPosition(\r\n this.businessScheduleDay.bsDayDate,\r\n this.businessScheduleDay.businessDaySectionHeaders\r\n );\r\n }\r\n\r\n /**\r\n * Method to update day section expanded value in store\r\n * @param collapsed\r\n */\r\n public onDaySectionToggle(collapsed: boolean): void {\r\n this.reportStoreService.setDaySectionExpanded(\r\n this.businessScheduleDay.bsDayDate,\r\n !collapsed\r\n );\r\n }\r\n\r\n /**\r\n * Method to get end time of businessDay\r\n */\r\n public getDayEndTime(): string {\r\n return this.reportStoreService.getBusinessDayEndTime(\r\n this.businessScheduleDay.bsDayDate\r\n );\r\n }\r\n\r\n /**\r\n * Method to resotre disabled section\r\n * @param header\r\n */\r\n public addRemovedSection(header: BusinessDaySectionHeader): void {\r\n this.reportStoreService.enableHeaderForDefaultSection(\r\n this.businessScheduleDay.bsDayDate,\r\n header.bdSectionId\r\n );\r\n }\r\n\r\n /**\r\n * Hide or show section elements and other sections when editing.\r\n */\r\n public hideOtherSections(evt: any) {\r\n setTimeout(() => {\r\n const daySections = Array.from(document.querySelector(\r\n '.sections-for-day-' + evt.dayId\r\n ).children);\r\n this.disableSectionDrag[evt.sectionId] = evt.hideOthers;\r\n\r\n for (const daySection of daySections) {\r\n daySection.setAttribute(\r\n 'style',\r\n 'display: ' +\r\n (daySection.id !== 'section-' + evt.sectionId && evt.hideOthers\r\n ? 'none'\r\n : 'block')\r\n );\r\n }\r\n const dayDependantElements = [\r\n '.adjournment-',\r\n '.disabled-section-',\r\n '.new-section-',\r\n '.day-arrangement-'\r\n ];\r\n const sectionDependantElements = [\r\n '.section-time-',\r\n '.accordion-button-',\r\n '.drag-element-'\r\n ];\r\n dayDependantElements.forEach(x => {\r\n this.toggleVisibilityByClassAndEditId(x, evt.dayId, evt.hideOthers);\r\n });\r\n sectionDependantElements.forEach(x => {\r\n this.toggleVisibilityByClassAndEditId(x, evt.sectionId, evt.hideOthers);\r\n });\r\n }, 100);\r\n }\r\n\r\n /**\r\n * Toggle element visibility by class and editId, based on hideOthers value\r\n * @param selector\r\n * @param id\r\n * @param hideOthers\r\n */\r\n public toggleVisibilityByClassAndEditId(\r\n selector: string,\r\n id: number,\r\n hideOthers: boolean\r\n ) {\r\n if (!!document.querySelector(selector + id)) {\r\n const element = document.querySelector(selector + id);\r\n if (element) {\r\n (element as HTMLElement).style.display = hideOthers ? 'none' : 'block';\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set day ID or randomize\r\n */\r\n public setDayId(dayId: number): void {\r\n if (dayId === 0) {\r\n const dateOnly = this.businessScheduleDay.bsDayDate.split('T');\r\n this.reusableDayId = dateOnly[0];\r\n } else {\r\n this.reusableDayId = this.businessScheduleDay.bsDayId.toString();\r\n }\r\n }\r\n\r\n /**\r\n * Method to subscribe to form changes for various controls\r\n */\r\n private subscribeToFormChange(): void {\r\n this.subscription.add(\r\n this.dayInstanceForm\r\n .get('startTime')\r\n .valueChanges.pipe(filter(val => GLOBALS.timeFormatRegex.test(val)))\r\n .subscribe(val => {\r\n this.reportStoreService.setBusinessDayStartAndEndTime(\r\n this.businessScheduleDay.bsDayDate,\r\n val\r\n );\r\n })\r\n );\r\n\r\n this.subscription.add(\r\n this.dayInstanceForm.get('sittingDay').valueChanges.subscribe(val => {\r\n this.reportStoreService.setSittingDayStatus(\r\n this.businessScheduleDay.bsDayDate,\r\n val\r\n );\r\n })\r\n );\r\n\r\n this.subscription.add(\r\n this.dayInstanceForm.controls.reasonText.valueChanges\r\n .pipe(debounceTime(500))\r\n .subscribe(val =>\r\n this.reportStoreService.setDayReasonText(\r\n this.businessScheduleDay.bsDayDate,\r\n val\r\n )\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Method to populate form and disable controls if necessary\r\n */\r\n private populateForm(): void {\r\n this.dayInstanceForm.patchValue({\r\n startTime: this.startTime,\r\n sittingDay: this.businessScheduleDay.isBSDaySitting,\r\n reasonText: this.businessScheduleDay.bsDayNotSittingReason || ''\r\n });\r\n\r\n if (this.businessScheduleDay.bsDayTemplateId) {\r\n this.dayTemplate = this.businessScheduleDay.bsDayTemplateId;\r\n }\r\n\r\n // If is sitting disable reasonText\r\n if (this.businessScheduleDay.isBSDaySitting) {\r\n this.dayInstanceForm.controls.reasonText.disable();\r\n }\r\n\r\n // If is not sitting disable startTime\r\n if (!this.businessScheduleDay.isBSDaySitting) {\r\n this.dayInstanceForm.controls.startTime.disable();\r\n }\r\n }\r\n\r\n adjustReadonlyControls() {\r\n if (this.dayInstanceForm) {\r\n if (this.readonly) {\r\n this.dayInstanceForm.controls.startTime.disable({emitEvent: false});\r\n this.dayInstanceForm.controls.reasonText.disable({emitEvent: false});\r\n } else {\r\n // Covering similar logic from 'populateForm' function.\r\n if (!this.businessScheduleDay.isBSDaySitting) {\r\n this.dayInstanceForm.controls.reasonText.enable({emitEvent: false});\r\n } else {\r\n this.dayInstanceForm.controls.startTime.enable({emitEvent: false});\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewChild,\r\n OnDestroy,\r\n Input,\r\n AfterViewInit\r\n} from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators, UntypedFormArray } from '@angular/forms';\r\nimport { TypeaheadValue } from 'proceduralsystem-clientcomponents';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport {\r\n debounceTime,\r\n filter,\r\n takeUntil,\r\n map,\r\n distinctUntilChanged\r\n} from 'rxjs/operators';\r\nimport { ToggleableAccordionComponent } from 'src/app/shared/components/toggleable-accordion/toggleable-accordion.component';\r\nimport { CancelConfirmModalComponent } from 'src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\nimport { Subscription, Subject, Observable } from 'rxjs';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { ReportStoreService } from 'src/app/services/report-store.service';\r\nimport { isEmpty, isArray, findIndex, findLastIndex, last } from 'lodash-es';\r\nimport * as moment from 'moment';\r\nimport { FormTemplate, WorkItemTypes } from 'src/app/shared/report.enum';\r\nimport {\r\n BusinessScheduleDay,\r\n WorkItem\r\n} from 'src/app/shared/models/report.model';\r\nimport { GLOBALS } from 'src/app/shared/globals';\r\nimport { WorkItemFormComponent } from 'src/app/shared/components/work-item-form/work-item-form.component';\r\nimport OirCkEditor from 'proceduralsystem-ckeditor';\r\nimport { OirCkEditorConfig } from 'proceduralsystem-ckeditor';\r\nimport { ChangeEvent } from '@ckeditor/ckeditor5-angular/ckeditor.component';\r\nimport { EditorConfig } from 'src/app/shared/models/editor-config.model';\r\nimport { AppConfigService } from 'src/app/services/app-config.service';\r\n\r\n@Component({\r\n selector: 'oir-add-new-section',\r\n templateUrl: './add-new-section.component.html',\r\n styleUrls: ['./add-new-section.component.less']\r\n})\r\nexport class AddNewSectionComponent\r\n implements OnInit, AfterViewInit, OnDestroy\r\n{\r\n @Input() businessScheduleDay: BusinessScheduleDay;\r\n @Input() disableSection: boolean;\r\n\r\n @ViewChild('toggleableAccordion')\r\n toggleableAccordion: ToggleableAccordionComponent;\r\n @ViewChild('cancelConfirmModalComponent')\r\n cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n @ViewChild('workItemsForm') workItemsForm: WorkItemFormComponent;\r\n\r\n public canToggle = true;\r\n public addNewSectionForm: UntypedFormGroup;\r\n public partiesData$: Observable;\r\n public arrangementData: TypeaheadValue[] = [];\r\n public membersData$: Observable;\r\n public departmentData$: Observable;\r\n public sectionTypesData$: Observable;\r\n public sectionTypesData: Array = [];\r\n public keyUp = new Subject<{ id: number; value: string }>();\r\n \r\n Editor = OirCkEditor;\r\n ckEditorConfig: OirCkEditorConfig;\r\n\r\n public get arrangementsFormArray(): UntypedFormArray {\r\n return this.addNewSectionForm.get(\r\n 'sectionArrangementFormGroup'\r\n ) as UntypedFormArray;\r\n }\r\n public FormTemplate = FormTemplate;\r\n public customSectionData;\r\n public showWorkItems = false;\r\n public hasWorkItems = false;\r\n public minimumCharacter = false;\r\n\r\n private subscription = new Subscription();\r\n private ngUnsubscribe = new Subject();\r\n private departmentMultiselectLookup = [];\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private sharedService: SharedService,\r\n private reportService: ReportService,\r\n private reportStoreService: ReportStoreService,\r\n private configurationService: AppConfigService\r\n ) {\r\n this.ckEditorConfig = {\r\n ...EditorConfig,\r\n licenseKey: this.configurationService.getValue('CKEditor5LicenseKey')\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.addNewSectionForm = this.fb.group({\r\n newSectionType: [[], Validators.required],\r\n newSectionTitle: ['', [Validators.required, Validators.maxLength(250)]],\r\n newSectionTitleGa: ['', [Validators.maxLength(250)]],\r\n parties: [{ value: [], disabled: true }, Validators.required],\r\n department: [{ value: [], disabled: true }, Validators.required],\r\n isStartTimeFixed: false,\r\n sectionStartTime: [{ value: '', disabled: true }],\r\n sectionEndTime: [{ value: '', disabled: true }],\r\n sectionDuration: [\r\n '',\r\n [\r\n Validators.required,\r\n Validators.pattern('^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$')\r\n ]\r\n ],\r\n sectionDetails: [{ value: false, disabled: true }],\r\n sectionDetailsFreeTextBox: [\r\n '',\r\n [Validators.required, Validators.maxLength(500)]\r\n ],\r\n nextWeeksBusiness: [{ value: '', disabled: true }],\r\n nextWeeksBusinessFreeTextBox: [\r\n { value: '', disabled: true },\r\n [Validators.required, Validators.maxLength(500)]\r\n ],\r\n sectionArrangements: [{ value: false, disabled: true }],\r\n sectionArrangementFormGroup: this.fb.array([]),\r\n arrangementsProposedTitle: [\r\n { value: '', disabled: true },\r\n [Validators.required, Validators.maxLength(1000)]\r\n ],\r\n isHiddenOnDailBusiness: false,\r\n });\r\n\r\n // Get parties data\r\n this.partiesData$ = this.reportService.party.pipe(takeUntil(this.ngUnsubscribe));\r\n\r\n // Get department data\r\n this.departmentData$ = this.reportService.departments.pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(departments =>\r\n departments.map(department => {\r\n const departmentObj = {\r\n departmentId: department.departmentId,\r\n departmentName: department.departmentName\r\n };\r\n this.departmentMultiselectLookup.push(departmentObj);\r\n return {\r\n value: department.departmentId,\r\n title: department.departmentName\r\n };\r\n })\r\n )\r\n );\r\n\r\n // Get arrangement data\r\n this.reportService.sectionArrangement\r\n .pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(arrangements =>\r\n arrangements.map((arrangement, i) => ({\r\n value: i,\r\n title: arrangement\r\n }))\r\n )\r\n )\r\n .subscribe(res => (this.arrangementData = res));\r\n\r\n // Get members data\r\n this.membersData$ = this.reportService.members.pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(members =>\r\n members.map(member => ({ value: member.id, title: member.name }))\r\n )\r\n );\r\n\r\n // Get section types data\r\n this.sectionTypesData$ = this.reportService.sectionTypes.pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(sectionType =>\r\n sectionType.map(type => {\r\n const types = {\r\n bdSectionTypeId: type.bdSectionTypeId,\r\n bdSectionTypeName: type.bdSectionTypeName\r\n };\r\n this.sectionTypesData.push(types);\r\n return { value: type.bdSectionTypeId, title: type.bdSectionTypeName };\r\n })\r\n )\r\n );\r\n\r\n this.selectSectionTemplate();\r\n this.subscribeToFormValueChange();\r\n this.onArrangementToggle();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n this.onDetailsToggleChange();\r\n this.onNextWeeksBusinessChange();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Function to check is value empty\r\n * @param value Value\r\n */\r\n public hasValue(value): boolean {\r\n return !isEmpty(value);\r\n }\r\n\r\n /**\r\n * Method to check if first arrangement input has value\r\n */\r\n public firstArrangementInputHasValue(): boolean {\r\n const firstArrangement = this.arrangementsFormArray\r\n .controls[0] as UntypedFormGroup;\r\n\r\n return (\r\n !isEmpty(firstArrangement) &&\r\n !isEmpty(firstArrangement.controls.arrangements.value)\r\n );\r\n }\r\n\r\n /**\r\n * Function to get form controls\r\n */\r\n public getForm(): Array {\r\n return this.arrangementsFormArray.controls;\r\n }\r\n\r\n /**\r\n * Method to get data for Arrangement input\r\n */\r\n public getArrangementData(): TypeaheadValue[] {\r\n return this.sharedService.filterTypeAheadArrayForNoPillsInputTypeAheadBasedOnTitle(\r\n this.arrangementsFormArray,\r\n 'arrangements',\r\n this.arrangementData\r\n );\r\n }\r\n\r\n /**\r\n * Function witch triggers after accordion toggled\r\n * @param isOpen Param\r\n */\r\n public afterAccordionToggle(isOpen: boolean): void {\r\n this.canToggle = !isOpen;\r\n }\r\n\r\n /**\r\n * Function to call modal on close or cancel\r\n */\r\n public onAccordionClose(): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Function to close accordion on cancel\r\n * @param event Event\r\n */\r\n public cancelModalDecision(event: any): void {\r\n if (event) {\r\n this.closeAccordion();\r\n }\r\n }\r\n\r\n /**\r\n * Function to close accordion\r\n */\r\n public closeAccordion(): void {\r\n this.canToggle = true;\r\n this.addNewSectionForm.reset();\r\n // Need to timeout to allow change detection to work\r\n setTimeout(() => {\r\n this.toggleableAccordion.click();\r\n }, 1);\r\n }\r\n\r\n /**\r\n * Function to calculate end time\r\n */\r\n public durationChange(startTime: string): void {\r\n let minutesToAdd;\r\n const timeFormat = /^(0\\d|1\\d|2[0-3]):[0-5]\\d$/;\r\n const duration = this.addNewSectionForm.controls.sectionDuration.value;\r\n if (timeFormat.test(duration)) {\r\n const hoursToMinutes = moment.duration(duration).asMinutes();\r\n minutesToAdd = moment(startTime, 'HH:mm')\r\n .add(hoursToMinutes, 'minutes')\r\n .format('HH:mm');\r\n }\r\n return minutesToAdd;\r\n }\r\n\r\n /**\r\n * Function to add new section\r\n */\r\n public addNewSection(): void {\r\n const sectionTimeAndPositionData = this.getNewSectionTimeAndPositionData();\r\n\r\n const randomSectionId = this.sharedService.generateId();\r\n\r\n // New section data model\r\n this.customSectionData = {\r\n ...this.customSectionData,\r\n departments: this.sharedService.getMultiselectValues(\r\n this.departmentMultiselectLookup,\r\n this.addNewSectionForm,\r\n 'department',\r\n 'departmentId'\r\n ),\r\n partiesToAskQuestions: this.addNewSectionForm.controls.parties.value || [],\r\n bsSectionStartTime: this.addNewSectionForm.controls.sectionDuration.value\r\n ? this.sharedService.convertDate(sectionTimeAndPositionData.startDate)\r\n : '',\r\n bsSectionEndTime: this.addNewSectionForm.controls.sectionDuration.value\r\n ? this.sharedService.convertDate(sectionTimeAndPositionData.endDate)\r\n : '',\r\n businessDaySectionPositionNo: sectionTimeAndPositionData.position,\r\n businessDaySectionId: randomSectionId,\r\n businessDaySectionDuration: this.addNewSectionForm.controls\r\n .sectionDuration.value\r\n ? this.addNewSectionForm.controls.sectionDuration.value\r\n : null,\r\n businessDaySectionNote:\r\n this.addNewSectionForm.controls.sectionDetailsFreeTextBox.value,\r\n businessDaySectionPositionTemplateId:\r\n this.addNewSectionForm.controls.newSectionType.value,\r\n businessDaySectionTemplateId:\r\n this.addNewSectionForm.controls.newSectionType.value,\r\n businessDaySectionTitle:\r\n this.addNewSectionForm.controls.newSectionTitle.value,\r\n businessDaySectionTitleGle:\r\n this.addNewSectionForm.controls.newSectionTitleGa.value,\r\n businessScheduleArrangementProposal:\r\n this.addNewSectionForm.controls.arrangementsProposedTitle.value,\r\n isSectionArrangementUsed:\r\n this.addNewSectionForm.controls.sectionArrangements.value,\r\n isSectionNoteUsed: this.addNewSectionForm.controls.sectionDetails.value,\r\n isStartTimeFixed: this.addNewSectionForm.controls.isStartTimeFixed.value,\r\n businessScheduleDayId: 0,\r\n businessDaySectionTypeId:\r\n this.addNewSectionForm.controls.newSectionType.value,\r\n isSectionNextWeekBusinessUsed: this.addNewSectionForm.controls\r\n .nextWeeksBusiness.value\r\n ? true\r\n : false,\r\n sectionDetailNextWeekBusiness:\r\n this.addNewSectionForm.controls.nextWeeksBusinessFreeTextBox.value,\r\n arrangementOfSections: this.collectArrangementData(),\r\n isVisibleOnDailBusiness: ! this.addNewSectionForm.controls.isHiddenOnDailBusiness.value,\r\n };\r\n\r\n // Function to save new header\r\n this.reportStoreService.setNewSectionHeader(\r\n this.businessScheduleDay.bsDayDate,\r\n this.newSectionHeaders(\r\n sectionTimeAndPositionData.position,\r\n randomSectionId,\r\n this.addNewSectionForm.controls.sectionDuration.value\r\n ? sectionTimeAndPositionData.startDate\r\n : null,\r\n this.addNewSectionForm.controls.sectionDuration.value\r\n ? sectionTimeAndPositionData.endDate\r\n : null\r\n )\r\n );\r\n\r\n // Function to store section data\r\n this.reportStoreService.storeSectionData(\r\n sectionTimeAndPositionData.position,\r\n this.sharedService.cleanObjectNullValue(this.customSectionData),\r\n this.addNewSectionForm.controls.newSectionType.value,\r\n this.businessScheduleDay.bsDayDate\r\n );\r\n }\r\n\r\n /**\r\n * Method to handle adding new work item\r\n * @param data\r\n */\r\n public onAddWorkItem(data: any): void {\r\n if (!this.customSectionData) {\r\n this.customSectionData = {};\r\n }\r\n if (!this.customSectionData.workItems) {\r\n this.customSectionData.workItems = [];\r\n }\r\n\r\n const workItem = this.getWorkItemValueFromWorkItemForm(data);\r\n this.customSectionData.workItems.push(workItem);\r\n }\r\n\r\n /**\r\n * Method to handle updating work item\r\n * @param data\r\n */\r\n public onUpdateWorkItem(data: any): void {\r\n const workItem = this.getWorkItemValueFromWorkItemForm(data.formValue);\r\n if (+data.index > -1) {\r\n this.customSectionData.workItems[data.index] = workItem;\r\n }\r\n }\r\n\r\n public onArrangementChange(id: number, value: TypeaheadValue) {\r\n if (value) {\r\n this.keyUp.next({ id, value: value.title });\r\n }\r\n }\r\n\r\n public onNoArrangementResults(id: number, value: string): void {\r\n const arrangementFormGroup = this.arrangementsFormArray.controls[\r\n id\r\n ] as UntypedFormGroup;\r\n const arrangementFormControl = arrangementFormGroup.get('arrangement');\r\n if (arrangementFormControl) {\r\n arrangementFormControl.setValue(value);\r\n }\r\n }\r\n\r\n /**\r\n * Max character in arrangments\r\n */\r\n public maxMinArrangementChar(event): any {\r\n const length = event.target.value !== undefined\r\n ? event.target.value.length\r\n : event.target.innerText.length;\r\n if (\r\n length !== 0 &&\r\n length >= 5000 &&\r\n event.keyCode !== 46 &&\r\n event.keyCode !== 8 &&\r\n event.keyCode !== 37 &&\r\n event.keyCode !== 39\r\n ) {\r\n event.preventDefault();\r\n }\r\n this.minimumCharacter = length < 5;\r\n }\r\n\r\n /**\r\n * Function to handle work item remove\r\n * @param index Index\r\n */\r\n public onRemoveWorkItem(index: number): void {\r\n if (+index > -1) {\r\n this.customSectionData.workItems.splice(index, 1);\r\n }\r\n }\r\n\r\n /**\r\n * Method to extract work item values from work item form value\r\n * @param data\r\n */\r\n private getWorkItemValueFromWorkItemForm(data: any): WorkItem {\r\n const isWorkItemOutstanding =\r\n data.form.workItemBillOrMotion[0].value === GLOBALS.workItemOtherValue;\r\n let billSponsors = [];\r\n const isWorkItemTypeBillWithSponsors = data.form.billSponsors &&\r\n data.form.workItemType === WorkItemTypes.bills;\r\n\r\n if (isWorkItemTypeBillWithSponsors) {\r\n billSponsors = this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.governmentBusiness\r\n ? data.form.billSponsors\r\n : data.form.billSponsors.split(', ').map(x => +x);\r\n }\r\n\r\n const index = findIndex(data.workItemDataWithTags, [\r\n 'value',\r\n data.form.workItemBillOrMotion[0].value\r\n ]);\r\n return {\r\n workItemId: isWorkItemOutstanding\r\n ? null\r\n : data.form.workItemBillOrMotion[0].value,\r\n workItemTitles:\r\n index !== -1 ? [data.workItemDataWithTags[index].title] : [],\r\n businessDaySectionWorkItemPlaceholder: isWorkItemOutstanding\r\n ? data.form.businessDaySectionWorkItemPlaceholder\r\n : null,\r\n isWorkItemOutstanding,\r\n motionSponsors:\r\n data.form.motionSponsors &&\r\n data.form.workItemType === WorkItemTypes.motions &&\r\n data.form.motionSponsors\r\n ? JSON.parse(data.form.motionSponsors)\r\n : [],\r\n billSponsors,\r\n billStagesToConsider:\r\n data.form.workItemType === WorkItemTypes.bills && data.form.billStages\r\n ? data.form.billStages\r\n : null,\r\n workItemTypeInfo:\r\n this.sharedService.getWorkItemTypeInfoValueFromWorkItemForm(\r\n data.form.workItemType\r\n ),\r\n arrangementOfWorkItems:\r\n this.sharedService.getArrangementDataFromWorkItemForm(data.form),\r\n arrangementOfWorkItemProposal: data.form.proposalTitle || null,\r\n businessDaySectionWorkItemPositionNo: 0,\r\n ...(this.isDeferredDivisions\r\n && data.form.amendmentType\r\n && {amendmentType: data.form.amendmentType})\r\n };\r\n }\r\n\r\n /**\r\n * Function to get date and position for new section\r\n */\r\n private getNewSectionTimeAndPositionData(): any {\r\n const newSectionData = {\r\n lastIndex: null,\r\n lastElement: null,\r\n startDate: null,\r\n endDate: null,\r\n position: null\r\n };\r\n\r\n // Checking if Day have sections\r\n if (!isEmpty(this.businessScheduleDay.businessDaySectionHeaders)) {\r\n // If day Have sections geting last index with end time\r\n newSectionData.lastIndex = findLastIndex(\r\n this.businessScheduleDay.businessDaySectionHeaders,\r\n (item: any) => {\r\n return item.bsSectionEndTime !== null;\r\n }\r\n );\r\n\r\n // Geting last element of sections to get position of this element\r\n newSectionData.lastElement = last(\r\n this.businessScheduleDay.businessDaySectionHeaders\r\n );\r\n\r\n // Serching for position whitch is not null\r\n const positionIndex = findLastIndex(\r\n this.businessScheduleDay.businessDaySectionHeaders,\r\n (item: any) => {\r\n return item.businessDaySectionPositionNo !== null;\r\n }\r\n );\r\n\r\n // Assigning position for new section\r\n newSectionData.position =\r\n positionIndex > -1\r\n ? this.businessScheduleDay.businessDaySectionHeaders[positionIndex]\r\n .businessDaySectionPositionNo + 1\r\n : 1;\r\n\r\n if (newSectionData.lastIndex > -1) {\r\n // Generating start date from business day and previous section end time whitch will be new section start time\r\n newSectionData.startDate =\r\n moment\r\n .utc(\r\n this.sharedService.convertDate(this.businessScheduleDay.bsDayDate)\r\n )\r\n .format(GLOBALS.dateFormat) +\r\n ' ' +\r\n this.businessScheduleDay.businessDaySectionHeaders[\r\n newSectionData.lastIndex\r\n ].bsSectionEndTime;\r\n\r\n // On duration change and plus business day date creating end time of new section\r\n newSectionData.endDate =\r\n moment\r\n .utc(\r\n this.sharedService.convertDate(this.businessScheduleDay.bsDayDate)\r\n )\r\n .format(GLOBALS.dateFormat) +\r\n ' ' +\r\n this.durationChange(\r\n this.businessScheduleDay.businessDaySectionHeaders[\r\n newSectionData.lastIndex\r\n ].bsSectionEndTime\r\n );\r\n } else {\r\n // Generating start date from business day date and day start time\r\n newSectionData.startDate =\r\n moment\r\n .utc(\r\n this.sharedService.convertDate(this.businessScheduleDay.bsDayDate)\r\n )\r\n .format(GLOBALS.dateFormat) +\r\n ' ' +\r\n this.sharedService.getTimeFromDate(\r\n this.businessScheduleDay.bsDayStartTime\r\n );\r\n\r\n // Generating end date from business day date and duration\r\n newSectionData.endDate =\r\n moment\r\n .utc(\r\n this.sharedService.convertDate(this.businessScheduleDay.bsDayDate)\r\n )\r\n .format(GLOBALS.dateFormat) +\r\n ' ' +\r\n this.durationChange(\r\n this.sharedService.getTimeFromDate(\r\n this.businessScheduleDay.bsDayStartTime\r\n )\r\n );\r\n }\r\n } else {\r\n // If no section are in business day then position will be 1\r\n newSectionData.position = 1;\r\n\r\n // Generating start date from business day date and day start time\r\n newSectionData.startDate =\r\n moment\r\n .utc(\r\n this.sharedService.convertDate(this.businessScheduleDay.bsDayDate)\r\n )\r\n .format(GLOBALS.dateFormat) +\r\n ' ' +\r\n this.sharedService.getTimeFromDate(\r\n this.businessScheduleDay.bsDayStartTime\r\n );\r\n\r\n // Generating end date from business day date and duration\r\n newSectionData.endDate =\r\n moment\r\n .utc(\r\n this.sharedService.convertDate(this.businessScheduleDay.bsDayDate)\r\n )\r\n .format(GLOBALS.dateFormat) +\r\n ' ' +\r\n this.durationChange(\r\n this.sharedService.getTimeFromDate(\r\n this.businessScheduleDay.bsDayStartTime\r\n )\r\n );\r\n }\r\n\r\n return newSectionData;\r\n }\r\n\r\n /**\r\n * Function to return new Section object\r\n * @param id Random section id\r\n * @param startTime Start Time\r\n * @param endTime End Time\r\n */\r\n private newSectionHeaders(\r\n position: number,\r\n id: string,\r\n startTime: string,\r\n endTime: string\r\n ): object {\r\n return {\r\n bdSectionId: id,\r\n bsSectionStartTime: startTime,\r\n bsSectionEndTime: endTime,\r\n bsDaySectionTitle: this.addNewSectionForm.controls.newSectionTitle.value,\r\n businessDaySectionType: {\r\n bdSectionTypeId: this.addNewSectionForm.controls.newSectionType.value,\r\n bdSectionTypeName: this.addNewSectionForm.controls.newSectionTitle.value\r\n },\r\n businessDaySectionTypeId:\r\n this.addNewSectionForm.controls.newSectionType.value,\r\n businessDaySectionPositionNo: position,\r\n isDataValid: true,\r\n isNewSection: true\r\n };\r\n }\r\n\r\n /**\r\n * Function to collect arrangements\r\n */\r\n private collectArrangementData(): Array {\r\n const arrangementOfSections = [];\r\n this.arrangementsFormArray.controls.forEach(control => {\r\n if (control.get('arrangements').value.length > 0) {\r\n const obj = {\r\n arrangementOfSectionId: 0,\r\n arrangementOfSectionDescription: control.get('arrangements').value,\r\n isDissentingMembersAssigned: control.get('dissentMembersBox').value,\r\n isArrangementAppearOnFront: true,\r\n dissentingMembers: control.get('dissentMembers').value.map(item => {\r\n return {\r\n id: item.value,\r\n name: item.title\r\n };\r\n })\r\n };\r\n arrangementOfSections.push(obj);\r\n }\r\n });\r\n return arrangementOfSections;\r\n }\r\n\r\n /**\r\n * Function to show section details on toggle\r\n */\r\n private onDetailsToggleChange(): void {\r\n this.subscription.add(\r\n this.addNewSectionForm.controls.sectionDetails.valueChanges.subscribe(\r\n val => {\r\n if (val) {\r\n this.addNewSectionForm.controls.sectionDetailsFreeTextBox.enable();\r\n } else {\r\n this.addNewSectionForm.controls.sectionDetailsFreeTextBox.disable();\r\n }\r\n this.addNewSectionForm.updateValueAndValidity();\r\n }\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Function to show next weeks business details on toggle\r\n */\r\n private onNextWeeksBusinessChange(): void {\r\n this.subscription.add(\r\n this.addNewSectionForm.controls.nextWeeksBusiness.valueChanges.subscribe(\r\n val => {\r\n if (val) {\r\n this.addNewSectionForm.controls.nextWeeksBusinessFreeTextBox.enable();\r\n } else {\r\n this.addNewSectionForm.controls.nextWeeksBusinessFreeTextBox.disable();\r\n }\r\n this.addNewSectionForm.updateValueAndValidity();\r\n }\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Function to select Section template\r\n */\r\n private selectSectionTemplate(): void {\r\n this.subscription.add(\r\n this.addNewSectionForm.controls.newSectionType.valueChanges\r\n .pipe(debounceTime(100))\r\n .subscribe(val => {\r\n // Clear custom section data on work item change\r\n this.customSectionData = !isEmpty(this.customSectionData)\r\n ? {}\r\n : this.customSectionData;\r\n\r\n // Disable field before create new template\r\n this.disableFields(this.addNewSectionForm, [\r\n 'parties',\r\n 'department',\r\n 'sectionDetails',\r\n 'sectionArrangements',\r\n 'nextWeeksBusiness'\r\n ]);\r\n\r\n // Patch title value\r\n this.addNewSectionForm.patchValue(\r\n {\r\n newSectionTitle: this.populateNewSectionTitle(val)\r\n },\r\n { emitEvent: false }\r\n );\r\n\r\n // Call function to show hide fields\r\n this.sharedService.showOrHideFormFieldsBasedOnTemplate(\r\n this.addNewSectionForm,\r\n val\r\n );\r\n\r\n this.showWorkItems = false;\r\n\r\n // Re-generate work item types on section type change\r\n if (this.checkWorkItems()) {\r\n setTimeout(() => {\r\n this.showWorkItems = true;\r\n }, 50);\r\n setTimeout(() => {\r\n this.workItemsForm.generateWorkItemsTypeData();\r\n this.workItemsForm.onAddNewSectionTemplateChange();\r\n }, 100);\r\n }\r\n if (val === FormTemplate.motions) {\r\n this.addNewSectionForm.controls.sectionArrangements.patchValue(\r\n true\r\n );\r\n } else {\r\n this.addNewSectionForm.controls.sectionArrangements.patchValue(\r\n false\r\n );\r\n }\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Function to get Section title\r\n * @param selectedValue Selected value\r\n */\r\n private populateNewSectionTitle(selectedValue: any): string {\r\n const index = findIndex(this.sectionTypesData, [\r\n 'bdSectionTypeId',\r\n selectedValue\r\n ]);\r\n return selectedValue === FormTemplate.custom || index === -1\r\n ? ''\r\n : this.sectionTypesData[index].bdSectionTypeName;\r\n }\r\n\r\n /**\r\n * Function to disable nessesery fields\r\n * @param form UntypedFormGroup\r\n * @param fieldsToDisable Field to disable\r\n */\r\n private disableFields(form: UntypedFormGroup, fieldsToDisable: Array): void {\r\n fieldsToDisable.forEach(control => {\r\n form.controls[control].disable();\r\n });\r\n }\r\n\r\n /**\r\n * Function to create arrangement form\r\n * If there params ar passed then patch them\r\n * @param arrangement Arrangements\r\n * @param dissentMembersBox Dissenting Memebers checkbox\r\n * @param dissentMembers Dissenting member list\r\n */\r\n private addArrangementFormControl(): void {\r\n // Creating arrangement form\r\n const arrangementForm: UntypedFormGroup = this.fb.group({\r\n arrangements: [[]],\r\n dissentMembersBox: false,\r\n dissentMembers: [[]]\r\n });\r\n this.arrangementsFormArray.push(arrangementForm);\r\n\r\n // Subscribing to value changes\r\n this.subscription.add(\r\n arrangementForm.controls.arrangements.valueChanges\r\n .pipe(filter(val => !isEmpty(val) && isArray(val) && !isEmpty(val[0])))\r\n .subscribe(res => {\r\n arrangementForm.controls.arrangements.patchValue(res[0].title);\r\n })\r\n );\r\n\r\n // Show hide fields\r\n this.sharedService.showFieldIfOtherFieldValueIs(\r\n this.subscription,\r\n arrangementForm,\r\n 'dissentMembersBox',\r\n true,\r\n 'dissentMembers'\r\n );\r\n }\r\n\r\n /**\r\n * On Arrangement Toggle trigger\r\n */\r\n private onArrangementToggle(): void {\r\n this.subscription.add(\r\n this.addNewSectionForm.controls.sectionArrangements.valueChanges.subscribe(\r\n res => {\r\n if (res) {\r\n this.addArrangementFormControl();\r\n this.addNewSectionForm.controls.arrangementsProposedTitle.enable();\r\n this.addNewSectionForm.patchValue(\r\n {\r\n arrangementsProposedTitle: !isEmpty(\r\n this.addNewSectionForm.controls.arrangementsProposedTitle\r\n .value\r\n )\r\n ? this.addNewSectionForm.controls.arrangementsProposedTitle\r\n .value\r\n : this.addNewSectionForm.controls.newSectionTitle.value\r\n },\r\n { emitEvent: false }\r\n );\r\n } else {\r\n this.clearArrangementsForm();\r\n this.addNewSectionForm.controls.arrangementsProposedTitle.disable();\r\n this.addNewSectionForm.controls.arrangementsProposedTitle.setValue(\r\n null\r\n );\r\n }\r\n }\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Clear arrangement form\r\n */\r\n private clearArrangementsForm(): void {\r\n while (this.arrangementsFormArray.length) {\r\n this.arrangementsFormArray.removeAt(0);\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to form changes\r\n */\r\n private subscribeToFormValueChange(): void {\r\n this.keyUp\r\n .pipe(\r\n debounceTime(2000),\r\n distinctUntilChanged(),\r\n takeUntil(this.ngUnsubscribe)\r\n )\r\n .subscribe(res => {\r\n const arrangement = this.arrangementsFormArray.controls[\r\n res.id\r\n ] as UntypedFormGroup;\r\n if (\r\n isEmpty(arrangement.controls.arrangements.value) &&\r\n res.value.length >= 5\r\n ) {\r\n arrangement.controls.arrangements.setValue(\r\n [{ value: 0, title: res.value }],\r\n { onlySelf: true, emitEvent: false }\r\n );\r\n }\r\n });\r\n this.subscription.add(\r\n this.addNewSectionForm.valueChanges.subscribe(formValue => {\r\n if (isArray(formValue.sectionArrangementFormGroup)) {\r\n // Loop through arrangementsFormArray and remove empty input form groups\r\n formValue.sectionArrangementFormGroup.forEach((element, i) => {\r\n // Skip last element as it can be empty\r\n if (\r\n i < formValue.sectionArrangementFormGroup.length - 1 &&\r\n isEmpty(element.arrangements)\r\n ) {\r\n this.arrangementsFormArray.removeAt(i);\r\n }\r\n });\r\n\r\n // If last form group has Arrangement value then add new form group\r\n if (\r\n !isEmpty(\r\n formValue.sectionArrangementFormGroup[\r\n formValue.sectionArrangementFormGroup.length - 1\r\n ]\r\n ) &&\r\n !isEmpty(\r\n formValue.sectionArrangementFormGroup[\r\n formValue.sectionArrangementFormGroup.length - 1\r\n ].arrangements\r\n )\r\n ) {\r\n this.addArrangementFormControl();\r\n }\r\n }\r\n })\r\n );\r\n }\r\n\r\n private checkWorkItems(): boolean {\r\n return (\r\n this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.privateMembersBill ||\r\n this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.privateMembersBusiness ||\r\n this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.motions ||\r\n this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.governmentBusiness ||\r\n this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.billsForIntroduction ||\r\n this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.referralToCommittee ||\r\n this.isDeferredDivisions\r\n );\r\n }\r\n\r\n public isFormValid(): boolean {\r\n const isWorkItemCheckRequired = this.showWorkItems && !this.isDeferredDivisions;\r\n \r\n if (this.addNewSectionForm.controls.sectionArrangements.value) {\r\n if (isWorkItemCheckRequired) {\r\n if (!isEmpty(this.customSectionData)) {\r\n return (\r\n !isEmpty(this.customSectionData.workItems) &&\r\n this.addNewSectionForm.valid &&\r\n this.firstArrangementInputHasValue()\r\n );\r\n }\r\n return false;\r\n }\r\n return (\r\n this.addNewSectionForm.valid && this.firstArrangementInputHasValue()\r\n );\r\n }\r\n if (isWorkItemCheckRequired) {\r\n if (!isEmpty(this.customSectionData)) {\r\n return (\r\n !isEmpty(this.customSectionData.workItems) &&\r\n this.addNewSectionForm.valid\r\n );\r\n }\r\n return false;\r\n }\r\n return this.addNewSectionForm.valid;\r\n }\r\n\r\n public onSectionTypeChange(type: number) {\r\n const gaTitleController = this.addNewSectionForm.get('newSectionTitleGa');\r\n\r\n if (type === FormTemplate.custom) {\r\n gaTitleController.enable({emitEvent: false});\r\n } else if (!gaTitleController.disabled) {\r\n gaTitleController.disable({emitEvent: false});\r\n }\r\n }\r\n\r\n validateArrangementLength(arrangement: UntypedFormControl, { editor }: ChangeEvent) {\r\n const value = editor.getData();\r\n\r\n return this.sharedService.validateArrangementLength(arrangement, value);\r\n }\r\n\r\n get isWorkItemLimitReached(): boolean {\r\n return (this.isBillsForIntroduction\r\n || this.isDeferredDivisions\r\n || this.isReferralToCommittee)\r\n && this.customSectionData\r\n && this.customSectionData.workItems\r\n && this.customSectionData.workItems.length >= (this.isDeferredDivisions ? 20 : 10);\r\n }\r\n\r\n get isBillsForIntroduction(): boolean {\r\n return this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.billsForIntroduction;\r\n }\r\n\r\n get isDeferredDivisions(): boolean {\r\n return this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.deferredDivisions;\r\n }\r\n\r\n get isReferralToCommittee(): boolean {\r\n return this.addNewSectionForm.controls.newSectionType.value ===\r\n FormTemplate.referralToCommittee;\r\n }\r\n}\r\n","import { Component, OnInit, ViewChild, OnDestroy, Input } from '@angular/core';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray, UntypedFormControl } from '@angular/forms';\r\nimport { TypeaheadValue } from 'proceduralsystem-clientcomponents';\r\nimport { Subscription, Subject, Observable } from 'rxjs';\r\nimport { isEmpty, isArray } from 'lodash-es';\r\nimport { takeUntil, map, filter, debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { ToggleableAccordionComponent } from 'src/app/shared/components/toggleable-accordion/toggleable-accordion.component';\r\nimport { CancelConfirmModalComponent } from 'src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\nimport { ReportStoreService } from 'src/app/services/report-store.service';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport OirCkEditor from 'proceduralsystem-ckeditor';\r\nimport { OirCkEditorConfig } from 'proceduralsystem-ckeditor';\r\nimport { EditorConfig } from 'src/app/shared/models/editor-config.model';\r\nimport { AppConfigService } from 'src/app/services/app-config.service';\r\nimport { ChangeEvent } from '@ckeditor/ckeditor5-angular/ckeditor.component';\r\n\r\n@Component({\r\n selector: 'oir-day-arrangement',\r\n templateUrl: './day-arrangement.component.html',\r\n styleUrls: ['./day-arrangement.component.less']\r\n})\r\nexport class DayArrangementComponent implements OnInit, OnDestroy {\r\n @Input() bsDayDate: string;\r\n @Input() disableDayArrangement: boolean;\r\n\r\n @ViewChild('dayArrangementAccordion') dayArrangementAccordion: ToggleableAccordionComponent;\r\n @ViewChild('cancelConfirmModalComponent') cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n public dayArrangementForm: UntypedFormGroup;\r\n public arrangementData: TypeaheadValue[] = [];\r\n public membersData$: Observable;\r\n public canToggle = true;\r\n public keyUp = new Subject<{ id: number, value: string }>();\r\n \r\n Editor = OirCkEditor;\r\n ckEditorConfig: OirCkEditorConfig;\r\n \r\n public get arrangementsFormArray(): UntypedFormArray {\r\n return this.dayArrangementForm.get('arrangmentsGroup') as UntypedFormArray;\r\n }\r\n\r\n private hasInitialArrangements = false;\r\n private subscription = new Subscription();\r\n private ngUnsubscribe = new Subject();\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private translateService: TranslateService,\r\n private reportService: ReportService,\r\n private sharedService: SharedService,\r\n private reportStoreService: ReportStoreService,\r\n private configurationService: AppConfigService\r\n ) {\r\n this.ckEditorConfig = {\r\n ...EditorConfig,\r\n licenseKey: this.configurationService.getValue('CKEditor5LicenseKey')\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.dayArrangementForm = this.formBuilder.group({\r\n arrangmentsGroup: this.formBuilder.array([]),\r\n proposal: ['', [Validators.maxLength(250), Validators.required]]\r\n });\r\n\r\n this.membersData$ = this.reportService.members\r\n .pipe(map(members => members.map(member => ({ value: member.id, title: member.name}))));\r\n\r\n this.reportService.dayArrangement\r\n .pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(arrengements => arrengements\r\n .map((arrengement, i) => ({value: i, title: arrengement}))))\r\n .subscribe(res => this.arrangementData = res);\r\n\r\n this.subscribeToFormValueChange();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Method to get data for Arrangement input\r\n */\r\n public getArrangementData(): TypeaheadValue[] {\r\n return this.sharedService.filterTypeAheadArrayForNoPillsInputTypeAheadBasedOnTitle(this.arrangementsFormArray, 'arrangement', this.arrangementData);\r\n }\r\n\r\n\r\n public onArrangementChange(id: number, value: TypeaheadValue) {\r\n if (value) {\r\n this.keyUp.next({ id, value: value.title });\r\n }\r\n }\r\n\r\n public onNoArrangementResults(id: number, value: string): void {\r\n const arrangementFormGroup = this.arrangementsFormArray.controls[id] as UntypedFormGroup;\r\n const arrangementFormControl = arrangementFormGroup.get('arrangement');\r\n if (arrangementFormControl) {\r\n arrangementFormControl.setValue(value);\r\n }\r\n }\r\n\r\n /**\r\n * Method to save day arrangement accordion data\r\n */\r\n public save(): void {\r\n const arrangement = [];\r\n const proposalTitle = this.dayArrangementForm.controls.proposal.value;\r\n const items = this.arrangementsFormArray;\r\n for (let i = 0; i < items.length; i++) {\r\n if (items.controls[i].get('arrangement').value.length > 0) {\r\n const obj = {\r\n arrangementId: items.controls[i].get('arrangementId').value || 0,\r\n arrangementDescription: items.controls[i].get('arrangement').value,\r\n isDissentingMember: items.controls[i].get('dissenting').value,\r\n isArrangementAppearOnFront: true,\r\n arrangementMembers: items.controls[i].get('arrangementMembers').value.map((item) => {\r\n return {\r\n id: item.value,\r\n name: item.title\r\n };\r\n })\r\n };\r\n arrangement.push(obj);\r\n }\r\n }\r\n const dayArrangementsCleared = this.hasInitialArrangements && arrangement.length === 0;\r\n this.reportStoreService.setCustomArrangements(arrangement, proposalTitle, this.bsDayDate, dayArrangementsCleared);\r\n this.closeAccordion();\r\n }\r\n /**\r\n * Method that is triggered every time before toggling day arrangement accordion\r\n * @param isOpening indicates if accordion is going to be opened\r\n */\r\n public onDayArrangementAccordionToggle(isOpening: boolean): void {\r\n if (isOpening) {\r\n this.populateDayArrangementForm();\r\n }\r\n }\r\n\r\n /**\r\n * Method to check if passed object is not empty and therefore has value\r\n * @param value\r\n */\r\n public hasValue(value): boolean {\r\n return !isEmpty(value);\r\n }\r\n\r\n /**\r\n * Method that is triggered every time after accordion toggle has happened\r\n * @param isOpen indicates if accordion is opened or closed\r\n */\r\n public afterDayArrangementAccordionToggle(isOpen: boolean): void {\r\n this.canToggle = !isOpen;\r\n }\r\n\r\n /**\r\n * Method to trigger cancelConfirmModal when accordion close toggle occurs\r\n */\r\n public onAccordionClose(): void {\r\n this.disableDayArrangement ? this.closeAccordion() :\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Method to hande cancelConfirmModal response\r\n * @param event\r\n */\r\n public cancelModalDecision(event): void {\r\n if (event) {\r\n this.closeAccordion();\r\n }\r\n }\r\n\r\n /**\r\n * Method to populate day arrangement form\r\n */\r\n public populateDayArrangementForm(): void {\r\n // Geting exsisting arrangements\r\n const arrangements = this.reportStoreService.getCustomArrangements(this.bsDayDate);\r\n const arrangementsProposalTitle = this.reportStoreService.getArrangementProposalTitle(this.bsDayDate);\r\n this.hasInitialArrangements = !isEmpty(arrangements);\r\n if (this.hasInitialArrangements) {\r\n // Loop try arrangements and populate form\r\n arrangements.forEach((arrangement, i) => {\r\n this.addArrangementControl(\r\n arrangement.arrangementId,\r\n { value: i, title: arrangement.arrangementDescription},\r\n arrangement.isDissentingMember,\r\n arrangement.arrangementMembers.map(x => ({value: x.id, title: x.name}))\r\n );\r\n });\r\n } else {\r\n // Create default control\r\n this.addArrangementControl();\r\n }\r\n // If there is proposal title assign value, if no then add default value\r\n this.dayArrangementForm.patchValue({\r\n proposal: arrangementsProposalTitle || this.translateService.instant('DAY_ARRANGEMENT_ACCORDION.PROPOSAL_INPUT_VALUE')\r\n });\r\n }\r\n\r\n /**\r\n * Method to check if form is valid\r\n */\r\n public isFormValid(): boolean {\r\n return (this.dayArrangementForm.valid && this.firstArrangementInputHasValue()) ||\r\n (this.dayArrangementForm.valid && this.dayHasArrangements());\r\n }\r\n\r\n /**\r\n * Method to check if first arrangement input has value\r\n */\r\n public firstArrangementInputHasValue(): boolean {\r\n const firstArrangement = this.arrangementsFormArray.controls[0] as UntypedFormGroup;\r\n\r\n return !isEmpty(firstArrangement) &&\r\n !isEmpty(firstArrangement.controls.arrangement.value);\r\n }\r\n\r\n /**\r\n * Function to check is day instance has arrangements\r\n */\r\n private dayHasArrangements(): boolean {\r\n const arrangements = this.reportStoreService.getCustomArrangements(this.bsDayDate);\r\n\r\n return arrangements ? arrangements.length > 0 : false;\r\n }\r\n\r\n /**\r\n * Method to close day arrangement accordion\r\n */\r\n private closeAccordion(): void {\r\n this.canToggle = true;\r\n\r\n // Need to timeout to allow change detection to work for canToggle\r\n setTimeout(() => {\r\n this.dayArrangementAccordion.click();\r\n\r\n // Clear formArray\r\n while (this.arrangementsFormArray.length) {\r\n this.arrangementsFormArray.removeAt(0);\r\n }\r\n this.dayArrangementForm.reset();\r\n }, 1);\r\n }\r\n\r\n /**\r\n * Metod to add form control to arrangements list\r\n * @param index\r\n */\r\n private addArrangementControl(arrangementId?: number | string, arrangement?: any, dissenting?: any, arrangementMembers?: any): void {\r\n const arrangementForm: UntypedFormGroup = this.formBuilder.group({\r\n arrangementId: '',\r\n arrangement: [[]],\r\n dissenting: false,\r\n arrangementMembers: [[], Validators.required]\r\n });\r\n this.arrangementsFormArray.push(arrangementForm);\r\n\r\n this.subscription.add(\r\n arrangementForm.controls.arrangement.valueChanges\r\n .pipe(filter(val => !isEmpty(val) && isArray(val) && !isEmpty(val[0])))\r\n .subscribe(res => {\r\n arrangementForm.controls.arrangement.patchValue(res[0].title);\r\n }));\r\n\r\n this.sharedService.showFieldIfOtherFieldValueIs(this.subscription, arrangementForm, 'dissenting', true, 'arrangementMembers');\r\n // If arrangement exsist populate form\r\n if (arrangement) {\r\n arrangementForm.patchValue({\r\n arrangementId,\r\n arrangement: [arrangement],\r\n dissenting,\r\n arrangementMembers\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Method to subscribe to form value change to add/remove arrangement form groups\r\n */\r\n private subscribeToFormValueChange(): void {\r\n this.subscription.add(this.dayArrangementForm.valueChanges.subscribe(formValue => {\r\n if (isArray(formValue.arrangmentsGroup)) {\r\n\r\n // Loop through arrangementsFormArray and remove empty input form groups\r\n formValue.arrangmentsGroup.forEach((element, i) => {\r\n // Skip last element as it can be empty\r\n if (i < formValue.arrangmentsGroup.length - 1 &&\r\n isEmpty(element.arrangement)) {\r\n this.arrangementsFormArray.removeAt(i);\r\n }\r\n });\r\n\r\n // If last form group has Arrangement value then add new form group\r\n if (!isEmpty(formValue.arrangmentsGroup[formValue.arrangmentsGroup.length - 1]) &&\r\n !isEmpty(formValue.arrangmentsGroup[formValue.arrangmentsGroup.length - 1].arrangement)) {\r\n this.addArrangementControl();\r\n }\r\n this.keyUp.pipe(\r\n debounceTime(2000),\r\n distinctUntilChanged(),\r\n takeUntil(this.ngUnsubscribe)\r\n ).subscribe(res => {\r\n const arrangement = this.arrangementsFormArray.controls[res.id] as UntypedFormGroup;\r\n if (isEmpty(arrangement.controls.arrangement.value)) {\r\n arrangement.controls.arrangement.setValue([{ value: 0, title: res.value }], { onlySelf: true, emitEvent: false });\r\n }\r\n });\r\n }\r\n }));\r\n }\r\n\r\n validateArrangementLength(arrangement: UntypedFormControl, { editor }: ChangeEvent) {\r\n const value = editor.getData();\r\n return this.sharedService.validateArrangementLength(arrangement, value);\r\n }\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n OnInit,\r\n Output,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { SelectValue } from 'proceduralsystem-clientcomponents';\r\nimport { take } from 'rxjs/operators';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport * as moment from 'moment';\r\n\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { ReportStoreService } from 'src/app/services/report-store.service';\r\nimport { CustomModalComponent } from 'src/app/shared/components/custom-modal/custom-modal.component';\r\nimport { AvailableSectionDate, BusinessDaySectionHeader } from 'src/app/shared/models/report.model';\r\nimport { GLOBALS } from 'src/app/shared/globals';\r\n\r\n@Component({\r\n selector: 'oir-move-section-modal',\r\n templateUrl: './move-section-modal.component.html',\r\n styleUrls: ['./move-section-modal.component.less']\r\n})\r\n\r\nexport class MoveSectionModalComponent implements OnInit {\r\n @ViewChild('moveSectionModal') moveSectionModal: CustomModalComponent;\r\n @Input() sectionHeader: BusinessDaySectionHeader;\r\n\r\n private _bsDayDate: string;\r\n\r\n @Input() set bsDayDate(bsDayDate: string) {\r\n this._bsDayDate = bsDayDate;\r\n this.formattedBsDayDate = moment(bsDayDate, `${GLOBALS.dateFormat} hh:mm:ss`).format(GLOBALS.dateFormat);\r\n }\r\n\r\n get bsDayDate(): string {\r\n return this._bsDayDate;\r\n }\r\n\r\n @Output() public sectionCopyCurrentBcr = new EventEmitter();\r\n\r\n public title: string;\r\n public description: string;\r\n public toDuplicate = true;\r\n public form: UntypedFormGroup;\r\n public datesSelectValues: SelectValue[];\r\n private availableSectionDates: AvailableSectionDate[];\r\n private reportId: number;\r\n private formattedBsDayDate: string;\r\n private readonly today = moment.utc().set({ hour: 0, minute: 0, second: 0 });\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private translateService: TranslateService,\r\n private reportService: ReportService,\r\n private reportStoreService: ReportStoreService,\r\n private activatedRoute: ActivatedRoute\r\n ) {\r\n this.reportId = +this.activatedRoute.snapshot.paramMap.get('documentId');\r\n }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n selectedDate: [[], Validators.required]\r\n });\r\n }\r\n\r\n public toggle(): void {\r\n if (!this.availableSectionDates) {\r\n this.fetchDates();\r\n }\r\n this.form.reset();\r\n\r\n const actionLabel = this.translateService.instant(`MOVE_SECTION_MODAL.${this.toDuplicate ? 'DUPLICATE' : 'MOVE'}`)\r\n this.title = this.translateService.instant('MOVE_SECTION_MODAL.TITLE', [actionLabel]);\r\n this.description = this.translateService.instant('MOVE_SECTION_MODAL.DESCRIPTION', [actionLabel]);\r\n\r\n this.moveSectionModal.toggle();\r\n }\r\n\r\n public proceedSelectedDate(): void {\r\n this.copySectionData();\r\n if (!this.toDuplicate) {\r\n this.removeSectionData();\r\n }\r\n }\r\n\r\n private fetchDates(): void {\r\n const currentDate = moment.utc(this.formattedBsDayDate, GLOBALS.dateFormat);\r\n\r\n this.reportService.getAvailableSectionDates()\r\n .pipe(take(1))\r\n .subscribe(sectionDates => {\r\n this.availableSectionDates = sectionDates\r\n .filter(sectionDate => this.filterValidSectionDates(sectionDate, currentDate));\r\n this.datesSelectValues = this.availableSectionDates\r\n .map((val, index) => ({ title: `${val.bsDayDateString} - ${val.bcrReportTitle}`, value: index }) as any);\r\n });\r\n }\r\n\r\n private copySectionData(): void {\r\n const { selectedDate } = this.form.getRawValue();\r\n const dateDetails = this.availableSectionDates[selectedDate];\r\n const isCurrentReport = dateDetails.bcrReportId === this.reportId;\r\n\r\n if (isCurrentReport) {\r\n // Note: could be current report, but different day (filtered out @fetchDates()).\r\n const bsDayDate = moment.utc(dateDetails.bsDayDateString, GLOBALS.dateFormat)\r\n .set({ hour: 0, minute: 0, second: 0 })\r\n .format(`${GLOBALS.dateFormat} HH:mm:ss`);\r\n this.sectionCopyCurrentBcr.emit(bsDayDate);\r\n this.reportStoreService.setNewSectionHeader(bsDayDate, this.sectionHeader, true);\r\n this.toggle();\r\n } else {\r\n this.reportService.duplicateBusinessSection(\r\n +this.sectionHeader.bdSectionId,\r\n dateDetails.bcrReportId,\r\n dateDetails.bsDayId\r\n ).pipe(take(1)).subscribe(_ => this.toggle());\r\n }\r\n }\r\n\r\n private removeSectionData(): void {\r\n this.reportStoreService.disableHeaderForDefaultSection(this.bsDayDate, this.sectionHeader.bdSectionId);\r\n }\r\n\r\n private filterValidSectionDates(val: AvailableSectionDate, currentDate: moment.Moment): boolean {\r\n const sectionDate = moment.utc(val.bsDayDateString, GLOBALS.dateFormat);\r\n\r\n if (sectionDate.isSame(currentDate) && val.bcrReportId === this.reportId) {\r\n return false;\r\n }\r\n\r\n return sectionDate.isAfter(this.today);\r\n }\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n OnInit,\r\n Output,\r\n EventEmitter\r\n } from '@angular/core';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { CustomModalComponent } from 'src/app/shared/components/custom-modal/custom-modal.component';\r\nimport { TranslationModalDetails, TranslationWithdrawModalDetails } from 'src/app/shared/models/report.model';\r\nimport * as moment from 'moment';\r\n\r\n @Component({\r\n selector: 'oir-request-title-translation-modal',\r\n templateUrl: './request-title-translation-modal.component.html',\r\n styleUrls: ['./request-title-translation-modal.component.less']\r\n })\r\n \r\n export class RequestTitleTranslationModalComponent implements OnInit {\r\n @ViewChild('requestTitleTranslationModal') requestTitleTranslationModal: CustomModalComponent;\r\n @ViewChild('withdrawConfirmationModal') withdrawConfirmationModal: CustomModalComponent;\r\n @Input() textToReview: string;\r\n @Input() dueDate: string;\r\n @Output() public translationRequested = new EventEmitter();\r\n\r\n public form: UntypedFormGroup;\r\n public isWithdraw = false;\r\n public isVisible = false;\r\n \r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n ) {}\r\n \r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n dueDate: ['', Validators.required],\r\n note: '',\r\n });\r\n }\r\n \r\n public toggle(isWithdraw = false): void {\r\n this.isVisible = !this.isVisible;\r\n this.isWithdraw = !!isWithdraw\r\n this.form.reset();\r\n\r\n if (isWithdraw) {\r\n this.form.get('dueDate').disable();\r\n } else {\r\n this.form.get('dueDate').enable();\r\n }\r\n\r\n this.requestTitleTranslationModal.toggle();\r\n }\r\n\r\n public sendRequest(confirmWithdrawal = false): void {\r\n if (confirmWithdrawal) {\r\n this.requestTitleTranslationModal.toggle();\r\n this.withdrawConfirmationModal.toggle();\r\n return;\r\n }\r\n\r\n const formValue = this.form.getRawValue();\r\n const payload = {\r\n dueDate: formValue.dueDate && moment.utc(formValue.dueDate, 'DD/MM/YYYY').format('YYYY-MM-DD'),\r\n note: formValue.note || '',\r\n } as TranslationModalDetails;\r\n\r\n if (this.isWithdraw) {\r\n delete payload.dueDate;\r\n this.withdrawConfirmationModal.toggle();\r\n this.isVisible = false;\r\n this.translationRequested.emit(payload as TranslationWithdrawModalDetails);\r\n } else {\r\n this.translationRequested.emit(payload);\r\n }\r\n }\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n AfterViewInit,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n OnDestroy,\r\n ViewChild,\r\n ViewChildren,\r\n QueryList\r\n} from '@angular/core';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray, UntypedFormControl } from '@angular/forms';\r\nimport { TypeaheadValue } from 'proceduralsystem-clientcomponents';\r\nimport { Subscription, Observable, Subject } from 'rxjs';\r\nimport {\r\n map,\r\n filter,\r\n takeUntil,\r\n debounceTime,\r\n distinctUntilChanged\r\n} from 'rxjs/operators';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { ReportStoreService } from 'src/app/services/report-store.service';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { isEmpty, isArray, has, findIndex, cloneDeep, findLast } from 'lodash-es';\r\nimport * as moment from 'moment';\r\nimport { GLOBALS } from 'src/app/shared/globals';\r\nimport {\r\n BusinessDaySectionHeader,\r\n Party,\r\n TranslationModalDetails,\r\n TranslationWithdrawModalDetails,\r\n WorkItem\r\n} from 'src/app/shared/models/report.model';\r\nimport { FormTemplate, ReportStatuses, TitleTranslationStatuses, WorkItemTypes } from 'src/app/shared/report.enum';\r\nimport { WorkItemFormComponent } from 'src/app/shared/components/work-item-form/work-item-form.component';\r\nimport { WorkItemInstanceComponent } from 'src/app/shared/components/work-item-instance/work-item-instance.component';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\r\nimport { MoveSectionModalComponent } from '../modals/move-section-modal/move-section-modal.component';\r\nimport { RequestTitleTranslationModalComponent } from '../modals/request-title-translation-modal/request-title-translation-modal.component';\r\nimport OirCkEditor from 'proceduralsystem-ckeditor';\r\nimport { OirCkEditorConfig } from 'proceduralsystem-ckeditor';\r\nimport { EditorConfig } from 'src/app/shared/models/editor-config.model';\r\nimport { ChangeEvent } from '@ckeditor/ckeditor5-angular/ckeditor.component';\r\nimport { AppConfigService } from 'src/app/services/app-config.service';\r\n\r\n@Component({\r\n selector: 'oir-sections-form',\r\n templateUrl: './sections-form.component.html',\r\n styleUrls: ['./sections-form.component.less']\r\n})\r\nexport class SectionsFormComponent implements OnInit, AfterViewInit, OnDestroy {\r\n @Input() businessDaySectionHeader: BusinessDaySectionHeader;\r\n @Input() index: number;\r\n @Input() bsDayDate: any;\r\n @Input() disableSection: boolean;\r\n\r\n @Output() public sectionTimeChanged: EventEmitter =\r\n new EventEmitter();\r\n @Output() public toggleAccordion: EventEmitter = new EventEmitter();\r\n @Output() public workItemsUpdated: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('moveSectionModalComponent') moveSectionModalComponent: MoveSectionModalComponent;\r\n @ViewChild('titleTranslationModal') titleTranslationModal: RequestTitleTranslationModalComponent;\r\n @ViewChild('workItemsForm') workItemsForm: WorkItemFormComponent;\r\n @ViewChildren('workItemsInstance')\r\n workItemsInstance: QueryList;\r\n\r\n public partiesData$: Observable;\r\n public arrangementData: TypeaheadValue[] = [];\r\n public membersData$: Observable;\r\n public departmentData$: Observable;\r\n public sectionForm: UntypedFormGroup;\r\n public sectionData: any;\r\n public hasWorkItems = false;\r\n public workItemsDirty = false\r\n public get arrangementsFormArray(): UntypedFormArray {\r\n return this.sectionForm.get('sectionArrangementFormGroup') as UntypedFormArray;\r\n }\r\n public FormTemplate = FormTemplate;\r\n public addNewItems = true;\r\n public keyUp = new Subject<{ id: number; value: string }>();\r\n \r\n Editor = OirCkEditor;\r\n ckEditorConfig: OirCkEditorConfig;\r\n\r\n public canMoveSections = this.reportStatusId\r\n && [ReportStatuses.Draft, ReportStatuses.Circulated, ReportStatuses.Update].includes(this.reportStatusId);\r\n public isUnsavedDay = false;\r\n public canRequestTitleTranslation = false;\r\n public isSaveRequiredBeforeTranslation = false;\r\n public TranslationStatuses = TitleTranslationStatuses;\r\n\r\n private subscription = new Subscription();\r\n private ngUnsubscribe = new Subject();\r\n private departmentMultiselectLookup = [];\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private route: ActivatedRoute,\r\n private reportService: ReportService,\r\n private reportStore: ReportStoreService,\r\n private sharedService: SharedService,\r\n private router: Router,\r\n private configurationService: AppConfigService\r\n ) {\r\n this.ckEditorConfig = {\r\n ...EditorConfig,\r\n licenseKey: this.configurationService.getValue('CKEditor5LicenseKey')\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n // Section form init\r\n this.sectionForm = this.fb.group({\r\n parties: [{ value: [], disabled: true }, Validators.required],\r\n department: [{ value: [], disabled: true }, Validators.required],\r\n isStartTimeFixed: false,\r\n isHiddenOnDailBusiness: false,\r\n sectionStartTime: [{ value: '', disabled: true }],\r\n sectionEndTime: [\r\n '',\r\n [\r\n Validators.required,\r\n Validators.pattern('^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$')\r\n ]\r\n ],\r\n sectionDuration: [\r\n '',\r\n [\r\n Validators.required,\r\n Validators.pattern('^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$')\r\n ]\r\n ],\r\n sectionDetails: '',\r\n sectionDetailsFreeTextBox: [{ value: '', disabled: true }],\r\n nextWeeksBusiness: [{ value: '', disabled: true }],\r\n nextWeeksBusinessFreeTextBox: [{ value: '', disabled: true }],\r\n sectionArrangements: '',\r\n sectionArrangementFormGroup: this.fb.array([]),\r\n arrangementsProposedTitle: [\r\n '',\r\n [Validators.required, Validators.maxLength(1000)]\r\n ]\r\n });\r\n\r\n if (this.businessDaySectionHeader.businessDaySectionType.bdSectionTypeId === FormTemplate.custom) {\r\n // Custom item title translation\r\n this.sectionForm.addControl('customSectionTitles', this.fb.group({\r\n sectionTitleEn: new UntypedFormControl({value: '', disabled: true }, Validators.maxLength(250)),\r\n sectionTitleGa: new UntypedFormControl({value: '', disabled: true }, Validators.maxLength(250)),\r\n }));\r\n this.titleChange();\r\n }\r\n\r\n // Init form based on template\r\n this.sharedService.showOrHideFormFieldsBasedOnTemplate(\r\n this.sectionForm,\r\n this.businessDaySectionHeader.businessDaySectionType.bdSectionTypeId\r\n );\r\n\r\n // Get parties data\r\n this.partiesData$ = this.reportService.party.pipe(takeUntil(this.ngUnsubscribe));\r\n\r\n // Get department data\r\n this.departmentData$ = this.reportService.departments.pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(departments =>\r\n departments.map(department => {\r\n const departmentObj = {\r\n departmentId: department.departmentId,\r\n departmentName: department.departmentName\r\n };\r\n this.departmentMultiselectLookup.push(departmentObj);\r\n return {\r\n value: department.departmentId,\r\n title: department.departmentName\r\n };\r\n })\r\n )\r\n );\r\n\r\n // Get arrangement data\r\n this.reportService.sectionArrangement\r\n .pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(arrangements =>\r\n arrangements.map((arrangement, i) => ({\r\n value: i,\r\n title: arrangement\r\n }))\r\n )\r\n )\r\n .subscribe(res => (this.arrangementData = res));\r\n\r\n // Get members data\r\n this.membersData$ = this.reportService.members.pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(members =>\r\n members.map(member => ({ value: member.id, title: member.name }))\r\n )\r\n );\r\n\r\n const startDuration = this.sectionForm.get('sectionStartTime').value;\r\n const endDuration = this.sectionForm.get('sectionEndTime').value;\r\n\r\n if (startDuration && endDuration) {\r\n this.durationTime(startDuration, endDuration);\r\n }\r\n this.showSectionDetails();\r\n this.showNextWeeksBusiness();\r\n this.subscribeToFormValueChange();\r\n this.durationTimeChange();\r\n this.durationChange();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n const documentId = this.route.snapshot.paramMap.get('documentId');\r\n this.onArrangementToggle();\r\n const itemExsist = setInterval(() => {\r\n if (this.workItemsInstance) {\r\n this.route.queryParams\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe(params => {\r\n // If params exsist\r\n if (!isEmpty(params)) {\r\n this.workItemsInstance.toArray().forEach(item => {\r\n if (item.workItemId === parseInt(params.workItemId, 10)) {\r\n item.onEdit();\r\n this.router.navigate(\r\n [`/bcr-report/${documentId}`],\r\n { queryParams: {} }\r\n );\r\n clearInterval(itemExsist);\r\n }\r\n });\r\n this.toggleAddWorkItem(true);\r\n }\r\n });\r\n }\r\n }, 100);\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Method to get data for Arrangement input\r\n */\r\n public getArrangementData(): TypeaheadValue[] {\r\n return this.sharedService.filterTypeAheadArrayForNoPillsInputTypeAheadBasedOnTitle(\r\n this.arrangementsFormArray,\r\n 'arrangements',\r\n this.arrangementData\r\n );\r\n }\r\n\r\n /**\r\n * Function to populate section form\r\n * @param data Section form data\r\n */\r\n public populateForm(data: any): void {\r\n if (!isEmpty(data)) {\r\n this.clearArrangementsForm();\r\n this.sectionData = data;\r\n this.enableWorkItemSection();\r\n this.patchFormValues(data);\r\n this.setDurationOnChange(data);\r\n this.populateArrangementForm();\r\n this.reportStore.setSectionFormValidity(\r\n this.workItemsAreValid(),\r\n this.bsDayDate,\r\n this.businessDaySectionHeader.bdSectionId,\r\n false\r\n );\r\n this.sectionForm.markAsPristine();\r\n this.workItemsDirty = false;\r\n this.isUnsavedDay = !data.businessScheduleDayId;\r\n }\r\n }\r\n\r\n /**\r\n * Function to get form controls\r\n */\r\n public getForm(): Array {\r\n return this.arrangementsFormArray.controls;\r\n }\r\n\r\n /**\r\n * Function to save section data\r\n */\r\n public saveSection(skipToggleAccordion = false): void {\r\n // Function to store section data\r\n this.reportStore.storeSectionData(\r\n this.businessDaySectionHeader.businessDaySectionPositionNo,\r\n this.sharedService.cleanObjectNullValue(this.sectionToSave),\r\n this.businessDaySectionHeader.businessDaySectionType.bdSectionTypeId,\r\n this.bsDayDate\r\n );\r\n\r\n if (!skipToggleAccordion) {\r\n this.toggleAccordion.emit(true);\r\n }\r\n\r\n this.reportStore.setSectionFormValidity(\r\n this.workItemsAreValid(),\r\n this.bsDayDate,\r\n this.businessDaySectionHeader.bdSectionId,\r\n true\r\n );\r\n }\r\n\r\n public moveSection(toDuplicate = false): void {\r\n this.moveSectionModalComponent.toDuplicate = toDuplicate;\r\n this.moveSectionModalComponent.toggle();\r\n }\r\n\r\n public onArrangementChange(id: number, value: TypeaheadValue) {\r\n if (value) {\r\n this.keyUp.next({ id, value: value.title });\r\n }\r\n }\r\n\r\n public onNoArrangementResults(id: number, value: string): void {\r\n const arrangementFormGroup = this.arrangementsFormArray.controls[\r\n id\r\n ] as UntypedFormGroup;\r\n const arrangementFormControl = arrangementFormGroup.get('arrangements');\r\n if (arrangementFormControl) {\r\n arrangementFormControl.setValue(value);\r\n }\r\n }\r\n\r\n /**\r\n * Close section accordion on cancel\r\n */\r\n public sectionCancel(): void {\r\n // Need to timeout to allow change detection to work for canToggle\r\n setTimeout(() => {\r\n this.toggleAccordion.emit(true);\r\n }, 1);\r\n }\r\n\r\n /**\r\n * Function to check is value empty\r\n * @param value Value\r\n */\r\n public hasValue(value): boolean {\r\n return !isEmpty(value);\r\n }\r\n\r\n /**\r\n * Method to handle adding new work item\r\n * @param data\r\n */\r\n public onAddWorkItem(data: any): void {\r\n if (!this.sectionData.workItems) {\r\n this.sectionData.workItems = [];\r\n }\r\n\r\n const workItem = this.getWorkItemValueFromWorkItemForm(data);\r\n this.sectionData.workItems.push(workItem);\r\n this.workItemsDirty = true;\r\n }\r\n\r\n /**\r\n * Method to handle updating work item\r\n * @param data\r\n */\r\n public onUpdateWorkItem(data: any): void {\r\n const workItem = this.getWorkItemValueFromWorkItemForm(data.formValue);\r\n if (+data.index > -1) {\r\n this.sectionData.workItems[data.index] = workItem;\r\n this.workItemsDirty = true;\r\n }\r\n }\r\n\r\n /**\r\n * Method to handle removing work item\r\n * @param index\r\n */\r\n public onRemoveWorkItem(index: number): void {\r\n if (+index > -1) {\r\n this.sectionData.workItems.splice(index, 1);\r\n this.workItemsDirty = true;\r\n }\r\n }\r\n\r\n /**\r\n * Method to extract work item values from work item form value\r\n * @param data\r\n */\r\n private getWorkItemValueFromWorkItemForm(data: any): WorkItem {\r\n const isWorkItemOutstanding =\r\n data.form.workItemBillOrMotion[0].value === GLOBALS.workItemOtherValue;\r\n let billSponsors = [];\r\n const isWorkItemTypeBillWithSponsors = data.form.billSponsors &&\r\n data.form.workItemType === WorkItemTypes.bills;\r\n \r\n if (isWorkItemTypeBillWithSponsors) {\r\n billSponsors = this.businessDaySectionHeader.businessDaySectionType.bdSectionTypeId ===\r\n FormTemplate.governmentBusiness\r\n ? data.form.billSponsors\r\n : data.form.billSponsors.split(', ').map(x => +x);\r\n }\r\n\r\n const index = findIndex(data.workItemDataWithTags, [\r\n 'value',\r\n data.form.workItemBillOrMotion[0].value\r\n ]);\r\n return {\r\n workItemId: isWorkItemOutstanding\r\n ? null\r\n : data.form.workItemBillOrMotion[0].value,\r\n workItemTitles:\r\n index !== -1 ? [data.workItemDataWithTags[index].title] : [],\r\n businessDaySectionWorkItemPlaceholder: isWorkItemOutstanding\r\n ? data.form.businessDaySectionWorkItemPlaceholder\r\n : null,\r\n isWorkItemOutstanding,\r\n motionSponsors:\r\n data.form.motionSponsors &&\r\n data.form.workItemType === WorkItemTypes.motions\r\n ? data.form.motionSponsors\r\n : [],\r\n billSponsors,\r\n billStagesToConsider:\r\n data.form.workItemType === WorkItemTypes.bills && data.form.billStages\r\n ? data.form.billStages\r\n : null,\r\n workItemTypeInfo:\r\n this.sharedService.getWorkItemTypeInfoValueFromWorkItemForm(\r\n data.form.workItemType\r\n ),\r\n arrangementOfWorkItems:\r\n this.sharedService.getArrangementDataFromWorkItemForm(data.form),\r\n arrangementOfWorkItemProposal: data.form.proposalTitle || null,\r\n businessDaySectionWorkItemPositionNo: 0,\r\n ...(this.isDeferredDivisions\r\n && data.form.amendmentType\r\n && {amendmentType: data.form.amendmentType})\r\n };\r\n }\r\n\r\n /**\r\n * Function to collect section arrangements\r\n */\r\n private collectArrangementData(): any[] {\r\n this.sectionData.arrangementOfSections = [];\r\n this.arrangementsFormArray.controls.forEach(control => {\r\n if (control.get('arrangements').value.length > 0) {\r\n const obj = {\r\n arrangementOfSectionId:\r\n control.get('arrangementOfSectionId').value || 0,\r\n arrangementOfSectionDescription: control.get('arrangements').value,\r\n isDissentingMembersAssigned: control.get('dissentMembersBox').value,\r\n isArrangementAppearOnFront: true,\r\n dissentingMembers: control.get('dissentMembers').value.map(item => {\r\n return {\r\n id: item.value,\r\n name: item.title\r\n };\r\n })\r\n };\r\n this.sectionData.arrangementOfSections.push(obj);\r\n }\r\n });\r\n return this.sectionData.arrangementOfSections;\r\n }\r\n\r\n getDepartmentId(sectionData) {\r\n return sectionData.departments\r\n ? sectionData.departments.map(item => item.departmentId)\r\n : null\r\n }\r\n\r\n getParties(sectionData) {\r\n return sectionData.partiesToAskQuestions || null\r\n }\r\n\r\n getSectionStartTime(sectionData) {\r\n return sectionData.bsSectionStartTime\r\n ? moment(\r\n this.sharedService.convertDate(sectionData.bsSectionStartTime)\r\n )\r\n .utc()\r\n .format('HH:mm')\r\n : ''\r\n }\r\n\r\n getSectionEndTime(sectionData) {\r\n return sectionData.bsSectionEndTime\r\n ? moment(this.sharedService.convertDate(sectionData.bsSectionEndTime))\r\n .utc()\r\n .format('HH:mm')\r\n : ''\r\n }\r\n\r\n getIsHiddenOnDailBusiness(sectionData) {\r\n return sectionData.isVisibleOnDailBusiness !== undefined && !sectionData.isVisibleOnDailBusiness\r\n }\r\n\r\n getSectionDetailsFreeTextBox(sectionData) {\r\n return sectionData.businessDaySectionNote\r\n ? sectionData.businessDaySectionNote\r\n : null\r\n }\r\n\r\n getSectionArrangements(sectionData) {\r\n return !has(sectionData, 'isSectionArrangementUsed') &&\r\n sectionData.businessDaySectionTypeId === FormTemplate.motions\r\n ? true\r\n : this.sharedService.convertNumberToBoolean(\r\n sectionData.isSectionArrangementUsed\r\n )\r\n }\r\n\r\n getArrangementsProposedTitle(sectionData) {\r\n return sectionData.businessScheduleArrangementProposal ||\r\n sectionData.businessDaySectionTitle ||\r\n sectionData.businessDaySectionTitleGle\r\n }\r\n\r\n getDisableTitleInputs(sectionData) {\r\n return sectionData.translation\r\n && sectionData.translation.statusId === this.TranslationStatuses.InTranslation;\r\n }\r\n\r\n /**\r\n * Function to populate form with recived values\r\n * @param sectionData Recieved section data\r\n */\r\n private patchFormValues(sectionData: any): void {\r\n this.sectionForm.patchValue(\r\n {\r\n department: this.getDepartmentId(sectionData),\r\n parties: this.getParties(sectionData),\r\n sectionStartTime: this.getSectionStartTime(sectionData),\r\n sectionEndTime: this.getSectionEndTime(sectionData),\r\n isStartTimeFixed: sectionData.isStartTimeFixed,\r\n isHiddenOnDailBusiness: this.getIsHiddenOnDailBusiness(sectionData),\r\n sectionDetails: this.sharedService.convertNumberToBoolean(\r\n sectionData.isSectionNoteUsed\r\n ),\r\n sectionDetailsFreeTextBox: this.getSectionDetailsFreeTextBox(sectionData),\r\n nextWeeksBusiness: sectionData.isSectionNextWeekBusinessUsed,\r\n nextWeeksBusinessFreeTextBox: sectionData.sectionDetailNextWeekBusiness,\r\n sectionArrangements: this.getSectionArrangements(sectionData),\r\n arrangementsProposedTitle: this.getArrangementsProposedTitle(sectionData)\r\n\r\n },\r\n { emitEvent: false }\r\n );\r\n\r\n // Custom item title translation\r\n const sectionTitlesFormGroup = this.sectionForm.get('customSectionTitles');\r\n \r\n if (sectionTitlesFormGroup) {\r\n const disableTitleInputs = this.getDisableTitleInputs(sectionData);\r\n\r\n if (typeof sectionData.businessDaySectionTitle === 'string') {\r\n sectionTitlesFormGroup.get('sectionTitleEn').patchValue(\r\n sectionData.businessDaySectionTitle,\r\n { emitEvent: false }\r\n );\r\n\r\n if (disableTitleInputs) {\r\n sectionTitlesFormGroup.get('sectionTitleEn').disable();\r\n } else {\r\n sectionTitlesFormGroup.get('sectionTitleEn').enable();\r\n }\r\n }\r\n\r\n if (typeof sectionData.businessDaySectionTitleGle === 'string') {\r\n sectionTitlesFormGroup.get('sectionTitleGa').patchValue(\r\n sectionData.businessDaySectionTitleGle,\r\n { emitEvent: false }\r\n );\r\n\r\n if (disableTitleInputs) {\r\n sectionTitlesFormGroup.get('sectionTitleGa').disable();\r\n } else {\r\n sectionTitlesFormGroup.get('sectionTitleGa').enable();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to set duration time on form load\r\n * @param sectionData Recived section data\r\n */\r\n private setDurationOnChange(sectionData: any): void {\r\n if (sectionData.bsSectionStartTime && sectionData.bsSectionEndTime) {\r\n const startTime = moment(\r\n this.sharedService.convertDate(sectionData.bsSectionStartTime)\r\n )\r\n .utc()\r\n .format('HH:mm');\r\n const endTime = moment(\r\n this.sharedService.convertDate(sectionData.bsSectionEndTime)\r\n )\r\n .utc()\r\n .format('HH:mm');\r\n this.durationTime(startTime, endTime);\r\n }\r\n }\r\n\r\n /**\r\n * Function to show section detail on toggle\r\n */\r\n private showSectionDetails(): void {\r\n this.subscription.add(\r\n this.sectionForm.get('sectionDetails').valueChanges.subscribe(val => {\r\n if (val) {\r\n this.sectionForm.get('sectionDetailsFreeTextBox').enable();\r\n this.sectionForm\r\n .get('sectionDetailsFreeTextBox')\r\n .setValidators([Validators.required, Validators.maxLength(500)]);\r\n } else {\r\n this.sectionForm.get('sectionDetailsFreeTextBox').disable();\r\n this.sectionForm.get('sectionDetailsFreeTextBox').setValue(null);\r\n this.sectionForm.get('sectionDetailsFreeTextBox').clearValidators();\r\n }\r\n this.sectionForm\r\n .get('sectionDetailsFreeTextBox')\r\n .updateValueAndValidity();\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Function to show section next weeks business on toggle\r\n */\r\n private showNextWeeksBusiness(): void {\r\n this.subscription.add(\r\n this.sectionForm.get('nextWeeksBusiness').valueChanges.subscribe(val => {\r\n if (val) {\r\n this.sectionForm.get('nextWeeksBusinessFreeTextBox').enable();\r\n this.sectionForm\r\n .get('nextWeeksBusinessFreeTextBox')\r\n .setValidators([Validators.required, Validators.maxLength(1000)]);\r\n } else {\r\n this.sectionForm.get('nextWeeksBusinessFreeTextBox').disable();\r\n this.sectionForm.get('nextWeeksBusinessFreeTextBox').setValue(null);\r\n this.sectionForm\r\n .get('nextWeeksBusinessFreeTextBox')\r\n .clearValidators();\r\n }\r\n this.sectionForm\r\n .get('nextWeeksBusinessFreeTextBox')\r\n .updateValueAndValidity();\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Function to disable end time field for specified sections\r\n * @param sectionTypeId section type id\r\n */\r\n private disableEndTime(sectionTypeId: number | string): void {\r\n switch (sectionTypeId) {\r\n case FormTemplate.privateNoticeQuestion:\r\n this.sectionForm.get('sectionEndTime').disable();\r\n break;\r\n case FormTemplate.motions:\r\n this.sectionForm.get('sectionEndTime').disable();\r\n break;\r\n default:\r\n this.sectionForm.get('sectionEndTime').enable();\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Function to calculate duration time\r\n */\r\n public durationTimeChange(): void {\r\n this.subscription.add(\r\n this.sectionForm.get('sectionEndTime').valueChanges.subscribe(val => {\r\n if (val && val !== 'Invalid date') {\r\n const timeFormat = /^(0\\d|1\\d|2[0-3]):[0-5]\\d$/;\r\n const startTime = this.sectionForm.get('sectionStartTime').value;\r\n if (timeFormat.test(val) && startTime) {\r\n if (!this.sharedService.isStartTimeBeforeEndTime(startTime, val)) {\r\n this.sectionForm\r\n .get('sectionEndTime')\r\n .setErrors({ invalid: true });\r\n this.sectionForm.updateValueAndValidity();\r\n } else {\r\n this.durationTime(startTime, val);\r\n }\r\n }\r\n } else {\r\n this.sectionForm.patchValue(\r\n {\r\n sectionDuration: null\r\n },\r\n { emitEvent: false }\r\n );\r\n }\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Function to calculate end time on duration change\r\n */\r\n public durationChange(): void {\r\n this.subscription.add(\r\n this.sectionForm.get('sectionDuration').valueChanges.subscribe(val => {\r\n if (val && val !== 'Invalid date') {\r\n const timeFormat = /^(0\\d|1\\d|2[0-3]):[0-5]\\d$/;\r\n const startTime = this.sectionForm.get('sectionStartTime').value;\r\n if (timeFormat.test(val) && startTime) {\r\n const hoursToMinutes = moment.duration(val).asMinutes();\r\n const minutesToAdd = moment(startTime, 'HH:mm')\r\n .add(hoursToMinutes, 'minutes')\r\n .format('HH:mm');\r\n this.sectionForm.patchValue(\r\n {\r\n sectionEndTime: minutesToAdd\r\n },\r\n { emitEvent: false }\r\n );\r\n }\r\n } else {\r\n this.sectionForm.patchValue(\r\n {\r\n sectionEndTime: null\r\n },\r\n { emitEvent: false }\r\n );\r\n }\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Function to adjust dependent custom title inputs states\r\n */\r\n public titleChange(): void {\r\n this.subscription.add(\r\n this.sectionForm.get('customSectionTitles').valueChanges\r\n .pipe(\r\n debounceTime(500),\r\n takeUntil(this.ngUnsubscribe)\r\n )\r\n .subscribe(() => {\r\n const enVal = this.sectionForm.get('customSectionTitles').get('sectionTitleEn').value;\r\n const gaVal = this.sectionForm.get('customSectionTitles').get('sectionTitleGa').value\r\n this.canRequestTitleTranslation = !!enVal && !gaVal && !this.isUnsavedSection;\r\n\r\n this.isSaveRequiredBeforeTranslation = this.canRequestTitleTranslation\r\n && (\r\n (this.sectionData.businessDaySectionTitle || '') !== enVal ||\r\n (this.sectionData.businessDaySectionTitleGle || '') !== gaVal\r\n );\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Method to check if first arrangement input has value\r\n */\r\n public firstArrangementInputHasValue(): boolean {\r\n const firstArrangement = this.arrangementsFormArray\r\n .controls[0] as UntypedFormGroup;\r\n if (\r\n !isEmpty(firstArrangement) &&\r\n !isEmpty(firstArrangement.controls.arrangements.value)\r\n ) {\r\n this.sectionForm.controls.arrangementsProposedTitle.enable();\r\n } else {\r\n this.sectionForm.controls.arrangementsProposedTitle.disable();\r\n }\r\n return (\r\n !isEmpty(firstArrangement) &&\r\n !isEmpty(firstArrangement.controls.arrangements.value)\r\n );\r\n }\r\n\r\n /**\r\n * Method to check if form is valid\r\n */\r\n public isFormValid(): boolean {\r\n if (this.sectionForm.controls.sectionArrangements.value === true) {\r\n return (\r\n (this.sectionForm.valid && this.firstArrangementInputHasValue()) ||\r\n (this.sectionForm.valid && this.sectionHasArrangements())\r\n );\r\n } else {\r\n return this.sectionForm.valid;\r\n }\r\n }\r\n\r\n /**\r\n * Method to check if has at least one work item (in case requred) and form is valid\r\n */\r\n public workItemsAreValid(): boolean {\r\n return this.hasWorkItems && !this.isDeferredDivisions\r\n ? ((this.sectionData || {}).workItems || []).length > 0 &&\r\n this.sectionForm.valid\r\n : this.sectionForm.valid;\r\n }\r\n\r\n /**\r\n * Show or hide add new work item accordion\r\n */\r\n public toggleAddWorkItem(event: boolean) {\r\n this.addNewItems = !event;\r\n }\r\n\r\n\r\n /**\r\n * Method to handle when workitem is droped\r\n * @param event - reordered list\r\n */\r\n public onDrop(event: CdkDragDrop): void {\r\n moveItemInArray(\r\n this.sectionData.workItems,\r\n event.previousIndex,\r\n event.currentIndex\r\n );\r\n this.updateWorkItemPositions();\r\n this.workItemsDirty = true;\r\n this.workItemsUpdated.emit(this.sectionData.workItems);\r\n }\r\n\r\n public sectionCopyCurrentBcr(bsDayDate: string): void {\r\n // Timeout required to make sure all section details were updated correctly.\r\n setTimeout(() => {\r\n const sectionToSave = cloneDeep(this.sectionToSave);\r\n const bsDay = this.reportStore.reportData.businessScheduleDetail.businessScheduleDays\r\n .find(day => day.bsDayDate === bsDayDate);\r\n const updatedSection = findLast(bsDay.businessDaySectionHeaders, header => header.bsDaySectionTitle === this.businessDaySectionHeader.bsDaySectionTitle);\r\n\r\n sectionToSave.bsSectionStartTime = updatedSection.bsSectionStartTime;\r\n sectionToSave.bsSectionEndTime = updatedSection.bsSectionEndTime;\r\n sectionToSave.businessDaySectionId = 0;\r\n sectionToSave.businessDaySectionPositionNo = updatedSection.businessDaySectionPositionNo;\r\n\r\n if (sectionToSave.arrangementOfSections && sectionToSave.arrangementOfSections.length) {\r\n sectionToSave.arrangementOfSections = sectionToSave.arrangementOfSections.map(arr => ({...arr, arrangementOfSectionId: 0}));\r\n }\r\n\r\n this.reportStore.storeSectionData(\r\n updatedSection.businessDaySectionPositionNo,\r\n this.sharedService.cleanObjectNullValue(sectionToSave),\r\n this.businessDaySectionHeader.businessDaySectionType.bdSectionTypeId,\r\n bsDayDate\r\n );\r\n }, 100);\r\n }\r\n\r\n public requestTitleTranslation(details: TranslationModalDetails | TranslationWithdrawModalDetails): void {\r\n const titleTranslationPayload = {\r\n ...details,\r\n id: this.businessDaySectionHeader.bdSectionId as number\r\n };\r\n\r\n if (this.isSaveRequiredBeforeTranslation) {\r\n this.saveSection(true);\r\n }\r\n\r\n this.reportService.triggerTitleTranslation(titleTranslationPayload, this.isSaveRequiredBeforeTranslation);\r\n\r\n if (this.titleTranslationModal.isVisible) {\r\n this.titleTranslationModal.toggle();\r\n }\r\n }\r\n\r\n private updateWorkItemPositions() {\r\n this.sectionData.workItems = this.sectionData.workItems.map((i, index) => ({...i, businessDaySectionWorkItemPositionNo: index}));\r\n }\r\n\r\n /**\r\n * Function to check is day instance has arrangements\r\n */\r\n private sectionHasArrangements(): boolean {\r\n const arrangements = this.sectionData.arrangementOfSections;\r\n\r\n return arrangements ? arrangements.length > 0 : false;\r\n }\r\n\r\n /**\r\n * Function to calculate duration time\r\n * @param start Start time\r\n * @param end End time\r\n */\r\n private durationTime(start: string, end: string): void {\r\n const minutes = moment(end, GLOBALS.timeFormat).diff(\r\n moment(start, GLOBALS.timeFormat),\r\n 'minutes',\r\n true\r\n );\r\n const durationHours = minutes / 60;\r\n const durationMinutes = minutes % 60;\r\n const hours = moment\r\n .utc()\r\n .hours(durationHours)\r\n .minutes(durationMinutes)\r\n .format(GLOBALS.timeFormat);\r\n this.sectionForm.patchValue(\r\n {\r\n sectionDuration: hours\r\n },\r\n { emitEvent: false }\r\n );\r\n this.sectionForm.updateValueAndValidity();\r\n }\r\n /**\r\n * Function to populate arrangement form\r\n */\r\n private populateArrangementForm(): void {\r\n if (!isEmpty(this.sectionData.arrangementOfSections)) {\r\n // Loop try arrangements and populate form\r\n this.sectionData.arrangementOfSections.forEach((arrangement, i) => {\r\n this.addArrangementFormControl(\r\n arrangement.arrangementOfSectionId,\r\n { value: i, title: arrangement.arrangementOfSectionDescription },\r\n arrangement.isDissentingMembersAssigned,\r\n arrangement.dissentingMembers.map(x => ({\r\n value: x.id,\r\n title: x.name\r\n }))\r\n );\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Function to create arrangement form\r\n * If there params ar passed then patch them\r\n * @param arrangement Arrangements\r\n * @param dissentMembersBox Dissenting Memebers checkbox\r\n * @param dissentMembers Dissenting member list\r\n */\r\n private addArrangementFormControl(\r\n arrangementOfSectionId?: number,\r\n arrangement?: any,\r\n dissentMembersBox?: any,\r\n dissentMembers?: any\r\n ): void {\r\n // Creating arrangement form\r\n const arrangementForm: UntypedFormGroup = this.fb.group({\r\n arrangementOfSectionId: 0,\r\n arrangements: [[]],\r\n dissentMembersBox: false,\r\n dissentMembers: [[], Validators.required]\r\n });\r\n this.arrangementsFormArray.push(arrangementForm);\r\n\r\n // Subscribing to value changes\r\n this.subscription.add(\r\n arrangementForm.controls.arrangements.valueChanges\r\n .pipe(filter(val => !isEmpty(val) && isArray(val) && !isEmpty(val[0])))\r\n .subscribe(res => {\r\n arrangementForm.controls.arrangements.patchValue(res[0].title);\r\n })\r\n );\r\n\r\n // Show hide fields\r\n this.sharedService.showFieldIfOtherFieldValueIs(\r\n this.subscription,\r\n arrangementForm,\r\n 'dissentMembersBox',\r\n true,\r\n 'dissentMembers'\r\n );\r\n\r\n // If arrangemet exist patch value for it\r\n if (arrangement) {\r\n arrangementForm.patchValue({\r\n arrangementOfSectionId,\r\n arrangements: [arrangement],\r\n dissentMembersBox,\r\n dissentMembers\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * On Arrangement Toggle trigger\r\n */\r\n private onArrangementToggle(): void {\r\n this.subscription.add(\r\n this.sectionForm.controls.sectionArrangements.valueChanges.subscribe(\r\n res => {\r\n if (res) {\r\n this.addArrangementFormControl();\r\n } else {\r\n this.clearArrangementsForm();\r\n }\r\n }\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Clear arrangement form\r\n */\r\n private clearArrangementsForm(): void {\r\n while (this.arrangementsFormArray.length) {\r\n this.arrangementsFormArray.removeAt(0);\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to form changes\r\n */\r\n private subscribeToFormValueChange(): void {\r\n this.keyUp\r\n .pipe(\r\n debounceTime(2000),\r\n distinctUntilChanged(),\r\n takeUntil(this.ngUnsubscribe)\r\n )\r\n .subscribe(res => {\r\n const arrangement = this.arrangementsFormArray.controls[\r\n res.id\r\n ] as UntypedFormGroup;\r\n if (isEmpty(arrangement.controls.arrangements.value)) {\r\n arrangement.controls.arrangements.setValue(\r\n [{ value: 0, title: res.value }],\r\n { onlySelf: true, emitEvent: false }\r\n );\r\n }\r\n });\r\n this.subscription.add(\r\n this.sectionForm.valueChanges.subscribe(formValue => {\r\n if (isArray(formValue.sectionArrangementFormGroup)) {\r\n // Loop through arrangementsFormArray and remove empty input form groups\r\n formValue.sectionArrangementFormGroup.forEach((element, i) => {\r\n // Skip last element as it can be empty\r\n if (\r\n i < formValue.sectionArrangementFormGroup.length - 1 &&\r\n isEmpty(element.arrangements)\r\n ) {\r\n this.arrangementsFormArray.removeAt(i);\r\n }\r\n });\r\n\r\n // If last form group has Arrangement value then add new form group\r\n if (\r\n !isEmpty(\r\n formValue.sectionArrangementFormGroup[\r\n formValue.sectionArrangementFormGroup.length - 1\r\n ]\r\n ) &&\r\n !isEmpty(\r\n formValue.sectionArrangementFormGroup[\r\n formValue.sectionArrangementFormGroup.length - 1\r\n ].arrangements\r\n )\r\n ) {\r\n this.addArrangementFormControl();\r\n }\r\n }\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Method to enable work item section\r\n */\r\n private enableWorkItemSection(): any {\r\n this.hasWorkItems = [\r\n FormTemplate.privateMembersBill,\r\n FormTemplate.privateMembersBusiness,\r\n FormTemplate.motions,\r\n FormTemplate.governmentBusiness,\r\n FormTemplate.billsForIntroduction,\r\n FormTemplate.referralToCommittee,\r\n FormTemplate.deferredDivisions\r\n ].includes(this.sectionTypeId);\r\n }\r\n\r\n validateArrangementLength(arrangement: UntypedFormControl, { editor }: ChangeEvent) {\r\n const value = editor.getData();\r\n\r\n return this.sharedService.validateArrangementLength(arrangement, value);\r\n }\r\n\r\n get sectionTypeId(): number | null {\r\n return (((this.sectionData || {}).businessDaySectionType || {})\r\n .bdSectionTypeId || (this.sectionData || {}).businessDaySectionTypeId) || null;\r\n }\r\n \r\n get isWorkItemLimitReached(): boolean {\r\n return (this.isBillsForIntroduction\r\n || this.isDeferredDivisions\r\n || this.isReferralToCommittee)\r\n && this.sectionData\r\n && this.sectionData.workItems\r\n && this.sectionData.workItems.length >= (this.isDeferredDivisions ? 20 : 10);\r\n }\r\n\r\n get isBillsForIntroduction(): boolean {\r\n return this.sectionTypeId === FormTemplate.billsForIntroduction\r\n }\r\n\r\n get isDeferredDivisions(): boolean {\r\n return this.sectionTypeId === FormTemplate.deferredDivisions;\r\n }\r\n\r\n get isReferralToCommittee(): boolean {\r\n return this.sectionTypeId === FormTemplate.referralToCommittee;\r\n }\r\n\r\n public get isUnsavedSection(): boolean {\r\n return this.sectionData && typeof this.sectionData.businessDaySectionId === 'string';\r\n }\r\n\r\n private get sectionToSave() {\r\n const startDate =\r\n moment(this.sharedService.convertDate(this.bsDayDate))\r\n .utc()\r\n .format(GLOBALS.dateFormat) +\r\n ' ' +\r\n this.sectionForm.get('sectionStartTime').value;\r\n const endDate =\r\n moment(this.sharedService.convertDate(this.bsDayDate))\r\n .utc()\r\n .format(GLOBALS.dateFormat) +\r\n ' ' +\r\n this.sectionForm.get('sectionEndTime').value;\r\n const englishTitleController = this.sectionForm.get('customSectionTitles')\r\n ? this.sectionForm.get('customSectionTitles').get('sectionTitleEn')\r\n : null;\r\n const irishTitleController = this.sectionForm.get('customSectionTitles')\r\n ? this.sectionForm.get('customSectionTitles').get('sectionTitleGa')\r\n : null;\r\n\r\n return {\r\n departments: this.sharedService.getMultiselectValues(\r\n this.departmentMultiselectLookup,\r\n this.sectionForm,\r\n 'department',\r\n 'departmentId'\r\n ),\r\n businessDaySectionId: this.businessDaySectionHeader.bdSectionId,\r\n businessDaySectionTypeId: this.sectionData.businessDaySectionTypeId\r\n ? this.sectionData.businessDaySectionTypeId\r\n : null,\r\n businessDaySectionTitle: englishTitleController\r\n ? englishTitleController.value || this.sectionData.businessDaySectionTitle\r\n : this.sectionData.businessDaySectionTitle,\r\n businessDaySectionTitleGle: irishTitleController && irishTitleController.dirty\r\n ? irishTitleController.value\r\n : this.sectionData.businessDaySectionTitleGle,\r\n partiesToAskQuestions: this.sectionForm.controls.parties.value || null,\r\n bsSectionStartTime: this.sharedService.convertDate(startDate),\r\n bsSectionEndTime: this.sharedService.convertDate(endDate),\r\n businessDaySectionDuration:\r\n this.sectionForm.get('sectionDuration').value || null,\r\n businessDaySectionNote: this.sectionForm.get('sectionDetailsFreeTextBox')\r\n .value,\r\n businessDaySectionPositionNo:\r\n this.sectionData.businessDaySectionPositionNo,\r\n businessScheduleArrangementProposal: this.sectionForm.get(\r\n 'arrangementsProposedTitle'\r\n ).value,\r\n isSectionArrangementUsed:\r\n this.sectionForm.get('sectionArrangements').value === true ? 1 : 0,\r\n isSectionNoteUsed:\r\n this.sectionForm.get('sectionDetails').value === true ? 1 : 0,\r\n isStartTimeFixed: this.sectionForm.get('isStartTimeFixed').value,\r\n isVisibleOnDailBusiness: !this.sectionForm.get('isHiddenOnDailBusiness').value,\r\n isSectionNextWeekBusinessUsed:\r\n this.sectionForm.get('nextWeeksBusiness').value,\r\n sectionDetailNextWeekBusiness: this.sectionForm.get(\r\n 'nextWeeksBusinessFreeTextBox'\r\n ).value,\r\n arrangementOfSections: this.collectArrangementData(),\r\n workItems: this.sectionData.workItems || null\r\n };\r\n }\r\n\r\n private get reportStatusId(): number {\r\n return this.reportStore.reportData.reportStatusId || 0;\r\n }\r\n}\r\n","import { Component, Input, ViewChild, Output, EventEmitter, AfterViewInit } from '@angular/core';\r\nimport { ToggleableAccordionComponent } from 'src/app/shared/components/toggleable-accordion/toggleable-accordion.component';\r\nimport { ReportStoreService } from 'src/app/services/report-store.service';\r\nimport { take } from 'rxjs/operators';\r\nimport { SectionsFormComponent } from './sections-form/sections-form.component';\r\nimport { AddNewSectionDeleteModalComponent } from 'src/app/shared/modals/add-new-section-delete-modal/add-new-section-delete-modal.component';\r\nimport { BusinessDaySectionHeader } from 'src/app/shared/models/report.model';\r\nimport { cloneDeep } from 'lodash-es';\r\nimport { CancelConfirmModalComponent } from 'src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\n\r\n@Component({\r\n selector: 'oir-section',\r\n templateUrl: './section.component.html',\r\n styleUrls: ['./section.component.less']\r\n})\r\nexport class SectionComponent implements AfterViewInit {\r\n @Input() businessDaySectionHeader: BusinessDaySectionHeader;\r\n @Input() itemIndex: number;\r\n @Input() bsDayDate: string;\r\n @Input() bsDayId: number;\r\n @Input() disableSection: boolean;\r\n\r\n @Output() toggleAccordion: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('toggleableAccordion') toggleableAccordion: ToggleableAccordionComponent;\r\n @ViewChild('sectionForm') sectionForm: SectionsFormComponent;\r\n @ViewChild('newSectionDeleteModal') newSectionDeleteModal: AddNewSectionDeleteModalComponent;\r\n @ViewChild('cancelConfirmModalComponent') cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n public canToggle = true;\r\n\r\n constructor(\r\n private reportStoreService: ReportStoreService\r\n ) { }\r\n\r\n public ngAfterViewInit(): void {\r\n this.sectionIsValid();\r\n }\r\n\r\n /**\r\n * Function to toggle delete modal\r\n */\r\n public deleteNewSection(): void {\r\n this.newSectionDeleteModal.toggleDeleteModal();\r\n }\r\n\r\n /**\r\n * Method to disable section\r\n */\r\n public removeSection(): void {\r\n this.reportStoreService.disableHeaderForDefaultSection(this.bsDayDate, this.businessDaySectionHeader.bdSectionId);\r\n }\r\n\r\n /**\r\n * Call API to get section data\r\n */\r\n public populateSectionWithData(forceRefresh = false): void {\r\n this.reportStoreService.getSectionsData(\r\n this.businessDaySectionHeader.bdSectionId,\r\n this.businessDaySectionHeader.businessDaySectionType.bdSectionTypeId,\r\n this.bsDayDate,\r\n this.businessDaySectionHeader.businessDaySectionPositionNo,\r\n forceRefresh).pipe(take(1))\r\n .subscribe(res => this.sectionForm.populateForm(cloneDeep(res)));\r\n }\r\n\r\n /**\r\n * Function to show only opened section, others should hide\r\n * @param isOpen Boolean\r\n */\r\n public onDefaultOpened(isOpen: boolean): void {\r\n this.toggleAccordion.emit(\r\n {\r\n dayId: this.bsDayId,\r\n sectionId: this.businessDaySectionHeader.bdSectionId,\r\n hideOthers: isOpen\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * Function whitch triggers after accordion was opened and reasign can toggle param\r\n * @param isOpen Boolean param\r\n */\r\n public afterSectionAccordionToggle(isOpen: boolean): void {\r\n this.canToggle = !isOpen;\r\n if (isOpen) {\r\n this.populateSectionWithData();\r\n }\r\n this.toggleAccordion.emit(\r\n {\r\n dayId: this.bsDayId,\r\n sectionId: this.businessDaySectionHeader.bdSectionId,\r\n hideOthers: isOpen\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * Function whitch triggers on accordion close\r\n */\r\n public onAccordionClose(): void {\r\n this.disableSection ? this.closeSection() :\r\n this.cancelConfirmModalComponent.toggle();\r\n this.sectionIsValid();\r\n }\r\n\r\n /**\r\n * Event on cancel click in section\r\n */\r\n public onCancelClick(): void {\r\n this.disableSection ? this.closeSection() :\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Function to close accordion on cancel\r\n * @param event Event\r\n */\r\n public cancelModalDecision(event: any): void {\r\n if (event) {\r\n this.closeSection();\r\n }\r\n }\r\n\r\n /**\r\n * Function to close section\r\n */\r\n public closeSection() {\r\n this.canToggle = true;\r\n // Need to timeout to allow change detection to work\r\n setTimeout(() => {\r\n this.toggleableAccordion.click();\r\n // No need to clear form because component it is destroyed with ngIf\r\n }, 1);\r\n }\r\n\r\n /**\r\n * Function to set image for section\r\n */\r\n private sectionIsValid(): void {\r\n if (this.reportStoreService.doesSectionHaveAllRequiredData(this.bsDayDate, this.businessDaySectionHeader.bdSectionId)) {\r\n this.toggleableAccordion.setOpenImageUrl = 'filled-circle-true';\r\n } else {\r\n this.toggleableAccordion.setOpenImageUrl = 'unfilled-plus';\r\n }\r\n }\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n OnInit,\r\n OnChanges\r\n} from '@angular/core';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport {\r\n ToastNotificationsService,\r\n TypeaheadValue\r\n} from 'proceduralsystem-clientcomponents';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { take } from 'rxjs/operators';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { CustomModalComponent } from 'src/app/shared/components/custom-modal/custom-modal.component';\r\nimport { CancelConfirmModalComponent } from 'src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\nimport { isEmpty } from 'lodash-es';\r\nimport { ReportStatuses } from 'src/app/shared/report.enum';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'oir-action-bar-email-modal',\r\n templateUrl: './action-bar-email-modal.component.html',\r\n styleUrls: ['./action-bar-email-modal.component.less']\r\n})\r\nexport class ActionBarEmailModalComponent implements OnInit, OnChanges {\r\n @Input() startBcrTime: string;\r\n @Input() endBcrTime: string;\r\n @Input() report: any;\r\n\r\n @ViewChild('actionBarEmailModal') actionBarEmailModal: CustomModalComponent;\r\n @ViewChild('cancelConfirmModalComponent')\r\n cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n public form: UntypedFormGroup;\r\n public recipientsEmails: TypeaheadValue[] = [];\r\n public emailSubjectDefaultValue: string;\r\n public emailBodyDefaultValue: string;\r\n public revisedBcrNumber: string;\r\n public updateBcrNumber: string;\r\n public sendEmailAction = false;\r\n\r\n private defaultEmail = 'journal.office@oireachtas.ie';\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private translateService: TranslateService,\r\n private toastService: ToastNotificationsService,\r\n private reportService: ReportService,\r\n private sharedService: SharedService\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n toEmail: [[], Validators.required],\r\n ccEmail: [],\r\n bccEmail: [],\r\n emailSubject: ['', Validators.maxLength(250)],\r\n emailBody: ['', Validators.maxLength(1000)]\r\n });\r\n this.reportService\r\n .getMailsList()\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n res.map(emails => {\r\n if (emails.recipientEmail !== null) {\r\n this.recipientsEmails.push({\r\n value: emails.recipientId,\r\n title: emails.recipientEmail\r\n });\r\n }\r\n });\r\n });\r\n // Only temporary for development team.\r\n this.recipientsEmails = this.sharedService.addDevEmails(\r\n this.recipientsEmails\r\n );\r\n }\r\n\r\n ngOnChanges() {\r\n const startDate = this.sharedService.convertDate(this.startBcrTime);\r\n const endtDate = this.sharedService.convertDate(this.endBcrTime);\r\n if (!isEmpty(this.report)) {\r\n this.revisedBcrNumber = this.report.reportVerison\r\n .toString()\r\n .split('.')[0];\r\n this.updateBcrNumber = this.report.reportVerison.toString().split('.')[1];\r\n }\r\n this.emailSubjectDefaultValue =\r\n startDate === endtDate\r\n ? this.translateService.instant(\r\n 'VIEW_REPORT_SECTION.CIRCULATE_EMAIL.SUBJECT.DEFAULT_SINGLE_DAY_VALUE',\r\n [this.startBcrTime, this.revisedBcrNumber, this.updateBcrNumber]\r\n )\r\n : this.translateService.instant(\r\n 'VIEW_REPORT_SECTION.CIRCULATE_EMAIL.SUBJECT.DEFAULT_VALUE',\r\n [\r\n this.startBcrTime,\r\n this.endBcrTime,\r\n this.revisedBcrNumber,\r\n this.updateBcrNumber\r\n ]\r\n );\r\n this.emailBodyDefaultValue =\r\n startDate === endtDate\r\n ? this.translateService.instant(\r\n 'VIEW_REPORT_SECTION.CIRCULATE_EMAIL.BODY.DEFAULT_SINGLE_DAY_VALUE',\r\n [this.startBcrTime]\r\n )\r\n : this.translateService.instant(\r\n 'VIEW_REPORT_SECTION.CIRCULATE_EMAIL.BODY.DEFAULT_VALUE',\r\n [this.startBcrTime, this.endBcrTime]\r\n );\r\n }\r\n\r\n /**\r\n * Method to close circulate bcr modal without cirucalting\r\n */\r\n public onModalClose(): void {\r\n if (!this.sendEmailAction) {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n }\r\n\r\n /**\r\n * Method to send mail\r\n */\r\n public sendEmailFile(): void {\r\n this.sendEmailAction = true;\r\n // Convert dates to BE readable\r\n this.report.businessScheduleDetail.bsDetailFirstDay =\r\n this.sharedService.convertDate(\r\n this.report.businessScheduleDetail.bsDetailFirstDay\r\n );\r\n this.report.businessScheduleDetail.bsDetailLastDay =\r\n this.sharedService.convertDate(\r\n this.report.businessScheduleDetail.bsDetailLastDay\r\n );\r\n this.reportService\r\n .actionBarSendEmail(\r\n this.form.controls.toEmail.value\r\n ? this.sharedService.convertRecipientsToString(\r\n this.form.controls.toEmail.value\r\n )\r\n : '',\r\n this.form.controls.ccEmail.value\r\n ? this.sharedService.convertRecipientsToString(\r\n this.form.controls.ccEmail.value\r\n )\r\n : '',\r\n this.form.controls.bccEmail.value\r\n ? this.sharedService.convertRecipientsToString(\r\n this.form.controls.bccEmail.value\r\n )\r\n : '',\r\n this.form.controls.emailSubject.value\r\n ? this.form.controls.emailSubject.value\r\n : '',\r\n this.form.controls.emailBody.value\r\n ? this.form.controls.emailBody.value\r\n : '',\r\n this.report\r\n )\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.toastService.addNotification({\r\n title:\r\n this.report.reportStatusId === ReportStatuses.Draft\r\n ? this.translateService.instant(\r\n 'TOAST.BUSINESS_COMMITTEE_REPORT_SEND_EMAIL_DRAFT.TITLE'\r\n )\r\n : this.translateService.instant(\r\n 'TOAST.BUSINESS_COMMITTEE_REPORT_SEND_EMAIL.TITLE'\r\n ),\r\n description: this.translateService.instant(\r\n 'TOAST.BUSINESS_COMMITTEE_REPORT_SEND_EMAIL.BODY',\r\n [this.startBcrTime, this.endBcrTime]\r\n )\r\n });\r\n this.form.reset();\r\n this.actionBarEmailModal.close();\r\n this.sendEmailAction = false;\r\n });\r\n }\r\n\r\n /**\r\n * Open the email modal\r\n */\r\n public open(): void {\r\n this.form.patchValue({\r\n toEmail: [{ value: 0, title: this.defaultEmail }],\r\n emailSubject: this.emailSubjectDefaultValue,\r\n emailBody: this.emailBodyDefaultValue\r\n });\r\n this.actionBarEmailModal.toggle();\r\n }\r\n\r\n /**\r\n * Method to close circulate bcr modal without cirucalting\r\n */\r\n cancelEmailModal(event): void {\r\n if (event) {\r\n this.form.reset();\r\n this.actionBarEmailModal.close();\r\n }\r\n }\r\n\r\n /**\r\n * Cancel the email modal\r\n */\r\n public cancel(): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n}\r\n","import { Component, Input, ViewChild, OnChanges, OnInit } from '@angular/core';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { Router } from '@angular/router';\r\nimport { ToastNotificationsService, TypeaheadValue } from 'proceduralsystem-clientcomponents';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { take } from 'rxjs/operators';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { CancelConfirmModalComponent } from 'src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\nimport { CustomModalComponent } from 'src/app/shared/components/custom-modal/custom-modal.component';\r\nimport { isEmpty } from 'lodash-es';\r\nimport { ReportStoreService } from 'src/app/services/report-store.service';\r\nimport {TranslateService} from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'oir-circulate-bcr-modal',\r\n templateUrl: './circulate-bcr-modal.component.html',\r\n styleUrls: ['./circulate-bcr-modal.component.less']\r\n})\r\nexport class CirculateBcrModalComponent implements OnInit, OnChanges {\r\n\r\n @Input() startBcrTime: string;\r\n @Input() endBcrTime: string;\r\n @Input() reportNote: string;\r\n @Input() report: any;\r\n\r\n @ViewChild('circulateBcrModal') circulateBcrModal: CustomModalComponent;\r\n @ViewChild('cancelConfirmModalComponent') cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n public form: UntypedFormGroup;\r\n public recipientsEmails: TypeaheadValue[] = [];\r\n public ccEmalis: TypeaheadValue[] = [];\r\n public bccEmalis: TypeaheadValue[] = [];\r\n public emailSubjectDefaultValue: string;\r\n public emailBodyDefaultValue: string;\r\n public emailBodyRevisedDefaultValue: string;\r\n public revisedBcrNumber: string;\r\n public updateBcrNumber: string;\r\n public action: string;\r\n public startDate;\r\n public endDate;\r\n public newRevisionNumber;\r\n public newUpdateNumber;\r\n\r\n private defaultEmail = 'journal.office@oireachtas.ie';\r\n private circulateTriggered = false;\r\n\r\n constructor(\r\n private reportStoreService: ReportStoreService,\r\n private formBuilder: UntypedFormBuilder,\r\n private router: Router,\r\n private translateService: TranslateService,\r\n private toastService: ToastNotificationsService,\r\n private reportService: ReportService,\r\n private sharedService: SharedService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n toEmail: [[], Validators.required],\r\n ccEmail: [],\r\n bccEmail: [],\r\n emailSubject: ['', Validators.maxLength(250)],\r\n emailBody: ['', Validators.maxLength(1000)],\r\n });\r\n this.reportService.getMailsList().pipe(take(1)).subscribe(res => {\r\n res.map((emails) => {\r\n if (emails.recipientEmail !== null) {\r\n this.recipientsEmails.push({ value: emails.recipientId, title: emails.recipientEmail });\r\n }\r\n });\r\n });\r\n // Only temporary for development team.\r\n this.recipientsEmails = this.sharedService.addDevEmails(this.recipientsEmails);\r\n }\r\n\r\n ngOnChanges() {\r\n this.startDate = this.sharedService.convertDate(this.startBcrTime);\r\n this.endDate = this.sharedService.convertDate(this.endBcrTime);\r\n if (!isEmpty(this.report)) {\r\n this.revisedBcrNumber = this.report.reportVerison.toString().split('.')[0];\r\n this.updateBcrNumber = this.report.reportVerison.toString().split('.')[1];\r\n this.newRevisionNumber = parseInt(this.revisedBcrNumber, 10) + 1;\r\n this.newUpdateNumber = '01';\r\n }\r\n }\r\n\r\n /**\r\n * Open the ciruculate modal\r\n */\r\n public open(action: string): void {\r\n this.revisedBcrNumber = this.newRevisionNumber.toString();\r\n this.updateBcrNumber = this.newUpdateNumber;\r\n this.createMailText();\r\n this.action = action;\r\n this.form.patchValue({\r\n toEmail: [{ value: 0, title: this.defaultEmail}],\r\n emailSubject: this.emailSubjectDefaultValue,\r\n emailBody: this.action === 'circulate' ? this.emailBodyDefaultValue : this.emailBodyRevisedDefaultValue,\r\n });\r\n this.circulateBcrModal.toggle();\r\n }\r\n\r\n /**\r\n * Circulate BCR modal\r\n */\r\n public circulate(): void {\r\n const report = this.reportStoreService.getReportData();\r\n report.reportNote = this.reportNote;\r\n\r\n this.reportStoreService.deleteCustomProps();\r\n const reportId = report.reportId || report.businessScheduleDetail.bsDetailId;\r\n\r\n // Convert dates to BE readable\r\n this.report.businessScheduleDetail.bsDetailFirstDay =\r\n this.sharedService.convertDate(this.report.businessScheduleDetail.bsDetailFirstDay);\r\n this.report.businessScheduleDetail.bsDetailLastDay =\r\n this.sharedService.convertDate(this.report.businessScheduleDetail.bsDetailLastDay);\r\n\r\n const toEmail = this.form.controls.toEmail.value ? this.sharedService.convertRecipientsToString(this.form.controls.toEmail.value) : '';\r\n const ccEmail = this.form.controls.ccEmail.value ? this.sharedService.convertRecipientsToString(this.form.controls.ccEmail.value) : '';\r\n const bccEmail = this.form.controls.bccEmail.value ? this.sharedService.convertRecipientsToString(this.form.controls.bccEmail.value) : '';\r\n\r\n this.circulateTriggered = true;\r\n this.circulateBcrModal.close();\r\n\r\n if (this.action === 'circulate') {\r\n this.reportService.circulateReport(\r\n toEmail, ccEmail, bccEmail,\r\n this.form.controls.emailSubject.value || '',\r\n this.form.controls.emailBody.value || '',\r\n report, reportId).pipe(take(1)).subscribe(() => {\r\n this.circulateTriggered = false;\r\n this.toastService.addNotification({\r\n title: this.translateService.instant('TOAST.BUSINESS_COMMITTEE_REPORT_CIRCULATED.TITLE'),\r\n description: this.translateService.instant('TOAST.BUSINESS_COMMITTEE_REPORT_CIRCULATED.BODY',\r\n [this.startBcrTime, this.endBcrTime])});\r\n this.router.navigate(['/dashboard']);\r\n });\r\n return;\r\n }\r\n this.reportService.reviseCirculateReport(\r\n toEmail, ccEmail, bccEmail,\r\n this.form.controls.emailSubject.value || '',\r\n this.form.controls.emailBody.value || '',\r\n report, reportId).pipe(take(1)).subscribe(() => {\r\n this.circulateTriggered = false;\r\n this.toastService.addNotification({\r\n title: this.translateService.instant('TOAST.BUSINESS_COMMITTEE_REPORT_REVISED_CIRCULATED.TITLE'),\r\n description: this.translateService.instant('TOAST.BUSINESS_COMMITTEE_REPORT_REVISED_CIRCULATED.BODY',\r\n [this.startBcrTime, this.endBcrTime, this.revisedBcrNumber, this.updateBcrNumber])});\r\n this.router.navigate(['/dashboard']);\r\n });\r\n }\r\n\r\n /**\r\n * Method to close circulate bcr modal without cirucalting\r\n */\r\n public cancelCirculateModal(event: any): void {\r\n if (event) {\r\n this.circulateBcrModal.close();\r\n this.form.reset();\r\n }\r\n }\r\n /**\r\n * Cancel the ciruculate modal\r\n */\r\n public cancel(): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Method to close circulate bcr modal without cirucalting\r\n */\r\n public onModalClose(): void {\r\n if (this.circulateTriggered) {\r\n return;\r\n }\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Function to create mail subject text and body\r\n */\r\n private createMailText(): void {\r\n this.emailSubjectDefaultValue = this.startDate === this.endDate ?\r\n this.translateService.instant('VIEW_REPORT_SECTION.CIRCULATE_EMAIL.SUBJECT.DEFAULT_SINGLE_DAY_VALUE',\r\n [this.startBcrTime, this.revisedBcrNumber, this.updateBcrNumber]) :\r\n this.translateService.instant('VIEW_REPORT_SECTION.CIRCULATE_EMAIL.SUBJECT.DEFAULT_VALUE',\r\n [this.startBcrTime, this.endBcrTime, this.revisedBcrNumber, this.updateBcrNumber]);\r\n this.emailBodyDefaultValue = this.startDate === this.endDate ?\r\n this.translateService.instant('VIEW_REPORT_SECTION.CIRCULATE_EMAIL.BODY.DEFAULT_SINGLE_DAY_VALUE',\r\n [this.startBcrTime]) :\r\n this.translateService.instant('VIEW_REPORT_SECTION.CIRCULATE_EMAIL.BODY.DEFAULT_VALUE',\r\n [this.startBcrTime, this.endBcrTime]);\r\n this.emailBodyRevisedDefaultValue = this.startDate === this.endDate ?\r\n this.translateService.instant('VIEW_REPORT_SECTION.CIRCULATE_EMAIL.BODY.DEFAULT_SINGLE_DAY_REVISED_VALUE',\r\n [this.startBcrTime]) :\r\n this.translateService.instant('VIEW_REPORT_SECTION.CIRCULATE_EMAIL.BODY.DEFAULT_REVISED_VALUE',\r\n [this.startBcrTime, this.endBcrTime]);\r\n }\r\n}\r\n","import { Component, ViewChild, EventEmitter, Output } from '@angular/core';\r\nimport { ModalComponent } from 'proceduralsystem-clientcomponents';\r\n\r\n@Component({\r\n selector: 'oir-cancel-confirm-modal',\r\n templateUrl: './cancel-confirm-modal.component.html',\r\n styleUrls: ['./cancel-confirm-modal.component.less']\r\n})\r\nexport class CancelConfirmModalComponent {\r\n\r\n @Output() decision: EventEmitter = new EventEmitter();\r\n @ViewChild('confirmCancelModal') confirmCancelModal: ModalComponent;\r\n\r\n /**\r\n * Method to confirm cancel modal and clear input fields\r\n */\r\n public confirm(): void {\r\n this.decision.emit(true);\r\n this.confirmCancelModal.close();\r\n }\r\n /**\r\n * Method to cancel modal\r\n */\r\n public cancel(): void {\r\n this.decision.emit(false);\r\n this.confirmCancelModal.close();\r\n }\r\n /**\r\n * Toggle the cancel modal\r\n */\r\n public toggle(): void {\r\n this.confirmCancelModal.toggle();\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input, ViewChild, Output, EventEmitter, OnDestroy } from '@angular/core';\r\nimport { PaginationOptions, SelectValue } from 'proceduralsystem-clientcomponents';\r\nimport { UntypedFormGroup, UntypedFormBuilder } from '@angular/forms';\r\nimport { Reports } from 'src/app/shared/models/dashboard.model';\r\nimport { DeleteConfirmationModalComponent } from '../delete-confirmation-modal/delete-confirmation-modal.component';\r\nimport { DashboardService } from '../dashboard-services/dashboard-service.service';\r\nimport { takeUntil, debounceTime, filter } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\nimport { Router } from '@angular/router';\r\nimport { OutstandingWorkItemsModalComponent } from '../outstanding-work-items-modal/outstanding-work-items-modal.component';\r\nimport { TypeOfReport, TabIndexes } from 'src/app/shared/report.enum';\r\nimport { isEqual } from 'lodash-es';\r\nimport {TranslateService} from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'oir-current-draft-report',\r\n templateUrl: './current-draft-report.component.html',\r\n styleUrls: ['./current-draft-report.component.less']\r\n})\r\nexport class CurrentDraftReportComponent implements OnInit, OnDestroy {\r\n\r\n @Input() type: string;\r\n @Input() queryType: number;\r\n @Input() itemsPerPage: number;\r\n @Input() hasOutstandingItems: number;\r\n @Input() showDelete: false;\r\n @Input() showFilter: false;\r\n\r\n @Output() pageChange: EventEmitter = new EventEmitter();\r\n @Output() previousReportFormChange: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('dashboardDeleteModal') dashboardDeleteModal: DeleteConfirmationModalComponent;\r\n @ViewChild('outstandingItemsModal') outstandingItemsModal: OutstandingWorkItemsModalComponent;\r\n\r\n public totalReports = {};\r\n public paginationList: Reports[];\r\n public previousReportForm: UntypedFormGroup;\r\n public currentPage = 1;\r\n public data: SelectValue[];\r\n public typeOfReport = TypeOfReport;\r\n public tabIndex = TabIndexes;\r\n\r\n private ngUnsubscribe: Subject = new Subject();\r\n private previousReportFormOldVal: any;\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private translateService: TranslateService,\r\n private dashboardService: DashboardService,\r\n private router: Router\r\n ) { }\r\n\r\n public ngOnInit(): void {\r\n this.data = [\r\n { value: 1, title: this.translateService.instant('DASHBOARD.PREVIOUS_REPORT_TYPE_BCR_SELECT.VALUE')},\r\n { value: 3, title: this.translateService.instant('DASHBOARD.PREVIOUS_REPORT_TYPE_OB_SELECT.VALUE')},\r\n { value: 2, title: this.translateService.instant('DASHBOARD.PREVIOUS_REPORT_TYPE_RR_SELECT.VALUE')},\r\n ];\r\n\r\n this.dashboardService.reportDataArrived.pipe(takeUntil(this.ngUnsubscribe)).subscribe(res => {\r\n this.updateList(res.reports[this.queryType]);\r\n this.totalReports[this.queryType] = !!res.totalPages[this.queryType] ? res.totalPages[this.queryType] : 0;\r\n });\r\n\r\n this.previousReportForm = this.formBuilder.group({\r\n reportType: '',\r\n dateRange: ''\r\n });\r\n\r\n if (this.showFilter) {\r\n this.onPreviousReportFormChange();\r\n }\r\n\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Function to define pagination options\r\n * @param id Pagination id\r\n */\r\n public getPaginationOptions(id: string): PaginationOptions {\r\n return {\r\n id,\r\n itemsPerPage: this.itemsPerPage,\r\n currentPage: this.currentPage,\r\n totalItems: this.totalReports[this.queryType]\r\n };\r\n }\r\n\r\n /**\r\n * Page change event\r\n * @param pageNumber Page number\r\n */\r\n public onPageChange(pageNumber: number, queryType: number): void {\r\n const changeData = {\r\n pageNumber: pageNumber - 1,\r\n queryType,\r\n itemsPerPage: this.itemsPerPage,\r\n };\r\n this.pageChange.emit(changeData);\r\n this.queryType = queryType;\r\n this.currentPage = pageNumber;\r\n }\r\n\r\n /**\r\n * Function to open delete modal\r\n * @param id Report id\r\n * @param type Report type\r\n */\r\n public openDeleteReportModal(id: number, type: string, reportType: number): void {\r\n this.dashboardDeleteModal.openDeleteModal(id, type, this.queryType, reportType);\r\n }\r\n\r\n /**\r\n * Function to update pagination list\r\n * @param reportData Pagination data\r\n */\r\n private updateList(reportData: any): void {\r\n this.paginationList = [] as Reports[];\r\n if (reportData && reportData.length > 0) {\r\n for (const recievedReports of reportData) {\r\n this.paginationList.push(recievedReports);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Function to open outstanding modal or navigate to RR/OB page\r\n * @param id report Id\r\n */\r\n public openOutstandingModal(id: number, reportType: number, isOutstandingItems: boolean) {\r\n if (isOutstandingItems) {\r\n this.outstandingItemsModal.openOutstandingItemsModal(id, reportType);\r\n } else {\r\n switch (reportType) {\r\n case this.typeOfReport.RR:\r\n this.router.navigate([`/create-rapporteurs-report/${id}`]);\r\n break;\r\n case this.typeOfReport.OB:\r\n this.router.navigate([`/create-order-of-business/${id}`]);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Method to trigger previous report form value emit\r\n */\r\n public triggerPreviousReportFormValueEmit(): void {\r\n this.previousReportFormChange.emit(this.previousReportForm.value);\r\n }\r\n\r\n private onPreviousReportFormChange(): void {\r\n this.previousReportForm.valueChanges\r\n .pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n // Need timeout because date range emits value change 2x times\r\n debounceTime(200),\r\n // Need to compare with previous value because date range emits when selecting start date in range\r\n filter(val => !isEqual((this.previousReportFormOldVal || {}), val) && val.dateRange !== undefined)\r\n )\r\n .subscribe(val => {\r\n this.onPageChange(1, this.queryType);\r\n this.previousReportFormOldVal = val;\r\n });\r\n }\r\n\r\n}\r\n","import { Component, ViewChild, Output, EventEmitter } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ModalComponent } from 'proceduralsystem-clientcomponents';\r\nimport { DashboardService } from '../dashboard-services/dashboard-service.service';\r\nimport { take } from 'rxjs/operators';\r\nimport { TypeOfReport } from 'src/app/shared/report.enum';\r\n\r\n@Component({\r\n selector: 'oir-delete-confirmation-modal',\r\n templateUrl: './delete-confirmation-modal.component.html',\r\n styleUrls: ['./delete-confirmation-modal.component.less']\r\n})\r\nexport class DeleteConfirmationModalComponent {\r\n @ViewChild('Delete') deleteModal: ModalComponent;\r\n @Output() reportDeleted: EventEmitter = new EventEmitter();\r\n public reportToDelete: number;\r\n public reportTypeToDelete: number;\r\n public reportType: number;\r\n public modalTitle: string;\r\n public modalText: string;\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private dasboardService: DashboardService\r\n ) { }\r\n\r\n openDeleteModal(id: number, type: string, queryType: number, reportTypeToDelete: number) {\r\n this.reportToDelete = id;\r\n this.reportTypeToDelete = reportTypeToDelete;\r\n this.reportType = queryType;\r\n this.modalTitle = this.translateService.instant('DASHBOARD.DELETE_MODAL.TITLE', [type, TypeOfReport[reportTypeToDelete]]);\r\n this.modalText = this.translateService.instant('DASHBOARD.DELETE_MODAL.TEXT', [type.toLowerCase(), TypeOfReport[reportTypeToDelete]]);\r\n this.deleteModal.toggle();\r\n }\r\n\r\n cancelDelete() {\r\n this.deleteModal.close();\r\n }\r\n\r\n confirmDelete() {\r\n this.dasboardService.deleteReport(this.reportToDelete, this.reportTypeToDelete).pipe(take(1)).subscribe(() => {\r\n this.deleteModal.close();\r\n this.dasboardService.reportWasDeleted(this.reportType);\r\n });\r\n }\r\n\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n Input,\r\n OnDestroy,\r\n Output,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { DashboardService } from '../dashboard-services/dashboard-service.service';\r\nimport { OutstandingItems } from 'src/app/shared/models/dashboard.model';\r\nimport { takeUntil, take } from 'rxjs/operators';\r\nimport { PaginationOptions } from 'proceduralsystem-clientcomponents';\r\nimport { WorkItems } from 'src/app/shared/report.enum';\r\nimport { Router } from '@angular/router';\r\nimport { AppConfigService } from '../../services/app-config.service';\r\n\r\n@Component({\r\n selector: 'oir-outstanding-items',\r\n templateUrl: './outstanding-items.component.html',\r\n styleUrls: ['./outstanding-items.component.less']\r\n})\r\nexport class OutstandingItemsComponent implements OnInit, OnDestroy {\r\n public totalOutstandingItems = {};\r\n public paginationList: OutstandingItems[];\r\n public currentPage = 1;\r\n public get workItems(): any {\r\n return WorkItems;\r\n }\r\n\r\n public outstandingQueryType: number;\r\n @Input() itemStatus: string;\r\n\r\n @Output() outstandingItemPageChange: EventEmitter =\r\n new EventEmitter();\r\n\r\n private ngUnsubscribe: Subject = new Subject();\r\n\r\n constructor(\r\n private dashboardService: DashboardService,\r\n private config: AppConfigService,\r\n private router: Router\r\n ) {}\r\n\r\n public ngOnInit(): void {\r\n this.dashboardService.outstandingItemsStore\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe(res => {\r\n this.updateList(\r\n res.outstandingItems[res.queryType]\r\n );\r\n this.totalOutstandingItems[res.queryType] =\r\n res.outstandingCount[res.queryType];\r\n this.outstandingQueryType = res.queryType;\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Function to open extrenal link\r\n * @param url Link\r\n */\r\n public goToLink(workItemId: number): void {\r\n this.config.get('MotionEndpointUrl')\r\n .pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n take(1)\r\n ).subscribe((motionUrl: string) => {\r\n if (motionUrl) {\r\n this.router.navigate([]).then(() => {\r\n window.open(`${motionUrl}?workItemId=${workItemId}`, '_blank');\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Function to set pagination options\r\n * @param id Pagination id\r\n */\r\n public getPaginationOptions(id: string): PaginationOptions {\r\n return {\r\n id,\r\n itemsPerPage: 10,\r\n currentPage: this.currentPage,\r\n totalItems: this.totalOutstandingItems[this.outstandingQueryType]\r\n };\r\n }\r\n\r\n /**\r\n * Function whitch triggers on page change and emits data\r\n * @param pageNumber Page number\r\n */\r\n public onPageChange(pageNumber: number, queryType: number): void {\r\n const changeData = {\r\n pageNumber: pageNumber - 1,\r\n queryType,\r\n itemsPerPage: 10\r\n };\r\n this.outstandingItemPageChange.emit(changeData);\r\n this.currentPage = pageNumber;\r\n }\r\n\r\n /**\r\n * Function to update pagination list for each page\r\n * @param outstandingItemsData Data whitch should be applyed to pagination list\r\n */\r\n private updateList(outstandingItemsData: any): void {\r\n this.paginationList = [] as OutstandingItems[];\r\n if (outstandingItemsData && outstandingItemsData.length > 0) {\r\n for (const items of outstandingItemsData) {\r\n this.paginationList.push(items);\r\n }\r\n }\r\n }\r\n}\r\n","import { Component, ViewChild } from '@angular/core';\r\nimport { ModalComponent } from 'proceduralsystem-clientcomponents';\r\nimport { Router } from '@angular/router';\r\nimport { DashboardService } from '../dashboard-services/dashboard-service.service';\r\nimport { TypeOfReport } from 'src/app/shared/report.enum';\r\n\r\n@Component({\r\n selector: 'oir-outstanding-work-items-modal',\r\n templateUrl: './outstanding-work-items-modal.component.html',\r\n styleUrls: ['./outstanding-work-items-modal.component.less']\r\n})\r\nexport class OutstandingWorkItemsModalComponent {\r\n @ViewChild('outstandingItemsModal') outstandingItemsModal: ModalComponent;\r\n\r\n public itemId: number;\r\n public reportType: number;\r\n\r\n constructor(\r\n private router: Router,\r\n private dbService: DashboardService) { }\r\n\r\n /**\r\n * Function to open outstanding modal\r\n * @param id item id\r\n */\r\n public openOutstandingItemsModal(id: number, reportType: number): void {\r\n this.itemId = id;\r\n this.reportType = reportType;\r\n this.outstandingItemsModal.toggle();\r\n }\r\n\r\n /**\r\n * Function to view outstanding items\r\n */\r\n public viewOutstandingItems(): void {\r\n this.dbService.viewOutstandingItems(true);\r\n this.outstandingItemsModal.close();\r\n }\r\n\r\n /**\r\n * Function to navigate to report\r\n */\r\n public onContinue(): void {\r\n switch (this.reportType) {\r\n case TypeOfReport.RR:\r\n this.router.navigate([`/create-rapporteurs-report/${this.itemId}`]);\r\n this.outstandingItemsModal.close();\r\n break;\r\n case TypeOfReport.OB:\r\n this.router.navigate([`/create-order-of-business/${this.itemId}`]);\r\n this.outstandingItemsModal.close();\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Function to close Outstanding Items modal\r\n */\r\n public cancelOutstandingItems(): void {\r\n this.outstandingItemsModal.close();\r\n }\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n Output,\r\n EventEmitter,\r\n OnInit\r\n} from '@angular/core';\r\nimport { AnnouncementOfBusinessDays } from 'src/app/shared/models/order-of-business.model';\r\nimport { ToggleableAccordionComponent } from 'src/app/shared/components/toggleable-accordion/toggleable-accordion.component';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'oir-announcement-business-item',\r\n templateUrl: './announcement-business-item.component.html',\r\n styleUrls: ['./announcement-business-item.component.less']\r\n})\r\nexport class AnnouncementBusinessItemComponent implements OnInit {\r\n private _announcementOfBusinessDays: AnnouncementOfBusinessDays;\r\n\r\n public canToggle = true;\r\n public dayTitleGovernment: string;\r\n public dayTitleBusiness: string;\r\n public dayTitleBill: string;\r\n public dayOfTheWeek: string;\r\n public gbAfterMwd: boolean;\r\n\r\n @Input() set announcementOfBusinessDays(value: AnnouncementOfBusinessDays) {\r\n this._announcementOfBusinessDays = value;\r\n if (value) {\r\n const governmentBusiness = value.governmentBusiness.length\r\n ? value.governmentBusiness[0].sectionPosition\r\n : 0;\r\n const motionsWithoutDebates = value.motionsWithoutDebate.length\r\n ? value.motionsWithoutDebate[0].sectionPosition\r\n : 0;\r\n this.gbAfterMwd = governmentBusiness > motionsWithoutDebates;\r\n this.dayOfTheWeek = value.dayName.split(' ')[0];\r\n }\r\n }\r\n\r\n get announcementOfBusinessDays(): AnnouncementOfBusinessDays {\r\n return this._announcementOfBusinessDays;\r\n }\r\n\r\n @Output() toggleAccordion: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('accordionComponent')\r\n accordionComponent: ToggleableAccordionComponent;\r\n\r\n constructor(private translateService: TranslateService) {}\r\n\r\n ngOnInit(): void {\r\n this.dayTitleGovernment = this.translateService.instant(\r\n 'ORDER_OF_BUSINESS_GOVERNMENT_BUSINESS.TITLE'\r\n );\r\n this.dayTitleBusiness = this.translateService.instant(\r\n 'ORDER_OF_BUSINESS_PRIVATE_MEMBERS_BUSINESS.TITLE'\r\n );\r\n this.dayTitleBill = this.translateService.instant(\r\n 'ORDER_OF_BUSINESS_PRIVATE_MEMBERS_BILL.TITLE'\r\n );\r\n }\r\n\r\n /**\r\n * Method to close accordion\r\n */\r\n public closeDayAccordionBusinessItem(): void {\r\n this.canToggle = true;\r\n setTimeout(() => {\r\n this.accordionComponent.click();\r\n }, 1);\r\n }\r\n\r\n /**\r\n * Event emmiter after toggle\r\n * @param isOpen boolean\r\n */\r\n public afterToggle(isOpen: boolean) {\r\n this.toggleAccordion.emit(isOpen);\r\n }\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n Output,\r\n EventEmitter,\r\n OnInit\r\n} from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { AnnouncementOfProposedArrangementsDays } from 'src/app/shared/models/order-of-business.model';\r\nimport { ToggleableAccordionComponent } from 'src/app/shared/components/toggleable-accordion/toggleable-accordion.component';\r\n\r\n@Component({\r\n selector: 'oir-announcement-proposed-arrangement',\r\n templateUrl: './announcement-proposed-arrangement.component.html',\r\n styleUrls: ['./announcement-proposed-arrangement.component.less']\r\n})\r\nexport class AnnouncementProposedArrangementComponent implements OnInit {\r\n public canToggle = true;\r\n public dayTitle: string;\r\n\r\n @Input()\r\n announcementOfProposedArrangementsDays: AnnouncementOfProposedArrangementsDays;\r\n @Output() toggleAccordion: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('accordionComponent')\r\n accordionComponent: ToggleableAccordionComponent;\r\n\r\n constructor(private translateService: TranslateService) {}\r\n\r\n ngOnInit(): void {\r\n const dayOfTheWeek =\r\n this.announcementOfProposedArrangementsDays.dayName.split(' ')[0];\r\n this.dayTitle = this.translateService.instant(\r\n 'ORDER_OF_BUSINESS_ANNOUNCEMENT_OFPROPOSED_ARRANGEMENTS.TITLE',\r\n [dayOfTheWeek]\r\n );\r\n }\r\n\r\n /**\r\n * Method to close accordion\r\n */\r\n public closeDayAccordionProposedArrangment(): void {\r\n this.canToggle = true;\r\n setTimeout(() => {\r\n this.accordionComponent.click();\r\n }, 1);\r\n }\r\n\r\n /**\r\n * Event emmiter after toggle\r\n * @param isOpen boolean\r\n */\r\n public afterToggle(isOpen: boolean) {\r\n this.toggleAccordion.emit(isOpen);\r\n }\r\n}\r\n","import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n OnInit,\r\n OnChanges,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { ToastNotificationsService, TypeaheadValue } from 'proceduralsystem-clientcomponents';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { OrderOfBusiness } from 'src/app/shared/models/order-of-business.model';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { CancelConfirmModalComponent } from 'src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\nimport { CustomModalComponent } from 'src/app/shared/components/custom-modal/custom-modal.component';\r\n\r\n@Component({\r\n selector: 'oir-action-bar-email-modal-ob',\r\n templateUrl: './action-bar-email-modal-ob.component.html',\r\n styleUrls: ['./action-bar-email-modal-ob.component.less']\r\n})\r\nexport class ActionBarEmailModalObComponent\r\n implements OnInit, OnChanges, OnDestroy\r\n{\r\n @Input() startObTime: string;\r\n @Input() endObTime: string;\r\n @Input() orderOfBusiness: OrderOfBusiness;\r\n @Input() recipientsEmails: TypeaheadValue[];\r\n @Input() versionOb: string;\r\n @Input() isSingleDay: boolean;\r\n @Input() reportName: boolean;\r\n\r\n @ViewChild('actionBarEmailModalOb')\r\n actionBarEmailModalOb: CustomModalComponent;\r\n @ViewChild('cancelConfirmModalComponent')\r\n cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n public form: UntypedFormGroup;\r\n public emailDefaultValue: string;\r\n public emailBodyDefaultValue: string;\r\n public orderOfBusinessInModal: OrderOfBusiness;\r\n public versionObInModal: string;\r\n public sendEmailAction = false;\r\n\r\n private ngUnsubscribe: Subject = new Subject();\r\n private defaultEmail = 'journal.office@oireachtas.ie';\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private translateService: TranslateService,\r\n private toastService: ToastNotificationsService,\r\n private reportService: ReportService,\r\n private sharedService: SharedService\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n toEmail: [[], Validators.required],\r\n ccEmail: [],\r\n bccEmail: [],\r\n emailSubject: ['', Validators.maxLength(250)],\r\n emailBody: ['', Validators.maxLength(1000)]\r\n });\r\n }\r\n\r\n ngOnChanges() {\r\n this.versionObInModal = this.versionOb;\r\n this.emailDefaultValue = this.translateService.instant(\r\n 'ORDER_OF_BUSINESS.CIRCULATE_EMAIL.SUBJECT.DEFAULT_VALUE',\r\n [this.reportName, this.versionObInModal]\r\n );\r\n this.emailBodyDefaultValue = this.isSingleDay\r\n ? this.translateService.instant(\r\n 'ORDER_OF_BUSINESS.CIRCULATE_EMAIL.BODY.DEFAULT_SINGLE_VALUE',\r\n [this.reportName]\r\n )\r\n : this.translateService.instant(\r\n 'ORDER_OF_BUSINESS.CIRCULATE_EMAIL.BODY.DEFAULT_VALUE',\r\n [this.reportName]\r\n );\r\n this.orderOfBusinessInModal = this.orderOfBusiness;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Method to send mail\r\n */\r\n public sendEmailFile(): void {\r\n this.sendEmailAction = true;\r\n const emailHeader = this.emailFormData(\r\n this.form.controls.toEmail.value,\r\n this.form.controls.ccEmail.value,\r\n this.form.controls.bccEmail.value,\r\n this.form.controls.emailSubject.value[0],\r\n this.form.controls.emailBody.value[0]\r\n );\r\n this.reportService\r\n .actionBarSendEmailOb(this.orderOfBusinessInModal.obId, emailHeader)\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe(() => {\r\n this.toastService.addNotification({\r\n title: this.translateService.instant(\r\n 'TOAST.ORDER_OF_BUSINESS_SEND_EMAIL.TITLE'\r\n ),\r\n description: this.translateService.instant(\r\n 'TOAST.ORDER_OF_BUSINESS_SEND_EMAIL.BODY',\r\n [this.reportName, this.versionObInModal]\r\n )\r\n });\r\n this.actionBarEmailModalOb.close();\r\n this.sendEmailAction = false;\r\n });\r\n }\r\n\r\n /**\r\n * Open the email modal\r\n */\r\n public open(): void {\r\n this.form.patchValue({\r\n toEmail: [{ value: 1, title: this.defaultEmail }],\r\n emailSubject: [this.emailDefaultValue],\r\n emailBody: [this.emailBodyDefaultValue]\r\n });\r\n this.actionBarEmailModalOb.toggle();\r\n }\r\n\r\n /**\r\n * Function to cancel email modal\r\n * @param event event\r\n */\r\n public cancelEmailModal(event) {\r\n if (event) {\r\n this.form.reset();\r\n this.actionBarEmailModalOb.close();\r\n const title = this.translateService.instant(\r\n 'TOAST.VIEW_ORDER_OF_BUSINESS_EMAIL.NOT_SEND'\r\n );\r\n this.toastService.addNotification({ title, description: '' });\r\n }\r\n }\r\n\r\n /**\r\n * Cancel the email modal\r\n */\r\n public cancel(): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Clear form on modal close\r\n */\r\n public onModalClose(): void {\r\n if (!this.sendEmailAction) {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n }\r\n\r\n /**\r\n * Email Form Data Model\r\n * @param receiver Email Reciver\r\n * @param ccReceiver Email ccReceiver\r\n * @param bccReceiver Email bccReceiver\r\n * @param subject Email subject\r\n * @param body Email body\r\n */\r\n private emailFormData(\r\n receiver: TypeaheadValue[],\r\n ccReceiver: TypeaheadValue[],\r\n bccReceiver: TypeaheadValue[],\r\n subject: string,\r\n body: string\r\n ): object {\r\n return {\r\n receiver: receiver\r\n ? this.sharedService.convertRecipientsToString(receiver)\r\n : null,\r\n ccReceiver: ccReceiver\r\n ? this.sharedService.convertRecipientsToString(ccReceiver)\r\n : null,\r\n bccReceiver: bccReceiver\r\n ? this.sharedService.convertRecipientsToString(bccReceiver)\r\n : null,\r\n subject,\r\n body\r\n };\r\n }\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n Input,\r\n ViewChild,\r\n OnChanges,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { Subject } from 'rxjs';\r\nimport { Router } from '@angular/router';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ToastNotificationsService, TypeaheadValue } from 'proceduralsystem-clientcomponents';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { OrderOfBusiness } from 'src/app/shared/models/order-of-business.model';\r\nimport { CancelConfirmModalComponent } from 'src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\nimport { CustomModalComponent } from 'src/app/shared/components/custom-modal/custom-modal.component';\r\n\r\n@Component({\r\n selector: 'oir-circulate-modal',\r\n templateUrl: './circulate-modal.component.html',\r\n styleUrls: ['./circulate-modal.component.less']\r\n})\r\nexport class CirculateModalComponent implements OnInit, OnChanges, OnDestroy {\r\n @Input() startObTime: string;\r\n @Input() endObTime: string;\r\n @Input() orderOfBusiness: OrderOfBusiness;\r\n @Input() recipientsEmails: TypeaheadValue[];\r\n @Input() versionOb: string;\r\n @Input() isSingleDay: boolean;\r\n @Input() reportName: boolean;\r\n\r\n @ViewChild('circulateModal') circulateModal: CustomModalComponent;\r\n @ViewChild('cancelConfirmModalComponent')\r\n cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n public form: UntypedFormGroup;\r\n public emailDefaultValue: string;\r\n public emailBodyDefaultValue: string;\r\n public orderOfBusinessInModal: OrderOfBusiness;\r\n public versionObInModal: string;\r\n public sendEmailAction = false;\r\n\r\n private ngUnsubscribe: Subject = new Subject();\r\n private reportData: any;\r\n private defaultEmail = 'journal.office@oireachtas.ie';\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private router: Router,\r\n private translateService: TranslateService,\r\n private toastService: ToastNotificationsService,\r\n private reportService: ReportService,\r\n private sharedService: SharedService\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.form = this.formBuilder.group({\r\n toEmail: [[], Validators.required],\r\n ccEmail: [],\r\n bccEmail: [],\r\n emailSubject: ['', Validators.maxLength(250)],\r\n emailBody: ['', Validators.maxLength(1000)]\r\n });\r\n }\r\n\r\n ngOnChanges() {\r\n this.versionObInModal = this.versionOb;\r\n this.emailDefaultValue = this.translateService.instant(\r\n 'ORDER_OF_BUSINESS.CIRCULATE_EMAIL.SUBJECT.DEFAULT_VALUE',\r\n [this.reportName, this.versionObInModal]\r\n );\r\n this.emailBodyDefaultValue = this.isSingleDay\r\n ? this.translateService.instant(\r\n 'ORDER_OF_BUSINESS.CIRCULATE_EMAIL.BODY.DEFAULT_SINGLE_VALUE',\r\n [this.reportName]\r\n )\r\n : this.translateService.instant(\r\n 'ORDER_OF_BUSINESS.CIRCULATE_EMAIL.BODY.DEFAULT_VALUE',\r\n [this.reportName]\r\n );\r\n this.orderOfBusinessInModal = this.orderOfBusiness;\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Open the ciruculate modal\r\n */\r\n public open(reportData: any): void {\r\n this.reportData = reportData;\r\n this.form.patchValue({\r\n toEmail: [{ value: 1, title: this.defaultEmail }],\r\n emailSubject: this.emailDefaultValue,\r\n emailBody: this.emailBodyDefaultValue\r\n });\r\n this.circulateModal.toggle();\r\n }\r\n\r\n /**\r\n * Circulate the ciruculate modal\r\n */\r\n public circulate(): void {\r\n this.sendEmailAction = true;\r\n const emailHeader = {\r\n orderOfBusinessInput: this.reportData,\r\n commonMailInput: this.emailFormData(\r\n this.form.controls.toEmail.value,\r\n this.form.controls.ccEmail.value,\r\n this.form.controls.bccEmail.value,\r\n this.form.controls.emailSubject.value,\r\n this.form.controls.emailBody.value\r\n )\r\n };\r\n this.reportService\r\n .circulateOBReport(emailHeader)\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe(() => {\r\n this.toastService.addNotification({\r\n title: this.translateService.instant(\r\n 'TOAST.ORDER_OF_BUSINESS_CIRCULATED.TITLE'\r\n ),\r\n description: this.translateService.instant(\r\n 'TOAST.ORDER_OF_BUSINESS_CIRCULATED.BODY',\r\n [this.reportName, this.versionObInModal]\r\n )\r\n });\r\n this.circulateModal.close();\r\n this.router.navigate(['/dashboard']);\r\n this.sendEmailAction = false;\r\n });\r\n }\r\n\r\n /**\r\n * Function to cancel email modal\r\n * @param event event\r\n */\r\n public cancelEmailModal(event) {\r\n if (event) {\r\n this.form.reset();\r\n this.circulateModal.close();\r\n let message: any;\r\n const title = this.translateService.instant(\r\n 'TOAST.VIEW_ORDER_OF_BUSINESS_EMAIL.NOT_SEND'\r\n );\r\n this.toastService.addNotification({ title, description: '' });\r\n }\r\n }\r\n\r\n /**\r\n * Cancel the email modal\r\n */\r\n public cancel(): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Clear form on modal close\r\n */\r\n public onModalClose(): void {\r\n if (!this.sendEmailAction) {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n }\r\n\r\n /**\r\n * Email Form Data Model\r\n * @param receiver Email Reciver\r\n * @param ccReceiver Email ccReceiver\r\n * @param bccReceiver Email bccReceiver\r\n * @param subject Email subject\r\n * @param body Email body\r\n */\r\n private emailFormData(\r\n receiver: TypeaheadValue[],\r\n ccReceiver: TypeaheadValue[],\r\n bccReceiver: TypeaheadValue[],\r\n subject: string,\r\n body: string\r\n ): object {\r\n return {\r\n receiver: receiver\r\n ? this.sharedService.convertRecipientsToString(receiver)\r\n : null,\r\n ccReceiver: ccReceiver\r\n ? this.sharedService.convertRecipientsToString(ccReceiver)\r\n : null,\r\n bccReceiver: bccReceiver\r\n ? this.sharedService.convertRecipientsToString(bccReceiver)\r\n : null,\r\n subject,\r\n body\r\n };\r\n }\r\n}\r\n","import { Component, ViewChild, EventEmitter, Output } from '@angular/core';\r\nimport { ModalComponent } from 'proceduralsystem-clientcomponents';\r\n\r\n@Component({\r\n selector: 'oir-confirm-cancel-modal',\r\n templateUrl: './confirm-cancel-modal.component.html',\r\n styleUrls: ['./confirm-cancel-modal.component.less']\r\n})\r\nexport class ConfirmCancelModalComponent {\r\n\r\n @Output() cancelObConfirmed: EventEmitter = new EventEmitter();\r\n @ViewChild('cancelModal') cancelModal: ModalComponent;\r\n\r\n /**\r\n * Method to confirm cancel model\r\n */\r\n public confirm(): void {\r\n this.cancelObConfirmed.emit(true);\r\n this.cancelModal.close();\r\n }\r\n\r\n /**\r\n * Method to cancel modal\r\n */\r\n public cancel(): void {\r\n this.cancelObConfirmed.emit(false);\r\n this.cancelModal.close();\r\n }\r\n\r\n /**\r\n * Method to open the cancel modal\r\n */\r\n public toggle(): void {\r\n this.cancelModal.toggle();\r\n }\r\n\r\n\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewChild,\r\n Input,\r\n Output,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ToggleableAccordionComponent } from 'src/app/shared/components/toggleable-accordion/toggleable-accordion.component';\r\n\r\n@Component({\r\n selector: 'oir-announcement-days',\r\n templateUrl: './announcement-days.component.html',\r\n styleUrls: ['./announcement-days.component.less']\r\n})\r\nexport class AnnouncementDaysComponent implements OnInit {\r\n @Input() rapporteurReportDay: any;\r\n @Input() index: number;\r\n\r\n @Output() toggleAccordion: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('toggleableAccordion')\r\n toggleableAccordion: ToggleableAccordionComponent;\r\n\r\n public canToggle = true;\r\n public dayAnnouncementTitle: string;\r\n\r\n constructor(private translateService: TranslateService) {}\r\n\r\n ngOnInit(): void {\r\n const dayOfTheWeek = this.rapporteurReportDay.dayName.split(' ')[0];\r\n this.dayAnnouncementTitle = this.translateService.instant(\r\n 'VIEW_RAPPORTEURS_REPORT_ANNOUNCEMENT_DAYS.TITLE',\r\n [dayOfTheWeek]\r\n );\r\n }\r\n\r\n /**\r\n * Event emmiter after toggle\r\n * @param isOpen boolean\r\n */\r\n public afterToggle(isOpen: boolean) {\r\n this.toggleAccordion.emit(isOpen);\r\n }\r\n\r\n /**\r\n * Function to close day's accordion\r\n */\r\n public closeAccordion(): void {\r\n this.canToggle = true;\r\n // Need to timeout to allow change detection to work\r\n setTimeout(() => {\r\n this.toggleableAccordion.click();\r\n }, 1);\r\n }\r\n}\r\n","import { Component, ViewChild, Input } from '@angular/core';\r\nimport {\r\n ModalComponent,\r\n ToastNotificationsService\r\n} from 'proceduralsystem-clientcomponents';\r\nimport { Router } from '@angular/router';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ReportStatuses } from 'src/app/shared/report.enum';\r\n\r\n@Component({\r\n selector: 'oir-cancel-report',\r\n templateUrl: './cancel-report.component.html',\r\n styleUrls: ['./cancel-report.component.less']\r\n})\r\nexport class CancelReportComponent {\r\n @Input() reportStatus: number;\r\n\r\n @ViewChild('cancelReportModal') cancelReportModal: ModalComponent;\r\n\r\n constructor(\r\n private router: Router,\r\n private translateService: TranslateService,\r\n private toastService: ToastNotificationsService\r\n ) {}\r\n\r\n /**\r\n * Open cancel modal function\r\n */\r\n public openCancelDialog(): void {\r\n this.cancelReportModal.toggle();\r\n }\r\n\r\n /**\r\n * Close modal function\r\n */\r\n public cancelAction(): void {\r\n this.cancelReportModal.close();\r\n }\r\n\r\n /**\r\n * If report was canceled navigate to dashboard, close modal, show toast message\r\n */\r\n public cancelReport(): void {\r\n this.router.navigate(['/dashboard']);\r\n const title =\r\n this.reportStatus === ReportStatuses.Circulated\r\n ? this.translateService.instant(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_CANCEL_CIRCULATED.TITLE'\r\n )\r\n : this.translateService.instant(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_CANCEL_DRAFT.TITLE'\r\n );\r\n const description =\r\n this.reportStatus === ReportStatuses.Circulated\r\n ? this.translateService.instant(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_CANCEL_CIRCULATED.BODY'\r\n )\r\n : this.translateService.instant(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_CANCEL_DRAFT.BODY'\r\n );\r\n this.toastService.addNotification({ title, description });\r\n this.cancelReportModal.close();\r\n }\r\n}\r\n","import { Component, OnInit, ViewChild, Input, OnDestroy } from '@angular/core';\r\nimport {\r\n ToastNotificationsService,\r\n TypeaheadValue\r\n} from 'proceduralsystem-clientcomponents';\r\nimport { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';\r\nimport { Router } from '@angular/router';\r\nimport { isEmpty } from 'lodash-es';\r\nimport { ReportService } from 'src/app/services/report.service';\r\nimport { RREmailType } from 'src/app/shared/report.enum';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { SharedService } from 'src/app/services/shared.service';\r\nimport { CustomModalComponent } from 'src/app/shared/components/custom-modal/custom-modal.component';\r\nimport { CancelConfirmModalComponent } from 'src/app/create-report/cancel-confirm-modal/cancel-confirm-modal.component';\r\n\r\n@Component({\r\n selector: 'oir-send-to-rapporteur',\r\n templateUrl: './send-to-rapporteur.component.html',\r\n styleUrls: ['./send-to-rapporteur.component.less']\r\n})\r\nexport class SendToRapporteurComponent implements OnInit, OnDestroy {\r\n @Input() recipientsData: TypeaheadValue[];\r\n @Input() reportName: string;\r\n @Input() rrId: string;\r\n @Input() reportVersion: string;\r\n @Input() isSingleDay: boolean;\r\n\r\n @ViewChild('sendRapporteurReportModal')\r\n sendRapporteurReportModal: CustomModalComponent;\r\n @ViewChild('cancelConfirmModalComponent')\r\n cancelConfirmModalComponent: CancelConfirmModalComponent;\r\n\r\n public reportEmailForm: UntypedFormGroup;\r\n public emailType = RREmailType;\r\n public emailSendType: number;\r\n public reportData: any;\r\n public sendEmailAction = false;\r\n\r\n private ngUnsubscribe: Subject = new Subject();\r\n private defaultEmail = 'journal.office@oireachtas.ie';\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private reportService: ReportService,\r\n private translateService: TranslateService,\r\n private toastService: ToastNotificationsService,\r\n private sharedService: SharedService,\r\n private router: Router\r\n ) {}\r\n\r\n /**\r\n * Create form on page init\r\n */\r\n public ngOnInit(): void {\r\n this.reportEmailForm = this.fb.group({\r\n toInput: [[], Validators.required],\r\n ccInput: [[], Validators.required],\r\n bccInput: [[], Validators.required],\r\n subject: ['', Validators.maxLength(250)],\r\n body: ['', Validators.maxLength(1000)]\r\n });\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Function to check is form valid\r\n */\r\n public isFormValid(): boolean {\r\n return (\r\n this.reportEmailForm.controls.toInput.valid ||\r\n this.reportEmailForm.controls.ccInput.valid ||\r\n this.reportEmailForm.controls.bccInput.valid\r\n );\r\n }\r\n\r\n /**\r\n * Open report modal\r\n */\r\n public openReportModal(emailSendType: number, reportInputData: any): void {\r\n this.sendRapporteurReportModal.toggle();\r\n this.emailSendType = emailSendType;\r\n this.reportData = reportInputData;\r\n this.patchFormDefaultValues(this.reportName);\r\n\r\n // Only temporary for development team.\r\n this.recipientsData = this.sharedService.addDevEmails(this.recipientsData);\r\n }\r\n\r\n /**\r\n * Reset form and close report modal\r\n */\r\n public cancelSendReport(): void {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n\r\n /**\r\n * Function to cancel email modal\r\n * @param event event\r\n */\r\n public cancelEmailModal(event) {\r\n if (event) {\r\n this.reportEmailForm.reset();\r\n this.sendRapporteurReportModal.close();\r\n const title = this.translateService.instant(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_EMAIL.NOT_SEND'\r\n );\r\n this.toastService.addNotification({ title, description: '' });\r\n }\r\n }\r\n\r\n /**\r\n * Clear form on modal close\r\n */\r\n public onModalClose(): void {\r\n if (!this.sendEmailAction) {\r\n this.cancelConfirmModalComponent.toggle();\r\n }\r\n }\r\n\r\n /**\r\n * Send report function, after safe navigate to dashboard, shoew toast message and close modal\r\n */\r\n public sendReport(): void {\r\n this.sendEmailAction = true;\r\n // If Action bar Email modal called\r\n if (this.emailSendType === RREmailType.ActionBarEmail) {\r\n // Model to send\r\n const emailHeader = this.emailFormData(\r\n this.reportEmailForm.controls.toInput.value,\r\n this.reportEmailForm.controls.ccInput.value,\r\n this.reportEmailForm.controls.bccInput.value,\r\n this.reportEmailForm.controls.subject.value,\r\n this.reportEmailForm.controls.body.value\r\n );\r\n // API to send Email\r\n this.reportService\r\n .sendRapporteurReportEmail(this.rrId, emailHeader)\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe(() => {\r\n this.emailToastNotification(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_EMAIL.TITLE',\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_EMAIL.BODY'\r\n );\r\n this.sendRapporteurReportModal.close();\r\n this.sendEmailAction = false;\r\n });\r\n } else {\r\n // Model to send\r\n const emailHeader = {\r\n rapporteurReportInput: this.reportData,\r\n commonMailInput: this.emailFormData(\r\n this.reportEmailForm.controls.toInput.value,\r\n this.reportEmailForm.controls.ccInput.value,\r\n this.reportEmailForm.controls.bccInput.value,\r\n this.reportEmailForm.controls.subject.value,\r\n this.reportEmailForm.controls.body.value\r\n )\r\n };\r\n // API to send Email\r\n this.reportService\r\n .sendToRapporteur(emailHeader)\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe(() => {\r\n this.emailToastNotification(\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_SENT_TO_RAPPORTEUR.TITLE',\r\n 'TOAST.VIEW_RAPPORTEURS_REPORT_SENT_TO_RAPPORTEUR.BODY'\r\n );\r\n this.router.navigate(['dashboard/']);\r\n this.sendRapporteurReportModal.close();\r\n this.sendEmailAction = false;\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Email Form Data Model\r\n * @param receiver Email Reciver\r\n * @param ccReceiver Email ccReceiver\r\n * @param bccReceiver Email bccReceiver\r\n * @param subject Email subject\r\n * @param body Email body\r\n */\r\n private emailFormData(\r\n receiver: TypeaheadValue[],\r\n ccReceiver: TypeaheadValue[],\r\n bccReceiver: TypeaheadValue[],\r\n subject: string,\r\n body: string\r\n ): object {\r\n return {\r\n receiver: !isEmpty(receiver)\r\n ? this.sharedService.convertRecipientsToString(receiver)\r\n : null,\r\n ccReceiver: !isEmpty(ccReceiver)\r\n ? this.sharedService.convertRecipientsToString(ccReceiver)\r\n : null,\r\n bccReceiver: !isEmpty(bccReceiver)\r\n ? this.sharedService.convertRecipientsToString(bccReceiver)\r\n : null,\r\n subject,\r\n body\r\n };\r\n }\r\n\r\n /**\r\n * Function to show toast notificatin\r\n * @param titleString Notification title translation string\r\n * @param bodyString Notification body translation string\r\n */\r\n private emailToastNotification(\r\n titleString: string,\r\n bodyString: string\r\n ): void {\r\n let message: any;\r\n const title = this.translateService.instant(titleString);\r\n const description = this.translateService.instant(bodyString, [\r\n this.reportName\r\n ]);\r\n this.toastService.addNotification({ title, description });\r\n }\r\n\r\n /**\r\n * Function to patch default form values\r\n * @param reportName Report name\r\n */\r\n private patchFormDefaultValues(reportName: string): void {\r\n this.reportEmailForm.patchValue(\r\n {\r\n toInput: [{ value: 1, title: this.defaultEmail }],\r\n subject: this.translateService.instant(\r\n 'VIEW_RAPPORTEURS_REPORT_SEND_TO_RAPPORTEUR_MODAL.SUBJECT',\r\n [reportName, this.reportVersion]\r\n ),\r\n body: this.isSingleDay\r\n ? this.translateService.instant(\r\n 'VIEW_RAPPORTEURS_REPORT_SEND_TO_RAPPORTEUR_MODAL_SINGLE_DAY.BODY',\r\n [reportName]\r\n )\r\n : this.translateService.instant(\r\n 'VIEW_RAPPORTEURS_REPORT_SEND_TO_RAPPORTEUR_MODAL.BODY',\r\n [reportName]\r\n )\r\n },\r\n { emitEvent: false }\r\n );\r\n }\r\n}\r\n","import { Component, AfterViewChecked, Input, ViewChild, ElementRef, ContentChildren, Output, EventEmitter } from '@angular/core';\r\nimport { TabIndexPipe } from 'proceduralsystem-clientcomponents';\r\n\r\n@Component({\r\n selector: 'oir-emitter-collapsible-panel',\r\n templateUrl: './emitter-collapsible-panel.component.html',\r\n styleUrls: ['./emitter-collapsible-panel.component.less']\r\n})\r\nexport class EmitterCollapsiblePanelComponent implements AfterViewChecked {\r\n\r\n private dom: Document;\r\n\r\n @Input() ariaPanelTitle: string;\r\n @Input() scrollTop: boolean;\r\n @Input() public collapsed = true;\r\n @Input() public canToggle = true;\r\n @ViewChild('emitterCollapsablePanel') emitterCollapsablePanel: ElementRef;\r\n @ContentChildren(Input) topLevelPanes;\r\n @Output() toggled: EventEmitter = new EventEmitter();\r\n\r\n // Depending on whether the panel is collapsed make fields tabbable or untabbable.\r\n setTabIndex(): void {\r\n new TabIndexPipe().transform(!this.collapsed, this.emitterCollapsablePanel);\r\n }\r\n\r\n constructor() {\r\n this.dom = document;\r\n }\r\n\r\n public ngAfterViewChecked(): void {\r\n this.setTabIndex();\r\n }\r\n\r\n public toggle(): void {\r\n this.collapsed = !this.collapsed;\r\n this.setTabIndex();\r\n this.toggled.emit(this.collapsed);\r\n }\r\n\r\n public scroll(): void {\r\n const body: any = this.dom.getElementsByClassName('body');\r\n if (body) { body[0].scrollTop = 0; }\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'oir-accordion-header',\r\n templateUrl: './accordion-header.component.html',\r\n styleUrls: ['./accordion-header.component.less']\r\n})\r\nexport class AccordionHeaderComponent implements OnInit {\r\n\r\n @Input() showButton = false;\r\n @Input() buttonTitle = '';\r\n @Input() iconName = 'filled-circle-x';\r\n @Input() showTime = false;\r\n @Input() time = '';\r\n @Input() title = '';\r\n @Input() disableAccordionHeader: boolean;\r\n\r\n @Output() onButtonClick: EventEmitter = new EventEmitter();\r\n\r\n public imageUrl = '';\r\n\r\n public ngOnInit(): void {\r\n this.imageUrl = `url(./assets/${this.iconName}.svg)`;\r\n }\r\n\r\n /**\r\n * Method to emit event when button is clicked\r\n */\r\n public click(): void {\r\n this.onButtonClick.emit(true);\r\n }\r\n\r\n}\r\n","import {\r\n Component,\r\n AfterViewInit,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ViewChild,\r\n ElementRef,\r\n Renderer2,\r\n} from \"@angular/core\";\r\nimport {\r\n OverlayService,\r\n TabIndexPipe,\r\n} from \"proceduralsystem-clientcomponents\";\r\n\r\n@Component({\r\n selector: \"oir-custom-modal\",\r\n templateUrl: \"./custom-modal.component.html\",\r\n styleUrls: [\"./custom-modal.component.less\"],\r\n})\r\nexport class CustomModalComponent implements AfterViewInit {\r\n TAB_KEYCODE = \"9\";\r\n\r\n @Input() showCancel = true;\r\n @Input() cancelNoAction = false;\r\n @Input() class = \"\";\r\n\r\n @Output() readonly modalClose: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(\"modalHeight\") modalHeight: ElementRef;\r\n @ViewChild(\"modalDialog\") modalDialog: ElementRef;\r\n\r\n overflowClass = \"\";\r\n focusable: any;\r\n private visibleState = false;\r\n private keyDownEventListener: Function;\r\n\r\n set visible(visible: boolean) {\r\n const element = this.modalHeight.nativeElement;\r\n if (visible) {\r\n setTimeout(() => {\r\n this.overlayService.show(true);\r\n this.registerListener();\r\n const viewHeight = element.offsetHeight;\r\n // Check if content of modal exceeds browser window.\r\n if (viewHeight < window.innerHeight) {\r\n this.removeOverflow();\r\n this.renderer.setAttribute(\r\n element,\r\n \"style\",\r\n `margin-top: -${viewHeight / 2}px !important;`\r\n );\r\n } else {\r\n // Set height of modal to match brower window.\r\n this.renderer.setAttribute(\r\n element,\r\n \"style\",\r\n `margin-top: -${viewHeight / 2}px !important; height: ${\r\n window.innerHeight\r\n }px;`\r\n );\r\n this.addOverflow();\r\n }\r\n this.visibleState = visible;\r\n this.setTabIndex(this.visibleState);\r\n }, 500);\r\n } else {\r\n this.checkOverlay();\r\n this.visibleState = visible;\r\n this.setTabIndex(this.visibleState);\r\n if (this.keyDownEventListener) {\r\n this.keyDownEventListener();\r\n }\r\n }\r\n }\r\n get visible(): boolean {\r\n return this.visibleState;\r\n }\r\n\r\n constructor(\r\n private readonly el: ElementRef,\r\n private readonly overlayService: OverlayService,\r\n private readonly renderer: Renderer2\r\n ) {}\r\n\r\n ngAfterViewInit(): void {\r\n // Get all tabbable elements in document.\r\n this.focusable = document.querySelectorAll(\r\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\r\n );\r\n this.setTabIndex(this.visibleState);\r\n }\r\n\r\n close(): void {\r\n this.visible = false;\r\n this.modalClose.emit();\r\n }\r\n\r\n noCloseAction(): void {\r\n this.modalClose.emit();\r\n }\r\n\r\n toggle(): void {\r\n this.visible = !this.visible;\r\n }\r\n\r\n setTabIndex(visible): void {\r\n new TabIndexPipe().transform(visible, this.modalDialog);\r\n }\r\n\r\n registerListener(): void {\r\n this.keyDownEventListener = this.renderer.listen(\r\n \"document\",\r\n \"keydown\",\r\n (event: KeyboardEvent) => {\r\n // Ignore keydown if its not tab or the current element does not belong to this specific modal.\r\n if (\r\n event.code === this.TAB_KEYCODE &&\r\n this.el.nativeElement.contains(event.target) &&\r\n !event.shiftKey\r\n ) {\r\n // Work forwards through the tabbable elements.\r\n this.handleTabKeyDown(event);\r\n } else if (\r\n event.code === this.TAB_KEYCODE &&\r\n this.el.nativeElement.contains(event.target) &&\r\n event.shiftKey\r\n ) {\r\n // Search forwards. Prevent shift tab from working if on first tabbable element in this modal.\r\n this.handleShiftTabKeyDown(event);\r\n }\r\n }\r\n );\r\n }\r\n\r\n private checkOverlay(): void {\r\n // Setting time out to get changes and check how mutch modals are opened\r\n setTimeout(() => {\r\n // If no modals opened remove overlay\r\n if (document.querySelectorAll(\"oir-custom-modal .visible\").length === 0) {\r\n this.overlayService.hide(true);\r\n }\r\n }, 100);\r\n }\r\n\r\n private addOverflow(): void {\r\n // Don't add duplicate class.\r\n if (this.overflowClass.indexOf(\"modalOverflow\") === -1) {\r\n // Add scrollbar.\r\n this.overflowClass = \"modalOverflow\";\r\n }\r\n }\r\n\r\n private removeOverflow(): void {\r\n // Remove attached scroll bar if exists and is not needed.\r\n if (this.overflowClass.indexOf(\"modalOverflow\") > -1) {\r\n this.overflowClass = \"\";\r\n }\r\n }\r\n\r\n private handleTabKeyDown(event: KeyboardEvent): void {\r\n for (let i = this.focusable.length - 1; i > 0; i--) {\r\n if (this.el.nativeElement.contains(this.focusable[i])) {\r\n // If its the last tabbable element prevent the keydown from executing.\r\n if (event.target === this.focusable[i]) {\r\n event.preventDefault();\r\n }\r\n // Ignore disabled elements.\r\n if (this.focusable[i].disabled) {\r\n continue;\r\n }\r\n // Breaks on the first tabbable element belong to this modal.\r\n break;\r\n }\r\n }\r\n }\r\n\r\n private handleShiftTabKeyDown(event: KeyboardEvent) {\r\n for (let i = 0; i < this.focusable.length - 1; i++) {\r\n if (this.el.nativeElement.contains(this.focusable[i])) {\r\n if (event.target === this.focusable[i]) {\r\n event.preventDefault();\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n forwardRef,\r\n QueryList,\r\n ViewChildren,\r\n ElementRef,\r\n ViewChild,\r\n Input,\r\n EventEmitter,\r\n Output,\r\n Renderer2,\r\n SimpleChanges,\r\n} from \"@angular/core\";\r\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\nimport { NgbDropdown } from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {\r\n SelectValue,\r\n MultiselectOptions,\r\n SelectModel,\r\n ArrayHelper,\r\n} from \"proceduralsystem-clientcomponents\";\r\nimport { Stages } from \"../../report.enum\";\r\n\r\n@Component({\r\n selector: \"oir-custom-multiselect\",\r\n templateUrl: \"./custom-multiselect.component.html\",\r\n styleUrls: [\"./custom-multiselect.component.less\"],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CustomMultiselectComponent),\r\n multi: true,\r\n },\r\n ],\r\n})\r\nexport class CustomMultiselectComponent implements OnInit {\r\n @ViewChildren(\"inputs\") inputs: QueryList;\r\n @ViewChildren(\"searchInput\") searchInputs: QueryList;\r\n\r\n @ViewChild(NgbDropdown) dropdown: NgbDropdown;\r\n\r\n @Input() placeholder: string;\r\n @Input() data: SelectValue[] = [];\r\n @Input() options: MultiselectOptions;\r\n @Input() disabled: boolean;\r\n @Input() id = \"\";\r\n @Input() defaultStage: number;\r\n\r\n @Input() model = [];\r\n @Output() modelChange: EventEmitter = new EventEmitter();\r\n\r\n dataObj: SelectValue[] = [];\r\n query: string;\r\n title = \"\";\r\n multiselectModel: SelectModel = {\r\n headings: [],\r\n active: false,\r\n animating: false,\r\n };\r\n\r\n private init = false;\r\n private clickEventListener: Function;\r\n private keyDownEventLisener: Function;\r\n private stagesToCheck: any;\r\n\r\n propagateChange = (_: any) => {};\r\n propagateTouch = (_?: any) => {};\r\n\r\n constructor(\r\n private readonly el: ElementRef,\r\n private readonly renderer: Renderer2\r\n ) {}\r\n\r\n get activePills(): any {\r\n return this.dataObj.filter((x) => x.selected);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.stagesToCheck = [\r\n Stages.FirstStage,\r\n Stages.SecondStage,\r\n Stages.OrderForSecondStage,\r\n Stages.CommitteeStage,\r\n Stages.FifthStage,\r\n Stages.OrderForCommitteeStage,\r\n Stages.OrderForFifthStage,\r\n Stages.OrderForReport,\r\n Stages.ReportStage,\r\n ];\r\n\r\n this.multiselectModel = {\r\n headings: [],\r\n active: false,\r\n animating: false,\r\n };\r\n this.dataObj = JSON.parse(JSON.stringify(this.data || []));\r\n\r\n this.initOptions();\r\n\r\n if (!this.placeholder) {\r\n this.placeholder = \"Select an option\";\r\n }\r\n if (!this.dataObj) {\r\n this.dataObj = [];\r\n }\r\n if (this.dataObj.length > 0) {\r\n this.refreshModel();\r\n }\r\n\r\n this.init = true;\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.dropdown.placement = \"bottom\";\r\n this.dropdown.autoClose = false;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (this.init) {\r\n if (changes.data && this.data) {\r\n this.dataObj = JSON.parse(JSON.stringify(this.data));\r\n }\r\n\r\n this.refreshModel();\r\n }\r\n }\r\n\r\n writeValue(obj: any): void {\r\n obj = obj || [];\r\n if (this.init) {\r\n this.model = obj.hasOwnProperty(\"value\") ? obj.value : obj;\r\n\r\n this.refreshModel();\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.propagateChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.propagateTouch = fn;\r\n }\r\n\r\n setDisabledState(value: any): void {\r\n this.disabled = value;\r\n }\r\n\r\n displayTitle(): boolean {\r\n return (\r\n !this.options.pills ||\r\n (this.options.pills && this.model && this.model.length === 0)\r\n );\r\n }\r\n\r\n selectKeyDown(event): void {\r\n if (event.which === 13 || event.which === 32) {\r\n this.dropdown.toggle();\r\n if (this.options.search && this.dropdown.isOpen()) {\r\n if (!this.options.headings) {\r\n this.setFocusOnSearchBox(0);\r\n } else {\r\n this.setFocusOnSearchBox(1);\r\n }\r\n }\r\n } else if (event.which === 46) {\r\n this.clearSelected();\r\n }\r\n }\r\n\r\n setFocusOnSearchBox(num): void {\r\n setTimeout(() => {\r\n this.searchInputs.toArray()[num].nativeElement.focus();\r\n }, 100);\r\n }\r\n\r\n clearSearchInput(): void {\r\n this.searchInputs.toArray().forEach((el) => {\r\n el.nativeElement.value = \"\";\r\n });\r\n if (this.query !== \"\") {\r\n this.query = \"\";\r\n this.searchValue();\r\n }\r\n }\r\n\r\n dropdownToggled(): void {\r\n if (!this.dropdown.isOpen()) {\r\n // Clears search option.\r\n this.clearSearchInput();\r\n // Removes listener if dropdown closed.\r\n this.clickEventListener();\r\n this.keyDownEventLisener();\r\n } else {\r\n // On dropdown open add event listener.\r\n this.registerListener();\r\n }\r\n }\r\n\r\n toggle(): void {\r\n if (!this.disabled && !this.multiselectModel.animating) {\r\n this.query = \"\";\r\n this.searchValue();\r\n\r\n this.multiselectModel.active = !this.multiselectModel.active;\r\n this.multiselectModel.animating = true;\r\n\r\n setTimeout(() => (this.multiselectModel.animating = false), 280);\r\n }\r\n }\r\n\r\n onDropDownOpen(event): void {\r\n const button: NodeListOf = event.target\r\n .closest(\".dropdown\")\r\n .querySelectorAll(\".dropdown-item\");\r\n\r\n if (this.dataObj[Stages.AllStages - 1].selected) {\r\n this.dataObj.forEach((item) => {\r\n if (item.value !== Stages.AllStages) {\r\n button[item.value - 1].setAttribute(\"disabled\", \"true\");\r\n }\r\n });\r\n }\r\n\r\n if (this.dataObj[Stages.AmendmentsFromTheSeanad - 1].selected) {\r\n this.dataObj.forEach((item) => {\r\n if (item.value !== Stages.AmendmentsFromTheSeanad) {\r\n button[item.value - 1].setAttribute(\"disabled\", \"true\");\r\n }\r\n });\r\n }\r\n\r\n for (const item of this.stagesToCheck) {\r\n if (this.dataObj[item - 1].selected) {\r\n button[Stages.AllStages - 1].setAttribute(\"disabled\", \"true\");\r\n button[Stages.AmendmentsFromTheSeanad - 1].setAttribute(\r\n \"disabled\",\r\n \"true\"\r\n );\r\n break;\r\n }\r\n }\r\n }\r\n\r\n stageSelect(option: SelectValue, action: string, event?: any): void {\r\n setTimeout(() => this.handleStageOptionSelect(option, action, event), 100);\r\n }\r\n\r\n select(option: SelectValue, event: any): void {\r\n this.stageSelect(option, \"select\", event);\r\n if (!option.disabled) {\r\n if (option.selected) {\r\n option.selected = false;\r\n this.model = this.model.filter((x) => x !== option.value) || [];\r\n } else {\r\n this.dataObj.filter((x) => x.value === option.value)[0].selected = true;\r\n this.model.push(option.value);\r\n // Angular change detection doesn't check the contents of arrays or object.\r\n this.model = this.model.slice();\r\n }\r\n\r\n this.refreshTitle();\r\n this.modelChange.emit(this.model);\r\n this.propagateChange(this.model);\r\n }\r\n }\r\n\r\n selectAllValues(): void {\r\n for (const dataItem of this.dataObj) {\r\n if (!dataItem.hidden && !dataItem.disabled) {\r\n dataItem.selected = true;\r\n }\r\n }\r\n\r\n this.model = this.dataObj.filter((x) => x.selected).map((x) => x.value);\r\n\r\n this.refreshTitle();\r\n\r\n this.propagateChange(this.model);\r\n this.modelChange.emit(this.model);\r\n }\r\n\r\n clearSelected(): void {\r\n for (const dataItem of this.dataObj) {\r\n if (!dataItem.hidden) {\r\n dataItem.selected = false;\r\n }\r\n }\r\n\r\n this.model = [];\r\n\r\n this.refreshTitle();\r\n\r\n this.propagateChange(this.model);\r\n this.modelChange.emit(this.model);\r\n }\r\n\r\n close(): void {\r\n if (this.multiselectModel.active) {\r\n this.multiselectModel.active = false;\r\n this.multiselectModel.animating = true;\r\n\r\n setTimeout(() => (this.multiselectModel.animating = false), 280);\r\n\r\n this.propagateTouch();\r\n }\r\n }\r\n\r\n removePill($event: any, option: SelectValue): void {\r\n const isButtonPress = $event.screenX === 0 && $event.screenY === 0;\r\n this.stageSelect(option, \"remove\", $event);\r\n\r\n if (this.disabled) {\r\n return;\r\n }\r\n\r\n option.animate = true;\r\n\r\n setTimeout(() => {\r\n option.selected = false;\r\n option.animate = false;\r\n\r\n this.model = this.model.filter(\r\n (x) => JSON.stringify(x) !== JSON.stringify(option.value)\r\n );\r\n const itemRemoved = this.dataObj.filter(\r\n (x) => x.value === option.value\r\n )[0];\r\n itemRemoved.selected = false;\r\n\r\n this.refreshTitle();\r\n\r\n this.modelChange.emit(this.model);\r\n this.propagateChange(this.model);\r\n\r\n let selectedIndex = 0;\r\n\r\n if (!isButtonPress) {\r\n return;\r\n }\r\n this.inputs.forEach((child, index) => {\r\n if (child.nativeElement.textContent === itemRemoved.title) {\r\n selectedIndex = index;\r\n }\r\n });\r\n\r\n if (this.inputs.length > 1) {\r\n if (selectedIndex - 1 < 0) {\r\n selectedIndex = 2;\r\n }\r\n this.inputs.toArray()[selectedIndex - 1].nativeElement.focus();\r\n }\r\n }, 200);\r\n\r\n $event.stopPropagation();\r\n }\r\n\r\n onSearch(): void {\r\n setTimeout(() => this.searchValue());\r\n }\r\n\r\n private refreshModel(): void {\r\n let values = [];\r\n\r\n if (!this.model) {\r\n return this.refreshTitle();\r\n }\r\n\r\n this.clearUnselected(this.model);\r\n\r\n for (const modelItem of this.model) {\r\n if (typeof modelItem === \"object\") {\r\n if (this.options.modelPropertyName) {\r\n values = this.dataObj.filter(\r\n (x) =>\r\n x.value[this.options.modelPropertyName] ===\r\n modelItem[this.options.modelPropertyName]\r\n );\r\n } else if (modelItem) {\r\n values = this.dataObj.filter(\r\n (x) => JSON.stringify(x.value) === JSON.stringify(modelItem)\r\n );\r\n console.log(\"Model Property Name was not provided for Multiselect\");\r\n }\r\n } else {\r\n values = this.dataObj.filter((x) => x.value === modelItem) || [];\r\n }\r\n\r\n if (values.length > 0) {\r\n values[0].selected = true;\r\n }\r\n }\r\n\r\n this.refreshTitle();\r\n }\r\n\r\n private initOptions(): void {\r\n this.options = this.options || {\r\n pills: false,\r\n search: false,\r\n headings: false,\r\n selectAll: true,\r\n modelPropertyName: \"\",\r\n };\r\n\r\n if (this.options.headings) {\r\n this.groupValuesByHeading();\r\n }\r\n }\r\n\r\n private clearUnselected(items: Array): void {\r\n if (this.dataObj.length) {\r\n this.dataObj\r\n .filter((x) => items.indexOf(x.value) < 0)\r\n .forEach((x) => (x.selected = false));\r\n }\r\n }\r\n\r\n private groupValuesByHeading(): void {\r\n const headingsGroup = ArrayHelper.groupBy>(\r\n this.dataObj,\r\n \"heading\"\r\n );\r\n for (const headingGroup of headingsGroup) {\r\n this.multiselectModel.headings.push({ title: headingGroup.key });\r\n }\r\n }\r\n\r\n private searchValue(): void {\r\n if (!this.options.search) {\r\n return;\r\n }\r\n\r\n if (this.query === \"\" || typeof this.query === \"undefined\") {\r\n for (const dataItem of this.dataObj) {\r\n dataItem.hidden = false;\r\n }\r\n } else {\r\n const results = this.dataObj.filter(\r\n (x) => x.title.toLowerCase().indexOf(this.query.toLowerCase()) >= 0\r\n );\r\n if (results) {\r\n for (const dataItem of this.dataObj) {\r\n dataItem.hidden = results.indexOf(dataItem) === -1;\r\n }\r\n }\r\n }\r\n\r\n if (this.options.headings) {\r\n this.checkHeadingsVisibility();\r\n }\r\n }\r\n\r\n private checkHeadingsVisibility(): void {\r\n const headingsGroup = ArrayHelper.groupBy>(\r\n this.dataObj,\r\n \"heading\"\r\n );\r\n\r\n for (const headingGroup of headingsGroup) {\r\n const hidden =\r\n headingGroup.values.filter((x) => x.hidden).length ===\r\n headingGroup.values.length;\r\n this.multiselectModel.headings.filter(\r\n (x) => x.title === headingGroup.key\r\n )[0].hidden = hidden;\r\n }\r\n }\r\n\r\n private refreshTitle(): void {\r\n this.title = this.placeholder;\r\n\r\n if (!this.options.pills && this.model) {\r\n if (this.model.length === 1) {\r\n this.title = this.dataObj.filter(\r\n (x) => x.value === this.model[0]\r\n )[0].title;\r\n } else if (this.model.length > 1) {\r\n this.title = \"Multiple options selected\";\r\n }\r\n }\r\n }\r\n\r\n private registerListener(): void {\r\n // If clicked outside of the component close dropdown if open.\r\n this.clickEventListener = this.renderer.listen(\r\n \"document\",\r\n \"click\",\r\n (event: any) => {\r\n if (!this.el.nativeElement.contains(event.target)) {\r\n if (this.dropdown.isOpen) {\r\n this.dropdown.toggle();\r\n }\r\n this.clickEventListener();\r\n }\r\n }\r\n );\r\n // If keypressed outside of the component close dropdown if open.\r\n this.keyDownEventLisener = this.renderer.listen(\r\n \"document\",\r\n \"keyup\",\r\n (event: any) => {\r\n if (!this.el.nativeElement.contains(event.target)) {\r\n if (this.dropdown.isOpen) {\r\n this.dropdown.toggle();\r\n }\r\n this.keyDownEventLisener();\r\n }\r\n }\r\n );\r\n }\r\n\r\n private handleStageOptionSelect(\r\n option: SelectValue,\r\n action: string,\r\n event?: any\r\n ): void {\r\n let button: NodeListOf;\r\n\r\n if (action === \"remove\") {\r\n button = event.target\r\n .closest(\"#dropdownMultiSelect\")\r\n .closest(\".dropdown\")\r\n .querySelectorAll(\".dropdown-item\");\r\n } else {\r\n button = event.target\r\n .closest(\".dropdown-menu\")\r\n .querySelectorAll(\".dropdown-item\");\r\n }\r\n\r\n if (\r\n [Stages.AllStages, Stages.AmendmentsFromTheSeanad].includes(option.value)\r\n ) {\r\n return this.disableMainStages(option, action, button);\r\n }\r\n return this.disableOtherStages(action, button);\r\n }\r\n\r\n private disableMainStages(\r\n option: SelectValue,\r\n action: string,\r\n button: NodeListOf\r\n ): void {\r\n // Disable stages from 1-9.\r\n this.dataObj.forEach((item) => {\r\n if (option.selected && action !== \"remove\") {\r\n if (item.value !== option.value) {\r\n button[item.value - 1].setAttribute(\"disabled\", \"true\");\r\n }\r\n } else {\r\n button[item.value - 1].removeAttribute(\"disabled\");\r\n }\r\n });\r\n }\r\n\r\n private disableOtherStages(\r\n action: string,\r\n button: NodeListOf\r\n ): void {\r\n // Disable All stages and Amendments From The Seanad options if stage 1-9 is selected\r\n for (const item of this.stagesToCheck) {\r\n if (\r\n this.dataObj[item - 1].selected &&\r\n !this.dataObj[item - 1].disabled &&\r\n action !== \"remove\"\r\n ) {\r\n button[Stages.AllStages - 1].setAttribute(\"disabled\", \"true\");\r\n button[Stages.AmendmentsFromTheSeanad - 1].setAttribute(\r\n \"disabled\",\r\n \"true\"\r\n );\r\n break;\r\n }\r\n }\r\n\r\n // Need timeout to detect changes\r\n setTimeout(() => {\r\n for (const items of this.dataObj) {\r\n if (items.selected && !items.disabled) {\r\n button[Stages.AllStages - 1].setAttribute(\"disabled\", \"true\");\r\n button[Stages.AmendmentsFromTheSeanad - 1].setAttribute(\r\n \"disabled\",\r\n \"true\"\r\n );\r\n break;\r\n }\r\n button[Stages.AllStages - 1].removeAttribute(\"disabled\");\r\n button[Stages.AmendmentsFromTheSeanad - 1].removeAttribute(\"disabled\");\r\n }\r\n }, 100);\r\n }\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter, ViewChild, ViewChildren, ElementRef, QueryList, Renderer2, SimpleChanges, forwardRef, Inject, OnDestroy, AfterViewInit } from '@angular/core';\r\nimport { TypeaheadValue, TypeaheadOptions, TypeaheadModel } from 'proceduralsystem-clientcomponents';\r\nimport { HttpParams, HttpClient } from '@angular/common/http';\r\nimport { NgbDropdown, NgbDropdownToggle } from '@ng-bootstrap/ng-bootstrap';\r\nimport { Observable, Subscription, fromEvent, of } from 'rxjs';\r\nimport { map, debounceTime, filter, scan, take, delay, tap } from 'rxjs/operators';\r\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport OirCkEditor from 'proceduralsystem-ckeditor';\r\nimport { OirCkEditorConfig } from 'proceduralsystem-ckeditor';\r\nimport { EditorConfig } from '../../models/editor-config.model';\r\nimport { AppConfigService } from 'src/app/services/app-config.service';\r\nimport { OirCkEditorInstance } from '../../models/editor-config.model';\r\n\r\nenum KeyPress {\r\n Tab = 9,\r\n Enter = 13,\r\n Backspace,\r\n Shift\r\n}\r\n\r\nconst HTML_TAG_REGEX = /<\\/?[^>]+>/g;\r\nconst SPACE_REGEX = /^((?:\\s+)|(?:\\s+))$/g;\r\n\r\n@Component({\r\n selector: 'oir-custom-typeahead',\r\n templateUrl: './custom-typeahead.component.html',\r\n styleUrls: ['./custom-typeahead.component.less'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CustomTypeaheadComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class CustomTypeaheadComponent implements OnInit, ControlValueAccessor, OnDestroy,AfterViewInit {\r\n @Input() apiUrl: string;\r\n @Input() model: any;\r\n @Input() values: TypeaheadValue[] = [];\r\n @Input() placeholder = 'Start typing';\r\n @Input() disabled = false;\r\n @Input() options: TypeaheadOptions;\r\n @Input() params: HttpParams;\r\n\r\n private _isRichTextEditor: boolean;\r\n\r\n @Input() set isRichTextEditor(val: boolean) {\r\n this._isRichTextEditor = val;\r\n\r\n of(true).pipe(\r\n delay(500),\r\n take(1),\r\n tap(() => this.onInputChange())\r\n ).subscribe();\r\n }\r\n\r\n get isRichTextEditor(): boolean {\r\n return this._isRichTextEditor;\r\n }\r\n\r\n @Output() modelChange: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild(NgbDropdown) dropdown: NgbDropdown;\r\n @ViewChild('input') input: ElementRef;\r\n @ViewChild('ckEditor') ckEditor: OirCkEditorInstance;\r\n @ViewChild(NgbDropdownToggle) ddt: NgbDropdownToggle;\r\n @ViewChild('inputPills') inputFieldTypeAhead: ElementRef;\r\n @ViewChildren('inputs') inputs: QueryList;\r\n\r\n pillEnteredValue: TypeaheadValue;\r\n inputDisabled = false;\r\n query = '';\r\n data: TypeaheadValue[];\r\n typeaheadModel: TypeaheadModel;\r\n maxHeightPx = 508;\r\n maxHeight = this.maxHeightPx;\r\n\r\n Editor = OirCkEditor;\r\n ckEditorConfig: OirCkEditorConfig;\r\n\r\n editorLoaded = false\r\n private window: Window;\r\n\r\n private debounce: Observable;\r\n private listener: Function;\r\n private readonly inputPadding = 11;\r\n private _debounce$: Subscription;\r\n\r\n propagateChange = (_: TypeaheadModel) => { };\r\n propagateTouch = (_: any) => { };\r\n\r\n constructor(private readonly el: ElementRef, private readonly renderer: Renderer2, private readonly http: HttpClient, private configurationService: AppConfigService,\r\n @Inject(DOCUMENT) private document: Document) {\r\n this.window = this.document.defaultView;\r\n this.ckEditorConfig = {\r\n ...EditorConfig,\r\n licenseKey: this.configurationService.getValue('CKEditor5LicenseKey')\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.typeaheadModel = {} as any;\r\n this.options = this.options || { pills: false };\r\n if (!this.options.maxPills) {\r\n this.options.maxPills = 0;\r\n }\r\n\r\n if (this.options.pills && !Array.isArray(this.model)) {\r\n this.model = [];\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this._debounce$) {\r\n this._debounce$.unsubscribe();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.onInputChange();\r\n }\r\n\r\n onInputChange(isFormatRequired = true) {\r\n const inputElement = this.isRichTextEditor ? this.ckEditor.elementRef.nativeElement : this.input.nativeElement;\r\n this.debounce = fromEvent(inputElement, 'keydown')\r\n .pipe(\r\n filter((i: any) => i.which !== KeyPress.Tab && i.which !== KeyPress.Enter && i.which !== KeyPress.Shift),\r\n filter((i: any) => i.which !== KeyPress.Backspace || i.target.value.length > 0),\r\n map((i) => i.key),\r\n scan((text, key) => {\r\n if (key === 'Backspace') {\r\n return text.slice(0, -1);\r\n } else {\r\n return text + (/^(.|\\n)$/.test(key) ? key : '');\r\n }\r\n }, ''),\r\n debounceTime(500)\r\n );\r\n\r\n if (this._debounce$) {\r\n this._debounce$.unsubscribe();\r\n }\r\n\r\n this._debounce$ = this.debounce.subscribe(val => {\r\n if (val !== null && typeof val === 'string') {\r\n let searchText = /<\\/?[a-z][\\s\\S]*>/i.test(this.query) ? val : this.query;\r\n this.onSearch(searchText, isFormatRequired);\r\n }\r\n });\r\n\r\n this.dropdown.placement = 'bottom';\r\n }\r\n\r\n resizeInput(event): void {\r\n if (event) {\r\n const min = 250;\r\n const padRight = 5;\r\n const input = event.srcElement as HTMLInputElement;\r\n // Create temporary element with same styling as input.\r\n const tmp = document.createElement('div');\r\n tmp.style.padding = '0';\r\n tmp.style.font = '400 15px/21.4286px Montserrat-Light';\r\n tmp.style.paddingLeft = '8px';\r\n tmp.style.paddingRight = '8px';\r\n tmp.style.width = '';\r\n tmp.style.position = 'absolute';\r\n tmp.innerHTML = input.value.replace(/&/g, '&')\r\n .replace(//g, '>')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/ /g, ' ');\r\n input.parentNode.parentNode.appendChild(tmp);\r\n const width = tmp.clientWidth + padRight + 1;\r\n tmp.parentNode.removeChild(tmp);\r\n if (min <= width && (this.el.nativeElement.getBoundingClientRect().width - this.inputPadding) >= width) {\r\n input.style.width = `${width}px`;\r\n }\r\n }\r\n\r\n }\r\n\r\n stateChange(event): void {\r\n if (event) {\r\n const ddBounds = this.ddt.nativeElement\r\n .getBoundingClientRect();\r\n const body = document.querySelector('#body.body');\r\n // Get visible window port height and minus the element height and distance to bottom of viewport.\r\n if (body) {\r\n const maxHeight = (body as HTMLElement).offsetHeight - (ddBounds.top + ddBounds.height);\r\n this.maxHeight = maxHeight < this.maxHeightPx ? maxHeight : this.maxHeightPx;\r\n }\r\n }\r\n setTimeout(() => {\r\n this.setCkEditorStyle();\r\n }, 1000);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.options = this.options || { pills: false };\r\n\r\n if (!changes.model) {\r\n return;\r\n }\r\n\r\n if (this.options.pills) {\r\n if (!changes.model.currentValue || (changes.model.currentValue && !changes.model.currentValue.length)) {\r\n this.query = '';\r\n } else {\r\n this.query = changes.model.currentValue[this.options.titlePropertyName] || '';\r\n }\r\n } else {\r\n if (!changes.model.currentValue || (changes.model.currentValue &&\r\n !changes.model.currentValue.hasOwnProperty(this.options.modelPropertyName))) {\r\n this.query = '';\r\n } else {\r\n this.query = changes.model.currentValue[this.options.titlePropertyName] || '';\r\n }\r\n }\r\n }\r\n\r\n registerOnChange(fn): void {\r\n this.propagateChange = fn;\r\n }\r\n\r\n registerOnTouched(fn): void {\r\n this.propagateTouch = fn;\r\n }\r\n\r\n writeValue(obj: any): void {\r\n if (obj == null) {\r\n obj = this.options.pills ? [] : '';\r\n }\r\n\r\n if (typeof (obj.value) === 'object') {\r\n this.model = obj;\r\n this.query = obj.value[this.options.titlePropertyName];\r\n if (this.query === undefined) {\r\n this.query = obj[this.options.titlePropertyName] || '';\r\n }\r\n } else {\r\n this.model = obj;\r\n this.query = obj[this.options.titlePropertyName] || '';\r\n }\r\n this.inputDisabled = (this.options.pills && Array.isArray(this.model) &&\r\n this.options.maxPills !== 0 && this.model.length >= this.options.maxPills);\r\n }\r\n\r\n setDisabledState(value: any): void {\r\n this.disabled = value;\r\n }\r\n\r\n removePill($event: any, index: number): void {\r\n // Button click has screen x and y of 0;\r\n const isButtonPress = $event.screenX === 0 && $event.screenY === 0;\r\n if (!this.disabled) {\r\n this.model[index].animate = true;\r\n\r\n setTimeout(() => {\r\n this.model[index].selected = false;\r\n this.model[index].animate = false;\r\n\r\n // Remove item from model.\r\n this.model.splice(index, 1);\r\n\r\n this.propagateChange(this.model);\r\n this.modelChange.emit(this.model);\r\n this.inputDisabled = (Array.isArray(this.model) && this.options.maxPills !== 0 && this.model.length >= this.options.maxPills);\r\n\r\n // Focus on pill before deleted pill or next if it is the first one and button press.\r\n if (isButtonPress && this.inputs.length > 1) {\r\n if (index === 0) {\r\n index = 2;\r\n }\r\n this.inputs.toArray()[index - 1].nativeElement.focus();\r\n }\r\n\r\n }, 200);\r\n\r\n $event.stopPropagation();\r\n }\r\n }\r\n\r\n showPills(): boolean {\r\n return Array.isArray(this.model) && this.options.pills === true;\r\n }\r\n\r\n blurInput(event) {\r\n if (event.which === KeyPress.Tab && this.data && (this.data.length === 0 || this.query === '')) {\r\n this.close();\r\n }\r\n if (event.which === KeyPress.Enter && this.query.trim() !== '' && this.options.pillsOnEnter && this.options.maxPills > 0) {\r\n if (this.model.find(x => x[this.options.titlePropertyName].toString().toLowerCase() === this.query.trim().toLowerCase()) === undefined) {\r\n let enteredValue: any = {};\r\n const textQuery = this.query.trim();\r\n enteredValue[this.options.titlePropertyName] = textQuery;\r\n enteredValue[this.options.modelPropertyName] = textQuery;\r\n this.pillEnteredValue = { value: enteredValue, title: this.query };\r\n let validateQuery;\r\n if (this.data !== undefined)\r\n validateQuery = this.data.filter(x => x[this.options.titlePropertyName].toString().toLowerCase() === textQuery.toLowerCase())[0];\r\n (validateQuery !== undefined) ? this.select(validateQuery, false) : this.select(this.pillEnteredValue, true);\r\n } else {\r\n this.query = '';\r\n }\r\n }\r\n this.resizeInput(event);\r\n }\r\n\r\n close(): void {\r\n if (this.typeaheadModel.active) {\r\n this.typeaheadModel.active = false;\r\n this.typeaheadModel.animating = true;\r\n this.dropdown.close();\r\n setTimeout(() => {\r\n this.data = undefined;\r\n this.typeaheadModel.animating = false;\r\n }, 280);\r\n }\r\n }\r\n\r\n optionKeyDown(event, index): void {\r\n if (event.which === KeyPress.Enter) {\r\n this.select(this.data[index]);\r\n }\r\n }\r\n\r\n select(option: TypeaheadValue, enteredValue = false): void {\r\n if (this.inputFieldTypeAhead && !enteredValue) {\r\n // Removes the input width after item selected.\r\n this.renderer.setAttribute(this.inputFieldTypeAhead.nativeElement, 'style', undefined);\r\n }\r\n if (option.disabled || option.selected) {\r\n return;\r\n }\r\n\r\n const value = this.getCurrentValue(option, enteredValue);\r\n // Allow to add two same pills\r\n if (!this.options.pills || (this.options.pills && this.model.filter(x => x[this.options.titlePropertyName] === value[this.options.titlePropertyName]).length < 2)) {\r\n if (this.options.pills) {\r\n this.query = '';\r\n this.model.push(value);\r\n this.inputDisabled = (Array.isArray(this.model) && this.options.maxPills !== 0 &&\r\n this.model.length >= this.options.maxPills);\r\n } else {\r\n this.query = option.title || '';\r\n this.model = value;\r\n }\r\n this.propagateSelectedOptionChange();\r\n this.modelChange.emit(this.model);\r\n if (!this.isRichTextEditor) {\r\n this.input.nativeElement.focus();\r\n }\r\n return this.close();\r\n }\r\n this.query = '';\r\n }\r\n\r\n private onSearch(searchQuery: string | null, isFormatRequired = false): void {\r\n if (searchQuery !== '') {\r\n this.onValueSearch(searchQuery, isFormatRequired);\r\n } else {\r\n this.query = '';\r\n if (!this.options.pills) {\r\n this.model = [];\r\n\r\n this.propagateChange(this.model);\r\n this.modelChange.emit(this.model);\r\n }\r\n\r\n this.close();\r\n }\r\n }\r\n\r\n private getResponseObject(response: any): any {\r\n let result = response;\r\n\r\n if (!Array.isArray(response) && this.options.responsePropertyName) {\r\n const split = this.options.responsePropertyName.split('.');\r\n\r\n for (const s of split) {\r\n result = result[s];\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private clearActive(): void {\r\n this.typeaheadModel.processing = false;\r\n this.typeaheadModel.spinnerActive = false;\r\n }\r\n\r\n private getCurrentValue(option: TypeaheadValue, enteredValue = false): any {\r\n let result: any;\r\n\r\n if (typeof (option.value) === 'object') {\r\n result = enteredValue\r\n ? option.value\r\n : this.data.find(x => x.value[this.options.modelPropertyName] ===\r\n option.value[this.options.modelPropertyName]).value;\r\n } else {\r\n result = option;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private buildRequestParameters(): HttpParams {\r\n let result = this.params || new HttpParams();\r\n result = result.append('query', this.query);\r\n result = result.append('hideSpinner', 'true');\r\n\r\n return result;\r\n }\r\n\r\n private registerListener(): void {\r\n this.listener = this.renderer.listen('document', 'click', (event: any) => {\r\n if (!this.el.nativeElement.contains(event.target)) {\r\n this.close();\r\n\r\n this.listener();\r\n }\r\n });\r\n }\r\n\r\n private getRawValue(searchQuery: string): string {\r\n return searchQuery\r\n ? searchQuery.replace(HTML_TAG_REGEX, '').replace(SPACE_REGEX, '')\r\n : searchQuery;\r\n }\r\n\r\n private propagateSelectedOptionChange(): void {\r\n // Return only if not using pills and return property asked.\r\n if (!this.options.pills && this.options.returnModelProperty !== null) {\r\n this.propagateChange(this.model[this.options.returnModelProperty]);\r\n } else {\r\n this.propagateChange(this.model);\r\n }\r\n }\r\n\r\n private onValueSearch(searchQuery: string | null, isFormatRequired = false): void {\r\n this.typeaheadModel.spinnerActive = true;\r\n\r\n // If custom data passed in seach through that otherwise call API.\r\n if (this.values.length === 0) {\r\n return this.fetchData();\r\n }\r\n\r\n if (isFormatRequired) {\r\n searchQuery = this.getRawValue(searchQuery);\r\n }\r\n\r\n this.data = this.values.filter(x => x[this.options.titlePropertyName].toLowerCase().indexOf(searchQuery.toLowerCase()) >= 0);\r\n this.dropdown.open();\r\n this.typeaheadModel.active = true;\r\n this.clearActive();\r\n this.registerListener();\r\n }\r\n\r\n private fetchData(): void {\r\n this.http.get(this.apiUrl, { params: this.buildRequestParameters() }).toPromise().then((r: any) => {\r\n const response = this.getResponseObject(r);\r\n\r\n this.data = [];\r\n\r\n if (response && response.length) {\r\n this.data = response.slice(0, 10).map(x => ({ value: x, title: x[this.options.titlePropertyName] }));\r\n }\r\n this.dropdown.open();\r\n this.typeaheadModel.active = true;\r\n this.clearActive();\r\n this.registerListener();\r\n });\r\n }\r\n\r\n onReady() {\r\n this.setCkEditorStyle()\r\n }\r\n\r\n setCkEditorStyle() {\r\n if (this.window) {\r\n for (let element = 0; element < this.window.length; element++) {\r\n this.window[element].document.getElementsByTagName('body')[0].style.fontFamily = \"'Montserrat-Light', sans-serif\";\r\n this.window[element].document.getElementsByTagName('body')[0].style.lineHeight = \"20px\";\r\n this.window[element].document.getElementsByTagName('body')[0].style.color = \"#444\";\r\n }\r\n }\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\n\r\nimport { NgbDateParserFormatter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap';\r\n\r\nimport * as Moment from 'moment';\r\n\r\nconst moment: any = (Moment as any).default || Moment;\r\n\r\nexport function toInteger(value: any): number {\r\n return parseInt(`${value}`, 10);\r\n}\r\n\r\nexport function isNumber(value: any): value is number {\r\n return !isNaN(toInteger(value));\r\n}\r\n\r\nexport function padNumber(value: number) {\r\n if (isNumber(value)) {\r\n return `0${value}`.slice(-2);\r\n } else {\r\n return '';\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class MyFormatter extends NgbDateParserFormatter {\r\n\r\n parse(value: string): NgbDateStruct {\r\n let dateInput = value.trim().replace('-', '/');\r\n // Formats allowed.\r\n const formats = ['D/MM/YYYY', 'DD/MM/YYYY', 'D/M/YYYY', 'DD/M/YYYY'];\r\n dateInput = moment(dateInput, formats).format('DD/MM/YYYY');\r\n if ( dateInput !== 'Invalid date' ) {\r\n // Find by 4 numbers togther\r\n const year = dateInput.match(/\\d{4}/g).map(Number);\r\n dateInput = dateInput.replace(String(year), '');\r\n // Find date and month.\r\n const dayAndMonth = dateInput.match(/\\d{2}/g).map(Number);\r\n // Handles 1 digit input for year.\r\n if (String(year[0]).length === 1) {\r\n year[0] = Number(String(moment().year()).substring(0, 2) + '0' + String(year[0]));\r\n }\r\n return { day: toInteger(dayAndMonth[0]), month: toInteger(dayAndMonth[1]), year: toInteger(year) };\r\n }\r\n return null;\r\n }\r\n // Set the date format to be displayed.\r\n format(date: NgbDateStruct): string {\r\n return date\r\n ? `${this.getPadNumber(date.day)}/${this.getPadNumber(date.month)}/${date.year}`\r\n : '';\r\n }\r\n\r\n private getPadNumber(value: number): string {\r\n return isNumber(value) ? padNumber(value) : ''\r\n }\r\n\r\n}\r\n","import * as Moment from 'moment';\r\nconst moment: any = (Moment as any).default || Moment;\r\n\r\nexport class DatePickerModel {\r\n public date: Date;\r\n public dates: Array = [];\r\n public dayLabels: Array = [];\r\n}\r\n\r\nexport class Date {\r\n public value: string;\r\n public momentDate: any;\r\n public day: string;\r\n public month: string;\r\n public year: string;\r\n public active: boolean;\r\n public disabled: boolean;\r\n public isValid: boolean;\r\n\r\n constructor(value: string, disabled?: boolean, active?: boolean) {\r\n\r\n this.disabled = disabled;\r\n this.active = active;\r\n\r\n let formats = ['D/MM/YYYY', 'DD/MM/YYYY', 'D/M/YYYY', 'DD/MM/YYYY'];\r\n this.isValid = moment(value, ['D/MM/YYYY', 'D/M/YYYY']).isValid();\r\n if (this.isValid) {\r\n this.value = moment(value, formats).format('DD/MM/YYYY');\r\n this.momentDate = moment(value, formats);\r\n this.day = moment(this.value, formats).format('D');\r\n this.month = moment(this.value, formats).format('M');\r\n this.year = moment(this.value, formats).format('YYYY');\r\n }\r\n }\r\n}\r\n\r\nexport class ViewDate {\r\n public value: string;\r\n public month: string;\r\n public monthString: string;\r\n public year: string;\r\n\r\n constructor(value: string) {\r\n let formats = ['D/MM/YYYY', 'DD/MM/YYYY', 'D/M/YYYY', 'DD/MM/YYYY'];\r\n\r\n let isValid = moment(value, ['D/MM/YYYY', 'D/M/YYYY']).isValid();\r\n if (isValid) {\r\n this.value = moment(value, formats).format('DD/MM/YYYY');\r\n this.month = moment(this.value, formats).format('MM');\r\n this.monthString = moment(this.value, formats).format('MMMM');\r\n this.year = moment(this.value, formats).format('YYYY');\r\n }\r\n }\r\n}\r\n\r\nexport class DatePickerOptions {\r\n public minDate: string;\r\n public maxDate: string;\r\n public readonly: boolean;\r\n\r\n constructor(minDate: string = '', maxDate: string = '', readonly: boolean = false) {\r\n this.minDate = minDate;\r\n this.maxDate = maxDate;\r\n this.readonly = readonly;\r\n }\r\n}\r\n","import {\r\n Component, OnInit, Input, ElementRef, OnChanges, SimpleChanges, Output, EventEmitter, Renderer2,\r\n forwardRef, ViewChild, QueryList, ViewChildren\r\n } from '@angular/core';\r\nimport * as Moment from 'moment';\r\nimport { MyFormatter, padNumber, isNumber, toInteger } from './datepicker-custom.service';\r\nconst moment: any = (Moment as any).default || Moment;\r\n\r\nimport {\r\n DatePickerModel,\r\n ViewDate,\r\n DatePickerOptions\r\n } from './datepicker-custom.model';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { NgbDateParserFormatter, NgbInputDatepicker, NgbDatepicker, NgbCalendar, NgbDate } from '@ng-bootstrap/ng-bootstrap';\r\nimport { Observable } from 'rxjs';\r\n\r\nenum KeyPress {\r\n Tab = 9,\r\n Enter = 13,\r\n Esc = 27,\r\n Space = 32,\r\n Up = 38,\r\n Down = 40\r\n}\r\n\r\n@Component({\r\n selector: 'datepicker-custom',\r\n templateUrl: './datepicker-custom.component.html',\r\n styleUrls: ['./datepicker-custom.component.less'],\r\n providers: [\r\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerCustomComponent), multi: true },\r\n { provide: NgbDateParserFormatter, useClass: MyFormatter }\r\n ]\r\n})\r\nexport class DatePickerCustomComponent\r\nimplements OnInit, OnChanges, ControlValueAccessor {\r\n\r\n constructor(private ngbCalendar: NgbCalendar, private el: ElementRef, private renderer: Renderer2) {\r\n this.numbers.fill(0);\r\n this.numbers = this.numbers.map((_x, i) => i);\r\n }\r\n formats = ['D/MM/YYYY', 'DD/MM/YYYY', 'D/M/YYYY', 'DD/M/YYYY'];\r\n rangeFormats = [\r\n 'D/MM/YYYY - D/MM/YYYY',\r\n 'D/MM/YYYY - DD/MM/YYYY',\r\n 'DD/MM/YYYY - DD/MM/YYYY',\r\n 'DD/MM/YYYY - D/MM/YYYY',\r\n 'D/M/YYYY - D/M/YYYY',\r\n 'D/M/YYYY - DD/M/YYYY',\r\n 'DD/M/YYYY - D/M/YYYY',\r\n 'DD/M/YYYY - DD/M/YYYY'\r\n ];\r\n isSelectingRange = false;\r\n @ViewChild(NgbInputDatepicker) datepickerInput: NgbInputDatepicker;\r\n\r\n @ViewChild(NgbDatepicker) datepicker: NgbDatepicker;\r\n @ViewChild('dpInput') input: ElementRef;\r\n @ViewChild('monthInput') monthInput: ElementRef;\r\n @ViewChildren('monthInputs') monthInputs: QueryList;\r\n @ViewChild('yearInput') yearInput: ElementRef;\r\n @ViewChildren('yearInputs') yearInputs: QueryList;\r\n\r\n @Input() model: any;\r\n @Input() rangeModel: any;\r\n @Input() disabled: boolean;\r\n @Input() invalid: boolean;\r\n @Input() placeholder: string;\r\n @Input() daterangeplaceholder: string;\r\n @Input() options: DatePickerOptions = new DatePickerOptions();\r\n @Input() showNoOfMonths = 1;\r\n @Input() showWeekNumbers = false;\r\n @Input() startDate;\r\n // 3 options: 'visible' | 'collapsed' | 'hidden'.\r\n @Input() outsideDays = 'visible';\r\n @Input() dateRange = false;\r\n @Output() modelChange: EventEmitter = new EventEmitter();\r\n @Output() openedCalendar: EventEmitter = new EventEmitter();\r\n @Output() selectingRange: EventEmitter = new EventEmitter();\r\n @Output() closedCalendar: EventEmitter = new EventEmitter();\r\n\r\n viewDate: ViewDate;\r\n currentDateView: { current: NgbDate | null; next: NgbDate | null } = {\r\n current: this.ngbCalendar.getToday(),\r\n next: this.ngbCalendar.getToday(), // Initialize with the current date\r\n };\r\n previousDateValue: any;\r\n calendarModel: DatePickerModel = new DatePickerModel();\r\n active = false;\r\n showDatePicker = false;\r\n numbers = new Array(30);\r\n showDropDownYear: boolean;\r\n showDropDownMonth: boolean;\r\n hoveredDate: NgbDate;\r\n fromDate: NgbDate;\r\n toDate: NgbDate;\r\n monthNames = ['January', 'February', 'March', 'April', 'May', 'June',\r\n 'July', 'August', 'September', 'October', 'November', 'December'\r\n ];\r\n currentMonth = new Date().getMonth()+1;\r\n previousDateRangeValue: any;\r\n private listener: Function;\r\n private debounce: Observable;\r\n propagateChange = (_: string) => { };\r\n propagateTouch = (_?: any) => { };\r\n\r\n ConvertStringToNumber(value) {\r\n return Number(value);\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.placeholder || !this.daterangeplaceholder) {\r\n this.placeholder = 'DD/MM/YYYY';\r\n this.daterangeplaceholder = 'DD/MM/YYYY - DD/MM/YYYY';\r\n }\r\n if (this.model || this.rangeModel) {\r\n this.initModel();\r\n } else {\r\n this.model = null;\r\n }\r\n\r\n this.previousDateValue = this.model ? this.model : this.rangeModel;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (this.model || this.rangeModel) {\r\n if (changes.model && !changes.model.firstChange) {\r\n this.initModel(changes.model);\r\n }\r\n }\r\n }\r\n\r\n private initModel(modelChanges = null): void {\r\n if (typeof this.model !== 'string') {\r\n this.model = this.toDateString(this.model);\r\n }\r\n\r\n const modelFormat = [\r\n 'D/MM/YYYY',\r\n 'DD/MM/YYYY',\r\n 'D/M/YYYY',\r\n 'DD/MM/YYYY',\r\n ];\r\n\r\n const modelRangeFormat = [\r\n 'D/MM/YYYY - D/MM/YYYY',\r\n 'D/MM/YYYY - DD/MM/YYYY',\r\n 'DD/MM/YYYY - DD/MM/YYYY',\r\n 'DD/MM/YYYY - D/MM/YYYY',\r\n 'D/M/YYYY - D/M/YYYY',\r\n 'D/M/YYYY - DD/M/YYYY',\r\n 'DD/M/YYYY - D/M/YYYY',\r\n 'DD/M/YYYY - DD/M/YYYY'\r\n ];\r\n const model = moment(this.model, modelFormat);\r\n const rangeModel = moment(this.rangeModel, modelRangeFormat);\r\n\r\n if (this.dateRange && this.rangeModel.includes('-')) {\r\n this.getDateRange(rangeModel, modelChanges, modelRangeFormat);\r\n } else {\r\n if (modelChanges && modelChanges.previousValue) {\r\n this.model = model.isValid()\r\n ? this.toDateObj(model.format('DD/MM/YYYY'))\r\n : this.toDateObj(modelChanges.previousValue);\r\n } else {\r\n this.model = model.isValid()\r\n ? this.toDateObj(model.format('DD/MM/YYYY'))\r\n : this.toDateObj(moment().format('DD/MM/YYYY'));\r\n }\r\n }\r\n }\r\n\r\n // set rangeModel on init if input is a date range\r\n getDateRange(rangeModel, modelChanges, modelFormat) {\r\n const date = this.rangeModel.split('-');\r\n const fromDateModel = moment(date[0], modelFormat);\r\n const toDateModel = moment(date[1], modelFormat);\r\n\r\n if (modelChanges) {\r\n this.rangeModel = rangeModel.isValid() ?\r\n this.toDateString([this.toDateObj(fromDateModel.format('DD/MM/YYYY')), this.toDateObj(toDateModel.format('DD/MM/YYYY'))]) :\r\n moment().format('DD/MM/YYYY');\r\n }\r\n}\r\n\r\n toggle() {\r\n this.showDatePicker = !this.showDatePicker;\r\n if (this.showDatePicker) {\r\n this.registerListener();\r\n this.openedCalendar.emit();\r\n setTimeout(() => {\r\n this.datepicker.navigateTo(this.model ? this.model : this.startDate );\r\n });\r\n }\r\n }\r\n\r\n registerOnChange(fn) {\r\n this.propagateChange = fn;\r\n }\r\n\r\n registerOnTouched(fn) {\r\n this.propagateTouch = fn;\r\n }\r\n\r\n writeValue(obj: any): void {\r\n // Convert string to NgbDateStruct object.\r\n if (typeof obj === 'undefined' || obj === null) {\r\n this.model = null;\r\n this.previousDateValue = null;\r\n } else if (obj != null && obj.hasOwnProperty('value')) {\r\n this.model = this.toDateObj(obj.value);\r\n this.previousDateValue = this.toDateObj(obj.value);\r\n } else if (obj != null) {\r\n this.model = this.toDateObj(obj);\r\n this.previousDateValue = this.toDateObj(obj);\r\n }\r\n }\r\n\r\n setDisabledState(value: any): void {\r\n this.disabled = value;\r\n }\r\n\r\n // Allow select date from outside component.\r\n select(data): void {\r\n let datePassed = '';\r\n if (data != null && data.hasOwnProperty('value')) {\r\n datePassed = data.value;\r\n } else {\r\n datePassed = data;\r\n }\r\n if (!this.dateIsNotInRange(datePassed)) {\r\n this.model = this.toDateObj(datePassed);\r\n this.startDate = null;\r\n this.previousDateValue = this.toDateObj(datePassed);\r\n this.propagateChange(datePassed);\r\n this.modelChange.emit(datePassed);\r\n } else {\r\n this.input.nativeElement.value = '';\r\n }\r\n }\r\n\r\n keyUpCircle(event): void {\r\n // If escaped pressed while focused on the navigation arrows close the datepicker.\r\n if (event.which === KeyPress.Esc) {\r\n this.showDatePicker = false;\r\n }\r\n }\r\n\r\n resetInput() {\r\n this.model = null;\r\n this.rangeModel = null;\r\n this.startDate = null;\r\n this.fromDate = null;\r\n this.toDate = null;\r\n this.previousDateValue = null;\r\n this.propagateChange(this.model);\r\n this.modelChange.emit(this.model);\r\n this.propagateChange(this.rangeModel);\r\n this.modelChange.emit(this.rangeModel);\r\n }\r\n\r\n keyupEventHandler(keyCode): void {\r\n if (this.input.nativeElement.value === '') {\r\n this.resetInput();\r\n }\r\n // If escaped pressed while focused on input textbox close the datepicker and reset the value.\r\n if (keyCode === KeyPress.Esc) {\r\n this.model = this.previousDateValue;\r\n this.startDate = null;\r\n this.fromDate = null;\r\n this.toDate = null;\r\n this.showDatePicker = false;\r\n this.input.nativeElement.value = '';\r\n }\r\n }\r\n\r\n // Check if date selected is within range of min date and max date.\r\n private dateIsNotInRange(date: string): boolean {\r\n let result = false;\r\n\r\n const currentDate = moment(date, ['DD/MM/YYYY']);\r\n\r\n if (this.options.minDate) {\r\n const minDate = moment(this.options.minDate, ['DD/MM/YYYY']);\r\n\r\n if (currentDate.isValid() && minDate.isValid()) {\r\n result = currentDate.isBefore(minDate, 'day');\r\n }\r\n }\r\n\r\n if (result === false && this.options.maxDate) {\r\n const maxDate = moment(this.options.maxDate, ['DD/MM/YYYY']);\r\n\r\n if (currentDate.isValid() && maxDate.isValid()) {\r\n result = currentDate.isAfter(maxDate);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isDateValid(date) {\r\n return moment(date, ['DD/MM/YYYY'], true).isValid();\r\n }\r\n\r\n clearInput(event: any) {\r\n this.model = null;\r\n this.rangeModel = null;\r\n this.startDate = null;\r\n this.previousDateValue = null;\r\n this.fromDate = null;\r\n this.toDate = null;\r\n this.propagateChange(this.model);\r\n this.modelChange.emit(this.model);\r\n this.propagateChange(this.rangeModel);\r\n this.modelChange.emit(this.rangeModel);\r\n event.stopPropagation();\r\n this.closeCalendar();\r\n }\r\n\r\n closeCalendar() {\r\n this.showDatePicker = false;\r\n this.closedCalendar.emit();\r\n }\r\n\r\n // On blur if date invalid reset to null.\r\n onBlur($event): void {\r\n const inputValue = this.input.nativeElement.value;\r\n if (this.dateRange) {\r\n this.updateDateRangeValue(inputValue);\r\n } else {\r\n this.updateDateValue(inputValue);\r\n }\r\n this.propagateTouch($event);\r\n }\r\n\r\n // Checks input value and sets model if valid.\r\n updateDateValue(dateValue): any {\r\n if ((dateValue !== '' && !moment(dateValue, this.formats).isValid()) ||\r\n (dateValue !== '' && this.dateIsNotInRange(dateValue))) {\r\n this.input.nativeElement.value = '';\r\n this.model = null;\r\n this.startDate = null;\r\n this.propagateChange(this.model);\r\n this.modelChange.emit(this.model);\r\n this.closedCalendar.emit();\r\n return null;\r\n } else if (dateValue !== '' && (this.toDateString(this.previousDateValue) !== this.input.nativeElement.value)) {\r\n this.model = this.toDateObj(this.input.nativeElement.value);\r\n this.propagateChange(this.toDateString(this.model));\r\n this.modelChange.emit(this.toDateString(this.model));\r\n this.closedCalendar.emit();\r\n return this.model;\r\n }\r\n }\r\n\r\n // update daterange only if input is a range\r\n updateDateRangeValue(dateValue): any {\r\n let fromDate = '';\r\n let toDate = '';\r\n let fromDateNgbDate;\r\n let toDateNgbDate;\r\n const dates = dateValue.split('-');\r\n if (dates.length === 2) {\r\n fromDate = dates[0];\r\n toDate = dates[1];\r\n if (!moment(fromDate, this.formats).isValid() || !moment(toDate, this.formats).isValid()) {\r\n this.clearValues();\r\n return null;\r\n } else {\r\n fromDateNgbDate = this.toNgbdate(this.toDateObj(fromDate));\r\n toDateNgbDate = this.toNgbdate(this.toDateObj(toDate));\r\n }\r\n // check of toDate is after than fromDate\r\n if (!toDateNgbDate.after(fromDateNgbDate)) {\r\n this.clearValues();\r\n return null;\r\n }\r\n } else {\r\n this.clearValues();\r\n return null;\r\n }\r\n\r\n if ((dateValue !== '' && moment(fromDate, this.formats).isValid() &&\r\n moment(toDate, this.formats).isValid() && this.toDateString(this.previousDateRangeValue) !== this.input.nativeElement.value)) {\r\n this.toDate = toDateNgbDate;\r\n this.fromDate = fromDateNgbDate;\r\n this.rangeModel = this.toDateString([this.fromDate, this.toDate]);\r\n this.propagateChange(this.rangeModel);\r\n this.modelChange.emit(this.rangeModel);\r\n this.renderer.setProperty(this.input.nativeElement, 'value', this.rangeModel);\r\n return this.rangeModel;\r\n } else {\r\n this.clearValues();\r\n return null;\r\n }\r\n}\r\n\r\n clearValues() {\r\n this.input.nativeElement.value = '';\r\n this.rangeModel = null || this.previousDateRangeValue;\r\n this.fromDate = null;\r\n this.toDate = null;\r\n this.propagateChange(this.rangeModel);\r\n this.modelChange.emit(this.rangeModel);\r\n }\r\n // If closed and focused on input, when enter pressed show calendar.\r\n keypress(event, value) {\r\n if (event.which === KeyPress.Enter && !this.showDatePicker && !this.disabled) {\r\n this.focusDatePicker(value);\r\n } else if (event.which === KeyPress.Enter && this.showDatePicker && value !== '') {\r\n this.handleDatePickerEnterKey(value);\r\n }\r\n }\r\n\r\n // When date is selected propogate it back up.\r\n onDateSelect(eventObj) {\r\n this.model = eventObj;\r\n this.propagateChange(this.toDateString(this.model));\r\n this.modelChange.emit(this.toDateString(this.model));\r\n this.showDatePicker = false;\r\n }\r\n\r\n navigatePrevious() {\r\n if (this.currentDateView.next) {\r\n const prevMonthDate = this.ngbCalendar.getPrev(\r\n new NgbDate(this.currentDateView.next.year!, this.currentDateView.next.month!, 1),\r\n 'm',\r\n 1\r\n );\r\n\r\n this.navigateTo(prevMonthDate);\r\n }\r\n this.currentDateView = {\r\n current: this.currentDateView.next,\r\n next: this.currentDateView.next\r\n }\r\n }\r\n\r\n navigateNext() {\r\n if (this.currentDateView.next) {\r\n const nextMonthDate = this.ngbCalendar.getNext(\r\n new NgbDate(this.currentDateView.next.year!, this.currentDateView.next.month!, 1),\r\n 'm',\r\n 1\r\n );\r\n\r\n this.navigateTo(nextMonthDate);\r\n }\r\n this.currentDateView = {\r\n current: this.currentDateView.next,\r\n next: this.currentDateView.next\r\n }\r\n }\r\n\r\n /**\r\n * Navigate to selected date month\r\n */\r\n public navigateTo(date: any): void {\r\n this.datepicker.navigateTo(date);\r\n }\r\n\r\n // When month selected from dropdown.\r\n selectMonthView(monthNo) {\r\n monthNo = monthNo + 1;\r\n const navObj = {\r\n month: monthNo,\r\n year: this.currentDateView.next.year\r\n };\r\n this.datepicker.navigateTo(navObj);\r\n this.showDropDownYear = false;\r\n this.showDropDownMonth = false;\r\n this.monthInput.nativeElement.focus();\r\n }\r\n\r\n // When year selected from dropdown.\r\n selectYearView(event) {\r\n const navObj = {\r\n month: this.currentDateView.next.month,\r\n year: Number(event.target.value)\r\n };\r\n this.datepicker.navigateTo(navObj);\r\n this.showDropDownYear = false;\r\n this.showDropDownMonth = false;\r\n this.yearInput.nativeElement.focus();\r\n }\r\n\r\n calendarNavigated(newDateView) {\r\n this.currentDateView = newDateView;\r\n }\r\n\r\n // Converts to match NgbDateStruct object.\r\n toDateObj(value) {\r\n if (typeof value !== 'undefined' && value !== null) {\r\n let dateInput = value.trim().replace('-', '/');\r\n dateInput = moment(dateInput, this.formats).format('DD/MM/YYYY');\r\n if (dateInput !== 'Invalid date') {\r\n const year = dateInput.match(/\\d{4}/g).map(Number);\r\n dateInput = dateInput.replace(String(year), '');\r\n const dayAndMonth = dateInput.match(/\\d{2}/g).map(Number);\r\n return { day: toInteger(dayAndMonth[0]), month: toInteger(dayAndMonth[1]), year: toInteger(year) };\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n // Handle key press when focused on dropdown of months.\r\n monthKeyPress(event) {\r\n if ((event.which === KeyPress.Up || event.which === KeyPress.Down) || (event.which === KeyPress.Tab && this.showDropDownMonth)) {\r\n event.preventDefault();\r\n }\r\n if (event.which === KeyPress.Up || (event.which === KeyPress.Tab && event.shiftKey && this.showDropDownMonth)) {\r\n if (this.currentDateView.next.month > 1) {\r\n this.datepicker.navigateTo(this.ngbCalendar.getPrev(this.currentDateView.next, 'm', 1));\r\n }\r\n } else if (event.which === KeyPress.Down || (event.which === KeyPress.Tab && !event.shiftKey && this.showDropDownMonth)) {\r\n if (this.currentDateView.next.month < 12) {\r\n this.datepicker.navigateTo(this.ngbCalendar.getNext(this.currentDateView.next, 'm', 1));\r\n }\r\n } else if (event.which === KeyPress.Esc) {\r\n this.showDropDownMonth = false;\r\n }\r\n }\r\n\r\n // Handle key press when focused on dropdown of years.\r\n yearKeyPress(event) {\r\n if ((event.which === KeyPress.Up || event.which === KeyPress.Down) || (event.which === KeyPress.Tab && this.showDropDownMonth)) {\r\n event.preventDefault();\r\n }\r\n if (event.which === KeyPress.Up || (event.which === KeyPress.Tab && event.shiftKey && this.showDropDownYear)) {\r\n this.datepicker.navigateTo(this.ngbCalendar.getPrev(this.currentDateView.next, 'y', 1));\r\n } else if (event.which === KeyPress.Down || (event.which === KeyPress.Tab && !event.shiftKey && this.showDropDownYear)) {\r\n this.datepicker.navigateTo(this.ngbCalendar.getNext(this.currentDateView.next, 'y', 1));\r\n } else if (event.which === KeyPress.Esc) {\r\n this.showDropDownYear = false;\r\n }\r\n }\r\n\r\n // This is used when opening a header dropdown. It scrolls to the selected item.\r\n scrollToDDItem(dropdown) {\r\n if (document.activeElement.tagName.toLowerCase() !== 'input') {\r\n let scrollVal = 0;\r\n if (dropdown === 'dropdownMonth') {\r\n this.showDropDownMonth = !this.showDropDownMonth;\r\n this.showDropDownYear = false;\r\n scrollVal = (this.currentDateView.next.month - 1) * 34;\r\n this.monthInputs.forEach(element => {\r\n if (element.nativeElement.className.indexOf('selected') > -1) {\r\n element.nativeElement.focus();\r\n }\r\n });\r\n } else {\r\n this.showDropDownYear = !this.showDropDownYear;\r\n this.showDropDownMonth = false;\r\n scrollVal = 6 * 34;\r\n this.yearInputs.forEach(element => {\r\n if (element.nativeElement.className.indexOf('selected') > -1) {\r\n element.nativeElement.focus();\r\n }\r\n });\r\n }\r\n // Main scrollbar belongs to element with class name body.\r\n if (typeof document.getElementsByClassName(dropdown)[0].scroll !== 'undefined') {\r\n document.getElementsByClassName(dropdown)[0].scroll({\r\n top: scrollVal,\r\n behavior: 'auto'\r\n });\r\n } else if (typeof document.getElementsByClassName(dropdown)[0].scrollTop !== 'undefined') {\r\n document.getElementsByClassName(dropdown)[0].scrollTop = scrollVal;\r\n }\r\n }\r\n }\r\n\r\n // Convert object back to string.\r\n toDateString(value): string {\r\n // for instances with date ranges, the this.rangemodel is an array\r\n if (Array.isArray(value)) {\r\n return value ?\r\n `${this.getPadNumber(value[0].day)}/${this.getPadNumber(value[0].month)}/${value[0].year} - ${this.getPadNumber(value[1].day)}/${this.getPadNumber(value[1].month)}/${value[1].year}`\r\n : '';\r\n }\r\n return value ?\r\n `${this.getPadNumber(value.day)}/${this.getPadNumber(value.month)}/${value.year}` :\r\n '';\r\n }\r\n\r\n // Handles focusing away from datepicker.\r\n private registerListener() {\r\n this.listener = this.renderer.listen('document', 'click', (event: any) => {\r\n if ((this.model === null && this.rangeModel === null) || this.dateIsNotInRange(this.model)) {\r\n this.input.nativeElement.value = '';\r\n }\r\n if (!this.el.nativeElement.contains(event.target)) {\r\n this.showDatePicker = false;\r\n this.listener();\r\n }\r\n });\r\n }\r\n\r\n // convert Ngbstruct to Ngbdate\r\n toNgbdate(struct: any) {\r\n return new NgbDate(struct.year, struct.month, struct.day);\r\n }\r\n\r\n // Handles date ranges\r\n onDateRangeSelection(date: any) {\r\n let parsed = '';\r\n\r\n if (!this.fromDate && !this.toDate) {\r\n this.fromDate = date;\r\n this.selectingRange.emit({ selectingRange: true, date: this.toDateString(this.fromDate) });\r\n } else if (this.fromDate && !this.toDate && date.after(this.fromDate)) {\r\n this.toDate = date;\r\n this.showDatePicker = false;\r\n this.selectingRange.emit({ selectingRange: false, date: this.toDateString(this.toDate) });\r\n } else {\r\n this.toDate = null;\r\n this.fromDate = date;\r\n this.selectingRange.emit({ selectingRange: true, date: this.toDateString(this.fromDate) });\r\n }\r\n this.startDate = this.fromDate;\r\n\r\n // replace model and nativeelement values with parsed value;\r\n if (this.fromDate) {\r\n parsed += this.toDateString(this.fromDate);\r\n this.rangeModel = ''; // set to empty string to prevent display of incomplete range\r\n }\r\n if (this.toDate) {\r\n parsed += ' - ' + this.toDateString(this.toDate);\r\n this.rangeModel = parsed;\r\n this.propagateChange(this.rangeModel);\r\n this.modelChange.emit(this.rangeModel);\r\n this.renderer.setProperty(this.input.nativeElement, 'value', this.rangeModel);\r\n }\r\n this.closedCalendar.emit();\r\n }\r\n\r\n isHovered(date: NgbDate) {\r\n return this.fromDate && !this.toDate && this.hoveredDate && date.after(this.fromDate) && date.before(this.hoveredDate);\r\n }\r\n\r\n isInside(date: NgbDate) {\r\n return date.after(this.fromDate) && date.before(this.toDate);\r\n }\r\n\r\n isRange(date: NgbDate) {\r\n return date.equals(this.fromDate) || date.equals(this.toDate) || this.isInside(date) || this.isHovered(date);\r\n }\r\n\r\n private focusDatePicker(value: string): void {\r\n this.showDatePicker = true;\r\n this.input.nativeElement.focus();\r\n this.registerListener();\r\n if (value !== '') {\r\n // Bootstrap datepicker directive has not been loaded as child uses ngif. So set default startdate.\r\n if (!this.dateRange && this.updateDateValue(value) !== null) {\r\n this.startDate = this.model;\r\n }\r\n if (this.dateRange && this.updateDateRangeValue(value) !== null) {\r\n this.startDate = this.fromDate;\r\n }\r\n }\r\n }\r\n\r\n private handleDatePickerEnterKey(value: string): void {\r\n // If date is not null navigate to date on calendar.\r\n if (value !== this.toDateString(this.model) && this.updateDateValue(value) !== null) {\r\n this.datepicker.navigateTo(this.model);\r\n if (this.dateRange && this.updateDateRangeValue(value) !== null) {\r\n this.startDate = this.fromDate;\r\n }\r\n } else {\r\n // No change in date so hide datepicker.\r\n this.showDatePicker = false;\r\n }\r\n }\r\n\r\n private getPadNumber(value): string {\r\n return isNumber(value) ? padNumber(value) : '';\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter, ViewChild, ElementRef, ChangeDetectionStrategy, AfterViewInit } from '@angular/core';\r\nimport { TabIndexPipe } from 'proceduralsystem-clientcomponents';\r\nimport { ReportStoreService } from 'src/app/services/report-store.service';\r\n\r\n@Component({\r\n selector: 'oir-toggleable-accordion',\r\n templateUrl: './toggleable-accordion.component.html',\r\n styleUrls: ['./toggleable-accordion.component.less'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ToggleableAccordionComponent implements OnInit, AfterViewInit {\r\n @Input('shouldDisable') shouldDisable = false;\r\n @Input('subAccordion') subAccordion = false;\r\n @Input('defaultClosed') defaultClosed: any;\r\n @Input() bsDayDate;\r\n @Input() businessDaySectionHeader;\r\n @Input('canToggle') canToggle: boolean = true;\r\n @Input() defaultOpened = false;\r\n\r\n @Input('ariaAccordionDescription') ariaAccordionDescription;\r\n @Output('beforeToggle') beforeToggle: EventEmitter = new EventEmitter();\r\n @Output('afterToggle') afterToggle: EventEmitter = new EventEmitter();\r\n\r\n @Output('toggledWhenOpened') toggledWhenOpened: EventEmitter = new EventEmitter();\r\n @Output('toggledWhenDefaultOpened') toggledWhenDefaultOpened: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('btnToggle') btnToggle;\r\n @ViewChild('accordionPanel') collapsablePanel: ElementRef;\r\n\r\n public openImageUrl = 'url(./assets/unfilled-plus.svg)';\r\n public readonly closeImageUrl = 'url(./assets/unfilled-circle-x.svg)';\r\n\r\n public set setOpenImageUrl(value: 'filled-circle-true' | 'unfilled-plus') {\r\n this.openImageUrl = `url(./assets/${value}.svg)`;\r\n }\r\n\r\n isOpen: boolean;\r\n\r\n constructor(private reportStoreService: ReportStoreService) { }\r\n\r\n ngOnInit() {\r\n this.isOpen = this.isOpened();\r\n this.setSectionIcon();\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.defaultClosed === 'true' || this.defaultClosed || this.defaultOpened) {\r\n this.click();\r\n this.toggledWhenDefaultOpened.emit(true);\r\n }\r\n }\r\n\r\n public click() {\r\n if (this.btnToggle && this.btnToggle.nativeElement) {\r\n this.btnToggle.nativeElement.click();\r\n }\r\n }\r\n\r\n public isOpened() {\r\n return this.btnToggle && this.btnToggle.nativeElement && this.btnToggle.nativeElement.classList.contains('opened');\r\n }\r\n\r\n public toggle($event) {\r\n if (this.canToggle) {\r\n this.isOpen = !this.isOpen;\r\n this.beforeToggle.emit(!this.isOpened());\r\n\r\n const $sender = $event.currentTarget;\r\n let parent = $sender.offsetParent;\r\n const iconClassList = $sender.getElementsByTagName('button')[0].classList;\r\n\r\n if (parent == null) {\r\n parent = $sender.parentElement.parentElement;\r\n }\r\n\r\n if (!$sender.classList.contains('opened') && parent.classList.contains('disabled')) {\r\n return;\r\n }\r\n\r\n iconClassList.toggle('open-left');\r\n iconClassList.toggle('close-left');\r\n $sender.classList.toggle('opened');\r\n $sender.parentElement.children[1].classList.toggle('opened');\r\n $sender.parentElement.nextElementSibling.classList.toggle('hidden');\r\n this.setTabIndex();\r\n $event.preventDefault();\r\n\r\n this.afterToggle.emit(this.isOpened());\r\n } else {\r\n this.toggledWhenOpened.emit();\r\n }\r\n }\r\n\r\n setTabIndex() {\r\n new TabIndexPipe().transform(this.isOpened(), this.collapsablePanel);\r\n }\r\n\r\n setSectionIcon(): void {\r\n\r\n if (this.businessDaySectionHeader && this.businessDaySectionHeader.bdSectionId && this.reportStoreService.doesSectionHaveAllRequiredData(this.bsDayDate, this.businessDaySectionHeader.bdSectionId)) {\r\n this.setOpenImageUrl = 'filled-circle-true';\r\n } else {\r\n this.setOpenImageUrl = 'unfilled-plus';\r\n }\r\n\r\n }\r\n}\r\n\r\n","import {\r\n Component,\r\n OnInit,\r\n OnDestroy,\r\n ViewChild,\r\n ChangeDetectorRef,\r\n Output,\r\n EventEmitter,\r\n Input\r\n} from '@angular/core';\r\nimport { UntypedFormBuilder, UntypedFormGroup, Validators, UntypedFormArray, UntypedFormControl } from '@angular/forms';\r\nimport { ReportService } from '../../../services/report.service';\r\nimport { SharedService } from '../../../services/shared.service';\r\nimport { SelectValue, TypeaheadValue } from 'proceduralsystem-clientcomponents';\r\nimport { Subscription, Observable, Subject, of } from 'rxjs';\r\nimport {\r\n take,\r\n map,\r\n takeUntil,\r\n filter,\r\n debounceTime,\r\n distinctUntilChanged\r\n} from 'rxjs/operators';\r\nimport { ToggleableAccordionComponent } from '../toggleable-accordion/toggleable-accordion.component';\r\nimport {\r\n Amendments,\r\n WorkItemTypes,\r\n WorkItemTypeValues,\r\n FormTemplate\r\n} from '../../report.enum';\r\nimport { WorkItem } from '../../models/report.model';\r\nimport { isEmpty, findIndex, isArray } from 'lodash-es';\r\nimport { GLOBALS } from '../../globals';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { OirDialogService } from 'proceduralsystem-clientcomponents/components/oir-dialog/oir-dialog.service';\r\nimport { DIALOG_POSITION, OirDialogButton } from 'proceduralsystem-clientcomponents/components/oir-dialog/oir-dialog.types';\r\nimport OirCkEditor from 'proceduralsystem-ckeditor';\r\nimport { OirCkEditorConfig } from 'proceduralsystem-ckeditor';\r\nimport { EditorConfig } from '../../models/editor-config.model';\r\nimport { AppConfigService } from 'src/app/services/app-config.service';\r\nimport { ChangeEvent } from '@ckeditor/ckeditor5-angular/ckeditor.component';\r\n\r\nconst FIRST_STAGE_ID = 1;\r\n\r\n@Component({\r\n selector: 'oir-work-item-form',\r\n templateUrl: './work-item-form.component.html',\r\n styleUrls: ['./work-item-form.component.less']\r\n})\r\nexport class WorkItemFormComponent implements OnInit, OnDestroy {\r\n @Input() saveButtonTitle = 'BUTTONS.ADD';\r\n @Input() workItem: WorkItem = null;\r\n @Input() sectionData;\r\n @Input() sectionType: any;\r\n @Input() disableWorkItem: boolean;\r\n\r\n @Output() saveWorkItem: EventEmitter = new EventEmitter();\r\n @Output() accordionClosed: EventEmitter = new EventEmitter();\r\n\r\n @ViewChild('workItemAccordion')\r\n workItemAccordion: ToggleableAccordionComponent;\r\n\r\n public workItemForm: UntypedFormGroup;\r\n public workItemTypesPerSection = {\r\n motions: ['motions'],\r\n governmentBusiness: ['motions', 'bills', 'statements'],\r\n privateMembersBusiness: ['motions', 'bills'],\r\n privateMembersBill: ['motions', 'bills'],\r\n billsForIntroduction: ['bills'],\r\n referralToCommittee: ['bills'],\r\n deferredDivisions: ['motions', 'bills'],\r\n };\r\n public workItemTypeData = [];\r\n public workItemBillOrMotionData: TypeaheadValue[] = [];\r\n public workItemBillOrMotionDataWithTags: TypeaheadValue[] = [];\r\n public canToggle = true;\r\n public arrangementData: TypeaheadValue[] = [];\r\n public membersData$: Observable;\r\n public keyUp = new Subject<{ id: number; value: string }>();\r\n \r\n Editor = OirCkEditor;\r\n ckEditorConfig: OirCkEditorConfig;\r\n\r\n // Used to indicate if form is used to add new or edit existing work item\r\n // false = add new\r\n // true = edit existing\r\n public editMode = false;\r\n public sponsor = '';\r\n public currentStage = '';\r\n public workItemTypes = WorkItemTypes;\r\n public workItemType = '';\r\n public noConfirm: boolean = false;\r\n\r\n public get arrangementsFormArray(): UntypedFormArray {\r\n return this.workItemForm.get('arrangmentsGroup') as UntypedFormArray;\r\n }\r\n public stagesData: SelectValue[];\r\n public FormTemplate = FormTemplate;\r\n public workItemsSponsors;\r\n public billStageId: number;\r\n public amendmentTypes: SelectValue[] = [\r\n {\r\n value: Amendments.Amendment,\r\n title: 'Amendment'\r\n },\r\n {\r\n value: Amendments.AmendmentToAmendment,\r\n title: 'Amendment to an amendment'\r\n },\r\n ];\r\n\r\n private subscription: Subscription = new Subscription();\r\n private ngUnsubscribe = new Subject();\r\n private billMotionStatementData = [];\r\n\r\n private workItemOtherValue = {\r\n value: GLOBALS.workItemOtherValue,\r\n title: this.translateService.instant(\r\n 'WORK_ITEM_FORM.WORK_ITEM_SELECT.VALUE.OTHER'\r\n )\r\n };\r\n\r\n constructor(\r\n private formBuilder: UntypedFormBuilder,\r\n private reportService: ReportService,\r\n private sharedService: SharedService,\r\n private changeDetectorRef: ChangeDetectorRef,\r\n private translateService: TranslateService,\r\n private dialogService: OirDialogService,\r\n private configurationService: AppConfigService\r\n ) {\r\n this.ckEditorConfig = {\r\n ...EditorConfig,\r\n licenseKey: this.configurationService.getValue('CKEditor5LicenseKey')\r\n }\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.workItemForm = this.formBuilder.group({\r\n workItemId: '',\r\n workItemType: ['', Validators.required],\r\n workItemBillOrMotion: [\r\n { value: [], disabled: true },\r\n Validators.required\r\n ],\r\n billStages: [{ value: [], disabled: true }, Validators.required],\r\n businessDaySectionWorkItemPlaceholder: [\r\n { value: '', disabled: true },\r\n [Validators.required, Validators.maxLength(250)]\r\n ],\r\n arrangmentsGroup: this.formBuilder.array([]),\r\n proposalTitle: [\r\n { value: '', disabled: true },\r\n [Validators.maxLength(250), Validators.required]\r\n ],\r\n motionSponsors: [{ value: null, disabled: true }],\r\n billSponsors: [{ value: null, disabled: true }],\r\n referralBillStage: [{value: false, disabled: true }],\r\n billStage: [{ value: null, disabled: true }, Validators.required],\r\n amendmentType: null,\r\n });\r\n\r\n this.membersData$ = this.reportService.members.pipe(\r\n map(members =>\r\n members.map(member => ({ value: member.id, title: member.name }))\r\n )\r\n );\r\n\r\n this.reportService.workItemArrangement\r\n .pipe(\r\n takeUntil(this.ngUnsubscribe),\r\n map(arrengements =>\r\n arrengements.map(\r\n (arrengement, i) => ({ value: i, title: arrengement })\r\n )\r\n )\r\n )\r\n .subscribe(res => (this.arrangementData = res));\r\n\r\n this.workItemChange();\r\n this.onWorkItemChange();\r\n this.subscribeToFormValueChange();\r\n\r\n if (!isEmpty(this.workItem)) {\r\n this.editMode = true;\r\n\r\n switch (this.workItem.workItemTypeInfo) {\r\n case WorkItemTypeValues.bills:\r\n this.workItemForm.controls.workItemType.patchValue(\r\n WorkItemTypes.bills\r\n );\r\n break;\r\n case WorkItemTypeValues.motions:\r\n this.workItemForm.controls.workItemType.patchValue(\r\n WorkItemTypes.motions\r\n );\r\n break;\r\n case WorkItemTypeValues.statements:\r\n this.workItemForm.controls.workItemType.patchValue(\r\n WorkItemTypes.statements\r\n );\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n } else if (\r\n this.sectionData &&\r\n this.sectionData.businessDaySectionTypeId === FormTemplate.motions\r\n ) {\r\n this.workItemForm.controls.workItemType.patchValue(WorkItemTypes.motions);\r\n } else if (this.isSectionBillsForIntroduction || this.isSectionReferralCommittee) {\r\n this.workItemForm.controls.workItemType.patchValue(WorkItemTypes.bills);\r\n this.onWorkItemSelect();\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscription.unsubscribe();\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n /**\r\n * Function to check max chars\r\n */\r\n public maxSearchSelectChar(event) {\r\n const length = event.target.value.length;\r\n if (\r\n length !== 0 &&\r\n length >= 1000 &&\r\n event.keyCode !== 46 &&\r\n event.keyCode !== 8 &&\r\n event.keyCode !== 37 &&\r\n event.keyCode !== 39\r\n ) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n /**\r\n * Method to get data for Arrangement input\r\n */\r\n public getArrangementData(): TypeaheadValue[] {\r\n return this.sharedService.filterTypeAheadArrayForNoPillsInputTypeAheadBasedOnTitle(\r\n this.arrangementsFormArray,\r\n 'arrangement',\r\n this.arrangementData\r\n );\r\n }\r\n\r\n /**\r\n * Method to handle save click\r\n */\r\n public onSave(): void {\r\n // User getRawValue because we need value from disabled fields\r\n this.noConfirm = true;\r\n const data = {\r\n form: this.workItemForm.getRawValue(),\r\n workItemDataWithTags: this.workItemBillOrMotionDataWithTags\r\n };\r\n\r\n if (this.isSectionReferralCommittee && data.form.billStage !== null) {\r\n data.form.billStages = [data.form.billStage];\r\n } else if (\r\n this.isSectionBillsForIntroduction\r\n && (!data.form.billStages || !data.form.billStages.length)\r\n ) {\r\n // Bills for introduction is constantly first stage (see template condition of #isFirstStage)\r\n data.form.billStages = [FIRST_STAGE_ID];\r\n }\r\n\r\n this.saveWorkItem.emit(data);\r\n this.processCancelationDecision(true);\r\n }\r\n\r\n /**\r\n * Method to close accordion\r\n */\r\n private closeAccordion(): void {\r\n this.canToggle = true;\r\n setTimeout(() => {\r\n this.workItemAccordion.click();\r\n this.workItemType = '';\r\n this.workItemForm.controls.workItemType.enable({ emitEvent: false });\r\n this.workItemForm.controls.billStages.disable({ emitEvent: false });\r\n\r\n if (!this.isSectionBillsForIntroduction && !this.isSectionReferralCommittee) {\r\n this.workItemForm.controls.workItemBillOrMotion.disable({\r\n emitEvent: false\r\n });\r\n }\r\n this.workItemForm.reset();\r\n }, 100);\r\n }\r\n\r\n /**\r\n * Function to clear work item for on template change\r\n */\r\n public onAddNewSectionTemplateChange(): void {\r\n setTimeout(() => {\r\n if (!this.canToggle) {\r\n this.noConfirm = true;\r\n this.processCancelationDecision(true);\r\n }\r\n this.workItemForm.reset();\r\n this.workItemForm.controls.workItemType.enable({ emitEvent: false });\r\n this.workItemForm.controls.workItemBillOrMotion.disable({\r\n emitEvent: false\r\n });\r\n this.workItemForm.controls.billStages.disable({ emitEvent: false });\r\n }, 100);\r\n }\r\n /**\r\n * Toggle Cancel Modal\r\n */\r\n public confirmCancel() {\r\n if (!this.noConfirm) {\r\n this.disableWorkItem\r\n ? this.processCancelationDecision(true)\r\n : this.dialogService.open({\r\n title: 'DIALOG.CANCEL_CONFIRM.TITLE',\r\n message: 'DIALOG.CANCEL_CONFIRM.TEXT',\r\n confirmButton: OirDialogButton.YES,\r\n cancelButton: OirDialogButton.NO,\r\n position: DIALOG_POSITION.CENTER,\r\n onConfirm: () => {\r\n this.processCancelationDecision(true);\r\n return of(true);\r\n },\r\n onCancel: () => {\r\n this.processCancelationDecision(false);\r\n return of(false);\r\n }\r\n });\r\n }\r\n this.noConfirm = false;\r\n }\r\n\r\n /**\r\n * Method to hande cancelConfirmModal response\r\n * @param decision - confirm cancelation\r\n */\r\n public processCancelationDecision(decision: boolean): void {\r\n if (decision) {\r\n this.closeAccordion();\r\n // Need to timeout to allow change detection to work for canToggle\r\n setTimeout(() => {\r\n // Clear formArray\r\n while (this.arrangementsFormArray.length) {\r\n this.arrangementsFormArray.removeAt(0);\r\n }\r\n this.workItemForm.controls.amendmentType.setValue(null ,{ emitEvent: false });\r\n this.workItemForm.controls.billStages.setValue([] ,{ emitEvent: false });\r\n this.workItemForm.controls.billStages.disable({ emitEvent: false });\r\n this.accordionClosed.emit(true);\r\n }, 100);\r\n }\r\n }\r\n\r\n /**\r\n * Method that is triggered every time after accordion toggle has happened\r\n * @param isOpen indicates if accordion is opened or closed\r\n */\r\n public afterWorkItemAccordionToggle(isOpen: boolean): void {\r\n this.canToggle = !isOpen;\r\n if (\r\n (this.sectionData &&\r\n this.sectionData.businessDaySectionTypeId === FormTemplate.motions &&\r\n !this.editMode) ||\r\n (this.sectionType === FormTemplate.motions && !this.editMode)\r\n ) {\r\n this.workItemForm.controls.workItemType.patchValue(WorkItemTypes.motions);\r\n } else {\r\n this.generateWorkItemsTypeData();\r\n }\r\n\r\n // Because we need accoridon to be already opened we must run change detection because canToggle changes on onInit in accordion component\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n /**\r\n * Method to check if passed object is not empty and therefore has value\r\n * @param value\r\n */\r\n public hasValue(value): boolean {\r\n return !isEmpty(value);\r\n }\r\n\r\n /**\r\n * Method to check if form is valid\r\n */\r\n public isFormValid(): boolean {\r\n return (\r\n this.workItemForm.valid ||\r\n (this.arrangementsFormArray.length === 1 &&\r\n isEmpty(\r\n (this.arrangementsFormArray.controls[0] as UntypedFormGroup).controls\r\n .arrangement.value\r\n ) &&\r\n !(this.arrangementsFormArray.controls[0] as UntypedFormGroup).controls\r\n .dissenting.value &&\r\n this.workItemHasArrangements())\r\n );\r\n }\r\n\r\n /**\r\n * Method to check if first arrangement input has value\r\n */\r\n public firstArrangementInputHasValue(): boolean {\r\n const firstArrangement = this.arrangementsFormArray\r\n .controls[0] as UntypedFormGroup;\r\n\r\n return (\r\n !isEmpty(firstArrangement) &&\r\n !isEmpty(firstArrangement.controls.arrangement.value)\r\n );\r\n }\r\n\r\n /**\r\n * If work item type is set to Bill, the multi select\r\n * \"Stages to be conidered by Dail\" needs to be displayed.\r\n */\r\n public enableBillStages(type: string): void {\r\n if (type === WorkItemTypes.bills) {\r\n this.reportService\r\n .getStagesToConsider(this.isSectionReferralCommittee ? 'referral' : '')\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n this.stagesData = res.map(\r\n x => ({ value: x.stageToConsiderId, title: x.stageToConsiderName })\r\n );\r\n if (this.isSectionReferralCommittee) {\r\n this.workItemForm.get('referralBillStage').enable({ emitEvent: false });\r\n } else {\r\n this.workItemForm.get('billStages').enable({ emitEvent: false });\r\n }\r\n });\r\n } else {\r\n this.workItemForm.get('billStages').disable({ emitEvent: false });\r\n }\r\n }\r\n\r\n /**\r\n * Max character in arrangments\r\n */\r\n public maxArrangementChar(event): any {\r\n const length = event.target.value !== undefined\r\n ? event.target.value.length\r\n : event.target.innerText;\r\n if (\r\n length !== 0 &&\r\n length >= 2000 &&\r\n event.keyCode !== 46 &&\r\n event.keyCode !== 8 &&\r\n event.keyCode !== 37 &&\r\n event.keyCode !== 39\r\n ) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n public onArrangementChange(id: number, value: TypeaheadValue) {\r\n if (value) {\r\n this.keyUp.next({ id, value: value.title });\r\n }\r\n }\r\n\r\n public onNoArrangementResults(id: number, value: string): void {\r\n const arrangementFormGroup = this.arrangementsFormArray.controls[\r\n id\r\n ] as UntypedFormGroup;\r\n const arrangementFormControl = arrangementFormGroup.get('arrangement');\r\n if (arrangementFormControl) {\r\n arrangementFormControl.setValue(value);\r\n }\r\n }\r\n\r\n /**\r\n * Generates work items type select data\r\n */\r\n public generateWorkItemsTypeData() {\r\n this.workItemTypeData = [];\r\n if (!this.editMode) {\r\n this.workItemTypesPerSection[\r\n FormTemplate[\r\n this.sectionData\r\n ? this.sectionData.businessDaySectionTypeId\r\n : this.sectionType\r\n ]\r\n ].forEach(element => {\r\n this.workItemTypeData.push(\r\n {\r\n value: WorkItemTypes[element],\r\n title: this.translateService.instant(`WORK_ITEM_FORM.WORK_ITEM_TYPE_SELECT.VALUE.${element.toUpperCase()}`)\r\n }\r\n );\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Function to select work item\r\n * @param val Optional Work item type\r\n */\r\n public onWorkItemSelect(val?: string): void {\r\n val = val ? val : this.workItemForm.controls.workItemType.value;\r\n\r\n if (!val) {\r\n return;\r\n }\r\n\r\n if (!this.isSectionBillsForIntroduction) {\r\n this.enableBillStages(val);\r\n }\r\n\r\n this.workItemType = val;\r\n \r\n // Get values for work items typeahead\r\n this.reportService\r\n .getWorkItems(val, this.billsEndpoint)\r\n .pipe(take(1))\r\n .subscribe(res => {\r\n this.workItemBillOrMotionData = [this.workItemOtherValue];\r\n this.workItemBillOrMotionDataWithTags = [this.workItemOtherValue];\r\n this.billMotionStatementData = res ? res : [];\r\n this.fillWorkItemBillOrMotionData();\r\n // Handle form controls\r\n this.workItemForm.controls.workItemBillOrMotion.enable({\r\n emitEvent: false\r\n });\r\n this.workItemForm.controls.workItemType.disable({ emitEvent: false });\r\n this.populateForm();\r\n });\r\n }\r\n\r\n /**\r\n * Function on work item change\r\n */\r\n public onWorkItemChange(): void {\r\n this.subscription.add(\r\n this.workItemForm.controls.workItemType.valueChanges.subscribe(_val => {\r\n if (\r\n this.editMode ||\r\n (this.sectionData &&\r\n this.sectionData.businessDaySectionTypeId ===\r\n FormTemplate.motions) ||\r\n this.sectionType === FormTemplate.motions\r\n ) {\r\n this.onWorkItemSelect();\r\n } else if (!this.editMode\r\n && (this.isSectionBillsForIntroduction || this.isSectionReferralCommittee)) {\r\n this.workItemForm.controls.workItemType.patchValue(WorkItemTypes.bills, { emitEvent: false });\r\n this.onWorkItemSelect();\r\n }\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Method to check if work item has arrangements\r\n */\r\n private workItemHasArrangements(): boolean {\r\n return (\r\n !isEmpty(this.workItem) && !isEmpty(this.workItem.arrangementOfWorkItems)\r\n );\r\n }\r\n\r\n /**\r\n * Method to populate form\r\n */\r\n private populateForm(): void {\r\n if (this.editMode && !isEmpty(this.workItem)) {\r\n this.adjustWorkItemData();\r\n\r\n // If stages to consider exist - populate form\r\n if (this.workItem.billStagesToConsider) {\r\n this.populateBillStagesToConsider();\r\n }\r\n\r\n if (this.workItem.amendmentType) {\r\n this.workItemForm.controls.amendmentType.patchValue(this.workItem.amendmentType, {\r\n emitEvent: false\r\n });\r\n }\r\n\r\n if (!isEmpty(this.workItem.arrangementOfWorkItems)) {\r\n this.workItem.arrangementOfWorkItems.forEach(item =>\r\n this.addArrangementControl(\r\n item.arrangementOfWorkItemId,\r\n item.arrangementOfWorkItemDescription,\r\n item.isDissentingMembersAssigned,\r\n item.isArrangementAppearOnFront,\r\n item.dissentingMembers\r\n )\r\n );\r\n this.workItemForm.controls.proposalTitle.patchValue(\r\n this.workItem.arrangementOfWorkItemProposal\r\n );\r\n } else {\r\n this.addArrangementControl();\r\n }\r\n } else {\r\n this.addArrangementControl();\r\n }\r\n }\r\n\r\n /**\r\n * Method to subscribe to work item value change\r\n */\r\n private workItemChange(): void {\r\n this.subscription.add(\r\n this.workItemForm.controls.workItemBillOrMotion.valueChanges.subscribe((val) => {\r\n this.workItemChangeHandler(val);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Metod to add form control to arrangements list\r\n * @param index\r\n */\r\n private addArrangementControl(\r\n arrangementId?: number | string,\r\n arrangement?: any,\r\n dissenting?: any,\r\n isArrangementAppearOnFront?: boolean,\r\n arrangementMembers?: any\r\n ): void {\r\n const arrangementForm: UntypedFormGroup = this.formBuilder.group({\r\n arrangementId: '',\r\n arrangement: [[]],\r\n dissenting: false,\r\n isArrangementAppearOnFront: false,\r\n arrangementMembers: [[], [Validators.required]]\r\n });\r\n this.arrangementsFormArray.push(arrangementForm);\r\n\r\n this.subscription.add(\r\n arrangementForm.controls.arrangement.valueChanges\r\n .pipe(filter(val => !isEmpty(val) && isArray(val) && !isEmpty(val[0])))\r\n .subscribe(res => {\r\n arrangementForm.controls.arrangement.patchValue(res[0].title);\r\n })\r\n );\r\n this.sharedService.showFieldIfOtherFieldValueIs(\r\n this.subscription,\r\n arrangementForm,\r\n 'dissenting',\r\n true,\r\n 'arrangementMembers'\r\n );\r\n this.sharedService.addValidatorIfOtherFieldHasValue(\r\n this.subscription,\r\n arrangementForm,\r\n 'dissenting',\r\n [Validators.required],\r\n 'arrangement'\r\n );\r\n this.sharedService.addValidatorIfOtherFieldHasValue(\r\n this.subscription,\r\n arrangementForm,\r\n 'isArrangementAppearOnFront',\r\n [Validators.required],\r\n 'arrangement'\r\n );\r\n\r\n // If arrangement exsist populate form\r\n if (arrangement) {\r\n arrangementForm.patchValue({\r\n arrangementId,\r\n arrangement: [{ value: 1, title: arrangement}],\r\n dissenting,\r\n isArrangementAppearOnFront,\r\n arrangementMembers: !isEmpty(arrangementMembers)\r\n ? arrangementMembers.map(\r\n element => ({ value: element.id, title: element.name })\r\n )\r\n : []\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Method to subscribe to form value change to add/remove arrangement form groups\r\n */\r\n private subscribeToFormValueChange(): void {\r\n this.keyUp\r\n .pipe(\r\n debounceTime(2000),\r\n distinctUntilChanged(),\r\n takeUntil(this.ngUnsubscribe)\r\n )\r\n .subscribe(res => {\r\n const arrangement = this.arrangementsFormArray.controls[\r\n res.id\r\n ] as UntypedFormGroup;\r\n if (arrangement && isEmpty(arrangement.controls.arrangement.value)) {\r\n arrangement.controls.arrangement.setValue(\r\n [{ value: 0, title: res.value }],\r\n { onlySelf: true, emitEvent: false }\r\n );\r\n }\r\n });\r\n this.subscription.add(\r\n this.workItemForm.controls.arrangmentsGroup.valueChanges.subscribe(\r\n formValue => {\r\n if (isArray(formValue)) {\r\n // Loop through arrangementsFormArray and remove empty input form groups\r\n formValue.forEach((element, i) => {\r\n // Skip last element as it can be empty\r\n if (i < formValue.length - 1 && isEmpty(element.arrangement)) {\r\n this.arrangementsFormArray.removeAt(i);\r\n }\r\n });\r\n\r\n // If last form group has Arrangement value then add new form group\r\n if (\r\n !isEmpty(formValue[formValue.length - 1]) &&\r\n !isEmpty(formValue[formValue.length - 1].arrangement)\r\n ) {\r\n this.addArrangementControl();\r\n }\r\n }\r\n\r\n // Enable/disable and clear proposal control\r\n this.workItemForm.controls.proposalTitle[\r\n this.firstArrangementInputHasValue() ? 'enable' : 'disable'\r\n ]({ emitEvent: false });\r\n if (!this.firstArrangementInputHasValue()) {\r\n this.workItemForm.controls.proposalTitle.setValue(\r\n !isEmpty(this.workItemForm.controls.workItemBillOrMotion.value) &&\r\n this.workItemForm.controls.workItemBillOrMotion.value[0]\r\n .title !== 'Other'\r\n ? this.workItemForm.controls.workItemBillOrMotion.value[0].title.split(\r\n '['\r\n )[0]\r\n : ''\r\n );\r\n }\r\n }\r\n )\r\n );\r\n }\r\n\r\n private clearHtmlTags(value: any): string {\r\n const element = document.createElement('div');\r\n element.innerHTML = value;\r\n value = element.textContent;\r\n return value.replace(/[\\xA0\\x20]/g, ' ');\r\n }\r\n\r\n validateArrangementLength(arrangement: UntypedFormControl, { editor }: ChangeEvent ) {\r\n const value = editor.getData();\r\n\r\n return this.sharedService.validateArrangementLength(arrangement, value);\r\n }\r\n\r\n get isSectionBillsForIntroduction(): boolean {\r\n return (this.sectionData\r\n && this.sectionData.businessDaySectionTypeId\r\n === FormTemplate.billsForIntroduction)\r\n || this.sectionType === FormTemplate.billsForIntroduction;\r\n }\r\n\r\n get isSectionReferralCommittee(): boolean {\r\n return (this.sectionData\r\n && this.sectionData.businessDaySectionTypeId\r\n === FormTemplate.referralToCommittee)\r\n || this.sectionType === FormTemplate.referralToCommittee\r\n }\r\n\r\n get isSectionGovernmentBusiness(): boolean {\r\n return (this.sectionData &&\r\n this.sectionData.businessDaySectionTypeId === FormTemplate.governmentBusiness)\r\n || this.sectionType === FormTemplate.governmentBusiness; \r\n }\r\n\r\n get isSectionDeferredDivisions(): boolean {\r\n return (this.sectionData &&\r\n this.sectionData.businessDaySectionTypeId === FormTemplate.deferredDivisions)\r\n || this.sectionType === FormTemplate.deferredDivisions; \r\n }\r\n\r\n public checkBillStage() {\r\n if (this.workItemForm.controls.referralBillStage.value) {\r\n this.workItemForm.controls.billStage.enable({emitEvent: false});\r\n } else {\r\n this.workItemForm.controls.billStage.reset(null, {\r\n emitEvent: false\r\n });\r\n this.workItemForm.controls.billStage.disable({emitEvent: false});\r\n }\r\n }\r\n\r\n private setBillStage(stageId: number) {\r\n this.workItemForm.controls.referralBillStage.patchValue(true, {\r\n emitEvent: false\r\n });\r\n this.workItemForm.controls.billStage.patchValue(stageId, {\r\n emitEvent: false\r\n });\r\n this.workItemForm.controls.billStage.enable({ emitEvent: false });\r\n }\r\n\r\n private get billsEndpoint(): string {\r\n if (this.workItemType !== 'bills') {\r\n return '';\r\n }\r\n\r\n if (this.isSectionGovernmentBusiness || this.isSectionDeferredDivisions) {\r\n return 'billsWithDepartment';\r\n } else if (\r\n (this.sectionData &&\r\n this.sectionData.businessDaySectionTypeId ===\r\n FormTemplate.privateMembersBusiness) ||\r\n this.sectionType === FormTemplate.privateMembersBusiness ||\r\n (this.sectionData &&\r\n this.sectionData.businessDaySectionTypeId ===\r\n FormTemplate.privateMembersBill) ||\r\n this.sectionType === FormTemplate.privateMembersBill\r\n ) {\r\n return 'billsWithChamber';\r\n } else if (this.isSectionBillsForIntroduction) {\r\n return 'billsForIntroduction';\r\n } else if (this.isSectionReferralCommittee) {\r\n return 'billsReferralToCommittee';\r\n } else {\r\n return 'bills';\r\n }\r\n }\r\n\r\n private fillWorkItemBillOrMotionData(): void {\r\n this.billMotionStatementData.forEach(x => {\r\n switch (this.workItemType) {\r\n case 'statements':\r\n this.workItemBillOrMotionDataWithTags.push(\r\n {\r\n value: x.statementId,\r\n title: x[\r\n 'statementTitle' +\r\n (this.translateService.currentLang === 'en'\r\n ? 'ENG'\r\n : 'GLE')\r\n ]\r\n }\r\n );\r\n this.workItemBillOrMotionData.push(\r\n {\r\n value: x.statementId,\r\n title: this.clearHtmlTags(\r\n x[\r\n 'statementTitle' +\r\n (this.translateService.currentLang === 'en'\r\n ? 'ENG'\r\n : 'GLE')\r\n ]\r\n )\r\n }\r\n );\r\n break;\r\n case 'motions':\r\n this.workItemBillOrMotionDataWithTags.push(\r\n {\r\n value: x.motionId,\r\n title: x[\r\n 'motionTitle' +\r\n (this.translateService.currentLang === 'en'\r\n ? 'ENG'\r\n : 'GLE')\r\n ]\r\n }\r\n );\r\n this.workItemBillOrMotionData.push(\r\n {\r\n value: x.motionId,\r\n title: this.clearHtmlTags(\r\n x[\r\n 'motionTitle' +\r\n (this.translateService.currentLang === 'en'\r\n ? 'ENG'\r\n : 'GLE')\r\n ]\r\n )\r\n }\r\n );\r\n break;\r\n default:\r\n this.workItemBillOrMotionDataWithTags.push(\r\n {\r\n value: x.billID,\r\n title: x[\r\n 'billTitle' +\r\n (this.translateService.currentLang === 'en'\r\n ? 'ENG'\r\n : 'GLE')\r\n ]\r\n }\r\n );\r\n this.workItemBillOrMotionData.push(\r\n {\r\n value: x.billID,\r\n title: x[\r\n 'billTitle' +\r\n (this.translateService.currentLang === 'en'\r\n ? 'ENG'\r\n : 'GLE')\r\n ]\r\n }\r\n );\r\n }\r\n });\r\n }\r\n\r\n private adjustWorkItemData(): void {\r\n if (!this.workItem.isWorkItemOutstanding) {\r\n const index = findIndex(this.workItemBillOrMotionData, [\r\n 'title',\r\n this.getTitleTag()\r\n ]);\r\n if (index > -1) {\r\n this.workItemForm.controls.workItemBillOrMotion.patchValue([\r\n this.workItemBillOrMotionData[index]\r\n ]);\r\n }\r\n } else {\r\n this.workItemForm.controls.workItemBillOrMotion.patchValue([\r\n this.workItemOtherValue\r\n ]);\r\n this.workItemForm.controls.businessDaySectionWorkItemPlaceholder.patchValue(\r\n this.workItem.businessDaySectionWorkItemPlaceholder\r\n );\r\n }\r\n this.workItemForm.controls.workItemId.patchValue(\r\n this.workItem.workItemId || ''\r\n );\r\n }\r\n\r\n private getTitleTag(): string {\r\n if (this.workItem.workItemTitles) {\r\n return this.clearHtmlTags(this.workItem.workItemTitles[0])\r\n }\r\n\r\n const titleLangTag = this.translateService.currentLang === 'en' ? 'Eng' : 'Gle';\r\n\r\n return (this.isSectionBillsForIntroduction || this.isSectionReferralCommittee)\r\n ? this.clearHtmlTags(this.workItem.arrangementOfWorkItemProposal)\r\n : this.clearHtmlTags(this.workItem[`workItemTitle${titleLangTag}`])\r\n }\r\n\r\n private populateBillStagesToConsider(): void {\r\n const selectedStages = [];\r\n this.workItem.billStagesToConsider.forEach(x => {\r\n selectedStages.push(x);\r\n });\r\n\r\n if (this.isSectionReferralCommittee && selectedStages.length) {\r\n this.setBillStage(selectedStages[0]);\r\n } else {\r\n this.workItemForm.controls.billStages.patchValue(selectedStages, {\r\n emitEvent: false\r\n });\r\n }\r\n }\r\n\r\n private workItemChangeHandler(val: TypeaheadValue[]): void {\r\n // Handle 'other' work item field\r\n this.workItemForm.controls.businessDaySectionWorkItemPlaceholder[\r\n !isEmpty(val) && val[0].value === GLOBALS.workItemOtherValue\r\n ? 'enable'\r\n : 'disable'\r\n ]({ emitEvent: false });\r\n\r\n this.workItemForm.controls.businessDaySectionWorkItemPlaceholder.setValue(\r\n '',\r\n { emitEvent: false }\r\n );\r\n\r\n this.workItemForm.controls.motionSponsors.setValue('', {\r\n emitEvent: false\r\n });\r\n\r\n this.workItemForm.controls.proposalTitle.setValue(\r\n !isEmpty(this.workItemForm.controls.workItemBillOrMotion.value) &&\r\n this.workItemForm.controls.workItemBillOrMotion.value[0].title !==\r\n 'Other'\r\n ? this.workItemForm.controls.workItemBillOrMotion.value[0].title.split(\r\n '['\r\n )[0]\r\n : ''\r\n );\r\n\r\n // Handle getting sponsor value\r\n this.sponsor = '';\r\n this.currentStage = '';\r\n\r\n if (\r\n !isEmpty(val) &&\r\n val[0].value !== GLOBALS.workItemOtherValue &&\r\n this.workItemForm.controls.workItemType.value\r\n ) {\r\n this.setWorkItemSponsor();\r\n }\r\n }\r\n\r\n private setWorkItemSponsor(): void {\r\n switch (this.workItemForm.controls.workItemType.value) {\r\n case WorkItemTypes.bills:\r\n this.setBillsSponsor();\r\n break;\r\n case WorkItemTypes.motions:\r\n this.setMotionsSponsor()\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n private setBillsSponsor(): void {\r\n const currentSelectedWorkItem = this.billMotionStatementData.filter(\r\n x =>\r\n x.billID ===\r\n this.workItemForm.controls.workItemBillOrMotion.value[0]\r\n .value\r\n );\r\n let sponsorsIds = '';\r\n\r\n if (\r\n currentSelectedWorkItem[0].billSponsorDepartmentName &&\r\n this.sectionType === FormTemplate.governmentBusiness\r\n ) {\r\n sponsorsIds =\r\n currentSelectedWorkItem[0].billSponsorDepartmentId;\r\n this.workItemForm.controls.billSponsors.patchValue(\r\n sponsorsIds,\r\n { emitEvent: false }\r\n );\r\n this.sponsor =\r\n currentSelectedWorkItem[0].billSponsorDepartmentName;\r\n }\r\n\r\n if (\r\n this.sectionType !== FormTemplate.privateMembersBusiness &&\r\n this.sectionType !== FormTemplate.privateMembersBill\r\n ) {\r\n this.setBillsStage();\r\n return;\r\n }\r\n\r\n if (\r\n !currentSelectedWorkItem[0] ||\r\n !currentSelectedWorkItem[0].sponsors ||\r\n !currentSelectedWorkItem[0].sponsors.length\r\n ) {\r\n this.setBillsStage();\r\n return;\r\n }\r\n\r\n const sponsorIDsDivider = sponsorsIds !== '' ? ', ' : '';\r\n const sponsorsDivider = this.sponsor !== '' ? ', ' : '';\r\n\r\n currentSelectedWorkItem[0].sponsors.forEach(element => {\r\n // Render sponsor IDs and patch into form\r\n sponsorsIds =\r\n sponsorsIds + sponsorIDsDivider +\r\n (element.billSponsorDepartmentID || element.sponsorChamberMemberID);\r\n this.workItemForm.controls.billSponsors.patchValue(\r\n sponsorsIds,\r\n { emitEvent: false }\r\n );\r\n\r\n // Render sponsor names/title\r\n this.sponsor =\r\n this.sponsor + sponsorsDivider +\r\n (element.billSponsorDepartmentName\r\n || `${element.sponsorChamberMemberFirstName} ${element.sponsorChamberMemberLastName}`);\r\n });\r\n\r\n this.setBillsStage();\r\n }\r\n\r\n private setBillsStage(): void {\r\n if (\r\n isEmpty(\r\n this.workItemForm.controls.workItemBillOrMotion.value\r\n ) ||\r\n isEmpty(this.stagesData)\r\n ) {\r\n return;\r\n }\r\n\r\n const billIndexEng = findIndex(this.billMotionStatementData, [\r\n 'billTitleENG',\r\n this.workItemForm.controls.workItemBillOrMotion.value[0]\r\n .title\r\n ]);\r\n const billIndexGle = findIndex(this.billMotionStatementData, [\r\n 'billTitleGLE',\r\n this.workItemForm.controls.workItemBillOrMotion.value[0]\r\n .title\r\n ]);\r\n\r\n if (billIndexEng > -1 || billIndexGle > -1) {\r\n const index =\r\n billIndexEng > -1 ? billIndexEng : billIndexGle;\r\n const billStage = this.stagesData.filter(\r\n item =>\r\n item.value ===\r\n this.billMotionStatementData[index].billStageID\r\n );\r\n this.currentStage =\r\n this.billMotionStatementData[index].billStageName;\r\n this.billStageId = billStage[0].value;\r\n }\r\n }\r\n\r\n private setMotionsSponsor(): void {\r\n const currentSelectedWorkItem = this.billMotionStatementData.filter(\r\n x =>\r\n x.motionID ===\r\n this.workItemForm.controls.workItemBillOrMotion.value[0]\r\n .value\r\n );\r\n if (\r\n currentSelectedWorkItem[0] &&\r\n currentSelectedWorkItem[0].sponsors &&\r\n currentSelectedWorkItem[0].sponsors.length > 0\r\n ) {\r\n this.workItemForm.controls.motionSponsors.patchValue(\r\n currentSelectedWorkItem[0].sponsors[0].motionSponsorId !==\r\n null &&\r\n this.workItemForm.controls.workItemType.value ===\r\n GLOBALS.workItemOtherValue\r\n ? JSON.stringify(currentSelectedWorkItem[0].sponsors[0])\r\n : '',\r\n { emitEvent: false }\r\n );\r\n }\r\n }\r\n}\r\n","import { Component, ViewChild, Input } from '@angular/core';\r\nimport { ModalComponent } from 'proceduralsystem-clientcomponents';\r\nimport { ReportStoreService } from '../../../services/report-store.service';\r\n\r\n@Component({\r\n selector: 'oir-add-new-section-delete-modal',\r\n templateUrl: './add-new-section-delete-modal.component.html',\r\n styleUrls: ['./add-new-section-delete-modal.component.less']\r\n})\r\nexport class AddNewSectionDeleteModalComponent {\r\n\r\n @Input() bsSectionId: string;\r\n @Input() bsDayDate: string;\r\n @Input() bsSectionTypeId: string;\r\n\r\n @ViewChild('deleteModal') deleteModal: ModalComponent;\r\n\r\n constructor(private reportStoreService: ReportStoreService) { }\r\n\r\n /**\r\n * Function to delete custom section\r\n */\r\n public deleteCustomSection(): void {\r\n this.reportStoreService.deleteNewCustomSectionAndHeader(this.bsSectionId, this.bsDayDate, this.bsSectionTypeId);\r\n this.closeDeleteModal();\r\n }\r\n\r\n /**\r\n * Function to open Delete modal\r\n */\r\n public toggleDeleteModal(): void {\r\n this.deleteModal.toggle();\r\n }\r\n\r\n /**\r\n * Function to close delete modal\r\n */\r\n public closeDeleteModal(): void {\r\n this.deleteModal.close();\r\n }\r\n}\r\n","import {\r\n APP_INITIALIZER,\r\n Injector,\r\n NgModule,\r\n} from \"@angular/core\";\r\nimport { CommonModule, APP_BASE_HREF } from \"@angular/common\";\r\nimport { BrowserModule } from \"@angular/platform-browser\";\r\nimport { routing } from \"./app.routes\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { OverlayModule } from \"@angular/cdk/overlay\";\r\nimport { BrowserAnimationsModule } from \"@angular/platform-browser/animations\";\r\nimport { TabViewModule } from \"primeng/tabview\";\r\nimport { CKEditorModule } from \"@ckeditor/ckeditor5-angular\";\r\nimport { DragDropModule } from \"@angular/cdk/drag-drop\";\r\nimport { NgbModule } from \"@ng-bootstrap/ng-bootstrap\";\r\nimport { HTTP_INTERCEPTORS, HttpClient } from \"@angular/common/http\";\r\nimport { ClientFrameworkModule } from \"proceduralsystem-clientcomponents\";\r\nimport { AppComponent } from \"./app.component\";\r\nimport { PageComponent } from \"./page.component\";\r\nimport { SpanStylePipe } from \"./pipes/span-style.pipe\";\r\nimport { AmendmentByValuePipe } from \"./pipes/amendment-by-value.pipe\";\r\n\r\nimport {\r\n EventType,\r\n InteractionType,\r\n PublicClientApplication,\r\n} from \"@azure/msal-browser\";\r\nimport {\r\n MSAL_GUARD_CONFIG,\r\n MSAL_INSTANCE,\r\n MSAL_INTERCEPTOR_CONFIG,\r\n MsalGuardConfiguration,\r\n MsalInterceptor,\r\n MsalInterceptorConfiguration,\r\n MsalService,\r\n MsalGuard,\r\n MsalBroadcastService,\r\n} from \"@azure/msal-angular\";\r\nimport { AuthenticationResult } from \"@azure/msal-common/dist/response/AuthenticationResult\";\r\nimport {\r\n MissingTranslationHandler,\r\n MissingTranslationHandlerParams,\r\n TranslateLoader,\r\n TranslateModule,\r\n TranslateService,\r\n} from \"@ngx-translate/core\";\r\nimport { TranslateHttpLoader } from \"@ngx-translate/http-loader\";\r\nimport { forkJoin, map, Observable, of, switchMap } from \"rxjs\";\r\nimport { NgxPaginationModule } from \"ngx-pagination\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { ResponseInterceptor } from \"./shared/interceptors/response.interceptor\";\r\nimport { UserAuthInterceptor } from \"./shared/interceptors/user-auth.interceptor\";\r\nimport { AppConfigService } from \"./services/app-config.service\";\r\nimport { TextMaskModule } from 'angular-ngx-textmask';\r\nimport { DeleteModalComponent } from \"./shared/modals/delete-modal/delete-modal.component\";\r\nimport { WorkItemInstanceComponent } from \"./shared/components/work-item-instance/work-item-instance.component\";\r\nimport { DayInstanceComponent } from \"./bcr-report/day-instance/day-instance.component\";\r\nimport { AddNewSectionComponent } from \"./bcr-report/day-instance/add-new-section/add-new-section.component\";\r\nimport { DayArrangementComponent } from \"./bcr-report/day-instance/day-arrangement/day-arrangement.component\";\r\nimport { MoveSectionModalComponent } from \"./bcr-report/day-instance/section/modals/move-section-modal/move-section-modal.component\";\r\nimport { RequestTitleTranslationModalComponent } from \"./bcr-report/day-instance/section/modals/request-title-translation-modal/request-title-translation-modal.component\";\r\nimport { SectionsFormComponent } from \"./bcr-report/day-instance/section/sections-form/sections-form.component\";\r\nimport { SectionComponent } from \"./bcr-report/day-instance/section/section.component\";\r\nimport { ActionBarEmailModalComponent } from \"./bcr-report/modals/action-bar-email-modal/action-bar-email-modal.component\";\r\nimport { CirculateBcrModalComponent } from \"./bcr-report/modals/circulate-bcr-modal/circulate-bcr-modal.component\";\r\nimport { ViewReportComponent } from \"./bcr-report/view-report.component\";\r\nimport { CreateReportComponent } from \"./create-report/create-report.component\";\r\nimport { CancelConfirmModalComponent } from \"./create-report/cancel-confirm-modal/cancel-confirm-modal.component\";\r\nimport { DashboardComponent } from \"./dashboard/dashboard.component\";\r\nimport { CurrentDraftReportComponent } from \"./dashboard/current-draft-report/current-draft-report.component\";\r\nimport { DeleteConfirmationModalComponent } from \"./dashboard/delete-confirmation-modal/delete-confirmation-modal.component\";\r\nimport { OutstandingItemsComponent } from \"./dashboard/outstanding-items/outstanding-items.component\";\r\nimport { OutstandingWorkItemsModalComponent } from \"./dashboard/outstanding-work-items-modal/outstanding-work-items-modal.component\";\r\nimport { OrderOfBusinessComponent } from \"./order-of-business/order-of-business.component\";\r\nimport { AnnouncementBusinessItemComponent } from \"./order-of-business/announcement-business-item/announcement-business-item.component\";\r\nimport { AnnouncementProposedArrangementComponent } from \"./order-of-business/announcement-proposed-arrangement/announcement-proposed-arrangement.component\";\r\nimport { ActionBarEmailModalObComponent } from \"./order-of-business/modals/action-bar-email-modal-ob/action-bar-email-modal-ob.component\";\r\nimport { CirculateModalComponent } from \"./order-of-business/modals/circulate-modal/circulate-modal.component\";\r\nimport { ConfirmCancelModalComponent } from \"./order-of-business/modals/confirm-cancel-modal/confirm-cancel-modal.component\";\r\nimport { RapportuersReportComponent } from \"./rapportuers-report/rapportuers-report.component\";\r\nimport { AnnouncementDaysComponent } from \"./rapportuers-report/announcement-days/announcement-days.component\";\r\nimport { CancelReportComponent } from \"./rapportuers-report/modals/cancel-report/cancel-report.component\";\r\nimport { SendToRapporteurComponent } from \"./rapportuers-report/modals/send-to-rapporteur/send-to-rapporteur.component\";\r\nimport { SearchComponent } from \"./search/search.component\";\r\nimport { EmitterCollapsiblePanelComponent } from \"./shared/components/emitter-collapsible-panel/emitter-collapsible-panel.component\";\r\nimport { AccordionHeaderComponent } from \"./shared/components/accordion-header/accordion-header.component\";\r\nimport { CustomModalComponent } from \"./shared/components/custom-modal/custom-modal.component\";\r\nimport { CustomMultiselectComponent } from \"./shared/components/custom-multiselect/custom-multiselect.component\";\r\nimport { CustomTypeaheadComponent } from \"./shared/components/custom-typeahead/custom-typeahead.component\";\r\nimport { DatePickerCustomComponent } from \"./shared/components/datepicker-custom/datepicker-custom.component\";\r\nimport { ToggleableAccordionComponent } from \"./shared/components/toggleable-accordion/toggleable-accordion.component\";\r\nimport { WorkItemFormComponent } from \"./shared/components/work-item-form/work-item-form.component\";\r\nimport { AddNewSectionDeleteModalComponent } from \"./shared/modals/add-new-section-delete-modal/add-new-section-delete-modal.component\";\r\n\r\n// AoT requires an exported function for factories\r\nexport function HttpLoaderFactory(httpClient: HttpClient) {\r\n return new TranslateHttpLoader(httpClient, \"./assets/i18n/\", \".json\");\r\n}\r\n\r\nexport class TranslationHandlerService implements MissingTranslationHandler {\r\n /**\r\n * Missing translation handler.\r\n */\r\n public handle(params: MissingTranslationHandlerParams): Observable {\r\n return of(params.key);\r\n }\r\n}\r\n\r\n/**\r\n * MSAL Angular retrieve tokens for authorizaion\r\n */\r\nexport function MSALInstanceFactory(\r\n config: AppConfigService\r\n): PublicClientApplication {\r\n const msalConfig = environment.msalConfig;\r\n const endpoint = config.getValue(\"AzureAd\");\r\n if (endpoint) {\r\n msalConfig.auth.clientId = endpoint.ClientId;\r\n msalConfig.auth.authority = `${endpoint.Instance}${endpoint.TenantId}`;\r\n }\r\n\r\n const msalInstance = new PublicClientApplication(msalConfig);\r\n\r\n // Account selection logic is app dependent. Adjust as needed for different use cases.\r\n const account = msalInstance.getActiveAccount();\r\n if (!account) {\r\n // Set active account on page load\r\n const accounts = msalInstance.getAllAccounts();\r\n if (accounts.length > 0) {\r\n msalInstance.setActiveAccount(accounts[0]);\r\n } else {\r\n // handle auth redirect/do all initial setup for msal\r\n msalInstance.addEventCallback((event) => {\r\n // set active account after redirect\r\n if (event.eventType === EventType.LOGIN_SUCCESS && event.payload) {\r\n msalInstance.setActiveAccount(\r\n (event.payload as AuthenticationResult).account\r\n );\r\n }\r\n });\r\n }\r\n }\r\n\r\n return msalInstance;\r\n}\r\n\r\nexport function MSALInterceptorConfigFactory(\r\n config: AppConfigService\r\n): MsalInterceptorConfiguration {\r\n const protectedResourceMap = new Map();\r\n let endpoint = config.getValue(\"ApiEndpoint\") as any;\r\n if (endpoint) {\r\n protectedResourceMap.set(endpoint.url, endpoint.scopes);\r\n }\r\n endpoint = config.getValue(\"CommsEndpoint\");\r\n if (endpoint) {\r\n protectedResourceMap.set(endpoint.url, endpoint.scopes);\r\n }\r\n\r\n return {\r\n interactionType: InteractionType.Redirect,\r\n protectedResourceMap,\r\n };\r\n}\r\n\r\nexport function MSALGuardConfigFactory(\r\n config: AppConfigService\r\n): MsalGuardConfiguration {\r\n return {\r\n interactionType: InteractionType.Redirect,\r\n authRequest: { scopes: config.getValue(\"ApiEndpoint\").scopes },\r\n };\r\n}\r\n\r\n@NgModule({\r\n declarations: [\r\n AppComponent,\r\n PageComponent,\r\n SpanStylePipe,\r\n AmendmentByValuePipe,\r\n DeleteModalComponent,\r\n WorkItemInstanceComponent,\r\n DayInstanceComponent,\r\n AddNewSectionComponent,\r\n DayArrangementComponent,\r\n MoveSectionModalComponent,\r\n RequestTitleTranslationModalComponent,\r\n SectionsFormComponent,\r\n SectionComponent,\r\n ActionBarEmailModalComponent,\r\n CirculateBcrModalComponent,\r\n ViewReportComponent,\r\n CreateReportComponent,\r\n CancelConfirmModalComponent,\r\n DashboardComponent,\r\n CurrentDraftReportComponent,\r\n DeleteConfirmationModalComponent,\r\n OutstandingItemsComponent,\r\n OutstandingWorkItemsModalComponent,\r\n OrderOfBusinessComponent,\r\n AnnouncementBusinessItemComponent,\r\n AnnouncementProposedArrangementComponent,\r\n ActionBarEmailModalObComponent,\r\n CirculateModalComponent,\r\n ConfirmCancelModalComponent,\r\n RapportuersReportComponent,\r\n AnnouncementDaysComponent,\r\n CancelReportComponent,\r\n SendToRapporteurComponent,\r\n SearchComponent,\r\n EmitterCollapsiblePanelComponent,\r\n AccordionHeaderComponent,\r\n CustomModalComponent,\r\n CustomMultiselectComponent,\r\n CustomTypeaheadComponent,\r\n DatePickerCustomComponent,\r\n ToggleableAccordionComponent,\r\n WorkItemFormComponent,\r\n WorkItemInstanceComponent,\r\n AddNewSectionDeleteModalComponent,\r\n DeleteModalComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n BrowserModule,\r\n RouterModule,\r\n ClientFrameworkModule,\r\n BrowserAnimationsModule,\r\n NgbModule,\r\n NgxPaginationModule,\r\n TextMaskModule,\r\n OverlayModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n TabViewModule,\r\n CKEditorModule,\r\n DragDropModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient, AppConfigService],\r\n },\r\n missingTranslationHandler: {\r\n provide: MissingTranslationHandler,\r\n useClass: TranslationHandlerService,\r\n },\r\n defaultLanguage: \"en\",\r\n isolate: false,\r\n }),\r\n routing,\r\n ],\r\n exports: [\r\n DeleteModalComponent,\r\n WorkItemInstanceComponent,\r\n DayInstanceComponent,\r\n AddNewSectionComponent,\r\n DayArrangementComponent,\r\n MoveSectionModalComponent,\r\n RequestTitleTranslationModalComponent,\r\n SectionsFormComponent,\r\n SectionComponent,\r\n ActionBarEmailModalComponent,\r\n CirculateBcrModalComponent,\r\n ViewReportComponent,\r\n CreateReportComponent,\r\n CancelConfirmModalComponent,\r\n DashboardComponent,\r\n CurrentDraftReportComponent,\r\n DeleteConfirmationModalComponent,\r\n OutstandingItemsComponent,\r\n OutstandingWorkItemsModalComponent,\r\n OrderOfBusinessComponent,\r\n AnnouncementBusinessItemComponent,\r\n AnnouncementProposedArrangementComponent,\r\n ActionBarEmailModalObComponent,\r\n CirculateModalComponent,\r\n ConfirmCancelModalComponent,\r\n RapportuersReportComponent,\r\n AnnouncementDaysComponent,\r\n CancelReportComponent,\r\n SendToRapporteurComponent,\r\n SearchComponent,\r\n EmitterCollapsiblePanelComponent,\r\n AccordionHeaderComponent,\r\n CustomModalComponent,\r\n CustomMultiselectComponent,\r\n CustomTypeaheadComponent,\r\n DatePickerCustomComponent,\r\n ToggleableAccordionComponent,\r\n WorkItemFormComponent,\r\n WorkItemInstanceComponent,\r\n AddNewSectionDeleteModalComponent,\r\n DeleteModalComponent\r\n ],\r\n providers: [\r\n { provide: APP_BASE_HREF, useValue: \"/\" },\r\n { provide: HTTP_INTERCEPTORS, useClass: UserAuthInterceptor, multi: true },\r\n { provide: HTTP_INTERCEPTORS, useClass: ResponseInterceptor, multi: true },\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: (config: AppConfigService, injector: Injector) => () => {\r\n return config.init().pipe(\r\n switchMap(initResult => {\r\n const translateService = injector.get(TranslateService);\r\n return forkJoin([\r\n translateService.get(\"en\"),\r\n translateService.reloadLang(\"ga\"),\r\n ]).pipe(\r\n map(() => initResult)\r\n );\r\n })\r\n ).toPromise();\r\n },\r\n deps: [AppConfigService, Injector],\r\n multi: true,\r\n },\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: MsalInterceptor,\r\n multi: true,\r\n },\r\n {\r\n provide: MSAL_INSTANCE,\r\n useFactory: MSALInstanceFactory,\r\n deps: [AppConfigService],\r\n },\r\n {\r\n provide: MSAL_GUARD_CONFIG,\r\n useFactory: MSALGuardConfigFactory,\r\n deps: [AppConfigService],\r\n },\r\n {\r\n provide: MSAL_INTERCEPTOR_CONFIG,\r\n useFactory: MSALInterceptorConfigFactory,\r\n deps: [AppConfigService],\r\n },\r\n MsalService,\r\n MsalGuard,\r\n MsalBroadcastService,\r\n ],\r\n bootstrap: [AppComponent],\r\n})\r\nexport class AppModule {}\r\n","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from './environments/environment';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nconst bootstrap = () => {\r\n const promise = platformBrowserDynamic()\r\n .bootstrapModule(AppModule);\r\n promise.catch(err => {\r\n console.error('BCR application bootstrap error', err);\r\n });\r\n};\r\n\r\nbootstrap();\r\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.custom-content {\n padding: 20px 0;\n}\n.col-sm-6:nth-of-type(1),\n.col-sm-6:nth-of-type(2) {\n padding-right: 15px;\n}\n.translate-wrapper div {\n margin: 20px 0px;\n}\n.translate-wrapper div p {\n margin-left: 30px;\n}\n.translate-wrapper div .translate-placeholder {\n position: absolute;\n right: 0px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.custom-content {\n padding: 20px 0;\n}\n.arrangements-top {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n}\n.arrangement-members {\n padding: 10px 0;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.day-instance-section-wraper {\n padding: 10px;\n border: 1px solid #d4cfbe;\n}\n.isEditMode {\n opacity: 0.5;\n pointer-events: none;\n}\n.custom-small-title {\n font-weight: bold;\n padding-top: 10px;\n}\n.col-sm-5:nth-of-type(1),\n.col-sm-5:nth-of-type(2) {\n padding-right: 15px;\n}\n.col-sm-10 {\n padding-right: 15px;\n}\n.day-template-custom-margins {\n margin-top: 10px;\n margin-bottom: 0;\n}\n.cdk-drag-preview {\n box-sizing: border-box;\n border-radius: 4px;\n box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n}\n.cdk-drag-placeholder {\n opacity: 0;\n}\n.cdk-drag-animating {\n transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\n.dragable-items.cdk-drop-list-dragging .drag-item:not(.cdk-drag-placeholder) {\n transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\n.day-instance-disabled input {\n pointer-events: none!important;\n background-color: #bfbbaa !important;\n border: 1px solid #bfbbaa !important;\n}\n.day-instance-disabled ::ng-deep oir-toggle {\n pointer-events: none;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.date-selector {\n max-width: 50%;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.req-title-trans-modal .modal-description:last-child {\n margin-bottom: 15px;\n}\n.req-title-trans-modal .translation-details {\n font-family: 'Montserrat-Light', sans-serif;\n margin-top: 10px;\n display: flex;\n justify-content: space-between;\n}\n.req-title-trans-modal form {\n padding-top: 20px;\n}\n.req-title-trans-modal form .trans-duedate-wrapper {\n max-width: 50%;\n}\n.req-title-trans-modal form .text-wrapper {\n width: 100%;\n margin-top: 20px;\n}\n.req-title-trans-modal form .text-wrapper textarea {\n width: 100%;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.dragable {\n display: flex;\n padding: 5px 0;\n}\n.dragable ::ng-deep oir-toggleable-accordion {\n width: 100%;\n}\n.dragable ::ng-deep oir-toggleable-accordion .toggle-accordion > .panel > .align-items > .header > .title {\n width: 95%;\n}\n.dragable ::ng-deep oir-toggleable-accordion .toggle-accordion > .panel > .align-items > .header > .buttons {\n width: 10%;\n}\n@media only screen and (max-width: 1450px) {\n .dragable ::ng-deep oir-toggleable-accordion .toggle-accordion > .panel > .align-items > .header > .title {\n width: 90%;\n }\n}\n.dragable .drag-element {\n min-width: 20px;\n}\n.dragable .drag-element img {\n position: relative;\n margin-top: 14px;\n}\n.dragable .section {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n}\n.dragable .section .section-front {\n margin-top: -2px;\n}\n.dragable .section .section-front img {\n position: relative;\n margin-top: 8px;\n vertical-align: -8px;\n margin-right: 10px;\n}\n.dragable .section .section-front .section-title {\n font-weight: bold;\n}\n.dragable .section .section-back {\n margin-top: -11px;\n}\n.dragable .accordion-button {\n line-height: 50px;\n min-width: 102px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.sections-form {\n padding: 20px 0;\n}\n.sections-form .section-buttons {\n display: flex;\n justify-content: flex-end;\n padding: 20px 0 0;\n}\n.sections-form .section-fixed-time {\n padding: 10px 0;\n}\n.sections-form .title-wrap {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: 10px 0;\n gap: 5px;\n}\n.sections-form .title-wrap .section-title {\n flex-grow: 1;\n}\n.sections-form .title-wrap .text-wrapper {\n display: block;\n}\n.sections-form .title-wrap .text-wrapper textarea {\n resize: vertical;\n min-width: 100%;\n min-height: 20px;\n}\n.sections-form .title-wrap .translation-labels {\n width: calc(50% - 5px);\n display: flex;\n justify-content: space-between;\n font-family: 'Montserrat-Light', sans-serif;\n padding-top: 10px;\n font-weight: bold;\n padding: 0;\n}\n.sections-form .title-wrap .translate-btn-wrapper {\n display: flex;\n flex-direction: row-reverse;\n padding-top: 10px;\n}\n.sections-form .flex-reverse {\n flex-direction: row-reverse;\n}\n.sections-form .time-wrap {\n display: flex;\n justify-content: space-between;\n padding: 10px 0;\n}\n.sections-form .time-wrap__start {\n width: 100%;\n padding: 0 10px 10px 0;\n}\n.sections-form .time-wrap__start .time-wrapper {\n width: 100%!important;\n}\n.sections-form .time-wrap__end {\n width: 100%;\n}\n.sections-form .time-wrap__end .time-wrapper {\n width: 100%!important;\n}\n.sections-form .section-duration {\n padding: 10px 0;\n}\n.sections-form .section-duration .text-wrapper {\n width: 49.5%;\n}\n.sections-form .section-details {\n padding: 10px 0;\n}\n.sections-form .section-details .text-wrapper {\n width: 100%;\n}\n.sections-form .section-details .text-wrapper textarea {\n width: 100%!important;\n}\n.sections-form .section-arrangements {\n padding: 10px 0;\n}\n.sections-form .section-arrangements .members-wrap {\n display: flex;\n justify-content: space-between;\n}\n.sections-form .section-arrangements .members-wrap__checkbox {\n margin-top: -5px;\n}\n.sections-form .section-arrangements .members-wrap__checkbox input {\n margin-left: 5px;\n}\n.sections-form .proposed-title {\n padding: 10px 0;\n}\n.sections-form .proposed-title .text-wrapper {\n width: 100%;\n}\n.sections-form .proposed-title .text-wrapper textarea {\n width: 100%!important;\n}\n.sections-form .section-dissenting {\n padding: 10px 0;\n}\n.sections-form .add-new-workitem {\n display: block;\n margin: 1rem 0;\n}\n.sections-form .translate-placeholder {\n padding-top: 10px;\n}\n.sections-form .translate-placeholder p {\n margin-left: 30px;\n}\n.dragable {\n display: flex !important;\n align-content: center;\n align-items: center;\n padding: 5px 0;\n}\n.dragable ::ng-deep oir-work-item-instance {\n width: 100%;\n}\n.dragable ::ng-deep oir-work-item-instance .instance {\n border: 1px solid #7F6C2E !important;\n border-left: 5px solid #b39841 !important;\n}\n.dragable .drag-element {\n width: 18px;\n}\n.dragable .drag-element img {\n position: relative;\n margin-top: 14px;\n}\n.cdk-drag-placeholder {\n opacity: 0;\n}\n.cdk-drag-animating {\n transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\n.dragable-items.cdk-drop-list-dragging .dragable:not(.cdk-drag-placeholder) {\n transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*----------------------------------------------------------------------------------------------Colors*/\n/*----------------------------------------------------------------------------------------------Fonts*/\n@font-face {\n font-family: 'WarnockPro-Regular';\n src: url('WarnockPro-Regular.52384534371887ec.eot');\n src: url('WarnockPro-Regular.a9452d76ab3cd12b.woff2') format('woff2'), url('WarnockPro-Regular.50ac2d396144917e.woff') format('woff'), url('WarnockPro-Regular.c6d2aa0f0a243b17.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Semibold';\n src: url('WarnockPro-Semibold.5527f98fac103e98.eot');\n src: url('WarnockPro-Semibold.fa72131c4b4d7de6.woff2') format('woff2'), url('WarnockPro-Semibold.e7a5d1af37c1939e.woff') format('woff'), url('WarnockPro-Semibold.885d23ffe51647f6.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Bold';\n src: url('WarnockPro-Bold.04ec19e8fb282a7b.eot');\n src: url('WarnockPro-Bold.ad38f222da689bec.woff2') format('woff2'), url('WarnockPro-Bold.8842adaf0ca2d562.woff') format('woff'), url('WarnockPro-Bold.d78b1b45fece0e2b.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Regular';\n src: url('Montserrat-Regular.ffbd8f1fc587e82c.eot');\n src: url('Montserrat-Regular.f8a9025f8c91e3fc.woff2') format('woff2'), url('Montserrat-Regular.8c695c68e4f07aed.woff') format('woff'), url('Montserrat-Regular.754afb352c33217a.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Light';\n src: url('Montserrat-Light.a2ae87bac8547b5a.eot');\n src: url('Montserrat-Light.197dc375564ff3f5.woff2') format('woff2'), url('Montserrat-Light.adfecf183cbc0770.woff') format('woff'), url('Montserrat-Light.b168e1b004117a18.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-LightItalic';\n src: url('Montserrat-LightItalic.0e2dcee9c4f449ee.eot');\n src: url('Montserrat-LightItalic.8ebf4be0febebcd4.woff2') format('woff2'), url('Montserrat-LightItalic.1efc114173f04d1a.woff') format('woff'), url('Montserrat-LightItalic.11cbdacc7818bdfb.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Bold';\n src: url('Montserrat-Bold.6118685eaf94ebc4.eot');\n src: url('Montserrat-Bold.cd47a5db97758adf.woff2') format('woff2'), url('Montserrat-Bold.201ea68b33787439.woff') format('woff'), url('Montserrat-Bold.76de74475d79c182.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Semibold';\n src: url('Montserrat-SemiBold.1f05f3c86ab2ee20.eot');\n src: url('Montserrat-SemiBold.430052671068fbd0.woff2') format('woff2'), url('Montserrat-SemiBold.d8107065216232d5.woff') format('woff'), url('Montserrat-SemiBold.611c7e7272a8a9c2.ttf') format('truetype');\n}\n.action-bar-email-modal {\n height: 500px;\n}\n.mail-group {\n width: 100%;\n margin-top: 20px;\n}\n.mail-group .subject-field {\n width: 100%;\n height: 37px;\n border: 1px solid #d4cfbe;\n outline: none;\n padding-left: 15px;\n}\n.mail-group .subject-body {\n width: 100%;\n height: 65px;\n border: 1px solid #d4cfbe;\n outline: none;\n padding-left: 15px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*----------------------------------------------------------------------------------------------Colors*/\n/*----------------------------------------------------------------------------------------------Fonts*/\n@font-face {\n font-family: 'WarnockPro-Regular';\n src: url('WarnockPro-Regular.52384534371887ec.eot');\n src: url('WarnockPro-Regular.a9452d76ab3cd12b.woff2') format('woff2'), url('WarnockPro-Regular.50ac2d396144917e.woff') format('woff'), url('WarnockPro-Regular.c6d2aa0f0a243b17.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Semibold';\n src: url('WarnockPro-Semibold.5527f98fac103e98.eot');\n src: url('WarnockPro-Semibold.fa72131c4b4d7de6.woff2') format('woff2'), url('WarnockPro-Semibold.e7a5d1af37c1939e.woff') format('woff'), url('WarnockPro-Semibold.885d23ffe51647f6.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Bold';\n src: url('WarnockPro-Bold.04ec19e8fb282a7b.eot');\n src: url('WarnockPro-Bold.ad38f222da689bec.woff2') format('woff2'), url('WarnockPro-Bold.8842adaf0ca2d562.woff') format('woff'), url('WarnockPro-Bold.d78b1b45fece0e2b.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Regular';\n src: url('Montserrat-Regular.ffbd8f1fc587e82c.eot');\n src: url('Montserrat-Regular.f8a9025f8c91e3fc.woff2') format('woff2'), url('Montserrat-Regular.8c695c68e4f07aed.woff') format('woff'), url('Montserrat-Regular.754afb352c33217a.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Light';\n src: url('Montserrat-Light.a2ae87bac8547b5a.eot');\n src: url('Montserrat-Light.197dc375564ff3f5.woff2') format('woff2'), url('Montserrat-Light.adfecf183cbc0770.woff') format('woff'), url('Montserrat-Light.b168e1b004117a18.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-LightItalic';\n src: url('Montserrat-LightItalic.0e2dcee9c4f449ee.eot');\n src: url('Montserrat-LightItalic.8ebf4be0febebcd4.woff2') format('woff2'), url('Montserrat-LightItalic.1efc114173f04d1a.woff') format('woff'), url('Montserrat-LightItalic.11cbdacc7818bdfb.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Bold';\n src: url('Montserrat-Bold.6118685eaf94ebc4.eot');\n src: url('Montserrat-Bold.cd47a5db97758adf.woff2') format('woff2'), url('Montserrat-Bold.201ea68b33787439.woff') format('woff'), url('Montserrat-Bold.76de74475d79c182.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Semibold';\n src: url('Montserrat-SemiBold.1f05f3c86ab2ee20.eot');\n src: url('Montserrat-SemiBold.430052671068fbd0.woff2') format('woff2'), url('Montserrat-SemiBold.d8107065216232d5.woff') format('woff'), url('Montserrat-SemiBold.611c7e7272a8a9c2.ttf') format('truetype');\n}\n.circulate-bcr-modal {\n height: 600px;\n}\n.mail-group {\n width: 100%;\n margin-top: 20px;\n}\n.mail-group .subject-field {\n width: 100%;\n height: 37px;\n border: 1px solid #d4cfbe;\n outline: none;\n padding-left: 15px;\n}\n.mail-group .subject-body {\n width: 100%;\n height: 65px;\n border: 1px solid #d4cfbe;\n outline: none;\n padding-left: 15px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.vs-copy-btn,\n.vs-print-btn,\n.vs-notify-btn,\n.vs-word-btn,\n.vs-email-btn {\n display: inline-block;\n height: 40px;\n width: 40px;\n border-radius: 25px;\n border: 2px solid #5e5e5e;\n background: #fff;\n margin: 0 10px 5px 10px;\n padding: 7.5px;\n text-align: center;\n}\n.vs-copy-btn:hover,\n.vs-print-btn:hover,\n.vs-notify-btn:hover,\n.vs-word-btn:hover,\n.vs-email-btn:hover {\n background-color: #b39841;\n border-color: #b39841;\n cursor: pointer;\n}\n.vs-copy-btn--ripple,\n.vs-print-btn--ripple,\n.vs-notify-btn--ripple,\n.vs-word-btn--ripple,\n.vs-email-btn--ripple {\n position: relative;\n overflow: hidden;\n}\n.vs-copy-btn img,\n.vs-print-btn img,\n.vs-notify-btn img,\n.vs-word-btn img,\n.vs-email-btn img {\n position: relative;\n width: 20px;\n height: 20px;\n}\n.vs-word-btn {\n padding: 0;\n}\n.vs-word-btn img {\n position: relative;\n width: 30px;\n height: 30px;\n}\n.report-dates {\n background-color: #fff;\n padding: 20px;\n display: flex;\n justify-content: space-between;\n}\n.report-dates .date-picker {\n width: 300px;\n}\n.report-dates .edit-btn {\n cursor: pointer;\n}\n.report-dates img {\n position: relative;\n}\n.report-ckEditor {\n background-color: #fff;\n padding: 20px;\n margin-top: 15px;\n margin-bottom: 25px;\n}\n.report-ckEditor ::ng-deep .ck-editor__editable {\n padding-bottom: 10px;\n}\n.report-ckEditor ::ng-deep .ck-editor__editable p {\n margin-bottom: 0;\n}\n.hide-elm {\n display: none;\n}\n::ng-deep mat-dialog-container {\n box-shadow: none !important;\n background-color: transparent !important;\n}\n[aria-label=\"Rich Text Editor, editor-1\"]:not(:nth-of-type(n+2)) {\n display: none;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.report-placholder {\n border: 1px solid #d4cfbc;\n border-left: 5px solid #b39841;\n padding: 25px;\n display: flex;\n justify-content: space-between;\n}\n.report-placholder .report-title {\n margin-left: 45px;\n vertical-align: -15px;\n}\n.previous-report__filter {\n display: flex;\n justify-content: space-between;\n}\n.previous-report__filter div {\n width: 47%;\n}\n.item-margin--basic {\n margin: 20px 0px 20px -20px;\n}\n.item-margin--advanced {\n margin: 20px 0px 20px 0px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element .ui-tabview {\n margin-left: 25px;\n}\n.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element .ui-tabview-top ul {\n padding-left: 0px;\n margin-bottom: 20px;\n border-bottom: 1px solid #d4cfbe;\n}\n.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element .ui-tabview-top ul li {\n display: inline-block;\n list-style: none;\n}\n.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element .ui-tabview-top ul li.ui-state-default {\n display: inline-block;\n height: auto;\n width: auto;\n padding: 20px 30px 15px 30px;\n background-color: white;\n background: none;\n color: #444;\n border: none;\n font-size: 15px;\n font-family: 'Montserrat-Regular', sans-serif;\n font-weight: bold;\n vertical-align: middle;\n text-align: center;\n}\n.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element .ui-tabview-top ul li.ui-state-default.ui-state-active {\n box-shadow: inset 0px -5px 0px 0px #b39841;\n}\n.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element .ui-tabview-top ul li :hover {\n text-decoration: none;\n}\n.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element .ui-tabview-top ul li a {\n text-decoration: none !important;\n color: #444 !important;\n}\n.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element .ui-tabview-top .ui-tabview-panel.ui-helper-hidden {\n display: none;\n}\n.tab-container .tab-container-finalise ::ng-deep .p-tabview p-component ::ng-deep p-element ::ng-deep oir-pagination ul {\n border-bottom: 0!important;\n}\n::ng-deep #pn_id_1_content > div > div > p-tabview > div > div.p-tabview-nav-container > div > ul,\n::ng-deep #pn_id_2_content > div > div > p-tabview > div > div.p-tabview-nav-container > div > ul {\n margin-left: 0;\n}\n::ng-deep #pn_id_1_content > div > div > p-tabview > div > div.p-tabview-nav-container > div,\n::ng-deep #pn_id_2_content > div > div > p-tabview > div > div.p-tabview-nav-container > div {\n margin-left: -25px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.outstanding-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px;\n margin-left: -20px;\n background-color: #f4f2ea;\n border-bottom: 1px solid #d4cfbe;\n}\n.outstanding-item:nth-child(2n) {\n background-color: #fff;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.close-day-acccordion {\n float: right;\n margin-bottom: 12px;\n}\n.heading-item-type {\n margin-top: 12px;\n}\n.flex-sections {\n display: flex;\n flex-direction: column;\n}\n.flex-sections > .gb-items {\n order: 1;\n}\n.flex-sections > .mwd-items {\n order: 2;\n}\n.flex-sections.swap > .gb-items {\n order: 2;\n}\n.flex-sections.swap > .mwd-items {\n order: 1;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.close-day-acccordion {\n float: right;\n margin-bottom: 12px;\n}\n.heading-item-type {\n margin-top: 12px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*----------------------------------------------------------------------------------------------Colors*/\n/*----------------------------------------------------------------------------------------------Fonts*/\n@font-face {\n font-family: 'WarnockPro-Regular';\n src: url('WarnockPro-Regular.52384534371887ec.eot');\n src: url('WarnockPro-Regular.a9452d76ab3cd12b.woff2') format('woff2'), url('WarnockPro-Regular.50ac2d396144917e.woff') format('woff'), url('WarnockPro-Regular.c6d2aa0f0a243b17.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Semibold';\n src: url('WarnockPro-Semibold.5527f98fac103e98.eot');\n src: url('WarnockPro-Semibold.fa72131c4b4d7de6.woff2') format('woff2'), url('WarnockPro-Semibold.e7a5d1af37c1939e.woff') format('woff'), url('WarnockPro-Semibold.885d23ffe51647f6.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Bold';\n src: url('WarnockPro-Bold.04ec19e8fb282a7b.eot');\n src: url('WarnockPro-Bold.ad38f222da689bec.woff2') format('woff2'), url('WarnockPro-Bold.8842adaf0ca2d562.woff') format('woff'), url('WarnockPro-Bold.d78b1b45fece0e2b.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Regular';\n src: url('Montserrat-Regular.ffbd8f1fc587e82c.eot');\n src: url('Montserrat-Regular.f8a9025f8c91e3fc.woff2') format('woff2'), url('Montserrat-Regular.8c695c68e4f07aed.woff') format('woff'), url('Montserrat-Regular.754afb352c33217a.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Light';\n src: url('Montserrat-Light.a2ae87bac8547b5a.eot');\n src: url('Montserrat-Light.197dc375564ff3f5.woff2') format('woff2'), url('Montserrat-Light.adfecf183cbc0770.woff') format('woff'), url('Montserrat-Light.b168e1b004117a18.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-LightItalic';\n src: url('Montserrat-LightItalic.0e2dcee9c4f449ee.eot');\n src: url('Montserrat-LightItalic.8ebf4be0febebcd4.woff2') format('woff2'), url('Montserrat-LightItalic.1efc114173f04d1a.woff') format('woff'), url('Montserrat-LightItalic.11cbdacc7818bdfb.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Bold';\n src: url('Montserrat-Bold.6118685eaf94ebc4.eot');\n src: url('Montserrat-Bold.cd47a5db97758adf.woff2') format('woff2'), url('Montserrat-Bold.201ea68b33787439.woff') format('woff'), url('Montserrat-Bold.76de74475d79c182.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Semibold';\n src: url('Montserrat-SemiBold.1f05f3c86ab2ee20.eot');\n src: url('Montserrat-SemiBold.430052671068fbd0.woff2') format('woff2'), url('Montserrat-SemiBold.d8107065216232d5.woff') format('woff'), url('Montserrat-SemiBold.611c7e7272a8a9c2.ttf') format('truetype');\n}\n.action-bar-email-modal-ob {\n height: 500px;\n}\n.mail-group {\n width: 100%;\n margin-top: 20px;\n}\n.mail-group .subject-field {\n width: 100%;\n height: 37px;\n border: 1px solid #d4cfbe;\n outline: none;\n padding-left: 15px;\n}\n.mail-group .subject-body {\n width: 100%;\n height: 65px;\n border: 1px solid #d4cfbe;\n outline: none;\n padding-left: 15px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*----------------------------------------------------------------------------------------------Colors*/\n/*----------------------------------------------------------------------------------------------Fonts*/\n@font-face {\n font-family: 'WarnockPro-Regular';\n src: url('WarnockPro-Regular.52384534371887ec.eot');\n src: url('WarnockPro-Regular.a9452d76ab3cd12b.woff2') format('woff2'), url('WarnockPro-Regular.50ac2d396144917e.woff') format('woff'), url('WarnockPro-Regular.c6d2aa0f0a243b17.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Semibold';\n src: url('WarnockPro-Semibold.5527f98fac103e98.eot');\n src: url('WarnockPro-Semibold.fa72131c4b4d7de6.woff2') format('woff2'), url('WarnockPro-Semibold.e7a5d1af37c1939e.woff') format('woff'), url('WarnockPro-Semibold.885d23ffe51647f6.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Bold';\n src: url('WarnockPro-Bold.04ec19e8fb282a7b.eot');\n src: url('WarnockPro-Bold.ad38f222da689bec.woff2') format('woff2'), url('WarnockPro-Bold.8842adaf0ca2d562.woff') format('woff'), url('WarnockPro-Bold.d78b1b45fece0e2b.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Regular';\n src: url('Montserrat-Regular.ffbd8f1fc587e82c.eot');\n src: url('Montserrat-Regular.f8a9025f8c91e3fc.woff2') format('woff2'), url('Montserrat-Regular.8c695c68e4f07aed.woff') format('woff'), url('Montserrat-Regular.754afb352c33217a.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Light';\n src: url('Montserrat-Light.a2ae87bac8547b5a.eot');\n src: url('Montserrat-Light.197dc375564ff3f5.woff2') format('woff2'), url('Montserrat-Light.adfecf183cbc0770.woff') format('woff'), url('Montserrat-Light.b168e1b004117a18.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-LightItalic';\n src: url('Montserrat-LightItalic.0e2dcee9c4f449ee.eot');\n src: url('Montserrat-LightItalic.8ebf4be0febebcd4.woff2') format('woff2'), url('Montserrat-LightItalic.1efc114173f04d1a.woff') format('woff'), url('Montserrat-LightItalic.11cbdacc7818bdfb.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Bold';\n src: url('Montserrat-Bold.6118685eaf94ebc4.eot');\n src: url('Montserrat-Bold.cd47a5db97758adf.woff2') format('woff2'), url('Montserrat-Bold.201ea68b33787439.woff') format('woff'), url('Montserrat-Bold.76de74475d79c182.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Semibold';\n src: url('Montserrat-SemiBold.1f05f3c86ab2ee20.eot');\n src: url('Montserrat-SemiBold.430052671068fbd0.woff2') format('woff2'), url('Montserrat-SemiBold.d8107065216232d5.woff') format('woff'), url('Montserrat-SemiBold.611c7e7272a8a9c2.ttf') format('truetype');\n}\n.circulate-modal {\n height: 600px;\n}\n.mail-group {\n width: 100%;\n margin-top: 20px;\n}\n.mail-group .subject-field {\n width: 100%;\n height: 37px;\n border: 1px solid #d4cfbe;\n outline: none;\n padding-left: 15px;\n}\n.mail-group .subject-body {\n width: 100%;\n height: 65px;\n border: 1px solid #d4cfbe;\n outline: none;\n padding-left: 15px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*----------------------------------------------------------------------------------------------Colors*/\n/*----------------------------------------------------------------------------------------------Fonts*/\n@font-face {\n font-family: 'WarnockPro-Regular';\n src: url('WarnockPro-Regular.52384534371887ec.eot');\n src: url('WarnockPro-Regular.a9452d76ab3cd12b.woff2') format('woff2'), url('WarnockPro-Regular.50ac2d396144917e.woff') format('woff'), url('WarnockPro-Regular.c6d2aa0f0a243b17.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Semibold';\n src: url('WarnockPro-Semibold.5527f98fac103e98.eot');\n src: url('WarnockPro-Semibold.fa72131c4b4d7de6.woff2') format('woff2'), url('WarnockPro-Semibold.e7a5d1af37c1939e.woff') format('woff'), url('WarnockPro-Semibold.885d23ffe51647f6.ttf') format('truetype');\n}\n@font-face {\n font-family: 'WarnockPro-Bold';\n src: url('WarnockPro-Bold.04ec19e8fb282a7b.eot');\n src: url('WarnockPro-Bold.ad38f222da689bec.woff2') format('woff2'), url('WarnockPro-Bold.8842adaf0ca2d562.woff') format('woff'), url('WarnockPro-Bold.d78b1b45fece0e2b.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Regular';\n src: url('Montserrat-Regular.ffbd8f1fc587e82c.eot');\n src: url('Montserrat-Regular.f8a9025f8c91e3fc.woff2') format('woff2'), url('Montserrat-Regular.8c695c68e4f07aed.woff') format('woff'), url('Montserrat-Regular.754afb352c33217a.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Light';\n src: url('Montserrat-Light.a2ae87bac8547b5a.eot');\n src: url('Montserrat-Light.197dc375564ff3f5.woff2') format('woff2'), url('Montserrat-Light.adfecf183cbc0770.woff') format('woff'), url('Montserrat-Light.b168e1b004117a18.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-LightItalic';\n src: url('Montserrat-LightItalic.0e2dcee9c4f449ee.eot');\n src: url('Montserrat-LightItalic.8ebf4be0febebcd4.woff2') format('woff2'), url('Montserrat-LightItalic.1efc114173f04d1a.woff') format('woff'), url('Montserrat-LightItalic.11cbdacc7818bdfb.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Bold';\n src: url('Montserrat-Bold.6118685eaf94ebc4.eot');\n src: url('Montserrat-Bold.cd47a5db97758adf.woff2') format('woff2'), url('Montserrat-Bold.201ea68b33787439.woff') format('woff'), url('Montserrat-Bold.76de74475d79c182.ttf') format('truetype');\n}\n@font-face {\n font-family: 'Montserrat-Semibold';\n src: url('Montserrat-SemiBold.1f05f3c86ab2ee20.eot');\n src: url('Montserrat-SemiBold.430052671068fbd0.woff2') format('woff2'), url('Montserrat-SemiBold.d8107065216232d5.woff') format('woff'), url('Montserrat-SemiBold.611c7e7272a8a9c2.ttf') format('truetype');\n}\n.vs-copy-btn,\n.vs-print-btn,\n.vs-notify-btn,\n.vs-email-btn {\n display: inline-block;\n height: 40px;\n width: 40px;\n border-radius: 25px;\n border: 2px solid #444444;\n background: #ffffff;\n margin: 0 10px 5px 10px;\n padding: 7.5px;\n text-align: center;\n}\n.vs-copy-btn:hover,\n.vs-print-btn:hover,\n.vs-notify-btn:hover,\n.vs-email-btn:hover {\n background-color: #b39841;\n border-color: #b39841;\n cursor: pointer;\n}\n.vs-copy-btn--ripple,\n.vs-print-btn--ripple,\n.vs-notify-btn--ripple,\n.vs-email-btn--ripple {\n position: relative;\n overflow: hidden;\n}\n.vs-copy-btn img,\n.vs-print-btn img,\n.vs-notify-btn img,\n.vs-email-btn img {\n position: relative;\n width: 20px;\n height: 20px;\n}\n.order-of-business-ckEditor {\n background-color: #ffffff;\n padding: 20px;\n margin-top: 15px;\n}\n.week-announcement,\n.week-proposed-arrangement {\n background-color: #ffffff;\n padding: 20px;\n margin-top: 15px;\n margin-bottom: 15px;\n}\n.week-announcement .day-items,\n.week-proposed-arrangement .day-items {\n border: 1px solid #cccccc;\n padding: 8px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.spinner-overlay {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-color: #000;\n transition: background-color 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);\n opacity: 0.75;\n z-index: 5;\n}\n#spinaroonie {\n position: absolute;\n top: calc(50% - 50px);\n left: calc(50% + 50px);\n z-index: 5;\n transform-origin: center;\n animation-name: spin;\n animation-duration: 1s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n@media print {\n .globals {\n display: none !important;\n }\n .body {\n overflow: visible !important;\n }\n :host ::ng-deep .app-container > .body .content {\n padding: 0 !important;\n margin: 0 !important;\n }\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.announcement-days .days-closeBtn {\n display: flex;\n justify-content: flex-end;\n padding: 10px 0;\n}\n.announcement-days .business-shall {\n padding: 5px 0;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.emailReportForm .emailReport-to,\n.emailReportForm .emailReport-cc,\n.emailReportForm .emailReport-bcc,\n.emailReportForm .emailReport-subject,\n.emailReportForm .emailReport-body {\n padding: 20px 0;\n}\n.emailReportForm .emailReport-subject .text-wrapper {\n width: 100%;\n}\n.emailReportForm .emailReport-body .text-wrapper {\n width: 100%;\n}\n.emailReportForm .emailReport-body .text-wrapper textarea {\n width: 100%;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.vs-copy-btn,\n.vs-print-btn,\n.vs-notify-btn,\n.vs-email-btn {\n display: inline-block;\n height: 40px;\n width: 40px;\n border-radius: 25px;\n border: 2px solid #5e5e5e;\n background: #fff;\n margin: 0 10px 5px 10px;\n padding: 7.5px;\n text-align: center;\n}\n.vs-copy-btn:hover,\n.vs-print-btn:hover,\n.vs-notify-btn:hover,\n.vs-email-btn:hover {\n background-color: #b39841;\n border-color: #b39841;\n cursor: pointer;\n}\n.vs-copy-btn--ripple,\n.vs-print-btn--ripple,\n.vs-notify-btn--ripple,\n.vs-email-btn--ripple {\n position: relative;\n overflow: hidden;\n}\n.vs-copy-btn img,\n.vs-print-btn img,\n.vs-notify-btn img,\n.vs-email-btn img {\n position: relative;\n width: 20px;\n height: 20px;\n}\n.rapporteur-report .rapporteurNotes,\n.rapporteur-report .rapporteur,\n.rapporteur-report .rapporteur-announcement,\n.rapporteur-report .days-arrangements,\n.rapporteur-report .report-note {\n padding: 20px 0;\n}\n.rapporteur-report .days-arrangements .days-section {\n padding: 5px;\n border: 1px solid #d4cfbe;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.advanced-filter {\n border-bottom: 1px solid #d4cfbe;\n border-top: 1px solid #d4cfbe;\n}\n.col-sm-1:nth-of-type(1),\n.col-sm-1:nth-of-type(2) {\n padding-left: 15px;\n}\n.col-sm-6:nth-of-type(2) {\n padding-left: 15px;\n}\n.advanced-filter-tags {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 0;\n}\n.search-arrangement {\n padding: 10px;\n height: 40px;\n}\n.report-placholder {\n border: 1px solid #d4cfbc;\n border-left: 5px solid #b39841;\n padding: 20px;\n display: flex;\n justify-content: space-between;\n margin: 20px 0;\n}\n.report-placholder .report-title {\n margin-left: 45px;\n vertical-align: -15px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.custom-toggle-accordion-wrapper {\n padding: 5px 0;\n}\n.custom-toggle-accordion {\n width: calc(100% - 20px);\n position: relative;\n margin-left: 20px;\n background-color: #f4f2ea;\n}\n.custom-toggle-accordion > .panel {\n margin: 5px 25px 0px 25px;\n border: none;\n width: auto;\n background-color: transparent;\n}\n.custom-toggle-accordion > .panel > .align-items {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n}\n.custom-toggle-accordion > .panel > .align-items > .header {\n height: 50px;\n line-height: 50px;\n vertical-align: middle;\n background-color: #f4f2ea;\n}\n.custom-toggle-accordion > .panel > .align-items > .header > .title {\n display: inline-block;\n margin-left: 20px;\n margin-top: 10px;\n vertical-align: middle;\n font-weight: bold;\n}\n.custom-toggle-accordion > .panel > .align-items > .header > .open-left {\n display: inline-block;\n vertical-align: middle;\n height: 24px;\n width: 24px;\n background-size: 24px;\n}\n.custom-toggle-accordion .section {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n}\n.custom-toggle-accordion .section .section-front {\n margin-top: -2px;\n}\n.custom-toggle-accordion .section .section-front img {\n position: relative;\n margin-top: 8px;\n vertical-align: -8px;\n margin-right: 10px;\n}\n.custom-toggle-accordion .section .section-front .section-title {\n font-weight: bold;\n}\n.custom-toggle-accordion .section .section-back {\n margin-top: -11px;\n}\n.custom-toggle-accordion .accordion-button {\n line-height: 50px;\n min-width: 102px;\n}\n.custom-toggle-accordion .align-items .header button {\n background-color: transparent;\n outline: none;\n border: none;\n transform: translate(0, 0);\n}\n.custom-toggle-accordion .align-items .header button:hover,\n.custom-toggle-accordion .align-items .header button:active,\n.custom-toggle-accordion .align-items .header button:focus {\n outline: 1px solid;\n outline: auto -webkit-focus-ring-color;\n outline-color: #b39841;\n}\n.custom-toggle-accordion .panel > .align-items > .header > .title {\n width: 95%;\n}\n.custom-toggle-accordion .panel > .align-items > .header > .buttons {\n width: 10%;\n}\n@media only screen and (max-width: 1450px) {\n .custom-toggle-accordion .panel > .align-items > .header > .title {\n width: 90%;\n }\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.modal-dialog-container {\n position: fixed;\n top: 50%;\n left: 50%;\n opacity: 0;\n z-index: -1;\n}\n.modal-dialog-container.visible {\n opacity: 1;\n z-index: 50;\n}\n.modal-dialog-container.scrollable .modal-dialog {\n max-height: 800px;\n overflow-y: auto;\n}\n.modal-dialog-container.modal-lrg .modal-dialog {\n width: 775px !important;\n margin-left: -387px !important;\n}\n.modal-dialog-container.modal-xlrg .modal-dialog {\n width: 975px !important;\n margin-left: -487px !important;\n}\n.modal-dialog-container .modal-dialog {\n position: relative;\n min-height: 200px;\n width: 550px;\n margin-left: -275px;\n padding: 20px;\n background-color: #ffffff;\n border: 3px solid #7F6C2E;\n padding-left: 30px;\n display: block;\n margin-bottom: 0px;\n}\n.modal-dialog-container .modal-dialog.suprise {\n margin-bottom: -10000px;\n}\n.modal-dialog-container .modal-dialog h2 {\n margin-top: 0;\n}\n.modal-dialog-container .modal-dialog .modal-body {\n padding: 0;\n margin-bottom: 34px;\n}\n.modal-dialog-container .modal-dialog > .close-dialog {\n position: absolute;\n top: 0;\n margin-top: 20px;\n right: 0;\n margin-right: 20px;\n height: 24px;\n width: 24px;\n background-image: url('hover-x.51d99dd21ec0e20c.svg');\n background-position: 99% 3%;\n background-repeat: no-repeat;\n}\n.modal-dialog-container .modal-dialog > .close-dialog:hover {\n background-image: url('unselected-x.94f7db39b7176d24.svg');\n cursor: pointer;\n}\n.modal-dialog-container .modal-dialog .buttons {\n text-align: right;\n}\n.modal-dialog-container .modal-dialog .buttons button {\n text-align: center;\n margin-left: 10px;\n}\n.modal-dialog-container .modal-dialog .buttons .modal-buttons {\n display: inline-block;\n}\n.modal-dialog-container .modal-dialog > #final-modal-item {\n padding-bottom: 60px;\n}\n.modal-dialog-container .modalOverflow {\n overflow-y: scroll;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.select-body-container .options-container .option-container .text {\n margin-left: 0;\n}\n.select-body-container .options-container .option-container.selected {\n color: #ffffff;\n background-color: #7F6C2E;\n}\n.select-body-container .options-container .heading.selectable:hover {\n background-color: #7F6C2E !important;\n}\n.select-body-container .options-container .heading.selectable:hover span {\n color: #ffffff;\n}\n.increaseZIndex {\n z-index: 11;\n}\nngbdropdown {\n outline: 1px solid;\n outline: auto -webkit-focus-ring-color;\n outline-color: #b39841;\n border: none;\n}\nbutton {\n min-height: 40px;\n background-color: #ffffff;\n border: 1px solid #d4cfbc;\n padding: 8px 11px 8px 11px;\n font-family: Montserrat-Light;\n font-size: 15px;\n position: relative;\n width: 100%;\n text-align: left;\n border-radius: 0px;\n}\n.dropdown-menu button {\n border: none;\n}\n.dropdown-menu .dropdown-item-search:focus,\n.dropdown-menu .dropdown-item-search:active {\n border: 1px solid #7F6C2E !important;\n outline: none !important;\n scrollbar-shadow-color: 0px 0px !important;\n}\n.dropdown-menu .select-all:focus,\n.dropdown-menu .select-all:active {\n border: none !important;\n outline: none !important;\n scrollbar-shadow-color: 0px 0px !important;\n}\n.dropdown-menu .select-all button:focus,\n.dropdown-menu .select-all button:active {\n border: none !important;\n outline: none !important;\n scrollbar-shadow-color: 0px 0px !important;\n}\n.dropdown-item:hover:not(.disabled):not(.select-all),\n.dropdown-item:active:not(.disabled):not(.select-all),\n.dropdown-item:focus:not(.disabled):not(.select-all) {\n color: #ffffff;\n background-color: #7F6C2E !important;\n width: 100%;\n}\n.dropdown-item:hover:not(.disabled):not(.select-all) .select-all-btn,\n.dropdown-item:active:not(.disabled):not(.select-all) .select-all-btn,\n.dropdown-item:focus:not(.disabled):not(.select-all) .select-all-btn {\n color: #ffffff;\n}\n.dropdown-toggle {\n text-align: left;\n border: 1px solid #d4cfbc;\n outline: none;\n box-shadow: none;\n border-radius: none !important;\n min-height: 40px;\n}\n.dropdown-menu {\n padding: 0px;\n margin: 0px;\n width: 100%;\n border-radius: 0px;\n border-top: none;\n max-height: 500px;\n overflow-y: scroll;\n margin-bottom: 85px;\n z-index: 11;\n}\n.dropdown-toggle-placeholder {\n color: #777;\n background-color: #ffffff;\n width: 100%;\n border-radius: 0px !important;\n}\n.collapse {\n display: block;\n width: 23px;\n height: 23px;\n float: right;\n background-image: url('closed-chev-big.847c1b52d4b4a306.svg');\n min-height: auto;\n}\n.collapse.active {\n background-image: url('open-chev-big.f05d398ec6e57c90.svg');\n}\n.collapse:hover {\n cursor: pointer;\n}\n.clear-input {\n position: absolute;\n z-index: 5;\n bottom: 5px;\n right: 40px;\n height: 24px;\n width: 24px;\n background-image: url('cross.94f7db39b7176d24.svg');\n background-repeat: no-repeat;\n background-position: center;\n visibility: hidden;\n}\n.clear-input:hover {\n background-image: url('cross-hover.51d99dd21ec0e20c.svg');\n cursor: pointer;\n}\nbutton:hover:not(.disabled) {\n cursor: pointer;\n}\nbutton:hover:not(.disabled) .clear-input {\n visibility: visible;\n}\n.dropdown-item {\n margin: 0px;\n}\n.dropdown-item-search {\n padding-right: 35px;\n}\n.dropdown-item-search-container .dropdown-item-search {\n width: 100%;\n}\n.dropdown-item-search-container {\n width: 100%;\n height: 65px;\n padding: 15px 10px 10px;\n}\n.dropdown-menu .heading {\n color: #b39841;\n}\n.dropdown-menu .selectable:focus,\n.dropdown-menu .selectable:active,\n.dropdown-menu .selectable:hover {\n color: white;\n}\n.checkbox {\n padding-left: 10px;\n}\n.checkbox .check {\n width: 16px;\n height: 16px;\n background-image: url('off-check.b27a559404abf43a.svg');\n background-position: left;\n background-size: cover;\n position: absolute;\n}\n.checkbox .check.checked {\n background-image: url('on-check.dcb1a0af428956b0.svg');\n}\n.checkbox .text:not(.select-all-btn) {\n margin-left: 28px;\n}\n.checkbox.headingtext .text:not(.select-all-btn) {\n margin-left: 0px;\n}\n.select-all-text {\n display: block;\n left: 27px;\n position: relative;\n top: -2px;\n}\n.pills-container {\n margin-top: 4px;\n display: inline-block;\n width: 95%;\n}\n.pills-container .pill {\n width: auto;\n float: left;\n background-color: #7F6C2E;\n padding: 4px 8px 4px 8px;\n opacity: 1;\n margin-right: 5px;\n transition: opacity 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);\n min-height: auto;\n white-space: normal;\n}\n.pills-container .pill span {\n color: #ffffff;\n}\n.pills-container .pill .remove {\n display: inline-block;\n background-image: url('dropdown-x.d3c3408902547efd.svg');\n background-size: cover;\n width: 15px;\n height: 15px;\n vertical-align: middle;\n margin-bottom: 3px;\n margin-left: 8px;\n}\n.pills-container .pill.animate {\n opacity: 0;\n}\n.pills-container .pill:focus,\n.pills-container .pill:active,\n.pills-container .pill:hover {\n background-color: #f4f2ea;\n}\n.pills-container .pill:focus span,\n.pills-container .pill:active span,\n.pills-container .pill:hover span {\n color: #7F6C2E !important;\n}\n.pills-container .pill:focus .remove,\n.pills-container .pill:active .remove,\n.pills-container .pill:hover .remove {\n background-image: url('hover-x.51d99dd21ec0e20c.svg');\n}\n#dropdownMultiSelect {\n padding: 4px 11px 4px 11px;\n width: 100%;\n}\n#dropdownMultiSelect .placeHolderText {\n width: calc(100% - 23px) !important;\n}\n.select-all-btn,\n.clear-selected {\n color: #b39841;\n}\n.select-all-btn {\n margin-left: 0px;\n width: 80%;\n}\n.select-all {\n height: 40px;\n}\n::ng-deep .dropdown-menu .checkbox .select-all {\n height: 40px;\n padding: 8px 11px 8px 11px;\n}\n.checkbox button {\n width: unset;\n padding: 0px;\n border: none;\n height: 18px;\n}\n.clear-selected {\n margin-right: 10px;\n float: right;\n width: auto;\n}\n.clear-selected:hover,\n.clear-selected:active,\n.clear-selected:focus {\n color: #685925;\n border: none;\n outline: none;\n box-shadow: 0px 0px;\n}\n.select-all .select-all-btn:hover,\n.select-all .select-all-btn:active,\n.select-all .select-all-btn:focus {\n color: #685925;\n border: none;\n outline: none;\n box-shadow: 0px 0px;\n}\n.chev {\n outline: none;\n border: none;\n}\n.multi-select-chev {\n top: 4px;\n}\n.placeHolderText {\n margin-top: 5px;\n display: inline-block;\n color: #777777;\n font-family: Montserrat-Light;\n font-size: 15px;\n width: 140px;\n float: left;\n}\n.headingtext .text {\n color: #b39841;\n transform: translate(0, 0);\n margin-left: 0px;\n}\n.headingtext:hover,\n.headingtext:active,\n.headingtext:focus {\n outline: none !important;\n border: none !important;\n box-shadow: none !important;\n cursor: default !important;\n}\n.dropdown ::ng-deep .dropdown-toggle.disabled {\n cursor: default !important;\n}\n::ng-deep oir-multiselect.invalid .dropdown-toggle {\n background-color: #ffe5e9 !important;\n border: 1px solid #c30e2e !important;\n}\n::ng-deep oir-multiselect.invalid .dropdown-toggle .pills-container {\n background-color: #ffe5e9 !important;\n font-family: Montserrat-Light !important;\n}\n::ng-deep oir-multiselect.invalid .dropdown-toggle .collapse {\n background-color: #ffe5e9 !important;\n}\n.button-options-container {\n max-height: 435px;\n overflow-y: scroll;\n width: 100%;\n}\n.remove-scroll {\n max-height: unset !important;\n overflow-y: hidden !important;\n}\n.button-options-container-with-select {\n max-height: 395px;\n overflow-y: scroll;\n width: 100%;\n}\n.button-options-container-with-select-no-search {\n max-height: 460px;\n overflow-y: scroll;\n width: 100%;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.typeahead-container {\n background-color: white;\n}\n.select-body-container .options-container .option-container .text {\n margin-left: 0;\n}\n.select-body-container .options-container .option-container.selected {\n color: #ffffff;\n background-color: #7F6C2E;\n}\n.select-body-container .options-container .heading.selectable:hover {\n background-color: #7F6C2E !important;\n}\n.select-body-container .options-container .heading.selectable:hover span {\n color: #ffffff;\n}\n.dropdown-menu button {\n min-height: 42px;\n}\nbutton:focus,\nbutton:active,\nngbdropdown {\n border: 1px solid #d4cfbc;\n outline: none !important;\n scrollbar-shadow-color: 0px 0px !important;\n color: #333;\n}\nbutton {\n width: 40px;\n background-color: #ffffff;\n border: 1px solid #d4cfbc;\n padding: 8px 11px 8px 11px;\n font-family: Montserrat-Light;\n font-size: 15px;\n position: relative;\n width: 100%;\n text-align: left;\n border-radius: 0px;\n margin-top: 0px;\n margin-bottom: 0px;\n}\n.dropdown-menu button {\n border: none;\n}\n.dropdown-menu .dropdown-item-search:focus,\n.dropdown-menu .dropdown-item-search:active {\n border: 1px solid #7F6C2E !important;\n outline: none !important;\n scrollbar-shadow-color: 0px 0px !important;\n}\n.dropdown-menu .select-all:focus,\n.dropdown-menu .select-all:active {\n border: none !important;\n outline: none !important;\n scrollbar-shadow-color: 0px 0px !important;\n}\n.dropdown-menu .select-all button:focus,\n.dropdown-menu .select-all button:active {\n border: none !important;\n outline: none !important;\n scrollbar-shadow-color: 0px 0px !important;\n}\n.dropdown-item:hover:not(.disabled):not(.select-all),\n.dropdown-item:active:not(.disabled):not(.select-all),\n.dropdown-item:focus:not(.disabled):not(.select-all) {\n color: #ffffff;\n background-color: #7F6C2E !important;\n width: 100%;\n}\n.dropdown-item:hover:not(.disabled):not(.select-all) .select-all-btn,\n.dropdown-item:active:not(.disabled):not(.select-all) .select-all-btn,\n.dropdown-item:focus:not(.disabled):not(.select-all) .select-all-btn {\n color: #ffffff;\n}\n.dropdown-menu {\n padding: 0px;\n margin: 0px;\n width: 100%;\n margin-bottom: 85px;\n border-radius: 0px;\n max-height: 508px;\n border-top: 0px;\n overflow-y: scroll;\n}\n.dropdown-toggle-placeholder {\n color: #777;\n}\n.dropdown-toggle {\n text-align: left;\n border: 1px solid #d4cfbc;\n outline: none;\n box-shadow: none;\n border-radius: none !important;\n min-height: 40px;\n width: 100%;\n border-radius: 0px;\n}\n.collapse {\n display: block;\n width: 23px;\n height: 23px;\n float: right;\n background-image: url('open-chev-big.f05d398ec6e57c90.svg');\n}\n.collapse.active {\n background-image: url('closed-chev-big.847c1b52d4b4a306.svg');\n}\n.collapse:hover {\n cursor: pointer;\n}\n.clear-input {\n position: absolute;\n z-index: 5;\n bottom: 5px;\n right: 40px;\n height: 24px;\n width: 24px;\n background-image: url('cross.94f7db39b7176d24.svg');\n background-repeat: no-repeat;\n background-position: center;\n visibility: hidden;\n}\n.clear-input:hover {\n background-image: url('cross-hover.51d99dd21ec0e20c.svg');\n cursor: pointer;\n}\nbutton:hover:not(.disabled) {\n cursor: pointer;\n}\nbutton:hover:not(.disabled) .clear-input {\n visibility: visible;\n}\n.dropdown-item-search-container .dropdown-item-search {\n width: 100%;\n}\n.dropdown-item-search-container {\n width: 100%;\n height: 65px;\n padding: 15px 10px 10px;\n}\n.dropdown-menu .heading {\n color: #b39841;\n}\n.dropdown-menu .selectable:focus,\n.dropdown-menu .selectable:active,\n.dropdown-menu .selectable:hover {\n color: white;\n}\n.checkbox .check {\n width: 16px;\n height: 16px;\n background-image: url('off-check.b27a559404abf43a.svg');\n background-position: left;\n background-size: cover;\n position: absolute;\n}\n.checkbox .check.checked {\n background-image: url('on-check.dcb1a0af428956b0.svg');\n}\n.checkbox .text {\n margin-left: 8px;\n}\n.pills-container {\n display: block;\n width: 100%;\n}\n.pills-container .pill {\n margin-top: 4px;\n width: auto;\n float: left;\n background-color: #7F6C2E;\n padding: 4px 8px 4px 8px;\n opacity: 1;\n min-height: 30px;\n margin-right: 5px;\n transition: opacity 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);\n white-space: normal;\n word-break: break-word;\n}\n.pills-container .pill span {\n color: #ffffff;\n}\n.pills-container .pill .remove {\n display: inline-block;\n background-image: url('dropdown-x.d3c3408902547efd.svg');\n background-size: cover;\n width: 15px;\n height: 15px;\n vertical-align: middle;\n margin-bottom: 3px;\n margin-left: 8px;\n}\n.pills-container .pill.animate {\n opacity: 0;\n}\n.pills-container .pill:focus,\n.pills-container .pill:active,\n.pills-container .pill:hover {\n background-color: #f4f2ea;\n}\n.pills-container .pill:focus span,\n.pills-container .pill:active span,\n.pills-container .pill:hover span {\n color: #7F6C2E !important;\n}\n.pills-container .pill:focus .remove,\n.pills-container .pill:active .remove,\n.pills-container .pill:hover .remove {\n background-image: url('hover-x.51d99dd21ec0e20c.svg');\n}\n.pillsInput {\n float: left;\n height: 37px;\n}\n#dropdownMultiSelect {\n padding: 0px;\n padding-left: 8px;\n padding-right: 8px;\n}\n#dropdownMultiSelectRte {\n padding: 0px;\n}\n.select-all-btn,\n.clear-selected {\n color: #b39841;\n}\n.checkbox button {\n width: unset;\n padding: 0px;\n border: none;\n height: 18px;\n}\n.clear-selected {\n margin-right: 10px;\n float: right;\n}\n.clear-selected:hover,\n.clear-selected:active,\n.clear-selected:focus {\n color: #000000;\n border: none;\n outline: none;\n box-shadow: 0px 0px;\n}\n.select-all .select-all-btn:hover,\n.select-all .select-all-btn:active,\n.select-all .select-all-btn:focus {\n color: #d4cfbc;\n border: none;\n outline: none;\n box-shadow: 0px 0px;\n}\ninput[type=\"text\"] {\n min-width: 250px;\n font-size: 15px;\n font-family: Montserrat-Light;\n padding-left: 8px;\n outline: none;\n border: none;\n padding-top: 8px;\n background-color: transparent;\n display: inline-block;\n vertical-align: top;\n padding-bottom: 8px;\n}\ninput[type=\"text\"].full-width {\n width: 100%;\n}\ninput[type=\"text\"]::-ms-clear {\n display: none;\n}\n.dropdown .btn[disabled] {\n opacity: 1;\n}\n.spinner {\n position: absolute;\n height: 24px;\n width: 24px;\n top: 6px;\n right: 8px;\n animation: rotating 2s linear infinite;\n background-image: url('oir-spinner-small.38258953cb4050d3.svg');\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n opacity: 0;\n margin-top: 5px;\n}\n.spinner.active {\n -webkit-animation: rotation 0.7s infinite linear;\n opacity: 1;\n}\n::ng-deep oir-typeahead.invalid .dropdown-toggle {\n background-color: #ffe5e9 !important;\n border: 1px solid #c30e2e !important;\n}\n::ng-deep oir-typeahead.invalid .dropdown-toggle .pills-container {\n background-color: #ffe5e9 !important;\n font-family: Montserrat-Light !important;\n}\n::ng-deep oir-typeahead.invalid .dropdown-toggle .collapse {\n background-color: #ffe5e9 !important;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.datepicker {\n position: relative;\n font-family: Montserrat-Light;\n font-size: 15px;\n}\n.datepicker :-ms-input-placeholder {\n color: #777;\n}\n.datepicker.invalid {\n background-color: #ffe5e9;\n border: 1px solid #c30e2e;\n}\n.datepicker.invalid .input {\n background-color: #ffe5e9;\n color: #c30e2e;\n}\n.datepicker .clear-input {\n position: absolute;\n z-index: 5;\n bottom: 5px;\n right: 40px;\n height: 24px;\n width: 24px;\n background-image: url('cross.94f7db39b7176d24.svg');\n background-repeat: no-repeat;\n background-position: center;\n visibility: hidden;\n}\n.datepicker .clear-input:hover {\n background-image: url('cross-hover.51d99dd21ec0e20c.svg');\n cursor: pointer;\n}\n.datepicker .input {\n height: 40px;\n background-color: #ffffff;\n border: 1px solid #d4cfbe;\n padding: 8px 11px 8px 11px;\n font-family: Montserrat-Light;\n font-size: 15px;\n position: relative;\n}\n.datepicker .input input {\n background-color: transparent;\n width: 100%;\n border: none;\n outline: none;\n cursor: inherit;\n}\n.datepicker .input input::-ms-clear {\n display: none;\n}\n.datepicker .input .button {\n transition: background-image 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);\n position: absolute;\n top: 8px;\n right: 11px;\n background-image: url('unselected-cal.e059ca7647f9d3ba.svg');\n border: none;\n height: 24px;\n width: 24px;\n}\n.datepicker .input .button.active {\n background-image: url('selected-cal.9603b1f4a14fbef4.svg');\n}\n.datepicker .input:hover:not(.disabled) {\n cursor: pointer;\n}\n.datepicker .input:hover:not(.disabled) .button {\n transition: background-image 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);\n background-image: url('selected-cal.9603b1f4a14fbef4.svg');\n}\n.datepicker .input:hover:not(.disabled) .clear-input {\n visibility: visible;\n}\n.datepicker .input.disabled {\n background-color: #f4f2ea;\n}\n.datepicker .calendar {\n z-index: 11;\n position: absolute;\n left: 0;\n width: 310px;\n min-height: 315px;\n background-color: #ffffff;\n margin-bottom: 80px;\n}\n.datepicker .calendar.visible {\n display: block;\n z-index: 20;\n}\n.datepicker .calendar .calendar-head {\n -webkit-user-select: none;\n user-select: none;\n}\n.datepicker .calendar .calendar-head .circle {\n display: inline-block;\n width: 30px;\n height: 30px;\n background-color: #b39841;\n color: #ffffff;\n border-radius: 15px;\n position: relative;\n}\n.datepicker .calendar .calendar-head .circle .icon {\n width: 10px;\n height: 10px;\n position: absolute;\n left: 11px;\n top: 10px;\n border: 2px solid #ffffff;\n border-bottom: none;\n border-right: none;\n transform: rotate(-45deg);\n}\n.datepicker .calendar .calendar-head .circle .icon.fwd {\n left: 7px;\n transform: rotate(135deg);\n}\n.datepicker .calendar .calendar-head .circle:hover,\n.datepicker .calendar .calendar-head .circle:focus,\n.datepicker .calendar .calendar-head .circle:active {\n cursor: pointer;\n background-color: #f4f2ea;\n}\n.datepicker .calendar .calendar-head .circle:hover .icon,\n.datepicker .calendar .calendar-head .circle:focus .icon,\n.datepicker .calendar .calendar-head .circle:active .icon {\n border-color: #b39841;\n}\n.datepicker .calendar .calendar-head .title {\n padding-top: 2px;\n width: 100%;\n display: inline-block;\n vertical-align: top;\n text-align: center;\n font-family: Montserrat-Semibold;\n font-size: 20px;\n font-weight: 600;\n color: #b39841;\n margin-bottom: 3px;\n}\n.datepicker .calendar .calendar-body {\n font-family: Montserrat-Light;\n color: #444444;\n font-size: 15px;\n border-top: solid 1.5px #5e5e5e;\n margin: 7px 2px 0px 2px;\n padding: 12px 2px 0 0;\n}\n.datepicker .calendar .calendar-body .day-label-container .day-label {\n width: 38px;\n height: 34px;\n text-align: center;\n float: left;\n margin: 0 2px 1px 0;\n}\n.datepicker .calendar .calendar-body .box-container .box {\n padding-top: 6px;\n width: 38px;\n height: 38px;\n background-color: #f4f2ea;\n border: 1px solid #F9F8F4;\n float: left;\n margin: 0 2px 1px 0;\n text-align: center;\n}\n.datepicker .calendar .calendar-body .box-container .box:hover {\n background-color: #b39841;\n border-color: #ffffff;\n color: #ffffff;\n cursor: pointer;\n}\n.datepicker .calendar .calendar-body .box-container .box.active {\n background-color: #b39841;\n border-color: #ffffff;\n color: #ffffff;\n}\n.datepicker .calendar .calendar-body .box-container .box.disabled {\n background-color: #f4f2ea;\n border: 1px solid #F9F8F4;\n color: #999999;\n}\n.datepicker ::ng-deep .dropdown-menu {\n max-height: 300px;\n overflow-y: scroll;\n margin: 0px;\n padding: 0px;\n top: 26px;\n}\n.datepicker ::ng-deep option:hover,\n.datepicker ::ng-deep option:focus,\n.datepicker ::ng-deep option:active {\n background-color: red !important;\n}\n.datepicker ::ng-deep .ngb-dp-header {\n display: none !important;\n}\n.datepicker ::ng-deep ngb-datepicker {\n border: none !important;\n padding: 1rem;\n}\n.datepicker ::ng-deep ngb-datepicker {\n top: 37px !important;\n left: 0px !important;\n}\n.datepicker ::ng-deep ngb-datepicker-month-view {\n width: 310px;\n min-height: 315px;\n padding: 9px 11px 14px 11px;\n background-color: #ffffff;\n}\n.datepicker ::ng-deep ngb-datepicker-month-view .ngb-dp-arrow {\n font-weight: 400;\n color: #b39841;\n border-radius: 0;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .ngb-dp-week ::ng-deep .ngb-dp-day {\n height: 38px;\n width: 38px;\n background-color: #f4f2ea;\n margin: 0 3px 2px 0;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .ngb-dp-week ::ng-deep .ngb-dp-day ::ng-deep .btn-light {\n height: 38px;\n width: 38px;\n display: table-cell;\n vertical-align: middle;\n text-align: center;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .ngb-dp-week ::ng-deep .ngb-dp-day ::ng-deep .btn-light:hover,\n.datepicker .btn-light.range {\n background-color: #7F6C2E;\n color: #ffffff;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .ngb-dp-week ::ng-deep .ngb-dp-day ::ng-deep .btn-light:focus {\n background-color: #b39841;\n color: #ffffff;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .ngb-dp-week ::ng-deep .ngb-dp-day ::ng-deep .btn-light.faded {\n background-color: #b39841;\n color: #ffffff;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .ngb-dp-week ::ng-deep .ngb-dp-day ::ng-deep .btn-light.text-muted {\n color: #999;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .ngb-dp-week ::ng-deep .ngb-dp-weekday {\n height: 30px;\n width: 40px;\n font-family: Montserrat-Light;\n color: #444444;\n font-size: 15px;\n font-style: normal;\n}\n.datepicker ::ng-deep ngb-datepicker-navigation {\n height: 40px;\n margin-bottom: 10px;\n}\n.datepicker ::ng-deep ngb-datepicker-month-view ::ng-deep .ngb-dp-weekdays {\n border-bottom: none !important;\n border-top: solid 1.5px #d4cfbe !important;\n padding-top: 10px !important;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep ngb-datepicker-navigation ::ng-deep :focus {\n box-shadow: none !important;\n outline: none !important;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .ngb-dp-months ::ng-deep :focus {\n outline-color: #b39841;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep select {\n border: 1px solid #d4cfbc;\n background-color: #ffffff;\n min-height: 40px;\n padding: 0 30px 0 9px;\n display: flex;\n position: relative;\n cursor: pointer;\n font-family: Montserrat-Light;\n font-size: 15px !important;\n color: #444444;\n width: 100%;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep ngb-datepicker-navigation {\n margin-top: 20px;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep ngb-datep icker-navigation-select ::ng-deep select:nth-child(1) {\n margin-right: 10px !important;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep ngb-datepicker-navigation-select ::ng-deep select:focus {\n border: 1px solid #b39841 !important;\n}\n.datepicker ::ng-deep ngb-datepicker ::ng-deep .bg-primary {\n color: white;\n background-color: #b39841;\n}\n.ngb-dp-arrow {\n font-weight: 400;\n color: #b39841;\n border-radius: 0;\n}\n.ngb-dp-arrow {\n display: inline-block;\n width: 30px !important;\n height: 30px !important;\n background-color: #b39841;\n color: #ffffff;\n border-radius: 15px;\n position: relative;\n flex: unset !important;\n margin-left: 10px !important;\n margin-right: 10px !important;\n outline: none !important;\n box-shadow: none !important;\n}\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /* IE10+ CSS styles go here */\n .ngb-dp-arrow {\n flex-grow: 0 !important;\n }\n}\n.ngb-dp-arrow button {\n height: 30px !important;\n width: 30px !important;\n border-radius: 15px !important;\n margin: 0px !important;\n}\n.ngb-dp-arrow button {\n color: #ffffff;\n}\n.ngb-dp-arrow button:focus {\n color: #b39841;\n background-color: #f4f2ea;\n}\n.ngb-dp-arrow button:hover {\n color: #b39841;\n background-color: #f4f2ea;\n}\n.datepicker ::ng-deep select:-moz-focusring {\n color: transparent;\n text-shadow: 0 0 0 #000;\n}\n.datepicker ::ng-deep select:focus::-ms-value {\n color: #444444;\n background-color: transparent;\n}\n.datepicker ::ng-deep select {\n -webkit-appearance: none;\n -moz-appearance: none;\n outline: none;\n display: inline-block;\n height: 40px;\n background-color: #ffffff;\n border: 1px solid #d4cfbe;\n padding-left: 15px;\n padding-right: 40px;\n background-image: url('closed-chev-big.847c1b52d4b4a306.svg');\n background-position: right 9px top 7px;\n background-repeat: no-repeat;\n font-family: \"Montserrat-Light\", sans-serif;\n font-size: 15px;\n}\n.datepicker ::ng-deep select.disabled,\n.datepicker ::ng-deep select[disabled] {\n background-color: #bfbbaa;\n border-color: #bfbbaa;\n color: #777777;\n background-image: url('closed-chev-big-disabled.1ee371182a4805cb.svg');\n}\n.datepicker ::ng-deep select ::ng-deep option {\n outline: none;\n padding: 5px;\n border: 1px solid #d4cfbe;\n background-color: #ffffff;\n font-size: 15px;\n font-family: \"Montserrat-Light\", sans-serif;\n}\n::ng-deep .ngb-dp-weekdays {\n border-bottom: none !important;\n}\n.calendar-head {\n background-color: white;\n width: 312px;\n border: 1px solid #dfdfdf;\n border-bottom: none !important;\n}\n.calender-navigate {\n height: 35px;\n margin-top: 10px;\n}\n.calender-navigate.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.calendar-month {\n margin: 1rem 1rem 0;\n height: 25px;\n border-bottom: 1px solid #dfdfdf;\n padding-bottom: 1rem;\n width: auto;\n height: 36px;\n line-height: 2rem;\n display: flex;\n}\n.inline-div {\n display: inline-block;\n}\n.calender-navigate ::ng-deep .show {\n display: inline-block !important;\n}\n.calender-navigate .dropdown-menu {\n display: inline-block !important;\n min-width: 100px;\n left: 10px;\n top: 34px;\n}\n.d-inline-block ::ng-deep .dropdown {\n display: inline-block;\n}\n.d-inline-block ::ng-deep .dropdown ::ng-deep button {\n border-radius: 0px;\n background-color: white;\n border: 1px solid #d4cfbc;\n width: 90px;\n margin-right: 5px;\n margin-left: 10px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 15px;\n}\n.d-inline-block ::ng-deep .dropdown-menu ::ng-deep button {\n width: 100%;\n margin: 0px;\n height: 34px;\n border: none;\n text-align: left;\n padding-left: 12px;\n}\n.d-inline-block ::ng-deep .dropdown-menu ::ng-deep button:hover,\n.d-inline-block ::ng-deep .dropdown-menu ::ng-deep button:active,\n.d-inline-block ::ng-deep .dropdown-menu ::ng-deep button:focus,\n.d-inline-block ::ng-deep .dropdown-menu ::ng-deep button.selected {\n background-color: #7F6C2E;\n color: white;\n}\n::ng-deep .dropdown-toggle {\n outline: none !important;\n box-shadow: none !important;\n}\n.d-inline-block ::ng-deep ::ng-deep .dropdown-toggle:hover,\n.d-inline-block ::ng-deep ::ng-deep .dropdown-toggle:active,\n.d-inline-block ::ng-deep ::ng-deep .dropdown-toggle:focus {\n border: 1px solid #7F6C2E !important;\n}\n.calender-navigate .circle:hover,\n.calender-navigate .circle:focus,\n.calender-navigate .circle:active {\n outline: none !important;\n box-shadow: none !important;\n}\n.dropdown-menu {\n opacity: 0;\n z-index: -20;\n}\n.inline-div .showDropDown {\n opacity: 1;\n z-index: 20;\n}\n.collapse {\n display: block;\n width: 23px;\n height: 23px;\n float: right;\n background-image: url('closed-chev-big.847c1b52d4b4a306.svg');\n}\n.collapse.active {\n background-image: url('open-chev-big.f05d398ec6e57c90.svg');\n}\n.collapse:hover {\n cursor: pointer;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.collapsible-container .collapsible-heading-container {\n position: relative;\n}\n.collapsible-container .collapsible-heading-container .arrow {\n background-image: url('closed-chev-big.847c1b52d4b4a306.svg');\n width: 24px;\n height: 24px;\n position: absolute;\n top: 0;\n right: 0;\n transform: rotate(180deg);\n}\n.collapsible-container .collapsible-heading-container .arrow:hover {\n cursor: pointer;\n}\n.collapsible-container .collapsible-content-container {\n max-height: 100%;\n position: relative;\n}\n.collapsible-container .collapsible-content-container .scroll-top {\n position: absolute;\n right: -2px;\n bottom: -25px;\n transform: rotate(-90deg);\n width: 52px;\n height: 52px;\n background-image: url('filled-chev-up.11c94d73d6cc8e53.svg');\n}\n.collapsible-container .collapsible-content-container .scroll-top:hover {\n cursor: pointer;\n}\n.collapsible-container.collapsed .collapsible-heading-container .arrow {\n transform: none;\n}\n.collapsible-container.collapsed .collapsible-content-container {\n overflow: hidden;\n max-height: 0;\n}\n.collapsible-container.collapsed .scroll-top {\n display: none;\n}\n.collapsible-container .arrow {\n outline: 0;\n text-shadow: none;\n}\n.collapsible-container .arrow:hover,\n.collapsible-container .arrow:focus,\n.collapsible-container .arrow:active {\n outline: 1px solid;\n outline: auto -webkit-focus-ring-color;\n outline-color: #b39841;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `::ng-deep .toggle-accordion {\n position: relative;\n background-color: #f4f2ea;\n}\n::ng-deep .toggle-accordion > .panel {\n margin: 5px 25px 0px 25px;\n border: none;\n width: auto;\n background-color: transparent;\n}\n::ng-deep .toggle-accordion > .panel > .align-items {\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header {\n height: 50px;\n line-height: 50px;\n vertical-align: middle;\n background-color: #f4f2ea;\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header > p {\n display: inline-block;\n margin-left: 20px;\n margin-top: 10px;\n vertical-align: middle;\n font-weight: bold;\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header > .open-left {\n display: inline-block;\n vertical-align: middle;\n height: 24px;\n width: 24px;\n background-image: url('unfilled-plus.12cf3c2da4d95201.svg');\n background-size: 24px;\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header > .close-left {\n display: inline-block;\n vertical-align: middle;\n height: 24px;\n width: 24px;\n background-image: url('unfilled-circle-x.8122d2f1408175c5.svg');\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header > .close-left p#italics {\n font-weight: 300;\n font-style: italic;\n margin-left: 15px;\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header.opened,\n::ng-deep .toggle-accordion > .panel > .align-items .buttons.opened {\n border-bottom: 2px solid #d4cfbe;\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header.opened > p,\n::ng-deep .toggle-accordion > .panel > .align-items .buttons.opened > p {\n display: inline-block;\n margin-left: 20px;\n margin-top: 10px;\n vertical-align: middle;\n font-weight: bold;\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header.opened > .open-left,\n::ng-deep .toggle-accordion > .panel > .align-items .buttons.opened > .open-left {\n display: inline-block;\n vertical-align: middle;\n height: 24px;\n width: 24px;\n background-image: url('unfilled-plus.12cf3c2da4d95201.svg');\n background-size: 24px;\n}\n::ng-deep .toggle-accordion > .panel > .align-items > .header.opened > .close-left,\n::ng-deep .toggle-accordion > .panel > .align-items .buttons.opened > .close-left {\n display: inline-block;\n vertical-align: middle;\n height: 24px;\n width: 24px;\n background-image: url('unfilled-circle-x.8122d2f1408175c5.svg');\n}\n::ng-deep .toggle-accordion.disabled,\n::ng-deep .toggle-accordion[disabled] {\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)\";\n filter: alpha(opacity=40);\n opacity: 0.4;\n}\n::ng-deep .toggle-accordion.disabled:hover,\n::ng-deep .toggle-accordion[disabled]:hover {\n cursor: no-drop;\n}\n::ng-deep .toggle-accordion.sub-accordion {\n background-color: #ece9dd;\n border-color: #d4cfbc;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel {\n background-color: #ece9dd;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .header {\n background-color: #ece9dd;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .header .close-left {\n background-image: url('close-circle.ce4097ed45dc398c.svg') !important;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .header .open-left {\n background-image: url('filled-plus.aa94d5102baa64cc.svg') !important;\n background-size: 24px;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .body {\n background-color: #ece9dd !important;\n padding: 0px;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .body .accordion-body .witness-time,\n::ng-deep .toggle-accordion.sub-accordion .panel .body .accordion-body .facilities-time {\n margin-bottom: 15px;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .body .accordion-body .witness-time .time .divider-text,\n::ng-deep .toggle-accordion.sub-accordion .panel .body .accordion-body .facilities-time .time .divider-text {\n vertical-align: middle;\n margin-top: 0px;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .body .accordion-body .buttons-row {\n padding: 15px 0px 30px 0px;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .body .accordion-body .buttons-row .buttons {\n text-align: right;\n}\n::ng-deep .toggle-accordion.sub-accordion .panel .body .accordion-body .buttons-row .buttons button {\n text-align: center;\n}\n::ng-deep .toggle-accordion .panel .align-items .header:hover {\n cursor: pointer;\n}\n::ng-deep .toggle-accordion .panel .body {\n background-color: #f4f2ea;\n overflow: visible;\n}\n::ng-deep .toggle-accordion .align-items .header button {\n background-color: transparent;\n outline: none;\n border: none;\n transform: translate(0, 0);\n}\n::ng-deep .toggle-accordion .align-items .header button:hover,\n::ng-deep .toggle-accordion .align-items .header button:active,\n::ng-deep .toggle-accordion .align-items .header button:focus {\n outline: 1px solid;\n outline: auto -webkit-focus-ring-color;\n outline-color: #b39841;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.arrangements-top {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n}\n.arrangement-members {\n padding: 10px 0;\n}\n::ng-deep oir-work-item-form > div > div > oir-toggleable-accordion > div > div > div.body > div > div,\n.section-work-item-type {\n display: block;\n margin: 1rem 0;\n}\n.referral-bills-toggle {\n margin-left: 10px;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `::ng-deep .instance {\n background-color: #ffffff;\n}\n::ng-deep .outstanding-work-item .instance {\n border-left: 5px solid #7F6C2E !important;\n}\n.amendment-label {\n color: #b39841;\n}\n.instance-button {\n display: flex;\n flex-direction: row;\n}\n`, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","var map = {\n\t\"./af\": 5637,\n\t\"./af.js\": 5637,\n\t\"./ar\": 6777,\n\t\"./ar-dz\": 4508,\n\t\"./ar-dz.js\": 4508,\n\t\"./ar-kw\": 7504,\n\t\"./ar-kw.js\": 7504,\n\t\"./ar-ly\": 5373,\n\t\"./ar-ly.js\": 5373,\n\t\"./ar-ma\": 2412,\n\t\"./ar-ma.js\": 2412,\n\t\"./ar-ps\": 8823,\n\t\"./ar-ps.js\": 8823,\n\t\"./ar-sa\": 6670,\n\t\"./ar-sa.js\": 6670,\n\t\"./ar-tn\": 6448,\n\t\"./ar-tn.js\": 6448,\n\t\"./ar.js\": 6777,\n\t\"./az\": 3009,\n\t\"./az.js\": 3009,\n\t\"./be\": 8299,\n\t\"./be.js\": 8299,\n\t\"./bg\": 4685,\n\t\"./bg.js\": 4685,\n\t\"./bm\": 1171,\n\t\"./bm.js\": 1171,\n\t\"./bn\": 3590,\n\t\"./bn-bd\": 5841,\n\t\"./bn-bd.js\": 5841,\n\t\"./bn.js\": 3590,\n\t\"./bo\": 4309,\n\t\"./bo.js\": 4309,\n\t\"./br\": 4130,\n\t\"./br.js\": 4130,\n\t\"./bs\": 8033,\n\t\"./bs.js\": 8033,\n\t\"./ca\": 5294,\n\t\"./ca.js\": 5294,\n\t\"./cs\": 3028,\n\t\"./cs.js\": 3028,\n\t\"./cv\": 5807,\n\t\"./cv.js\": 5807,\n\t\"./cy\": 342,\n\t\"./cy.js\": 342,\n\t\"./da\": 8269,\n\t\"./da.js\": 8269,\n\t\"./de\": 1489,\n\t\"./de-at\": 2123,\n\t\"./de-at.js\": 2123,\n\t\"./de-ch\": 7757,\n\t\"./de-ch.js\": 7757,\n\t\"./de.js\": 1489,\n\t\"./dv\": 8152,\n\t\"./dv.js\": 8152,\n\t\"./el\": 7687,\n\t\"./el.js\": 7687,\n\t\"./en-au\": 6668,\n\t\"./en-au.js\": 6668,\n\t\"./en-ca\": 6798,\n\t\"./en-ca.js\": 6798,\n\t\"./en-gb\": 3615,\n\t\"./en-gb.js\": 3615,\n\t\"./en-ie\": 1364,\n\t\"./en-ie.js\": 1364,\n\t\"./en-il\": 9907,\n\t\"./en-il.js\": 9907,\n\t\"./en-in\": 533,\n\t\"./en-in.js\": 533,\n\t\"./en-nz\": 3190,\n\t\"./en-nz.js\": 3190,\n\t\"./en-sg\": 1096,\n\t\"./en-sg.js\": 1096,\n\t\"./eo\": 3962,\n\t\"./eo.js\": 3962,\n\t\"./es\": 7726,\n\t\"./es-do\": 5010,\n\t\"./es-do.js\": 5010,\n\t\"./es-mx\": 3654,\n\t\"./es-mx.js\": 3654,\n\t\"./es-us\": 9043,\n\t\"./es-us.js\": 9043,\n\t\"./es.js\": 7726,\n\t\"./et\": 5343,\n\t\"./et.js\": 5343,\n\t\"./eu\": 728,\n\t\"./eu.js\": 728,\n\t\"./fa\": 787,\n\t\"./fa.js\": 787,\n\t\"./fi\": 1771,\n\t\"./fi.js\": 1771,\n\t\"./fil\": 5335,\n\t\"./fil.js\": 5335,\n\t\"./fo\": 9761,\n\t\"./fo.js\": 9761,\n\t\"./fr\": 1670,\n\t\"./fr-ca\": 8991,\n\t\"./fr-ca.js\": 8991,\n\t\"./fr-ch\": 7280,\n\t\"./fr-ch.js\": 7280,\n\t\"./fr.js\": 1670,\n\t\"./fy\": 4203,\n\t\"./fy.js\": 4203,\n\t\"./ga\": 9858,\n\t\"./ga.js\": 9858,\n\t\"./gd\": 8605,\n\t\"./gd.js\": 8605,\n\t\"./gl\": 7365,\n\t\"./gl.js\": 7365,\n\t\"./gom-deva\": 3896,\n\t\"./gom-deva.js\": 3896,\n\t\"./gom-latn\": 5587,\n\t\"./gom-latn.js\": 5587,\n\t\"./gu\": 7950,\n\t\"./gu.js\": 7950,\n\t\"./he\": 2029,\n\t\"./he.js\": 2029,\n\t\"./hi\": 1897,\n\t\"./hi.js\": 1897,\n\t\"./hr\": 9816,\n\t\"./hr.js\": 9816,\n\t\"./hu\": 2253,\n\t\"./hu.js\": 2253,\n\t\"./hy-am\": 8196,\n\t\"./hy-am.js\": 8196,\n\t\"./id\": 1307,\n\t\"./id.js\": 1307,\n\t\"./is\": 5474,\n\t\"./is.js\": 5474,\n\t\"./it\": 3099,\n\t\"./it-ch\": 8188,\n\t\"./it-ch.js\": 8188,\n\t\"./it.js\": 3099,\n\t\"./ja\": 9127,\n\t\"./ja.js\": 9127,\n\t\"./jv\": 182,\n\t\"./jv.js\": 182,\n\t\"./ka\": 758,\n\t\"./ka.js\": 758,\n\t\"./kk\": 3444,\n\t\"./kk.js\": 3444,\n\t\"./km\": 2034,\n\t\"./km.js\": 2034,\n\t\"./kn\": 6223,\n\t\"./kn.js\": 6223,\n\t\"./ko\": 3064,\n\t\"./ko.js\": 3064,\n\t\"./ku\": 8714,\n\t\"./ku-kmr\": 961,\n\t\"./ku-kmr.js\": 961,\n\t\"./ku.js\": 8714,\n\t\"./ky\": 2062,\n\t\"./ky.js\": 2062,\n\t\"./lb\": 4796,\n\t\"./lb.js\": 4796,\n\t\"./lo\": 9279,\n\t\"./lo.js\": 9279,\n\t\"./lt\": 106,\n\t\"./lt.js\": 106,\n\t\"./lv\": 1840,\n\t\"./lv.js\": 1840,\n\t\"./me\": 2240,\n\t\"./me.js\": 2240,\n\t\"./mi\": 3588,\n\t\"./mi.js\": 3588,\n\t\"./mk\": 5518,\n\t\"./mk.js\": 5518,\n\t\"./ml\": 7823,\n\t\"./ml.js\": 7823,\n\t\"./mn\": 8657,\n\t\"./mn.js\": 8657,\n\t\"./mr\": 1285,\n\t\"./mr.js\": 1285,\n\t\"./ms\": 3014,\n\t\"./ms-my\": 6253,\n\t\"./ms-my.js\": 6253,\n\t\"./ms.js\": 3014,\n\t\"./mt\": 167,\n\t\"./mt.js\": 167,\n\t\"./my\": 7940,\n\t\"./my.js\": 7940,\n\t\"./nb\": 14,\n\t\"./nb.js\": 14,\n\t\"./ne\": 9023,\n\t\"./ne.js\": 9023,\n\t\"./nl\": 4208,\n\t\"./nl-be\": 1412,\n\t\"./nl-be.js\": 1412,\n\t\"./nl.js\": 4208,\n\t\"./nn\": 1354,\n\t\"./nn.js\": 1354,\n\t\"./oc-lnc\": 870,\n\t\"./oc-lnc.js\": 870,\n\t\"./pa-in\": 389,\n\t\"./pa-in.js\": 389,\n\t\"./pl\": 7342,\n\t\"./pl.js\": 7342,\n\t\"./pt\": 4774,\n\t\"./pt-br\": 3003,\n\t\"./pt-br.js\": 3003,\n\t\"./pt.js\": 4774,\n\t\"./ro\": 5333,\n\t\"./ro.js\": 5333,\n\t\"./ru\": 3451,\n\t\"./ru.js\": 3451,\n\t\"./sd\": 3921,\n\t\"./sd.js\": 3921,\n\t\"./se\": 9682,\n\t\"./se.js\": 9682,\n\t\"./si\": 582,\n\t\"./si.js\": 582,\n\t\"./sk\": 4348,\n\t\"./sk.js\": 4348,\n\t\"./sl\": 5337,\n\t\"./sl.js\": 5337,\n\t\"./sq\": 9358,\n\t\"./sq.js\": 9358,\n\t\"./sr\": 683,\n\t\"./sr-cyrl\": 9382,\n\t\"./sr-cyrl.js\": 9382,\n\t\"./sr.js\": 683,\n\t\"./ss\": 1156,\n\t\"./ss.js\": 1156,\n\t\"./sv\": 9855,\n\t\"./sv.js\": 9855,\n\t\"./sw\": 8536,\n\t\"./sw.js\": 8536,\n\t\"./ta\": 7754,\n\t\"./ta.js\": 7754,\n\t\"./te\": 7809,\n\t\"./te.js\": 7809,\n\t\"./tet\": 1297,\n\t\"./tet.js\": 1297,\n\t\"./tg\": 2527,\n\t\"./tg.js\": 2527,\n\t\"./th\": 5862,\n\t\"./th.js\": 5862,\n\t\"./tk\": 9331,\n\t\"./tk.js\": 9331,\n\t\"./tl-ph\": 4387,\n\t\"./tl-ph.js\": 4387,\n\t\"./tlh\": 3592,\n\t\"./tlh.js\": 3592,\n\t\"./tr\": 9732,\n\t\"./tr.js\": 9732,\n\t\"./tzl\": 9570,\n\t\"./tzl.js\": 9570,\n\t\"./tzm\": 3553,\n\t\"./tzm-latn\": 80,\n\t\"./tzm-latn.js\": 80,\n\t\"./tzm.js\": 3553,\n\t\"./ug-cn\": 5674,\n\t\"./ug-cn.js\": 5674,\n\t\"./uk\": 9974,\n\t\"./uk.js\": 9974,\n\t\"./ur\": 5773,\n\t\"./ur.js\": 5773,\n\t\"./uz\": 357,\n\t\"./uz-latn\": 7135,\n\t\"./uz-latn.js\": 7135,\n\t\"./uz.js\": 357,\n\t\"./vi\": 43,\n\t\"./vi.js\": 43,\n\t\"./x-pseudo\": 767,\n\t\"./x-pseudo.js\": 767,\n\t\"./yo\": 150,\n\t\"./yo.js\": 150,\n\t\"./zh-cn\": 1828,\n\t\"./zh-cn.js\": 1828,\n\t\"./zh-hk\": 6644,\n\t\"./zh-hk.js\": 6644,\n\t\"./zh-mo\": 9305,\n\t\"./zh-mo.js\": 9305,\n\t\"./zh-tw\": 1860,\n\t\"./zh-tw.js\": 1860\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 5358;"],"x_google_ignoreList":[105]}