{"version":3,"sources":["app.module.js","admin/admin.module.js","alerts/alerts.module.js","book/book.module.js","categoryIcons/categoryIcons.module.js","checklists/checklists.module.js","community/community.module.js","completions/completions.module.js","completionTypes/completionTypes.module.js","core/core.module.js","dailyLogs/dailyLogs.module.js","dailySetup/dailySetup.module.js","dashboard/dashboard.module.js","departments/departments.module.js","eventDisplay/eventDisplay.module.js","eventDisplay/eventDisplayApp.module.js","filterTypes/filterTypes.module.js","floorPlans/floorPlans.module.js","help/help.module.js","helpText/helpText.module.js","iCal/iCal.module.js","layout/layout.module.js","legal/legal.module.js","logTypes/logTypes.module.js","lostAndFound/lostAndFound.module.js","notes/notes.module.js","notesReportSchedule/notesReportSchedule.module.js","opsConfig/opsConfig.module.js","paymentGateways/paymentGateway.module.js","paymentTemplates/paymentTemplate.module.js","paymentTransactions/paymentTransactions.module.js","promos/promos.module.js","promotionalImages/promotionalImages.module.js","reports/reports.module.js","surveys/surveys.module.js","tasks/tasks.module.js","tenantReporting/tenantReporting.module.js","tenants/tenants.module.js","users/users.module.js","widgets/widgets.module.js","blocks/auth/auth.module.js","blocks/backendHubProxy/backendHubProxy.module.js","blocks/exception/exception.module.js","blocks/filters/filters.module.js","blocks/logger/logger.module.js","blocks/notifications/notifier.module.js","blocks/router/router.module.js","admin/admin.controller.js","admin/admin.route.js","alerts/alertDetails.controller.js","alerts/alerts.controller.js","alerts/alerts.route.js","alerts/alertsList.controller.js","alerts/alertsTemplates.controller.js","alerts/alertTemplateDetails.controller.js","book/book.controller.js","book/book.route.js","book/sp-book.directive.js","categoryIcons/categoryIcons.route.js","categoryIcons/categoryIconsList.controller.js","checklists/checklistDetail.controller.js","checklists/checklists.controller.js","checklists/checklists.route.js","community/community.route.js","community/topicDetails.controller.js","community/topicDisplay.controller.js","community/topicsList.controller.js","completions/completions.dialog.js","completions/completions.factory.js","completions/completions.service.js","completions/completionsCell.directive.js","completions/completionsData.service.js","completionTypes/completionTypeDetails.controller.js","completionTypes/completionTypes.route.js","completionTypes/completionTypesList.controller.js","core/ajaxInterceptor.js","core/attachment.service.js","core/bootstrap.dialog.js","core/common.js","core/config.js","core/constants.js","core/core.route.js","core/dataservice.js","core/fileDownloader.js","core/sp-antiforgery.directive.js","dailyLogs/dailyLogs.controller.js","dailyLogs/dailyLogs.route.js","dailyLogs/dailyLogsEntry.controller.js","dailyLogs/entry.dialog.js","dailyLogs/logEntryView.dialog.js","dailySetup/dailySetup.route.js","dailySetup/reactDailySetup.controller.js","dashboard/dashboard.controller.js","dashboard/dashboard.route.js","departments/departmentDetails.controller.js","departments/departments.route.js","departments/departmentsList.controller.js","dialogs/bookingHistory.dialog.js","dialogs/bookingInProgress.dialog.js","dialogs/carousel.dialog.js","dialogs/onCarouselChange.directive.js","dialogs/survey.dialog.js","eventDisplay/eventDisplay.controller.js","eventDisplay/eventDisplay.route.js","eventDisplay/eventDisplay.service.js","eventDisplay/eventDisplayDetails.controller.js","eventDisplay/eventDisplayList.controller.js","filterTypes/filterTypeDetails.controller.js","filterTypes/filterTypes.route.js","filterTypes/filterTypesList.controller.js","floorPlans/floorPlanDetails.controller.js","floorPlans/floorPlans.route.js","floorPlans/floorPlansList.controller.js","help/help.controller.js","help/help.route.js","helpText/helpText.factory.js","helpText/helpText.route.js","helpText/helpTextDetails.controller.js","helpText/helpTextList.controller.js","iCal/iCal.route.js","iCal/iCalDetails.controller.js","iCal/iCalList.controller.js","layout/filters.controller.js","layout/navRoutes.factory.js","layout/shell.controller.js","layout/sidebar.controller.js","layout/sp-bind-html-compile.directive.js","layout/sp-sidebar.directive.js","layout/sp-top-nav.directive.js","layout/topNav.controller.js","legal/legal.route.js","login/login.controller.js","login/login.route.js","login/logout.controller.js","login/resetPassword.controller.js","logTypes/logTypes.route.js","logTypes/logTypesDetails.controller.js","logTypes/logTypesGroupingDetails.controller.js","logTypes/logTypesGroupingsList.controller.js","logTypes/logTypesList.controller.js","lostAndFound/lostAndFound.route.js","lostAndFound/lostAndFoundDetails.controller.js","lostAndFound/lostAndFoundList.controller.js","notes/notes.dialog.js","notes/notes.factory.js","notes/notesCell.directive.js","notes/notesData.service.js","notesReportSchedule/notesReportSchedule.route.js","notesReportSchedule/notesReportScheduleDetails.controller.js","opsConfig/opsConfig.controller.js","opsConfig/opsConfig.route.js","paymentGateways/paymentGateway.route.js","paymentGateways/paymentGatewayDetails.controller.js","paymentGateways/paymentGatewayList.controller.js","paymentTemplates/paymentTemplate.route.js","paymentTemplates/paymentTemplateDetails.controller.js","paymentTemplates/paymentTemplateError.controller.js","paymentTemplates/paymentTemplateList.controller.js","paymentTemplates/paymentTemplatePay.controller.js","paymentTemplates/paymentTemplateReceipt.controller.js","paymentTransactions/paymentTransactions.route.js","paymentTransactions/paymentTransactionsList.controller.js","promos/promoDetail.controller.js","promos/promos.route.js","promotionalImages/promotionalImageDetails.controller.js","promotionalImages/promotionalImages.route.js","promotionalImages/promotionalImagesList.controller.js","react/sp-eventsTable.directive.js","react/spReactComps.js","reports/exportToExcel.factory.js","reports/reportFileBuilder.factory.js","reports/reports.route.js","reports/reportsList.controller.js","surveys/surveyDetails.controller.js","surveys/surveyList.controller.js","surveys/surveyResults.controller.js","surveys/surveys.route.js","tasks/linkedTaskDialog.controller.js","tasks/taskCells.directive.js","tasks/taskDetails.controller.js","tasks/tasks.controller.js","tasks/tasks.route.js","tasks/tasksList.controller.js","tasks/tasksTemplates.controller.js","tasks/taskTemplateDetails.controller.js","tenantReporting/tenantReporting.route.js","tenantReporting/tenantReports.controller.js","tenants/tenantDetails.controller.js","tenants/tenants.route.js","tenants/tenantsList.controller.js","users/userDetails.controller.js","users/userEditDialog.controller.js","users/users.route.js","users/usersList.controller.js","widgets/sp-compareTo.directive.js","widgets/sp-count-box.directive.js","widgets/sp-widget-header.directive.js","widgets/sp-widget-minimize.directive.js","blocks/auth/auth.dataService.js","blocks/auth/auth.interceptor.js","blocks/auth/userService.js","blocks/backendHubProxy/backendHubProxy.js","blocks/directives/directives.modules.js","blocks/directives/sp-checkboxList.directive.js","blocks/directives/sp-formAutoFillFix.directive.js","blocks/directives/sp-helpText.directive.js","blocks/directives/sp-timePicker.directive.js","blocks/directives/st-reset-search.directive.js","blocks/directives/st-show-inactive.directive.js","blocks/directives/st-show-past-events.directive.js","blocks/exception/exception-handler.provider.js","blocks/exception/exception.js","blocks/filters/boolToYes.filter.js","blocks/filters/noteDateDisplay.filter.js","blocks/filters/utcToLocal.filter.js","blocks/filters/utcToLocalTime.filter.js","blocks/logger/logger.js","blocks/notifications/notifier.js","blocks/router/router-helper.provider.js","reports/analytics/completionsByRangeReport.controller.js","reports/eventCompletions/eventCompletionsReport.controller.js","reports/notes/dailyNotesReport.controller.js","reports/dailyLogs/dailyLogsReport.controller.js"],"names":["angular","module","AdminController","common","dataservice","vm","this","title","alertCount","userCount","taskCount","logTypeCount","completionTypeCount","filterTypeCount","departmentCount","taskTemplateCount","alertTemplateCount","promotionalImageCount","eventDisplayCount","paymentGatewayCount","paymentTemplateCount","lostAndFoundCount","isAdmin","is7Point","userService","tenantId","clearCache","saveItem","apiVersion","showFilterTypes","apiTypeId","config","apiTypes","centersXml","showEventDisplayTile","userType","eventDisplayAccess","length","showiCalFeeds","isMazevoApi","promises","getItems","then","response","countModel","data","AlertCount","ActiveCount","UserCount","TaskCount","LogTypeCount","CompletionTypeCount","FilterTypeCount","DepartmentCount","PromotionalImageCount","EventDisplayCount","PaymentGatewayCount","PaymentTemplateCount","LostAndFoundCount","TaskTemplateCount","AlertTemplateCount","reservations","error","Message","$q","all","logger","info","activate","controller","$inject","appRun","routerHelper","opsIncludeVersion","configureStates","state","url","templateUrl","controllerAs","settings","nav","content","authMode","allowedUserTypes","resolve","authenticationRequired","isAuthenticatedThrowError","name","run","AlertDetailController","$state","$stateParams","bsDialog","attachmentService","$window","backToList","fromDisplay","go","save","fromLocal","buildDateTime","item","DisplayFromDate","DisplayFromTime","toLocal","DisplayToDate","DisplayToTime","DisplayFromUtc","moment","toISOString","DisplayToUtc","localStorage","setItem","DepartmentId","toSave","CreatedById","Description","ID","isSaving","saveResult","remove","attachmentsToRemove","upload","attachmentResponse","notifier","notify","events","refreshCounts","catch","cancel","deleteItem","deleteDialog","undefined","submitForm","valid","isNew","id","openDatePicker","$event","isFrom","dpStatus","displayFromOpen","displayToOpen","fromDateChange","add","daysBetweenDates","toDate","toDateChange","diff","deleteAttachment","slide","push","$","each","Attachments","index","result","splice","departments","templates","templateChange","selectedTemplate","i","t","UId","val","getItem","convertUtcKeysToLocal","setAuditInfo","warning","getMainState","startOf","parseInt","AlertsController","$scope","carouselDialog","backendHubProxy","m","onDate","Date","items","displayedItems","concat","dateChanged","eventName","newDate","isLoading","processAlert","alert","preventDefault","stopPropagation","putItem","AcknowledgedUtc","hasBeenAcknowledged","isNewAlert","refresh","canEdit","userId","showAttachments","display","$on","stop","startListening","subscribe","mainDateChange","abstract","template","badgeContent","requireOps","params","mobileButton","canAccess","AlertsListController","f","fromDate","format","showItemDetails","htmlBodyDialog","Title","AlertsTemplatesController","AlertTemplateDetailController","$timeout","uid","BookController","$filter","completionsDataService","$interval","notesDataService","_defaultRefreshTime","_initFilters","gmtToDate","setHours","filters","GmtToDate","filterData","categories","roomChargeIndex","indexOf","Buildings","buildings","Statuses","statuses","Categories","RoomTypes","roomTypes","EventTypes","eventTypes","Views","views","Udfs","udfs","LimitToBookingsWithSelectedCategories","includeBookingWithCategoriesOnly","minutesSinceLastChangeFlag","highlightChangesWithin","showReservedTimes","ShowEventsWithinThisManyDays","_setfilterDates","gmtFromDate","GmtFromDate","LocalDateOnlyIsoString","filtersChanged","lastDate","_stop","lastRefreshed","isBefore","noDataMessage","query","bookData","BookData","displayedBookData","structuredClone","_processItems","Data","clone","BuildingLocalReseveredStartDisplay","BuildingLocalReseveredStart","BuildingLocalReseveredEndDisplay","BuildingLocalReseveredEnd","BuildingLocalEventStartDisplay","BuildingLocalEventStart","BuildingLocalEventEndDisplay","BuildingLocalEventEnd","origTasks","origAllBookings","map","TaskId","_refreshDataIn","_tickPromise","_tick","_timerPromise","connectionStatus","showDailySetup","hasOps","dataService","today","mainDateToday","filterRooms","applyFilter","showRoomCode","window","roomCodeText","toggleShowRoomCode","allCompletionTypes","filtersSet","filtersForDailySetup","showHelp","eventBarColor","reservedBarColor","cancelledBarColor","textColor","searchText","toUTCString","signalRStatusChange","userConfigOptionsChange","loadData","Settings","CompletionTypes","ApiVersion","SettingKey","SettingValue","createSearchThrottle","$watchCollection","newCollection","oldCollection","scope","bookFilter","lowerSearch","toLowerCase","filteredRooms","Rooms","filter","r","requireDataApi","spBook","reactDirective","Book","directive","CategoryIconsListController","saveIcon","setIcon","prefix","icon","IconClass","IconName","bootStrapIcons","fontAwesomeIcons","delete","IconColor","CategoryId","checkIsAdmin","ChecklistDetailController","history","back","Active","IsManaged","convertDateStringsToDates","ChecklistsController","upcoming","TopicDetailsController","TopicDisplayController","addComment","activeComment","CommunityTopicUId","console","log","timeToAgo","d","x","utc","fromNow","TopicComments","topic","TopicsListController","navigateToTopic","topicUId","dto","completionsDialog","$uibModal","modalOptions","ariaLabelledBy","CompletionsModalInstance","keyboard","size","options","includeTemplate","open","$uibModalInstance","completionsService","okText","allDone","ok","close","dismiss","completeItem","completionTypeId","completion","getLastCompletionForType","isComplete","CompletedAtUtc","completionDto","BookingId","DailyLogEntryId","IsComplete","CompletionTypeId","DisplayedOn","EventName","TaskDescription","completionButtonClass","lastCompletion","path","completionTypes","e","factory","completions","dialog","service","complete","completionShowing","completeCallback","completionClass","Completions","Color","background-color","completionInitials","Initials","hasCompletionType","isAllDone","isNothingCompleted","showCompletionDot","sort","a","b","DateAddedUtc","isCompletionType","ct","com","element","completionsCell","restrict","link","attrs","cachedTaskCompletionTypes","cachedBookingCompletionTypes","cachedServiceOrderCompletionTypes","getCompletionTypesForItem","typesForItem","_sorter","ServiceOrderId","getIcs","bookingData","ics","bcDash","BuildingCode","RoomDescription","SetupType","SetupCount","servicesText","Services","so","sods","ServiceOrderDetails","Category","ResourceCategoryTypeCode","ServiceType","EstimatedCount","TimeStart","TimeEnd","j","sod","Quantity","TempResourceDescription","Resource","Groupings","ii","iii","Items","gItem","Notes","_multiLineNote","SpecialInstructions","rsoj","rsoSod","rsoii","rsoiii","rsogItem","resj","resSod","resii","resiii","resgItem","actj","actsod","attI","attISod","EmailAddress","Phone","notI","notISod","linkElement","document","createElement","blob","Blob","type","URL","createObjectURL","setAttribute","clickEvent","MouseEvent","view","bubbles","cancelable","dispatchEvent","ex","notes","padding","replace","s1","Number","Sequence","s2","s3","s4","CompletionTypeDetailController","counts","preventDelete","iconName","showForServices","isEmsApiType","parts","split","AvailableForTask","AvailableForBooking","AvailableForLog","Name","getCounts","CompletionTypesListController","entriesForLogType","iconClassName","AjaxInterceptor","request","headers","encodeURIComponent","attr","when","parentType","parentId","elementId","Promise","elmId","imgInput","getElementById","imgs","files","img","pop","reject","maxSize","image","canvas","blobUrl","match","Image","src","onerror","revokeObjectURL","onload","width","height","Math","round","getContext","drawImage","toBlob","uploadPromise","process","attachmentIds","bytes","imgName","postFile","uploadResult","FileName","Base64Data","StoredFile","HasAttachment","AttachmentId","modalDialog","$modal","$templateCache","itemName","deleteMsg","cancelText","confirmationDialog","msg","templateDialog","scopeItem","put","ModalInstance","message","$modalInstance","hasEmailBeenSet","sendPasswordReset","sendTo","newNote","noteDto","NewNote","trim","savedNote","savedCompletion","$location","$rootScope","throttles","mainState","mainDate","viewmodel","list","filteredList","delay","toUpperCase","substr","filterFn","filterInputTimeout","searchNow","debouncedThrottle","key","callback","immediate","isNumber","test","textContains","text","userName","setMainState","value","input","regexIso8601","hasOwnProperty","lowerKey","endsWith","badProp","milliseconds","parse","isNaN","date","time","getFullYear","getMonth","getDate","getHours","getMinutes","logout","core","toastrConfig","toastr","timeOut","positionClass","appErrorPrefix","appTitle","keyCodes","backspace","tab","enter","esc","space","pageup","pagedown","end","home","left","up","right","down","insert","del","authenticationChange","filterCleared","stateChanged","sevenPoint","ems","collegeNet","adAstra","mazevo","displayTypes","eventDisplay","roomCard","pictureBox","configure","$logProvider","$httpProvider","$compileProvider","routerHelperProvider","exceptionHandlerProvider","debugInfoEnabled","debugEnabled","docTitle","interceptors","constant","$http","exception","successMsg","failureMsg","get","catcher","suppressSuccessMsg","suppressErrorMsg","post","success","suppressSuccess","q","file","fileName","fd","FormData","append","p","Content-Type","transformRequest","identity","download","contentType","filename","navigator","msSaveBlob","saveBlob","webkitSaveBlob","mozSaveBlob","urlCreator","webkitURL","mozURL","msURL","event","createEvent","initMouseEvent","location","spRequestVerificationToken","el","ctrl","DailyLogsController","logEntryViewDialog","logTypes","LogTypes","Entries","showAttachment","isLogType","logType","LogTypeId","canDelete","showEntry","logTypeId","entryId","deletingEntryId","originalEntry","deleteEntry","DailyLogsEntryController","sendOnSave","isFinal","Entry","Questions","sig","AnswerType","accept","Answer","dataUrl","tp","dailyLogForm","$invalid","Question","dp","Required","isItemSelected","Selected","validate","savedEntry","requestDto","saveButtonText","saveButtonIcon","ht","HelpText","SendOnNewEntry","DisplayOn","entryDialog","show","entryDto","newEntry","LogEntryViewController","getSingleItemAnswerText","question","answer","selectedOnly","formatDateTimeAnswer","isDate","","ReactDailySetupController","linkedTaskDiag","hasDataApi","soScheduleItemCount","serviceDisplayedItems","editTask","fromDailySetup","updateBookingWithTaskId","linkedItemId","LinkedTaskId","_updateItemInCollection","allBookings","relatedBookings","openNewTaskModal","expandAllServices","expandAllServicesToggle","showHistoricalItems","limitToCheckedInBookings","tasks","limitCompletionsByDepartment","setAvailableAt","selectedTime","AvailableAt","clearSearch","showReservedTime","_showReservedTime","_setReservedDisplay","toggleServices","servicesShowing","showCheckinFilter","_getSettingValue","getHistoryForBooking","getDailySetupForLinkedBooking","showingRelatedBooking","RelatedBookingItem","LinkedBookingId","_updateTimes","_start","noEventsMessage","updateItemForBookingAction","newItem","Status","collection","propertyName","tempCollection","removeItemFromCollection","updateSod","showNoShowAction","showEstimatedCountAction","showAddToCalendarAction","viewStatus","toggleFullView","disabled","addClass","removeClass","currentSortColumn","isSortDesc","_forcedToast","currentSortParser","collectionToSort","parser","sortProperty","initial","props","prop","desc","_sortBy","_setBookingCollections","IsLinkedToTask","isSame","settingKey","refreshCache","RefreshCache","displayData","numberOfItemsRequiringAttention","onItem","RequiresAcknowledgement","forceAcknowledge","clearToast","defaultRefreshTime","_autoRefreshDisabled","refreshFromSetting","asint","_defaults","_typeof","Symbol","iterator","obj","constructor","prototype","array","Array","opt","Object","assign","call","sortObj","sortProp","isProp","o","DashboardController","$sce","ExpirationWarningMsg","scrollerData","safeSvg","svg","trustAsHtml","selectedSvg","selectedSvgId","selectedCaption","processFloorPlan","availabilityStatus","notNow","getAvailability","activeRoomCodes","activeRooms","keyValueRooms","backToNow","_backToNow","selectedCategory","floorPlanSelected","roomClicked","room","expirationClass","exchangeSync","alertColor","makeMapTime","valueToConvert","unix","mapTimeChanged","_availabilityTimer","_clockTimer","_backToNowTimer","dateAsMoment","activeUntil","now","mapTimeMin","mapTime","mapTimeMax","activeUntilUtc","daysTilExpiration","ExpirationTitleMsg","floorPlans","FloorPlans","CountData","alertsCount","tasksCount","$broadcast","_setClock","secondsUntilNextMin","seconds","newTime","newDateTime","availDto","GmtDateTime","availablityData","RoomAvailability","find","fill","roomElement","RoomCode","IsReserved","css","ServicesInUse","hasCategory","CategoriesInUse","finally","$obj","roomCode","click","_roomClick","Value","Code","roomId","_setMapTimerDates","floorPlan","SvgData","Caption","DepartmentDetailController","countOfUsersInDepartments","countOfCompletionTypesInDepartments","deleteTitle","usersInDepartment","completionTypesInDepartment","relationshipData","Users","UserIds","DepartmentsListController","_getCount","departmentId","completionTypesCount","usersInDepartments","completionTypesByDepartment","alertsByDepartment","bookingHistoryDialog","BookingHistoryModalInstance","bookingInProgressDialog","gmtDateAndRoom","BookingInProgressModalInstance","servicesService","activeItems","utcNow","start","GmtReservedStart","GmtReservedEnd","isBetween","slides","interval","CarouselModalInstance","downloader","_endsWith","str","suffix","active","opened","onSlideChanged","nextSlide","direction","node","hasChildNodes","removeChild","lastChild","currentSlideIndex","isPdf","showPdf","isOther","isImage","downloadFile","atob","fn","isExternalLink","Url","pdfjsLib","getDocument","promise","pdf","_numPages","_thePdf","numPages","getPage","_handlePages","_currPage","page","context","viewport","getViewport","outputScale","devicePixelRatio","floor","style","heigth","renderContext","canvasContext","transform","render","appendTo","appendChild","onCarouselChange","$parse","require","carouselCtrl","origSelect","select","currentSlide","apply","arguments","surveyDialog","TakeSurveryModalInstance","surveyComplete","chartOptions","legend","position","tooltips","callbacks","label","tooltipItem","allData","datasets","datasetIndex","tooltipLabel","labels","tooltipData","total","surveyResults","takeSurveyForm","ChartData","ChartLabels","Labels","optOut","SurveyUId","EventDisplayController","timerTick","currentDate","getSeconds","checkInUse","DisplayTypeUId","startProperty","endProperty","InProgressStartOnReservedTime","InProgressEndOnReservedTime","StatusTypeId","bStart","bEnd","currentBooking","roomInUse","getPromos","promos","getBookings","isDefined","bookingPager","pageBookings","PageTransitionInterval","startIndex","endIndex","showingPromos","onPromoImageIndex","promoImageBase64Data","promoImageAltText","AltText","totalNumberOfPages","ceil","NumberOfEventsPerPage","firstTime","onPage","bookings","slice","hide","fadeIn","logo","PictureBackgroundImage","MainBackgroundImage","isLicenseValid","inUseText","InUseText","AvailableText","checkIsCurrentBooking","EventStartUtc","EventEndUtc","isPictureBox","mainboxStyle","RepeatMainBackgroundImage","PicutreBoxMainBackgroundColor","pictureBoxStyle","RepeatPictureBackgroundImage","PicutreBoxBackgroundColor","getPictureBoxContent","contentLocation","InprogressTopContent","InprogressMainContent","InprogressBottomContent","AvailableTopContent","AvailableMainContent","AvailableBottomContent","roomName","gn","Group","lineOne","lineTwo","lineTwoSize","PictureBoxMainContentSize","indexOfFirstSpace","indexOfComma","firstName","lastName","substring","Room","roomDescription","IsLicenseValid","ConfigDto","PromotionalImages","Logo","RoomName","DataRefreshInterval","eventDisplayService","EventDisplayDetailsController","setBuildingViews","buildingsLabel","showBuildings","isRoomCard","viewChanged","ViewId","rooms","hasLogo","LogoId","getLogo","PromotionalImageId","Height","Width","logoPreview","getImage","propName","imageModel","Id","StatusIdArray","EventTypeIdArray","fonts","promoImages","displayTypeChanged","TimeWidth","EventWidth","GroupWidth","RoomWidth","DisplayRoom","InUseBorderColor","InUseTextColor","AvailableTextColor","AvailableBorderColor","RoomId","BodyBackgroundColor","StartsWithinXHours","DropEventsAfterXMinutes","roomViewLabel","isEventDisplay","setBorderColors","setRoomName","managers","eventTypeLabel","DisplayTypes","Managers","UsersWithConfigAccess","MainBackgroundImageId","PictureBackgroundImageId","EventLabel","RoomLabel","GroupLabel","Font","DisplayGroup","DisplayEvent","HeaderTextSize","ColumnHeaderTextSize","TableTextSize","HeaderTextColor","TableHeaderBackgroundColor","TableHeaderTextColor","TableBodyTextColor","TableRowBackgroundColor","TableAltRowBackgroundColor","HonorEventTypeDOW","TopRowHeight","BottomRowHeight","MainContentWidth","PictureTopLeftContent","PictureTopRightContent","licenseInfo","NumberOfDisplaysLicensed","NumberOfDisplaysInUse","EventDisplayListController","copy","newId","transitionTo","FilterTypeDetailController","btoa","toJson","categoryLabel","roomTypeLabel","showBuildingsFilter","showViewsFilter","showUdfsFilter","userIds","setDisplayForApiType","FilterData","fromJson","AddedBy","DateChangedUtc","ChangedBy","FilterTypesListController","usersWithFilterType","filterTypeId","FloorPlanDetailsController","trustedSvg","FloorPlansListController","NumberOfPaymentTemplatesLicensed","NumberOfPaymentTemplatesInUse","HelpController","isAuthenticated","helpTextFactory","cachedData","helpTextData","forceReload","deferred","defer","HelpTextDetailController","$templateRequest","stateChange","FieldName","stateName","s","states","State","fields","configOptions","_addFieldIfDoesntExist","_processTemplate","div","$div","html","forAttr","fieldAttr","fieldName","initLookups","HelpTextListController","ICalDetailsController","ICalListController","openiCalFeed","filterDialog","FiltersModalInstance","_validateFilters","selectedFilterData","isIdInArray","selectedArray","updateDto","UserDefinedFilterData","filterTypes","saveUserConfigOptions","filtersDisabled","filterTypeChanged","ft","fts","userConfigDto","udfsLabel","navRoutes","getStates","getNavRoutes","isCurrent","route","current","menuName","getMobileNavRoutes","mobileOnly","isLoggedIn","requireBillingDepartments","isCollegeNetApi","numberOfPaymentTemplates","billingDepartmentIds","allowedApiTypes","r1","r2","ShellController","setState","hideNav","busyMessage","isBusy","showSplash","SidebarController","_setNavRoutes","_refreshCounts","showBadge","routeTitle","dashboardCount","dailysetupCount","bindHtmlCompile","$compile","$watch","$eval","spBindHtmlCompile","contents","$sidebarInner","$dropdownElement","dropClass","hasClass","slideUp","whenDoneAnimating","slideDown","spTopNav","TopNavController","filterDiag","userEditDiag","goToToday","checkUserState","mobileNavRoutes","showFilterLink","moveDate","showFilters","isCollapsed","showUser","onDateChange","datePickerOpen","LoginController","bsDiag","signalrEndPoint","loginSuccess","returnUrl","loginError","loginErrorMsg","isValid","login","grant_type","promoHtml","forgotPassword","diagDismissed","externalAuthProvider","provider","externalProviderUrl","HostName","LoginProvider","$7PointAuthScope","externalLoginComplete","fragment","getAccessToken","loginButtonText","passwordKeyPress","keyCode","password","manualLogin","forceSso","loadingSso","loginProviders","Html","host","ForceSso","warn","focus","LogoutController","ResetPasswordController","confirmPassword","passwordResetError","passwordResetSuccessfully","resetPassword","Password","Success","loadErrorMsg","loading","passwordPattern","LogTypeDetailController","deletedQuestions","deletedOptions","SendOnSunday","SendOnMonday","SendOnTuesday","SendOnWednesday","SendOnThursday","SendOnFriday","SendOnSaturday","AllowContinueLater","SendOnDays","questionClick","Activated","addQuestion","AnswerTypeText","addOption","showMove","dir","moveOpt","removedElement","newIndex","deleteOpt","HasBeenAnswered","deleteQuestion","answerTypeText","isRequiredAndNotActivated","sendOnData","IsReportScheduled","IncludeEmptyResponses","AllowCompletions","DepartmentID","sendAround","LogTypesGroupingDetailsController","LogTypesGroupingsListController","LogTypesListController","LostAndFoundDetailsController","PlaceFound","DateFound","DateFoundUtc","TimeFoundDisplay","StorageLocation","LongDescription","dateFoundOpen","datePickerOptions","showWeeks","ngModelOptions","allowInvalid","LostAndFoundListController","filteredItems","showImage","claimedDto","openClaimId","updateClaim","closeClaim","openClaim","itemsFilter","clearFilter","claimedButtonText","showClaimed","toggleClaimed","_chunk","claimedByName","arr","newArr","notesDialog","n","notesForm","updateNote","editingNoteId","deleteNote","routePart","deletingNoteId","editNote","originalNote","cancelEdit","deletingAttachmentId","atts","thatI","res","notesShowing","notesCloseCallback","resError","notesCell","_originalNote","note","acknowledgeNote","NotesReportScheduleController","OpsConfigController","setting","iconClass","PaymentGatewayDetailsController","providerChange","PaymentProviderUId","selectedProviderSettings","paymentProviderSettings","onSetting","PaymentProviderSettingUId","FieldType","numberOfUses","paymentProviders","PaymentProviders","ProviderSettings","NumberOfUses","getNumberOfUses","PaymentGatewayListController","PaymentTemplatesDetailsController","isMazevo","isCollegeNet","isEms","showCustomNoteBox","EnableDeposits","SendConfirmationEmail","IncludeCustomNoteBox","AllowCustomInvoiceAmount","ReservationIdBoxLabel","CustomerBoxLabel","InvoiceBoxLabel","DefaultButton","PayInvoiceLabel","PayDepositLabel","EmsDepartmentId","EmsPaymentTypeId","Departments","paymentGateways","PaymentGateways","paymentTypes","PaymentTypes","reminderTypes","ReminderTypes","logos","Logos","PaymentTemplateListController","PaymentTemplatePayController","search","customValueDue","isSearching","paymentItems","searchDto","PaymentTemplateUId","PaymentSearchType","payInvoice","CustomValueDue","acceptUIScript","ref","PaymentItems","AllowCustomAmount","balanceDueLabel","showCustomAmount","formData","ccForm","ProviderType","evaScript","SubmitToUrl","querySelector","parentNode","insertBefore","ScriptToInclude","action","trustAsResourceUrl","hasSearched","invoiceLabel","noSearchData","doPayment","paymentFields","expirationTime","paymentModal","ariaDescribedBy","backdrop","token","formAction","submit","Token","handler","Hexea","pcct","onPayment","payment","resId","ReservationID","ReservationId","SearchType","InvoiceNo","InvoiceNumber","SearchText","LastName","TicklerId","PaymentAmount","BalanceDue","HexeaPaymentID","hexeaPaymentID","ReceiptId","processVanco","amount","invoiceReference","ssl_txn_auth_token","onError","errorMsg","onCancelled","onDeclined","jsonString","JSON","stringify","onApproval","wasSuccessful","transResponse","ssl_amount","TransactionId","ssl_transaction_reference_number","ResponseCode","ssl_result_message","Authorization","ssl_approval_code","AccountNumber","ssl_card_number","AccountType","ssl_card_short_description","PaymentSuccessful","processEvalon","PayWithConverge","submitToUrl","expirationTime1","UtcTimeStamp","isAfter","href","IFrameIncludeUrl","windowClass","iframeUrl","clearResults","trustUrl","customAount","resIdLabel","ReservationIDLabel","PaymentPageTitle","CommunicationHandler","authorizeAcceptJsResponseHandler","messages","resultCode","code","DataDescriptor","opaqueData","dataDescriptor","DataValue","dataValue","onReceiveCommunication","argument","pair","vars","unescape","_parseQueryString","qstr","parentFrame","parent","$frame","outerHeight","totalAmount","transId","responseCode","authorization","accountNumber","accountType","billTo","FirstName","PaymentTemplateReceiptController","ReservationOrInvoiceLabel","cancelled","ReceiptPageTitle","EmsTransactionType","PaymentTransactionsListController","isStart","fromDateOpen","toDateOpen","billingDept","PromoDetailController","PromotionalImageDetailsController","NumberOfItems","PromotionalImagesListController","spDailySetup","DailySetup","spEventsTable","EventsTable","spTasksTable","TasksTable","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","_inherits","subClass","superClass","create","_setPrototypeOf","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","NewTarget","Super","_getPrototypeOf","Reflect","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","toString","getPrototypeOf","_React$Component","_super","_this2","linkScrollingX","bind","linkScrollingY","setBarDisplayMode","hoursDisplay","showModal","hideModal","hideCarouselModal","showCarouselModal","showAddBookingModal","hideAddBookingModal","modalItem","buildingForModel","bookingModalShowing","completionModalShowing","bookStart","bookEnd","hours","barDisplayMode","carouselModalShowing","carouselModalItem","slidesForModal","addBookingModalShowing","roomForAddBooking","clickedOnHour","loadHours","scrollLeft","isForDiagrams","_that","carouselTitle","ExternalDrawingUrl","slidesDataService","drawings","setTo","hourOfDay","building","HasBookingAttachment","HasDrawings","Email","GroupType","WebUser","EventCoordinator","EventLocator","onTime","h","currentTarget","scrollTop","_this3","nowLeftStyle","minutes","React","className","color","onClick","onScroll","BuildingRow","BookRow","bookRowClicked","showBookingModal","allCompletions","adjustTimes","BookingModal","booking","CompletionsModal","CarouselModal","AddBookingModal","apiService","Component","propTypes","PropTypes","string","object","func","bool","defaultProps","_React$Component2","_super2","_this4","addBooking","addAndClose","durationClicked","startTimeClicked","timesForButtons","potentialDurations","selectedStart","selectedDuration","that","en","sc","setupCount","startTime","duration","status","nextProps","quaterHour","toFixed","flooredHour","year","monthIndex","day","ss","_this5","ReactBootstrap","Modal","onHide","enforceFocus","Header","closeButton","Body","for","cn","Footer","Button","Booking","_this","midnight","showEvent","showBooking","timezoneOffsetMinutes","EmsTimezoneMinuteOffsetFromTenantTimezone","bookingEnd","eventStart","eventEnd","bookingStart","notInRoomClass","AssociatedRoomId","minutesFromMidnightToBookingStart","minutesFromMidnightToEventStart","widthOfBooking","widthOfEvent","eventStyle","backgroundColor","StatusType","reservedStyle","textStyle","GroupName","ServicesCell","iconSizeClass","showExtend","tId","gtLabel","gtData","bsSize","ActualCount","EventType","FirstContact","ServicesList","services","minutesSinceLastChange","UdfsList","rowClicked","startTimesToShow","clientX","nowHour","Bookings","bsHours","beHours","class","number","endTime","minuteOffset","TimeBlock","hour","ACTItem","highlightColor","MinutesSinceLastChange","ATTItem","showCheckinModal","hideCheckinModal","checkinModalShowing","checkInSod","internalAttendees","externalAttendees","ExternalAttendee","ng-href","CheckedIn","ConfirmAttendeeCheckinModal","updateItemInCollection","AvailableAtCell","toggle","selectChanged","editMode","timeData","loadTimeData","hh","times","RoomAvailableAtAsDate","rat","RoomAvailableAt","buildingLocalTime","roomAvailSort","RoomAvailableAtSort","raat","timeParts","minute","availAtTime","onChange","roomsAvailableAtHtml","buildHtml","AddEmsNoteModal","addNote","Note","ActualCountModal","setActualAttendance","count","Filters","ActionDto","NoShowBookingModal","_React$Component3","_super3","noShowBooking","saveAndClose","ExtendBookingModal","_React$Component4","_super4","extendBooking","ExtendForXMinutes","EndBookingModal","_React$Component5","_super5","_this6","endBooking","ClearServiceModal","_React$Component6","_super6","_this7","clearService","ConfirmCheckinModal","_React$Component7","_super7","_this8","confirmCheckin","BookingHistoryModal","colSpan","HistoryUniqueId","OldValue","NewValue","hideNewTaskModal","showNewTaskModal","showAddEmsNoteModal","hideAddEmsNoteModal","showActualCountModal","hideActualCountModal","showNoShowBookingModal","hideNoShowBookingModal","showExtendBookingModal","showEndBookingModal","showClearServiceModal","showConfirmCheckinModal","hideConfirmCheckinModal","hideExtendBookingModal","hideEndBookingModal","hideClearServiceModal","showRow","newTaskModalItem","newTaskModalShowing","actualCountModalShowing","servicesShowFor","linkedTaskModalItem","addEmsNoteModalShowing","noShowBookingModalShowing","extendBookingModalShowing","clearServiceModalShowing","endBookingModalShowing","confirmCheckinModalShowing","bookingActionItem","taskTemplates","sortPropertyName","dropBookingsWhenComplete","checkedInOnly","IsCheckedIn","canShowLocationDetails","haveNoShowStatus","showAvailAt","serviceHighlightColor","nothingDoneColor","udfLabel","resTimeLabel","resEndTimeLabel","brLabel","sortHeaderClass","BookingRow","showCompletionModal","showHistoryModal","showNotesModal","limitCompletionsByDeparments","showLocationDetailsModal","LinkedTasks","task","TaskRow","includeDate","canEditTask","getLinkedBooking","hideLinkedBooking","NewTaskModal","linkedTask","allUsers","initialUsersInDepartment","sortIsDesc","isRequired","bookingActionSelect","eventKey","showExtendBooking","showEndBooking","showCheckin","showNoShow","startTimeCell","endTimeCell","reservedStart","TwoRowCell","cellStyle","cellClass","rowOne","rowTwo","Cell","rowClass","actionButtonStyle","RecentChangesCell","CompletionsCell","LocationEventNameCell","GroupContactCell","ButtonToolbar","Dropdown","Toggle","noCaret","bsStyle","aria-label","Glyphicon","glyph","Menu","MenuItem","onSelect","RoomNeedsSanitized","isRelatedBooking","showHistory","ServicesRow","pointerClass","checkinToolTip","LocalCheckin","setupType","roomDisplay","keyName","defaultCss","linkStyle","textDecoration","CategoryIcons","ToolTip","buildIconColor","renderClassName","isDocx","isDrawing","isiPhone","getToken","userData","bearerToken","userAgent","Carousel","controls","Item","IsExternalFile","minHeight","margin","maxWidth","PDF","pdfData","Viewer","max-width","max-height","CATItem","gar","GuaranteedCount","SodItems","userHasCompletionDepartment","completionType","userDepartmentIds","departmentIds","initials","completionStyle","hasAnyCompletion","cursor","_defineProperty","completionsComplete","loadAllDoneItem","handleChange","addCompletion","allDoneId","fieldVal","checked","AvailableForServiceOrder","itemStyle","restAt","completedAt","CompletionTypeDescription","UserName","loc","sortedItemCompletions","allDoneItem","marginBottom","completionSpan","compeltionDetails","completeClick","hideCompletionModal","hideNotesModal","hideHistoryModal","hideLocationDetailsModal","minimize","isTaskAllDone","toggleTaskShowingMode","toggleSoSchedule","handleFilterServices","applyServicesFilter","completionModalItem","notesModalItem","notesModalShowing","historyModalShowing","historyModalItem","totalTaskCount","taskShowingMode","locationModalShowing","locationDetailsModalItem","activeDepartments","soItems","soTotalItemCount","filteredSoItems","showSoSchedule","newSoSchedule","newShowRoomCode","itemToUpdate","locationData","idForCall","AdAstraEventId","apiPath","isoDate","tableId","iconId","$wcontent","iElement","is","newMode","filterString","regExp","RegExp","check","values","some","isArray","taskClone","allTasksCount","taskForState","numberToRemoveFromCount","settingExist","soItemCount","bookingsClone","soItemsForState","_i","soItem","_React$createElement","showServiceOrderSchedule","showSoScheduleText","showRoomCodeText","toggleRoomCode","allBookingsCount","FormControl","placeholder","onKeyUp","SoSchedule","NotesModal","RoomDetailsModal","soitems","instanceCount","CalendarHeader","createClass","displayName","displayDate","minDate","maxDate","monthLabels","previousButtonElement","oneOfType","nextButtonElement","displayingMinMonth","displayingMaxMonth","handleClickPrevious","newDisplayDate","setDate","setMonth","handleClickNext","daysInMonth","Calendar","selectedDate","dayLabels","cellPadding","weekStartsOn","showTodayButton","todayButtonLabel","roundedCorners","handleClick","newSelectedDate","setTimeToNoon","handleClickToday","setMinutes","setSeconds","setMilliseconds","month","firstDay","startingDay","getDay","monthLength","weeks","beforeMinDate","afterMinDate","week","borderRadius","paddingTop","block","DatePicker","getDayLabels","makeDateValues","clear","handleHide","handleKeyDown","handleFocus","handleBlur","getValue","getFormattedValue","getCalendarPlacement","makeInputValueString","handleBadInput","handleInputChange","onChangeMonth","onChangeDate","focused","inputFocused","dateFormat","separator","dates","isoString","inputValue","onClear","onBlur","initEvent","ReactDOM","findDOMNode","refs","hiddenInput","which","placement","calendarPlacement","onFocus","nextState","tag","originalValue","join","monthInteger","dayInteger","yearInteger","newProps","calendarHeader","control","customControl","cloneElement","onKeyDown","required","autoComplete","autoFocus","InputGroup","bsClass","showClearButton","Overlay","rootClose","container","calendarContainer","overlayContainer","delayHide","Popover","data-formattedvalue","Addon","opacity","clearButtonElement","children","defaultValue","weekStartsOnMonday","componentName","Error","arrayOf","SalesPerson","ecLabel","ecData","spLabel","spData","commentData","GroupComments","c","wuLabel","wuData","popoverClickRootClose","OverlayTrigger","trigger","overlay","IsVip","handleClear","handleDepartmentChange","handleDateChanged","isDepartmentChecked","handleTemplateChanged","LinkedTask","selectedTemplateId","DepartmentIds","StartAt","FinishBy","idParts","deptId","addedUserIds","user","dateOnly","controlId","mDisplayOn","errors","isEmpty","validateHaveData","validateShowOnDays","validateDisplayUntil","DisplayUntil","DisplaysOnSunday","DisplaysOnMonday","DisplaysOnTuesday","DisplaysOnWednesday","DisplaysOnThursday","DisplaysOnFriday","WeekDayDisplay","displayFrom","mStartAt","displayUntil","isDisabled","keys","FormGroup","ControlLabel","componentClass","TemplateName","validationState","HelpBlock","dept","paddingRight","fontWeight","AssignedToUserId","TimePicker","feedBack","allowEmpty","Static","DisplaysOnSaturday","isFormInvalid","toggleDepartment","modalClosing","disableDepartment","found","invalidForm","isUploading","hasNoteValue","editOverlay","acknowledgeOverlay","clickFunc","sortedNotes","editPopover","deleteConfirmationPopover","UserCanAcknowledge","acknowledgePopover","AcknowledgedBy","NOTItem","dangerouslySetInnerHTML","__html","scale","GlobalWorkerOptions","workerSrc","childContextTypes","Page","nextContext","_update","_loadPage","_renderPage","contextTypes","fingerprint","fingerprints","pages","v","SPPdfViewer","pdfUrl","out","Uint8Array","charCodeAt","border","fileUrl","clickHtml","textAlign","bookingIconClass","bookingTitle","bookingIcon","MinutesSinceFirstCompletion","soIconClass","soTitle","soIcon","MinutesSinceLastDetailChange","needsSanatized","requireAck","RESItem","Features","st","SetupTypes","MinCapacity","MaxCapacity","ImageData","Images","RSOItem","showQtyUpdateModal","hideQtyUpdateModal","updateQtyModalShowing","updateQtySod","AllowQtyEdit","rg","ResourceGroupID","UpdateSodQtyModal","_typeof2","hideAssignServiceModal","showAssignUserModal","assignServiceModalShowing","itemForAssignTo","isDesc","AssignedTo","AssignServiceModal","assignService","selectedUserId","sortedTasks","sortBy","sortDir","dontChangeDirection","rows","sortVal","aSort","bSort","multiplier","myTaskClass","displayRow","TaskDisplayOn","TaskStartAt","TaskFinishBy","Department","showRelatedBooking","addHyperlinks","udf","FieldValue","updateSodQty","updateAndClose","qty","SoId","ServiceOrderID","SodId","NewQuantity","IsCheckinRequest","htmlFor","Excel","downloadExcel","downloadName","$rows","tmpColDelim","String","fromCharCode","tmpRowDelim","row","col","tableToCsv","ReportFileBuilder","excel","exportToExcel","colIndexToRemove","tableHtml","clonedTable","exportToPdf","cols","cell","oCell","txt","docHeader","docDefinition","header","footer","currentPage","pageCount","alignment","pageOrientation","table","headerRows","body","dontBreakRows","pdfMake","createPdf","ReportsListController","SurveyDetailsController","AskStandardUsers","AskManagers","AskAdmins","SurveyListController","SurveyResultsController","textQuestions","displayedTextQuestions","answerDetailsId","showAnswerDetails","surveyUId","TextQuestionResponses","QuestionResponses","linkedTaskDialog","LinkedTaskModalInstance","departmentChange","StartAtDisplay","IncludeFinishBy","FinishByDisplay","taskCountChange","displayOnOpen","usersWithDepartments","set","EmailUserTheyHaveANewTask","displayOn","deptIdsAsString","deptIds","taskCells","TaskDetailController","CreateAsIndividualTasks","EndTaskWhenCompleted","TasksController","TasksListController","getTasks","TasksTemplatesController","TaskTemplateDetailController","TenantReportsController","_reportTypeSorter","reportTypes","reportType","generate","TotalItems","TotalItems1","TotalItems2","TotalItems3","TotalItems4","TotalItems5","TotalItems6","TotalItems7","TotalItems8","reportData","NumberOfItems1","NumberOfItems2","NumberOfItems3","NumberOfItems4","NumberOfItems5","NumberOfItems6","NumberOfItems7","NumberOfItems8","Action","TenantDetailsController","showPassword","ActiveUntilUtc","ShowTerms","HasOps","SingleSignOn","timezones","ApiTypes","TenantsListController","TotalAmount","TotalNumberOfUsers","TotalCustomers","TotalInstalls","DailyActiveUsers","RemainingAmount","OpsAmount","OtherAmount","OurApiCount","PSApiCount","R25Count","AdAstraCount","MazevoCount","TotalLicensedUsers","TotalEventDisplays","TotalPaymentTemplates","Amount","getApiVersion","hideApiGet","DataApiUrl","getEmsDbVersion","EmsDbVersion","hideEmsDbGet","currentOutgoingIp","showInactive","emailToUnlock","unlockUser","thisYear","endOfYear","HasApi","expireUtc","NumberOfUsers","NumberOfDisplayTemplates","NumberOfPaymentTemplates","parseFloat","CountOfUsers","ApiType","AnnualAmount","UserDetailsController","hasSsoLogin","Logins","ProviderKey","FilterTypes","Succeeded","Errors","userTypes","tenants","tenantForUserCrud","billingDepartments","requirePassword","currentPasswordRequired","BillingDepartments","userEditDialog","UserEditModalInstance","UsersListController","colorDot","convertUserType","UserType","NumberOfUsersLicensed","NumberOfActiveUsers","otherModelValue","attributes","ngModel","$validators","compareTo","modelValue","$validate","spCountBox","backgroundcolor","compile","subtitle","rightText","allowCollapse","$set","next","authDataService","acceptTerms","getFilters","getCurrentUser","tempKey","external_access_token","getFilterData","authInterceptor","$injector","bt","getAttribute","responseError","rejection","removeItem","userDataKey","NotAuthenticatedException","successCallback","errorCallback","handleError","error_description","_finalizeLogin","clearUserData","getUserData","numberOfDisplayTemplates","_saveUserData","externalAccessToken","description","userConfigOptions","base64Options","apiType","_setUserData","UserId","TenantId","access_token","refreshToken","refresh_token","BillingDepartmentIds","ApiTypeId","expirationDate","FilterTypeId","HasDataApi","NeedsToAcceptTerms","SurveyToShowUId","_connection","_stopCalled","hubConnection","logging","proxy","createHubProxy","qs","Bearer","on","displayTo","userDepartments","dId","updated","$apply","_addAlert","_addItemToSubCollection","_processForToast","onDateDisplay","itemDateDisplay","dIds","_addTask","subtract","_availableAtUpdated","_deleteNoteFromItemWithNotes","_deleteNote","idProp","_updateNoteInItemWithNotes","lt","_updateNote","ParentId","AcknowledgedByInitials","AcknowledgedAtUtc","_acknowledgeNote","soId","onService","_removeServiceAssignmentFromBookData","_removeServiceOrderAssignment","_addServiceOrderAssignmentToBookData","_serviceOrderAssigned","_addCompletionToBookData","_updateBookingInBookData","_bookingUpdated","_logEntryAdded","entry","_logEntryUpdated","comment","_commentSaved","starting","received","connectionSlow","reconnecting","reconnected","newState","disconnected","_startConnectionAndSubscribe","connection","done","invoke","fail","matched","colT","subCollectionName","subCollectionCompareProperty","subCollectionSortProperty","ParentType","rootItem","onLinkedTask","linkedMatched","jj","spCheckboxList","filterShowing","filterClick","toggleSelection","itemId","wasSelected","toggleFn","showFilter","allSelected","isSelected","toggleAll","selectedArrary","listData","allowSelectAll","helpTextField","dynamicLabel","spFormAutoFillFix","ngSubmit","unbind","spHelpText","_showAsIcon","field","tagName","showAsIcon","popoverPlacement","ico","escaped","bindTo","stResetSearch","tableState","predicateObject","pagination","pipe","bindToController","dailySetupFilter","filterFilter","expression","actual","expected","isObject","after","suppressLogger","newMessage","thrownDescription","$provide","decorator","extendExceptionHandler","$delegate","exceptionHandler","cause","errorData","$get","local","$log","showToasts","newestOnTop","preventDuplicates","onclick","showDuration","hideDuration","extendedTimeOut","showEasing","hideEasing","showMethod","hideMethod","$emit","_baseHref","baseHref","_url","$locationProvider","$stateProvider","$urlRouterProvider","resolveAlways","RouterHelper","handlingStateChangeError","hasOtherwise","stateCounts","changes","otherwisePath","forEach","extend","otherwise","toState","toParams","fromState","fromParams","loadedTemplateUrl","statusText","animate","html5Mode","cfg","CompletionsByRangeController","forDateOpen","bookingCompletionsGraphData","BookingCompletionsGraphData","bookingCompletionsGraphLabels","BookingCompletionsGraphLabels","bookingCompletionsByDepartmentGraphData","BookingCompletionsByDepartmentGraphData","bookingCompletionsByDepartmentGraphLabels","BookingCompletionsByDepartmentGraphLabels","bookingCompletionsByUserGraphData","BookingCompletionsByUserGraphData","bookingCompletionsByUserGraphLabels","BookingCompletionsByUserGraphLabels","taskCompletionsGraphData","TaskCompletionsGraphData","taskCompletionsGraphLabels","TaskCompletionsGraphLabels","taskCompletionsByDepartmentGraphData","TaskCompletionsByDepartmentGraphData","taskCompletionsByDepartmentGraphLabels","TaskCompletionsByDepartmentGraphLabels","taskCompletionsByUserGraphData","TaskCompletionsByUserGraphData","taskCompletionsByUserGraphLabels","TaskCompletionsByUserGraphLabels","logCompletionsGraphData","LogCompletionsGraphData","logCompletionsGraphLabels","LogCompletionsGraphLabels","logCompletionsByDepartmentGraphData","LogCompletionsByDepartmentGraphData","logCompletionsByDepartmentGraphLabels","LogCompletionsByDepartmentGraphLabels","logCompletionsByUserGraphData","LogCompletionsByUserGraphData","logCompletionsByUserGraphLabels","LogCompletionsByUserGraphLabels","generated","EventCompletionsReportController","reportFileBuilder","fromDateLocalString","toDateLocalString","forDate","DailyNotesReportController","NoteTypes","parentTypeId","bookingIdText","DailyLogsReportController","_utcToLocal","_getFileName","ext","allowCompletions","reportTable","firstEntry","LastCompletion","CompletedBy","_generatePdf","_logReportName","emailPdf","mailDto","Recipients","mailTo","HtmlBody","MessageHtml","subject","getBase64","encodedString","attach","ContentType","emailShowing","showEmail","filterd","bodyObj","cellContent","questions","questionStack","itemText","detailRow","stack","ws","tableObj","widths","layout","styles","tableHeader","fontSize","bold","entryRow","fillColor","italics"],"mappings":"CAAA,wBAGIA,QAAQC,OAAO,MAAO,CAClB,WACA,aACA,gBACA,YACA,aACA,iBACA,YACA,YACA,iBACA,kBACA,YACA,YACA,gBACA,eACA,aACA,sBACA,cACA,kBACA,cACA,kBACA,mBACA,wBACA,sBACA,uBACA,0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IjDmpE,EAAUtvF,KAAKuvF,GAGfE,EAAY,CAAC,CACbC,MAAO,CAACJ,GACNx9B,QAAS+hB,EAAK/6E,SAGpBs2F,EAAQpvF,KAAKyvF,GAIjB,IAAIE,EAAK,CAAC,IAAK,IAAK,IAAK,KACrB5B,GACA4B,EAAG3vF,KAAK,KAGZ,IAAI4vF,EAAW,CACXlb,WAAY,EACZmb,OAAQF,EACRhb,KAAMya,EACNxa,eAAe,GAGfX,EAAY4Z,EAAa,IAAM,MAqBnC,OApBA5Z,GAAa52E,OAAOvG,EAAGmO,QAAQlB,UAAUC,OAAO,cAAgB,MAAQ3G,OAAOvG,EAAGmO,QAAQtF,QAAQqE,OAAO,cACzGqqF,EAAiBpa,EAAY,OACT,CAChBj9E,MAAO,aACPm9E,OAAQ,CAAEn2D,KAAMi2D,EAAWna,OAAQ,CAAC,EAAG,EAAG,EAAG,IAC7Csa,OAAQ,SAAUC,EAAaC,GAAa,MAAO,CAAEt2D,KAAMq2D,EAAYrxB,WAAa,OAASsxB,EAAWC,UAAW,QAASza,OAAQ,CAAC,EAAG,EAAG,EAAG,KAC9I0a,gBAAiB,YACjB94E,QAAS,CACP,CACI+4E,MAAOmb,EACPE,OAAQ,cAGdC,OAAQ,CACJC,YAAa,CAAEC,SAAU,GAAIC,MAAM,GACnCC,SAAU,CAAEC,UAAW,WACvBxoE,SAAU,CAAEqoE,SAAU,GAAIC,MAAM,GAChCroE,OAAQ,CAAEwoE,SAAS,MAhZnC55F,QACKC,OAAO,eACPoE,WAAW,4BAA6B6yF,GAE7CA,EAA0B5yF,QAAU,CAAC,UAAW,SAAU,cAAe,kBAAmB,qBAPhG","file":"../appBundle.js","sourcesContent":["(function () {\r\n 'use strict';\r\n\r\n angular.module('app', [\r\n 'app.core',\r\n 'app.layout',\r\n 'app.dashboard',\r\n 'app.admin',\r\n 'app.alerts',\r\n 'app.checklists',\r\n 'app.tasks',\r\n 'app.users',\r\n 'app.dailySetup',\r\n 'app.completions',\r\n 'app.notes',\r\n 'app.legal',\r\n 'app.dailyLogs',\r\n 'app.logTypes',\r\n 'app.promos',\r\n 'app.completionTypes',\r\n 'app.reports',\r\n 'app.filterTypes',\r\n 'app.tenants',\r\n 'app.departments',\r\n 'app.eventDisplay',\r\n 'app.promotionalImages',\r\n 'app.paymentGateways',\r\n 'app.paymentTemplates',\r\n 'app.paymentTransactions',\r\n 'app.opsConfig',\r\n 'app.floorPlans',\r\n 'app.tenantReporting',\r\n 'app.help',\r\n 'app.helpText',\r\n 'app.surveys',\r\n 'chart.js',\r\n 'app.lostAndFound',\r\n 'app.book',\r\n 'signature',\r\n //'app.community',\r\n 'app.notesReportSchedule',\r\n 'app.categoryIcons',\r\n 'app.iCal'\r\n \r\n ]);\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.admin', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.alerts', [\r\n 'app.core',\r\n 'app.widgets'\r\n \r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.book', [\r\n 'app.core'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.categoryIcons', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.checklists', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('app.community', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.completions', [\r\n 'app.core'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.completionTypes', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core', [\r\n 'ngAnimate', 'ngSanitize', 'ngAria',\r\n 'blocks.auth',\r\n 'blocks.exception', \r\n 'blocks.logger',\r\n 'blocks.router',\r\n 'blocks.notifications',\r\n 'blocks.filters',\r\n 'blocks.backendHubProxy',\r\n 'blocks.directives',\r\n 'ui.router', 'ngplus',\r\n 'ui.bootstrap',\r\n 'smart-table',\r\n 'angularTrix'\r\n \r\n \r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.dailyLogs', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.dailySetup', [\r\n 'app.core',\r\n 'app.widgets'\r\n ,'react'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.dashboard', [\r\n 'app.core',\r\n 'app.widgets',\r\n 'vr.directives.slider'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.departments', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.eventDisplay', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('eventDisplayApp', [\r\n 'app.core',\r\n ]);\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.filterTypes', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.floorPlans', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.help', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.helpText', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.iCal', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.layout', ['app.core', 'app.users']);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.legal', ['app.core']);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.logTypes', [\r\n 'app.core',\r\n 'app.widgets',\r\n 'ngDragDrop'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.lostAndFound', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.notes', [\r\n 'app.core'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.notesReportSchedule', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.opsConfig', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.paymentGateways', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.paymentTemplates', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.paymentTransactions', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.promos', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.promotionalImages', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.reports', [\r\n 'app.core'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.surveys', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.tasks', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.tenantReporting', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.tenants', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.users', [\r\n 'app.core',\r\n 'app.widgets'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.widgets', ['colorpicker.module']);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('blocks.auth', ['blocks.exception', 'blocks.logger', 'blocks.notifications']);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('blocks.backendHubProxy', []);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('blocks.exception', ['blocks.logger']);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('blocks.filters', []);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('blocks.logger', []);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('blocks.notifications', []);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('blocks.router', [\r\n 'ui.router',\r\n 'blocks.logger',\r\n 'blocks.auth'\r\n ]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('AdminController', AdminController);\r\n\r\n AdminController.$inject = ['common', 'dataservice'];\r\n /* @ngInject */\r\n function AdminController(common, dataservice) {\r\n var vm = this;\r\n vm.title = 'Admin';\r\n\r\n vm.alertCount = -1;\r\n vm.userCount = -1;\r\n vm.taskCount = -1;\r\n vm.logTypeCount = -1;\r\n vm.completionTypeCount = -1;\r\n vm.filterTypeCount = -1;\r\n vm.departmentCount = -1;\r\n vm.taskTemplateCount = -1;\r\n vm.alertTemplateCount = -1;\r\n vm.promotionalImageCount = -1;\r\n vm.eventDisplayCount = -1;\r\n vm.paymentGatewayCount = -1;\r\n vm.paymentTemplateCount = -1;\r\n vm.lostAndFoundCount = -1;\r\n vm.isAdmin = 0;\r\n vm.is7Point = is7Point;\r\n vm.clearCache = clearCache;\r\n vm.apiVersion = \"Loading\";\r\n vm.userService = common.userService;\r\n vm.common = common;\r\n vm.showFilterTypes = common.userService.apiTypeId() !== common.config.apiTypes.centersXml;\r\n vm.showEventDisplayTile = showEventDisplayTile;\r\n vm.eventDisplayAccess = [];\r\n vm.showiCalFeeds = showiCalFeeds;\r\n activate();\r\n\r\n function activate() {\r\n vm.isAdmin = common.userService.userType() == \"2\"\r\n var promises = [ getCounts(), getApiVersion(), getUserEventDisplayConfigAccess()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n \r\n\r\n function getApiVersion() {\r\n return dataservice.getItems('api/Tenants/ApiVersion').then(function (response) {\r\n vm.apiVersion = response.data.Message;\r\n }, function (error) { });\r\n }\r\n\r\n function is7Point() {\r\n if (common.userService.tenantId() == 1) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function showiCalFeeds() {\r\n return vm.userService.isMazevoApi() == 1;\r\n }\r\n\r\n function showEventDisplayTile() {\r\n if (vm.isAdmin) {\r\n return true;\r\n }\r\n\r\n if (common.userService.userType() === \"1\") {\r\n return vm.eventDisplayAccess && vm.eventDisplayAccess.length > 0;\r\n }\r\n\r\n return false;\r\n\r\n }\r\n\r\n function clearCache() {\r\n dataservice.saveItem(\"api/Users/ClearCache\", {}, true);\r\n }\r\n\r\n function getUserEventDisplayConfigAccess() {\r\n dataservice.getItems(\"api/EventDisplay\").then(function (response) {\r\n vm.eventDisplayAccess = response.data;\r\n }), function (error) { console.log(error);};\r\n }\r\n \r\n\r\n function getCounts() {\r\n \r\n return dataservice.getItems('api/Counts/ForAdmin').then(function (response) {\r\n var countModel = response.data;\r\n \r\n vm.alertCount = countModel.AlertCount.ActiveCount;\r\n vm.userCount = countModel.UserCount.ActiveCount;\r\n vm.taskCount = countModel.TaskCount.ActiveCount;\r\n vm.logTypeCount = countModel.LogTypeCount.ActiveCount;\r\n vm.completionTypeCount = countModel.CompletionTypeCount.ActiveCount;\r\n vm.filterTypeCount = countModel.FilterTypeCount.ActiveCount;\r\n vm.departmentCount = countModel.DepartmentCount.ActiveCount;\r\n vm.promotionalImageCount = countModel.PromotionalImageCount.ActiveCount;\r\n vm.eventDisplayCount = countModel.EventDisplayCount.ActiveCount;\r\n vm.paymentGatewayCount = countModel.PaymentGatewayCount.ActiveCount;\r\n vm.paymentTemplateCount = countModel.PaymentTemplateCount.ActiveCount;\r\n vm.lostAndFoundCount = countModel.LostAndFoundCount.ActiveCount;\r\n vm.taskTemplateCount = countModel.TaskTemplateCount.ActiveCount;\r\n vm.alertTemplateCount = countModel.AlertTemplateCount.ActiveCount;\r\n return vm.reservations;\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'admin',\r\n config: {\r\n url: '/admin',\r\n templateUrl: 'app/admin/admin.html?v=' + opsIncludeVersion,\r\n controller: 'AdminController',\r\n controllerAs: 'vm',\r\n title: 'Admin',\r\n settings: {\r\n nav: 0,\r\n content: ' Admin',\r\n authMode: 1,\r\n allowedUserTypes: [2, 1]\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.alerts')\r\n .controller('AlertDetailController', AlertDetailController);\r\n\r\n AlertDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice', 'attachmentService', '$window'\r\n ];\r\n\r\n function AlertDetailController($state, $stateParams,\r\n bsDialog, common, dataservice, attachmentService, $window) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.submitForm = submitForm;\r\n vm.isNew = isNew;\r\n vm.openDatePicker = openDatePicker;\r\n vm.dpStatus = {\r\n displayFromOpen: false,\r\n displayToOpen: false\r\n }\r\n vm.fromDateChange = fromDateChange;\r\n vm.toDateChange = toDateChange;\r\n vm.attachmentsToRemove = [];\r\n vm.deleteAttachment = deleteAttachment;\r\n vm.departments = [];\r\n vm.templates = [];\r\n vm.templateChange = templateChange;\r\n\r\n activate();\r\n\r\n function activate() {\r\n initLookups();\r\n getItem();\r\n }\r\n\r\n function openDatePicker($event, isFrom) {\r\n if (isFrom) {\r\n vm.dpStatus.displayFromOpen = true;\r\n }\r\n else {\r\n vm.dpStatus.displayToOpen = true;\r\n }\r\n }\r\n\r\n function deleteAttachment(item, slide) {\r\n vm.attachmentsToRemove.push(slide.ID);\r\n $.each(item.Attachments, function (index, result) {\r\n if (result[\"ID\"] == slide.ID) {\r\n item.Attachments.splice(index, 1);\r\n }\r\n })\r\n }\r\n\r\n function fromDateChange() {\r\n vm.item.DisplayToDate = moment(vm.item.DisplayFromDate).add(vm.daysBetweenDates, 'days').toDate();\r\n }\r\n\r\n function toDateChange() {\r\n vm.daysBetweenDates = moment(vm.item.DisplayToDate).diff(vm.item.DisplayFromDate, 'days');\r\n }\r\n\r\n function submitForm(valid) {\r\n save();\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n if ($stateParams.fromDisplay) {\r\n $state.go(\"alerts.display\")\r\n }\r\n else {\r\n $state.go(\"alerts.list\");\r\n }\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Alert')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/Alerts/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"0\";\r\n \r\n }\r\n\r\n function initLookups() {\r\n dataservice.getItems(\"api/Departments/ActiveForUser\").then(function (data) {\r\n vm.departments = data.data;\r\n vm.departments.push({ ID: -1, Description: \"(all)\" });\r\n }, function (error) { });\r\n\r\n dataservice.getItems(\"api/Alerts/GetTemplatesForUser\").then(function (data) {\r\n vm.templates = data.data;\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '0') {\r\n vm.item = {};\r\n vm.item.DisplayFromDate = vm.item.DisplayFromTime = common.getMainState(\"mainDate\");\r\n vm.item.DisplayToDate = vm.item.DisplayToTime = moment(common.getMainState(\"mainDate\")).add(1, 'day').startOf('day').toDate();\r\n vm.item.Attachments = [];\r\n vm.daysBetweenDates = 1;\r\n vm.item.DepartmentId = parseInt($window.localStorage.getItem(\"SevenPointAlertDepartmentId\")) || -1;\r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/Alerts/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n common.convertUtcKeysToLocal(vm.item);\r\n \r\n vm.item.DisplayFromDate = vm.item.DisplayFromTime = vm.item.DisplayFromUtc;\r\n \r\n vm.item.DisplayToDate = vm.item.DisplayToTime = vm.item.DisplayToUtc;\r\n common.setAuditInfo(vm.item);\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function save() {\r\n var fromLocal = common.buildDateTime(vm.item.DisplayFromDate, vm.item.DisplayFromTime);\r\n var toLocal = common.buildDateTime(vm.item.DisplayToDate, vm.item.DisplayToTime);\r\n if (toLocal < fromLocal) {\r\n logger.error(\"Display To must be after Display From\")\r\n return;\r\n }\r\n\r\n vm.item.DisplayFromUtc = moment(fromLocal).toISOString();\r\n vm.item.DisplayToUtc = moment(toLocal).toISOString();\r\n $window.localStorage.setItem(\"SevenPointAlertDepartmentId\", vm.item.DepartmentId);\r\n var toSave = {\r\n CreatedById: vm.item.CreatedById,\r\n DepartmentId: vm.item.DepartmentId,\r\n Description: vm.item.Description,\r\n DisplayFromUtc: vm.item.DisplayFromUtc,\r\n DisplayToUtc: vm.item.DisplayToUtc,\r\n ID: vm.item.ID\r\n }\r\n vm.isSaving = true;\r\n dataservice.saveItem('api/Alerts', toSave).then(function (saveResult) {\r\n attachmentService.remove(vm.attachmentsToRemove);\r\n \r\n attachmentService.upload(\"Alert\", saveResult.data.ID).then(function (attachmentResponse) {\r\n vm.isSaving = false;\r\n common.notifier.notify(common.config.events.refreshCounts);\r\n backToList();\r\n }, function (error) { });\r\n \r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n\r\n function templateChange() {\r\n if (vm.selectedTemplate) {\r\n for (var i = 0; i < vm.templates.length; i++) {\r\n var t = vm.templates[i];\r\n if (vm.selectedTemplate === t.UId) {\r\n vm.item.Description = t.Description;\r\n vm.item.DepartmentId = t.DepartmentId;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.alerts')\r\n .controller('AlertsController', AlertsController);\r\n\r\n AlertsController.$inject = ['$scope', 'common', 'dataservice', 'config', 'carousel.dialog', 'backendHubProxy'];\r\n /* @ngInject */\r\n function AlertsController($scope, common, dataservice, config, carouselDialog, backendHubProxy) {\r\n var vm = this;\r\n \r\n vm.title = \"Alerts\"\r\n vm.items = [];\r\n vm.isLoading = true;\r\n vm.onDate = common.getMainState(\"mainDate\");\r\n vm.processAlert = processAlert;\r\n vm.hasBeenAcknowledged = hasBeenAcknowledged;\r\n vm.isNewAlert = isNewAlert;\r\n vm.refresh = getItems;\r\n vm.canEdit = canEdit;\r\n vm.showAttachments = showAttachments;\r\n\r\n $scope.$on('$destroy', function () {\r\n backendHubProxy.stop();\r\n });\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n backendHubProxy.startListening();\r\n common.notifier.subscribe(common.config.events.mainDateChange, $scope, dateChanged);\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n common.notifier.notify(config.events.refreshCounts);\r\n }, function (error) { });\r\n }\r\n\r\n function processAlert($event, alert) { \r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n dataservice.putItem(\"api/Alerts/AcknowledgeAlert/\" + alert.ID);\r\n alert.AcknowledgedUtc = new Date();\r\n common.notifier.notify(config.events.refreshCounts);\r\n }\r\n\r\n function canEdit(item) {\r\n if (common.userService.userType() == \"0\") {\r\n return common.userService.userId() == item.CreatedById;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n function showAttachments(i, $event) {\r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n var title = i.Description;\r\n return dataservice.getItems('api/Attachments/GetForParentType/7/' + i.ID).then(function (response) {\r\n return carouselDialog.display(response.data).then(function () { }, function () { });\r\n }, function (error) { });\r\n }\r\n\r\n \r\n\r\n function getItems() {\r\n var m = moment(common.buildDateTime(vm.onDate, new Date())).toISOString();\r\n \r\n \r\n return dataservice.getItems('api/Alerts/GetForDate?localDate=' + m).then(function (response) {\r\n vm.items = response.data;\r\n //common.convertDateStringsToDates(vm.items);\r\n vm.displayedItems = [].concat(vm.items);\r\n backendHubProxy.items = vm.items;\r\n backendHubProxy.displayedItems = vm.displayedItems;\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function dateChanged(eventName, newDate) {\r\n vm.onDate = newDate;\r\n getItems();\r\n }\r\n\r\n function hasBeenAcknowledged(item) {\r\n return item.AcknowledgedUtc;\r\n }\r\n\r\n function isNewAlert(item) {\r\n return !item.AcknowledgedUtc;\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.alerts')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'alerts',\r\n config: {\r\n abstract: true,\r\n url: '/alerts',\r\n template: '',\r\n settings: {\r\n authMode: 1,\r\n badgeContent: '{{vm.alertsCount}}',\r\n requireOps: true\r\n \r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'alerts.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/alerts/list.html?v=' + opsIncludeVersion,\r\n controller: 'AlertsListController',\r\n controllerAs: 'vm',\r\n title: 'Alerts!',\r\n resolve: {\r\n isAdmin: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'alerts.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/alerts/details.html?v=' + opsIncludeVersion,\r\n controller: 'AlertDetailController',\r\n controllerAs: 'vm',\r\n title: 'Alerts!',\r\n params: {fromDisplay:true},\r\n settings: {\r\n }\r\n }\r\n },\r\n {\r\n state: 'alerts.display',\r\n config: {\r\n url: '/display',\r\n templateUrl: 'app/alerts/alerts.html?v=' + opsIncludeVersion,\r\n controller: 'AlertsController',\r\n controllerAs: 'vm',\r\n title: 'Alerts!',\r\n settings: {\r\n nav: 300,\r\n content: ' 0 ? \\'faa-flash animated\\' : \\'\\'\"> Alerts!',\r\n badgeContent: '{{vm.alertsCount}}',\r\n authMode: 1,\r\n requireOps: true,\r\n mobileButton: true\r\n }\r\n }\r\n },\r\n {\r\n state: 'alerts.templates',\r\n config: {\r\n url: '/templates',\r\n templateUrl: 'app/alerts/templatesList.html?v=' + opsIncludeVersion,\r\n controller: 'AlertsTemplatesController',\r\n controllerAs: 'vm',\r\n title: 'Alert Templates',\r\n resolve: {\r\n canAccess: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'alerts.templatedetails',\r\n config: {\r\n url: '/templatedetails/:uid',\r\n templateUrl: 'app/alerts/templatedetails.html?v=' + opsIncludeVersion,\r\n controller: 'AlertTemplateDetailController',\r\n controllerAs: 'vm',\r\n title: 'Alert Template',\r\n resolve: {\r\n canAccess: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.alerts')\r\n .controller('AlertsListController', AlertsListController);\r\n\r\n AlertsListController.$inject = ['common', 'dataservice', 'bootstrap.dialog', 'config'];\r\n /* @ngInject */\r\n function AlertsListController(common, dataservice, bsDialog, config) {\r\n var vm = this;\r\n\r\n vm.title = 'Alerts';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.refresh = refresh;\r\n vm.showItemDetails = showItemDetails;\r\n\r\n vm.toDate = new Date();\r\n vm.fromDate = moment().add(-30, 'days').toDate();\r\n vm.getItems = getItems;\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(config.events.refreshCounts);\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n\r\n var f = moment(vm.fromDate).format(\"YYYYMMDD\");\r\n var t = moment(vm.toDate).format(\"YYYYMMDD\");\r\n\r\n\r\n return dataservice.getItems('api/Alerts/GetForRange/' + f + '/' + t).then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function showItemDetails(i) {\r\n return bsDialog.htmlBodyDialog(i.Title, i.Description);\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.alerts')\r\n .controller('AlertsTemplatesController', AlertsTemplatesController);\r\n\r\n AlertsTemplatesController.$inject = ['common', 'dataservice', 'config'];\r\n /* @ngInject */\r\n function AlertsTemplatesController(common, dataservice, config) {\r\n var vm = this;\r\n vm.title = 'Alert Templates';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(config.events.refreshCounts);\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/Alerts/GetTemplates').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.alerts')\r\n .controller('AlertTemplateDetailController', AlertTemplateDetailController);\r\n\r\n AlertTemplateDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice', '$window', '$timeout'\r\n ];\r\n\r\n function AlertTemplateDetailController($state, $stateParams,\r\n bsDialog, common, dataservice, $window, $timeout) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n vm.departments = [];\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem(), initLookups()];\r\n return common.$q.all(promises).then(function (data) {\r\n }, function (error) { });\r\n \r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"alerts.templates\");\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Alert Template')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/Alerts/DeleteTemplate/\" + vm.item.UId).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.uid; \r\n return val === \"\";\r\n }\r\n\r\n function initLookups() {\r\n return dataservice.getItem(\"api/Departments/Active\")\r\n .then(function (response) {\r\n if (response) {\r\n vm.departments = response.data;\r\n vm.departments.push({ ID: -1, Description: \"(all)\" });\r\n }\r\n }).catch(function (error) {\r\n logger.error('Error loading departments');\r\n \r\n });\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.uid;\r\n \r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.DepartmentId = parseInt($window.localStorage.getItem(\"SevenPointAlertDepartmentId\")) || -1;\r\n }\r\n else {\r\n return dataservice.getItem(\"api/Alerts/Template/\" + val)\r\n .then(function (response) {\r\n if (response) {\r\n vm.item = response.data;\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n }\r\n\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n dataservice.saveItem('api/Alerts/SaveTemplate', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.book')\r\n .controller('BookController', BookController);\r\n\r\n BookController.$inject = ['$scope', '$filter', '$state', 'common', 'dataservice', 'completionsDataService',\r\n 'userService', 'backendHubProxy', '$interval', 'notesDataService', 'config' ];\r\n /* @ngInject */\r\n function BookController($scope, $filter, $state, common, dataservice, completionsDataService, userService, \r\n backendHubProxy, $interval, notesDataService, config ) {\r\n var vm = this;\r\n var _defaultRefreshTime = 600000;\r\n vm.common = common;\r\n vm.connectionStatus = \"\";\r\n vm.showDailySetup = userService.hasOps() == \"1\";\r\n vm.isLoading = true;\r\n vm.title = \"Book\";\r\n vm.refresh = refresh;\r\n vm.completionsDataService = completionsDataService;\r\n vm.notesDataService = notesDataService;\r\n vm.userService = common.userService;\r\n vm.dataService = dataservice;\r\n vm.noDataMessage = \"\";\r\n vm.items = [];\r\n vm.displayedItems = [];\r\n vm.today = function () {\r\n common.notifier.notify(config.events.mainDateToday);\r\n }\r\n vm.filterRooms = filterRooms;\r\n vm.lastRefreshed = \"loading\";\r\n vm.showRoomCode = window.localStorage.getItem(\"OpsShowRoomCode\") == \"true\" ? true : false;\r\n vm.roomCodeText = vm.showRoomCode ? \"Show Room Description\" : \"Show Room Code\";\r\n vm.toggleShowRoomCode = toggleShowRoomCode;\r\n vm.bookData = [];\r\n vm.displayedBookData = [];\r\n \r\n vm.onDate = common.getMainState(\"mainDate\");\r\n \r\n vm.allCompletionTypes = [];\r\n \r\n vm.settings = [];\r\n \r\n vm.filtersSet = false;\r\n\r\n vm.filtersForDailySetup = {}; \r\n vm.showHelp = false;\r\n vm.apiVersion = 0;\r\n vm.apiTypeId = common.userService.apiTypeId();\r\n vm.eventBarColor = \"#1171a3\";\r\n vm.reservedBarColor = \"grey\";\r\n vm.cancelledBarColor = \"red\";\r\n vm.textColor = \"white\";\r\n vm.searchText = \"\";\r\n vm.filters = {\r\n GmtFromDate: '1/1/2015',\r\n GmtToDate: new Date().toUTCString(),\r\n Buildings: [-1],\r\n Statuses: [-1],\r\n Categories: [-1],\r\n Views: [],\r\n Udfs: [],\r\n LimitToBookingsWithSelectedCategories: false,\r\n LocalDateOnlyIsoString: moment(vm.onDate).format(\"YYYY-MM-DD\"),\r\n ShowEventsWithinThisManyDays : null\r\n };\r\n\r\n $scope.$on('$destroy', function () {\r\n backendHubProxy.stop();\r\n });\r\n\r\n vm.applyFilter = null;\r\n \r\n activate();\r\n\r\n function toggleShowRoomCode() {\r\n \r\n vm.showRoomCode = !vm.showRoomCode;\r\n window.localStorage.setItem(\"OpsShowRoomCode\", '' + vm.showRoomCode);\r\n if (vm.showRoomCode) {\r\n vm.roomCodeText = \"Show Room Description\";\r\n }\r\n else {\r\n vm.roomCodeText = \"Show Room Code\";\r\n }\r\n \r\n }\r\n\r\n function activate() {\r\n common.notifier.subscribe(common.config.events.signalRStatusChange, $scope, function (eventName, data) {\r\n vm.connectionStatus = data;\r\n });\r\n\r\n _initFilters();\r\n backendHubProxy.displayedItems = vm.displayedItems;\r\n backendHubProxy.bookData = vm.bookData;\r\n var clone = structuredClone(vm.bookData);\r\n backendHubProxy.displayedBookData = clone;\r\n vm.displayedBookData = clone;\r\n\r\n backendHubProxy.startListening();\r\n\r\n common.notifier.subscribe(common.config.events.userConfigOptionsChange, $scope, filtersChanged);\r\n common.notifier.subscribe(common.config.events.mainDateChange, $scope, dateChanged);\r\n completionsDataService.clearCache();\r\n var promises = [loadData()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(common.config.events.refreshCounts);\r\n \r\n vm.isLoading = false;\r\n \r\n vm.applyFilter = common.createSearchThrottle(vm, 'bookData', 'displayedBookData', 'bookFilter');\r\n \r\n \r\n }, function (error) { });\r\n }\r\n\r\n //we need this for signalr stuff\r\n $scope.$watchCollection('vm.displayedItems', function (newCollection, oldCollection, scope) {\r\n //_setBookingCollections();\r\n })\r\n vm.bookFilter = bookFilter;\r\n function bookFilter(item) {\r\n var lowerSearch = vm.searchText.toLowerCase();\r\n if (lowerSearch.length == 0)\r\n return item;\r\n\r\n var filteredRooms = item.Rooms.filter(function (r) {\r\n \r\n if (r.Description.toLowerCase().indexOf(lowerSearch) != -1) {\r\n return r;\r\n }\r\n });\r\n item.Rooms = filteredRooms;\r\n if (item.Rooms.length > 0) {\r\n return item;\r\n }\r\n \r\n }\r\n\r\n function filterRooms() {\r\n vm.applyFilter();\r\n //common.createSearchThrottle()\r\n //console.log(vm.searchText);\r\n }\r\n \r\n function _initFilters() {\r\n\r\n var gmtToDate = new Date();\r\n gmtToDate.setHours(0, 0, 0, 0);\r\n vm.filters.GmtToDate = moment(gmtToDate).add(1, 'd').toDate();\r\n\r\n var filterData = userService.filterData();\r\n\r\n if (filterData) {\r\n if (filterData.categories) {\r\n var roomChargeIndex = filterData.categories.indexOf(\"2147483647\");\r\n if (roomChargeIndex > -1) {\r\n filterData.categories.splice(roomChargeIndex, 1);\r\n }\r\n }\r\n \r\n vm.filters.Buildings = filterData.buildings;\r\n vm.filters.Statuses = filterData.statuses;\r\n vm.filters.Categories = filterData.categories;\r\n vm.filters.RoomTypes = filterData.roomTypes || [];\r\n vm.filters.EventTypes = filterData.eventTypes || [];\r\n vm.filters.Views = filterData.views || [];\r\n vm.filters.Udfs = filterData.udfs || [];\r\n vm.filters.LimitToBookingsWithSelectedCategories = filterData.includeBookingWithCategoriesOnly;\r\n vm.minutesSinceLastChangeFlag = filterData.highlightChangesWithin;\r\n vm.filters.showReservedTimes = filterData.showReservedTimes;\r\n vm.filters.ShowEventsWithinThisManyDays = filterData.ShowEventsWithinThisManyDays;\r\n }\r\n $scope.filters = filterData;\r\n }\r\n \r\n function _setfilterDates() {\r\n var gmtFromDate = new Date(vm.onDate);\r\n gmtFromDate.setHours(0, 0, 0, 0);\r\n vm.filters.GmtFromDate = gmtFromDate;\r\n vm.filters.LocalDateOnlyIsoString = moment(vm.onDate).format(\"YYYY-MM-DD\")\r\n vm.filters.GmtToDate = moment(gmtFromDate).add(1, 'd').toDate();\r\n }\r\n\r\n function filtersChanged(eventName, data) {\r\n \r\n _initFilters();\r\n getItems();\r\n }\r\n\r\n function dateChanged(eventName, newDate) {\r\n vm.onDate = newDate;\r\n getItems();\r\n }\r\n\r\n function loadData() {\r\n if (vm.apiTypeId !== common.config.apiTypes.centersXml) {\r\n if (!vm.filters.Buildings || !vm.filters.Statuses) {\r\n common.logger.error(\"Filters aren't set\");\r\n vm.filtersSet = false;\r\n return;\r\n }\r\n else {\r\n vm.filtersSet = true;\r\n }\r\n }\r\n else {\r\n vm.filtersSet = true;\r\n }\r\n\r\n _setfilterDates();\r\n\r\n\r\n return dataservice.query('api/Book/InitData', vm.filters).then(function (response) {\r\n \r\n var loadData = response.data;\r\n //console.log(loadData);\r\n vm.settings = loadData.Settings;\r\n vm.allCompletionTypes = loadData.CompletionTypes;\r\n vm.apiVersion = loadData.ApiVersion;\r\n if (!loadData.BookData) {\r\n common.logger.error(\"Whoops....It looks like there was a problem loading your data, if the problem persists contact 7 Point Solutions.\")\r\n }\r\n vm.bookData = loadData.BookData || [];\r\n vm.displayedBookData = structuredClone(vm.bookData)\r\n \r\n _processItems(loadData.Data);\r\n\r\n \r\n\r\n for (var i = 0; i < vm.settings.length; i++) {\r\n if (vm.settings[i].SettingKey == \"BookReservedColor\") {\r\n vm.reservedBarColor = vm.settings[i].SettingValue;\r\n }\r\n else if (vm.settings[i].SettingKey == \"BookEventColor\") {\r\n vm.eventBarColor = vm.settings[i].SettingValue;\r\n }\r\n else if (vm.settings[i].SettingKey == \"BookTextColor\") {\r\n vm.textColor = vm.settings[i].SettingValue;\r\n }\r\n else if (vm.settings[i].SettingKey == \"BookCancelledColor\") {\r\n vm.cancelledBarColor = vm.settings[i].SettingValue;\r\n }\r\n }\r\n \r\n return vm.items;\r\n }, function (error) { });\r\n\r\n }\r\n\r\n function getItems() {\r\n\r\n _stop();\r\n _setfilterDates();\r\n vm.lastRefreshed = \"loading\"\r\n if (vm.filters.ShowEventsWithinThisManyDays) {\r\n var gmtFromDate = moment(vm.filters.GmtFromDate);\r\n var lastDate = new Date();\r\n lastDate.setHours(0, 0, 0, 0);\r\n if (moment(lastDate).add(vm.filters.ShowEventsWithinThisManyDays, 'days').isBefore(gmtFromDate)) {\r\n vm.noDataMessage = \"Your filter does not allow you to see data on this date\";\r\n }\r\n else {\r\n vm.noDataMessage = \"No data matches you filters\";\r\n }\r\n }\r\n\r\n return dataservice.query('api/Book', vm.filters).then(function (response) {\r\n var data = response.data;\r\n vm.bookData = data.BookData;\r\n vm.displayedBookData = structuredClone(data.BookData)\r\n _processItems(data.Data);\r\n \r\n \r\n\r\n }, function (error) { });\r\n }\r\n\r\n function _processItems(items) {\r\n if (!items) {\r\n items = [];\r\n }\r\n else if (items.Message) {\r\n common.logger.error(\"An error occurred trying to load you items, you should contact 7 Point Solutions if the problem persists\");\r\n items = [];\r\n }\r\n \r\n\r\n for (var i = 0; i < items.length; i++) {\r\n items[i].BuildingLocalReseveredStartDisplay = moment(items[i].BuildingLocalReseveredStart).format(\"LT\");\r\n items[i].BuildingLocalReseveredEndDisplay = moment(items[i].BuildingLocalReseveredEnd).format(\"LT\");\r\n items[i].BuildingLocalEventStartDisplay = moment(items[i].BuildingLocalEventStart).format(\"LT\");\r\n items[i].BuildingLocalEventEndDisplay = moment(items[i].BuildingLocalEventEnd).format(\"LT\"); \r\n }\r\n\r\n vm.items = [];\r\n vm.items = items;\r\n \r\n vm.displayedItems = [].concat(vm.items);\r\n vm.origTasks = [];\r\n vm.origAllBookings = [];\r\n items.map(function (item) {\r\n if (item.TaskId == 0) {\r\n vm.origAllBookings.push(item);\r\n }\r\n else {\r\n vm.origTasks.push(item);\r\n }\r\n })\r\n \r\n backendHubProxy.items = vm.items;\r\n backendHubProxy.displayedItems = vm.displayedItems;\r\n backendHubProxy.bookData = vm.bookData || [];\r\n if (vm.bookData) {\r\n var clone = structuredClone(vm.bookData);\r\n backendHubProxy.displayedBookData = clone;\r\n vm.displayedBookData = clone;\r\n }\r\n \r\n _refreshDataIn = _defaultRefreshTime;\r\n vm.lastRefreshed = moment().format(\"hh:mm A\");\r\n _start();\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n\r\n\r\n var _timerPromise, _tickPromise, _refreshDataIn = _defaultRefreshTime;\r\n\r\n function _tick() {\r\n \r\n if (_refreshDataIn >= 0) {\r\n _refreshDataIn = _refreshDataIn - 1000;\r\n }\r\n else {\r\n _refreshDataIn = _defaultRefreshTime;\r\n }\r\n }\r\n\r\n function _stop() {\r\n common.$timeout.cancel(_timerPromise);\r\n $interval.cancel(_tickPromise);\r\n }\r\n\r\n function _start() {\r\n _stop();\r\n _tickPromise = $interval(_tick, 1000);\r\n _timerPromise = common.$timeout(getItems, _refreshDataIn);\r\n }\r\n\r\n\r\n $scope.$on('$destroy', function () {\r\n _stop();\r\n });\r\n\r\n \r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.book')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion', 'config'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion, config) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion, config.apiTypes));\r\n }\r\n\r\n function getStates(opsIncludeVersion, apiTypes) {\r\n return [\r\n {\r\n state: 'book',\r\n config: {\r\n url: '/book',\r\n templateUrl: 'app/book/book.html?v=' + opsIncludeVersion,\r\n controller: 'BookController',\r\n controllerAs: 'vm',\r\n title: 'Book',\r\n settings: {\r\n nav: 250,\r\n content: ' Book',\r\n badgeContent: '',\r\n authMode: 1,\r\n requireOps: true,\r\n requireDataApi: true,\r\n mobileButton: true\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n }\r\n }\r\n },\r\n \r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailySetup')\r\n .directive('spBook', spBook);\r\n\r\n spBook.$inject = ['reactDirective'];\r\n /* @ngInject */\r\n function spBook(reactDirective) {\r\n return reactDirective(Book);\r\n }\r\n})();\r\n\r\n\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.categoryIcons')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'categoryicons',\r\n config: {\r\n abstract: true,\r\n url: '/categoryicons',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'categoryicons.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/categoryIcons/list.html?v=' + opsIncludeVersion,\r\n controller: 'CategoryIconsListController',\r\n controllerAs: 'vm',\r\n title: 'Category Icons'\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.categoryIcons')\r\n .controller('CategoryIconsListController', CategoryIconsListController);\r\n\r\n CategoryIconsListController.$inject = ['common', 'dataservice', 'bootstrap.dialog', 'config'];\r\n /* @ngInject */\r\n function CategoryIconsListController(common, dataservice, bsDialog, config) {\r\n var vm = this;\r\n\r\n vm.title = 'Category/Resource Icons';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.setIcon = setIcon;\r\n vm.bootStrapIcons = [\"adjust\", \"align-center\", \"align-justify\", \"align-left\", \"align-right\", \"arrow-down\", \"arrow-left\", \"arrow-right\", \"arrow-up\", \"asterisk\", \"backward\", \"ban-circle\", \"barcode\", \"bell\", \"bold\", \"book\", \"bookmark\", \"briefcase\", \"bullhorn\", \"calendar\", \"camera\", \"certificate\", \"check\", \"chevron-down\", \"chevron-left\", \"chevron-right\", \"chevron-up\", \"circle-arrow-down\", \"circle-arrow-left\", \"circle-arrow-right\", \"circle-arrow-up\", \"cloud\", \"cloud-download\", \"cloud-upload\", \"cog\", \"collapse-down\", \"collapse-up\", \"comment\", \"compressed\", \"copyright-mark\", \"credit-card\", \"cutlery\", \"dashboard\", \"download\", \"download-alt\", \"earphone\", \"edit\", \"eject\", \"envelope\", \"euro\", \"exclamation-sign\", \"expand\", \"export\", \"eye-close\", \"eye-open\", \"facetime-video\", \"fast-backward\", \"fast-forward\", \"file\", \"film\", \"filter\", \"fire\", \"flag\", \"flash\", \"floppy-disk\", \"floppy-open\", \"floppy-remove\", \"floppy-save\", \"floppy-saved\", \"folder-close\", \"folder-open\", \"font\", \"forward\", \"fullscreen\", \"gbp\", \"gift\", \"glass\", \"globe\", \"hand-down\", \"hand-left\", \"hand-right\", \"hand-up\", \"hdd\", \"hd-video\", \"header\", \"headphones\", \"heart\", \"heart-empty\", \"home\", \"import\", \"inbox\", \"indent-left\", \"indent-right\", \"info-sign\", \"italic\", \"leaf\", \"link\", \"list\", \"list-alt\", \"lock\", \"log-in\", \"log-out\", \"magnet\", \"map-marker\", \"minus\", \"minus-sign\", \"move\", \"music\", \"new-window\", \"off\", \"ok\", \"ok-circle\", \"ok-sign\", \"open\", \"paperclip\", \"pause\", \"pencil\", \"phone\", \"phone-alt\", \"picture\", \"plane\", \"play\", \"play-circle\", \"plus\", \"plus-sign\", \"print\", \"pushpin\", \"qrcode\", \"question-sign\", \"random\", \"record\", \"refresh\", \"registration-mark\", \"remove\", \"remove-circle\", \"remove-sign\", \"repeat\", \"resize-full\", \"resize-horizontal\", \"resize-small\", \"resize-vertical\", \"retweet\", \"road\", \"save\", \"saved\", \"screenshot\", \"sd-video\", \"search\", \"send\", \"share\", \"share-alt\", \"shopping-cart\", \"signal\", \"sort\", \"sort-by-alphabet\", \"sort-by-alphabet-alt\", \"sort-by-attributes\", \"sort-by-attributes-alt\", \"sort-by-order\", \"sort-by-order-alt\", \"sound-5-1\", \"sound-6-1\", \"sound-7-1\", \"sound-dolby\", \"sound-stereo\", \"star\", \"star-empty\", \"stats\", \"step-backward\", \"step-forward\", \"stop\", \"subtitles\", \"tag\", \"tags\", \"tasks\", \"text-height\", \"text-width\", \"th\", \"th-large\", \"th-list\", \"thumbs-down\", \"thumbs-up\", \"time\", \"tint\", \"tower\", \"transfer\", \"trash\", \"tree-conifer\", \"tree-deciduous\", \"unchecked\", \"upload\", \"usd\", \"user\", \"volume-down\", \"volume-off\", \"volume-up\", \"warning-sign\", \"wrench\", \"zoom-in\", \"zoom-out\"];\r\n vm.fontAwesomeIcons = [\"adjust\", \"adn\", \"align-center\", \"align-justify\", \"align-left\", \"align-right\", \"ambulance\", \"anchor\", \"android\", \"angle-double-down\", \"angle-double-left\", \"angle-double-right\", \"angle-double-up\", \"angle-down\", \"angle-left\", \"angle-right\", \"angle-up\", \"apple\", \"archive\", \"arrow-circle-down\", \"arrow-circle-left\", \"arrow-circle-o-down\", \"arrow-circle-o-left\", \"arrow-circle-o-right\", \"arrow-circle-o-up\", \"arrow-circle-right\", \"arrow-circle-up\", \"arrow-down\", \"arrow-left\", \"arrow-right\", \"arrows\", \"arrows-alt\", \"arrows-h\", \"arrows-v\", \"arrow-up\", \"asterisk\", \"backward\", \"ban\", \"bar-chart-o\", \"barcode\", \"bars\", \"beer\", \"bell\", \"bell-o\", \"bitbucket\", \"bitbucket-square\", \"bitcoin\", \"bold\", \"bolt\", \"book\", \"bookmark\", \"bookmark-o\", \"briefcase\", \"btc\", \"bug\", \"building-o\", \"bullhorn\", \"bullseye\", \"calendar\", \"calendar-o\", \"camera\", \"camera-retro\", \"caret-down\", \"caret-left\", \"caret-right\", \"caret-square-o-down\", \"caret-square-o-left\", \"caret-square-o-right\", \"caret-square-o-up\", \"caret-up\", \"certificate\", \"chain\", \"chain-broken\", \"check\", \"check-circle\", \"check-circle-o\", \"check-square\", \"check-square-o\", \"chevron-circle-down\", \"chevron-circle-left\", \"chevron-circle-right\", \"chevron-circle-up\", \"chevron-down\", \"chevron-left\", \"chevron-right\", \"chevron-up\", \"circle\", \"circle-o\", \"clipboard\", \"clock-o\", \"cloud\", \"cloud-download\", \"cloud-upload\", \"cny\", \"code\", \"code-fork\", \"coffee\", \"cog\", \"cogs\", \"columns\", \"comment\", \"comment-o\", \"comments\", \"comments-o\", \"compass\", \"compress\", \"copy\", \"credit-card\", \"crop\", \"crosshairs\", \"css3\", \"cut\", \"cutlery\", \"dashboard\", \"dedent\", \"desktop\", \"dollar\", \"dot-circle-o\", \"download\", \"dribbble\", \"dropbox\", \"edit\", \"eject\", \"ellipsis-h\", \"ellipsis-v\", \"envelope\", \"envelope-o\", \"eraser\", \"eur\", \"euro\", \"exchange\", \"exclamation\", \"exclamation-circle\", \"exclamation-triangle\", \"expand\", \"external-link\", \"external-link-square\", \"eye\", \"eye-slash\", \"facebook\", \"facebook-square\", \"fast-backward\", \"fast-forward\", \"female\", \"fighter-jet\", \"file\", \"file-o\", \"files-o\", \"file-text\", \"file-text-o\", \"film\", \"filter\", \"fire\", \"fire-extinguisher\", \"flag\", \"flag-checkered\", \"flag-o\", \"flash\", \"flask\", \"flickr\", \"floppy-o\", \"folder\", \"folder-o\", \"folder-open\", \"folder-open-o\", \"font\", \"forward\", \"foursquare\", \"frown-o\", \"gamepad\", \"gavel\", \"gbp\", \"gear\", \"gears\", \"gift\", \"github\", \"github-alt\", \"github-square\", \"gittip\", \"glass\", \"globe\", \"google-plus\", \"google-plus-square\", \"group\", \"hand-o-down\", \"hand-o-left\", \"hand-o-right\", \"hand-o-up\", \"hdd-o\", \"headphones\", \"heart\", \"heart-o\", \"home\", \"hospital-o\", \"h-square\", \"html5\", \"inbox\", \"indent\", \"info\", \"info-circle\", \"inr\", \"instagram\", \"italic\", \"jpy\", \"key\", \"keyboard-o\", \"krw\", \"laptop\", \"leaf\", \"legal\", \"lemon-o\", \"level-down\", \"level-up\", \"lightbulb-o\", \"link\", \"linkedin\", \"linkedin-square\", \"linux\", \"list\", \"list-alt\", \"list-ol\", \"list-ul\", \"location-arrow\", \"lock\", \"long-arrow-down\", \"long-arrow-left\", \"long-arrow-right\", \"long-arrow-up\", \"magic\", \"magnet\", \"mail-forward\", \"mail-reply\", \"mail-reply-all\", \"male\", \"map-marker\", \"maxcdn\", \"medkit\", \"meh-o\", \"microphone\", \"microphone-slash\", \"minus\", \"minus-circle\", \"minus-square\", \"minus-square-o\", \"mobile\", \"mobile-phone\", \"money\", \"moon-o\", \"music\", \"outdent\", \"pagelines\", \"paperclip\", \"paste\", \"pause\", \"pencil\", \"pencil-square\", \"pencil-square-o\", \"phone\", \"phone-square\", \"picture-o\", \"pinterest\", \"pinterest-square\", \"plane\", \"play\", \"play-circle\", \"play-circle-o\", \"plus\", \"plus-circle\", \"plus-square\", \"plus-square-o\", \"power-off\", \"print\", \"puzzle-piece\", \"qrcode\", \"question\", \"question-circle\", \"quote-left\", \"quote-right\", \"random\", \"refresh\", \"renren\", \"repeat\", \"reply\", \"reply-all\", \"retweet\", \"rmb\", \"road\", \"rocket\", \"rotate-left\", \"rotate-right\", \"rouble\", \"rss\", \"rss-square\", \"rub\", \"ruble\", \"rupee\", \"save\", \"scissors\", \"search\", \"search-minus\", \"search-plus\", \"share\", \"share-square\", \"share-square-o\", \"shield\", \"shopping-cart\", \"signal\", \"sign-in\", \"sign-out\", \"sitemap\", \"skype\", \"smile-o\", \"sort\", \"sort-alpha-asc\", \"sort-alpha-desc\", \"sort-amount-asc\", \"sort-amount-desc\", \"sort-asc\", \"sort-desc\", \"sort-down\", \"sort-numeric-asc\", \"sort-numeric-desc\", \"sort-up\", \"spinner\", \"square\", \"square-o\", \"stack-exchange\", \"stack-overflow\", \"star\", \"star-half\", \"star-half-empty\", \"star-half-full\", \"star-half-o\", \"star-o\", \"step-backward\", \"step-forward\", \"stethoscope\", \"stop\", \"strikethrough\", \"subscript\", \"suitcase\", \"sun-o\", \"superscript\", \"table\", \"tablet\", \"tachometer\", \"tag\", \"tags\", \"tasks\", \"terminal\", \"text-height\", \"text-width\", \"th\", \"th-large\", \"th-list\", \"thumbs-down\", \"thumbs-o-down\", \"thumbs-o-up\", \"thumbs-up\", \"thumb-tack\", \"ticket\", \"times\", \"times-circle\", \"times-circle-o\", \"tint\", \"toggle-down\", \"toggle-left\", \"toggle-right\", \"toggle-up\", \"trash-o\", \"trello\", \"trophy\", \"truck\", \"try\", \"tumblr\", \"tumblr-square\", \"turkish-lira\", \"twitter\", \"twitter-square\", \"umbrella\", \"underline\", \"undo\", \"unlink\", \"unlock\", \"unlock-alt\", \"unsorted\", \"upload\", \"usd\", \"user\", \"user-md\", \"users\", \"video-camera\", \"vimeo-square\", \"vk\", \"volume-down\", \"volume-off\", \"volume-up\", \"warning\", \"weibo\", \"wheelchair\", \"windows\", \"won\", \"wrench\", \"xing\", \"xing-square\", \"yen\", \"youtube\", \"youtube-play\", \"youtube-square\"];\r\n vm.delete = removeIcon;\r\n vm.saveIcon = saveIcon;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin() , getItems()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function setIcon(item, prefix, icon) {\r\n item.IconClass = prefix + icon;\r\n item.IconName = icon;\r\n saveIcon(item);\r\n \r\n }\r\n\r\n function removeIcon(item) {\r\n item.IconClass = \"\";\r\n item.IconName = \"\";\r\n item.IconColor = \"\";\r\n dataservice.deleteItem(\"api/CategoryIcons/Delete/\" + item.CategoryId);\r\n }\r\n\r\n function saveIcon(item) {\r\n dataservice.saveItem(\"api/CategoryIcons/Save\", item);\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/CategoryIcons/GetList').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.checklists')\r\n .controller('ChecklistDetailController', ChecklistDetailController);\r\n\r\n ChecklistDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function ChecklistDetailController($state, $stateParams,\r\n bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n\r\n vm.cancel = cancel;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.submitForm = submitForm;\r\n vm.isNew = isNew;\r\n\r\n activate();\r\n\r\n function activate() {\r\n common.checkIsAdmin();\r\n getItem();\r\n }\r\n\r\n function submitForm(valid) {\r\n save();\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n window.history.back();\r\n }\r\n\r\n \r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"0\";\r\n \r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n\r\n return dataservice.getItem(\"api/Checklists/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n if (data.data.ID == '0') {\r\n vm.item = {};\r\n vm.item.Active = 1;\r\n vm.item.IsManaged = false;\r\n common.setAuditInfo(vm.item);\r\n }\r\n else {\r\n vm.item = data.data;\r\n common.setAuditInfo(vm.item);\r\n common.convertDateStringsToDates(vm.item);\r\n \r\n }\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n dataservice.saveItem('api/Checklists', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n common.notifier.notify(common.config.events.refreshCounts);\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n\r\n/*\r\nTrix.config.textAttributes.color = {\r\n style: { color: \"red\" },\r\n parser: function (element) {\r\n console.log(element);\r\n return element.style.color === \"red\"\r\n },\r\n inheritable: true\r\n}\r\n\r\nTrix.config.textAttributes.comic = {\r\n style: { fontFamily: \"Comic Sans MS\" },\r\n parser: function (element) {\r\n return element.style.fontFamily.match(/Comic Sans MS/)\r\n },\r\n inheritable: true\r\n}\r\n\r\naddEventListener(\"trix-initialize\", function (event) {\r\n var buttonHTML = ''\r\n\r\n //buttonHTML += ''\r\n\r\n event.target.toolbarElement.\r\n querySelector(\".trix-button-group--text-tools\").\r\n insertAdjacentHTML(\"beforeend\", buttonHTML)\r\n})\r\n\r\n*/","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.checklists')\r\n .controller('ChecklistsController', ChecklistsController);\r\n\r\n ChecklistsController.$inject = ['common', 'dataservice', 'config'];\r\n /* @ngInject */\r\n function ChecklistsController(common, dataservice, config) {\r\n var vm = this;\r\n vm.upcoming = 1;\r\n vm.title = \"Information\"\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(config.events.refreshCounts);\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItem(\"api/Checklists/0\").then(function (response) {\r\n vm.item = response.data;\r\n \r\n return vm.item;\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.checklists')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'checklists',\r\n config: {\r\n abstract: true,\r\n url: '/checklists',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'checklists.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/checklists/details.html?v=' + opsIncludeVersion,\r\n controller: 'ChecklistDetailController',\r\n controllerAs: 'vm',\r\n title: 'Checklist',\r\n settings: {},\r\n resolve: {\r\n isAdmin: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'checklists.display',\r\n config: {\r\n url: '/display',\r\n templateUrl: 'app/checklists/checklists.html?v=' + opsIncludeVersion,\r\n controller: 'ChecklistsController',\r\n controllerAs: 'vm',\r\n title: 'Checklist',\r\n settings: {\r\n nav: 500,\r\n content: ' Information',\r\n authMode: 1\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.community')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'community',\r\n config: {\r\n abstract: true,\r\n url: '/community',\r\n template: '',\r\n \r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'community.topics',\r\n config: {\r\n url: '/topics',\r\n templateUrl: 'app/community/topicsList.html?v=' + opsIncludeVersion,\r\n controller: 'TopicsListController',\r\n controllerAs: 'vm',\r\n title: 'Topics',\r\n settings: {\r\n authMode: 1,\r\n requireOps: true,\r\n nav: 1000,\r\n content: ' Community'\r\n }\r\n }\r\n },\r\n {\r\n state: 'community.topicdetails',\r\n config: {\r\n url: '/topicdetails/:id',\r\n templateUrl: 'app/community/topicDetails.html?v=' + opsIncludeVersion,\r\n controller: 'TopicDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Topic Details'\r\n\r\n\r\n }\r\n }\r\n , {\r\n state: 'community.topicdisplay',\r\n config: {\r\n url: '/topicdisplay/:id',\r\n templateUrl: 'app/community/topicDisplay.html?v=' + opsIncludeVersion,\r\n controller: 'TopicDisplayController',\r\n controllerAs: 'vm',\r\n title: 'OPs Community Conversation'\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.community')\r\n .controller('TopicDetailsController', TopicDetailsController);\r\n\r\n TopicDetailsController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function TopicDetailsController($state, $stateParams, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n vm.cancel = cancel;\r\n \r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem()];\r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n \r\n function backToList() {\r\n $state.go(\"community.topics\");\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"-1\";\r\n }\r\n\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n \r\n if (val === '-1') {\r\n \r\n vm.item = {};\r\n vm.item.ID = -1;\r\n vm.item.Active = 1;\r\n common.setAuditInfo(vm.item);\r\n \r\n return vm.item;\r\n }\r\n\r\n\r\n return dataservice.getItem(\"api/Community/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n common.setAuditInfo(vm.item);\r\n common.convertDateStringsToDates(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n // $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n // $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n vm.item.Active = true;\r\n dataservice.saveItem('api/Community', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.community')\r\n .controller('TopicDisplayController', TopicDisplayController);\r\n\r\n TopicDisplayController.$inject = [\r\n '$scope', '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice', 'backendHubProxy'\r\n ];\r\n\r\n function TopicDisplayController($scope, $state, $stateParams, bsDialog, common, dataservice, backendHubProxy) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n vm.cancel = cancel;\r\n vm.title = \"OPs Community Conversation\";\r\n \r\n vm.item = undefined;\r\n vm.addComment = addComment;\r\n vm.activeComment = {};\r\n vm.items = [];\r\n vm.displayedItems = [].concat(vm.items);\r\n vm.timeToAgo = timeToAgo;\r\n\r\n $scope.$on('$destroy', function () {\r\n backendHubProxy.stop();\r\n });\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n backendHubProxy.startListening();\r\n var promises = [getItem()];\r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n \r\n function backToList() {\r\n $state.go(\"community.topics\");\r\n }\r\n\r\n function addComment() {\r\n if (vm.activeComment && vm.item) {\r\n if (!vm.activeComment.CommunityTopicUId) {\r\n vm.activeComment.CommunityTopicUId = vm.item.UId;\r\n }\r\n\r\n return dataservice.saveItem(\"api/Community/SaveComment\", vm.activeComment)\r\n .then(function (response) {\r\n vm.activeComment = {};\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while saving comment, please try again');\r\n console.log(error);\r\n });\r\n }\r\n vm.activeComment = {};\r\n }\r\n\r\n function timeToAgo(d) {\r\n var x = moment.utc(d).toDate();\r\n return moment(x).fromNow();\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n \r\n return dataservice.getItem(\"api/Community/Details/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n \r\n vm.items = vm.item.TopicComments;\r\n vm.displayedItems = [].concat(vm.items);\r\n backendHubProxy.items = vm.items;\r\n backendHubProxy.displayedItems = vm.displayedItems;\r\n backendHubProxy.topic = vm.item;\r\n\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.community')\r\n .controller('TopicsListController', TopicsListController);\r\n\r\n TopicsListController.$inject = ['$state', 'common', 'dataservice', 'bootstrap.dialog', 'config'];\r\n /* @ngInject */\r\n function TopicsListController($state, common, dataservice, bsDialog, config) {\r\n var vm = this;\r\n\r\n vm.title = 'Community Topics';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.navigateToTopic = navigateToTopic;\r\n vm.timeToAgo = timeToAgo;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/Community/Topics').then(function (response) {\r\n vm.items = response.data;\r\n\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function navigateToTopic(topicUId) {\r\n var dto = {\r\n Data: topicUId\r\n };\r\n \r\n return dataservice.saveItem('api/Community/TopicViewed', dto).then(function (response) {\r\n $state.go('community.topicdisplay', { 'id': topicUId });\r\n }, function (error) { });\r\n }\r\n\r\n function timeToAgo(d) {\r\n var x = moment.utc(d).toDate();\r\n return moment(x).fromNow();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.completions')\r\n .factory('completions.dialog', completionsDialog);\r\n\r\n completionsDialog.$inject = ['$uibModal', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function completionsDialog($uibModal, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n \r\n return service;\r\n\r\n function display(item) {\r\n var modalOptions = {\r\n ariaLabelledBy: \"labelby\",\r\n templateUrl: 'app/dialogs/_modalTemplateDialog.html?v=' + opsIncludeVersion,\r\n controller: CompletionsModalInstance,\r\n controllerAs: 'vm',\r\n keyboard: true,\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n item: item,\r\n includeTemplate: 'app/completions/_completions.html?v=' + opsIncludeVersion\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $uibModal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n CompletionsModalInstance.$inject = ['$uibModalInstance', 'options', 'config', 'common', 'dataservice', 'completionsService'];\r\n\r\n /* @ngInject */\r\n function CompletionsModalInstance($uibModalInstance, options, config, common, dataservice, completionsService) {\r\n var vm = this;\r\n vm.isSaving = false;\r\n vm.item = options.item;\r\n vm.includeTemplate = options.includeTemplate;\r\n vm.okText = 'Close';\r\n vm.allDone = [];\r\n vm.ok = function () {\r\n $uibModalInstance.close('ok');\r\n };\r\n vm.cancel = function () {\r\n $uibModalInstance.dismiss('cancel');\r\n };\r\n vm.completeItem = completeItem;\r\n vm.title = vm.item.BookingId > 0 ? vm.item.EventName : vm.item.TaskDescription;\r\n vm.completionButtonClass = completionButtonClass;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function () {\r\n }, function (error) { });\r\n }\r\n\r\n function completionButtonClass(completionTypeId) {\r\n var lastCompletion = completionsService.getLastCompletionForType(completionTypeId, vm.item);\r\n \r\n if (lastCompletion) {\r\n if (lastCompletion.CompletedAtUtc != null) {\r\n return \"btn btn-success\";\r\n }\r\n else {\r\n return \"btn btn-danger\";\r\n }\r\n }\r\n else {\r\n return \"btn btn-danger\";\r\n }\r\n\r\n }\r\n\r\n function completeItem(completionTypeId) {\r\n var completion = completionsService.getLastCompletionForType(completionTypeId, vm.item);\r\n var isComplete = false;\r\n if (completion) {\r\n if (completion.CompletedAtUtc == null) {\r\n isComplete = true;\r\n }\r\n }\r\n else {\r\n isComplete = true;\r\n }\r\n vm.isSaving = true;\r\n var completionDto = {};\r\n completionDto.BookingId = vm.item.BookingId;\r\n completionDto.TaskId = vm.item.TaskId;\r\n completionDto.DailyLogEntryId = vm.item.DailyLogEntryId;\r\n completionDto.IsComplete = isComplete;\r\n completionDto.CompletionTypeId = completionTypeId;\r\n completionDto.DisplayedOn = moment(common.getMainState(\"mainDate\")).format(\"YYYYMMDD\");\r\n\r\n dataservice.saveItem('api/DailySetup/NewCompletion', completionDto).then(function (saveResult) {\r\n common.notifier.notify(config.events.refreshCounts);\r\n vm.isSaving = false;\r\n var savedCompletion = saveResult.data;\r\n //vm.item.Completions.push(savedCompletion);\r\n //completionsService.sort(vm.item.Completions);\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n\r\n\r\n\r\n function getItems() {\r\n var path = 'api/CompletionTypes/';\r\n\r\n if (vm.item.TaskId > 0) {\r\n path += 'GetForTask';\r\n }\r\n else if (vm.item.DailyLogEntryId && vm.item.DailyLogEntryId > 0) {\r\n path += 'GetForLog';\r\n }\r\n else if (vm.item.ID) {\r\n path += 'GetForServiceOrder';\r\n }\r\n else if (vm.item.BookingId > 0) {\r\n path += 'GetForBooking';\r\n }\r\n else {\r\n path += 'GetForLog';\r\n }\r\n return dataservice.getItems(path).then(function (response) {\r\n vm.completionTypes = response.data;\r\n vm.allDone = vm.completionTypes.filter(function (e) {\r\n return e.ID == 0;\r\n })\r\n return vm.completionTypes;\r\n }, function (error) { });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.completions')\r\n .factory('completions', completions);\r\n\r\n completions.$inject = ['completions.dialog', 'completionsService'];\r\n\r\n /* @ngInject */\r\n function completions(dialog, completionsService) {\r\n var service = {\r\n complete: complete,\r\n completionClass: completionClass,\r\n completionInitials: completionInitials,\r\n completeCallback: null,\r\n completionShowing: null,\r\n hasCompletionType: completionsService.hasCompletionType,\r\n isAllDone: completionsService.isAllDone,\r\n isNothingCompleted: completionsService.isNothingCompleted,\r\n showCompletionDot: showCompletionDot\r\n };\r\n\r\n return service;\r\n\r\n function complete(i, $event) {\r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n if (service.completionShowing) {\r\n service.completionShowing();\r\n }\r\n var title = i.BookingId > 0 ? i.EventName : i.TaskDescription;\r\n\r\n return dialog.display(i).then(function () {\r\n if (service.completeCallback) {\r\n service.completeCallback();\r\n }\r\n }, function () { });\r\n }\r\n\r\n function showCompletionDot(item, completionTypes) {\r\n \r\n return completionsService.isAllDone(item) || completionsService.isNothingCompleted(item, completionTypes)\r\n }\r\n\r\n function completionClass(item) {\r\n var completion = item.Completions[0];\r\n\r\n if (completion) {\r\n if (completion.CompletedAtUtc) {\r\n if (completion.Color) {\r\n return { \"background-color\": completion.Color }\r\n }\r\n else {\r\n return { \"background-color\": \"#076d10\" }\r\n }\r\n }\r\n }\r\n return { \"background-color\": \"red\" };\r\n }\r\n\r\n function completionInitials(item) {\r\n var completion = item.Completions[0];\r\n if (completion) {\r\n if (completion.CompletedAtUtc) {\r\n return completion.Initials;\r\n }\r\n }\r\n }\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.completions')\r\n .factory('completionsService', completionsService);\r\n\r\n //completionsService.$inject = ['completions.dialog'];\r\n\r\n /* @ngInject */\r\n function completionsService() {\r\n var service = {\r\n sort: sort,\r\n isCompletionType: isCompletionType,\r\n getLastCompletionForType: getLastCompletionForType,\r\n hasCompletionType: hasCompletionType,\r\n isAllDone: isAllDone,\r\n isNothingCompleted: isNothingCompleted,\r\n \r\n };\r\n\r\n return service;\r\n\r\n function sort(completions) {\r\n completions.sort(function (a, b) {\r\n a = new Date(a.DateAddedUtc);\r\n b = new Date(b.DateAddedUtc);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n }\r\n \r\n\r\n \r\n \r\n function isCompletionType(completionTypeId) {\r\n return function (element) {\r\n return element.CompletionTypeId == completionTypeId;\r\n }\r\n }\r\n\r\n function getLastCompletionForType(completionTypeId, item) {\r\n var completions = item.Completions.filter(isCompletionType(completionTypeId));\r\n completions.sort(function (a, b) {\r\n a = new Date(a.DateAddedUtc);\r\n b = new Date(b.DateAddedUtc);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n\r\n return completions[0];\r\n }\r\n\r\n function isAllDone(item) {\r\n var com = getLastCompletionForType(0, item);\r\n if (com) {\r\n if (com.CompletedAtUtc != null) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function isNothingCompleted(item, completionTypes) {\r\n for (var i = 0; i < completionTypes.length; i++) {\r\n var completion = getLastCompletionForType(completionTypes[i].ID, item);\r\n if (completion) {\r\n if (completion.CompletedAtUtc != null) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n\r\n }\r\n\r\n\r\n function hasCompletionType(ct, item) {\r\n var completion = getLastCompletionForType(ct.ID, item);\r\n if (completion) {\r\n if (completion.CompletedAtUtc != null) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.completions')\r\n .directive('completionsCell', completionsCell);\r\n\r\n completionsCell.$inject = [ 'opsIncludeVersion']\r\n /* @ngInject */\r\n function completionsCell(opsIncludeVersion) {\r\n \r\n var directive = {\r\n restrict: 'A',\r\n link: link,\r\n scope: {\r\n 'item': '=',\r\n 'completions': '=',\r\n 'completionTypes': '='\r\n \r\n },\r\n templateUrl: 'app/completions/_completionCell.html?v=' + opsIncludeVersion\r\n };\r\n\r\n return directive;\r\n\r\n\r\n function link(scope, element, attrs) {\r\n \r\n }\r\n\r\n \r\n\r\n }\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.completions')\r\n .factory('completionsDataService', completionsDataService);\r\n\r\n completionsDataService.$inject = ['dataservice', 'common'];\r\n /* @ngInject */\r\n function completionsDataService(dataservice, common) {\r\n var $q = common.$q;\r\n var cachedTaskCompletionTypes = null;\r\n var cachedBookingCompletionTypes = null;\r\n var cachedServiceOrderCompletionTypes = null;\r\n\r\n var service = {\r\n getCompletionTypesForItem: getCompletionTypesForItem,\r\n clearCache: clearCache,\r\n completeItem: completeItem,\r\n getLastCompletionForType: getLastCompletionForType,\r\n getIcs: getIcs\r\n\r\n \r\n };\r\n\r\n return service;\r\n\r\n function _multiLineNote(notes, padding) {\r\n var result = notes;\r\n \r\n result = result.replace(/\\r\\n/g, \"\\\\n\" + padding);\r\n result = result.replace(/\\r/g, \"\\\\n\" + padding);\r\n result = result.replace(/\\n/g, \"\\\\n\" + padding);\r\n \r\n return result;\r\n }\r\n\r\n function getIcs(bookingData) {\r\n \r\n var ics = \"\";\r\n ics += \"BEGIN:VCALENDAR\\n\";\r\n ics += \"VERSION:2.0\\n\";\r\n ics += \"PRODID:7PointOps.com\\n\";\r\n ics += \"METHOD:PUBLISH\\n\";\r\n ics += \"BEGIN:VEVENT\\n\";\r\n ics += \"DTSTART:\" + moment(bookingData.BuildingLocalEventStart).format('YYYYMMDDTHHmmss') + \"\\n\";\r\n ics += \"DTEND:\" + moment(bookingData.BuildingLocalEventEnd).format('YYYYMMDDTHHmmss') + \"\\n\";\r\n ics += \"SUMMARY:\" + bookingData.EventName + \"\\n\";\r\n var bcDash = \"\";\r\n if (bookingData.BuildingCode) {\r\n bcDash = \" - \";\r\n }\r\n ics += \"LOCATION:\" + bookingData.BuildingCode + bcDash + bookingData.RoomDescription + \" - (\" + bookingData.SetupType + \", \" + bookingData.SetupCount + \")\\n\";\r\n\r\n var servicesText = \"\";\r\n \r\n for (var i = 0; i < bookingData.Services.length; i++) {\r\n if (i > 0) {\r\n servicesText += \"\\\\n\";\r\n }\r\n var so = bookingData.Services[i];\r\n var sods = so.ServiceOrderDetails;\r\n \r\n \r\n switch (so.Category.ResourceCategoryTypeCode) {\r\n case \"CAT\":\r\n servicesText += so.Category.Description + \" - \" + so.ServiceType + \" (\" + so.EstimatedCount + \") from \" + moment(so.TimeStart).format(\"LT\") + \" to \" + moment(so.TimeEnd).format(\"LT\") + \"\\\\n\";\r\n for (var j = 0; j < sods.length; j++) {\r\n var sod = sods[j];\r\n servicesText += \" - \" + sod.Quantity + \" \" + (sod.TempResourceDescription || ((sod.Resource && sod.Resource.Description) || \"Bad Config - Missing Resource\")) + \"\\\\n\";\r\n if (sod.Groupings) {\r\n for (var ii = 0; ii < sod.Groupings.length; ii++) {\r\n servicesText += \" -\" + sod.Groupings[ii].Description + \"\\\\n\";\r\n for (var iii = 0; iii < sod.Groupings[ii].Items.length; iii++) {\r\n var gItem = sod.Groupings[ii].Items[iii];\r\n servicesText += \" -\" + gItem.Description;\r\n if (gItem.Notes) {\r\n servicesText += \" - \" + _multiLineNote(gItem.Notes, \" \");\r\n }\r\n servicesText += \"\\\\n\";\r\n }\r\n }\r\n }\r\n if (sod.Notes) {\r\n servicesText += \" - \" + _multiLineNote(sod.Notes, \" \") + \"\\\\n\";\r\n }\r\n if (sod.SpecialInstructions) {\r\n servicesText += \" - \" + _multiLineNote(sod.SpecialInstructions, \" \") + \"\\\\n\";\r\n }\r\n }\r\n\r\n break;\r\n case \"RSO\":\r\n servicesText += so.Category.Description +\" from \" + moment(so.TimeStart).format(\"LT\") + \" to \" + moment(so.TimeEnd).format(\"LT\") + \"\\\\n\";\r\n for (var rsoj = 0; rsoj < sods.length; rsoj++) {\r\n var rsoSod = sods[rsoj];\r\n servicesText += \" - \" + rsoSod.Quantity + \" \" + (rsoSod.TempResourceDescription || ((rsoSod.Resource && rsoSod.Resource.Description) || \"Bad Config - Missing Resource\")) + \"\\\\n\";\r\n if (rsoSod.Groupings) {\r\n for (var rsoii = 0; rsoii < rsoSod.Groupings.length; rsoii++) {\r\n servicesText += \" -\" + rsoSod.Groupings[rsoii].Description + \"\\\\n\";\r\n for (var rsoiii = 0; rsoiii < rsoSod.Groupings[rsoii].Items.length; rsoiii++) {\r\n var rsogItem = rsoSod.Groupings[rsoii].Items[rsoiii];\r\n servicesText += \" -\" + rsogItem.Description;\r\n if (rsogItem.Notes) {\r\n servicesText += \" - \" + _multiLineNote(rsogItem.Notes, \" \");\r\n }\r\n servicesText += \"\\\\n\";\r\n }\r\n }\r\n }\r\n if (rsoSod.Notes) {\r\n servicesText += \" - \" + _multiLineNote(rsoSod.Notes, \" \") + \"\\\\n\";\r\n }\r\n if (rsoSod.SpecialInstructions) {\r\n servicesText += \" - \" + _multiLineNote(rsoSod.SpecialInstructions, \" \") + \"\\\\n\";\r\n }\r\n }\r\n \r\n break;\r\n case \"RES\":\r\n servicesText += so.Category.Description + \"\\\\n\";\r\n for (var resj = 0; resj < sods.length; resj++) {\r\n var resSod = sods[resj];\r\n servicesText += \" - \" + resSod.Quantity + \" \" + (resSod.TempResourceDescription || ((resSod.Resource && resSod.Resource.Description) || \"Bad Config - Missing Resource\")) + \"\\\\n\";\r\n if (resSod.Groupings) {\r\n for (var resii = 0; resii < resSod.Groupings.length; resii++) {\r\n servicesText += \" -\" + resSod.Groupings[resii].Description + \"\\\\n\";\r\n for (var resiii = 0; resiii < resSod.Groupings[resii].Items.length; resiii++) {\r\n var resgItem = resSod.Groupings[resii].Items[resiii];\r\n servicesText += \" -\" + resgItem.Description;\r\n if (resgItem.Notes) {\r\n servicesText += \" - \" + _multiLineNote(resgItem.Notes, \" \");\r\n }\r\n servicesText += \"\\\\n\";\r\n }\r\n }\r\n }\r\n if (resSod.Notes) {\r\n servicesText += \" - \" + _multiLineNote(resSod.Notes, \" \") + \"\\\\n\";\r\n }\r\n if (resSod.SpecialInstructions) {\r\n servicesText += \" - \" + _multiLineNote(resSod.SpecialInstructions, \" \") + \"\\\\n\";\r\n }\r\n }\r\n \r\n break;\r\n case \"ACT\":\r\n servicesText += so.Category.Description + \"\\\\n\";\r\n for (var actj = 0; actj < so.ServiceOrderDetails.length; actj++) {\r\n var actsod = so.ServiceOrderDetails[actj];\r\n servicesText += \" \" + moment(actsod.TimeStart).format(\"LT\");\r\n if (actsod.TimeEnd) {\r\n servicesText += \" - \" + moment(actsod.TimeEnd).format(\"LT\");\r\n }\r\n servicesText += \" \" + actsod.TempResourceDescription + \"\\\\n\";\r\n if (actsod.Notes) {\r\n servicesText += \" \" + _multiLineNote(actsod.Notes, \" \") + \"\\\\n\";\r\n }\r\n \r\n }\r\n break;\r\n case \"ATT\":\r\n servicesText += so.Category.Description + \"\\\\n\";\r\n for (var attI = 0; attI < so.ServiceOrderDetails.length; attI++) {\r\n var attISod = so.ServiceOrderDetails[attI];\r\n servicesText += attISod.TempResourceDescription;\r\n if (attISod.EmailAddress) {\r\n servicesText += \" - \" + attISod.EmailAddress;\r\n }\r\n\r\n if (attISod.Phone) {\r\n servicesText += \" - \" + attISod.Phone;\r\n }\r\n\r\n servicesText += \"\\\\n\";\r\n if (attISod.Notes) {\r\n servicesText += \" \" + _multiLineNote(attISod.Notes, \" \") + \"\\\\n\";\r\n }\r\n if (attISod.SpecialInstructions) {\r\n servicesText += \" \" + _multiLineNote(attISod.SpecialInstructions, \" \") + \"\\\\n\";\r\n }\r\n \r\n }\r\n\r\n break;\r\n case \"NOT\":\r\n servicesText += so.Category.Description + \"\\\\n\";\r\n for (var notI = 0; notI < so.ServiceOrderDetails.length; notI++) {\r\n var notISod = so.ServiceOrderDetails[notI];\r\n servicesText += \" \" + _multiLineNote(notISod.Notes, \" \") + \"\\\\n\";\r\n }\r\n\r\n break;\r\n }\r\n \r\n \r\n }\r\n \r\n ics += \"DESCRIPTION: \" + servicesText + \"\\n\";\r\n \r\n ics += \"PRIORITY:3\" + \"\\n\";\r\n ics += \"END:VEVENT\" + \"\\n\";\r\n\r\n ics += \"END:VCALENDAR\";\r\n\r\n \r\n var linkElement = document.createElement('a');\r\n try {\r\n var blob = new Blob([ics], { type: 'text/ics' });\r\n var url = window.URL.createObjectURL(blob);\r\n\r\n linkElement.setAttribute('href', url);\r\n linkElement.setAttribute(\"download\", bookingData.EventName + \".ics\");\r\n\r\n var clickEvent = new MouseEvent(\"click\", {\r\n \"view\": window,\r\n \"bubbles\": true,\r\n \"cancelable\": false\r\n });\r\n linkElement.dispatchEvent(clickEvent);\r\n } catch (ex) {\r\n console.log(ex);\r\n }\r\n\r\n }\r\n\r\n function _isCompletionType(completionTypeId) {\r\n return function (element) {\r\n return element.CompletionTypeId == completionTypeId;\r\n }\r\n }\r\n\r\n function getLastCompletionForType(completionTypeId, item) {\r\n var completions = item.Completions.filter(_isCompletionType(completionTypeId));\r\n completions.sort(function (a, b) {\r\n a = new Date(a.DateAddedUtc);\r\n b = new Date(b.DateAddedUtc);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n\r\n return completions[0];\r\n }\r\n\r\n\r\n function completeItem(completionTypeId, item) {\r\n \r\n var completion = getLastCompletionForType(completionTypeId, item);\r\n var isComplete = false;\r\n if (completion) {\r\n if (completion.CompletedAtUtc == null) {\r\n isComplete = true;\r\n }\r\n }\r\n else {\r\n isComplete = true;\r\n }\r\n\r\n var completionDto = {};\r\n completionDto.BookingId = item.BookingId;\r\n completionDto.TaskId = item.TaskId;\r\n completionDto.ServiceOrderId = item.ID;\r\n completionDto.IsComplete = isComplete;\r\n completionDto.CompletionTypeId = completionTypeId;\r\n completionDto.DisplayedOn = moment(common.getMainState(\"mainDate\")).format(\"YYYYMMDD\");\r\n dataservice.saveItem('api/DailySetup/NewCompletion', completionDto).then(function (saveResult) {\r\n common.notifier.notify(common.config.events.refreshCounts);\r\n }).catch(function (error) {\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n function clearCache() {\r\n cachedTaskCompletionTypes = null;\r\n cachedBookingCompletionTypes = null;\r\n cachedServiceOrderCompletionTypes = null;\r\n }\r\n\r\n function _sorter(a, b) {\r\n var s1 = Number(a.Sequence);\r\n var s2 = Number(b.Sequence);\r\n\r\n var s3 = a.Description;\r\n var s4 = b.Description;\r\n\r\n if (s1 < s2) return -1;\r\n if (s1 > s2) return 1;\r\n if (s3 < s4) return -1;\r\n if (s3 > s4) return 1;\r\n return 0;\r\n }\r\n\r\n function getCompletionTypesForItem(item) {\r\n \r\n var path = 'api/CompletionTypes/';\r\n var typesForItem = 0;\r\n \r\n if (item.TaskId > 0) {\r\n path += 'GetForTask';\r\n typesForItem = 0;\r\n if (cachedTaskCompletionTypes !== null) {\r\n return $q.resolve(cachedTaskCompletionTypes);\r\n }\r\n }\r\n else if (item.ID) {\r\n path += 'GetForServiceOrder';\r\n typesForItem = 1;\r\n if (cachedServiceOrderCompletionTypes !== null) {\r\n return $q.resolve(cachedServiceOrderCompletionTypes);\r\n }\r\n }\r\n else {\r\n path += 'GetForBooking';\r\n typesForItem = 2;\r\n if (cachedBookingCompletionTypes !== null) {\r\n return $q.resolve(cachedBookingCompletionTypes);\r\n }\r\n }\r\n\r\n return dataservice.getItems(path).then(function (response) {\r\n if (typesForItem == 2) {\r\n cachedBookingCompletionTypes = response.data;\r\n cachedBookingCompletionTypes.sort(_sorter);\r\n return $q.resolve(cachedBookingCompletionTypes);\r\n }\r\n else if (typesForItem == 1) {\r\n cachedServiceOrderCompletionTypes = response.data;\r\n cachedServiceOrderCompletionTypes.sort(_sorter);\r\n return $q.resolve(cachedServiceOrderCompletionTypes);\r\n }\r\n else {\r\n cachedTaskCompletionTypes = response.data;\r\n cachedTaskCompletionTypes.sort(_sorter);\r\n return $q.resolve(cachedTaskCompletionTypes);\r\n }\r\n }, function (error) { });\r\n }\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.completionTypes')\r\n .controller('CompletionTypeDetailController', CompletionTypeDetailController);\r\n\r\n CompletionTypeDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function CompletionTypeDetailController($state, $stateParams,\r\n bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.counts = [];\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n vm.preventDelete = preventDelete;\r\n vm.setIcon = setIcon;\r\n vm.iconName = \"Select Icon\";\r\n vm.bootStrapIcons = [\"adjust\", \"align-center\", \"align-justify\", \"align-left\", \"align-right\", \"arrow-down\", \"arrow-left\", \"arrow-right\", \"arrow-up\", \"asterisk\", \"backward\", \"ban-circle\", \"barcode\", \"bell\", \"bold\", \"book\", \"bookmark\", \"briefcase\", \"bullhorn\", \"calendar\", \"camera\", \"certificate\", \"check\", \"chevron-down\", \"chevron-left\", \"chevron-right\", \"chevron-up\", \"circle-arrow-down\", \"circle-arrow-left\", \"circle-arrow-right\", \"circle-arrow-up\", \"cloud\", \"cloud-download\", \"cloud-upload\", \"cog\", \"collapse-down\", \"collapse-up\", \"comment\", \"compressed\", \"copyright-mark\", \"credit-card\", \"cutlery\", \"dashboard\", \"download\", \"download-alt\", \"earphone\", \"edit\", \"eject\", \"envelope\", \"euro\", \"exclamation-sign\", \"expand\", \"export\", \"eye-close\", \"eye-open\", \"facetime-video\", \"fast-backward\", \"fast-forward\", \"file\", \"film\", \"filter\", \"fire\", \"flag\", \"flash\", \"floppy-disk\", \"floppy-open\", \"floppy-remove\", \"floppy-save\", \"floppy-saved\", \"folder-close\", \"folder-open\", \"font\", \"forward\", \"fullscreen\", \"gbp\", \"gift\", \"glass\", \"globe\", \"hand-down\", \"hand-left\", \"hand-right\", \"hand-up\", \"hdd\", \"hd-video\", \"header\", \"headphones\", \"heart\", \"heart-empty\", \"home\", \"import\", \"inbox\", \"indent-left\", \"indent-right\", \"info-sign\", \"italic\", \"leaf\", \"link\", \"list\", \"list-alt\", \"lock\", \"log-in\", \"log-out\", \"magnet\", \"map-marker\", \"minus\", \"minus-sign\", \"move\", \"music\", \"new-window\", \"off\", \"ok\", \"ok-circle\", \"ok-sign\", \"open\", \"paperclip\", \"pause\", \"pencil\", \"phone\", \"phone-alt\", \"picture\", \"plane\", \"play\", \"play-circle\", \"plus\", \"plus-sign\", \"print\", \"pushpin\", \"qrcode\", \"question-sign\", \"random\", \"record\", \"refresh\", \"registration-mark\", \"remove\", \"remove-circle\", \"remove-sign\", \"repeat\", \"resize-full\", \"resize-horizontal\", \"resize-small\", \"resize-vertical\", \"retweet\", \"road\", \"save\", \"saved\", \"screenshot\", \"sd-video\", \"search\", \"send\", \"share\", \"share-alt\", \"shopping-cart\", \"signal\", \"sort\", \"sort-by-alphabet\", \"sort-by-alphabet-alt\", \"sort-by-attributes\", \"sort-by-attributes-alt\", \"sort-by-order\", \"sort-by-order-alt\", \"sound-5-1\", \"sound-6-1\", \"sound-7-1\", \"sound-dolby\", \"sound-stereo\", \"star\", \"star-empty\", \"stats\", \"step-backward\", \"step-forward\", \"stop\", \"subtitles\", \"tag\", \"tags\", \"tasks\", \"text-height\", \"text-width\", \"th\", \"th-large\", \"th-list\", \"thumbs-down\", \"thumbs-up\", \"time\", \"tint\", \"tower\", \"transfer\", \"trash\", \"tree-conifer\", \"tree-deciduous\", \"unchecked\", \"upload\", \"usd\", \"user\", \"volume-down\", \"volume-off\", \"volume-up\", \"warning-sign\", \"wrench\", \"zoom-in\", \"zoom-out\"];\r\n vm.fontAwesomeIcons = [\"adjust\", \"adn\", \"align-center\", \"align-justify\", \"align-left\", \"align-right\", \"ambulance\", \"anchor\", \"android\", \"angle-double-down\", \"angle-double-left\", \"angle-double-right\", \"angle-double-up\", \"angle-down\", \"angle-left\", \"angle-right\", \"angle-up\", \"apple\", \"archive\", \"arrow-circle-down\", \"arrow-circle-left\", \"arrow-circle-o-down\", \"arrow-circle-o-left\", \"arrow-circle-o-right\", \"arrow-circle-o-up\", \"arrow-circle-right\", \"arrow-circle-up\", \"arrow-down\", \"arrow-left\", \"arrow-right\", \"arrows\", \"arrows-alt\", \"arrows-h\", \"arrows-v\", \"arrow-up\", \"asterisk\", \"backward\", \"ban\", \"bar-chart-o\", \"barcode\", \"bars\", \"beer\", \"bell\", \"bell-o\", \"bitbucket\", \"bitbucket-square\", \"bitcoin\", \"bold\", \"bolt\", \"book\", \"bookmark\", \"bookmark-o\", \"briefcase\", \"btc\", \"bug\", \"building-o\", \"bullhorn\", \"bullseye\", \"calendar\", \"calendar-o\", \"camera\", \"camera-retro\", \"caret-down\", \"caret-left\", \"caret-right\", \"caret-square-o-down\", \"caret-square-o-left\", \"caret-square-o-right\", \"caret-square-o-up\", \"caret-up\", \"certificate\", \"chain\", \"chain-broken\", \"check\", \"check-circle\", \"check-circle-o\", \"check-square\", \"check-square-o\", \"chevron-circle-down\", \"chevron-circle-left\", \"chevron-circle-right\", \"chevron-circle-up\", \"chevron-down\", \"chevron-left\", \"chevron-right\", \"chevron-up\", \"circle\", \"circle-o\", \"clipboard\", \"clock-o\", \"cloud\", \"cloud-download\", \"cloud-upload\", \"cny\", \"code\", \"code-fork\", \"coffee\", \"cog\", \"cogs\", \"columns\", \"comment\", \"comment-o\", \"comments\", \"comments-o\", \"compass\", \"compress\", \"copy\", \"credit-card\", \"crop\", \"crosshairs\", \"css3\", \"cut\", \"cutlery\", \"dashboard\", \"dedent\", \"desktop\", \"dollar\", \"dot-circle-o\", \"download\", \"dribbble\", \"dropbox\", \"edit\", \"eject\", \"ellipsis-h\", \"ellipsis-v\", \"envelope\", \"envelope-o\", \"eraser\", \"eur\", \"euro\", \"exchange\", \"exclamation\", \"exclamation-circle\", \"exclamation-triangle\", \"expand\", \"external-link\", \"external-link-square\", \"eye\", \"eye-slash\", \"facebook\", \"facebook-square\", \"fast-backward\", \"fast-forward\", \"female\", \"fighter-jet\", \"file\", \"file-o\", \"files-o\", \"file-text\", \"file-text-o\", \"film\", \"filter\", \"fire\", \"fire-extinguisher\", \"flag\", \"flag-checkered\", \"flag-o\", \"flash\", \"flask\", \"flickr\", \"floppy-o\", \"folder\", \"folder-o\", \"folder-open\", \"folder-open-o\", \"font\", \"forward\", \"foursquare\", \"frown-o\", \"gamepad\", \"gavel\", \"gbp\", \"gear\", \"gears\", \"gift\", \"github\", \"github-alt\", \"github-square\", \"gittip\", \"glass\", \"globe\", \"google-plus\", \"google-plus-square\", \"group\", \"hand-o-down\", \"hand-o-left\", \"hand-o-right\", \"hand-o-up\", \"hdd-o\", \"headphones\", \"heart\", \"heart-o\", \"home\", \"hospital-o\", \"h-square\", \"html5\", \"inbox\", \"indent\", \"info\", \"info-circle\", \"inr\", \"instagram\", \"italic\", \"jpy\", \"key\", \"keyboard-o\", \"krw\", \"laptop\", \"leaf\", \"legal\", \"lemon-o\", \"level-down\", \"level-up\", \"lightbulb-o\", \"link\", \"linkedin\", \"linkedin-square\", \"linux\", \"list\", \"list-alt\", \"list-ol\", \"list-ul\", \"location-arrow\", \"lock\", \"long-arrow-down\", \"long-arrow-left\", \"long-arrow-right\", \"long-arrow-up\", \"magic\", \"magnet\", \"mail-forward\", \"mail-reply\", \"mail-reply-all\", \"male\", \"map-marker\", \"maxcdn\", \"medkit\", \"meh-o\", \"microphone\", \"microphone-slash\", \"minus\", \"minus-circle\", \"minus-square\", \"minus-square-o\", \"mobile\", \"mobile-phone\", \"money\", \"moon-o\", \"music\", \"outdent\", \"pagelines\", \"paperclip\", \"paste\", \"pause\", \"pencil\", \"pencil-square\", \"pencil-square-o\", \"phone\", \"phone-square\", \"picture-o\", \"pinterest\", \"pinterest-square\", \"plane\", \"play\", \"play-circle\", \"play-circle-o\", \"plus\", \"plus-circle\", \"plus-square\", \"plus-square-o\", \"power-off\", \"print\", \"puzzle-piece\", \"qrcode\", \"question\", \"question-circle\", \"quote-left\", \"quote-right\", \"random\", \"refresh\", \"renren\", \"repeat\", \"reply\", \"reply-all\", \"retweet\", \"rmb\", \"road\", \"rocket\", \"rotate-left\", \"rotate-right\", \"rouble\", \"rss\", \"rss-square\", \"rub\", \"ruble\", \"rupee\", \"save\", \"scissors\", \"search\", \"search-minus\", \"search-plus\", \"share\", \"share-square\", \"share-square-o\", \"shield\", \"shopping-cart\", \"signal\", \"sign-in\", \"sign-out\", \"sitemap\", \"skype\", \"smile-o\", \"sort\", \"sort-alpha-asc\", \"sort-alpha-desc\", \"sort-amount-asc\", \"sort-amount-desc\", \"sort-asc\", \"sort-desc\", \"sort-down\", \"sort-numeric-asc\", \"sort-numeric-desc\", \"sort-up\", \"spinner\", \"square\", \"square-o\", \"stack-exchange\", \"stack-overflow\", \"star\", \"star-half\", \"star-half-empty\", \"star-half-full\", \"star-half-o\", \"star-o\", \"step-backward\", \"step-forward\", \"stethoscope\", \"stop\", \"strikethrough\", \"subscript\", \"suitcase\", \"sun-o\", \"superscript\", \"table\", \"tablet\", \"tachometer\", \"tag\", \"tags\", \"tasks\", \"terminal\", \"text-height\", \"text-width\", \"th\", \"th-large\", \"th-list\", \"thumbs-down\", \"thumbs-o-down\", \"thumbs-o-up\", \"thumbs-up\", \"thumb-tack\", \"ticket\", \"times\", \"times-circle\", \"times-circle-o\", \"tint\", \"toggle-down\", \"toggle-left\", \"toggle-right\", \"toggle-up\", \"trash-o\", \"trello\", \"trophy\", \"truck\", \"try\", \"tumblr\", \"tumblr-square\", \"turkish-lira\", \"twitter\", \"twitter-square\", \"umbrella\", \"underline\", \"undo\", \"unlink\", \"unlock\", \"unlock-alt\", \"unsorted\", \"upload\", \"usd\", \"user\", \"user-md\", \"users\", \"video-camera\", \"vimeo-square\", \"vk\", \"volume-down\", \"volume-off\", \"volume-up\", \"warning\", \"weibo\", \"wheelchair\", \"windows\", \"won\", \"wrench\", \"xing\", \"xing-square\", \"yen\", \"youtube\", \"youtube-play\", \"youtube-square\"];\r\n vm.departments = [];\r\n vm.showForServices = false;\r\n activate();\r\n\r\n function activate() {\r\n vm.showForServices = common.userService.isEmsApiType();\r\n var promises = [common.checkIsAdmin() , initLookups(), getItem(), getCounts()];\r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function setIcon(prefix, icon) {\r\n vm.item.IconClass = prefix + icon;\r\n vm.iconName = icon;\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"completiontypes.list\");\r\n }\r\n\r\n function preventDelete() {\r\n if (vm.counts.length > 0 || $stateParams.id <= 0) {\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Completion Type')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/CompletionTypes/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"-1\";\r\n }\r\n\r\n function getCounts() {\r\n if($stateParams.id > 0) {\r\n return dataservice.getItems('api/CompletionTypes/CountsOfEntries/' + $stateParams.id).then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n else {\r\n vm.counts = { ActiveCount: 0, Name: -1 };\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '-1') {\r\n vm.item = {};\r\n vm.item.ID = -1;\r\n vm.item.Active = 1;\r\n vm.item.AvailableForTask = 1;\r\n vm.item.AvailableForBooking = 1;\r\n vm.item.AvailableForLog = 1;\r\n vm.item.DepartmentId = 0;\r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/CompletionTypes/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n var parts = vm.item.IconClass.split('glyphicon-');\r\n if (parts.length == 1) {\r\n parts = vm.item.IconClass.split('fa-');\r\n }\r\n if (parts.length == 2) {\r\n vm.iconName = parts[1];\r\n }\r\n common.setAuditInfo(vm.item);\r\n common.convertDateStringsToDates(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function initLookups() {\r\n dataservice.getItems('api/Departments/Active').then(function (response) {\r\n vm.departments = response.data;\r\n }, function (error) { });\r\n }\r\n\r\n function save() {\r\n if (!vm.item.IconClass) {\r\n logger.error('Icon is required');\r\n }\r\n else {\r\n vm.isSaving = true;\r\n\r\n dataservice.saveItem('api/CompletionTypes', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n \r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.completionTypes')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'completiontypes',\r\n config: {\r\n abstract: true,\r\n url: '/completiontypes',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'completiontypes.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/completiontypes/list.html?v=' + opsIncludeVersion,\r\n controller: 'CompletionTypesListController',\r\n controllerAs: 'vm',\r\n title: 'Completion Types'\r\n }\r\n },\r\n {\r\n state: 'completiontypes.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/completionTypes/details.html?v=' + opsIncludeVersion,\r\n controller: 'CompletionTypeDetailController',\r\n controllerAs: 'vm',\r\n title: 'Completion Type',\r\n settings: {}\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.completionTypes')\r\n .controller('CompletionTypesListController', CompletionTypesListController);\r\n\r\n CompletionTypesListController.$inject = ['common', 'dataservice', 'bootstrap.dialog', 'config'];\r\n /* @ngInject */\r\n function CompletionTypesListController(common, dataservice, bsDialog, config) {\r\n var vm = this;\r\n\r\n vm.title = 'Completion Types';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.counts = [];\r\n vm.refresh = refresh;\r\n vm.entriesForLogType = entriesForCompletionType;\r\n vm.iconClassName = iconClassName;\r\n vm.showForServices = false;\r\n\r\n activate();\r\n\r\n function activate() {\r\n vm.showForServices = common.userService.isEmsApiType();\r\n var promises = [common.checkIsAdmin() , getItems(), getCounts()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function iconClassName(icon) {\r\n var parts = icon.split('glyphicon-');\r\n if (parts.length == 1) {\r\n parts = icon.split('fa-');\r\n }\r\n if (parts.length == 2) {\r\n return parts[1];\r\n }\r\n return \"\";\r\n }\r\n\r\n function entriesForCompletionType(completionTypeId) {\r\n for (var i = 0; i < vm.counts.length; i++) {\r\n if (vm.counts[i].Name == completionTypeId) {\r\n return vm.counts[i].ActiveCount;\r\n }\r\n }\r\n }\r\n\r\n function getCounts() {\r\n return dataservice.getItems('api/CompletionTypes/CountsOfEntries/-1').then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/CompletionTypes').then(function (response) {\r\n vm.items = response.data;\r\n \r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('AjaxInterceptor', AjaxInterceptor);\r\n\r\n AjaxInterceptor.$inject = ['$q'];\r\n /* @ngInject */\r\n function AjaxInterceptor($q) {\r\n var service = {\r\n request: request\r\n //requestError: requestError,\r\n //response: response,\r\n //resposeError: responseError\r\n };\r\n return service;\r\n\r\n\r\n function request(config) {\r\n if (config) {\r\n if (config.url) {\r\n if (config.url.indexOf('.html') === -1) {\r\n if (config.headers) {\r\n config.headers[\"X-CSFR-Token\"] = encodeURIComponent($(\"body\").attr(\"sp-request-verification-token\"));\r\n }\r\n }\r\n }\r\n }\r\n \r\n return config || $q.when(config);\r\n }\r\n function requestError(rejection) {\r\n return $q.reject(rejection);\r\n }\r\n function response(response) {\r\n return response;\r\n }\r\n function responseError(rejection) {\r\n var deferred = $q.defer();\r\n return deferred.reject(rejection)\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('attachmentService', attachmentService);\r\n\r\n attachmentService.$inject = ['dataservice', 'common'];\r\n /* @ngInject */\r\n function attachmentService(dataservice, common) {\r\n var service = {\r\n upload: upload,\r\n remove: remove\r\n };\r\n\r\n return service;\r\n\r\n function remove(attachmentIds) {\r\n for (var i = 0; i < attachmentIds.length; i++) {\r\n dataservice.deleteItem('api/Attachments/' + attachmentIds[i], true).then(function (response) {\r\n\r\n }, function(error) {console.log(error)});\r\n }\r\n \r\n }\r\n\r\n \r\n\r\n function upload(parentType, parentId, item, elementId) {\r\n return new Promise(function(resolve) {\r\n var elmId = elementId || \"photo\";\r\n var imgInput = document.getElementById(elmId);\r\n if (imgInput) {\r\n var imgs = [];\r\n for (var i = 0; i < imgInput.files.length; i++) {\r\n imgs.push(imgInput.files[i]);\r\n }\r\n var promises = [];\r\n while (imgs.length > 0) {\r\n var img = imgs.pop();\r\n promises.push(process(img, parentType, parentId, item));\r\n }\r\n \r\n resolve(common.$q.all(promises).then(function () {\r\n \r\n }))\r\n \r\n\r\n \r\n if (!imgs.length) {\r\n $(imgInput).val(\"\");\r\n resolve(item);\r\n return;\r\n }\r\n }\r\n return common.$q.when(\"nothingToUpload\");\r\n })\r\n }\r\n\r\n function process(img, parentType, parentId, item) {\r\n return new Promise(function(resolve, reject) {\r\n\r\n if (img.type.match(/image.*/)) {\r\n var maxSize = 640;\r\n var quality = 0.7;\r\n var image = new Image();\r\n var canvas = document.createElement('canvas');\r\n var blobUrl = URL.createObjectURL(img);\r\n image.src = blobUrl;\r\n image.onerror = function () {\r\n URL.revokeObjectURL(this.src);\r\n console.log(\"Couldn't load image\");\r\n }\r\n image.onload = function () {\r\n URL.revokeObjectURL(this.src);\r\n var width = this.width;\r\n var height = this.height;\r\n if (width > height) {\r\n if (width > maxSize) {\r\n height = Math.round((height * maxSize) / width);\r\n width = maxSize;\r\n }\r\n } else {\r\n if (height > maxSize) {\r\n width = Math.round((width * maxSize) / height);\r\n height = maxSize;\r\n }\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n var ctx = canvas.getContext(\"2d\");\r\n ctx.drawImage(image, 0, 0, width, height);\r\n canvas.toBlob(function (b) {\r\n resolve(uploadPromise(parentType, parentId, b, null, img.name, item))\r\n }, img.type, quality);\r\n }\r\n }\r\n else {\r\n resolve(uploadPromise(parentType, parentId, img, null, item));\r\n\r\n }\r\n }\r\n )\r\n \r\n\r\n }\r\n\r\n function uploadPromise(parentType, parentId, bytes, dto, imgName, item) {\r\n return dataservice.postFile('api/Attachments/PostFile/' + parentType + '/' + parentId, bytes, dto, imgName)\r\n .then(function (uploadResult) {\r\n if (item) {\r\n\r\n item.FileName = uploadResult.data.FileName;\r\n item.Base64Data = uploadResult.data.Base64Data;\r\n item.StoredFile = uploadResult.data.StoredFile;\r\n item.HasAttachment = true;\r\n item.AttachmentId = uploadResult.data.ID;\r\n }\r\n }, function (error) { })\r\n}\r\n\r\n \r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('bootstrap.dialog', modalDialog);\r\n\r\n modalDialog.$inject = ['$uibModal', '$templateCache'];\r\n\r\n /* @ngInject */\r\n function modalDialog($modal, $templateCache) {\r\n var service = {\r\n deleteDialog: deleteDialog,\r\n confirmationDialog: confirmationDialog,\r\n htmlBodyDialog: htmlBodyDialog,\r\n templateDialog: templateDialog\r\n };\r\n\r\n $templateCache.put('modalDialog.tpl.html',\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
{{title}}
' +\r\n '
' +\r\n '
' +\r\n '

{{message}}

' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
');\r\n\r\n $templateCache.put('modalDialogHtml.tpl.html',\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
{{title}}
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
');\r\n\r\n $templateCache.put('modalTemplateDialog.tpl.html',\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
{{title}}
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
');\r\n\r\n return service;\r\n\r\n function deleteDialog(itemName, deleteMsg, okText, cancelText) {\r\n var title = 'Confirm Delete';\r\n itemName = itemName || 'item';\r\n var msg = deleteMsg || 'Delete ' + itemName + '?';\r\n\r\n return confirmationDialog(title, msg, okText, cancelText);\r\n }\r\n\r\n function htmlBodyDialog(title, msg) {\r\n return confirmationDialog(title, msg, \"OK\", \"Cancel\", \"modalDialogHtml.tpl.html\");\r\n }\r\n\r\n function templateDialog(title, template, scopeItem) {\r\n return confirmationDialog(title, \"\", \"OK\", \"Cancel\", \"modalTemplateDialog.tpl.html\", scopeItem, template);\r\n }\r\n\r\n function confirmationDialog(title, msg, okText, cancelText, templateUrl, scopeItem, includeTemplate) {\r\n var modalOptions = {\r\n templateUrl: templateUrl || 'modalDialog.tpl.html',\r\n controller: ModalInstance,\r\n keyboard: true,\r\n resolve: {\r\n options: function () {\r\n return {\r\n title: title,\r\n message: msg,\r\n okText: okText,\r\n cancelText: cancelText,\r\n item: scopeItem,\r\n includeTemplate: includeTemplate\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $modal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n ModalInstance.$inject = ['$scope', '$uibModalInstance', 'options', 'dataservice', 'common', 'config', 'attachmentService'];\r\n\r\n /* @ngInject */\r\n function ModalInstance($scope, $modalInstance, options, dataservice, common, config, attachmentService) {\r\n $scope.item = options.item || {};\r\n $scope.isSaving = false;\r\n $scope.title = options.title || 'Title';\r\n $scope.message = options.message || '';\r\n $scope.okText = options.okText || 'OK';\r\n $scope.hasEmailBeenSet = false;\r\n $scope.cancelText = options.cancelText || 'Cancel';\r\n $scope.ok = function () {\r\n $modalInstance.close('ok');\r\n };\r\n $scope.cancel = function () {\r\n $modalInstance.dismiss('cancel');\r\n };\r\n $scope.includeTemplate = options.includeTemplate || '';\r\n\r\n $scope.sendPasswordReset = function () {\r\n if (!$scope.hasEmailBeenSet) {\r\n if ($scope.item.sendTo) {\r\n $scope.okText = \"Close\";\r\n var dto = {\r\n data: $scope.item.sendTo\r\n }\r\n dataservice.saveItem('api/Account/SendPasswordReset', dto, true, \"\", true).then(function (response) {\r\n $scope.hasEmailBeenSet = true;\r\n }, function (error) {\r\n $modalInstance.close(\"ok\");\r\n })\r\n }\r\n else {\r\n $modalInstance.close(\"ok\");\r\n }\r\n }\r\n else {\r\n $modalInstance.close(\"ok\");\r\n }\r\n }\r\n\r\n $scope.newNote = function () {\r\n if (!($scope.item.NewNote) || $scope.item.NewNote.trim() === \"\") {\r\n return;\r\n }\r\n $scope.isSaving = true;\r\n var noteDto = {};\r\n noteDto.BookingId = $scope.item.BookingId;\r\n noteDto.TaskId = $scope.item.TaskId;\r\n noteDto.Notes = $scope.item.NewNote;\r\n \r\n var parentType = noteDto.BookingId > 0 ? \"BookingNote\" : \"TaskNote\";\r\n\r\n dataservice.saveItem('api/DailySetup/NewNote', noteDto).then(function (saveResult) {\r\n $scope.isSaving = false;\r\n var savedNote = saveResult.data;\r\n attachmentService.upload(parentType, savedNote.ID, savedNote);\r\n \r\n $scope.item.NewNote = \"\";\r\n $scope.item.Notes.push(savedNote)\r\n $scope.item.Notes.sort(function (a, b) {\r\n a = new Date(a.DateAddedUtc);\r\n b = new Date(b.DateAddedUtc);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n }).catch(function (error) {\r\n $scope.isSaving = false;\r\n });\r\n \r\n }\r\n\r\n $scope.completeItem = function (isComplete) {\r\n $scope.isSaving = true;\r\n var completionDto = {};\r\n completionDto.BookingId = $scope.item.BookingId;\r\n completionDto.TaskId = $scope.item.TaskId;\r\n completionDto.IsComplete = isComplete;\r\n\r\n dataservice.saveItem('api/DailySetup/NewCompletion', completionDto).then(function (saveResult) {\r\n common.notifier.notify(config.events.refreshCounts);\r\n $scope.isSaving = false;\r\n var savedCompletion = saveResult.data;\r\n $scope.item.Completions.push(savedCompletion);\r\n $scope.item.Completions.sort(function (a, b) {\r\n a = new Date(a.DateAddedUtc);\r\n b = new Date(b.DateAddedUtc);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n }).catch(function (error) {\r\n $scope.isSaving = false;\r\n });\r\n\r\n\r\n }\r\n }\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('common', common);\r\n\r\n common.$inject = ['$location', '$q', '$rootScope', '$timeout', 'config', 'userService', 'logger', 'notifier', 'opsIncludeVersion'];\r\n\r\n /* @ngInject */\r\n function common($location, $q, $rootScope, $timeout, config, userService, logger, notifier, opsIncludeVersion) {\r\n var throttles = {};\r\n var mainState = { mainDate: new Date() };\r\n \r\n var service = {\r\n // common angular dependencies\r\n $location: $location,\r\n $q: $q,\r\n $timeout: $timeout,\r\n // common \r\n userService: userService,\r\n logger: logger, // for accessibility\r\n notifier: notifier,\r\n config: config,\r\n // generic\r\n createSearchThrottle: createSearchThrottle,\r\n debouncedThrottle: debouncedThrottle,\r\n isNumber: isNumber,\r\n \r\n textContains: textContains,\r\n setAuditInfo: setAuditInfo,\r\n setMainState: setMainState,\r\n getMainState: getMainState,\r\n convertDateStringsToDates: convertDateStringsToDates,\r\n convertUtcKeysToLocal: convertUtcKeysToLocal,\r\n buildDateTime: buildDateTime,\r\n opsIncludeVersion: opsIncludeVersion,\r\n checkIsAdmin: checkIfAdmin\r\n };\r\n\r\n return service;\r\n \r\n\r\n function checkIfAdmin() {\r\n userService.checkIsAdmin().then(function (d) {\r\n if (!d) {\r\n userService.logout();\r\n $location.path('/404')\r\n }\r\n \r\n }) ;\r\n\r\n }\r\n\r\n function setMainState (key, value) {\r\n mainState[key] = value;\r\n }\r\n function getMainState(key) {\r\n return mainState[key];\r\n }\r\n\r\n function createSearchThrottle(viewmodel, list, filteredList, filter, delay) {\r\n // After a delay, search a viewmodel's list using\r\n // a filter function, and return a filteredList.\r\n \r\n // custom delay or use default\r\n delay = +delay || 300;\r\n // if only vm and list parameters were passed, set others by naming convention\r\n if (!filteredList) {\r\n // assuming list is named sessions, filteredList is filteredSessions\r\n //filteredList = 'filtered' + list[0].toUpperCase() + list.substr(1).toLowerCase(); // string\r\n filteredList = 'filtered' + list[0].toUpperCase() + list.substr(1); \r\n // filter function is named sessionFilter\r\n filter = list + 'Filter'; // function in string form\r\n }\r\n\r\n // create the filtering function we will call from here\r\n var filterFn = function () {\r\n var clone = structuredClone(viewmodel[list]);\r\n // translates to ...\r\n // vm.filteredSessions\r\n // = vm.sessions.filter(function(item( { returns vm.sessionFilter (item) } );\r\n viewmodel[filteredList] = clone.filter(function (item) {\r\n return viewmodel[filter](item);\r\n });\r\n };\r\n \r\n return (function () {\r\n // Wrapped in outer IIFE so we can use closure\r\n // over filterInputTimeout which references the timeout\r\n var filterInputTimeout;\r\n\r\n // return what becomes the 'applyFilter' function in the controller\r\n return function (searchNow) {\r\n if (filterInputTimeout) {\r\n $timeout.cancel(filterInputTimeout);\r\n filterInputTimeout = null;\r\n }\r\n if (searchNow || !delay) {\r\n filterFn();\r\n } else {\r\n filterInputTimeout = $timeout(filterFn, delay);\r\n }\r\n };\r\n })();\r\n }\r\n\r\n function debouncedThrottle(key, callback, delay, immediate) {\r\n // Perform some action (callback) after a delay.\r\n // Track the callback by key, so if the same callback\r\n // is issued again, restart the delay.\r\n\r\n var defaultDelay = 1000;\r\n delay = delay || defaultDelay;\r\n if (throttles[key]) {\r\n $timeout.cancel(throttles[key]);\r\n throttles[key] = undefined;\r\n }\r\n if (immediate) {\r\n callback();\r\n } else {\r\n throttles[key] = $timeout(callback, delay);\r\n }\r\n }\r\n\r\n function isNumber(val) {\r\n // negative or positive\r\n return (/^[-]?\\d+$/).test(val);\r\n }\r\n\r\n function textContains(text, searchText) {\r\n return text && -1 !== text.toLowerCase().indexOf(searchText.toLowerCase());\r\n }\r\n\r\n function convertDateStringsToDates(input) {\r\n var regexIso8601 = /^^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n // Ignore things that aren't objects.\r\n if (typeof input !== \"object\") return input;\r\n\r\n for (var key in input) {\r\n if (!input.hasOwnProperty(key)) continue;\r\n\r\n var lowerKey = key.toLowerCase();\r\n if (lowerKey === \"id\") continue;\r\n try {\r\n if (lowerKey.endsWith(\"id\")) continue;\r\n }\r\n catch (badProp) {\r\n console.log(badProp);\r\n }\r\n \r\n\r\n var value = input[key];\r\n \r\n var match;\r\n\r\n if (typeof value === \"string\" && (match = value.match(regexIso8601))) {\r\n var milliseconds = Date.parse(match[0]);\r\n if (!isNaN(milliseconds)) {\r\n input[key] = new Date(milliseconds);\r\n }\r\n } else if (typeof value === \"object\") {\r\n convertDateStringsToDates(value);\r\n }\r\n }\r\n }\r\n function convertUtcKeysToLocal(input) {\r\n var regexIso8601 = /^^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n // Ignore things that aren't objects.\r\n if (typeof input !== \"object\") return input;\r\n\r\n for (var key in input) {\r\n if (!input.hasOwnProperty(key)) continue;\r\n\r\n var value = input[key];\r\n var match;\r\n if (typeof value === \"string\" && key.indexOf('Utc') > 0 && (match = value.match(regexIso8601))) {\r\n var utc = moment.utc(match[0]);\r\n input[key] = utc.toDate();\r\n \r\n } else if (typeof value === \"object\") {\r\n convertUtcKeysToLocal(value);\r\n }\r\n }\r\n }\r\n\r\n\r\n function buildDateTime(date, time) {\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate(), time.getHours(), time.getMinutes(), 0, 0);\r\n }\r\n\r\n function setAuditInfo(vm) {\r\n if (vm[\"DateAddedUtc\"] && vm[\"DateAddedUtc\"] != \"0001-01-01T00:00:00\") {\r\n vm[\"DateAdded\"] = moment(moment.utc(vm[\"DateAddedUtc\"]).toDate()).toDate();\r\n }\r\n else {\r\n vm[\"DateAdded\"] = moment().toDate();\r\n vm[\"AddedBy\"] = userService.userName();\r\n }\r\n\r\n if (vm[\"DateChangedUtc\"] && vm[\"DateChangedUtc\"] != \"0001-01-01T00:00:00\") {\r\n vm[\"DateChanged\"] = moment(moment.utc(vm[\"DateChangedUtc\"]).toDate()).toDate();\r\n }\r\n else {\r\n vm[\"DateChanged\"] = moment().toDate();\r\n vm[\"ChangedBy\"] = userService.userName();\r\n }\r\n }\r\n\r\n }\r\n})();","(function () {\r\n 'use strict';\r\n\r\n var core = angular.module('app.core');\r\n\r\n core.config(toastrConfig);\r\n\r\n toastrConfig.$inject = ['toastr'];\r\n /* @ngInject */\r\n function toastrConfig(toastr) {\r\n toastr.options.timeOut = 4000;\r\n toastr.options.positionClass = 'toast-bottom-right';\r\n }\r\n\r\n var keyCodes = {\r\n backspace: 8,\r\n tab: 9,\r\n enter: 13,\r\n esc: 27,\r\n space: 32,\r\n pageup: 33,\r\n pagedown: 34,\r\n end: 35,\r\n home: 36,\r\n left: 37,\r\n up: 38,\r\n right: 39,\r\n down: 40,\r\n insert: 45,\r\n del: 46\r\n };\r\n\r\n var events = {\r\n refreshCounts: 'sidebar.refreshCounts',\r\n authenticationChange: 'authentication.change',\r\n mainDateChange: 'mainDate.change',\r\n userConfigOptionsChange: 'userConfigOptions.change',\r\n signalRStatusChange: 'signalRStatus.change',\r\n filterCleared: 'st-search.cleared',\r\n stateChanged: 'state.changed',\r\n mainDateToday: 'mainDate.today'\r\n };\r\n\r\n var apiTypes = {\r\n sevenPoint: 'BCA944F7-7795-45CD-A21B-CB5F16DC4175',\r\n ems: '4CF523BF-F6DD-441C-810F-C87347963B5D',\r\n collegeNet: '355A9B3B-BF7E-4D96-8B06-27B310EB01F0',\r\n centersXml: '4D2BFEBD-7631-4AEE-96CF-392CFA0BFB3A',\r\n adAstra: '5C088F8B-7D16-4C06-B691-7E6FCD4344AD',\r\n mazevo: '0E9DADB2-F56B-4E7E-A3B2-A59632C91D86'\r\n };\r\n\r\n var displayTypes = {\r\n eventDisplay: 'f72e8f09-a1cd-4066-9273-5cd292c9f47d',\r\n roomCard: '2bacc947-4ee0-4be6-9810-f623264e6354',\r\n pictureBox: '360e8227-4927-4e14-9cef-2f4127cb4b21'\r\n };\r\n\r\n var config = {\r\n appErrorPrefix: '[7 Point Error] ',\r\n appTitle: '7 Point Ops',\r\n keyCodes: keyCodes,\r\n events: events,\r\n apiTypes: apiTypes,\r\n displayTypes: displayTypes\r\n };\r\n\r\n core.constant('config', config);\r\n\r\n core.config(configure);\r\n\r\n configure.$inject = ['$logProvider', '$httpProvider', '$compileProvider', 'routerHelperProvider', 'exceptionHandlerProvider'];\r\n /* @ngInject */\r\n function configure($logProvider, $httpProvider, $compileProvider, routerHelperProvider, exceptionHandlerProvider) {\r\n\r\n $compileProvider.debugInfoEnabled(false);\r\n\r\n if ($logProvider.debugEnabled) {\r\n $logProvider.debugEnabled(false);\r\n }\r\n exceptionHandlerProvider.configure(config.appErrorPrefix);\r\n routerHelperProvider.configure({ docTitle: config.appTitle + ': ' });\r\n\r\n $httpProvider.interceptors.push('AjaxInterceptor');\r\n }\r\n\r\n})();\r\n","/* global toastr:false, moment:false */\r\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .constant('toastr', toastr)\r\n .constant('moment', moment);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper'];\r\n\r\n /* @ngInject */\r\n function appRun(routerHelper) {\r\n var otherwise = '404';\r\n routerHelper.configureStates(getStates(), otherwise);\r\n }\r\n\r\n function getStates() {\r\n return [\r\n {\r\n state: '404',\r\n config: {\r\n url: '/404',\r\n templateUrl: 'app/core/404.html',\r\n title: '404'\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('dataservice', dataservice);\r\n\r\n dataservice.$inject = ['$http', '$q', 'exception', 'logger'];\r\n /* @ngInject */\r\n function dataservice($http, $q, exception, logger) {\r\n var service = {\r\n getItem: getItem,\r\n getItems: getItems,\r\n saveItem: saveItem,\r\n deleteItem: deleteItem,\r\n putItem: putItem,\r\n query: query,\r\n getCounts: getCounts,\r\n postFile: postFile\r\n };\r\n\r\n return service;\r\n\r\n \r\n function query(path, dto) {\r\n return $http.post(path, dto)\r\n .then(success).catch(fail);\r\n\r\n function success(response) {\r\n logger.info(\"Query successful: \");\r\n return response;\r\n }\r\n\r\n function fail(e) {\r\n return exception.catcher('Error querying for items')(e);\r\n }\r\n }\r\n\r\n function postFile(path, file, dto, fileName) {\r\n\r\n var fd = new FormData();\r\n fd.append('file', file, fileName);\r\n if (dto) {\r\n for (var p in dto) {\r\n if (dto.hasOwnProperty(p)) {\r\n fd.append(p, dto[p]);\r\n }\r\n }\r\n }\r\n var config = {\r\n headers: { \"Content-Type\": undefined },\r\n transformRequest: angular.identity\r\n };\r\n return $http.post(path, fd, config).catch(fail);\r\n\r\n function fail(e) {\r\n return exception.catcher('Error saving item')(e);\r\n }\r\n }\r\n\r\n function saveItem(path, dto, suppressSuccessMsg, msg, suppressErrorMsg) {\r\n return $http.post(path, dto)\r\n .then(success).catch(fail);\r\n\r\n function success(response) {\r\n if (!suppressSuccessMsg) {\r\n logger.success(msg || \"Item saved\");\r\n }\r\n return response;\r\n }\r\n\r\n function fail(e) {\r\n return exception.catcher('Error saving item', suppressErrorMsg)(e);\r\n }\r\n }\r\n\r\n function putItem(path) {\r\n return $http.put(path)\r\n .then(success).catch(fail);\r\n\r\n function success(response) {\r\n logger.success(\"Item saved\")\r\n return response;\r\n }\r\n\r\n function fail(e) {\r\n return exception.catcher('Error saving item')(e);\r\n }\r\n }\r\n\r\n function getItem(path, successMsg, failureMsg) {\r\n return $http.get(path)\r\n .then(success).catch(fail);\r\n\r\n function success(response) {\r\n logger.info(successMsg || \"Item acquired\")\r\n return response;\r\n }\r\n\r\n function fail(e) {\r\n return exception.catcher(failureMsg || 'Error getting item')(e);\r\n }\r\n }\r\n\r\n function deleteItem(path, suppressSuccess) {\r\n return $http.delete(path)\r\n .then(success).catch(fail);\r\n\r\n function success(response) {\r\n if (!suppressSuccess) {\r\n logger.success(\"Item deleted\")\r\n }\r\n return response;\r\n }\r\n\r\n function fail(e) {\r\n return exception.catcher('Error deleting item')(e);\r\n }\r\n }\r\n\r\n function getItems(path, successMsg, failureMsg) {\r\n return $http.get(path)\r\n .then(success).catch(fail);\r\n\r\n function success(response) {\r\n logger.info(successMsg || \"Items acquired successfully\")\r\n return response;\r\n }\r\n\r\n function fail(e) {\r\n return exception.catcher(failureMsg || \"Error acquiring items\")(e);\r\n }\r\n }\r\n\r\n function getCounts(m) {\r\n var t = new Date();\r\n var d = m.toDate();\r\n var q = moment(new Date(d.getFullYear(), d.getMonth(), d.getDate(), t.getHours(), t.getMinutes(), 0, 0));\r\n\r\n return $http.get('api/Counts/ForDashboard?localDate=' + q.toISOString() + \"&localIsoDateOnly=\" + q.format(\"YYYY-MM-DD\"))\r\n .then(success).catch(fail);\r\n\r\n function success(response) {\r\n return response;\r\n }\r\n\r\n function fail(e) {\r\n return exception.catcher(\"Error getting counts\")(e);\r\n }\r\n }\r\n \r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('fileDownloader', fileDownloader);\r\n\r\n //fileDownloader.$inject = ['$window'];\r\n /* @ngInject */\r\n function fileDownloader() {\r\n return {\r\n download: download\r\n };\r\n\r\n function download(data, contentType, filename) {\r\n\r\n var octetStreamMime = 'application/octet-stream';\r\n var success = false;\r\n\r\n try {\r\n var blob = new Blob([data], { type: contentType });\r\n if (navigator.msSaveBlob) {\r\n navigator.msSaveBlob(blob, filename);\r\n }\r\n else {\r\n // Try using other saveBlob implementations, if available\r\n var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob;\r\n if (saveBlob === undefined) throw \"Not supported\";\r\n saveBlob(blob, filename);\r\n }\r\n success = true;\r\n }\r\n catch (ex) {\r\n console.log(ex);\r\n }\r\n\r\n if (!success) {\r\n var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n if (urlCreator) {\r\n var link = document.createElement('a');\r\n if ('download' in link) {\r\n try {\r\n var blob = new Blob([data], { type: contentType });\r\n var url = urlCreator.createObjectURL(blob);\r\n link.setAttribute('href', url);\r\n\r\n // Set the download attribute (Supported in Chrome 14+ / Firefox 20+)\r\n link.setAttribute(\"download\", filename);\r\n\r\n // Simulate clicking the download link\r\n var event = document.createEvent('MouseEvents');\r\n event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);\r\n link.dispatchEvent(event);\r\n success = true;\r\n\r\n }\r\n catch (ex) {\r\n console.log(ex);\r\n }\r\n }\r\n\r\n if (!success) {\r\n // Fallback to window.location method\r\n try {\r\n // Prepare a blob URL\r\n // Use application/octet-stream when using window.location to force download\r\n var blob = new Blob([data], { type: octetStreamMime });\r\n var url = urlCreator.createObjectURL(blob);\r\n window.location = url;\r\n success = true;\r\n } catch (ex) {\r\n console.log(ex);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .directive('spRequestVerificationToken', spRequestVerificationToken);\r\n\r\n spRequestVerificationToken.$inject = ['$http'];\r\n\r\n /* @ngInject */\r\n function spRequestVerificationToken($http) {\r\n var directive = {\r\n restrict: 'A',\r\n link: linkFunc\r\n }\r\n return directive;\r\n\r\n function linkFunc(scope, el, attrs, ctrl) {\r\n // $http.defaults.headers.common['RequestVerificationToken'] = attrs.spRequestVerificationToken || \"no request verification token\";\r\n }\r\n }\r\n})();\r\n\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailyLogs')\r\n .controller('DailyLogsController', DailyLogsController);\r\n\r\n DailyLogsController.$inject = ['$scope', 'common', 'dataservice', 'carousel.dialog', 'backendHubProxy', 'logEntryViewDialog', 'completions'];\r\n /* @ngInject */\r\n function DailyLogsController($scope, common, dataservice, carouselDialog, backendHubProxy, logEntryViewDialog, completions) {\r\n var vm = this;\r\n vm.common = common;\r\n vm.title = \"Daily Logs\";\r\n vm.items = [];\r\n vm.isLoading = true;\r\n vm.onDate = common.getMainState(\"mainDate\");\r\n vm.completions = completions;\r\n vm.refresh = getItems;\r\n vm.canEdit = canEdit;\r\n vm.displayedItems = [];\r\n vm.showAttachment = showAttachment;\r\n vm.logTypes = [];\r\n vm.items = [];\r\n vm.isLogType = isLogType;\r\n vm.canDelete = canDelete;\r\n vm.showEntry = showEntry;\r\n \r\n vm.deletingEntryId = -1;\r\n vm.originalEntry = {};\r\n \r\n \r\n vm.deleteEntry = deleteEntry;\r\n \r\n\r\n $scope.$on('$destroy', function () {\r\n backendHubProxy.stop();\r\n });\r\n\r\n activate();\r\n\r\n function activate() {\r\n backendHubProxy.displayedItems = vm.displayedItems;\r\n backendHubProxy.startListening();\r\n\r\n common.notifier.subscribe(common.config.events.mainDateChange, $scope, dateChanged);\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n common.notifier.notify(common.config.events.refreshCounts);\r\n }, function (error) { });\r\n }\r\n\r\n function showEntry(logTypeId, entryId) {\r\n logEntryViewDialog.display(logTypeId, entryId).then(function () { }, function () { });\r\n }\r\n \r\n function isLogType(logType) {\r\n return function (item) {\r\n return item.LogTypeId == logType.ID;\r\n }\r\n }\r\n\r\n function showAttachment(item) {\r\n dataservice.getItems('api/Attachments/GetForParentType/8/' + item.ID).then(function (response) {\r\n return carouselDialog.display(response.data).then(function () { }, function () { });\r\n }, function (error) { });\r\n }\r\n\r\n function canEdit(item) {\r\n if (common.userService.userType() == \"0\") {\r\n return common.userService.userId() == item.CreatedById;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n function canDelete(item) {\r\n if (common.userService.userType() == \"0\") {\r\n return common.userService.userId() == item.CreatedById;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n\r\n function deleteEntry(item) {\r\n var id = item.ID;\r\n dataservice.deleteItem('api/DailyLogs/DeleteEntry/' + id).then(function (saveResult) {\r\n vm.isSaving = false;\r\n vm.deletingEntryId = -1;\r\n $.each(vm.items, function (index, result) {\r\n if (result) {\r\n if (result[\"ID\"] == id) {\r\n vm.items.splice(index, 1);\r\n }\r\n }\r\n })\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n var m = moment(vm.onDate).format(\"YYYY-MM-DD\");\r\n return dataservice.getItems('api/DailyLogs/GetForDate?forDate=' + m).then(function (response) {\r\n var d = response.data;\r\n vm.logTypes = d.LogTypes;\r\n vm.items = d.Entries;\r\n vm.completionTypes = d.CompletionTypes\r\n backendHubProxy.items = vm.items;\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function dateChanged(eventName, newDate) {\r\n vm.onDate = newDate;\r\n getItems();\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailyLogs')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'dailylogs',\r\n config: {\r\n abstract: true,\r\n url: '/dailylogs',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n \r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n }\r\n }\r\n \r\n },\r\n {\r\n state: 'dailylogs.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/dailylogs/logs.html?v=' + opsIncludeVersion,\r\n controller: 'DailyLogsController',\r\n controllerAs: 'vm',\r\n title: 'Daily Logs',\r\n settings: {\r\n nav: 350,\r\n content: ' Daily Logs',\r\n authMode: 1,\r\n requireOps: true,\r\n mobileButton: true\r\n }\r\n }\r\n },\r\n {\r\n state: 'dailylogs.entry',\r\n config: {\r\n url: '/entry/:logTypeId/:id',\r\n templateUrl: 'app/dailylogs/entry.html?v=' + opsIncludeVersion,\r\n controller: 'DailyLogsEntryController',\r\n controllerAs: 'vm',\r\n title: 'Daily Logs'\r\n }\r\n }\r\n\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailyLogs')\r\n .controller('DailyLogsEntryController', DailyLogsEntryController);\r\n\r\n DailyLogsEntryController.$inject = ['$scope', '$state', '$stateParams', 'common', 'dataservice', 'attachmentService'];\r\n /* @ngInject */\r\n function DailyLogsEntryController($scope, $state, $stateParams, common, dataservice, attachmentService) {\r\n var vm = this;\r\n\r\n vm.title = \"Log Entry\"\r\n vm.item = [];\r\n vm.isLoading = true;\r\n vm.onDate = common.getMainState(\"mainDate\");\r\n vm.cancel = cancel;\r\n vm.save = save;\r\n vm.saveButtonText = \"Save\";\r\n vm.saveButtonIcon = \"fa-save\";\r\n vm.isSaving = false;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n $state.go(\"dailylogs.list\");\r\n }\r\n \r\n function getItems() {\r\n var entryId = $stateParams.id;\r\n var logTypeId = $stateParams.logTypeId;\r\n \r\n\r\n return dataservice.getItems('api/DailyLogs/EntryForLogType/' + logTypeId + '/' + entryId).then(function (response) {\r\n vm.item = response.data;\r\n var ht = vm.item.HelpText;\r\n if (ht != null) {\r\n ht = ht.replace(\" b ? -1 : a < b ? 1 : 0\r\n\t\t\t\t});*/\r\n\t\t\t}).catch(function (error) {\r\n\t\t\t\t\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t}\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailyLogs')\r\n .factory('logEntryViewDialog', logEntryViewDialog);\r\n\r\n logEntryViewDialog.$inject = ['$uibModal', '$templateCache', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function logEntryViewDialog($modal, $templateCache, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n\r\n $templateCache.put('logEntryViewDialog.tpl.html?v=' + opsIncludeVersion,\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '

Log Details

' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
');\r\n\r\n return service;\r\n\r\n function display(logTypeId, entryId) {\r\n var modalOptions = {\r\n templateUrl: 'logEntryViewDialog.tpl.html?v=' + opsIncludeVersion,\r\n controller: LogEntryViewController,\r\n controllerAs: \"vm\",\r\n keyboard: true,\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n logTypeId: logTypeId,\r\n entryId: entryId\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $modal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n LogEntryViewController.$inject = ['$uibModalInstance', 'options', 'common', 'dataservice'];\r\n\r\n /* @ngInject */\r\n function LogEntryViewController($modalInstance, options, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n vm.item = null;\r\n vm.getSingleItemAnswerText = getSingleItemAnswerText;\r\n vm.selectedOnly = selectedOnly;\r\n vm.cancel = function () {\r\n $modalInstance.dismiss('cancel');\r\n };\r\n\r\n vm.formatDateTimeAnswer = formatDateTimeAnswer;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem()];\r\n return common.$q.all(promises).then(function () {\r\n }, function (error) { });\r\n }\r\n\r\n function selectedOnly(item) {\r\n return item.Selected;\r\n }\r\n\r\n function getSingleItemAnswerText(question) {\r\n var answer = question.Answer;\r\n for (var i = 0; i < question.Items.length; i++) {\r\n if (question.Items[i].ID == answer) {\r\n return question.Items[i].Description;\r\n }\r\n }\r\n }\r\n\r\n function formatDateTimeAnswer(answer, isDate) {\r\n if (answer) {\r\n var m = moment(answer);\r\n if (isDate) {\r\n return m.format(\"L\");\r\n }\r\n else {\r\n return m.format(\"LT\");\r\n }\r\n }\r\n }\r\n\r\n function getItem() {\r\n return dataservice.getItem('api/DailyLogs/EntryForLogType/' + options.logTypeId + '/' + options.entryId)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n } else {\r\n common.logger.warning('Could not load entry');\r\n }\r\n })\r\n .catch(function (error) {\r\n common.logger.error('Error locating entry');\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailySetup')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'dailysetup',\r\n config: {\r\n url: '/dailysetup',\r\n title: 'Daily Setup',\r\n settings: {\r\n nav: 50,\r\n content: ' Daily Setup',\r\n authMode: 1,\r\n requireOps: true,\r\n mobileButton: true\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n },\r\n views: {\r\n \"\": {\r\n templateUrl: 'app/dailySetup/reactDailySetup.html?v=' + opsIncludeVersion ,\r\n controller: 'ReactDailySetupController',\r\n controllerAs: 'vm',\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n \r\n\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailySetup')\r\n .controller('ReactDailySetupController', ReactDailySetupController);\r\n\r\n ReactDailySetupController.$inject = ['$scope', '$filter', '$state', 'common', 'dataservice', 'completionsDataService',\r\n 'userService', 'backendHubProxy', '$interval', 'notesDataService', '$window', 'linkedTask.dialog' ];\r\n /* @ngInject */\r\n function ReactDailySetupController($scope, $filter, $state, common, dataservice, completionsDataService, userService, \r\n backendHubProxy, $interval, notesDataService, $window, linkedTaskDiag ) {\r\n var vm = this;\r\n \r\n vm.common = common;\r\n\r\n vm.connectionStatus = \"\";\r\n vm.showDailySetup = userService.hasDataApi() == \"1\";\r\n vm.minutesSinceLastChangeFlag = 1440;\r\n vm.isLoading = true;\r\n vm.title = \"Daily Setup\"\r\n vm.items = [];\r\n vm.displayedItems = [];\r\n vm.soScheduleItemCount = 0;\r\n vm.serviceDisplayedItems = [];\r\n vm.refresh = refresh;\r\n vm.completionsDataService = completionsDataService;\r\n vm.notesDataService = notesDataService;\r\n vm.userService = common.userService;\r\n vm.dataService = dataservice;\r\n vm.editTask = editTask;\r\n vm.updateBookingWithTaskId = updateBookingWithTaskId;\r\n vm.relatedBookings = [];\r\n vm.bookData = [];\r\n vm.lastRefreshed = \"loading\";\r\n vm.showRoomCode = $window.localStorage.getItem(\"OpsShowRoomCode\") == \"true\" ? true : false;\r\n vm.openNewTaskModal = openNewTaskModal;\r\n vm.onDate = common.getMainState(\"mainDate\");\r\n\r\n vm.expandAllServices = false;\r\n vm.expandAllServicesToggle = expandAllServicesToggle;\r\n vm.showHistoricalItems = true;\r\n vm.limitToCheckedInBookings = false;\r\n \r\n vm.allBookings = [];\r\n vm.tasks = [];\r\n vm.origTasks = [];\r\n vm.origAllBookings = [];\r\n vm.limitCompletionsByDepartment = false;\r\n \r\n vm.setAvailableAt = setAvailableAt;\r\n \r\n vm.allCompletionTypes = [];\r\n vm.clearSearch = clearSearch;\r\n vm.showReservedTime = showReservedTime;\r\n vm.toggleServices = toggleServices;\r\n vm.showCheckinFilter = showCheckinFilter;\r\n \r\n vm.settings = [];\r\n \r\n vm.filtersSet = false;\r\n\r\n vm.getHistoryForBooking = getHistoryForBooking;\r\n vm.getDailySetupForLinkedBooking = getDailySetupForLinkedBooking;\r\n vm.noEventsMessage = \"No Events\";\r\n vm.apiVersion = 0;\r\n vm.apiTypeId = common.userService.apiTypeId();\r\n vm.updateItemForBookingAction = updateItemForBookingAction;\r\n vm.updateSod = updateSod;\r\n\r\n\r\n vm.showNoShowAction = false;\r\n vm.showEstimatedCountAction = false;\r\n vm.showAddToCalendarAction = false;\r\n\r\n vm.filters = {\r\n GmtFromDate: '1/1/2015',\r\n GmtToDate: new Date().toUTCString(),\r\n Buildings: [-1],\r\n Statuses: [-1],\r\n Categories: [-1],\r\n Views: [],\r\n Udfs: [],\r\n LimitToBookingsWithSelectedCategories: false,\r\n LocalDateOnlyIsoString: moment(vm.onDate).format(\"YYYY-MM-DD\"),\r\n ShowEventsWithinThisManyDays : null\r\n };\r\n\r\n $scope.$on('$destroy', function () {\r\n backendHubProxy.stop();\r\n });\r\n \r\n\r\n vm.viewStatus = \"Disable Mobile View\";\r\n vm.toggleFullView = toggleFullView;\r\n\r\n vm.sort = sort;\r\n vm.currentSortColumn = \"\";\r\n vm.isSortDesc = false;\r\n vm.currentSortParser = null;\r\n\r\n var _forcedToast = null;\r\n\r\n function openNewTaskModal(item) {\r\n linkedTaskDiag.display(item, vm.settings).then(function (i) {\r\n \r\n //updateBookingWithTaskId(item, i.data.TaskId);\r\n }, function () { });;\r\n}\r\n \r\n\r\n function sort(collectionToSort, propertyName, parser, sortProperty, initial) {\r\n \r\n propertyName = sortProperty || propertyName;\r\n if (!initial) {\r\n \r\n if (vm.currentSortColumn === propertyName) {\r\n vm.isSortDesc = !vm.isSortDesc;\r\n }\r\n else {\r\n vm.isSortDesc = false;\r\n }\r\n }\r\n\r\n vm.currentSortColumn = propertyName;\r\n\r\n try {\r\n $window.localStorage.setItem(\"OpsDailySetupSort\", propertyName);\r\n $window.localStorage.setItem(\"OpsDailySetupSortDesc\", vm.isSortDesc); \r\n }\r\n catch (e) {\r\n console.log(e);\r\n }\r\n \r\n var props = {\r\n prop: propertyName,\r\n desc: vm.isSortDesc\r\n };\r\n\r\n vm.currentSortParser = parser;\r\n if (parser) {\r\n props.parser = parser;\r\n }\r\n\r\n //_sortBy(vm.displayedItems, props)\r\n _sortBy(collectionToSort, props);\r\n }\r\n\r\n \r\n \r\n activate();\r\n\r\n function activate() {\r\n if ($window.localStorage.getItem(\"DisableOpsMobileView\") === \"1\") {\r\n vm.viewStatus = \"Enable Mobile View\";\r\n $('link[title=responsiveCss]')[0].disabled = true;\r\n $('body').addClass(\"forceFull\");\r\n }\r\n try {\r\n vm.currentSortColumn = $window.localStorage.getItem(\"OpsDailySetupSort\") || \"\";\r\n vm.isSortDesc = $window.localStorage.getItem(\"OpsDailySetupSortDesc\") === \"true\" ? true : false;\r\n }\r\n catch (e) {\r\n console.log(e);\r\n }\r\n \r\n \r\n\r\n common.notifier.subscribe(common.config.events.signalRStatusChange, $scope, function (eventName, data) {\r\n vm.connectionStatus = data;\r\n });\r\n common.notifier.subscribe(common.config.events.filterCleared, $scope, function (eventName, data) {\r\n vm.showHistoricalItems = true;\r\n });\r\n\r\n _initFilters();\r\n backendHubProxy.displayedItems = vm.displayedItems;\r\n backendHubProxy.startListening();\r\n\r\n common.notifier.subscribe(common.config.events.userConfigOptionsChange, $scope, filtersChanged);\r\n common.notifier.subscribe(common.config.events.mainDateChange, $scope, dateChanged);\r\n completionsDataService.clearCache();\r\n var promises = [loadData()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(common.config.events.refreshCounts);\r\n vm.showNoShowAction = ((vm.apiVersion >= 5 && vm.apiTypeId === common.config.apiTypes.sevenPoint) || vm.apiTypeId === common.config.apiTypes.ems) && moment(vm.onDate).isSame(moment(), 'day');;\r\n vm.showEstimatedCountAction = ((vm.apiVersion >= 5 && vm.apiTypeId === common.config.apiTypes.sevenPoint) || vm.apiTypeId === common.config.apiTypes.ems) && (moment(vm.onDate).isSame(moment(), 'day') || moment(vm.onDate).isBefore(moment(), 'day'));\r\n \r\n vm.showAddToCalendarAction = _getSettingValue(\"ShowAddToCalendar\") == 1;\r\n\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getHistoryForBooking(item) {\r\n if (vm.apiTypeId === common.config.apiTypes.sevenPoint || vm.apiTypeId === common.config.apiTypes.ems) {\r\n\r\n return dataservice.getItems('api/DailySetup/HistoryForBooking/' + item.BookingId)\r\n .then(function (response) {\r\n item.history = response.data;\r\n _updateItemInCollection(vm.allBookings, item, \"BookingId\")\r\n }, function (error) { });\r\n }\r\n \r\n }\r\n\r\n\r\n function showCheckinFilter() {\r\n var apiTypeId = userService.apiTypeId();\r\n if (apiTypeId === \"4CF523BF-F6DD-441C-810F-C87347963B5D\" || apiTypeId === \"BCA944F7-7795-45CD-A21B-CB5F16DC4175\") {\r\n return _getSettingValue(\"IncludeCheckinFilter\") == 1;\r\n };\r\n return false;\r\n }\r\n \r\n \r\n\r\n function updateItemForBookingAction(newItem) {\r\n \r\n for(var i = 0; i < vm.filters.Statuses.length; i++) {\r\n if(vm.filters.Statuses[i] == newItem.Status.ID) {\r\n _updateItemInCollection(vm.allBookings, newItem, \"BookingId\");\r\n return newItem;\r\n }\r\n }\r\n removeItemFromCollection(vm.allBookings, newItem, \"BookingId\");\r\n }\r\n\r\n\r\n function _updateItemInCollection(collection, item, propertyName) {\r\n \r\n var tempCollection = collection.concat();\r\n for (var i = 0; i < tempCollection.length; i++) {\r\n if (tempCollection[i][propertyName] === item[propertyName]) {\r\n tempCollection[i] = item;\r\n break;\r\n }\r\n }\r\n \r\n collection = tempCollection;\r\n }\r\n\r\n function removeItemFromCollection(collection, item, propertyName) {\r\n var tempCollection = collection.concat();\r\n for (var i = 0; i < tempCollection.length; i++) {\r\n if (tempCollection[i][propertyName] === item[propertyName]) {\r\n tempCollection.splice(i, 1);\r\n break;\r\n }\r\n }\r\n collection = tempCollection;\r\n }\r\n\r\n function toggleServices(item) {\r\n if (item) {\r\n item.servicesShowing = !item.servicesShowing;\r\n }\r\n _updateItemInCollection(vm.allBookings, item, \"BookingId\");\r\n }\r\n\r\n function updateBookingWithTaskId(item, linkedItemId) {\r\n item.LinkedTaskId = linkedItemId;\r\n _updateItemInCollection(vm.allBookings, item, \"BookingId\");\r\n }\r\n \r\n function toggleFullView() {\r\n if (vm.viewStatus === \"Disable Mobile View\") {\r\n $window.localStorage.setItem(\"DisableOpsMobileView\", \"1\");\r\n vm.viewStatus = \"Enable Mobile View\";\r\n\r\n $('link[title=responsiveCss]')[0].disabled = true;\r\n $('body').addClass(\"forceFull\");\r\n }\r\n else {\r\n vm.viewStatus = \"Disable Mobile View\";\r\n $window.localStorage.setItem(\"DisableOpsMobileView\", \"0\");\r\n $('link[title=responsiveCss]')[0].disabled = false;\r\n $('body').removeClass(\"forceFull\");\r\n \r\n }\r\n }\r\n\r\n function editTask(item) {\r\n $state.go(\"tasks.details\", { id: item.TaskId, fromDisplay: true, fromDailySetup: true });\r\n }\r\n\r\n var _showReservedTime;\r\n function _setReservedDisplay() {\r\n var filterData = userService.filterData();\r\n if (filterData) {\r\n _showReservedTime = filterData.showReservedTimes ? 1 : 0;\r\n }\r\n else {\r\n _showReservedTime = 1;\r\n }\r\n }\r\n\r\n \r\n function showReservedTime() {\r\n if (_showReservedTime == undefined) {\r\n _setReservedDisplay();\r\n }\r\n return _showReservedTime == 1;\r\n }\r\n \r\n\r\n function expandAllServicesToggle() {\r\n vm.expandAllServices = !vm.expandAllServices;\r\n }\r\n\r\n function clearSearch() {\r\n document.getElementById(\"searchBox\").value = \"\";\r\n }\r\n\r\n function cancelAvailableAt(item) {\r\n vm.availableAtId = -1;\r\n vm.availableAtTime = null;\r\n }\r\n\r\n function setAvailableAt(item, selectedTime) {\r\n var dto = {};\r\n dto.BookingId = item.BookingId;\r\n\r\n dto.AvailableAt = selectedTime;\r\n\r\n dataservice.saveItem('api/DailySetup/SetAvailableAt', dto).then(function (response) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n //we need this for signalr stuff\r\n $scope.$watchCollection('vm.displayedItems', function (newCollection, oldCollection, scope) {\r\n _setBookingCollections();\r\n })\r\n\r\n function updateSod(item, sod) {\r\n var dto = {\r\n\r\n };\r\n dataservice.saveItem('api/DailySetup/UpdateSod', dto).then(function (response) {\r\n\r\n }, function (error) { });\r\n }\r\n\r\n function _setBookingCollections() {\r\n vm.allBookings = [];\r\n vm.tasks = [];\r\n if (vm.displayedItems && vm.displayedItems.length > 0) {\r\n \r\n vm.displayedItems.map(function (item) {\r\n if (item.TaskId == 0) {\r\n if (!item.IsLinkedToTask) {\r\n vm.allBookings.push(item);\r\n }\r\n }\r\n else {\r\n vm.tasks.push(item);\r\n }\r\n });\r\n }\r\n \r\n }\r\n \r\n function _initFilters() {\r\n\r\n var gmtToDate = new Date();\r\n gmtToDate.setHours(0, 0, 0, 0);\r\n vm.filters.GmtToDate = moment(gmtToDate).add(1, 'd').toDate();\r\n\r\n var filterData = userService.filterData();\r\n \r\n if (filterData) {\r\n if (filterData.categories) {\r\n var roomChargeIndex = filterData.categories.indexOf(\"2147483647\");\r\n if (roomChargeIndex > -1) {\r\n filterData.categories.splice(roomChargeIndex, 1);\r\n }\r\n }\r\n vm.filters.Buildings = filterData.buildings;\r\n vm.filters.Statuses = filterData.statuses;\r\n vm.filters.Categories = filterData.categories;\r\n vm.filters.RoomTypes = filterData.roomTypes || [];\r\n vm.filters.EventTypes = filterData.eventTypes || [];\r\n vm.filters.Views = filterData.views || [];\r\n vm.filters.Udfs = filterData.udfs || [];\r\n vm.filters.LimitToBookingsWithSelectedCategories = filterData.includeBookingWithCategoriesOnly;\r\n vm.minutesSinceLastChangeFlag = filterData.highlightChangesWithin;\r\n vm.filters.showReservedTimes = filterData.showReservedTimes;\r\n vm.filters.ShowEventsWithinThisManyDays = filterData.ShowEventsWithinThisManyDays;\r\n } \r\n \r\n }\r\n \r\n function _setfilterDates() {\r\n var gmtFromDate = new Date(vm.onDate);\r\n \r\n gmtFromDate.setHours(0, 0, 0, 0);\r\n \r\n vm.filters.GmtFromDate = gmtFromDate;\r\n vm.filters.LocalDateOnlyIsoString = moment(vm.onDate).format(\"YYYY-MM-DD\");\r\n vm.filters.GmtToDate = moment(gmtFromDate).add(1, 'd').toDate();\r\n }\r\n\r\n function filtersChanged(eventName, data) {\r\n \r\n _initFilters();\r\n _setReservedDisplay();\r\n getItems(true);\r\n }\r\n\r\n function dateChanged(eventName, newDate) {\r\n vm.onDate = newDate;\r\n vm.showNoShowAction = ((vm.apiVersion >= 5 && vm.apiTypeId === common.config.apiTypes.sevenPoint) || vm.apiTypeId === common.config.apiTypes.ems) && moment(vm.onDate).isSame(moment(), 'day');;\r\n vm.showEstimatedCountAction = ((vm.apiVersion >= 5 && vm.apiTypeId === common.config.apiTypes.sevenPoint) || vm.apiTypeId === common.config.apiTypes.ems) && (moment(vm.onDate).isSame(moment(), 'day') || moment(vm.onDate).isBefore(moment(), 'day'));\r\n getItems(true);\r\n }\r\n\r\n \r\n\r\n function loadData() {\r\n if (vm.apiTypeId !== common.config.apiTypes.centersXml && vm.showDailySetup) {\r\n if (!vm.filters.Buildings || !vm.filters.Statuses) {\r\n common.logger.error(\"Filters aren't set\");\r\n vm.filtersSet = false;\r\n return;\r\n }\r\n else {\r\n vm.filtersSet = true;\r\n }\r\n }\r\n else {\r\n vm.filtersSet = true;\r\n }\r\n\r\n _setfilterDates();\r\n\r\n \r\n\r\n return dataservice.query('api/DailySetup/InitData', vm.filters).then(function (response) {\r\n var loadData = response.data;\r\n vm.settings = loadData.Settings;\r\n vm.allCompletionTypes = loadData.CompletionTypes;\r\n vm.apiVersion = loadData.ApiVersion;\r\n _processItems(loadData.Data);\r\n\r\n vm.expandAllServices = _getSettingValue(\"ExpandServicesOnLoad\") == 1;\r\n\r\n vm.bookData = loadData.BookData;\r\n return vm.items;\r\n }, function (error) { });\r\n\r\n }\r\n\r\n function _getSettingValue(settingKey) {\r\n if (!vm.settings) {\r\n return \"\";\r\n }\r\n for (var i = 0; i < vm.settings.length; i++) {\r\n if (vm.settings[i].SettingKey == settingKey) {\r\n return vm.settings[i].SettingValue;\r\n }\r\n }\r\n }\r\n\r\n function getItems(refreshCache) {\r\n if (!refreshCache) {\r\n refreshCache = false;\r\n }\r\n\r\n\r\n _stop();\r\n _setfilterDates();\r\n\r\n if (vm.filters.ShowEventsWithinThisManyDays) {\r\n var gmtFromDate = moment(vm.filters.GmtFromDate);\r\n var lastDate = new Date();\r\n lastDate.setHours(0, 0, 0, 0);\r\n if (moment(lastDate).add(vm.filters.ShowEventsWithinThisManyDays, 'days').isBefore(gmtFromDate)) {\r\n vm.noEventsMessage = \"Your filter does not allow you to see events on this date\";\r\n }\r\n else {\r\n vm.noEventsMessage = \"No Events\";\r\n }\r\n }\r\n vm.filters.RefreshCache = refreshCache;\r\n vm.lastRefreshed = \"loading\"\r\n \r\n if (vm.filters && vm.filters.Categories) {\r\n var roomChargeIndex = vm.filters.Categories.indexOf(\"2147483647\");\r\n if (roomChargeIndex > -1) {\r\n vm.filters.Categories.splice(roomChargeIndex, 1);\r\n }\r\n }\r\n \r\n return dataservice.query('api/DailySetup', vm.filters).then(function (response) {\r\n var data = response.data;\r\n \r\n if (data.BookData) {\r\n vm.bookData = data.BookData;\r\n _processItems(data.displayData);\r\n }\r\n else {\r\n _processItems(data);\r\n }\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function getDailySetupForLinkedBooking(item) {\r\n \r\n item.showingRelatedBooking = !item.showingRelatedBooking;\r\n if (item.RelatedBookingItem) {\r\n \r\n _updateItemInCollection(vm.tasks, item, \"TaskId\");\r\n return;\r\n }\r\n _stop();\r\n _setfilterDates();\r\n\r\n return dataservice.query('api/DailySetup/ForBooking/' + item.LinkedBookingId, vm.filters).then(function (response) {\r\n var data = response.data;\r\n if (data.length === 1) {\r\n _updateTimes(data);\r\n var b = data[0];\r\n item.RelatedBookingItem = b;\r\n //vm.allBookings.push(b);\r\n vm.items.push(b);\r\n _updateItemInCollection(vm.tasks, item, \"TaskId\");\r\n }\r\n else {\r\n common.logger.error(\"We couldn't find the booking. Make sure that your filters are set to include it.\");\r\n }\r\n _start();\r\n }, function (error) { });\r\n }\r\n\r\n function _updateTimes(items) {\r\n var numberOfItemsRequiringAttention = 0;\r\n for (var i = 0; i < items.length; i++) {\r\n var onItem = items[i];\r\n onItem.BuildingLocalReseveredStartDisplay = moment(onItem.BuildingLocalReseveredStart).format(\"LT\");\r\n onItem.BuildingLocalReseveredEndDisplay = moment(onItem.BuildingLocalReseveredEnd).format(\"LT\");\r\n onItem.BuildingLocalEventStartDisplay = moment(onItem.BuildingLocalEventStart).format(\"LT\");\r\n onItem.BuildingLocalEventEndDisplay = moment(onItem.BuildingLocalEventEnd).format(\"LT\");\r\n if (onItem.RequiresAcknowledgement) {\r\n numberOfItemsRequiringAttention++;\r\n }\r\n }\r\n return numberOfItemsRequiringAttention;\r\n }\r\n \r\n function _processItems(items) {\r\n \r\n if (!items) {\r\n items = [];\r\n }\r\n else if (items.Message) {\r\n common.logger.error(\"An error occurred trying to load your items, you should contact 7 Point Solutions if the problem persists\");\r\n items = [];\r\n }\r\n var numberOfItemsRequiringAttention = _updateTimes(items);;\r\n\r\n if (numberOfItemsRequiringAttention > 0) {\r\n _forcedToast = common.logger.forceAcknowledge(\"There are \" + numberOfItemsRequiringAttention + \" items that need your attention\", \"Urgent Action Required\");\r\n }\r\n else {\r\n common.logger.clearToast(_forcedToast);\r\n _forcedToast = null;\r\n }\r\n\r\n vm.items = items;\r\n \r\n vm.displayedItems = [].concat(vm.items);\r\n \r\n vm.origTasks = [];\r\n vm.origAllBookings = [];\r\n \r\n items.map(function (item) {\r\n if (item.TaskId == 0) {\r\n vm.origAllBookings.push(item);\r\n }\r\n else {\r\n vm.origTasks.push(item);\r\n }\r\n })\r\n if (vm.currentSortColumn !== \"\") {\r\n sort(items, vm.currentSortColumn, vm.currentSortParser, null, true);\r\n }\r\n \r\n \r\n _setBookingCollections();\r\n backendHubProxy.items = vm.items;\r\n backendHubProxy.displayedItems = vm.displayedItems;\r\n _refreshDataIn = defaultRefreshTime();\r\n vm.lastRefreshed = moment().format(\"hh:mm A\");\r\n _start();\r\n }\r\n\r\n function refresh() {\r\n getItems(true);\r\n }\r\n\r\n var _autoRefreshDisabled = false;\r\n \r\n function defaultRefreshTime() {\r\n var refreshFromSetting = _getSettingValue(\"DailySetupAutoRefreshInterval\");\r\n if (refreshFromSetting == 0) {\r\n _autoRefreshDisabled = true;\r\n }\r\n if (refreshFromSetting) {\r\n var asint = parseInt(refreshFromSetting);\r\n if (isNaN(asint)) {\r\n return 600000;\r\n }\r\n\r\n return asint * 60000;\r\n }\r\n return 600000;\r\n }\r\n\r\n\r\n var _timerPromise, _tickPromise, _refreshDataIn = 0;\r\n\r\n function _tick() {\r\n \r\n if (_refreshDataIn >= 0) {\r\n _refreshDataIn = _refreshDataIn - 1000;\r\n }\r\n else {\r\n _refreshDataIn = defaultRefreshTime();\r\n }\r\n }\r\n\r\n function _stop() {\r\n common.$timeout.cancel(_timerPromise);\r\n $interval.cancel(_tickPromise);\r\n }\r\n\r\n function _start() {\r\n _stop();\r\n _tickPromise = $interval(_tick, 1000);\r\n if (_autoRefreshDisabled === false) {\r\n _timerPromise = common.$timeout(getItems, _refreshDataIn);\r\n }\r\n }\r\n\r\n\r\n\r\n $scope.$on('$destroy', function () {\r\n _stop();\r\n });\r\n\r\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\r\n\r\n var _sortBy = (function () {\r\n\r\n var _defaults = {\r\n parser: function parser(x) {\r\n return x;\r\n },\r\n desc: false\r\n };\r\n\r\n var isObject = function isObject(o) {\r\n return o !== null && (typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) === \"object\";\r\n };\r\n var isDefined = function isDefined(v) {\r\n return typeof v !== \"undefined\";\r\n };\r\n\r\n //gets the item to be sorted\r\n function getItem(x) {\r\n var sortObj = x;\r\n var sortProp = this.prop;\r\n var parts = this.prop.split('.');\r\n if (parts.length > 1) {\r\n sortObj = x[parts[0]];\r\n sortProp = parts[1];\r\n }\r\n var isProp = isObject(sortObj) && isDefined(sortObj[sortProp]);\r\n \r\n return this.parser(isProp ? sortObj[sortProp] : sortObj);\r\n }\r\n\r\n return function (array, options) {\r\n if (!(array instanceof Array) || !array.length) return [];\r\n var opt = Object.assign({}, _defaults, options);\r\n opt.desc = opt.desc ? -1 : 1;\r\n return array.sort(function (a, b) {\r\n\r\n a = getItem.call(opt, a);\r\n b = getItem.call(opt, b);\r\n if (a === null) {\r\n return -1;\r\n } else if (b === null) {\r\n return 1;\r\n }\r\n a = a.toLowerCase();\r\n b = b.toLowerCase();\r\n return opt.desc * (a < b ? -1 : +(a > b));\r\n });\r\n };\r\n })();\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .controller('DashboardController', DashboardController);\r\n\r\n DashboardController.$inject = ['$scope', '$stateParams', '$sce', 'common', 'dataservice', '$timeout'];\r\n /* @ngInject */\r\n function DashboardController($scope, $stateParams, $sce, common, dataservice, $timeout) {\r\n var vm = this;\r\n vm.title = \"Dashboard\";\r\n vm.isLoading = true;\r\n vm.refresh = refresh;\r\n vm.onDate = common.getMainState(\"mainDate\");\r\n vm.ExpirationWarningMsg = \"\";\r\n\r\n vm.scrollerData = {};\r\n vm.safeSvg = safeSvg;\r\n vm.selectedSvg = \"\";\r\n vm.selectedSvgId = '';\r\n vm.selectedCaption = '';\r\n vm.processFloorPlan = processFloorPlan;\r\n vm.availabilityStatus = \"\";\r\n vm.notNow = false;\r\n vm.getAvailability = getAvailability;\r\n vm.activeRoomCodes = [];\r\n vm.activeRooms = [];\r\n vm.keyValueRooms = [];\r\n vm.availabilityStatus = \"\";\r\n vm.backToNow = _backToNow;\r\n vm.selectedCategory = -1;\r\n vm.floorPlanSelected = floorPlanSelected;\r\n vm.roomClicked = roomClicked;\r\n vm.expirationClass = \"wred\";\r\n vm.userService = common.userService;\r\n vm.exchangeSync = exchangeSync;\r\n vm.alertColor = vm.alertCount > 0 ? 'red' : 'primary';\r\n \r\n\r\n vm.makeMapTime = function (valueToConvert) {\r\n var asDate = moment.unix(valueToConvert);\r\n return asDate.format(\"ddd, hh:mm A\");\r\n }\r\n vm.mapTimeChanged = mapTimeChanged;\r\n\r\n activate();\r\n\r\n function activate() {\r\n common.notifier.subscribe(common.config.events.mainDateChange, $scope, dateChanged);\r\n\r\n var dateAsMoment = moment(vm.onDate);\r\n vm.scrollerData.mapTimeMin = dateAsMoment.startOf('day').unix();;\r\n vm.scrollerData.mapTime = moment(vm.onDate).unix();\r\n vm.scrollerData.mapTimeMax = dateAsMoment.add(1, 'd').unix();\r\n\r\n\r\n if (common.userService.userType() > 0) {\r\n var activeUntil = moment(common.userService.activeUntilUtc(), \"MM/DD/YYYY hh:mm:ss a\")\r\n var now = moment();\r\n var diff = activeUntil.diff(now, 'days');\r\n\r\n var daysTilExpiration = activeUntil.diff(now, 'days');\r\n\r\n if (daysTilExpiration < 45 && daysTilExpiration > 15) {\r\n vm.ExpirationWarningMsg = \"Your subscription to 7 Point OPs is up for renewal on \" + activeUntil.format(\"MM/DD/YYYY\");\r\n vm.ExpirationTitleMsg = \"Thanks for being a subscriber\"\r\n vm.expirationClass = \"wdarkgreen\";\r\n }\r\n\r\n if (daysTilExpiration < 15) {\r\n vm.ExpirationTitleMsg = \"Thanks for being a subscriber\";\r\n vm.ExpirationWarningMsg = \"Your subscription to 7 Point Ops is expiring on \" + now.add(diff, 'days').format(\"MM/DD/YYYY\");\r\n vm.expirationClass = \"wred\";\r\n }\r\n }\r\n\r\n //var promises = [getItems(), getFloorPlans(), getLookups()];\r\n var promises = [loadData()]\r\n return common.$q.all(promises).then(function () {\r\n //this fixes where the time is in slider\r\n $scope.$broadcast(\"refreshSlider\");\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n _setClock();\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n var _availabilityTimer = null;\r\n var _backToNowTimer = null;\r\n var _clockTimer = null;\r\n\r\n function _setClock() {\r\n var secondsUntilNextMin = moment().seconds();\r\n var wait = 60 - secondsUntilNextMin;\r\n _clockTimer = $timeout(_tick, wait * 1000);\r\n }\r\n\r\n function roomClicked(room) {\r\n }\r\n\r\n function _backToNow() {\r\n vm.notNow = false;\r\n $timeout.cancel(_availabilityTimer);\r\n vm.scrollerData.mapTime = moment(vm.onDate).unix();\r\n _setClock();\r\n vm.getAvailability();\r\n }\r\n\r\n function _tick() {\r\n var newDate = moment(vm.onDate);\r\n var newTime = moment();\r\n var newDateTime = moment(common.buildDateTime(newDate.toDate(), newTime.toDate())).unix();\r\n\r\n\r\n //we just ticked into tomorrow\r\n if (newDateTime > vm.scrollerData.mapTimeMax) {\r\n vm.scrollerData.mapTimeMin = moment(vm.onDate).startOf('day').unix();\r\n vm.scrollerData.mapTimeMax = moment(vm.onDate).startOf('day').add(1, 'd').unix();\r\n }\r\n vm.scrollerData.mapTime = newDateTime;\r\n\r\n _clockTimer = $timeout(_tick, 60000);\r\n }\r\n\r\n function safeSvg(svg) {\r\n return $sce.trustAsHtml(svg);\r\n }\r\n\r\n function exchangeSync() {\r\n dataservice.getItem(\"api/StorageQueue/ExchangeSync\").then(function (response) {\r\n console.log(response);\r\n });\r\n }\r\n\r\n\r\n function getAvailability() {\r\n $timeout.cancel(_availabilityTimer);\r\n vm.availabilityStatus = \"Loading availability\";\r\n var m = vm.scrollerData.mapTime;\r\n\r\n var availabilityDate = new Date(m * 1000);\r\n\r\n var availDto = {\r\n GmtDateTime: availabilityDate,\r\n Rooms: vm.keyValueRooms\r\n };\r\n if (availDto.Rooms.length > 0) {\r\n if (vm.selectedCategory === -1) {\r\n\r\n dataservice.query(\"api/FloorPlans/AvailabilityForRooms\", availDto).then(function (response) {\r\n var availablityData = response.data.RoomAvailability;\r\n if (availablityData) {\r\n var roomNodes = $(\"#floorPlanHolder\").find(\".room\");\r\n\r\n for (var i = 0; i < availablityData.length; i++) {\r\n var roomElement = $(\"#floorPlanHolder\").find(\".room[data-roomcode='\" + availablityData[i].RoomCode + \"']\");\r\n if (roomElement) {\r\n var style = roomElement.attr(\"style\");\r\n var reserved = availablityData[i].IsReserved;\r\n //var occupied = loop[i].IsOccupied;\r\n //var isSensorControlledSpace = loop[i].IsSensorControlledSpace;\r\n\r\n var fill;\r\n if (reserved === true) {\r\n fill = \"#ff0000\";\r\n\r\n }\r\n else {\r\n fill = \"#00ff0a\";\r\n }\r\n roomElement.css({ fill: fill });\r\n }\r\n }\r\n }\r\n }, function (error) { }).finally(function () {\r\n\r\n _availabilityTimer = $timeout(vm.getAvailability, 300000);\r\n vm.availabilityStatus = \"\";\r\n });\r\n }\r\n else {\r\n dataservice.query(\"api/FloorPlans/ServiceAvailability\", availDto).then(function (response) {\r\n var availablityData = response.data.ServicesInUse;\r\n if (availablityData) {\r\n var roomNodes = $(\"#floorPlanHolder\").find(\".room\");\r\n\r\n for (var i = 0; i < availablityData.length; i++) {\r\n var onItem = availablityData[i];\r\n\r\n var roomElement = $(\"#floorPlanHolder\").find(\".room[data-roomcode='\" + onItem.RoomCode + \"']\");\r\n if (roomElement) {\r\n var style = roomElement.attr(\"style\");\r\n var hasCategory = false;\r\n if (onItem.CategoriesInUse.length > 0) {\r\n for (var j = 0; j < onItem.CategoriesInUse.length; j++) {\r\n if (onItem.CategoriesInUse[j] === vm.selectedCategory) {\r\n hasCategory = true;\r\n }\r\n }\r\n }\r\n\r\n var fill;\r\n if (hasCategory === true) {\r\n fill = \"#ff0000\";\r\n }\r\n else {\r\n fill = \"#4198f4\";\r\n }\r\n roomElement.css({ fill: fill });\r\n }\r\n }\r\n }\r\n }, function (error) { }).finally(function () {\r\n\r\n _availabilityTimer = $timeout(vm.getAvailability, 300000);\r\n vm.availabilityStatus = \"\";\r\n });\r\n\r\n }\r\n\r\n }\r\n else {\r\n vm.availabilityStatus = \"\";\r\n }\r\n }\r\n\r\n $scope.$on(\"$destroy\", function () {\r\n $timeout.cancel(_availabilityTimer);\r\n $timeout.cancel(_clockTimer);\r\n $timeout.cancel(_backToNowTimer);\r\n });\r\n\r\n function processFloorPlan() {\r\n\r\n vm.activeRoomCodes = [];\r\n vm.activeRooms = [];\r\n vm.keyValueRooms = [];\r\n $(\"#floorPlanHolder\").find('.room').each(function (i, obj) {\r\n var $obj = $(obj);\r\n var roomCode = $obj.attr(\"data-roomcode\");\r\n $obj.click(_roomClick);\r\n vm.activeRoomCodes.push(roomCode);\r\n });\r\n\r\n dataservice.query(\"api/FloorPlans/RoomsByCode\", vm.activeRoomCodes).then(function (response) {\r\n vm.activeRooms = response.data;\r\n\r\n for (var i = 0; i < vm.activeRooms.length; i++) {\r\n vm.keyValueRooms.push({ \"ID\": vm.activeRooms[i].ID, \"Value\": vm.activeRooms[i].Code });\r\n }\r\n getAvailability();\r\n }, function (error) { });\r\n\r\n // var svgId = $(\"#floorPlanHolder\").find(\"svg\").attr(\"id\");\r\n //svgPanZoom(\"#\" + svgId, { zoomEnabled: true, controlIconsEnaable: true, fit: true, center: true });\r\n }\r\n\r\n function _roomClick() {\r\n var roomNode = $(this);\r\n var roomCode = roomNode.attr(\"data-roomcode\");\r\n if (roomCode) {\r\n for (var j = 0; j < vm.keyValueRooms.length; j++) {\r\n if (vm.keyValueRooms[j].Value == roomCode) {\r\n var roomId = vm.keyValueRooms[j].ID;\r\n var m = vm.scrollerData.mapTime;\r\n var availabilityDate = new Date(m * 1000);\r\n\r\n var availDto = {\r\n GmtDate: availabilityDate,\r\n RoomId: roomId\r\n };\r\n // inProgressDiag.display(availDto).then(function (response) { }, function () { });\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n function mapTimeChanged() {\r\n vm.notNow = true;\r\n $timeout.cancel(_availabilityTimer);\r\n\r\n $timeout.cancel(_clockTimer);\r\n $timeout.cancel(_backToNowTimer);\r\n _availabilityTimer = $timeout(vm.getAvailability, 1000);\r\n\r\n _backToNowTimer = $timeout(_backToNow, 10000);\r\n vm.availabilityStatus = \"Stop to load\";\r\n }\r\n\r\n function _setMapTimerDates() {\r\n $timeout.cancel(_availabilityTimer);\r\n $timeout.cancel(_clockTimer);\r\n $timeout.cancel(_backToNowTimer);\r\n\r\n var dateAsMoment = moment(vm.onDate);\r\n vm.scrollerData.mapTimeMin = dateAsMoment.startOf('day').unix();;\r\n vm.scrollerData.mapTime = moment(vm.onDate).unix();\r\n vm.scrollerData.mapTimeMax = dateAsMoment.add(1, 'd').unix();\r\n\r\n _availabilityTimer = $timeout(vm.getAvailability, 1000);\r\n }\r\n\r\n function dateChanged(eventName, newDate) {\r\n vm.onDate = newDate;\r\n getItems();\r\n\r\n _setMapTimerDates();\r\n\r\n }\r\n\r\n function loadData() {\r\n var m = moment(vm.onDate);\r\n var t = new Date();\r\n var d = m.toDate();\r\n var q = moment(new Date(d.getFullYear(), d.getMonth(), d.getDate(), t.getHours(), t.getMinutes(), 0, 0));\r\n\r\n return dataservice.getItems('api/Dashboard/Load?localDate=' + q.toISOString() + \"&localIsoDateOnly=\" + q.format(\"YYYY-MM-DD\"))\r\n .then(function (response) {\r\n var data = response.data;\r\n vm.categories = data.Categories;\r\n vm.floorPlans = data.FloorPlans;\r\n if (vm.floorPlans && vm.floorPlans.length > 0) {\r\n floorPlanSelected(vm.floorPlans[0]);\r\n }\r\n var countModel = data.CountData;\r\n vm.alertCount = countModel.AlertCount.ActiveCount;\r\n vm.taskCount = countModel.TaskCount.ActiveCount;\r\n common.notifier.notify(common.config.events.refreshCounts, { alertsCount: vm.alertCount, tasksCount: vm.taskCount });\r\n\r\n\r\n\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n var m = moment(vm.onDate);\r\n\r\n return dataservice.getCounts(m).then(function (response) {\r\n var countModel = response.data;\r\n vm.alertCount = countModel.AlertCount.ActiveCount;\r\n vm.taskCount = countModel.TaskCount.ActiveCount;\r\n common.notifier.notify(common.config.events.refreshCounts, { alertsCount: vm.alertCount, tasksCount: vm.taskCount });\r\n }, function (error) { });\r\n }\r\n\r\n function getLookups() {\r\n return dataservice.getItems('api/FloorPlans/GetCategories').then(function (response) {\r\n vm.categories = response.data.Categories;\r\n }, function (error) { });\r\n }\r\n\r\n function getFloorPlans() {\r\n return dataservice.getItems('api/FloorPlans').then(function (response) {\r\n vm.floorPlans = response.data;\r\n if (vm.floorPlans && vm.floorPlans.length > 0) {\r\n floorPlanSelected(vm.floorPlans[0]);\r\n }\r\n return vm.floorPlans;\r\n }, function (error) { });\r\n }\r\n\r\n function floorPlanSelected(floorPlan) {\r\n vm.selectedSvg = floorPlan.SvgData;\r\n vm.selectedSvgId = floorPlan.ID;\r\n vm.selectedCaption = floorPlan.Caption;\r\n $timeout(processFloorPlan, 0);\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'dashboard',\r\n config: {\r\n url: '/',\r\n templateUrl: 'app/dashboard/dashboard.html?v=' + opsIncludeVersion,\r\n controller: 'DashboardController',\r\n controllerAs: 'vm',\r\n title: 'Dashboard',\r\n settings: {\r\n nav: 1,\r\n content: ' Dashboard',\r\n authMode: 1,\r\n requireOps: true,\r\n mobileButton: true\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.departments')\r\n .controller('DepartmentDetailController', DepartmentDetailController);\r\n\r\n DepartmentDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function DepartmentDetailController($state, $stateParams, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.countOfUsersInDepartments = { ActiveCount: 0, Name: -1 };\r\n vm.countOfCompletionTypesInDepartments = { ActiveCount: 0, Name: -1 };\r\n \r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.deleteTitle = \"\";\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.isNew = isNew;\r\n vm.preventDelete = preventDelete;\r\n vm.relationshipData = {\r\n Users: [],\r\n CompletionTypes: []\r\n };\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin() , initLookups(), getItem(), getCounts()];\r\n return common.$q.all(promises).then(function (data) {\r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"departments.list\");\r\n }\r\n\r\n function preventDelete() {\r\n var usersInDepartment = vm.countOfUsersInDepartments.ActiveCount;\r\n var completionTypesInDepartment = 0;\r\n if (vm.countOfCompletionTypesInDepartments) {\r\n completionTypesInDepartment = vm.countOfCompletionTypesInDepartments;\r\n }\r\n\r\n\r\n if (usersInDepartment > 0) {\r\n vm.deleteTitle = \"You can't delete a department that a user belongs to\";\r\n }\r\n\r\n if (completionTypesInDepartment > 0) {\r\n vm.deleteTitle = \"You can't delete a department that has completion types\";\r\n }\r\n\r\n if ($stateParams.id <= 0 || usersInDepartment > 0 || completionTypesInDepartment > 0) {\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Department')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/Departments/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"-1\";\r\n }\r\n\r\n function getCounts() {\r\n if($stateParams.id > 0) {\r\n dataservice.getItems('api/Departments/CountsOfUsersInDepartment/' + $stateParams.id).then(function (response) {\r\n if (response.data && response.data.length > 0) {\r\n vm.countOfUsersInDepartments = response.data[0];\r\n }\r\n }, function (error) { });\r\n\r\n dataservice.getItems('api/Departments/GetCountOfCompletionTypesByDepartment/' + $stateParams.id).then(function (response) {\r\n if (response.data && response.data.length > 0) {\r\n vm.countOfCompletionTypesInDepartments = response.data[0];\r\n }\r\n }, function (error) { });\r\n }\r\n else {\r\n vm.countOfUsersInDepartments = { ActiveCount: 0, Name: -1 };\r\n vm.countOfCompletionTypesInDepartments = { ActiveCount: 0, Name: -1 };\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '-1') {\r\n vm.item = {};\r\n vm.item.ID = -1;\r\n vm.item.UserIds = [];\r\n vm.item.Active = 1;\r\n \r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/Departments/\" + val)\r\n .then(function (response) {\r\n if (response) {\r\n vm.item = response.data;\r\n common.setAuditInfo(vm.item);\r\n common.convertDateStringsToDates(vm.filters);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function initLookups() {\r\n dataservice.getItems('api/Users/GetActive').then(function (response) {\r\n var data = response.data;\r\n vm.relationshipData.Users = data;\r\n return;\r\n }, function (error) { });\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n\r\n dataservice.saveItem('api/Departments', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.departments')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'departments',\r\n config: {\r\n abstract: true,\r\n url: '/departments',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'departments.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/departments/list.html?v=' + opsIncludeVersion,\r\n controller: 'DepartmentsListController',\r\n controllerAs: 'vm',\r\n title: 'Departments'\r\n }\r\n },\r\n {\r\n state: 'departments.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/departments/details.html?v=' + opsIncludeVersion,\r\n controller: 'DepartmentDetailController',\r\n controllerAs: 'vm',\r\n title: 'Department',\r\n settings: {}\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.departments')\r\n .controller('DepartmentsListController', DepartmentsListController);\r\n\r\n DepartmentsListController.$inject = ['common', 'dataservice'];\r\n /* @ngInject */\r\n function DepartmentsListController(common, dataservice) {\r\n var vm = this;\r\n\r\n vm.title = 'Departments';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.counts = [];\r\n vm.alertsCount = [];\r\n vm.completionTypesCount = [];\r\n vm.alertsCount = [];\r\n vm.refresh = refresh;\r\n vm.usersInDepartments = usersInDepartments;\r\n vm.completionTypesByDepartment = completionTypesByDepartment;\r\n vm.alertsByDepartment = alertsByDepartment;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin() , getItems(), getCounts()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function usersInDepartments(departmentId) {\r\n return _getCount(vm.counts, departmentId);\r\n }\r\n\r\n function completionTypesByDepartment(departmentId) {\r\n return _getCount(vm.completionTypesCount, departmentId);\r\n }\r\n\r\n function alertsByDepartment(departmentId) {\r\n return _getCount(vm.alertsCount, departmentId);\r\n }\r\n\r\n function _getCount(collection, departmentId) {\r\n for (var i = 0; i < collection.length; i++) {\r\n if (collection[i].Name == departmentId) {\r\n return collection[i].ActiveCount;\r\n }\r\n }\r\n }\r\n\r\n function getCounts() {\r\n dataservice.getItems('api/Departments/CountsOfUsersInDepartment/-1').then(function (response) {\r\n vm.counts = response.data;\r\n }, function (error) { });\r\n\r\n dataservice.getItems('api/Departments/GetCountOfCompletionTypesByDepartment/-1').then(function (response) {\r\n vm.completionTypesCount = response.data;\r\n }, function (error) { });\r\n\r\n dataservice.getItems('api/Departments/GetCountOfAlertsByDepartment/-1').then(function (response) {\r\n vm.alertsCount = response.data;\r\n }, function (error) { });\r\n \r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/Departments').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailySetup')\r\n .factory('bookingHistory.dialog', bookingHistoryDialog);\r\n\r\n bookingHistoryDialog.$inject = ['$uibModal', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function bookingHistoryDialog($uibModal, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n \r\n return service;\r\n\r\n function display(item) {\r\n var modalOptions = {\r\n templateUrl: 'app/dialogs/_bookingHistory.html?v=' + opsIncludeVersion,\r\n controller: BookingHistoryModalInstance,\r\n controllerAs: 'vm',\r\n keyboard: true,\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n item: item\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $uibModal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n BookingHistoryModalInstance.$inject = ['$uibModalInstance', 'options', 'common', 'dataservice'];\r\n\r\n /* @ngInject */\r\n function BookingHistoryModalInstance($uibModalInstance, options, common, dataservice) {\r\n var vm = this;\r\n vm.okText = 'Close';\r\n vm.ok = function () {\r\n $uibModalInstance.close('ok');\r\n };\r\n vm.cancel = function () {\r\n $uibModalInstance.dismiss();\r\n };\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function () {\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/DailySetup/HistoryForBooking/' + options.item.BookingId).then(function (response) {\r\n var data = response.data;\r\n //common.convertUtcKeysToLocal(data);\r\n vm.items = data;\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.floorPlans')\r\n .factory('bookingInProgressDialog.dialog', bookingInProgressDialog);\r\n\r\n bookingInProgressDialog.$inject = ['$uibModal', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function bookingInProgressDialog($uibModal, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n \r\n return service;\r\n\r\n function display(gmtDateAndRoom) {\r\n var modalOptions = {\r\n templateUrl: 'app/dialogs/_bookingInProgress.html?v=' + opsIncludeVersion,\r\n controller: BookingInProgressModalInstance,\r\n controllerAs: 'vm',\r\n keyboard: true,\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n filters: gmtDateAndRoom\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $uibModal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n BookingInProgressModalInstance.$inject = ['$uibModalInstance', 'options', 'common', 'dataservice', 'servicesService'];\r\n\r\n /* @ngInject */\r\n function BookingInProgressModalInstance($uibModalInstance, options, common, dataservice, servicesService) {\r\n var vm = this;\r\n vm.items = [];\r\n vm.activeItems = [];\r\n vm.item = {};\r\n vm.servicesService = servicesService;\r\n vm.okText = 'Close';\r\n vm.ok = function () {\r\n $uibModalInstance.close('ok');\r\n };\r\n vm.cancel = function () {\r\n $uibModalInstance.dismiss('cancel');\r\n };\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [getData()];\r\n return common.$q.all(promises).then(function () {\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function getData() {\r\n return dataservice.query(\"api/FloorPlans/GetBookedSpaceInRoomForDate\", options.filters).then(function (response) {\r\n vm.items = response.data;\r\n var utcNow = moment.utc();\r\n for (var i = 0; i < vm.items.length; i++) {\r\n var b = vm.items[i];\r\n var start = moment.utc(b.GmtReservedStart);\r\n var end = moment.utc(b.GmtReservedEnd);\r\n if (utcNow.isBetween(start, end)) {\r\n vm.item = b;\r\n vm.activeItems.push(b);\r\n break;\r\n }\r\n }\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n \r\n .factory('carousel.dialog', carouselDialog);\r\n\r\n carouselDialog.$inject = ['$uibModal', '$templateCache', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function carouselDialog($modal, $templateCache, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n \r\n $templateCache.put('carouselDialog.tpl.html?v=' + opsIncludeVersion,\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '

Attachments

' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '

{{::slide.FileName}}


File type not supported at this time ' +\r\n '
' +\r\n '
' +\r\n '

{{::slide.Description}}

' +\r\n '

{{::slide.Notes}}

' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
');\r\n\r\n return service;\r\n\r\n\r\n function display(slides, interval) {\r\n for (var i = 0; i < slides.length; i++) {\r\n slides[i].index = i;\r\n }\r\n \r\n var modalOptions = {\r\n templateUrl: 'carouselDialog.tpl.html?v=' + opsIncludeVersion,\r\n controller: CarouselModalInstance,\r\n keyboard: true,\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n slides: slides,\r\n interval: interval\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $modal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n CarouselModalInstance.$inject = ['$scope', '$uibModalInstance', '$sce', 'options', 'fileDownloader'];\r\n\r\n /* @ngInject */\r\n function CarouselModalInstance($scope, $modalInstance, $sce, options, downloader) {\r\n \r\n $scope.okText = 'Close';\r\n $scope.items = options.slides;\r\n if (options.slides.length > 1) {\r\n $scope.interval = options.interval || 0;\r\n }\r\n else {\r\n $scope.interval = 0;\r\n }\r\n \r\n $scope.active = 0;\r\n\r\n $scope.ok = function () {\r\n $modalInstance.close('ok');\r\n };\r\n $scope.cancel = function () {\r\n $modalInstance.close('cancel');\r\n };\r\n \r\n $modalInstance.opened.then(function () {\r\n // if ($scope.isPdf(options.slides[0])) {\r\n // $scope.showPdf(options.slides[0]);\r\n // }\r\n }, function (error) { });\r\n\r\n $scope.onSlideChanged = function (nextSlide, direction) {\r\n \r\n var node = document.getElementById('pdfView');\r\n while (node.hasChildNodes()) {\r\n node.removeChild(node.lastChild);\r\n }\r\n\r\n var currentSlideIndex = $scope.active;\r\n if (direction) {\r\n if (direction == \"next\") {\r\n if ((currentSlideIndex + 1) == $scope.items.length) {\r\n currentSlideIndex = 0;\r\n }\r\n else {\r\n currentSlideIndex += 1;\r\n }\r\n }\r\n else {\r\n if ((currentSlideIndex - 1) < 0) {\r\n currentSlideIndex = $scope.items.length;\r\n }\r\n else {\r\n currentSlideIndex -= 1;\r\n }\r\n }\r\n }\r\n\r\n var slide = $scope.items[currentSlideIndex];\r\n \r\n if (slide && $scope.isPdf(slide)) {\r\n $scope.showPdf(slide);\r\n }\r\n }\r\n\r\n $scope.isOther = function (slide) {\r\n return $scope.isImage(slide) == false && $scope.isPdf(slide) == false;\r\n }\r\n\r\n $scope.downloadFile = function (slide) {\r\n \r\n if (slide) {\r\n if (slide.StoredFile) {\r\n var bytes = window.atob(slide.StoredFile);\r\n \r\n downloader.download(bytes, \"application/octet-stream\", slide.FileName);\r\n }\r\n }\r\n //console.log(slide)\r\n }\r\n\r\n function _endsWith(str, suffix) {\r\n return str.match(suffix + \"$\") == suffix;\r\n }\r\n\r\n $scope.isImage = function (slide) {\r\n if (slide) {\r\n if (slide.FileName) {\r\n var fn = slide.FileName.toLowerCase();\r\n if (\r\n _endsWith(fn, \".png\") || _endsWith(fn, \".bmp\")\r\n || _endsWith(fn, \".gif\") || _endsWith(fn, \".jpg\")\r\n || _endsWith(fn, \".jpeg\") || _endsWith(fn, \".ico\")\r\n || _endsWith(fn, \".tif\") || _endsWith(fn, \".tiff\")\r\n || _endsWith(fn, \".svg\")) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n $scope.isExternalLink = function (slide) {\r\n if (slide.Url) {\r\n return true;\r\n }\r\n return false\r\n }\r\n\r\n $scope.isPdf = function (slide) {\r\n if (slide) {\r\n if (slide.FileName) {\r\n if (_endsWith(slide.FileName.toLowerCase(), \".pdf\")) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n $scope.showPdf = function (slide) {\r\n var b = window.atob(slide.StoredFile);\r\n \r\n var loadingTask = pdfjsLib.getDocument({ data: b });\r\n loadingTask.promise.then(function(pdf) {\r\n _thePdf = pdf;\r\n _numPages = pdf.numPages\r\n pdf.getPage(1).then(_handlePages, function (error) { console.log(error) });\r\n });\r\n \r\n }\r\n\r\n\r\n\r\n var _currPage = 1;\r\n var _numPages = 0;\r\n var _thePdf = null;\r\n function _handlePages(page) {\r\n var scale = 1.2;\r\n var canvas = document.createElement(\"canvas\");\r\n var context = canvas.getContext('2d');\r\n var viewport = page.getViewport( scale);\r\n var outputScale = window.devicePixelRatio || 1;\r\n canvas.width = Math.floor(viewport.width * outputScale);\r\n canvas.height = Math.floor(viewport.height * outputScale);\r\n canvas.style.width = Math.floor(viewport.width) + \"px\";\r\n canvas.style.heigth = Math.floor(viewport.height) + \"px\";\r\n var transform = outputScale !== 1\r\n ? [outputScale, 0, 0, outputScale, 0, 0]\r\n : null;\r\n\r\n var renderContext = {\r\n canvasContext: context,\r\n transform: transform,\r\n viewport: viewport\r\n }\r\n page.render(renderContext);\r\n var appendTo = document.getElementById('pdfView');\r\n if (appendTo) {\r\n appendTo.appendChild(canvas);\r\n }\r\n _currPage++;\r\n\r\n if (_thePdf !== null && _currPage <= _numPages) {\r\n _thePdf.getPage(_currPage).then(_handlePages, function (error) { });\r\n }\r\n\r\n /*\r\n var viewport = page.getViewport(1);\r\n var canvas = document.createElement(\"canvas\");\r\n canvas.style.display = \"block\";\r\n var context = canvas.getContext(\"2d\");\r\n canvas.height = viewport.height;\r\n canvas.width = viewport.width;\r\n page.render({ canvasContext: context, viewport: viewport });\r\n var appendTo = document.getElementById('pdfView');\r\n if (appendTo) {\r\n appendTo.appendChild(canvas);\r\n }\r\n\r\n\r\n _currPage++;\r\n \r\n if (_thePdf !== null && _currPage <= _numPages) {\r\n _thePdf.getPage(_currPage).then(_handlePages, function (error) { });\r\n }\r\n */\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('onCarouselChange', onCarouselChange);\r\n\r\n onCarouselChange.$inject = ['$parse']\r\n /* @ngInject */\r\n function onCarouselChange($parse) {\r\n return {\r\n require: 'uibCarousel',\r\n link: function (scope, element, attrs, carouselCtrl) {\r\n var fn = $parse(attrs.onCarouselChange);\r\n var origSelect = carouselCtrl.select;\r\n carouselCtrl.select = function (nextSlide, direction) {\r\n if (nextSlide !== this.currentSlide) {\r\n fn(scope, {\r\n nextSlide: nextSlide,\r\n direction: direction,\r\n });\r\n }\r\n return origSelect.apply(this, arguments);\r\n };\r\n }\r\n };\r\n }\r\n \r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.surveys')\r\n .factory('survey.dialog', surveyDialog);\r\n\r\n surveyDialog.$inject = ['$uibModal', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function surveyDialog($uibModal, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n \r\n return service;\r\n\r\n function display(item) {\r\n var modalOptions = {\r\n templateUrl: 'app/dialogs/_takeSurvey.html?v=' + opsIncludeVersion,\r\n controller: TakeSurveryModalInstance,\r\n controllerAs: 'vm',\r\n keyboard: true,\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n item: item\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $uibModal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n TakeSurveryModalInstance.$inject = ['$uibModalInstance', 'options', 'common', 'dataservice'];\r\n\r\n /* @ngInject */\r\n function TakeSurveryModalInstance($uibModalInstance, options, common, dataservice) {\r\n var vm = this;\r\n vm.okText = \"Submit\";\r\n vm.surveyComplete = false;\r\n\r\n vm.chartOptions = {\r\n legend: { display: true, position: 'bottom' },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n var allData = data.datasets[tooltipItem.datasetIndex].data;\r\n var tooltipLabel = data.labels[tooltipItem.index];\r\n var tooltipData = allData[tooltipItem.index];\r\n var total = 0;\r\n for (var i in allData) {\r\n total += allData[i];\r\n }\r\n var tooltipPercentage = Math.round((tooltipData / total) * 100);\r\n return tooltipLabel + ': ' + tooltipPercentage + '%';\r\n }\r\n }\r\n }\r\n };\r\n vm.surveyResults = [];\r\n\r\n vm.ok = function () {\r\n if (vm.surveyComplete) {\r\n $uibModalInstance.close('ok');\r\n return;\r\n }\r\n if (validate()) {\r\n save();\r\n }\r\n };\r\n\r\n vm.optOut = function () {\r\n dataservice.saveItem('api/Surveys/OptOut', vm.item).then(function (saveResult) {\r\n $uibModalInstance.dismiss();\r\n }).catch(function (error) {\r\n });\r\n };\r\n\r\n vm.cancel = function () {\r\n $uibModalInstance.dismiss();\r\n };\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function () {\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/Surveys/GetSurveyToTake/' + options.item.SurveyUId).then(function (response) {\r\n var data = response.data;\r\n vm.item = data;\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n dataservice.saveItem('api/Surveys/AddResponse', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n vm.surveyComplete = true;\r\n vm.okText = \"Close\";\r\n var data = saveResult.data;\r\n \r\n for (var i = 0; i < data.length; i++) {\r\n if (data[i].AnswerType !== 2 && data[i].AnswerType !== 1) {\r\n vm.surveyResults.push({ Question: data[i].Question, ChartData: data[i].Data, ChartLabels: data[i].Labels });\r\n }\r\n }\r\n \r\n\r\n\r\n }).catch(function (error) {\r\n\r\n });\r\n }\r\n\r\n\r\n function validate() {\r\n for (var i = 0; i < vm.item.Questions.length; i++) {\r\n var q = vm.item.Questions[i];\r\n\r\n if (q.AnswerType == 7) {\r\n\r\n var tp = 'timePicker' + q.ID;\r\n if (vm.takeSurveyForm[tp].$invalid) {\r\n\r\n common.logger.error(q.Question + \" must be a valid time\");\r\n return false;\r\n }\r\n }\r\n\r\n if (q.AnswerType == 6) {\r\n var dp = 'datePicker' + q.ID;\r\n if (vm.takeSurveyForm[dp].$invalid) {\r\n common.logger.error(q.Question + \" must be a valid date\");\r\n return false;\r\n }\r\n }\r\n\r\n\r\n if (q.Required) {\r\n if (q.AnswerType == 4) {\r\n var isItemSelected = false;\r\n for (var j = 0; j < q.Items.length; j++) {\r\n if (q.Items[j].Selected) {\r\n isItemSelected = true;\r\n break;\r\n }\r\n }\r\n if (!isItemSelected) {\r\n common.logger.error(q.Question + \" must have at least one item selected\");\r\n return false;\r\n }\r\n }\r\n else {\r\n if (!q.Answer) {\r\n common.logger.error(q.Question + \" is required\");\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.eventDisplay')\r\n .controller('EventDisplayController', EventDisplayController);\r\n\r\n EventDisplayController.$inject = ['$state', '$stateParams', 'common', 'dataservice', '$interval', '$timeout', '$sce' ];\r\n\r\n function EventDisplayController($state, $stateParams, common, dataservice, $interval, $timeout, $sce) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.title = \"Event Display\";\r\n vm.currentDate = new Date();\r\n vm.promos = [];\r\n vm.logo = {};\r\n vm.PictureBackgroundImage = {};\r\n vm.MainBackgroundImage = {};\r\n vm.onPage = 0;\r\n vm.onPromoImageIndex = 0;\r\n vm.totalNumberOfPages = 0;\r\n vm.bookings = [];\r\n vm.firstTime = true;\r\n vm.bookingPager;\r\n vm.showingPromos = false;\r\n vm.isLicenseValid = false;\r\n vm.isLoading = true;\r\n vm.inUseText = inUseText;\r\n vm.roomInUse = false;\r\n vm.checkIsCurrentBooking = checkIsCurrentBooking;\r\n vm.opsIncludeVersion = common.opsIncludeVersion;\r\n\r\n vm.isPictureBox = isPictureBox;\r\n vm.mainboxStyle = mainboxStyle;\r\n vm.pictureBoxStyle = pictureBoxStyle;\r\n vm.getPictureBoxContent = getPictureBoxContent;\r\n vm.currentBooking = {};\r\n vm.roomName = roomName;\r\n vm.roomCode = \"\";\r\n vm.roomDescription = \"\";\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem()];\r\n return common.$q.all(promises).then(function (data) {\r\n $interval(timerTick, 1000);\r\n common.notifier.notify(common.config.events.stateChanged);\r\n getBookings();\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function timerTick() {\r\n vm.currentDate = new Date();\r\n if (vm.currentDate.getSeconds() == 0) {\r\n checkInUse();\r\n }\r\n }\r\n\r\n function isPictureBox() {\r\n if (vm.item) {\r\n return vm.item.DisplayTypeUId === common.config.displayTypes.pictureBox;\r\n }\r\n return false;\r\n }\r\n\r\n function roomName() {\r\n return vm.currentBooking.Room || vm.roomDescription;\r\n }\r\n\r\n function checkIsCurrentBooking(b) {\r\n if (vm.item) {\r\n if (vm.item.DisplayTypeUId == common.config.displayTypes.roomCard) { \r\n var now = moment.utc();\r\n \r\n if (b.StatusTypeId === -14) {\r\n var bStart = moment.utc(b.EventStartUtc);\r\n var bEnd = moment.utc(b.EventEndUtc);\r\n if (now.isBetween(bStart, bEnd)) {\r\n return true;\r\n }\r\n }\r\n \r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function checkInUse() {\r\n var now = moment.utc();\r\n if (vm.item) {\r\n if (vm.allBookings) {\r\n if (vm.item.DisplayTypeUId === common.config.displayTypes.roomCard\r\n || vm.item.DisplayTypeUId === common.config.displayTypes.pictureBox) {\r\n\r\n var startProperty = \"EventStartUtc\";\r\n var endProperty = \"EventEndUtc\";\r\n\r\n if (vm.item.DisplayTypeUId === common.config.displayTypes.pictureBox) {\r\n if (vm.item.InProgressStartOnReservedTime) {\r\n startProperty = \"ReservedStartUtc\";\r\n }\r\n if (vm.item.InProgressEndOnReservedTime) {\r\n endProperty = \"ReservedEndUtc\";\r\n }\r\n }\r\n\r\n for (var i = 0; i < vm.allBookings.length; i++) {\r\n var b = vm.allBookings[i];\r\n if (b.StatusTypeId === -14) {\r\n var bStart = moment.utc(b[startProperty]);\r\n var bEnd = moment.utc(b[endProperty]);\r\n if (now.isBetween(bStart, bEnd)) {\r\n vm.currentBooking = b;\r\n vm.roomInUse = true;\r\n return;\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n }\r\n vm.currentBooking = {};\r\n vm.roomInUse = false;\r\n }\r\n\r\n function inUseText() {\r\n if (vm.item) {\r\n if (vm.roomInUse) {\r\n return vm.item.InUseText;\r\n }\r\n else {\r\n return vm.item.AvailableText;\r\n }\r\n }\r\n return \"\";\r\n }\r\n\r\n function getPromos() {\r\n var val = $stateParams.id;\r\n return dataservice.getItem(\"api/EventDisplay/GetPromosForDisplay/\" + val)\r\n .then(function (response) {\r\n vm.promos = response.data;\r\n }, function (error) { console.log(error); })\r\n }\r\n\r\n function getBookings() {\r\n if (angular.isDefined(vm.bookingPager)) {\r\n $interval.cancel(vm.bookingPager);\r\n vm.bookingPager = undefined;\r\n }\r\n var val = $stateParams.id;\r\n return dataservice.getItem(\"api/EventDisplay/GetEventsForDisplay/\" + val)\r\n .then(function (response) {\r\n vm.allBookings = response.data;\r\n \r\n pageBookings();\r\n vm.bookingPager = $interval(pageBookings, vm.item.PageTransitionInterval * 1000)\r\n checkInUse();\r\n }, function (error) { console.log(error); })\r\n }\r\n\r\n function pageBookings() {\r\n if (vm.showingPromos) {\r\n if (vm.onPromoImageIndex < vm.promos.length) {\r\n vm.onPromoImageIndex++;\r\n if (vm.onPromoImageIndex < vm.promos.length) {\r\n vm.promoImageBase64Data = vm.promos[vm.onPromoImageIndex].Base64Data;\r\n vm.promoImageAltText = vm.promos[vm.onPromoImageIndex].AltText;\r\n }\r\n else {\r\n vm.showingPromos = false;\r\n vm.onPromoImageIndex = 0;\r\n }\r\n }\r\n else {\r\n vm.showingPromos = false;\r\n vm.onPromoImageIndex = 0;\r\n }\r\n\r\n }\r\n else {\r\n if (!vm.allBookings) {\r\n vm.allBookings = [];\r\n }\r\n vm.totalNumberOfPages = Math.ceil(vm.allBookings.length / vm.item.NumberOfEventsPerPage);\r\n\r\n if (vm.firstTime) {\r\n vm.firstTime = false;\r\n vm.onPage = 0;\r\n }\r\n else {\r\n if (vm.onPage >= (vm.totalNumberOfPages - 1)) {\r\n vm.onPage = 0;\r\n if (vm.promos.length > 0) {\r\n vm.showingPromos = true;\r\n vm.onPromoImageIndex = 0;\r\n vm.promoImageBase64Data = vm.promos[vm.onPromoImageIndex].Base64Data;\r\n }\r\n }\r\n else {\r\n vm.onPage++;\r\n }\r\n }\r\n var startIndex = Number(vm.onPage * vm.item.NumberOfEventsPerPage);\r\n var endIndex = startIndex + vm.item.NumberOfEventsPerPage;\r\n\r\n if (endIndex > vm.allBookings.length) {\r\n vm.bookings = vm.allBookings.slice(startIndex);\r\n }\r\n else {\r\n vm.bookings = vm.allBookings.slice(startIndex, endIndex);\r\n }\r\n\r\n if (vm.totalNumberOfPages > 1) {\r\n $(\"#eventBody\").hide();\r\n }\r\n\r\n $timeout(function () {\r\n $(\"#eventBody\").fadeIn('slow');\r\n }, 500);\r\n }\r\n \r\n }\r\n \r\n function getItem() {\r\n var val = $stateParams.id;\r\n return dataservice.getItem(\"api/EventDisplay/Display/\" + val)\r\n .then(function (response) {\r\n if (response) {\r\n vm.isLicenseValid = response.data.IsLicenseValid;\r\n if (vm.isLicenseValid) {\r\n vm.item = response.data.ConfigDto;\r\n vm.promos = response.data.PromotionalImages;\r\n vm.logo = response.data.Logo;\r\n vm.PictureBackgroundImage = response.data.PictureBackgroundImage;\r\n vm.MainBackgroundImage = response.data.MainBackgroundImage;\r\n vm.roomDescription = response.data.RoomName;\r\n vm.roomCode = response.data.RoomCode;\r\n $interval(getBookings, ((vm.item.DataRefreshInterval * 60) * 1000));\r\n $interval(getPromos, ((30 * 60) * 1000));\r\n }\r\n } else {\r\n\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function mainboxStyle() {\r\n\r\n var result = {};\r\n result.width = \"100%\";\r\n result.height = \"100%\";\r\n if (vm.MainBackgroundImage && vm.MainBackgroundImage.Base64Data) {\r\n result[\"background\"] = \"url(data:image/png;base64,\" + vm.MainBackgroundImage.Base64Data + \")\";\r\n if (vm.item.RepeatMainBackgroundImage == 0) {\r\n result[\"background\"] += \"no-repeat\";\r\n }\r\n }\r\n else {\r\n if (vm.item) {\r\n result[\"background-color\"] = vm.item.PicutreBoxMainBackgroundColor;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n\r\n function pictureBoxStyle() {\r\n\r\n var result = {};\r\n if (vm.PictureBackgroundImage && vm.PictureBackgroundImage.Base64Data) {\r\n result[\"background\"] = \"url(data:image/png;base64,\" + vm.PictureBackgroundImage.Base64Data + \")\";\r\n if (vm.item.RepeatPictureBackgroundImage == 0) {\r\n result[\"background\"] += \"no-repeat\";\r\n }\r\n }\r\n else {\r\n if (vm.item) {\r\n result[\"background-color\"] = vm.item.PicutreBoxBackgroundColor;\r\n }\r\n }\r\n\r\n\r\n return result;\r\n }\r\n\r\n function getPictureBoxContent(contentLocation) {\r\n var result = \"\";\r\n \r\n\r\n if (vm.roomInUse) {\r\n if (contentLocation === 'Top') {\r\n result = vm.item.InprogressTopContent;\r\n }\r\n else if (contentLocation === 'Main') {\r\n result = vm.item.InprogressMainContent;\r\n }\r\n else {\r\n result = vm.item.InprogressBottomContent;\r\n }\r\n }\r\n else {\r\n if (contentLocation === 'Top') {\r\n result = vm.item.AvailableTopContent;\r\n }\r\n else if (contentLocation === 'Main') {\r\n result = vm.item.AvailableMainContent;\r\n }\r\n else {\r\n result = vm.item.AvailableBottomContent;\r\n }\r\n }\r\n\r\n if (!result) {\r\n result = \"\";\r\n }\r\n\r\n\r\n result = result.replace('%DateTime%', moment(vm.currentDate).format(\"LL\") + \"
\" + moment(vm.currentDate).format(\"LTS\"));\r\n result = result.replace('%Date%', moment(vm.currentDate).format(\"LL\"));\r\n result = result.replace('%Time%', moment(vm.currentDate).format(\"LTS\"));\r\n\r\n result = result.replace('%RoomName%', vm.roomName());\r\n result = result.replace('%EventName%', vm.currentBooking.EventName);\r\n\r\n if (result.indexOf('%ParsedGroupName%') != -1) {\r\n\r\n var gn = vm.currentBooking.Group;\r\n var lineOne = \"\";\r\n var lineTwo = \"\";\r\n var lineTwoSize = vm.item.PictureBoxMainContentSize;\r\n if (gn) {\r\n try {\r\n\r\n var indexOfFirstSpace = gn.indexOf(' ');\r\n if (indexOfFirstSpace > -1) {\r\n lineTwo = gn.substr(0, indexOfFirstSpace);\r\n gn = gn.substr(indexOfFirstSpace);\r\n }\r\n\r\n var indexOfComma = gn.indexOf(',');\r\n var firstName = '';\r\n var lastName = '';\r\n if (indexOfComma > -1) {\r\n lastName = gn.substr(0, indexOfComma);\r\n firstName = gn.substr(indexOfComma + 1);\r\n if (firstName.indexOf(' ') == 0) {\r\n firstName = firstName.substr(1);\r\n }\r\n lineOne = firstName + \" \" + lastName;\r\n }\r\n else {\r\n lineOne = gn;\r\n }\r\n }\r\n catch (ex) {\r\n console.log(ex)\r\n lineOne = gn;\r\n }\r\n\r\n\r\n lineTwoSize = Math.floor(lineTwoSize * .75);\r\n\r\n result = result.replace('%ParsedGroupName%', lineOne + \"
\" + lineTwo + \"\");\r\n }\r\n \r\n }\r\n if (result.indexOf('%LastCommaFirst%') != -1) {\r\n var gn = vm.currentBooking.Group;\r\n if (gn) {\r\n var lastName = gn.substring(0, gn.indexOf(','));\r\n var firstName = gn.substring(gn.indexOf(','));\r\n firstName = firstName.replace(', ', '');\r\n \r\n result = result.replace('%LastCommaFirst%', firstName + \"
\" + lastName);\r\n }\r\n\r\n }\r\n\r\n \r\n result = result.replace('%GroupName%', vm.currentBooking.Group);\r\n\r\n return $sce.trustAsHtml(result);\r\n }\r\n\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.eventDisplay')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'eventdisplay',\r\n config: {\r\n abstract: true,\r\n url: '/eventdisplay',\r\n template: ''\r\n }\r\n },\r\n {\r\n state: 'eventdisplay.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/eventDisplay/list.html?v=' + opsIncludeVersion,\r\n controller: 'EventDisplayListController',\r\n controllerAs: 'vm',\r\n title: 'Event Display Types',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'eventdisplay.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/eventDisplay/details.html?v=' + opsIncludeVersion,\r\n controller: 'EventDisplayDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Event Display Details',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'eventdisplay.display',\r\n config: {\r\n url: '/display/:id',\r\n templateUrl: 'app/eventDisplay/display.html?v=' + opsIncludeVersion,\r\n controller: 'EventDisplayController',\r\n controllerAs: 'vm',\r\n title: 'Event Display'\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.eventDisplay')\r\n .factory('eventDisplayService', eventDisplayService);\r\n\r\n eventDisplayService.$inject = ['common'];\r\n /* @ngInject */\r\n function eventDisplayService(common) {\r\n var service = {\r\n pictureBoxStyle: pictureBoxStyle,\r\n getPictureBoxContent: getPictureBoxContent\r\n };\r\n\r\n return service;\r\n\r\n function pictureBoxStyle() {\r\n\r\n var result = {};\r\n if (vm.item.PictureBackgroundImage.Base64Data) {\r\n result[\"background\"] = \"url(data:image/png;base64,\" + vm.item.PictureBackgroundImage.Base64Data + \")\";\r\n if (vm.item.RepeatPictureBackgroundImage == 0) {\r\n result[\"background\"] += \"no-repeat\";\r\n }\r\n }\r\n else {\r\n result[\"background-color\"] = vm.item.PicutreBoxBackgroundColor;\r\n }\r\n\r\n\r\n return result;\r\n }\r\n\r\n function getPictureBoxContent(contentLocation) {\r\n var result = \"\";\r\n\r\n if (contentLocation === 'Top') {\r\n result = vm.item.InprogressTopContent;\r\n }\r\n else {\r\n result = vm.item.InprogressBottomContent;\r\n }\r\n\r\n if (!result) {\r\n result = \"\";\r\n }\r\n\r\n result = result.replace('%DateTime%', moment(vm.currentDate).format(\"LL\") + \"
\" + moment(vm.currentDate).format(\"LTS\"));\r\n result = result.replace('%Date%', moment(vm.currentDate).format(\"LL\"));\r\n result = result.replace('%Time%', moment(vm.currentDate).format(\"LTS\"));\r\n\r\n result = result.replace('%RoomName%', \"\");\r\n\r\n\r\n return result;\r\n\r\n\r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.eventDisplay')\r\n .controller('EventDisplayDetailsController', EventDisplayDetailsController);\r\n\r\n EventDisplayDetailsController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice', '$interval', '$sce'\r\n ];\r\n\r\n function EventDisplayDetailsController($state, $stateParams, $window, bsDialog, common, dataservice, $interval, $sce) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.currentDate = new Date();\r\n vm.fonts = [];\r\n vm.promoImages = [];\r\n vm.getLogo = getLogo;\r\n vm.getImage = getImage;\r\n vm.hasLogo = hasLogo;\r\n vm.bookings = [];\r\n vm.displayTypeChanged = displayTypeChanged;\r\n vm.opsIncludeVersion = common.opsIncludeVersion;\r\n vm.showBuildings = false;\r\n \r\n\r\n vm.viewChanged = viewChanged;\r\n vm.roomViewLabel = 'View';\r\n vm.isLoading = true;\r\n vm.isRoomCard = isRoomCard;\r\n vm.isEventDisplay = isEventDisplay;\r\n vm.isPictureBox = isPictureBox;\r\n vm.setBorderColors = setBorderColors;\r\n vm.roomInUse = true;\r\n vm.roomName = \"\";\r\n vm.setRoomName = setRoomName;\r\n vm.managers = [];\r\n \r\n vm.logo = {};\r\n\r\n vm.mainboxStyle = mainboxStyle;\r\n vm.pictureBoxStyle = pictureBoxStyle;\r\n vm.getPictureBoxContent = getPictureBoxContent;\r\n\r\n vm.eventTypeLabel = \"Event Types\";\r\n\r\n vm.buildingsLabel = \"Views\";\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [initLookups(), getItem(), getLicenseInfo()];\r\n\r\n return common.$q.all(promises).then(function (data) {\r\n setDisplayForApiType();\r\n $interval(timerTick, 1000);\r\n var start = new Date();\r\n var end = new Date();\r\n start.setHours(15);\r\n end.setHours(16);\r\n\r\n vm.bookings.push({\r\n BookingId: 1,\r\n EventStartUtc: start,\r\n EventEndUtc: end,\r\n EventName: \"Good Old Fashioned Fun\",\r\n Group: \"The Village People\",\r\n Room: \"Main Lobby\"\r\n });\r\n vm.bookings.push({\r\n BookingId: 2,\r\n EventStartUtc: start,\r\n EventEndUtc: end,\r\n EventName: \"Masterpieces in Literature\",\r\n Group: \"English Club\",\r\n Room: \"Amphitheater\"\r\n });\r\n vm.setRoomName();\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function setDisplayForApiType() {\r\n if (common.userService.apiTypeId() === common.config.apiTypes.collegeNet) {\r\n vm.eventTypeLabel = \"Event Categories\";\r\n vm.buildingsLabel = \"Location Categories\";\r\n }\r\n else {\r\n setBuildingViews();\r\n \r\n }\r\n }\r\n\r\n function setBuildingViews() {\r\n if (common.userService.apiTypeId() === common.config.apiTypes.ems) {\r\n if (common.userService.tenantId() == \"222\" || common.userService.tenantId() == 265) {\r\n //if (common.userService.tenantId() == \"25\") {\r\n\r\n if (vm.item.DisplayTypeUId !== common.config.displayTypes.eventDisplay) {\r\n vm.buildingsLabel = \"Buildings\";\r\n vm.showBuildings = true;\r\n }\r\n else {\r\n vm.buildingsLabel = \"Views\";\r\n vm.showBuildings = false;\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n if (vm.licenseInfo.NumberOfDisplaysLicensed < vm.licenseInfo.NumberOfDisplaysInUse) {\r\n $state.go('404');\r\n }\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function isRoomCard() {\r\n if (vm.item) {\r\n return vm.item.DisplayTypeUId === common.config.displayTypes.roomCard;\r\n }\r\n return false;\r\n }\r\n\r\n function isEventDisplay() {\r\n if (vm.item) {\r\n return vm.item.DisplayTypeUId === common.config.displayTypes.eventDisplay;\r\n }\r\n return false;\r\n }\r\n\r\n function isPictureBox() {\r\n if (vm.item) {\r\n return vm.item.DisplayTypeUId === common.config.displayTypes.pictureBox;\r\n }\r\n return false;\r\n }\r\n\r\n function setRoomName() {\r\n vm.roomName = \"\";\r\n if (vm.item && vm.rooms) {\r\n for (var i = 0; i < vm.rooms.length; i++) {\r\n if (vm.rooms[i].ID == vm.item.RoomId) {\r\n vm.roomName = vm.rooms[i].Description;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n function timerTick() {\r\n vm.currentDate = new Date();\r\n }\r\n\r\n function setBorderColors() {\r\n if (isRoomCard()) { //room card\r\n vm.item.AvailableBorderColor = vm.item.BodyBackgroundColor;\r\n vm.item.InUseBorderColor = vm.item.BodyBackgroundColor;\r\n }\r\n }\r\n\r\n function displayTypeChanged() {\r\n if (isRoomCard()) { //room card\r\n vm.item.TimeWidth = 250;\r\n vm.item.EventWidth = 500;\r\n vm.item.GroupWidth = 500;\r\n vm.item.RoomWidth = 500;\r\n vm.item.DisplayRoom = 0;\r\n vm.item.InUseBorderColor = \"#ff0000\";\r\n vm.item.InUseTextColor = \"#ffffff\";\r\n vm.item.AvailableTextColor = \"#ffffff\";\r\n vm.item.InUseText = \"ROOM IN USE\";\r\n vm.item.AvailableText = \"ROOM AVAILABLE\";\r\n vm.item.AvailableBorderColor = \"#008000\";\r\n vm.item.StartsWithinXHours = 0;\r\n vm.item.DropEventsAfterXMinutes = 0;\r\n\r\n }\r\n else {\r\n setBuildingViews();\r\n vm.item.RoomId = \"\";\r\n vm.item.TimeWidth = 200;\r\n vm.item.EventWidth = 400;\r\n vm.item.GroupWidth = 400;\r\n vm.item.RoomWidth = 400;\r\n vm.item.DisplayRoom = 1;\r\n vm.item.InUseText = \"\";\r\n vm.item.AvailableText = \"\";\r\n \r\n vm.item.InUseBorderColor = vm.item.BodyBackgroundColor;\r\n vm.item.AvailableBorderColor = vm.item.BodyBackgroundColor;\r\n vm.item.StartsWithinXHours = 0;\r\n vm.item.DropEventsAfterXMinutes = 0;\r\n }\r\n\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"eventdisplay.list\");\r\n }\r\n\r\n \r\n\r\n function viewChanged() {\r\n if (vm.item.ViewId !== '') {\r\n dataservice.getItems(\"api/EventDisplay/RoomsInView/\" + vm.item.ViewId).then(function (response) {\r\n vm.rooms = response.data;\r\n }, function (error) { console.log(error) });\r\n }\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Event Display')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/EventDisplay/\" + vm.item.Id).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function hasLogo() {\r\n return (vm.item && (vm.item.LogoId !== '' && vm.item.LogoId !== null && vm.item.LogoId !== '00000000-0000-0000-0000-000000000000'));\r\n }\r\n\r\n function getLogo() {\r\n if (hasLogo()) {\r\n var dto = {\r\n PromotionalImageId: vm.item.LogoId,\r\n Height: 200,\r\n Width: 200\r\n };\r\n dataservice.query(\"api/PromotionalImages/GetThumbnail\", dto).then(function (response) {\r\n vm.logo.Base64Data = response.data.Base64Data;\r\n }, function (error) { });\r\n }\r\n else {\r\n vm.logoPreview = \"\";\r\n }\r\n }\r\n\r\n function getImage(propName, imageModel, height, width) {\r\n \r\n if (vm.item && (vm.item[propName] !== '' && vm.item[propName] !== null && vm.item[propName] !== '00000000-0000-0000-0000-000000000000')) {\r\n var dto = {\r\n PromotionalImageId: vm.item[propName],\r\n Height: height, //tell it full size\r\n Width: width\r\n };\r\n dataservice.query(\"api/PromotionalImages/GetThumbnail\", dto).then(function (response) {\r\n vm.item[imageModel].Base64Data = response.data.Base64Data;\r\n }, function (error) { });\r\n }\r\n else {\r\n vm.item[imageModel] = {};\r\n }\r\n }\r\n\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '' && common.userService.userType() === \"1\") {\r\n $state.go('404');\r\n }\r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.NumberOfEventsPerPage = 5;\r\n vm.item.DataRefreshInterval = 5;\r\n vm.item.PageTransitionInterval = 5;\r\n vm.item.EventLabel = \"EVENT\";\r\n vm.item.RoomLabel = \"ROOM\";\r\n vm.item.GroupLabel = \"GROUP\";\r\n vm.item.Font = \"Arial, Helvetica, sans-serif\";\r\n vm.item.DisplayRoom = 1;\r\n vm.item.DisplayGroup = 1;\r\n vm.item.DisplayEvent = 1;\r\n vm.item.HeaderTextSize = 20;\r\n vm.item.ColumnHeaderTextSize = 18;\r\n vm.item.TableTextSize = 16;\r\n vm.item.TableTextSize = 16;\r\n vm.item.TimeWidth = 200;\r\n vm.item.EventWidth = 400;\r\n vm.item.GroupWidth = 400;\r\n vm.item.RoomWidth = 400;\r\n vm.item.BodyBackgroundColor = '#343E47';\r\n vm.item.HeaderTextColor = '#FFFFFF';\r\n vm.item.TableHeaderBackgroundColor = '#343E47';\r\n vm.item.TableHeaderTextColor = '#d1e1f5';\r\n vm.item.TableBodyTextColor = '#d1e1f5';\r\n vm.item.TableRowBackgroundColor = '#3a3f50';\r\n vm.item.TableAltRowBackgroundColor = '#2f353e';\r\n vm.item.InUseBorderColor = '#343E47';\r\n vm.item.AvailableBorderColor = '#343E47';\r\n vm.item.StartsWithinXHours = 0;\r\n vm.item.DropEventsAfterXMinutes = 0;\r\n vm.item.StatusIdArray = [];\r\n vm.item.EventTypeIdArray = [];\r\n vm.item.UsersWithConfigAccess = [];\r\n vm.item.PromotionalImages = [];\r\n vm.item.HonorEventTypeDOW = 0;\r\n vm.item.DisplayTypeUId = common.config.displayTypes.eventDisplay;\r\n vm.item.MainBackgroundImage = {};\r\n vm.item.PictureBackgroundImage = {};\r\n vm.item.RepeatPictureBackgroundImage = 1;\r\n vm.item.RepeatMainBackgroundImage = 1;\r\n vm.item.TopRowHeight = 50;\r\n vm.item.BottomRowHeight = 50;\r\n vm.item.MainContentWidth = 90;\r\n vm.item.PicutreBoxMainBackgroundColor = '#343E47';\r\n vm.item.PicutreBoxBackgroundColor = '#FFFFFF';\r\n vm.item.InProgressStartOnReservedTime = 1;\r\n vm.item.InProgressEndOnReservedTime = 0;\r\n vm.item.PictureTopLeftContent = '';\r\n vm.item.PictureTopRightContent = '';\r\n\r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/EventDisplay/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n vm.item.MainBackgroundImage = {};\r\n vm.item.PictureBackgroundImage = {};\r\n if (!vm.item.StatusIdArray) {\r\n vm.item.StatusIdArray = [];\r\n }\r\n if (!vm.item.EventTypeIdArray) {\r\n vm.item.EventTypeIdArray = [];\r\n }\r\n if (!vm.item.UsersWithConfigAccess) {\r\n vm.item.UsersWithConfigAccess = [];\r\n }\r\n viewChanged();\r\n getLogo();\r\n\r\n if (vm.item.MainBackgroundImageId !== '00000000-0000-0000-0000-000000000000') {\r\n getImage('MainBackgroundImageId', 'MainBackgroundImage', -1, -1);\r\n }\r\n if (vm.item.PictureBackgroundImageId !== '00000000-0000-0000-0000-000000000000') {\r\n getImage('PictureBackgroundImageId', 'PictureBackgroundImage', -1, -1);\r\n }\r\n \r\n common.setAuditInfo(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function initLookups() {\r\n dataservice.getItems(\"api/EventDisplay/GetLookups\").then(function (response) {\r\n vm.statuses = response.data.Statuses;\r\n vm.eventTypes = response.data.EventTypes;\r\n vm.views = response.data.Views;\r\n vm.promoImages = response.data.PromotionalImages;\r\n vm.displayTypes = response.data.DisplayTypes;\r\n vm.buildings = response.data.Buildings;\r\n vm.managers = response.data.Managers;\r\n\r\n vm.fonts.push(\"Georgia, serif\");\r\n vm.fonts.push('\"Palatino Linotype\", \"Book Antiqua\", Palatino, serif');\r\n vm.fonts.push('\"Times New Roman\", Times, serif');\r\n vm.fonts.push('Arial, Helvetica, sans-serif');\r\n vm.fonts.push('\"Arial Black\", Gadget, sans-serif');\r\n vm.fonts.push('\"Comic Sans MS\", cursive, sans-serif');\r\n vm.fonts.push('Impact, Charcoal, sans-serif');\r\n vm.fonts.push('\"Lucida Sans Unicode\", \"Lucida Grande\", sans-serif');\r\n vm.fonts.push('Tahoma, Geneva, sans-serif');\r\n vm.fonts.push('\"Trebuchet MS\", Helvetica, sans-serif');\r\n vm.fonts.push('Verdana, Geneva, sans-serif');\r\n vm.fonts.push('\"Courier New\", Courier, monospace');\r\n vm.fonts.push('\"Lucida Console\", Monaco, monospace');\r\n vm.fonts.push(\"Futura Bold\");\r\n vm.fonts.push(\"Avenir\");\r\n vm.fonts.sort();\r\n \r\n }, function (error) { console.log(error) });\r\n\r\n \r\n }\r\n\r\n function save() {\r\n if (vm.item.StatusIdArray.length === 0) {\r\n common.logger.error(\"You must select at least one status\");\r\n return;\r\n }\r\n if (vm.item.EventTypeIdArray.length === 0 && common.userService.apiTypeId() !== common.config.apiTypes.collegeNet) {\r\n common.logger.error(\"You must select at least one event type\");\r\n return;\r\n }\r\n\r\n vm.isSaving = true;\r\n vm.item.MainBackgroundImage = \"\";\r\n \r\n dataservice.saveItem('api/EventDisplay', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n \r\n }\r\n\r\n\r\n function mainboxStyle() {\r\n \r\n var result = {};\r\n result.width = \"100%\";\r\n result.height = \"100%\";\r\n if (vm.item && vm.item.MainBackgroundImage && vm.item.MainBackgroundImage.Base64Data) {\r\n result[\"background\"] = \"url(data:image/png;base64,\" + vm.item.MainBackgroundImage.Base64Data + \")\";\r\n if (vm.item.RepeatMainBackgroundImage == 0) {\r\n result[\"background\"] += \"no-repeat\";\r\n }\r\n }\r\n else {\r\n result[\"background-color\"] = vm.item.PicutreBoxMainBackgroundColor;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n\r\n function pictureBoxStyle() {\r\n\r\n var result = {};\r\n if (vm.item && vm.item.PictureBackgroundImage && vm.item.PictureBackgroundImage.Base64Data) {\r\n result[\"background\"] = \"url(data:image/png;base64,\" + vm.item.PictureBackgroundImage.Base64Data + \")\";\r\n if (vm.item.RepeatPictureBackgroundImage == 0) {\r\n result[\"background\"] += \"no-repeat\";\r\n }\r\n }\r\n else {\r\n result[\"background-color\"] = vm.item.PicutreBoxBackgroundColor;\r\n }\r\n\r\n\r\n return result;\r\n }\r\n\r\n function getPictureBoxContent(contentLocation) {\r\n var result = \"\";\r\n if (!vm.roomName) {\r\n vm.setRoomName();\r\n }\r\n\r\n if (vm.roomInUse) {\r\n if (contentLocation === 'Top') {\r\n result = vm.item.InprogressTopContent;\r\n }\r\n else if (contentLocation === 'Main') {\r\n result = vm.item.InprogressMainContent;\r\n }\r\n else {\r\n result = vm.item.InprogressBottomContent;\r\n }\r\n }\r\n else {\r\n if (contentLocation === 'Top') {\r\n result = vm.item.InprogressTopContent;\r\n }\r\n else if (contentLocation === 'Main') {\r\n result = vm.item.AvailableMainContent;\r\n }\r\n else {\r\n result = vm.item.InprogressBottomContent;\r\n }\r\n }\r\n\r\n if (!result) {\r\n result = \"\";\r\n }\r\n\r\n result = result.replace('%DateTime%', moment(vm.currentDate).format(\"LL\") + \"
\" + moment(vm.currentDate).format(\"LTS\"));\r\n result = result.replace('%Date%', moment(vm.currentDate).format(\"LL\"));\r\n result = result.replace('%Time%', moment(vm.currentDate).format(\"LTS\"));\r\n\r\n result = result.replace('%RoomName%', vm.roomName);\r\n //result = result.replace('%EventName%', vm.EventName);\r\n // result = result.replace('%RoomName%', \"\");\r\n \r\n\r\n return $sce.trustAsHtml(result);\r\n \r\n \r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.eventDisplay')\r\n .controller('EventDisplayListController', EventDisplayListController);\r\n\r\n EventDisplayListController.$inject = ['$state','common', 'dataservice', 'config'];\r\n /* @ngInject */\r\n function EventDisplayListController($state, common, dataservice, config) {\r\n var vm = this;\r\n\r\n vm.title = 'Event Display List';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.refresh = refresh;\r\n vm.licenseInfo = {};\r\n vm.isLicenseValid = false;\r\n vm.isLoading = true;\r\n vm.copy = copy;\r\n vm.isAdmin = common.userService.userType() === \"2\";\r\n activate();\r\n\r\n function activate() {\r\n var promises = [ getItems(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = vm.licenseInfo.NumberOfDisplaysLicensed >= vm.licenseInfo.NumberOfDisplaysInUse;\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/EventDisplay').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n\r\n function copy(id) {\r\n var dto = {\r\n data: id\r\n };\r\n return dataservice.saveItem('api/EventDisplay/Copy', dto).then(function (response) {\r\n var newId = response.data.Message;\r\n $state.transitionTo('eventdisplay.details', {id: newId})\r\n \r\n \r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.filterTypes')\r\n .controller('FilterTypeDetailController', FilterTypeDetailController);\r\n\r\n FilterTypeDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice', 'config'\r\n ];\r\n\r\n function FilterTypeDetailController($state, $stateParams,\r\n bsDialog, common, dataservice, config) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.counts = [];\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.filters = undefined;\r\n vm.isNew = isNew;\r\n vm.preventDelete = preventDelete;\r\n vm.eventTypeLabel = \"Event Types\";\r\n vm.categoryLabel = \"Categories\";\r\n vm.roomTypeLabel = \"Room Types\";\r\n vm.buildingsLabel = \"Buildings\";\r\n vm.showBuildingsFilter = true;\r\n vm.showViewsFilter = true;\r\n vm.showUdfsFilter = true;\r\n\r\n vm.filterData = {\r\n Buildings: [],\r\n Statuses: [],\r\n Categories: [],\r\n EventTypes: [],\r\n RoomTypes: [],\r\n Views: [],\r\n Users: [],\r\n Udfs: []\r\n };\r\n vm.filters = {\r\n buildings: [],\r\n statuses: [],\r\n categories: [],\r\n eventTypes: [],\r\n roomTypes: [],\r\n views:[],\r\n userIds: [],\r\n udfs: []\r\n }\r\n \r\n \r\n activate();\r\n\r\n function activate() {\r\n setDisplayForApiType();\r\n var promises = [common.checkIsAdmin(), initLookups(), getItem(), getCounts()];\r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"filtertypes.list\");\r\n }\r\n\r\n function setDisplayForApiType() {\r\n var apiType = common.userService.apiTypeId();\r\n switch (apiType) {\r\n case config.apiTypes.collegeNet:\r\n vm.showViewsFilter = false;\r\n vm.eventTypeLabel = \"Event Types\";\r\n vm.categoryLabel = \"Resources Categories\";\r\n vm.roomTypeLabel = \"Location Categories\";\r\n vm.buildingsLabel = \"Location Partitions\";\r\n break;\r\n case config.apiTypes.sevenPoint:\r\n vm.showUdfsFilter = true;\r\n break;\r\n case config.apiTypes.mazevo:\r\n vm.showViewsFilter = false;\r\n vm.showUdfsFilter = false;\r\n break;\r\n }\r\n }\r\n\r\n function preventDelete() {\r\n if (vm.counts.length > 0 || $stateParams.id <= 0) {\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Filter Type')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/FilterTypes/\" + vm.filters.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"-1\";\r\n }\r\n\r\n function getCounts() {\r\n if($stateParams.id > 0) {\r\n return dataservice.getItems('api/FilterTypes/CountsOfUsersWithFilterType/' + $stateParams.id).then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n else {\r\n vm.counts = { ActiveCount: 0, Name: -1 };\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '-1') {\r\n vm.filters = {};\r\n vm.filters.ID = -1;\r\n vm.filters.Active = 1;\r\n vm.filters.highlightChangesWithin = 1440;\r\n vm.filters.includeBookingWithCategoriesOnly = 0;\r\n vm.filters.showReservedTimes = 1;\r\n vm.filters.buildings = [];\r\n vm.filters.statuses = [];\r\n vm.filters.categories = [];\r\n vm.filters.eventTypes = [];\r\n vm.filters.roomTypes = [];\r\n vm.filters.userIds = [];\r\n vm.filters.views = [];\r\n vm.filters.udfs = [];\r\n \r\n common.setAuditInfo(vm.filters);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/FilterTypes/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n var d = data.data;\r\n if (d.FilterData) {\r\n vm.filters = angular.fromJson(atob(d.FilterData));\r\n if (!vm.filters.roomTypes) {\r\n vm.filters.roomTypes = [];\r\n }\r\n if (!vm.filters.eventTypes) {\r\n vm.filters.eventTypes = [];\r\n }\r\n if (!vm.filters.views) {\r\n vm.filters.views = [];\r\n }\r\n if (!vm.filters.udfs) {\r\n vm.filters.udfs = [];\r\n }\r\n }\r\n else {\r\n vm.filters.highlightChangesWithin = 1440;\r\n vm.filters.Active = 1;\r\n }\r\n \r\n vm.filters.ID = d.ID;\r\n vm.filters.Description = d.Description;\r\n vm.filters.AddedBy = d.AddedBy;\r\n vm.filters.DateAddedUtc = d.DateAddedUtc;\r\n vm.filters.DateChangedUtc = d.DateChangedUtc;\r\n vm.filters.ChangedBy = d.ChangedBy;\r\n vm.filters.userIds = d.UserIds;\r\n \r\n common.setAuditInfo(vm.filters);\r\n //not sure why we were doing this here, but it can cause a problem where some filters are getting dates inputed in their values\r\n // common.convertDateStringsToDates(vm.filters);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n // logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n // $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function initLookups() {\r\n dataservice.getItems('api/DailySetup/GetFilters').then(function (response) {\r\n var data = response.data;\r\n var roomChargeIndex = data.Categories.indexOf(\"2147483647\");\r\n if (roomChargeIndex > -1) {\r\n data.Categories.splice(roomChargeIndex, 1);\r\n }\r\n vm.filterData.Buildings = data.Buildings;\r\n vm.filterData.Statuses = data.Statuses;\r\n vm.filterData.Categories = data.Categories;\r\n vm.filterData.EventTypes = data.EventTypes;\r\n vm.filterData.RoomTypes = data.RoomTypes;\r\n vm.filterData.Views = data.Views;\r\n vm.filterData.Udfs = data.Udfs;\r\n return;\r\n }, function (error) { });\r\n dataservice.getItems('api/Users/GetActive').then(function (response) {\r\n var data = response.data;\r\n vm.filterData.Users = data;\r\n return;\r\n }, function (error) { });\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n\r\n var roomChargeIndex = vm.filters.categories.indexOf(\"2147483647\");\r\n if (roomChargeIndex > -1) {\r\n vm.filters.categories.splice(roomChargeIndex, 1);\r\n }\r\n\r\n vm.filters.filterData = btoa(angular.toJson(vm.filters));\r\n\r\n dataservice.saveItem('api/FilterTypes', vm.filters).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.filterTypes')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'filtertypes',\r\n config: {\r\n abstract: true,\r\n url: '/filtertypes',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'filtertypes.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/filtertypes/list.html?v=' + opsIncludeVersion,\r\n controller: 'FilterTypesListController',\r\n controllerAs: 'vm',\r\n title: 'Filter Types'\r\n }\r\n },\r\n {\r\n state: 'filtertypes.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/filterTypes/details.html?v=' + opsIncludeVersion,\r\n controller: 'FilterTypeDetailController',\r\n controllerAs: 'vm',\r\n title: 'Filter Type',\r\n settings: {}\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.filterTypes')\r\n .controller('FilterTypesListController', FilterTypesListController);\r\n\r\n FilterTypesListController.$inject = ['common', 'dataservice', 'bootstrap.dialog', 'config', '$state'];\r\n /* @ngInject */\r\n function FilterTypesListController(common, dataservice, bsDialog, config, $state) {\r\n var vm = this;\r\n\r\n vm.title = 'Filter Types';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.counts = [];\r\n vm.refresh = refresh;\r\n vm.usersWithFilterType = usersWithFilterType;\r\n vm.copy = copy;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getCounts()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function usersWithFilterType(filterTypeId) {\r\n for (var i = 0; i < vm.counts.length; i++) {\r\n if (vm.counts[i].Name == filterTypeId) {\r\n return vm.counts[i].ActiveCount;\r\n }\r\n }\r\n }\r\n\r\n function getCounts() {\r\n return dataservice.getItems('api/FilterTypes/CountsOfUsersWithFilterType/-1').then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/FilterTypes').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n\r\n function copy(id) {\r\n var dto = {\r\n data: id\r\n };\r\n return dataservice.saveItem('api/FilterTypes/Copy', dto).then(function (response) {\r\n var newId = response.data.Message;\r\n $state.transitionTo('filtertypes.details', { id: newId });\r\n\r\n\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.floorPlans')\r\n .controller('FloorPlanDetailsController', FloorPlanDetailsController);\r\n\r\n FloorPlanDetailsController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice', '$sce'\r\n ];\r\n\r\n function FloorPlanDetailsController($state, $stateParams, $window, bsDialog, common, dataservice, $sce) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = {};\r\n vm.trustedSvg = trustedSvg;\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItem()];\r\n \r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function trustedSvg() {\r\n return $sce.trustAsHtml(vm.item.SvgData);\r\n };\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"floorplans.list\");\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Floor Plan')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/FloorPlans/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.ID = '';\r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n else {\r\n return dataservice.getItem(\"api/FloorPlans/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n common.setAuditInfo(vm.item);\r\n\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n\r\n dataservice.saveItem('api/FloorPlans/Save', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n common.logger.error(error);\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.floorPlans')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'floorplans',\r\n config: {\r\n abstract: true,\r\n url: '/floorplans',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n },\r\n },\r\n {\r\n state: 'floorplans.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/floorPlans/list.html?v=' + opsIncludeVersion,\r\n controller: 'FloorPlansListController',\r\n controllerAs: 'vm',\r\n title: 'Floor Plans',\r\n \r\n }\r\n },\r\n {\r\n state: 'floorplans.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/floorPlans/details.html?v=' + opsIncludeVersion,\r\n controller: 'FloorPlanDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Floor Plan',\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.floorPlans')\r\n .controller('FloorPlansListController', FloorPlansListController);\r\n\r\n FloorPlansListController.$inject = ['common', 'dataservice', 'config', '$sce'];\r\n /* @ngInject */\r\n function FloorPlansListController(common, dataservice, config, $sce) {\r\n var vm = this;\r\n vm.title = \"Floor Plans\"\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.isLicenseValid = false;\r\n vm.isLoading = true;\r\n vm.safeSvg = safeSvg;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = (\r\n vm.licenseInfo.NumberOfDisplaysLicensed >= vm.licenseInfo.NumberOfDisplaysInUse\r\n || vm.licenseInfo.NumberOfPaymentTemplatesLicensed >= vm.licenseInfo.NumberOfPaymentTemplatesInUse\r\n \r\n );\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n\r\n function safeSvg(data) {\r\n return $sce.trustAsHtml(data);\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/FloorPlans').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.help')\r\n .controller('HelpController', HelpController);\r\n\r\n HelpController.$inject = ['common', 'dataservice'];\r\n /* @ngInject */\r\n function HelpController(common, dataservice) {\r\n var vm = this;\r\n vm.title = 'Help';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n if (common.userService.isAuthenticated()) {\r\n return dataservice.getItems('api/HelpText/Faqs').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n \r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.help')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'help',\r\n config: {\r\n url: '/help',\r\n templateUrl: 'app/help/help.html?v=' + opsIncludeVersion,\r\n controller: 'HelpController',\r\n controllerAs: 'vm',\r\n title: 'Help',\r\n settings: {\r\n content: ' Help',\r\n }\r\n \r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.helpText')\r\n .factory('helpTextFactory', helpTextFactory);\r\n\r\n helpTextFactory.$inject = ['dataservice', '$q'];\r\n /* @ngInject */\r\n function helpTextFactory(dataservice, $q) {\r\n var service = {\r\n cachedData: null,\r\n helpTextData: getHelpTextData\r\n };\r\n\r\n return service;\r\n\r\n function getHelpTextData(forceReload) {\r\n var deferred = $q.defer();\r\n\r\n if (!this.cachedData || forceReload) {\r\n dataservice.getItems(\"api/HelpText/ForDisplay\").then(function (response) {\r\n deferred.resolve(response.data);\r\n });\r\n this.cachedData = deferred.promise;\r\n }\r\n \r\n return this.cachedData;\r\n /*\r\n if (cachedData && !forceReload) {\r\n return $q.resolve(this.cachedData);\r\n }\r\n else {\r\n return dataservice.getItems(\"api/HelpText/ForDisplay\").then(function (response) {\r\n cachedData = response.data;\r\n console.log(cachedData);\r\n return $q.resolve(cachedData);\r\n }, function (error) { });\r\n }*/\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.helpText')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'helptext',\r\n config: {\r\n abstract: true,\r\n url: '/helptext',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.tenantId() != 1) {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'helptext.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/helptext/list.html?v=' + opsIncludeVersion,\r\n controller: 'HelpTextListController',\r\n controllerAs: 'vm',\r\n title: 'Help Text'\r\n }\r\n },\r\n {\r\n state: 'helptext.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/helpText/details.html?v=' + opsIncludeVersion,\r\n controller: 'HelpTextDetailController',\r\n controllerAs: 'vm',\r\n title: 'Help Text',\r\n settings: {}\r\n }\r\n }\r\n \r\n\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.helpText')\r\n .controller('HelpTextDetailController', HelpTextDetailController);\r\n\r\n HelpTextDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice', '$sce', '$templateRequest', 'helpTextFactory'\r\n ];\r\n\r\n function HelpTextDetailController($state, $stateParams,\r\n bsDialog, common, dataservice, $sce, $templateRequest, helpTextFactory) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.filters = undefined;\r\n vm.preventDelete = preventDelete;\r\n vm.states = [];\r\n vm.fields = [];\r\n vm.helpTextData = [];\r\n vm.stateChange = stateChange;\r\n vm.isLoading = true;\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), initLookups(), getItem(), loadHelpTextData()];\r\n return common.$q.all(promises).then(function (data) {\r\n stateChange();\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function loadHelpTextData() {\r\n return helpTextFactory.helpTextData(true).then(function (data) {\r\n vm.helpTextData = data;\r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"helptext.list\");\r\n }\r\n\r\n function preventDelete() {\r\n if ( $stateParams.id === '') {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function stateChange() {\r\n if (!vm.isLoading) {\r\n vm.item.Question = '';\r\n vm.item.FieldName = '';\r\n }\r\n var s = null;\r\n for (var i = 0; i < vm.states.length; i++) {\r\n if (vm.states[i].name === vm.item.State) {\r\n s = vm.states[i];\r\n break;\r\n }\r\n }\r\n if (s != null) {\r\n vm.fields = [];\r\n var stateName = s.name;\r\n if (stateName === 'opsconfig') {\r\n vm.fields = [];\r\n dataservice.getItem(\"api/OpsConfig/\")\r\n .then(function (response) {\r\n var configOptions = response.data;\r\n for (var i = 0; i < configOptions.length; i++) {\r\n _addFieldIfDoesntExist(stateName, configOptions[i].SettingKey);\r\n }\r\n }, function (error) { });\r\n vm.fields.sort();\r\n }\r\n else if (stateName === 'book') {\r\n _addFieldIfDoesntExist(stateName, 'bookHelpPopover');\r\n }\r\n else if (stateName === 'dailysetup') {\r\n _processTemplate('app/layout/_filters.html', stateName);\r\n }\r\n else {\r\n _processTemplate(s.templateUrl, stateName);\r\n if (stateName === 'users.details') {\r\n _processTemplate('app/users/_coreDetails.html', stateName);\r\n }\r\n if (stateName === 'tasks.details') {\r\n _processTemplate('app/tasks/_details.html', stateName);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function _processTemplate(templateUrl, stateName) {\r\n \r\n $templateRequest(templateUrl).then(function (template) {\r\n var div = document.createElement(\"div\");\r\n var $div = $(div);\r\n \r\n $div.html(template);\r\n \r\n $div.find(\"label\").each(function () {\r\n var forAttr = $(this).attr(\"for\");\r\n if (forAttr) {\r\n _addFieldIfDoesntExist(stateName, forAttr);\r\n }\r\n });\r\n $div.find(\"sp-checkbox-list\").each(function () {\r\n var forAttr = $(this).attr(\"help-text-field\");\r\n if (forAttr) {\r\n _addFieldIfDoesntExist(stateName, forAttr);\r\n }\r\n });\r\n\r\n $div.find(\"div[help-text-field]\").each(function () {\r\n var fieldAttr = $(this).attr(\"help-text-field\");\r\n if (fieldAttr) {\r\n _addFieldIfDoesntExist(stateName, fieldAttr);\r\n }\r\n });\r\n\r\n vm.fields.sort();\r\n \r\n\r\n }, function () { })\r\n }\r\n\r\n\r\n function _addFieldIfDoesntExist(stateName, fieldName) {\r\n if ($stateParams.id === '') {\r\n for (var i = 0; i < vm.helpTextData.length; i++) {\r\n var d = vm.helpTextData[i];\r\n if (d.State === stateName && fieldName === d.FieldName) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n vm.fields.push(fieldName);\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Help Text')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/HelpText/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '') {\r\n vm.item = {};\r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/HelpText/\" + val)\r\n .then(function (response) {\r\n if (response) {\r\n vm.item = response.data;\r\n common.setAuditInfo(vm.item);\r\n common.convertDateStringsToDates(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n // logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n // $state.go('404');\r\n });\r\n }\r\n function initLookups() {\r\n var states = $state.get();\r\n for (var i = 0; i < states.length; i++) {\r\n var s = states[i];\r\n if (!s.abstract) {\r\n vm.states.push(s);\r\n }\r\n }\r\n\r\n vm.states.sort(function (a, b) {\r\n if (a.name < b.name) {\r\n return -1;\r\n }\r\n if (a.name > b.name) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n dataservice.saveItem('api/HelpText/Save', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n helpTextFactory.helpTextData(true).then(function (data) {\r\n vm.helpTextData = data;\r\n }, function (error) { });\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.helpText')\r\n .controller('HelpTextListController', HelpTextListController);\r\n\r\n HelpTextListController.$inject = ['common', 'dataservice', 'config'];\r\n /* @ngInject */\r\n function HelpTextListController(common, dataservice, config) {\r\n var vm = this;\r\n vm.title = 'Help Text';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/HelpText').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.iCal')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'ical',\r\n config: {\r\n abstract: true,\r\n url: '/ical',\r\n template: ''\r\n }\r\n },\r\n {\r\n state: 'ical.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/iCal/list.html?v=' + opsIncludeVersion,\r\n controller: 'ICalListController',\r\n controllerAs: 'vm',\r\n title: 'iCal Feeds',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'ical.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/iCal/details.html?v=' + opsIncludeVersion,\r\n controller: 'ICalDetailsController',\r\n controllerAs: 'vm',\r\n title: 'iCal Details',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.iCal')\r\n .controller('ICalDetailsController', ICalDetailsController);\r\n\r\n ICalDetailsController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice', '$interval', '$sce'\r\n ];\r\n\r\n function ICalDetailsController($state, $stateParams, $window, bsDialog, common, dataservice, $interval, $sce) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n\r\n vm.opsIncludeVersion = common.opsIncludeVersion;\r\n vm.showBuildings = false;\r\n\r\n vm.viewChanged = viewChanged;\r\n vm.roomViewLabel = 'View';\r\n vm.isLoading = true;\r\n\r\n vm.eventTypeLabel = \"Event Types\";\r\n\r\n vm.buildingsLabel = \"Views\";\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [initLookups(), getItem(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n vm.isLoading = false;\r\n if (common.userService.isMazevoApi()) {\r\n vm.showBuildings = true;\r\n vm.buildingsLabel = \"Views\";\r\n }\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n if (vm.licenseInfo.NumberOfDisplaysLicensed < vm.licenseInfo.NumberOfDisplaysInUse) {\r\n $state.go('404');\r\n }\r\n\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"ical.list\");\r\n }\r\n\r\n\r\n function viewChanged() {\r\n if (vm.item.ViewId !== '') {\r\n dataservice.getItems(\"api/EventDisplay/RoomsInView/\" + vm.item.ViewId).then(function (response) {\r\n vm.rooms = response.data;\r\n }, function (error) { console.log(error) });\r\n }\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('iCal Feed')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n console.log(vm.item);\r\n dataservice.deleteItem(\"api/EventDisplay/iCal/\" + vm.item.UId).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '' && common.userService.userType() === \"1\") {\r\n $state.go('404');\r\n }\r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.StatusIdArray = [];\r\n vm.item.EventTypeIdArray = [];\r\n\r\n\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/EventDisplay/iCal/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n\r\n if (!vm.item.StatusIdArray) {\r\n vm.item.StatusIdArray = [];\r\n }\r\n if (!vm.item.EventTypeIdArray) {\r\n vm.item.EventTypeIdArray = [];\r\n }\r\n\r\n viewChanged();\r\n\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function initLookups() {\r\n dataservice.getItems(\"api/EventDisplay/GetLookups\").then(function (response) {\r\n vm.statuses = response.data.Statuses;\r\n vm.eventTypes = response.data.EventTypes;\r\n vm.views = response.data.Views;\r\n vm.buildings = response.data.Buildings;\r\n\r\n\r\n }, function (error) { console.log(error) });\r\n\r\n\r\n }\r\n\r\n function save() {\r\n if (vm.item.StatusIdArray.length === 0) {\r\n common.logger.error(\"You must select at least one status\");\r\n return;\r\n }\r\n if (vm.item.EventTypeIdArray.length === 0 && common.userService.apiTypeId() !== common.config.apiTypes.collegeNet) {\r\n common.logger.error(\"You must select at least one event type\");\r\n return;\r\n }\r\n\r\n vm.isSaving = true;\r\n vm.item.MainBackgroundImage = \"\";\r\n\r\n dataservice.saveItem('api/EventDisplay/iCal/', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n\r\n }\r\n }\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.iCal')\r\n .controller('ICalListController', ICalListController);\r\n\r\n ICalListController.$inject = ['$state','common', 'dataservice', 'config'];\r\n /* @ngInject */\r\n function ICalListController($state, common, dataservice, config) {\r\n var vm = this;\r\n\r\n vm.title = 'iCal Feed List';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.refresh = refresh;\r\n vm.licenseInfo = {};\r\n vm.isLicenseValid = false;\r\n vm.isLoading = true;\r\n vm.openiCalFeed = openiCalFeed;\r\n \r\n vm.isAdmin = common.userService.userType() === \"2\";\r\n activate();\r\n\r\n function activate() {\r\n var promises = [ getItems(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = vm.licenseInfo.NumberOfDisplaysLicensed >= vm.licenseInfo.NumberOfDisplaysInUse;\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/EventDisplay/iCalFeeds').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n\r\n function openiCalFeed(item) {\r\n console.log(item);\r\n window.open('api/EventDisplay/iCalFeed/' + item.UId);\r\n }\r\n\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .factory('filters.dialog', filterDialog);\r\n\r\n filterDialog.$inject = ['$uibModal', '$templateCache', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function filterDialog($modal, $templateCache, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n \r\n $templateCache.put('filterDialog.tpl.html?v=' + opsIncludeVersion,\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '

Filters

' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
');\r\n\r\n return service;\r\n\r\n\r\n function display() {\r\n var modalOptions = {\r\n ariaLabelledBy: \"Filters\",\r\n templateUrl: 'filterDialog.tpl.html?v=' + opsIncludeVersion,\r\n controller: FiltersModalInstance,\r\n controllerAs: 'vm',\r\n keyboard: true,\r\n size: 'lg'\r\n };\r\n\r\n return $modal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n FiltersModalInstance.$inject = ['$uibModalInstance', 'common', 'dataservice', 'userService', 'config'];\r\n\r\n /* @ngInject */\r\n function FiltersModalInstance($modalInstance, common, dataservice, userService, config) {\r\n var vm = this;\r\n vm.okText = 'Apply';\r\n vm.cancelText = 'Cancel';\r\n vm.ok = applyFilter;\r\n vm.cancel = cancel;\r\n vm.selectedFilterData = {\r\n buildings: [],\r\n statuses: [],\r\n categories: [],\r\n roomTypes: [],\r\n eventTypes: [],\r\n views: [],\r\n udfs: [],\r\n highlightChangesWithin: 1440,\r\n includeBookingWithCategoriesOnly: 0,\r\n showReservedTimes: 1\r\n }\r\n vm.filterTypeId = 0;\r\n vm.Buildings = [];\r\n vm.Statuses = [];\r\n vm.Categories = [];\r\n vm.RoomTypes = [];\r\n vm.EventTypes = [];\r\n vm.Views = [];\r\n vm.Udfs = [];\r\n vm.filtersDisabled = filtersDisabled;\r\n vm.filterTypeChanged = filterTypeChanged;\r\n vm.showBuildingsFilter = true;\r\n vm.showViewsFilter = true;\r\n vm.showUdfsFilter = false;\r\n vm.eventTypeLabel = \"Event Types\";\r\n vm.categoryLabel = \"Categories\";\r\n vm.roomTypeLabel = \"Room Types\";\r\n vm.buildingsLabel = \"Buildings\";\r\n vm.udfsLabel = \"UDFs\";\r\n\r\n activate();\r\n\r\n function activate() {\r\n setDisplayForApiType();\r\n\r\n\r\n vm.filterTypeId = userService.filterTypeId();\r\n vm.selectedFilterData = userService.filterData();\r\n var promises = [getFilters(), getFilterTypes()];\r\n \r\n return common.$q.all(promises).then(function () {\r\n _validateFilters();\r\n }, function (error) { });\r\n }\r\n\r\n \r\n function applyFilter() {\r\n if (!vm.selectedFilterData.highlightChangesWithin || vm.selectedFilterData.highlightChangesWithin < 0) {\r\n common.logger.error(\"Highlight Changes Within must be greater than 0\")\r\n return;\r\n }\r\n else {\r\n var updateDto = {\r\n UserDefinedFilterData: null,\r\n filterTypeId: vm.filterTypeId\r\n };\r\n \r\n if (vm.filterTypeId == 0) {\r\n updateDto.UserDefinedFilterData = vm.selectedFilterData;\r\n for (var i = 0; i < vm.filterTypes.length; i++) {\r\n if (vm.filterTypes[i].ID == 0) {\r\n vm.filterTypes[i].FilterData = btoa(angular.toJson(vm.filters))\r\n break;\r\n }\r\n }\r\n }\r\n \r\n userService.saveUserConfigOptions(updateDto, vm.selectedFilterData);\r\n common.notifier.notify(config.events.userConfigOptionsChange);\r\n $modalInstance.close('ok');\r\n }\r\n }\r\n\r\n function setDisplayForApiType() {\r\n var apiType = userService.apiTypeId();\r\n switch (apiType) {\r\n case config.apiTypes.collegeNet:\r\n vm.showViewsFilter = false;\r\n vm.showUdfsFilter = true;\r\n vm.eventTypeLabel = \"Event Types\";\r\n vm.categoryLabel = \"Resources Categories\";\r\n vm.roomTypeLabel = \"Location Categories\";\r\n vm.buildingsLabel = \"Location Partitions\";\r\n vm.udfsLabel = \"Custom Attributes\";\r\n break;\r\n case config.apiTypes.sevenPoint:\r\n vm.showUdfsFilter = true;\r\n break;\r\n case config.apiTypes.mazevo:\r\n vm.showViewsFilter = false;\r\n vm.showUdfsFilter = false;\r\n break;\r\n }\r\n }\r\n\r\n function filtersDisabled() {\r\n return vm.filterTypeId > 0;\r\n }\r\n\r\n function _validateFilters() {\r\n if (!vm.selectedFilterData) {\r\n vm.selectedFilterData = {\r\n buildings: [],\r\n statuses: [],\r\n categories: [],\r\n roomTypes: [],\r\n eventTypes: [],\r\n views: [],\r\n udfs: [],\r\n highlightChangesWithin: 1440,\r\n includeBookingWithCategoriesOnly: 0,\r\n showReservedTimes: 1\r\n }\r\n }\r\n if (!vm.selectedFilterData.roomTypes) {\r\n vm.selectedFilterData.roomTypes = [];\r\n }\r\n\r\n if (!vm.selectedFilterData.eventTypes) {\r\n vm.selectedFilterData.eventTypes = [];\r\n }\r\n\r\n if (!vm.selectedFilterData.buildings) {\r\n vm.selectedFilterData.buildings = [];\r\n }\r\n\r\n if (!vm.selectedFilterData.statuses) {\r\n vm.selectedFilterData.statuses = [];\r\n }\r\n\r\n if (!vm.selectedFilterData.categories) {\r\n vm.selectedFilterData.categories = [];\r\n }\r\n\r\n if (!vm.selectedFilterData.views) {\r\n vm.selectedFilterData.views = [];\r\n }\r\n\r\n if (!vm.selectedFilterData.udfs) {\r\n vm.selectedFilterData.udfs = [];\r\n }\r\n\r\n if (vm.selectedFilterData.showReservedTimes == undefined) {\r\n vm.selectedFilterData.showReservedTimes = true;\r\n }\r\n clean();\r\n\r\n }\r\n\r\n function clean() {\r\n vm.selectedFilterData.buildings = vm.selectedFilterData.buildings.filter(function (item) { return isIdInArray(item, vm.Buildings); });\r\n vm.selectedFilterData.statuses = vm.selectedFilterData.statuses.filter(function (item) { return isIdInArray(item, vm.Statuses); });\r\n vm.selectedFilterData.categories = vm.selectedFilterData.categories.filter(function (item) { return isIdInArray(item, vm.Categories); });\r\n vm.selectedFilterData.roomTypes = vm.selectedFilterData.roomTypes.filter(function (item) { return isIdInArray(item, vm.RoomTypes); });\r\n vm.selectedFilterData.eventTypes = vm.selectedFilterData.eventTypes.filter(function (item) { return isIdInArray(item, vm.EventTypes); });\r\n vm.selectedFilterData.views = vm.selectedFilterData.views.filter(function (item) { return isIdInArray(item, vm.Views); });\r\n vm.selectedFilterData.udfs = vm.selectedFilterData.udfs.filter(function (item) { return isIdInArray(item, vm.Udfs); });\r\n }\r\n\r\n function isIdInArray(item, selectedArray) {\r\n for (var i = 0; i < selectedArray.length; i++) {\r\n if (selectedArray[i].ID == item) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n\r\n function filterTypeChanged(ft) {\r\n vm.filterTypeId = ft.ID;\r\n \r\n var fts = vm.filterTypes;\r\n for (var i = 0; i < fts.length; i++) {\r\n if (fts[i].ID == vm.filterTypeId) {\r\n if (fts[i].ID == 0) {\r\n var userConfigDto = angular.fromJson(atob(fts[i].FilterData));\r\n vm.selectedFilterData = userConfigDto.UserDefinedFilterData;\r\n }\r\n else {\r\n vm.selectedFilterData = angular.fromJson(atob(fts[i].FilterData));\r\n }\r\n break;\r\n }\r\n }\r\n \r\n _validateFilters();\r\n \r\n }\r\n\r\n\r\n function getFilterTypes() {\r\n dataservice.getItems('api/FilterTypes/ForUser/' + userService.userId()).then(function (response) {\r\n vm.filterTypes = response.data;\r\n \r\n }, function (error) {\r\n console.log(\"ERROR in getFilterTypes()\", error);\r\n });\r\n }\r\n\r\n function cancel() {\r\n $modalInstance.dismiss('cancel');\r\n }\r\n\r\n function getFilters() {\r\n return dataservice.getItems('api/DailySetup/GetFilters').then(function (response) {\r\n var data = response.data;\r\n vm.Buildings = data.Buildings;\r\n vm.Statuses = data.Statuses;\r\n vm.Categories = data.Categories;\r\n vm.EventTypes = data.EventTypes;\r\n vm.RoomTypes = data.RoomTypes;\r\n vm.Views = data.Views;\r\n vm.Udfs = data.Udfs;\r\n\r\n return vm.selectedFilterData;\r\n }, function (error) {\r\n console.log(\"ERROR in getFilters()\", error);\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .factory('navRoutes', navRoutes);\r\n\r\n navRoutes.$inject = ['$state', 'routerHelper', 'userService'];\r\n\r\n /* @ngInject */\r\n function navRoutes($state, routerHelper, userService) {\r\n var states = routerHelper.getStates();\r\n var service = {\r\n getNavRoutes: getNavRoutes,\r\n isCurrent: isCurrent,\r\n getMobileNavRoutes: getMobileNavRoutes\r\n };\r\n\r\n return service;\r\n\r\n function getMobileNavRoutes() {\r\n return getNavRoutes(true);\r\n }\r\n\r\n function getNavRoutes(mobileOnly) {\r\n return states.filter(function (r) {\r\n var isLoggedIn = userService.isAuthenticated();\r\n var userType = userService.userType();\r\n var apiTypeId = userService.apiTypeId();\r\n \r\n if (!r.settings || !r.settings.nav) {\r\n return false;\r\n }\r\n if (r.settings) {\r\n if (r.settings.requireBillingDepartments) {\r\n if (!userService.isCollegeNetApi()) {\r\n var billingDepts = userService.billingDepartmentIds();\r\n if (billingDepts.length == 0) {\r\n return false;\r\n }\r\n }\r\n else {\r\n var numberPaymentTemplates = userService.numberOfPaymentTemplates();\r\n if (numberPaymentTemplates == 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n if (r.settings.requireOps) {\r\n if (userService.hasOps() == \"0\") {\r\n return false;\r\n }\r\n }\r\n if (r.settings.requireDataApi) {\r\n if ( userService.hasDataApi() === \"0\") {\r\n return false;\r\n }\r\n }\r\n if (mobileOnly && !r.settings.mobileButton) {\r\n return false;\r\n }\r\n\r\n var allowedUserTypes = r.settings.allowedUserTypes;\r\n if (allowedUserTypes && allowedUserTypes.length > 0) {\r\n if (!isLoggedIn) {\r\n return false;\r\n }\r\n for (var i = 0; i < allowedUserTypes.length; i++) {\r\n if (allowedUserTypes[i] == userType) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n var allowedApiTypes = r.settings.allowedApiTypes;\r\n if (allowedApiTypes && allowedApiTypes.length > 0) {\r\n if (!isLoggedIn) {\r\n return false;\r\n }\r\n\r\n for (var i = 0; i < allowedApiTypes.length; i++) {\r\n if (allowedApiTypes[i] == apiTypeId) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n if (r.settings.authMode || r.settings.authMode == 0) {\r\n if (r.settings.authMode == 0) { //unauthenticated only\r\n return !isLoggedIn;\r\n }\r\n else if (r.settings.authMode == 1) { //authenticated only\r\n return isLoggedIn;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n \r\n }\r\n\r\n return r.settings && r.settings.nav;\r\n }).sort(function (r1, r2) {\r\n return r1.settings.nav - r2.settings.nav;\r\n });\r\n }\r\n\r\n function isCurrent(route) {\r\n if (!route.title || !$state.current || !$state.current.title) {\r\n return '';\r\n }\r\n var menuName = route.title;\r\n return $state.current.title.substr(0, menuName.length) === menuName ? 'current' : '';\r\n }\r\n\r\n\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('ShellController', ShellController);\r\n\r\n ShellController.$inject = ['$rootScope', '$timeout','$state', 'common', '$scope'];\r\n /* @ngInject */\r\n function ShellController($rootScope, $timeout, $state, common, $scope) {\r\n var vm = this;\r\n vm.busyMessage = 'Please wait ...';\r\n vm.isBusy = true;\r\n $rootScope.showSplash = true;\r\n vm.hideNav = false;\r\n vm.opsIncludeVersion = common.opsIncludeVersion;\r\n\r\n activate();\r\n\r\n function activate() {\r\n common.logger.success(common.config.appTitle + ' loaded!', null);\r\n common.notifier.subscribe(common.config.events.stateChanged, $scope, setState);\r\n hideSplash();\r\n }\r\n\r\n function setState() {\r\n if ($state.current.name == \"eventdisplay.display\"\r\n || $state.current.name == \"paymenttemplates.pay\"\r\n || $state.current.name == \"paymenttemplates.receipt\"\r\n || $state.current.name == \"paymenttemplates.error\") {\r\n vm.hideNav = true;\r\n }\r\n }\r\n\r\n function hideSplash() {\r\n //Force a 1 second delay so we can see the splash.\r\n $timeout(function () {\r\n $rootScope.showSplash = false;\r\n }, 1000);\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('SidebarController', SidebarController);\r\n\r\n SidebarController.$inject = ['$scope', '$state', 'config', 'routerHelper', 'userService', 'dataservice', 'common', 'navRoutes'];\r\n /* @ngInject */\r\n function SidebarController($scope, $state, config, routerHelper, userService, dataservice, common, navRoutes) {\r\n var vm = this;\r\n vm.isCurrent = navRoutes.isCurrent;\r\n vm.showBadge = showBadge;\r\n\r\n vm.alertsCount = 0;\r\n vm.dashboardCount = 0;\r\n vm.tasksCount = 0;\r\n vm.dailysetupCount = 0;\r\n \r\n activate();\r\n \r\n function activate() {\r\n _setNavRoutes();\r\n common.notifier.subscribe(config.events.refreshCounts, $scope, _refreshCounts);\r\n common.notifier.subscribe(config.events.mainDateChange, $scope, dateChanged);\r\n common.notifier.subscribe(config.events.authenticationChange, $scope, _setNavRoutes);\r\n }\r\n\r\n function _setNavRoutes() {\r\n vm.navRoutes = navRoutes.getNavRoutes();\r\n }\r\n\r\n function dateChanged(eventName, newDate) {\r\n _refreshCounts();\r\n }\r\n\r\n function _refreshCounts(eventName, data) {\r\n if (data) {\r\n if (data.alertsCount) {\r\n vm.alertsCount = data.alertsCount;\r\n }\r\n if (data.tasksCount) {\r\n vm.tasksCount = data.tasksCount;\r\n }\r\n }\r\n else {\r\n var m = moment(common.getMainState(\"mainDate\"));\r\n \r\n return dataservice.getCounts(m).then(function (response) {\r\n var countModel = response.data;\r\n vm.alertsCount = countModel.AlertCount.ActiveCount;\r\n // if (vm.alertsCount > 0) {\r\n // var audio = new Audio('app/Pigeons-sound.mp3');\r\n // audio.play();\r\n // }\r\n\r\n vm.tasksCount = countModel.TaskCount.ActiveCount;\r\n }, function (error) { });\r\n }\r\n }\r\n\r\n function showBadge(routeTitle) {\r\n switch(routeTitle)\r\n {\r\n case \"alerts.display\":\r\n return vm.alertsCount > 0;\r\n case \"tasks.display\":\r\n return vm.tasksCount > 0;\r\n default:\r\n return vm[routeTitle + \"Count\"] > 0;\r\n }\r\n }\r\n\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('app.layout')\r\n .directive('spBindHtmlCompile', bindHtmlCompile);;\r\n\r\n bindHtmlCompile.$inject = ['$compile'];\r\n /* @ngInject */\r\n function bindHtmlCompile($compile) {\r\n var directive = {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n scope.$watch(function () {\r\n return scope.$eval(attrs.spBindHtmlCompile);\r\n }, function (value) {\r\n element.html(value);\r\n $compile(element.contents())(scope);\r\n });\r\n }\r\n };\r\n return directive;\r\n }\r\n}());","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('spSidebar', spSidebar);\r\n\r\n /* @ngInject */\r\n function spSidebar() {\r\n // Opens and closes the sidebar menu.\r\n // Usage:\r\n //
\r\n //
\r\n // Creates:\r\n //
\r\n var directive = {\r\n link: link,\r\n restrict: 'EA',\r\n scope: {\r\n whenDoneAnimating: '&?'\r\n }\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n var $sidebarInner = element.find('.sidebar-inner');\r\n var $dropdownElement = element.find('.sidebar-dropdown a');\r\n element.addClass('sidebar');\r\n $dropdownElement.click(dropdown);\r\n\r\n function dropdown(e) {\r\n var dropClass = 'dropy';\r\n e.preventDefault();\r\n if (!$dropdownElement.hasClass(dropClass)) {\r\n $sidebarInner.slideDown(350, scope.whenDoneAnimating);\r\n $dropdownElement.addClass(dropClass);\r\n } else if ($dropdownElement.hasClass(dropClass)) {\r\n $dropdownElement.removeClass(dropClass);\r\n $sidebarInner.slideUp(350, scope.whenDoneAnimating);\r\n }\r\n }\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('spTopNav', spTopNav);\r\n\r\n spTopNav.$inject = ['opsIncludeVersion'];\r\n /* @ngInject */\r\n function spTopNav(opsIncludeVersion) {\r\n var directive = {\r\n restrict: 'EA',\r\n templateUrl: 'app/layout/sp-top-nav.html?v=' + opsIncludeVersion\r\n };\r\n\r\n return directive;\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('TopNavController', TopNavController);\r\n\r\n TopNavController.$inject = ['$scope', '$state', 'config', 'common', 'filters.dialog', 'userEdit.dialog', 'navRoutes'];\r\n /* @ngInject */\r\n function TopNavController($scope, $state, config, common, filterDiag, userEditDiag, navRoutes) {\r\n var vm = this;\r\n vm.title = \"7 Point Solutions\";\r\n vm.userName = \"Guest\";\r\n vm.isAdmin = \"0\";\r\n vm.isAuthenticated = false;\r\n vm.showFilterLink = showFilterLink;\r\n vm.moveDate = moveDate;\r\n vm.showFilters = showFilters;\r\n vm.isCollapsed = true;\r\n vm.showUser = showUser;\r\n vm.onDateChange = onDateChange;\r\n vm.datePickerOpen = false;\r\n vm.openDatePicker = openDatePicker;\r\n vm.navRoutes = [];\r\n vm.mobileNavRoutes = [];\r\n vm.isCurrent = navRoutes.isCurrent;\r\n vm.hasOps = common.userService.hasOps;\r\n vm.hideNav = hideNav;\r\n\r\n activate();\r\n\r\n function _setNavRoutes() {\r\n vm.navRoutes = navRoutes.getNavRoutes().filter(function (r) {\r\n return r.settings && !r.settings.mobileButton;\r\n });\r\n vm.mobileNavRoutes = navRoutes.getMobileNavRoutes();\r\n }\r\n\r\n function activate() {\r\n var d = common.getMainState(\"mainDate\");\r\n if (!d) {\r\n common.setMainState(\"mainDate\", new Date());\r\n }\r\n vm.onDate = common.getMainState(\"mainDate\");\r\n checkUserState();\r\n \r\n common.notifier.subscribe(config.events.authenticationChange, $scope, checkUserState);\r\n common.notifier.subscribe(config.events.mainDateToday, $scope, goToToday);\r\n }\r\n\r\n function openDatePicker() {\r\n vm.datePickerOpen = !vm.datePickerOpen;\r\n }\r\n\r\n function showFilterLink() {\r\n if (vm.isAuthenticated) {\r\n if (common.userService.hasOps() == \"1\" && common.userService.hasDataApi() === \"1\" && common.userService.apiTypeId() !== common.config.apiTypes.centersXml) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function goToToday() {\r\n vm.onDate = new Date();\r\n common.setMainState(\"mainDate\", new Date(vm.onDate));\r\n common.notifier.notify(config.events.mainDateChange, vm.onDate);\r\n }\r\n\r\n function onDateChange() {\r\n common.setMainState(\"mainDate\", new Date(vm.onDate));\r\n common.notifier.notify(config.events.mainDateChange, vm.onDate);\r\n }\r\n\r\n function checkUserState() {\r\n vm.userName = common.userService.userName();\r\n vm.isAdmin = common.userService.userType() != \"0\";\r\n vm.isAuthenticated = common.userService.isAuthenticated();\r\n _setNavRoutes();\r\n }\r\n\r\n function moveDate(direction) {\r\n var d = common.getMainState(\"mainDate\");\r\n var newDate = moment(d).add(direction, 'days');\r\n vm.onDate = new Date(newDate);\r\n common.setMainState(\"mainDate\", new Date(newDate));\r\n common.notifier.notify(config.events.mainDateChange, vm.onDate);\r\n }\r\n\r\n function showFilters($event) {\r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n return filterDiag.display().then(function () { }, function () { });\r\n }\r\n\r\n function showUser($event) {\r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n return userEditDiag.display().then(function () { }, function () { });\r\n }\r\n\r\n function hideNav() {\r\n vm.isCollapsed = true;\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.legal')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'privacy',\r\n config: {\r\n url: '/privacy',\r\n templateUrl: 'app/legal/privacyPolicy.html?v=' + opsIncludeVersion,\r\n title: 'Privacy Policy'\r\n }\r\n },\r\n {\r\n state: 'terms',\r\n config: {\r\n url: '/terms',\r\n templateUrl: 'app/legal/terms.html?v=' + opsIncludeVersion,\r\n title: 'Terms'\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .controller('LoginController', LoginController);\r\n\r\n LoginController.$inject = ['$window', '$location', '$stateParams', 'common', 'dataservice', 'bootstrap.dialog', 'backendHubProxy', 'signalrEndPoint'];\r\n /* @ngInject */\r\n function LoginController($window, $location, $stateParams, common, dataservice, bsDiag, backendHubProxy, signalrEndPoint) {\r\n var vm = this;\r\n vm.title = 'Login';\r\n vm.submitForm = submitForm;\r\n vm.data = { \"grant_type\": \"password\" };\r\n vm.promoHtml = '';\r\n vm.forgotPassword = forgotPassword;\r\n vm.externalAuthProvider = externalAuthProvider;\r\n vm.externalLoginComplete = externalLoginComplete;\r\n vm.loginButtonText = \"Login\";\r\n vm.passwordKeyPress = passwordKeyPress;\r\n vm.manualLogin = manualLogin;\r\n vm.forceSso = false;\r\n vm.loadingSso = false;\r\n vm.loginProviders = [];\r\n\r\n /*\r\n vm.testAuto = function () {\r\n\r\n\r\n dataservice.getItem('api/NotesReport/TestAuto').then(function (res) {\r\n console.log(res);\r\n },\r\n function (res) {\r\n console.log(res);\r\n\r\n }\r\n );\r\n }\r\n */\r\n \r\n\r\n activate();\r\n\r\n function activate() {\r\n \r\n backendHubProxy.stop();\r\n common.notifier.notify(common.config.events.authenticationChange);\r\n var promises = [getPromo()];\r\n \r\n if ($location.host() !== \"www.7pointops.com\") {\r\n vm.loadingSso = true;\r\n promises.push(getLoginProvidersForHost());\r\n }\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n document.getElementById(\"userName\").focus();\r\n }, function (error) { });\r\n \r\n }\r\n\r\n function getLoginProvidersForHost() {\r\n return dataservice.getItem(\"api/Tenants/getLoginProvidersForHost\")\r\n .then(function (response) {\r\n if (response.data && response.data.length > 0) {\r\n vm.loginProviders = response.data;\r\n vm.loadingSso = false;\r\n vm.forceSso = response.data[0].ForceSso === \"True\";\r\n }\r\n else {\r\n vm.loadingSso = false;\r\n common.logger.warn(\"No SSO data found for custom host\");\r\n }\r\n }, function (error) { });\r\n\r\n }\r\n\r\n function externalLoginComplete(fragment) {\r\n if (fragment.error) {\r\n common.logger.error(fragment.error);\r\n }\r\n else {\r\n common.userService.getAccessToken(fragment, loginSuccess, loginError);\r\n }\r\n }\r\n\r\n function forgotPassword() {\r\n bsDiag.confirmationDialog(\"Forgot your password\", \"\", \"Send Email\",\r\n \"Cancel\", 'app/dialogs/_passwordResetEmail.html').then(function (result) {\r\n\r\n }, function (diagDismissed) {\r\n \r\n });\r\n }\r\n\r\n function passwordKeyPress(e) {\r\n if (e.keyCode === 13) {\r\n if (vm.data.userName && vm.data.password) {\r\n vm.submitForm(true);\r\n }\r\n }\r\n }\r\n\r\n\r\n function getPromo() {\r\n return dataservice.getItem(\"api/Promos/1\")\r\n .then(function (response) {\r\n vm.promoHtml = response.data.Html;\r\n\r\n }, function (error) { });\r\n }\r\n \r\n\r\n function submitForm(isValid) {\r\n if (isValid) {\r\n common.userService.login(vm.data, loginSuccess, loginError);\r\n }\r\n }\r\n\r\n function externalAuthProvider(provider) {\r\n var externalProviderUrl = \"https://\" + provider.HostName + \"/api/Account/ExternalLogin/?provider=\" + provider.LoginProvider; \r\n \r\n window.$7PointAuthScope = vm;\r\n var oauthWindow = window.open(externalProviderUrl, \"Authenticate Account\", \"status=0,width=600,height=750\");\r\n }\r\n\r\n function manualLogin() {\r\n common.userService.login(vm.data, loginSuccess, loginError);\r\n }\r\n\r\n \r\n function loginSuccess() {\r\n if ($stateParams.returnUrl) {\r\n common.$location.path($stateParams.returnUrl);\r\n }\r\n else {\r\n common.$location.path('/');\r\n }\r\n }\r\n\r\n function loginError(msg) {\r\n vm.loginErrorMsg = msg;\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'login',\r\n config: {\r\n url: '/login',\r\n templateUrl: 'app/login/login.html?v=' + opsIncludeVersion,\r\n controller: 'LoginController',\r\n controllerAs: 'vm',\r\n title: 'Login',\r\n settings: {\r\n nav: 100,\r\n content: ' Login',\r\n authMode: 0\r\n }\r\n }\r\n },\r\n {\r\n state: 'logout',\r\n config: {\r\n url: '/logout',\r\n templateUrl: 'app/login/logout.html?v=' + opsIncludeVersion,\r\n controller: 'LogoutController',\r\n controllerAs: 'vm',\r\n title: 'Logout',\r\n settings: {\r\n nav: 0,\r\n content: ' Logout {{vm.count}}',\r\n authMode: 1\r\n\r\n }\r\n }\r\n },\r\n {\r\n state: 'resetpassword',\r\n config: {\r\n url: '/resetpassword/{uid}',\r\n templateUrl: 'app/login/resetpassword.html?v=' + opsIncludeVersion,\r\n controller: 'ResetPasswordController',\r\n controllerAs: 'vm',\r\n title: 'Reset Password',\r\n settings: {\r\n authMode: 0\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .controller('LogoutController', LogoutController);\r\n\r\n LogoutController.$inject = ['$window', 'userService', 'logger', 'backendHubProxy'];\r\n /* @ngInject */\r\n function LogoutController($window, userService, logger, backendHubProxy) {\r\n var vm = this;\r\n vm.title = 'Logout';\r\n vm.message = \"You've successfully logged out\";\r\n activate();\r\n\r\n function activate() {\r\n backendHubProxy.stop();\r\n logger.info('Activated ' + vm.title + ' View');\r\n logout();\r\n }\r\n\r\n function logout() {\r\n userService.logout();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .controller('ResetPasswordController', ResetPasswordController);\r\n\r\n ResetPasswordController.$inject = ['$window', '$stateParams', 'common', 'dataservice'];\r\n /* @ngInject */\r\n function ResetPasswordController($window, $stateParams, common, dataservice) {\r\n var vm = this;\r\n vm.title = 'Reset Password';\r\n vm.password = \"\";\r\n vm.confirmPassword = \"\";\r\n vm.passwordResetError = \"\";\r\n vm.passwordResetSuccessfully = false;\r\n vm.resetPassword = resetPassword;\r\n vm.loadErrorMsg = \"\";\r\n vm.loading = true;\r\n vm.passwordPattern = /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[ !\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_`{|}~]).{12,}$/;\r\n\r\n activate();\r\n\r\n function activate() {\r\n\r\n var promises = [getResetItem()];\r\n return common.$q.all(promises).then(function (data) {\r\n vm.loading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getResetItem() {\r\n dataservice.getItem('api/Account/GetPasswordReset/' + $stateParams.uid).then(function (response) {\r\n var data = response.data;\r\n if (data.Success === false) {\r\n vm.loadErrorMsg = data.Message;\r\n }\r\n }, function (error) { });\r\n\r\n }\r\n\r\n function resetPassword() {\r\n if (!vm.Password) {\r\n common.logger.error(\"Please supply a password\");\r\n return;\r\n }\r\n\r\n var dto = {\r\n UId: $stateParams.uid,\r\n password: vm.Password\r\n }\r\n dataservice.saveItem('api/Account/ResetPassword', dto, true).then(function (response) {\r\n if (response.data.Success) {\r\n vm.passwordResetSuccessfully = true;\r\n }\r\n else {\r\n vm.passwordResetError = true;\r\n }\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.logTypes')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'logtypes',\r\n config: {\r\n abstract: true,\r\n url: '/logtypes',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'logtypes.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/logTypes/list.html?v=' + opsIncludeVersion,\r\n controller: 'LogTypesListController',\r\n controllerAs: 'vm',\r\n title: 'Daily Log Types'\r\n }\r\n },\r\n {\r\n state: 'logtypes.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/logTypes/details.html?v=' + opsIncludeVersion,\r\n controller: 'LogTypeDetailController',\r\n controllerAs: 'vm',\r\n title: 'Daily Log Type',\r\n settings: {}\r\n }\r\n },\r\n {\r\n state: 'logtypes.groupingslist',\r\n config: {\r\n url: '/groupingslist',\r\n templateUrl: 'app/logTypes/groupingsList.html?v=' + opsIncludeVersion,\r\n controller: 'LogTypesGroupingsListController',\r\n controllerAs: 'vm',\r\n title: 'Daily Log Type Groupings'\r\n }\r\n },\r\n {\r\n state: 'logtypes.groupingsDetails',\r\n config: {\r\n url: '/groupingsDetails',\r\n templateUrl: 'app/logTypes/groupingDetails.html?v=' + opsIncludeVersion,\r\n controller: 'LogTypesGroupingDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Daily Log Type Grouping'\r\n }\r\n }\r\n\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.logTypes')\r\n .controller('LogTypeDetailController', LogTypeDetailController);\r\n\r\n LogTypeDetailController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function LogTypeDetailController($state, $stateParams, $window, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.counts = [];\r\n vm.deletedQuestions = [];\r\n vm.deletedOptions = [];\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n vm.preventDelete = preventDelete;\r\n\r\n vm.questionClick = questionClick;\r\n vm.addQuestion = addQuestion;\r\n vm.addOption = addOption;\r\n vm.showMove = showMove;\r\n vm.moveOpt = moveOpt;\r\n vm.deleteOpt = deleteOpt;\r\n vm.deleteQuestion = deleteQuestion;\r\n vm.answerTypeText = answerTypeText;\r\n vm.isRequiredAndNotActivated = isRequiredAndNotActivated;\r\n vm.sendOnData = [];\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), initLookups(), getItem(), getCounts()];\r\n\r\n vm.sendOnData.push({ \"ID\": 0, \"Description\": \"Sunday\" });\r\n vm.sendOnData.push({ \"ID\": 1, \"Description\": \"Monday\" });\r\n vm.sendOnData.push({ \"ID\": 2, \"Description\": \"Tuesday\" });\r\n vm.sendOnData.push({ \"ID\": 3, \"Description\": \"Wednesday\" });\r\n vm.sendOnData.push({ \"ID\": 4, \"Description\": \"Thursday\" });\r\n vm.sendOnData.push({ \"ID\": 5, \"Description\": \"Friday\" });\r\n vm.sendOnData.push({ \"ID\": 6, \"Description\": \"Saturday\" });\r\n vm.sendAround = [];\r\n var h;\r\n for (var i = 0; i < 24; i++) {\r\n if (i === 0) {\r\n h = \"12\";\r\n }\r\n else {\r\n if (i > 12) {\r\n h = i % 12;\r\n }\r\n else {\r\n h = i;\r\n }\r\n }\r\n\r\n var desc = (h + \":00\");\r\n desc += Number(i) < 12 ? \" AM\" : \" PM\";\r\n\r\n vm.sendAround.push({ \"ID\": i, \"Description\": desc })\r\n }\r\n \r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"logtypes.list\");\r\n }\r\n\r\n function preventDelete() {\r\n if (vm.counts.length > 0 || $stateParams.id === \"0\") {\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Log Type')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/LogTypes/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"0\";\r\n }\r\n\r\n function getCounts() {\r\n return dataservice.getItems('api/LogTypes/CountsOfEntries/' + $stateParams.id).then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '0') {\r\n vm.item = {};\r\n vm.item.Active = 1;\r\n vm.item.Questions = [];\r\n vm.item.SendOnDays = [];\r\n vm.item.IsReportScheduled = 0;\r\n vm.item.SendOnNewEntry = 0;\r\n vm.item.AllowContinueLater = 0;\r\n vm.item.IncludeEmptyResponses = 1;\r\n vm.item.AllowCompletions = 0;\r\n common.setAuditInfo(vm.item);\r\n vm.item.DepartmentID = parseInt($window.localStorage.getItem(\"SevenPointTaskDepartmentId\")) || 0;\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/LogTypes/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n \r\n vm.item = data.data;\r\n if (!vm.item.Questions) {\r\n vm.item.Questions = [];\r\n }\r\n vm.item.SendOnDays = [];\r\n if (vm.item.SendOnSunday) {\r\n vm.item.SendOnDays.push(0)\r\n }\r\n if (vm.item.SendOnMonday) {\r\n vm.item.SendOnDays.push(1)\r\n }\r\n if (vm.item.SendOnTuesday) {\r\n vm.item.SendOnDays.push(2)\r\n }\r\n if (vm.item.SendOnWednesday) {\r\n vm.item.SendOnDays.push(3)\r\n }\r\n if (vm.item.SendOnThursday) {\r\n vm.item.SendOnDays.push(4)\r\n }\r\n if (vm.item.SendOnFriday) {\r\n vm.item.SendOnDays.push(5)\r\n }\r\n if (vm.item.SendOnSaturday) {\r\n vm.item.SendOnDays.push(6)\r\n }\r\n common.setAuditInfo(vm.item);\r\n // common.convertDateStringsToDates(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function initLookups() {\r\n dataservice.getItems(\"api/Departments/ActiveForUser\").then(function (data) {\r\n vm.departments = data.data;\r\n }, function (error) { });\r\n\r\n }\r\n\r\n function save() {\r\n \r\n vm.isSaving = true;\r\n\r\n if (vm.deletedOptions.length > 0) {\r\n dataservice.saveItem('api/LogTypes/DeleteQuestionItems', vm.deletedOptions).then(function (saveResult) {\r\n }, function (error) { });\r\n }\r\n\r\n if (vm.deletedQuestions.length > 0) {\r\n dataservice.saveItem('api/LogTypes/DeleteQuestions', vm.deletedQuestions).then(function (saveResult) {\r\n }, function (error) { });\r\n }\r\n \r\n vm.item.SendOnSunday = false;\r\n vm.item.SendOnMonday = false;\r\n vm.item.SendOnTuesday = false;\r\n vm.item.SendOnWednesday = false;\r\n vm.item.SendOnThursday = false;\r\n vm.item.SendOnFriday = false;\r\n vm.item.SendOnSaturday = false;\r\n\r\n if (!vm.item.SendOnNewEntry == 1) {\r\n vm.item.AllowContinueLater = 0;\r\n }\r\n\r\n for (var i = 0; i < vm.item.SendOnDays; i++) {\r\n switch(vm.item.SendOnDays[i]) {\r\n case 0:\r\n vm.item.SendOnSunday = true;\r\n break;\r\n case 1:\r\n vm.item.SendOnMonday = true;\r\n break;\r\n case 2:\r\n vm.item.SendOnTuesday = true;\r\n break;\r\n case 3:\r\n vm.item.SendOnWednesday = true;\r\n break;\r\n case 4:\r\n vm.item.SendOnThursday = true;\r\n break;\r\n case 5:\r\n vm.item.SendOnFriday = true;\r\n break;\r\n case 6:\r\n vm.item.SendOnSaturday = true;\r\n break;\r\n }\r\n }\r\n\r\n dataservice.saveItem('api/LogTypes', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n \r\n }\r\n\r\n function isRequiredAndNotActivated(question) {\r\n return !question.Activated && question.Required == true;\r\n }\r\n\r\n function deleteQuestion(question) {\r\n if (question.HasBeenAnswered) {\r\n var deleteMsg = \"This question has been answered. Deleting it will also delete all responses to the question. Are you sure you want to delete this question?\";\r\n\r\n return bsDialog\r\n .deleteDialog('Log Type', deleteMsg, \"Yes\", \"No\")\r\n .then(function () {\r\n vm.deletedQuestions.push(question);\r\n vm.item.Questions.splice(vm.item.Questions.indexOf(question), 1);\r\n }, function () { });\r\n\r\n }\r\n else {\r\n if (question.ID > 0) {\r\n vm.deletedQuestions.push(question);\r\n }\r\n vm.item.Questions.splice(vm.item.Questions.indexOf(question), 1);\r\n }\r\n \r\n }\r\n\r\n function deleteOpt(question, opt) {\r\n if (opt.ID > 0) {\r\n\r\n if (question.HasBeenAnswered) {\r\n var deleteMsg = \"This question has been answered. Deleting this option will also delete all responses to the question that answered with this option. Are you sure you want to delete this option?\";\r\n\r\n return bsDialog.deleteDialog('Log Type', deleteMsg, \"Yes\", \"No\").then(function () {\r\n vm.deletedOptions.push(opt);\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }, function () { });\r\n }\r\n else {\r\n vm.deletedOptions.push(opt);\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }\r\n }\r\n else {\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }\r\n\r\n }\r\n\r\n function showMove(dir, question, opt) {\r\n if (dir == -1) {\r\n if (question.Items.indexOf(opt) == 0) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n else {\r\n if (question.Items.indexOf(opt) == (question.Items.length - 1)) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n\r\n function moveOpt(dir, question, opt) {\r\n var index = question.Items.indexOf(opt);\r\n var newIndex = index + dir;\r\n\r\n var removedElement;\r\n if (newIndex > -1 && newIndex < question.Items.length) {\r\n removedElement = question.Items.splice(index, 1)[0];\r\n }\r\n\r\n question.Items.splice(newIndex, 0, removedElement);\r\n }\r\n\r\n function questionClick(question) {\r\n for (var i = 0; i < vm.item.Questions.length; i++) {\r\n vm.item.Questions[i].Activated = false;\r\n }\r\n question.Activated = true;\r\n }\r\n\r\n function answerTypeText(question) {\r\n switch (question.AnswerType) {\r\n case 1:\r\n return \"Short Answer\";\r\n case 2:\r\n return \"Paragraph\";\r\n case 3:\r\n return \"Multiple Choice\";\r\n case 4:\r\n return \"Checkboxes\";\r\n case 5:\r\n return \"Dropdown\";\r\n case 6:\r\n return \"Date\";\r\n case 7:\r\n return \"Time\";\r\n case 8:\r\n return \"Signature\";\r\n }\r\n }\r\n\r\n function addQuestion() {\r\n for (var i = 0; i < vm.item.Questions.length; i++) {\r\n vm.item.Questions[i].Activated = false;\r\n }\r\n var question = {};\r\n\r\n question.Question = \"\";\r\n question.AnswerType = 1;\r\n question.AnswerTypeText = \"Short Answer\";\r\n question.Items = [];\r\n question.Active = true;\r\n question.Activated = true;\r\n question.Sequence = vm.item.Questions.length;;\r\n question.Required = false;\r\n vm.item.Questions.push(question);\r\n }\r\n\r\n function addOption(question) {\r\n var i = question.Items.length + 1;\r\n var opt = { Description: \"Option \" + i, Active: true };\r\n question.Items.push(opt)\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.logTypes')\r\n .controller('LogTypesGroupingDetailsController', LogTypesGroupingDetailsController);\r\n\r\n LogTypesGroupingDetailsController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function LogTypesGroupingDetailsController($state, $stateParams, $window, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.counts = [];\r\n vm.deletedQuestions = [];\r\n vm.deletedOptions = [];\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n vm.preventDelete = preventDelete;\r\n\r\n vm.questionClick = questionClick;\r\n vm.addQuestion = addQuestion;\r\n vm.addOption = addOption;\r\n vm.showMove = showMove;\r\n vm.moveOpt = moveOpt;\r\n vm.deleteOpt = deleteOpt;\r\n vm.deleteQuestion = deleteQuestion;\r\n vm.answerTypeText = answerTypeText;\r\n vm.isRequiredAndNotActivated = isRequiredAndNotActivated;\r\n vm.sendOnData = [];\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), initLookups(), getItem(), getCounts()];\r\n\r\n vm.sendOnData.push({ \"ID\": 0, \"Description\": \"Sunday\" });\r\n vm.sendOnData.push({ \"ID\": 1, \"Description\": \"Monday\" });\r\n vm.sendOnData.push({ \"ID\": 2, \"Description\": \"Tuesday\" });\r\n vm.sendOnData.push({ \"ID\": 3, \"Description\": \"Wednesday\" });\r\n vm.sendOnData.push({ \"ID\": 4, \"Description\": \"Thursday\" });\r\n vm.sendOnData.push({ \"ID\": 5, \"Description\": \"Friday\" });\r\n vm.sendOnData.push({ \"ID\": 6, \"Description\": \"Saturday\" });\r\n vm.sendAround = [];\r\n var h;\r\n for (var i = 0; i < 24; i++) {\r\n if (i === 0) {\r\n h = \"12\";\r\n }\r\n else {\r\n if (i > 12) {\r\n h = i % 12;\r\n }\r\n else {\r\n h = i;\r\n }\r\n }\r\n\r\n var desc = (h + \":00\");\r\n desc += Number(i) < 12 ? \" AM\" : \" PM\";\r\n\r\n vm.sendAround.push({ \"ID\": i, \"Description\": desc })\r\n }\r\n \r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"logtypes.list\");\r\n }\r\n\r\n function preventDelete() {\r\n if (vm.counts.length > 0 || $stateParams.id === \"0\") {\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Log Type')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/LogTypes/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"0\";\r\n }\r\n\r\n function getCounts() {\r\n return dataservice.getItems('api/LogTypes/CountsOfEntries/' + $stateParams.id).then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '0') {\r\n vm.item = {};\r\n vm.item.Active = 1;\r\n vm.item.Questions = [];\r\n vm.item.SendOnDays = [];\r\n vm.item.IsReportScheduled = 0;\r\n vm.item.SendOnNewEntry = 0;\r\n vm.item.AllowContinueLater = 0;\r\n common.setAuditInfo(vm.item);\r\n vm.item.DepartmentID = parseInt($window.localStorage.getItem(\"SevenPointTaskDepartmentId\")) || 0;\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/LogTypes/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n \r\n vm.item = data.data;\r\n if (!vm.item.Questions) {\r\n vm.item.Questions = [];\r\n }\r\n vm.item.SendOnDays = [];\r\n if (vm.item.SendOnSunday) {\r\n vm.item.SendOnDays.push(0)\r\n }\r\n if (vm.item.SendOnMonday) {\r\n vm.item.SendOnDays.push(1)\r\n }\r\n if (vm.item.SendOnTuesday) {\r\n vm.item.SendOnDays.push(2)\r\n }\r\n if (vm.item.SendOnWednesday) {\r\n vm.item.SendOnDays.push(3)\r\n }\r\n if (vm.item.SendOnThursday) {\r\n vm.item.SendOnDays.push(4)\r\n }\r\n if (vm.item.SendOnFriday) {\r\n vm.item.SendOnDays.push(5)\r\n }\r\n if (vm.item.SendOnSaturday) {\r\n vm.item.SendOnDays.push(6)\r\n }\r\n common.setAuditInfo(vm.item);\r\n // common.convertDateStringsToDates(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function initLookups() {\r\n dataservice.getItems(\"api/Departments/ActiveForUser\").then(function (data) {\r\n vm.departments = data.data;\r\n }, function (error) { });\r\n\r\n }\r\n\r\n function save() {\r\n \r\n vm.isSaving = true;\r\n\r\n if (vm.deletedOptions.length > 0) {\r\n dataservice.saveItem('api/LogTypes/DeleteQuestionItems', vm.deletedOptions).then(function (saveResult) {\r\n }, function (error) { });\r\n }\r\n\r\n if (vm.deletedQuestions.length > 0) {\r\n dataservice.saveItem('api/LogTypes/DeleteQuestions', vm.deletedQuestions).then(function (saveResult) {\r\n }, function (error) { });\r\n }\r\n \r\n vm.item.SendOnSunday = false;\r\n vm.item.SendOnMonday = false;\r\n vm.item.SendOnTuesday = false;\r\n vm.item.SendOnWednesday = false;\r\n vm.item.SendOnThursday = false;\r\n vm.item.SendOnFriday = false;\r\n vm.item.SendOnSaturday = false;\r\n\r\n if (!vm.item.SendOnNewEntry == 1) {\r\n vm.item.AllowContinueLater = 0;\r\n }\r\n\r\n for (var i = 0; i < vm.item.SendOnDays; i++) {\r\n switch(vm.item.SendOnDays[i]) {\r\n case 0:\r\n vm.item.SendOnSunday = true;\r\n break;\r\n case 1:\r\n vm.item.SendOnMonday = true;\r\n break;\r\n case 2:\r\n vm.item.SendOnTuesday = true;\r\n break;\r\n case 3:\r\n vm.item.SendOnWednesday = true;\r\n break;\r\n case 4:\r\n vm.item.SendOnThursday = true;\r\n break;\r\n case 5:\r\n vm.item.SendOnFriday = true;\r\n break;\r\n case 6:\r\n vm.item.SendOnSaturday = true;\r\n break;\r\n }\r\n }\r\n\r\n dataservice.saveItem('api/LogTypes', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n \r\n }\r\n\r\n function isRequiredAndNotActivated(question) {\r\n return !question.Activated && question.Required == true;\r\n }\r\n\r\n function deleteQuestion(question) {\r\n if (question.HasBeenAnswered) {\r\n var deleteMsg = \"This question has been answered. Deleting it will also delete all responses to the question. Are you sure you want to delete this question?\";\r\n\r\n return bsDialog.deleteDialog('Log Type', deleteMsg, \"Yes\", \"No\").then(function () {\r\n vm.deletedQuestions.push(question);\r\n vm.item.Questions.splice(vm.item.Questions.indexOf(question), 1);\r\n }, function () { });\r\n\r\n }\r\n else {\r\n if (question.ID > 0) {\r\n vm.deletedQuestions.push(question);\r\n }\r\n vm.item.Questions.splice(vm.item.Questions.indexOf(question), 1);\r\n }\r\n \r\n }\r\n\r\n function deleteOpt(question, opt) {\r\n if (opt.ID > 0) {\r\n\r\n if (question.HasBeenAnswered) {\r\n var deleteMsg = \"This question has been answered. Deleting this option will also delete all responses to the question that answered with this option. Are you sure you want to delete this option?\";\r\n\r\n return bsDialog.deleteDialog('Log Type', deleteMsg, \"Yes\", \"No\").then(function () {\r\n vm.deletedOptions.push(opt);\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }, function () { });\r\n }\r\n else {\r\n vm.deletedOptions.push(opt);\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }\r\n }\r\n else {\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }\r\n\r\n }\r\n\r\n function showMove(dir, question, opt) {\r\n if (dir == -1) {\r\n if (question.Items.indexOf(opt) == 0) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n else {\r\n if (question.Items.indexOf(opt) == (question.Items.length - 1)) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n\r\n function moveOpt(dir, question, opt) {\r\n var index = question.Items.indexOf(opt);\r\n var newIndex = index + dir;\r\n\r\n var removedElement;\r\n if (newIndex > -1 && newIndex < question.Items.length) {\r\n removedElement = question.Items.splice(index, 1)[0];\r\n }\r\n\r\n question.Items.splice(newIndex, 0, removedElement);\r\n }\r\n\r\n function questionClick(question) {\r\n for (var i = 0; i < vm.item.Questions.length; i++) {\r\n vm.item.Questions[i].Activated = false;\r\n }\r\n question.Activated = true;\r\n }\r\n\r\n function answerTypeText(question) {\r\n switch (question.AnswerType) {\r\n case 1:\r\n return \"Short Answer\";\r\n case 2:\r\n return \"Paragraph\";\r\n case 3:\r\n return \"Multiple Choice\";\r\n case 4:\r\n return \"Checkboxes\";\r\n case 5:\r\n return \"Dropdown\";\r\n case 6:\r\n return \"Date\";\r\n case 7:\r\n return \"Time\";\r\n case 8:\r\n return \"Signature\";\r\n }\r\n }\r\n\r\n function addQuestion() {\r\n for (var i = 0; i < vm.item.Questions.length; i++) {\r\n vm.item.Questions[i].Activated = false;\r\n }\r\n var question = {};\r\n\r\n question.Question = \"\";\r\n question.AnswerType = 1;\r\n question.AnswerTypeText = \"Short Answer\";\r\n question.Items = [];\r\n question.Active = true;\r\n question.Activated = true;\r\n question.Sequence = vm.item.Questions.length;;\r\n question.Required = false;\r\n vm.item.Questions.push(question);\r\n }\r\n\r\n function addOption(question) {\r\n var i = question.Items.length + 1;\r\n var opt = { Description: \"Option \" + i, Active: true };\r\n question.Items.push(opt)\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.logTypes')\r\n .controller('LogTypesGroupingsListController', LogTypesGroupingsListController);\r\n\r\n LogTypesGroupingsListController.$inject = ['common', 'dataservice', 'bootstrap.dialog', 'config'];\r\n /* @ngInject */\r\n function LogTypesGroupingsListController(common, dataservice, bsDialog, config) {\r\n var vm = this;\r\n\r\n vm.title = 'Log Types';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.counts = [];\r\n vm.refresh = refresh;\r\n vm.showItemDetails = showItemDetails;\r\n vm.entriesForLogType = entriesForLogType\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getCounts()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function entriesForLogType(logTypeId) {\r\n for (var i = 0; i < vm.counts.length; i++) {\r\n if (vm.counts[i].Name == logTypeId) {\r\n return vm.counts[i].ActiveCount;\r\n }\r\n }\r\n }\r\n\r\n function getCounts() {\r\n return dataservice.getItems('api/LogTypes/CountsOfEntries/-1').then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/LogTypes').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function showItemDetails(i) {\r\n return bsDialog.htmlBodyDialog(i.Title, i.Description);\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.logTypes')\r\n .controller('LogTypesListController', LogTypesListController);\r\n\r\n LogTypesListController.$inject = ['$state', 'common', 'dataservice', 'bootstrap.dialog', 'config'];\r\n /* @ngInject */\r\n function LogTypesListController($state, common, dataservice, bsDialog, config) {\r\n var vm = this;\r\n\r\n vm.title = 'Log Types';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.counts = [];\r\n vm.refresh = refresh;\r\n vm.showItemDetails = showItemDetails;\r\n vm.entriesForLogType = entriesForLogType;\r\n vm.copy = copy;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getCounts()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function entriesForLogType(logTypeId) {\r\n for (var i = 0; i < vm.counts.length; i++) {\r\n if (vm.counts[i].Name == logTypeId) {\r\n return vm.counts[i].ActiveCount;\r\n }\r\n }\r\n }\r\n\r\n function getCounts() {\r\n return dataservice.getItems('api/LogTypes/CountsOfEntries/-1').then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/LogTypes').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function showItemDetails(i) {\r\n return bsDialog.htmlBodyDialog(i.Title, i.Description);\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n\r\n function copy(id) {\r\n var dto = {\r\n data: id\r\n };\r\n return dataservice.saveItem('api/LogTypes/Copy', dto).then(function (response) {\r\n var newId = response.data.Message;\r\n $state.transitionTo('logtypes.details', { id: newId });\r\n\r\n\r\n }, function (error) { });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.lostAndFound')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'lostandfound',\r\n config: {\r\n abstract: true,\r\n url: '/lostandfound',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n },\r\n },\r\n {\r\n state: 'lostandfound.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/lostAndFound/list.html?v=' + opsIncludeVersion,\r\n controller: 'LostAndFoundListController',\r\n controllerAs: 'vm',\r\n title: 'Lost and Found',\r\n \r\n }\r\n },\r\n {\r\n state: 'lostandfound.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/lostAndFound/details.html?v=' + opsIncludeVersion,\r\n controller: 'LostAndFoundDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Item Details',\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.lostAndFound')\r\n .controller('LostAndFoundDetailsController', LostAndFoundDetailsController);\r\n\r\n LostAndFoundDetailsController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function LostAndFoundDetailsController($state, $stateParams, $window, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n vm.cancel = cancel;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n\r\n vm.openDatePicker = openDatePicker;\r\n vm.dateFoundOpen = false;\r\n \r\n vm.datePickerOptions = {\r\n showWeeks: false,\r\n ngModelOptions: {\r\n allowInvalid: false\r\n }\r\n };\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItem()];\r\n \r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"lostandfound.list\");\r\n }\r\n\r\n function openDatePicker($event) {\r\n vm.dateFoundOpen = true;\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.Id = '';\r\n var d = common.getMainState(\"mainDate\");\r\n var now = moment().toDate();\r\n vm.item.DateFoundUtc = d;\r\n vm.item.TimeFoundDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), now.getHours(), 0, 0, 0);\r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/LostAndFound/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n common.setAuditInfo(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n function save() {\r\n if (vm.item.Id == '') {\r\n vm.isSaving = true;\r\n var elmId = \"photo\";\r\n var imgInput = document.getElementById(elmId);\r\n var img = imgInput.files[0];\r\n\r\n if (!img) {\r\n common.logger.error(\"Please choose a file to continue\");\r\n return;\r\n }\r\n\r\n var dto = {\r\n \"AltText\": vm.item.AltText,\r\n \"Description\": vm.item.Description,\r\n \"PlaceFound\": vm.item.PlaceFound,\r\n \"DateFound\": moment(common.buildDateTime(vm.item.DateFoundUtc, vm.item.TimeFoundDisplay)).format(),\r\n \"StorageLocation\": vm.item.StorageLocation,\r\n }\r\n \r\n\r\n dataservice.postFile('api/LostAndFound/PostFile', img, dto).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n else {\r\n \r\n var dto = {\r\n \"Id\": vm.item.Id,\r\n \"AltText\": vm.item.AltText,\r\n \"LongDescription\": vm.item.LongDescription\r\n }\r\n\r\n dataservice.saveItem('api/PromotionalImages/Update', dto).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n \r\n }\r\n\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.lostAndFound')\r\n .controller('LostAndFoundListController', LostAndFoundListController);\r\n\r\n LostAndFoundListController.$inject = ['$scope', 'common', 'dataservice', 'config', 'carousel.dialog'];\r\n /* @ngInject */\r\n function LostAndFoundListController($scope, common, dataservice, config, carouselDialog) {\r\n var vm = this;\r\n vm.title = \"Lost and Found\"\r\n vm.filteredItems = [];\r\n vm.items = [];\r\n vm.refresh = refresh;\r\n vm.showImage = showImage;\r\n vm.isLicenseValid = false;\r\n vm.isLoading = true;\r\n vm.claimedDto = {};\r\n vm.openClaimId = '';\r\n vm.updateClaim = updateClaim;\r\n vm.closeClaim = closeClaim;\r\n vm.updateClaim = updateClaim;\r\n vm.openClaim = openClaim;\r\n vm.filter = filter;\r\n vm.itemsFilter = itemsFilter;\r\n vm.searchText = '';\r\n vm.displayedItems = [];\r\n vm.clearFilter = clearFilter;\r\n vm.claimedButtonText = \"Show Claimed\";\r\n vm.showClaimed = false;\r\n vm.toggleClaimed = toggleClaimed;\r\n\r\n var applyFilter = function () { }\r\n \r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function filter($event) {\r\n if ($event.keyCode === config.keyCodes.esc) {\r\n vm.searchText = ''\r\n applyFilter(true);\r\n }\r\n else {\r\n applyFilter();\r\n }\r\n }\r\n\r\n function toggleClaimed() {\r\n if (vm.showClaimed) {\r\n vm.showClaimed = false;\r\n vm.claimedButtonText = \"Show Claimed\";\r\n }\r\n else {\r\n vm.showClaimed = true;\r\n vm.claimedButtonText = \"Show Unclaimed\";\r\n }\r\n\r\n getItems();\r\n\r\n }\r\n\r\n function clearFilter() {\r\n vm.searchText = '';\r\n applyFilter(true);\r\n }\r\n\r\n $scope.$watch('vm.filteredItems', function (val) {\r\n vm.displayedItems = _chunk(val, 4);\r\n }, true); \r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = true;\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/LostAndFound?showClaimed=' + vm.showClaimed).then(function (response) {\r\n var data = response.data;\r\n vm.items = data;\r\n applyFilter = common.createSearchThrottle(vm, 'items');\r\n applyFilter(true);\r\n vm.displayedItems = _chunk(vm.filteredItems, 4);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function updateClaim() {\r\n if (vm.claimedDto.claimedByName) {\r\n dataservice.saveItem('api/LostAndFound/UpdateClaim', vm.claimedDto).then(function (saveResult) {\r\n \r\n for (var i = 0; i < vm.items.length; i++) {\r\n if (vm.items[i].UId == vm.claimedDto.UId) {\r\n vm.items.splice(i, 1);\r\n applyFilter(true);\r\n break;\r\n }\r\n }\r\n vm.claimedDto = {};\r\n }).catch(function (error) { });\r\n\r\n vm.openClaimId = '';\r\n }\r\n }\r\n\r\n function closeClaim() {\r\n vm.claimedDto = {};\r\n vm.openClaimId = '';\r\n }\r\n\r\n function openClaim(uid) {\r\n vm.claimedDto = {};\r\n vm.claimedDto.UId = uid;\r\n vm.openClaimId = uid;\r\n }\r\n\r\n\r\n function _chunk(arr, size) {\r\n var newArr = [];\r\n for (var i = 0; i < arr.length; i += size) {\r\n newArr.push(arr.slice(i, i + size));\r\n }\r\n return newArr;\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n\r\n function showImage(item) {\r\n return carouselDialog.display(item);\r\n }\r\n\r\n function itemsFilter(item) {\r\n var textContains = common.textContains;\r\n var searchText = vm.searchText;\r\n var isMatch = searchText\r\n ? (\r\n textContains(item.FileName, searchText)\r\n || textContains(item.AltText, searchText)\r\n || textContains(item.Description, searchText)\r\n || textContains(item.StorageLocation, searchText)\r\n || textContains(item.PlaceFound, searchText)\r\n ) : true;\r\n return isMatch;\r\n }\r\n }\r\n})();\r\n","(function () {\r\n\t'use strict';\r\n\r\n\tangular\r\n\t\t.module('app.notes')\r\n\t\t.factory('notesDialog', notesDialog);\r\n\r\n\tnotesDialog.$inject = ['$uibModal', '$templateCache', 'opsIncludeVersion'];\r\n\r\n\t/* @ngInject */\r\n\tfunction notesDialog($modal, $templateCache, opsIncludeVersion) {\r\n\t\tvar service = {\r\n\t\t\tshow: show\r\n\t\t};\r\n\r\n\t\treturn service;\r\n\r\n\t\tfunction show(title, includeTemplate, scopeItem) {\r\n\t\t\tvar modalOptions = {\r\n\t\t\t\tariaLabelledBy: \"labelby\",\r\n\t\t\t\ttemplateUrl: \"app/dialogs/_modalTemplateDialog.html?v=\" + opsIncludeVersion,\r\n\t\t\t\tcontroller: ModalInstance,\r\n\t\t\t\tcontrollerAs: 'vm',\r\n\t\t\t\tkeyboard: true,\r\n\t\t\t\tresolve: {\r\n\t\t\t\t\toptions: function () {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttitle: title,\r\n\t\t\t\t\t\t\titem: scopeItem,\r\n\t\t\t\t\t\t\tincludeTemplate: includeTemplate,\r\n\t\t\t\t\t\t\tokText: \"Close\"\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\treturn $modal.open(modalOptions).result;\r\n\t\t}\r\n\t}\r\n\r\n\tModalInstance.$inject = ['$uibModalInstance', 'options', 'dataservice', 'common', 'config', 'attachmentService', '$timeout'];\r\n\r\n\t/* @ngInject */\r\n\tfunction ModalInstance($modalInstance, options, dataservice, common, config, attachmentService, $timeout) {\r\n\r\n\t\tvar vm = this;\r\n\t\tvm.notesForm = {}\r\n\t\tvm.item = options.item || {};\r\n\t\tvm.isSaving = false;\r\n\t\tvm.title = options.title || 'Title';\r\n\t\tvm.okText = options.okText || 'OK';\r\n\t\tvm.cancelText = options.cancelText || 'Cancel';\r\n\t\tvm.includeTemplate = options.includeTemplate;\r\n\t\tvm.updateNote = updateNote;\r\n\t\tvm.newNote = newNote;\r\n\t\tvm.deleteNote = deleteNote;\r\n\t\tvm.editNote = editNote;\r\n\t\tvm.cancelEdit = cancelEdit;\r\n\t\tvm.editingNoteId = -1;\r\n\t\tvm.deletingNoteId = -1;\r\n\t\tvm.deletingAttachmentId = -1;\r\n\t\tvm.deleteAttachment = deleteAttachment;\r\n\t\tvm.canEdit = canEdit;\r\n\t\tvm.canDelete = canDelete;\r\n\t\tvm.opsIncludeVersion = common.opsIncludeVersion;\r\n\r\n\t\tvm.ok = function () {\r\n\t\t\tif (vm.item.NewNote && vm.item.NewNote.trim() !== \"\") {\r\n\r\n\t\t\t\tnewNote();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar imgInput = document.getElementById(\"photo\");\r\n\t\t\t\tvar img = imgInput.files[0];\r\n\r\n\t\t\t\tif (img) {\r\n\t\t\t\t\tcommon.logger.error(\"You must enter a note with your attachment\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$modalInstance.close('ok');\r\n\t\t};\r\n\t\tvm.cancel = function () {\r\n\t\t\t$modalInstance.dismiss('cancel');\r\n\t\t};\r\n\r\n\t\tfunction canEdit(n) {\r\n\t\t\treturn n.CreatedById == common.userService.userId();\r\n\t\t}\r\n\r\n\t\tfunction canDelete(n) {\r\n\t\t\treturn canEdit(n) || common.userService.userType() > 0;\r\n\t\t}\r\n\r\n\t\tfunction cancelEdit(n) {\r\n\t\t\tvm.editingNoteId = -1;\r\n\t\t\tn.Notes = vm.originalNote.Notes;\r\n\t\t}\r\n\r\n\t\tfunction editNote(n) {\r\n\t\t\tvm.editingNoteId = n.ID;\r\n\t\t\tvm.originalNote = angular.copy(n);\r\n\t\t}\r\n\r\n\t\tfunction updateNote(item) {\r\n\t\t\tvar noteDto = {};\r\n\t\t\tnoteDto.ID = item.ID;\r\n\t\t\tnoteDto.BookingId = vm.item.BookingId;\r\n\t\t\tnoteDto.TaskId = vm.item.TaskId;\r\n\t\t\tnoteDto.Notes = item.Notes;\r\n\r\n\t\t\tvar parentType = noteDto.BookingId > 0 ? \"BookingNote\" : \"TaskNote\";\r\n\t\t\tdataservice.saveItem('api/DailySetup/UpdateNote', noteDto).then(function (saveResult) {\r\n\t\t\t\tvm.isSaving = false;\r\n\t\t\t\tvm.editingNoteId = -1;\r\n\t\t\t}, function (error) { });\r\n\t\t}\r\n\r\n\t\tfunction deleteAttachment(id, n) {\r\n\t\t\tvm.deletingAttachmentId = -1;\r\n\t\t\tvar atts = [];\r\n\t\t\tatts.push(id);\r\n\t\t\tattachmentService.remove(atts);\r\n\r\n\t\t\t//n.AttachmentId = 0;\r\n\t\t\tn.FileName = \"\";\r\n\t\t\tn.Base64Data = \"\";\r\n\t\t\tn.StoredFile = null;\r\n\r\n\t\t}\r\n\r\n\t\tfunction deleteNote(item) {\r\n\r\n\t\t\tvar id = item.ID;\r\n\t\t\tvar routePart = vm.item.BookingId > 0 ? \"DeleteBookingNote\" : \"DeleteTaskNote\";\r\n\r\n\t\t\tdataservice.deleteItem('api/DailySetup/' + routePart + '/' + id).then(function (saveResult) {\r\n\t\t\t\tvm.isSaving = false;\r\n\t\t\t\tvm.deletingNoteId = -1;\r\n\t\t\t\t$.each(vm.item.Notes, function (index, result) {\r\n\t\t\t\t\tif (result) {\r\n\t\t\t\t\t\tif (result[\"ID\"] == id) {\r\n\t\t\t\t\t\t\tvm.item.Notes.splice(index, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}, function (error) { });\r\n\t\t}\r\n\r\n\t\tfunction newNote() {\r\n\t\t\tif (!(vm.item.NewNote) || vm.item.NewNote.trim() === \"\") {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvm.isSaving = true;\r\n\t\t\tvar noteDto = {};\r\n\t\t\tnoteDto.BookingId = vm.item.BookingId;\r\n\t\t\tnoteDto.TaskId = vm.item.TaskId;\r\n\t\t\tnoteDto.Notes = vm.item.NewNote;\r\n\t\t\tnoteDto.DisplayedOn = moment(common.getMainState(\"mainDate\")).format(\"YYYYMMDD\");\r\n\r\n\t\t\tvar parentType = noteDto.BookingId > 0 ? \"BookingNote\" : \"TaskNote\";\r\n\r\n\t\t\tdataservice.saveItem('api/DailySetup/NewNote', noteDto).then(function (saveResult) {\r\n\t\t\t\tvm.isSaving = false;\r\n\t\t\t\tvar savedNote = saveResult.data;\r\n\t\t\t\tattachmentService.upload(parentType, savedNote.ID, savedNote);\r\n\r\n\t\t\t\t$timeout(function () {\r\n\t\t\t\t\tvar id = savedNote.ID;\r\n\r\n\t\t\t\t\t$.each(vm.item.Notes, function (index, result) {\r\n\t\t\t\t\t\tif (result) {\r\n\r\n\t\t\t\t\t\t\tif (result[\"ID\"] == id) {\r\n\t\t\t\t\t\t\t\tvm.item.Notes[index].FileName = savedNote.FileName;\r\n\t\t\t\t\t\t\t\tvm.item.Notes[index].Base64Data = savedNote.Base64Data;\r\n\t\t\t\t\t\t\t\tvm.item.Notes[index].StoredFile = savedNote.Base64Data\r\n\t\t\t\t\t\t\t\tvm.item.Notes[index].HasAttachment = true;;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}, 1000);\r\n\r\n\t\t\t\tvm.item.NewNote = \"\";\r\n /*\r\n\t\t\t\tvm.item.Notes.push(savedNote)\r\n\t\t\t\tvm.item.Notes.sort(function (a, b) {\r\n\t\t\t\t\ta = new Date(a.DateAddedUtc);\r\n\t\t\t\t\tb = new Date(b.DateAddedUtc);\r\n\t\t\t\t\treturn a > b ? -1 : a < b ? 1 : 0\r\n\t\t\t\t});*/\r\n\t\t\t}).catch(function (error) {\r\n\t\t\t\t$scope.vm = false;\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t}\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.notes')\r\n .factory('notes', notes);\r\n\r\n notes.$inject = ['notesDialog', 'opsIncludeVersion', 'dataservice', 'common'];\r\n\r\n /* @ngInject */\r\n function notes(notesDialog, opsIncludeVersion, dataservice, common) {\r\n var service = {\r\n show: show,\r\n notesShowing: null, \r\n notesCloseCallback: null\r\n };\r\n\r\n return service;\r\n\r\n function show(i, $event) {\r\n\r\n if (i.TaskId > 0) {\r\n var tAsM = moment(common.getMainState(\"mainDate\"));\r\n var d = tAsM.format(\"YYYY-MM-DD\");\r\n\r\n var thatI = i;\r\n\r\n dataservice.getItem(\"api/DailySetup/GetNotesForTask/\" + i.TaskId + \"/\" + d).then(function (res) {\r\n thatI.Notes = res.data;\r\n \r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n if (service.notesShowing) {\r\n service.notesShowing();\r\n }\r\n var title = thatI.BookingId > 0 ? thatI.EventName : thatI.TaskDescription;\r\n return notesDialog.show(title, \"app/notes/_notes.html?v=\" + opsIncludeVersion, thatI).then(function () {\r\n if (service.notesCloseCallback) {\r\n service.notesCloseCallback();\r\n }\r\n }, function () { });\r\n\r\n }).catch(function (resError) {\r\n console.log(resError);\r\n });\r\n \r\n \r\n }\r\n\r\n\r\n \r\n }\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.notes')\r\n .directive('notesCell', notesCell);\r\n\r\n notesCell.$inject = [ 'opsIncludeVersion']\r\n /* @ngInject */\r\n function notesCell(opsIncludeVersion) {\r\n \r\n var directive = {\r\n restrict: 'A',\r\n link: link,\r\n scope: {\r\n 'item': '=',\r\n 'notes': '='\r\n \r\n },\r\n templateUrl: 'app/notes/_notesCell.html?v=' + opsIncludeVersion\r\n };\r\n\r\n return directive;\r\n\r\n\r\n function link(scope, element, attrs) {\r\n \r\n }\r\n }\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.notes')\r\n .factory('notesDataService', notesDataService);\r\n\r\n notesDataService.$inject = ['dataservice', 'common', 'attachmentService', '$timeout'];\r\n /* @ngInject */\r\n function notesDataService(dataservice, common, attachmentService, $timeout) {\r\n var $q = common.$q;\r\n var _originalNote;\r\n var service = {\r\n updateNote: updateNote,\r\n newNote: newNote,\r\n deleteNote: deleteNote,\r\n acknowledgeNote: acknowledgeNote,\r\n editNote: editNote,\r\n cancelEdit: cancelEdit,\r\n deleteAttachment: deleteAttachment,\r\n canEdit: canEdit,\r\n canDelete: canDelete\r\n };\r\n\r\n return service;\r\n\r\n function canEdit(n) {\r\n return n.CreatedById == common.userService.userId();\r\n }\r\n\r\n function canDelete(n) {\r\n return canEdit(n) || common.userService.userType() > 0;\r\n }\r\n\r\n function editNote(n) {\r\n _originalNote = angular.copy(n);\r\n }\r\n\r\n function cancelEdit(n) {\r\n n.Notes = _originalNote.Notes;\r\n }\r\n\r\n function updateNote(note, item) {\r\n var noteDto = {};\r\n noteDto.ID = note.ID;\r\n noteDto.BookingId = item.BookingId;\r\n noteDto.TaskId = item.TaskId;\r\n noteDto.Notes = note.Notes;\r\n\r\n dataservice.saveItem('api/DailySetup/UpdateNote', noteDto).then(function (saveResult) {\r\n }, function (error) { });\r\n }\r\n\r\n function deleteAttachment(id, n) {\r\n var atts = [];\r\n atts.push(id);\r\n attachmentService.remove(atts);\r\n\r\n n.FileName = \"\";\r\n n.Base64Data = \"\";\r\n n.StoredFile = null;\r\n }\r\n\r\n function deleteNote(note, item) {\r\n\r\n var id = note.ID;\r\n var routePart = item.TaskId > 0 ? \"DeleteTaskNote\" : \"DeleteBookingNote\";\r\n \r\n\r\n dataservice.deleteItem('api/DailySetup/' + routePart + '/' + id).then(function (saveResult) {\r\n $.each(item.Notes, function (index, result) {\r\n if (result) {\r\n if (result[\"ID\"] == id) {\r\n item.Notes.splice(index, 1);\r\n }\r\n }\r\n })\r\n }, function (error) { });\r\n }\r\n\r\n function acknowledgeNote(note, item) {\r\n dataservice.saveItem('api/DailySetup/AcknowledgeNote/' + note.ID).then(function (saveResult) {\r\n }, function (error) { });\r\n }\r\n\r\n function newNotePromise(note, item) {\r\n var p = new Promise(function (resolve, reject) {\r\n if (!note || !note.Notes || note.Notes.trim() === \"\") {\r\n resolve(item);\r\n }\r\n\r\n });\r\n return p;\r\n }\r\n\r\n function newNote(note, item) {\r\n if (!(note.Notes) || note.Notes.trim() === \"\") {\r\n return null;\r\n }\r\n \r\n var noteDto = {};\r\n noteDto.BookingId = item.BookingId;\r\n noteDto.TaskId = item.TaskId;\r\n noteDto.Notes = note.Notes;\r\n noteDto.DepartmentId = note.DepartmentId >= 0 ? note.DepartmentId : null;\r\n noteDto.DisplayedOn = moment(common.getMainState(\"mainDate\")).format(\"YYYYMMDD\");\r\n\r\n var parentType = noteDto.TaskId > 0 ? \"TaskNote\" : \"BookingNote\";\r\n\r\n return dataservice.saveItem('api/DailySetup/NewNote', noteDto).then(function (saveResult) {\r\n var savedNote = saveResult.data;\r\n attachmentService.upload(parentType, savedNote.ID, savedNote).then(function (uploadResult) {\r\n var id = savedNote.ID;\r\n\r\n $.each(item.Notes, function (index, result) {\r\n if (result) {\r\n\r\n if (result[\"ID\"] == id) {\r\n item.Notes[index].FileName = savedNote.FileName;\r\n item.Notes[index].Base64Data = savedNote.Base64Data;\r\n item.Notes[index].StoredFile = savedNote.StoredFile;\r\n item.Notes[index].HasAttachment = true;\r\n item.Notes[index].AttachmentId = savedNote.AttachmentId;\r\n }\r\n }\r\n });\r\n \r\n });\r\n\r\n return savedNote;\r\n \r\n }).catch(function (error) {\r\n });\r\n }\r\n\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.notesReportSchedule')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'notesreportschedule',\r\n config: {\r\n url: '/notesreportschedule',\r\n templateUrl: 'app/notesreportschedule/details.html?v=' + opsIncludeVersion,\r\n controller: 'NotesReportScheduleController',\r\n controllerAs: 'vm',\r\n title: 'Notes Report Schedule'\r\n }\r\n }\r\n\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.notesReportSchedule')\r\n .controller('NotesReportScheduleController', NotesReportScheduleController);\r\n\r\n NotesReportScheduleController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function NotesReportScheduleController($state, $stateParams, $window, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItem()];\r\n\r\n vm.sendAround = [];\r\n var h;\r\n for (var i = 0; i < 24; i++) {\r\n if (i === 0) {\r\n h = \"12\";\r\n }\r\n else {\r\n if (i > 12) {\r\n h = i % 12;\r\n }\r\n else {\r\n h = i;\r\n }\r\n }\r\n\r\n var desc = (h + \":00\");\r\n desc += Number(i) < 12 ? \" AM\" : \" PM\";\r\n\r\n vm.sendAround.push({ \"ID\": i, \"Description\": desc })\r\n }\r\n \r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"admin\");\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Notes Report Schedule')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/NotesReport/DeleteSchedule/\" + vm.item.Id).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n if (vm.item) {\r\n return vm.item.Id <= 0;\r\n }\r\n return true;\r\n }\r\n\r\n function getItem() {\r\n return dataservice.getItem(\"api/NotesReport/GetSchedule\")\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n\r\n dataservice.saveItem('api/NotesReport/SaveSchedule', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n \r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.opsConfig')\r\n .controller('OpsConfigController', OpsConfigController);\r\n\r\n OpsConfigController.$inject = ['$state', 'common', 'dataservice'];\r\n /* @ngInject */\r\n function OpsConfigController($state, common, dataservice) {\r\n var vm = this;\r\n vm.title = 'Ops Config';\r\n vm.settings = [];\r\n vm.save = save;\r\n vm.setIcon = setIcon;\r\n vm.bootStrapIcons = [\"asterisk\", \"plus\", \"euro\", \"minus\", \"cloud\", \"envelope\", \"pencil\", \"glass\", \"music\", \"search\", \"heart\", \"star\", \"star-empty\", \"user\", \"film\", \"th-large\", \"th\", \"th-list\", \"ok\", \"remove\", \"zoom-in\", \"zoom-out\", \"off\", \"signal\", \"cog\", \"trash\", \"home\", \"file\", \"time\", \"road\", \"download-alt\", \"download\", \"upload\", \"inbox\", \"play-circle\", \"repeat\", \"refresh\", \"list-alt\", \"lock\", \"flag\", \"headphones\", \"volume-off\", \"volume-down\", \"volume-up\", \"qrcode\", \"barcode\", \"tag\", \"tags\", \"book\", \"bookmark\", \"print\", \"camera\", \"font\", \"bold\", \"italic\", \"text-height\", \"text-width\", \"align-left\", \"align-center\", \"align-right\", \"align-justify\", \"list\", \"indent-left\", \"indent-right\", \"facetime-video\", \"picture\", \"map-marker\", \"adjust\", \"tint\", \"edit\", \"share\", \"check\", \"move\", \"step-backward\", \"fast-backward\", \"backward\", \"play\", \"pause\", \"stop\", \"forward\", \"fast-forward\", \"step-forward\", \"eject\", \"chevron-left\", \"chevron-right\", \"plus-sign\", \"minus-sign\", \"remove-sign\", \"ok-sign\", \"question-sign\", \"info-sign\", \"screenshot\", \"remove-circle\", \"ok-circle\", \"ban-circle\", \"arrow-left\", \"arrow-right\", \"arrow-up\", \"arrow-down\", \"share-alt\", \"resize-full\", \"resize-small\", \"exclamation-sign\", \"gift\", \"leaf\", \"fire\", \"eye-open\", \"eye-close\", \"warning-sign\", \"plane\", \"calendar\", \"random\", \"comment\", \"magnet\", \"chevron-up\", \"chevron-down\", \"retweet\", \"shopping-cart\", \"folder-close\", \"folder-open\", \"resize-vertical\", \"resize-horizontal\", \"hdd\", \"bullhorn\", \"bell\", \"certificate\", \"thumbs-up\", \"thumbs-down\", \"hand-right\", \"hand-left\", \"hand-up\", \"hand-down\", \"circle-arrow-right\", \"circle-arrow-left\", \"circle-arrow-up\", \"circle-arrow-down\", \"globe\", \"wrench\", \"tasks\", \"filter\", \"briefcase\", \"fullscreen\", \"dashboard\", \"paperclip\", \"heart-empty\", \"link\", \"phone\", \"pushpin\", \"usd\", \"gbp\", \"sort\", \"sort-by-alphabet\", \"sort-by-alphabet-alt\", \"sort-by-order\", \"sort-by-order-alt\", \"sort-by-attributes\", \"sort-by-attributes-alt\", \"unchecked\", \"expand\", \"collapse-down\", \"collapse-up\", \"log-in\", \"flash\", \"log-out\", \"new-window\", \"record\", \"save\", \"open\", \"saved\", \"import\", \"export\", \"send\", \"floppy-disk\", \"floppy-saved\", \"floppy-remove\", \"floppy-save\", \"floppy-open\", \"credit-card\", \"transfer\", \"cutlery\", \"header\", \"compressed\", \"earphone\", \"phone-alt\", \"tower\", \"stats\", \"sd-video\", \"hd-video\", \"subtitles\", \"sound-stereo\", \"sound-dolby\", \"sound-5-1\", \"sound-6-1\", \"sound-7-1\", \"copyright-mark\", \"registration-mark\", \"cloud-download\", \"cloud-upload\", \"tree-conifer\", \"tree-deciduous\"]\r\n vm.fontAwesomeIcons = [\"glass\", \"music\", \"search\", \"envelope-o\", \"heart\", \"star\", \"star-o\", \"user\", \"film\", \"th-large\", \"th\", \"th-list\", \"check\", \"times\", \"search-plus\", \"search-minus\", \"power-off\", \"signal\", \"gear\", \"cog\", \"trash-o\", \"home\", \"file-o\", \"clock-o\", \"road\", \"download\", \"arrow-circle-o-down\", \"arrow-circle-o-up\", \"inbox\", \"play-circle-o\", \"rotate-right\", \"repeat\", \"refresh\", \"list-alt\", \"lock\", \"flag\", \"headphones\", \"volume-off\", \"volume-down\", \"volume-up\", \"qrcode\", \"barcode\", \"tag\", \"tags\", \"book\", \"bookmark\", \"print\", \"camera\", \"font\", \"bold\", \"italic\", \"text-height\", \"text-width\", \"align-left\", \"align-center\", \"align-right\", \"align-justify\", \"list\", \"dedent\", \"outdent\", \"indent\", \"video-camera\", \"picture-o\", \"pencil\", \"map-marker\", \"adjust\", \"tint\", \"edit\", \"pencil-square-o\", \"share-square-o\", \"check-square-o\", \"arrows\", \"step-backward\", \"fast-backward\", \"backward\", \"play\", \"pause\", \"stop\", \"forward\", \"fast-forward\", \"step-forward\", \"eject\", \"chevron-left\", \"chevron-right\", \"plus-circle\", \"minus-circle\", \"times-circle\", \"check-circle\", \"question-circle\", \"info-circle\", \"crosshairs\", \"times-circle-o\", \"check-circle-o\", \"ban\", \"arrow-left\", \"arrow-right\", \"arrow-up\", \"arrow-down\", \"mail-forward\", \"share\", \"expand\", \"compress\", \"plus\", \"minus\", \"asterisk\", \"exclamation-circle\", \"gift\", \"leaf\", \"fire\", \"eye\", \"eye-slash\", \"warning\", \"exclamation-triangle\", \"plane\", \"calendar\", \"random\", \"comment\", \"magnet\", \"chevron-up\", \"chevron-down\", \"retweet\", \"shopping-cart\", \"folder\", \"folder-open\", \"arrows-v\", \"arrows-h\", \"bar-chart-o\", \"twitter-square\", \"facebook-square\", \"camera-retro\", \"key\", \"gears\", \"cogs\", \"comments\", \"thumbs-o-up\", \"thumbs-o-down\", \"star-half\", \"heart-o\", \"sign-out\", \"linkedin-square\", \"thumb-tack\", \"external-link\", \"sign-in\", \"trophy\", \"github-square\", \"upload\", \"lemon-o\", \"phone\", \"square-o\", \"bookmark-o\", \"phone-square\", \"twitter\", \"facebook\", \"github\", \"unlock\", \"credit-card\", \"rss\", \"hdd-o\", \"bullhorn\", \"bell\", \"certificate\", \"hand-o-right\", \"hand-o-left\", \"hand-o-up\", \"hand-o-down\", \"arrow-circle-left\", \"arrow-circle-right\", \"arrow-circle-up\", \"arrow-circle-down\", \"globe\", \"wrench\", \"tasks\", \"filter\", \"briefcase\", \"arrows-alt\", \"group\", \"users\", \"chain\", \"link\", \"cloud\", \"flask\", \"cut\", \"scissors\", \"copy\", \"files-o\", \"paperclip\", \"save\", \"floppy-o\", \"square\", \"bars\", \"list-ul\", \"list-ol\", \"strikethrough\", \"underline\", \"table\", \"magic\", \"truck\", \"pinterest\", \"pinterest-square\", \"google-plus-square\", \"google-plus\", \"money\", \"caret-down\", \"caret-up\", \"caret-left\", \"caret-right\", \"columns\", \"unsorted\", \"sort\", \"sort-down\", \"sort-asc\", \"sort-up\", \"sort-desc\", \"envelope\", \"linkedin\", \"rotate-left\", \"undo\", \"legal\", \"gavel\", \"dashboard\", \"tachometer\", \"comment-o\", \"comments-o\", \"flash\", \"bolt\", \"sitemap\", \"umbrella\", \"paste\", \"clipboard\", \"lightbulb-o\", \"exchange\", \"cloud-download\", \"cloud-upload\", \"user-md\", \"stethoscope\", \"suitcase\", \"bell-o\", \"coffee\", \"cutlery\", \"file-text-o\", \"building-o\", \"hospital-o\", \"ambulance\", \"medkit\", \"fighter-jet\", \"beer\", \"h-square\", \"plus-square\", \"angle-double-left\", \"angle-double-right\", \"angle-double-up\", \"angle-double-down\", \"angle-left\", \"angle-right\", \"angle-up\", \"angle-down\", \"desktop\", \"laptop\", \"tablet\", \"mobile-phone\", \"mobile\", \"circle-o\", \"quote-left\", \"quote-right\", \"spinner\", \"circle\", \"mail-reply\", \"reply\", \"github-alt\", \"folder-o\", \"folder-open-o\", \"smile-o\", \"frown-o\", \"meh-o\", \"gamepad\", \"keyboard-o\", \"flag-o\", \"flag-checkered\", \"terminal\", \"code\", \"reply-all\", \"mail-reply-all\", \"star-half-empty\", \"star-half-full\", \"star-half-o\", \"location-arrow\", \"crop\", \"code-fork\", \"unlink\", \"chain-broken\", \"question\", \"info\", \"exclamation\", \"superscript\", \"subscript\", \"eraser\", \"puzzle-piece\", \"microphone\", \"microphone-slash\", \"shield\", \"calendar-o\", \"fire-extinguisher\", \"rocket\", \"maxcdn\", \"chevron-circle-left\", \"chevron-circle-right\", \"chevron-circle-up\", \"chevron-circle-down\", \"html5\", \"css3\", \"anchor\", \"unlock-alt\", \"bullseye\", \"ellipsis-h\", \"ellipsis-v\", \"rss-square\", \"play-circle\", \"ticket\", \"minus-square\", \"minus-square-o\", \"level-up\", \"level-down\", \"check-square\", \"pencil-square\", \"external-link-square\", \"share-square\", \"compass\", \"toggle-down\", \"caret-square-o-down\", \"toggle-up\", \"caret-square-o-up\", \"toggle-right\", \"caret-square-o-right\", \"euro\", \"eur\", \"gbp\", \"dollar\", \"usd\", \"rupee\", \"inr\", \"cny\", \"rmb\", \"yen\", \"jpy\", \"ruble\", \"rouble\", \"rub\", \"won\", \"krw\", \"bitcoin\", \"btc\", \"file\", \"file-text\", \"sort-alpha-asc\", \"sort-alpha-desc\", \"sort-amount-asc\", \"sort-amount-desc\", \"sort-numeric-asc\", \"sort-numeric-desc\", \"thumbs-up\", \"thumbs-down\", \"youtube-square\", \"youtube\", \"xing\", \"xing-square\", \"youtube-play\", \"dropbox\", \"stack-overflow\", \"instagram\", \"flickr\", \"adn\", \"bitbucket\", \"bitbucket-square\", \"tumblr\", \"tumblr-square\", \"long-arrow-down\", \"long-arrow-up\", \"long-arrow-left\", \"long-arrow-right\", \"apple\", \"windows\", \"android\", \"linux\", \"dribbble\", \"skype\", \"foursquare\", \"trello\", \"female\", \"male\", \"gittip\", \"sun-o\", \"moon-o\", \"archive\", \"bug\", \"vk\", \"weibo\", \"renren\", \"pagelines\", \"stack-exchange\", \"arrow-circle-o-right\", \"arrow-circle-o-left\", \"toggle-left\", \"caret-square-o-left\", \"dot-circle-o\", \"wheelchair\", \"vimeo-square\", \"turkish-lira\", \"try\", \"plus-square-o\"];\r\n vm.cancel = cancel;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getSettings()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.bootStrapIcons.sort();\r\n vm.fontAwesomeIcons.sort();\r\n }, function (error) { });\r\n }\r\n \r\n function getSettings() {\r\n return dataservice.getItem(\"api/OpsConfig/\")\r\n .then(function (response) {\r\n vm.settings = response.data;\r\n \r\n }, function (error) { });\r\n }\r\n \r\n function save() {\r\n return dataservice.saveItem(\"api/OpsConfig/Save\", vm.settings)\r\n .then(function (response) {\r\n $state.go('admin');\r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n $state.go('admin');\r\n }\r\n\r\n function setIcon(setting, iconClass, icon) {\r\n setting.SettingValue = iconClass + icon;\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.opsConfig')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'opsconfig',\r\n config: {\r\n url: '/opsconfig',\r\n templateUrl: 'app/opsconfig/opsconfig.html?v=' + opsIncludeVersion,\r\n controller: 'OpsConfigController',\r\n controllerAs: 'vm',\r\n title: 'Config',\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentGateways')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'paymentgateways',\r\n config: {\r\n abstract: true,\r\n url: '/paymentgateways',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'paymentgateways.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/paymentgateways/list.html?v=' + opsIncludeVersion,\r\n controller: 'PaymentGatewayListController',\r\n controllerAs: 'vm',\r\n title: 'Payment Gateways'\r\n }\r\n },\r\n {\r\n state: 'paymentgateways.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/paymentgateways/details.html?v=' + opsIncludeVersion,\r\n controller: 'PaymentGatewayDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Payment Gateway',\r\n settings: {}\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentGateways')\r\n .controller('PaymentGatewayDetailsController', PaymentGatewayDetailsController);\r\n\r\n PaymentGatewayDetailsController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function PaymentGatewayDetailsController($state, $stateParams, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.preventDelete = preventDelete;\r\n vm.providerChange = providerChange;\r\n vm.selectedProviderSettings = [];\r\n vm.paymentProviderSettings = [];\r\n vm.numberOfUses = 0;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItem(), getPaymentProviders(), getLicenseInfo(), getNumberOfUses()];\r\n return common.$q.all(promises).then(function (data) {\r\n providerChange(true);\r\n }, function (error) { });\r\n }\r\n\r\n function getNumberOfUses() {\r\n if ($stateParams.id !== '') {\r\n return dataservice.getItems('api/PaymentGateways/CountOfUses/' + $stateParams.id).then(function (response) {\r\n vm.numberOfUses = response.data.NumberOfUses;\r\n }, function (error) { });\r\n }\r\n\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n if (vm.licenseInfo.NumberOfPaymentTemplatesLicensed < vm.licenseInfo.NumberOfPaymentTemplatesInUse) {\r\n $state.go('404');\r\n }\r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"paymentgateways.list\");\r\n }\r\n\r\n function preventDelete() {\r\n if ($stateParams.id === '' || vm.numberOfUses > 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Payment Gateway')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/PaymentGateways/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function getPaymentProviders() {\r\n return dataservice.getItems('api/PaymentGateways/GetLookups').then(function (response) {\r\n \r\n vm.paymentProviders = response.data.PaymentProviders;\r\n vm.paymentProviderSettings = response.data.ProviderSettings;\r\n }, function (error) { });\r\n }\r\n\r\n function providerChange(isLoading) {\r\n if (vm.item.PaymentProviderUId != '') {\r\n vm.selectedProviderSettings = [];\r\n if (!isLoading) {\r\n vm.item.Settings = [];\r\n }\r\n\r\n for (var i = 0; i < vm.paymentProviderSettings.length; i++) {\r\n var onSetting = vm.paymentProviderSettings[i];\r\n if (onSetting.PaymentProviderUId == vm.item.PaymentProviderUId) {\r\n \r\n for (var j = 0; j < vm.item.Settings.length; j++) {\r\n if(vm.item.Settings[j].PaymentProviderSettingUId == onSetting.ID) {\r\n onSetting.value = vm.item.Settings[j].SettingValue;\r\n }\r\n }\r\n if (onSetting.FieldType == 1 && !onSetting.value) {\r\n onSetting.value = 0;\r\n }\r\n vm.selectedProviderSettings.push(onSetting);\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.Settings = [];\r\n common.setAuditInfo(vm.item);\r\n\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/PaymentGateways/\" + val)\r\n .then(function (response) {\r\n if (response) {\r\n vm.item = response.data;\r\n common.setAuditInfo(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n\r\n vm.item.Settings = [];\r\n for (var i = 0; i < vm.selectedProviderSettings.length; i++) {\r\n vm.item.Settings.push({ \"PaymentProviderSettingUId\": vm.selectedProviderSettings[i].ID, \"SettingValue\": vm.selectedProviderSettings[i].value });\r\n }\r\n dataservice.saveItem('api/PaymentGateways', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentGateways')\r\n .controller('PaymentGatewayListController', PaymentGatewayListController);\r\n\r\n PaymentGatewayListController.$inject = ['common', 'dataservice'];\r\n /* @ngInject */\r\n function PaymentGatewayListController(common, dataservice) {\r\n var vm = this;\r\n\r\n vm.title = 'Payment Gateways';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.isLoading = true;\r\n vm.isLicenseValid = false;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = vm.licenseInfo.NumberOfPaymentTemplatesLicensed >= vm.licenseInfo.NumberOfPaymentTemplatesInUse;\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n\r\n \r\n function getItems() {\r\n return dataservice.getItems('api/PaymentGateways').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentTemplates')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'paymenttemplates',\r\n config: {\r\n abstract: true,\r\n url: '/paymenttemplates',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n }\r\n }\r\n },\r\n {\r\n state: 'paymenttemplates.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/paymenttemplates/list.html?v=' + opsIncludeVersion,\r\n controller: 'PaymentTemplateListController',\r\n controllerAs: 'vm',\r\n title: 'Payment Templates',\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'paymenttemplates.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/paymenttemplates/details.html?v=' + opsIncludeVersion,\r\n controller: 'PaymentTemplatesDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Payment Gateway',\r\n settings: {},\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'paymenttemplates.pay',\r\n config: {\r\n url: '/pay/:id',\r\n templateUrl: 'app/paymenttemplates/pay.html?v=' + opsIncludeVersion,\r\n controller: 'PaymentTemplatePayController',\r\n controllerAs: 'vm',\r\n title: 'Make Payment'\r\n }\r\n },\r\n {\r\n state: 'paymenttemplates.receipt',\r\n config: {\r\n url: '/receipt/:id',\r\n templateUrl: 'app/paymenttemplates/receipt.html?v=' + opsIncludeVersion,\r\n controller: 'PaymentTemplateReceiptController',\r\n controllerAs: 'vm',\r\n title: 'Payment Receipt'\r\n }\r\n },\r\n {\r\n state: 'paymenttemplates.error',\r\n config: {\r\n url: '/error',\r\n templateUrl: 'app/paymenttemplates/error.html?v=' + opsIncludeVersion,\r\n title: 'Payment Error',\r\n controller: 'PaymentTemplateErrorController',\r\n controllerAs: 'vm'\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentTemplates')\r\n .controller('PaymentTemplatesDetailsController', PaymentTemplatesDetailsController);\r\n\r\n PaymentTemplatesDetailsController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function PaymentTemplatesDetailsController($state, $stateParams, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n \r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.isNew = isNew;\r\n vm.preventDelete = preventDelete;\r\n vm.isLoading = true;\r\n vm.isMazevo = common.userService.isMazevoApi();\r\n vm.isCollegeNet = common.userService.isCollegeNetApi();\r\n vm.isEms = common.userService.isEmsApiType();\r\n vm.showCustomNoteBox = common.userService.tenantId() == \"15\" || common.userService.tenantId() == \"1\";\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItem(), getLookups(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n if (vm.licenseInfo.NumberOfPaymentTemplatesLicensed < vm.licenseInfo.NumberOfPaymentTemplatesInUse) {\r\n $state.go('404');\r\n }\r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"paymenttemplates.list\");\r\n }\r\n\r\n function preventDelete() {\r\n if ($stateParams.id <= 0) {\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Payment Template')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/PaymentTemplates/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === '';\r\n }\r\n\r\n function getLookups() {\r\n return dataservice.getItems('api/PaymentTemplates/GetLookups').then(function (response) {\r\n vm.departments = response.data.Departments;\r\n vm.paymentGateways = response.data.PaymentGateways;\r\n vm.paymentTypes = response.data.PaymentTypes;\r\n vm.reminderTypes = response.data.ReminderTypes;\r\n vm.logos = response.data.Logos;\r\n }, function (error) { });\r\n }\r\n\r\n \r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.EnableDeposits = 0;\r\n vm.item.SendConfirmationEmail = 0;\r\n vm.item.IncludeCustomNoteBox = 0;\r\n vm.item.AllowCustomInvoiceAmount = 0;\r\n vm.item.ReservationIdBoxLabel = \"Reservation Id\";\r\n vm.item.CustomerBoxLabel = \"Group Name\";\r\n vm.item.InvoiceBoxLabel = \"Invoice Number\";\r\n \r\n vm.item.DefaultButton = 1;\r\n vm.item.PayInvoiceLabel = \"Pay an Invoice\";\r\n vm.item.PayDepositLabel = \"Make a Deposit for a Future Event\";\r\n\r\n common.setAuditInfo(vm.item);\r\n if (vm.isCollegeNet) {\r\n vm.item.EmsDepartmentId = 0;\r\n vm.item.EmsPaymentTypeId = 0;\r\n }\r\n\r\n return vm.item;\r\n }\r\n \r\n return dataservice.getItem(\"api/PaymentTemplates/\" + val)\r\n .then(function (response) {\r\n if (response) {\r\n vm.item = response.data;\r\n common.setAuditInfo(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n\r\n dataservice.saveItem('api/PaymentTemplates', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentTemplates')\r\n .controller('PaymentTemplateErrorController', PaymentTemplateErrorController);\r\n\r\n //PaymentTemplateErrorController.$inject = ['$stateParams', 'common', 'dataservice', '$rootScope'];\r\n /* @ngInject */\r\n function PaymentTemplateErrorController() {\r\n var vm = this;\r\n vm.title = 'Payment Error';\r\n vm.isLicenseValid = true;\r\n activate();\r\n\r\n function activate() {\r\n }\r\n\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentTemplates')\r\n .controller('PaymentTemplateListController', PaymentTemplateListController);\r\n\r\n PaymentTemplateListController.$inject = ['common', 'dataservice'];\r\n /* @ngInject */\r\n function PaymentTemplateListController(common, dataservice) {\r\n var vm = this;\r\n\r\n vm.title = 'Payment Templates';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.refresh = refresh;\r\n vm.isLicenseValid = false;\r\n vm.isLoading = true;\r\n vm.licenseInfo = {};\r\n vm.isCollegeNet = common.userService.isCollegeNetApi();\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = vm.licenseInfo.NumberOfPaymentTemplatesLicensed >= vm.licenseInfo.NumberOfPaymentTemplatesInUse;\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n \r\n function getItems() {\r\n return dataservice.getItems('api/PaymentTemplates').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentTemplates')\r\n .controller('PaymentTemplatePayController', PaymentTemplatePayController);\r\n\r\n PaymentTemplatePayController.$inject = ['$stateParams','$state', '$sce', 'common', 'dataservice', '$rootScope', '$uibModal'];\r\n /* @ngInject */\r\n function PaymentTemplatePayController($stateParams, $state, $sce, common, dataservice, $rootScope, $uibModal) {\r\n var vm = this;\r\n vm.title = 'Make Payment';\r\n vm.item = {};\r\n vm.isLicenseValid = true;\r\n vm.isLoading = true;\r\n vm.search = search;\r\n vm.hasSearched = false;\r\n vm.payInvoice = 1;\r\n vm.invoiceLabel = invoiceLabel;\r\n vm.searchDto = {};\r\n vm.paymentItems = [];\r\n vm.noSearchData = noSearchData;\r\n vm.doPayment = doPayment;\r\n vm.isSearching = false;\r\n vm.paymentModal = null;\r\n vm.clearResults = clearResults;\r\n vm.balanceDueLabel = \"Balance Due\";\r\n vm.showCustomAmount = false;\r\n vm.errorMsg = \"\";\r\n vm.trustUrl = trustUrl;\r\n vm.customAount = \"\";\r\n \r\n\r\n activate();\r\n\r\n function trustUrl(url) {\r\n return $sce.trustAsResourceUrl(url);\r\n }\r\n\r\n function activate() {\r\n var promises = [getItem()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(common.config.events.stateChanged);\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function clearResults() {\r\n vm.paymentItems = [];\r\n vm.hasSearched = false;\r\n vm.searchDto.InvoiceNumber = '';\r\n vm.searchDto.ReservationID = '';\r\n vm.errorMsg = '';\r\n }\r\n\r\n function doPayment() {\r\n if (vm.ccForm.ProviderType === \"AuthorizeDotNet\") {\r\n vm.paymentModal = $uibModal.open({\r\n ariaDescribedBy: 'modal-body',\r\n templateUrl: 'authNetAcceptedPay.html',\r\n backdrop: 'static',\r\n controller: ['$sce', '$timeout', 'options', function ($sce, $timeout, options) {\r\n var pm = this;\r\n pm.token = options.token;\r\n pm.formAction = $sce.trustAsResourceUrl(options.formAction);\r\n $timeout(function () { $(\"#send_hptoken\").submit(); });\r\n }],\r\n controllerAs: 'pm',\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n token: vm.ccForm.Token,\r\n formAction: vm.ccForm.SubmitToUrl\r\n };\r\n }\r\n }\r\n });\r\n }\r\n else if (vm.ccForm.ProviderType === \"TouchNet\") {\r\n vm.ccForm.formAction = $sce.trustAsResourceUrl(vm.ccForm.SubmitToUrl);\r\n $(\"#touchNetForm\").submit();\r\n }\r\n else if (vm.ccForm.ProviderType === \"Vanco\") {\r\n var handler = Hexea.configure({\r\n pcct: vm.ccForm.Token,\r\n onPayment: function (payment) {\r\n processVanco(payment);\r\n }\r\n });\r\n var resId = vm.searchDto.ReservationID;\r\n if (!resId || resId <= 0) {\r\n resId = vm.paymentItems[0].ReservationId;\r\n }\r\n handler.open({\r\n amount: vm.paymentItems[0].BalanceDue,\r\n invoiceReference: vm.payInvoice == 1 ? vm.searchDto.InvoiceNumber : resId\r\n })\r\n }\r\n else if (vm.ccForm.ProviderType === \"Evalon\") {\r\n \r\n var paymentFields = {\r\n ssl_txn_auth_token: vm.ccForm.Token\r\n };\r\n var callback = {\r\n onError: function (error) {\r\n vm.errorMsg = \"Error in processing \" + error;\r\n console.log(\"error\", error);\r\n },\r\n onCancelled: function () {\r\n vm.errorMsg = \"You cancelled the process, please search again to continue\";\r\n },\r\n onDeclined: function (response) {\r\n var jsonString = JSON.stringify(response, null, '\\t');\r\n // processEvalon(jsonString, false);\r\n vm.errorMsg = \"Your payment was declined\";\r\n console.log(\"declined\", jsonString);\r\n },\r\n onApproval: function (response) {\r\n var jsonString = JSON.stringify(response, null, '\\t');\r\n processEvalon(jsonString, true);\r\n }\r\n };\r\n PayWithConverge.open(paymentFields, callback);\r\n }\r\n else if (vm.ccForm.ProviderType === \"CyberSource\") {\r\n vm.ccForm.formAction = $sce.trustAsResourceUrl(vm.ccForm.SubmitToUrl);\r\n \r\n $(\"#cybersourceForm\").submit();\r\n }\r\n else if (vm.ccForm.ProviderType === \"CashNet\") {\r\n vm.ccForm.formAction = $sce.trustAsResourceUrl(vm.ccForm.submitToUrl);\r\n $(\"#cashNetForm\").submit();\r\n }\r\n else if (vm.ccForm.ProviderType === \"Nelnet\") {\r\n var expirationTime1 = moment(vm.ccForm.UtcTimeStamp);\r\n expirationTime1 = expirationTime1.add(5, 'minutes');\r\n if (moment().isAfter(expirationTime1)) {\r\n template = 'expired.html';\r\n }\r\n window.location.href = vm.ccForm.IFrameIncludeUrl\r\n }\r\n\r\n else if (vm.ccForm.ProviderType === \"Nelnet-IFrame\") {\r\n var template = 'nelnetHosted.html';\r\n var expirationTime = moment(vm.ccForm.UtcTimeStamp);\r\n expirationTime = expirationTime.add(5, 'minutes');\r\n if (moment().isAfter(expirationTime)) {\r\n template = 'expired.html';\r\n }\r\n\r\n vm.paymentModal = $uibModal.open({\r\n ariaDescribedBy: 'modal-body',\r\n templateUrl: template,\r\n backdrop: 'static',\r\n windowClass: 'nelnet-modal-window',\r\n controller: ['$sce', 'options', function ($sce, options) {\r\n var pm = this;\r\n pm.iframeUrl = $sce.trustAsResourceUrl(options.iframeUrl);\r\n pm.cancel = function () {\r\n vm.paymentModal.close('cancel');\r\n }\r\n }],\r\n controllerAs: 'pm',\r\n resolve: {\r\n options: function () {\r\n return {\r\n iframeUrl: vm.ccForm.IFrameIncludeUrl\r\n };\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n function processVanco(data) {\r\n var resId = vm.searchDto.ReservationID;\r\n if (!resId || resId <= 0) {\r\n resId = vm.paymentItems[0].ReservationId;\r\n }\r\n var payment = {\r\n PaymentTemplateUId: $stateParams.id,\r\n SearchType: vm.payInvoice == 1 ? 0 : 1,\r\n InvoiceNo: vm.searchDto.InvoiceNumber,\r\n ReservationId: resId,\r\n SearchText: vm.searchDto.LastName,\r\n TicklerId: vm.paymentItems[0].TicklerId,\r\n PaymentAmount: vm.paymentItems[0].BalanceDue,\r\n HexeaPaymentID: data.hexeaPaymentID\r\n }\r\n dataservice.saveItem('api/PaymentTemplates/ExecuteVancoPayment', payment).then(\r\n function (response) {\r\n $state.go(\"paymenttemplates.receipt\", { id: response.data.ReceiptId });\r\n }, function (error) { });\r\n }\r\n\r\n function processEvalon(data, wasSuccessful) {\r\n var transResponse = JSON.parse(data);\r\n var resId = vm.searchDto.ReservationID;\r\n if (!resId || resId <= 0) {\r\n resId = vm.paymentItems[0].ReservationId;\r\n }\r\n var payment = {\r\n PaymentTemplateUId: $stateParams.id,\r\n SearchType: vm.payInvoice == 1 ? 0 : 1,\r\n InvoiceNo: vm.searchDto.InvoiceNumber,\r\n ReservationId: resId,\r\n SearchText: vm.searchDto.LastName,\r\n TicklerId: vm.paymentItems[0].TicklerId,\r\n\r\n PaymentAmount: transResponse.ssl_amount,\r\n TransactionId: transResponse.ssl_transaction_reference_number,\r\n ResponseCode: transResponse.ssl_result_message === \"APPROVAL\" ? 1 : 0,\r\n Authorization: transResponse.ssl_approval_code,\r\n AccountNumber: transResponse.ssl_card_number,\r\n AccountType: transResponse.ssl_card_short_description,\r\n PaymentSuccessful: wasSuccessful\r\n };\r\n\r\n \r\n //$('#HostedPayment').attr('src', 'about:blank');\r\n\r\n dataservice.saveItem('api/PaymentTemplates/ProcessPaymentFromIFrame', payment).then(\r\n function (response) {\r\n $state.go(\"paymenttemplates.receipt\", { id: response.data.ReceiptId });\r\n }, function (error) { });\r\n }\r\n\r\n\r\n window.CommunicationHandler = {};\r\n window.authorizeAcceptJsResponseHandler = function (response) {\r\n if (response.messages.resultCode === 'Error') {\r\n vm.errorMsg = \"Error in processing \" + response.messages.message[0].code +\r\n ': ' + response.messages.message[0].text;\r\n }\r\n else {\r\n var resId = vm.searchDto.ReservationID;\r\n if (!resId || resId <= 0) {\r\n resId = vm.paymentItems[0].ReservationId;\r\n }\r\n var payment = {\r\n PaymentTemplateUId: $stateParams.id,\r\n SearchType: vm.payInvoice == 1 ? 0 : 1,\r\n InvoiceNo: vm.searchDto.InvoiceNumber,\r\n ReservationId: resId,\r\n SearchText: vm.searchDto.LastName,\r\n TicklerId: vm.paymentItems[0].TicklerId,\r\n PaymentAmount: vm.paymentItems[0].BalanceDue,\r\n DataDescriptor: response.opaqueData.dataDescriptor,\r\n DataValue: response.opaqueData.dataValue\r\n };\r\n dataservice.saveItem('api/PaymentTemplates/ProcessPaymentAcceptJs', payment).then(\r\n function (response) {\r\n $state.go(\"paymenttemplates.receipt\", { id: response.data.ReceiptId });\r\n }, function (error) { });\r\n }\r\n }\r\n\r\n function _parseQueryString(str) {\r\n var vars = [];\r\n var arr = str.split('&');\r\n var pair;\r\n for (var i = 0; i < arr.length; i++) {\r\n pair = arr[i].split('=');\r\n vars[pair[0]] = unescape(pair[1]);\r\n }\r\n return vars;\r\n }\r\n CommunicationHandler.onReceiveCommunication = function (argument) {\r\n var params = _parseQueryString(argument.qstr);\r\n var parentFrame = argument.parent.split('/')[4];\r\n\r\n var $frame = null;\r\n switch (parentFrame) {\r\n case \"payment\":\r\n $frame = $(\"#load_payment\");\r\n break;\r\n }\r\n\r\n switch(params['action']) {\r\n case \"resizeWindow\":\r\n if (parentFrame == \"payment\" && parseInt(params['height']) < 1000) params['height'] = 1000;\r\n $frame.outerHeight(parseInt(params['height']));\r\n break;\r\n case \"cancel\":\r\n vm.paymentModal.result.then(function () { }, function () { });\r\n vm.paymentModal.dismiss('cancel');\r\n switch (parentFrame) {\r\n case \"payment\":\r\n $('#HostedPayment').attr('src', 'about:blank');\r\n break;\r\n }\r\n break;\r\n case \"transactResponse\":\r\n var transResponse = JSON.parse(params['response']);\r\n var resId = vm.searchDto.ReservationID;\r\n if (!resId || resId <= 0) {\r\n resId = vm.paymentItems[0].ReservationId;\r\n }\r\n var payment = {\r\n PaymentTemplateUId: $stateParams.id,\r\n SearchType: vm.payInvoice == 1 ? 0 : 1,\r\n InvoiceNo: vm.searchDto.InvoiceNumber,\r\n ReservationId: resId,\r\n SearchText: vm.searchDto.LastName,\r\n TicklerId: vm.paymentItems[0].TicklerId,\r\n PaymentAmount: transResponse.totalAmount,\r\n TransactionId: transResponse.transId,\r\n ResponseCode: transResponse.responseCode,\r\n Authorization: transResponse.authorization,\r\n AccountNumber: transResponse.accountNumber,\r\n AccountType: transResponse.accountType,\r\n PaymentSuccessful: transResponse.responseCode == 1\r\n };\r\n\r\n if (transResponse.billTo) {\r\n payment.FirstName = transResponse.billTo.firstName;\r\n payment.LastName = transResponse.billTo.lastName;\r\n }\r\n\r\n\r\n $('#HostedPayment').attr('src', 'about:blank');\r\n \r\n dataservice.saveItem('api/PaymentTemplates/ProcessPaymentFromIFrame', payment).then(\r\n function (response) {\r\n vm.paymentModal.result.then(function () { }, function () { });\r\n vm.paymentModal.dismiss('cancel');\r\n $state.go(\"paymenttemplates.receipt\", { id: response.data.ReceiptId });\r\n }, function (error) { });\r\n break;\r\n\r\n }\r\n }\r\n \r\n function getItem() {\r\n var val = $stateParams.id;\r\n return dataservice.getItem('api/PaymentTemplates/Pay/' + val).then(function (response) {\r\n vm.item = response.data;\r\n vm.payInvoice = response.data.DefaultButton;\r\n vm.resIdLabel = response.data.ReservationIDLabel;\r\n if (vm.item.PaymentPageTitle) {\r\n $rootScope.title = vm.item.PaymentPageTitle;\r\n }\r\n }, function (error) { });\r\n }\r\n\r\n function invoiceLabel() {\r\n if (vm.payInvoice == 1) {\r\n return \"Invoice Number\";\r\n }\r\n else {\r\n return vm.item.ReservationIdBoxLabel;\r\n }\r\n }\r\n\r\n \r\n\r\n function search(customValueDue) {\r\n vm.isSearching = true;\r\n vm.paymentItems = [];\r\n vm.searchDto.PaymentTemplateUId = $stateParams.id;\r\n vm.searchDto.PaymentSearchType = vm.payInvoice == 1 ? 0 : 1;\r\n vm.searchDto.CustomValueDue = customValueDue;\r\n \r\n return dataservice.query(\"api/PaymentTemplates/SearchForTransaction\", vm.searchDto)\r\n .then(function (response) {\r\n if (response) {\r\n if (response.data.PaymentItems) {\r\n vm.paymentItems = response.data.PaymentItems;\r\n if (vm.paymentItems.length === 1) {\r\n if (vm.paymentItems[0].AllowCustomAmount) {\r\n vm.balanceDueLabel = \"Amount To Pay\";\r\n vm.showCustomAmount = true;\r\n }\r\n else {\r\n vm.showCustomAmount = false;\r\n }\r\n \r\n }\r\n }\r\n\r\n var formData = response.data.FormData;\r\n \r\n if (formData) {\r\n vm.ccForm = formData;\r\n if (vm.ccForm.ProviderType === \"Evalon\" || vm.ccForm.ProviderType == \"Vanco\") {\r\n var evaScript = document.createElement(\"script\");\r\n evaScript.src = vm.ccForm.SubmitToUrl;\r\n var ref = document.querySelector('script');\r\n\r\n // Insert the new node before the reference node\r\n ref.parentNode.insertBefore(evaScript, ref);\r\n }\r\n else if (vm.ccForm.ProviderType === \"AuthorizeAcceptJs\") {\r\n var acceptUIScript = document.createElement(\"script\");\r\n acceptUIScript.src = vm.ccForm.ScriptToInclude;\r\n var ref = document.querySelector('script');\r\n\r\n // Insert the new node before the reference node\r\n ref.parentNode.insertBefore(acceptUIScript, ref);\r\n }\r\n \r\n vm.ccForm.action = $sce.trustAsResourceUrl(vm.ccForm.SubmitToUrl);\r\n }\r\n }\r\n vm.hasSearched = true;\r\n vm.isSearching = false;\r\n }, function (error) { console.log(error); })\r\n \r\n }\r\n\r\n function noSearchData() {\r\n return vm.isLoading == false && vm.paymentItems.length == 0 && vm.hasSearched == true && !vm.isSearching;\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentTemplates')\r\n .controller('PaymentTemplateReceiptController', PaymentTemplateReceiptController);\r\n\r\n PaymentTemplateReceiptController.$inject = ['$stateParams', '$sce', 'common', 'dataservice', '$rootScope'];\r\n /* @ngInject */\r\n function PaymentTemplateReceiptController($stateParams, $sce, common, dataservice, $rootScope) {\r\n var vm = this;\r\n vm.title = 'Payment Receipt';\r\n vm.item = {};\r\n vm.isLicenseValid = true;\r\n vm.ReservationOrInvoiceLabel = \"Invoice No\";\r\n vm.cancelled = false;\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(common.config.events.stateChanged);\r\n }, function (error) { });\r\n }\r\n\r\n \r\n function getItem() {\r\n var val = $stateParams.id;\r\n\r\n return dataservice.getItem('api/PaymentTemplates/Receipt/' + val).then(function (response) {\r\n vm.item = response.data;\r\n vm.cancelled = response.data.ResponseCode == 3;\r\n if (vm.item.ReceiptPageTitle) {\r\n $rootScope.title = vm.item.ReceiptPageTitle;\r\n }\r\n if (vm.item.EmsTransactionType != -86) {\r\n vm.ReservationOrInvoiceLabel = vm.item.ReservationIDLabel;\r\n }\r\n }, function (error) { });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentTransactions')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'paymenttransactions',\r\n config: {\r\n abstract: true,\r\n url: '/paymenttransactions',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n \r\n }\r\n }\r\n },\r\n {\r\n state: 'paymenttransactions.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/paymenttransactions/list.html?v=' + opsIncludeVersion,\r\n controller: 'PaymentTransactionsListController',\r\n controllerAs: 'vm',\r\n title: 'Payment Transactions',\r\n settings: {\r\n nav: 700,\r\n content: ' Transactions',\r\n authMode: 1,\r\n requireBillingDepartments: true,\r\n mobileButton: true\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n if (!userService.isCollegeNetApi()) {\r\n if (userService.billingDepartmentIds().length === 0) {\r\n throw { name: \"NoBillingDepartments\" };\r\n }\r\n }\r\n else {\r\n if (userService.numberOfPaymentTemplates() == 0) {\r\n throw {name: \"NoPaymnetTemplates\"}\r\n }\r\n }\r\n \r\n }]\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.paymentTransactions')\r\n .controller('PaymentTransactionsListController', PaymentTransactionsListController);\r\n\r\n PaymentTransactionsListController.$inject = ['common', 'dataservice'];\r\n /* @ngInject */\r\n function PaymentTransactionsListController(common, dataservice) {\r\n var vm = this;\r\n\r\n vm.title = 'Payment Transactions';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.isLicenseValid = false;\r\n vm.isLoading = true;\r\n vm.hasSearched = false;\r\n vm.openDatePicker = openDatePicker;\r\n vm.isCollegeNet = common.userService.isCollegeNetApi();\r\n vm.dpStatus = {\r\n fromDateOpen: false,\r\n toDateOpen: false\r\n }\r\n vm.filters = {\r\n fromDate: new Date(),\r\n toDate: new Date()\r\n }\r\n vm.datePickerOptions = {\r\n showWeeks: false,\r\n ngModelOptions: {\r\n allowInvalid: false\r\n }\r\n };\r\n vm.getItems = getItems;\r\n\r\n activate();\r\n\r\n\r\n function openDatePicker(isStart) {\r\n if (isStart) {\r\n vm.dpStatus.fromDateOpen = true;\r\n vm.dpStatus.toDateOpen = false;\r\n }\r\n else {\r\n vm.dpStatus.fromDateOpen = false;\r\n vm.dpStatus.toDateOpen = true;\r\n }\r\n\r\n }\r\n function activate() {\r\n var promises = [getLookups(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n var billingDept = common.userService.billingDepartmentIds();\r\n \r\n if (billingDept.length === 1) {\r\n vm.filters.EmsDepartmentId = Number(billingDept[0]);\r\n }\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = vm.licenseInfo.NumberOfPaymentTemplatesLicensed >= vm.licenseInfo.NumberOfPaymentTemplatesInUse;\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n \r\n function getItems() {\r\n return dataservice.query('api/PaymentTransactions/Search', vm.filters).then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n vm.hasSearched = true;\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function getLookups() {\r\n return dataservice.getItems('api/PaymentTransactions/GetLookups').then(function (response) {\r\n vm.departments = response.data.Departments;\r\n \r\n }, function (error) { });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.alerts')\r\n .controller('PromoDetailController', PromoDetailController);\r\n\r\n PromoDetailController.$inject = [ '$state', '$stateParams', 'common', 'dataservice'];\r\n \r\n\r\n function PromoDetailController($state, $stateParams, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n\r\n vm.cancel = cancel;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.submitForm = submitForm;\r\n vm.isNew = isNew;\r\n\r\n activate();\r\n\r\n function activate() {\r\n getItem();\r\n }\r\n\r\n function submitForm(valid) {\r\n save();\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n window.history.back();\r\n }\r\n\r\n \r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"0\";\r\n \r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n\r\n return dataservice.getItem(\"api/Promos/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n if (data.data.ID == '0') {\r\n vm.item = {};\r\n }\r\n else {\r\n vm.item = data.data;\r\n }\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n dataservice.saveItem('api/Promos', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.promos')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'promos',\r\n abstract: true,\r\n config: {\r\n url: '/promos',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'promos.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/promos/details.html?v=' + opsIncludeVersion,\r\n controller: 'PromoDetailController',\r\n controllerAs: 'vm',\r\n title: 'Promo Help',\r\n settings: {},\r\n resolve: {\r\n is7Point: ['userService', function(userService) {\r\n if (userService.tenantId() != \"1\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.promotionalImages')\r\n .controller('PromotionalImageDetailsController', PromotionalImageDetailsController);\r\n\r\n PromotionalImageDetailsController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function PromotionalImageDetailsController($state, $stateParams, $window, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.numberOfUses = 0;\r\n \r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem(), getCounts()];\r\n \r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"promotionalimages.list\");\r\n }\r\n\r\n function getCounts() {\r\n var val = $stateParams.id;\r\n if (val != '') {\r\n return dataservice.getItem(\"api/PromotionalImages/CountsOfUses/\" + val)\r\n .then(function (response) {\r\n vm.numberOfUses = response.data.NumberOfItems;\r\n }, function (error) { })\r\n }\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Promotional Image')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/PromotionalImages/\" + vm.item.Id).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.Id = '';\r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/PromotionalImages/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n common.setAuditInfo(vm.item);\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n function save() {\r\n if (vm.item.Id == '') {\r\n vm.isSaving = true;\r\n var elmId = \"photo\";\r\n var imgInput = document.getElementById(elmId);\r\n var img = imgInput.files[0];\r\n\r\n if (!img) {\r\n common.logger.error(\"Please choose a file to continue\");\r\n return;\r\n }\r\n\r\n var dto = {\r\n \"AltText\": vm.item.AltText,\r\n \"LongDescription\": vm.item.LongDescription == undefined ? null : vm.item.LongDescription\r\n }\r\n \r\n\r\n dataservice.postFile('api/PromotionalImages/PostFile', img, dto).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n else {\r\n \r\n var dto = {\r\n \"Id\": vm.item.Id,\r\n \"AltText\": vm.item.AltText,\r\n \"LongDescription\": vm.item.LongDescription\r\n }\r\n\r\n dataservice.saveItem('api/PromotionalImages/Update', dto).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n \r\n }\r\n\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.promotionalImages')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'promotionalimages',\r\n config: {\r\n abstract: true,\r\n url: '/promotionalimages',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n },\r\n },\r\n {\r\n state: 'promotionalimages.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/promotionalImages/list.html?v=' + opsIncludeVersion,\r\n controller: 'PromotionalImagesListController',\r\n controllerAs: 'vm',\r\n title: 'Promotional Images',\r\n \r\n }\r\n },\r\n {\r\n state: 'promotionalimages.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/promotionalImages/details.html?v=' + opsIncludeVersion,\r\n controller: 'PromotionalImageDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Promotional Images Details',\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.eventDisplay')\r\n .controller('PromotionalImagesListController', PromotionalImagesListController);\r\n\r\n PromotionalImagesListController.$inject = ['common', 'dataservice', 'config', 'carousel.dialog'];\r\n /* @ngInject */\r\n function PromotionalImagesListController(common, dataservice, config, carouselDialog) {\r\n var vm = this;\r\n vm.title = \"Promotional Images\"\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.refresh = refresh;\r\n vm.showImage = showImage;\r\n vm.isLicenseValid = false;\r\n vm.isLoading = true;\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = (\r\n vm.licenseInfo.NumberOfDisplaysLicensed >= vm.licenseInfo.NumberOfDisplaysInUse\r\n || vm.licenseInfo.NumberOfPaymentTemplatesLicensed >= vm.licenseInfo.NumberOfPaymentTemplatesInUse\r\n \r\n );\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/PromotionalImages').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n\r\n function showImage(item) {\r\n return carouselDialog.display(item);\r\n\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dailySetup')\r\n .directive('spDailySetup', spDailySetup)\r\n .directive('spEventsTable', spEventsTable)\r\n .directive('spTasksTable', spTasksTable);\r\n\r\n spDailySetup.$inject = ['reactDirective'];\r\n /* @ngInject */\r\n function spDailySetup(reactDirective) {\r\n return reactDirective(DailySetup);\r\n }\r\n\r\n spEventsTable.$inject = ['reactDirective'];\r\n /* @ngInject */\r\n function spEventsTable(reactDirective) {\r\n return reactDirective(EventsTable);\r\n }\r\n spTasksTable.$inject = ['reactDirective'];\r\n /* @ngInject */\r\n function spTasksTable(reactDirective) {\r\n return reactDirective(TasksTable);\r\n }\r\n})();\r\n\r\n\r\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Book = /*#__PURE__*/function (_React$Component) {\n _inherits(Book, _React$Component);\n\n var _super = _createSuper(Book);\n\n function Book(props) {\n var _this2;\n\n _classCallCheck(this, Book);\n\n _this2 = _super.call(this, props);\n _this2.linkScrollingX = _this2.linkScrollingX.bind(_assertThisInitialized(_this2));\n _this2.linkScrollingY = _this2.linkScrollingY.bind(_assertThisInitialized(_this2));\n _this2.setBarDisplayMode = _this2.setBarDisplayMode.bind(_assertThisInitialized(_this2));\n _this2.hoursDisplay = _this2.hoursDisplay.bind(_assertThisInitialized(_this2));\n _this2.showModal = _this2.showModal.bind(_assertThisInitialized(_this2));\n _this2.hideModal = _this2.hideModal.bind(_assertThisInitialized(_this2));\n _this2.hideCarouselModal = _this2.hideCarouselModal.bind(_assertThisInitialized(_this2));\n _this2.showCarouselModal = _this2.showCarouselModal.bind(_assertThisInitialized(_this2));\n _this2.showAddBookingModal = _this2.showAddBookingModal.bind(_assertThisInitialized(_this2));\n _this2.hideAddBookingModal = _this2.hideAddBookingModal.bind(_assertThisInitialized(_this2));\n _this2.state = {\n modalItem: {},\n buildingForModel: {},\n bookingModalShowing: false,\n completionModalShowing: false,\n completionTypes: [],\n bookStart: moment(_this2.props.onDate).startOf('day'),\n bookEnd: moment(_this2.props.onDate).add(1, 'day').startOf('day'),\n hours: [],\n barDisplayMode: 0,\n carouselModalShowing: false,\n carouselModalItem: {},\n slidesForModal: [],\n addBookingModalShowing: false,\n roomForAddBooking: {},\n clickedOnHour: 0\n };\n return _this2;\n }\n\n _createClass(Book, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n this.loadHours();\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var sl = 400;\n document.getElementById('bookScroll').scrollLeft = sl;\n document.getElementById('topTimeContainer').scrollLeft = sl;\n }\n }, {\n key: \"showCarouselModal\",\n value: function showCarouselModal(item, isForDiagrams) {\n var _that = this;\n\n if (!isForDiagrams) {\n _that.setState({\n carouselTitle: \"Attachments\"\n });\n\n this.props.slidesDataService.getItems('api/DailySetup/GetSetupDiagrams/' + item.BookingId + '?reservationId=' + item.ReservationId).then(function (response) {\n _that.setState({\n carouselModalShowing: true,\n carouselModalItem: item,\n slidesForModal: response.data\n });\n }, function (error) {});\n } else {\n _that.setState({\n carouselTitle: \"Drawings\"\n });\n\n if (item.ExternalDrawingUrl) {\n window.open(item.ExternalDrawingUrl);\n } else {\n this.props.slidesDataService.getItems('api/DailySetup/GetDrawings/' + item.BookingId).then(function (response) {\n var drawings = response.data;\n var slides = [];\n\n for (var j = 0; j < drawings.length; j++) {\n var url = drawings[j].Url;\n\n if (url) {\n if (url.toLowerCase().indexOf(\"socialtables.com\") != -1 || url.toLowerCase().indexOf(\"bit.ly\") != -1 || url.toLowerCase().indexOf(\"allseated.com\") != -1 || url.toLowerCase().indexOf(\"teams.microsoft.com\") != -1 || url.toLowerCase().indexOf(\"sharepoint.com\") != -1 || url.toLowerCase().indexOf(\"prismm.com\") != -1) {\n slides.push(drawings[j]);\n }\n }\n }\n\n if (slides.length > 0) {\n if (slides.length == 1) {\n window.open(slides[0].Url);\n } else {\n _that.setState({\n carouselModalShowing: true,\n carouselModalItem: item,\n slidesForModal: slides\n });\n }\n }\n }, function (error) {});\n }\n }\n }\n }, {\n key: \"hideCarouselModal\",\n value: function hideCarouselModal() {\n this.setState({\n carouselModalShowing: false\n });\n }\n }, {\n key: \"setBarDisplayMode\",\n value: function setBarDisplayMode(setTo) {\n this.setState({\n barDisplayMode: setTo\n });\n }\n }, {\n key: \"showAddBookingModal\",\n value: function showAddBookingModal(room, hourOfDay) {\n var _that = this;\n\n this.setState({\n addBookingModalShowing: true,\n roomForAddBooking: room,\n clickedOnHour: hourOfDay\n });\n }\n }, {\n key: \"hideAddBookingModal\",\n value: function hideAddBookingModal() {\n this.setState({\n addBookingModalShowing: false\n });\n }\n }, {\n key: \"showModal\",\n value: function showModal(item, building) {\n this.setState({\n modalItem: item\n });\n\n if (building) {\n this.setState({\n buildingForModel: building\n });\n }\n\n if (this.state.barDisplayMode == 1) {\n var _that = this;\n\n this.props.completionsDataService.getCompletionTypesForItem(item).then(function (result) {\n _that.setState({\n completionModalShowing: true,\n completionTypes: result\n });\n }, function (error) {});\n } else if (this.state.barDisplayMode === 3) {\n //attachments\n if (item.HasBookingAttachment) {\n this.showCarouselModal(item, false);\n }\n } else if (this.state.barDisplayMode === 4) {\n //drawings\n var isMazevo = this.props.userService.apiTypeId() === \"0E9DADB2-F56B-4E7E-A3B2-A59632C91D86\";\n\n if (isMazevo) {\n if (item.HasBookingAttachment) {\n this.showCarouselModal(item, false);\n }\n } else {\n if (item.HasDrawings) {\n this.showCarouselModal(item, true);\n }\n }\n } else {\n var apiTypeId = this.props.common.userService.apiTypeId();\n\n if (apiTypeId == \"4CF523BF-F6DD-441C-810F-C87347963B5D\") {\n if (!item.Phone) {\n var _this = this;\n\n this.props.slidesDataService.getItem(\"api/DailySetup/ReservationDetails/\" + item.ReservationId).then(function (response) {\n item.Phone = response.data.Phone;\n\n if (response.data.EmailAddress) {\n item.Email = response.data.EmailAddress;\n }\n\n item.GroupType = response.data.GroupType;\n item.WebUser = response.data.WebUser;\n item.EventCoordinator = response.data.EventCoordinator;\n item.GroupType = response.data.GroupType;\n });\n }\n }\n\n if (apiTypeId === \"0E9DADB2-F56B-4E7E-A3B2-A59632C91D86\") {\n this.props.slidesDataService.getItem(\"api/DailySetup/MazevoEventDetails/\" + item.EventLocator).then(function (response) {\n item.Phone = response.data.Phone;\n\n if (response.data.EmailAddress) {\n item.Email = response.data.EmailAddress;\n }\n });\n }\n\n this.setState({\n bookingModalShowing: true\n });\n }\n }\n }, {\n key: \"hideModal\",\n value: function hideModal() {\n if (this.state.barDisplayMode == 1) {\n this.setState({\n completionModalShowing: false\n });\n } else {\n this.setState({\n bookingModalShowing: false\n });\n }\n }\n }, {\n key: \"loadHours\",\n value: function loadHours() {\n var bookStart = this.state.bookStart;\n var bookEnd = this.state.bookEnd;\n\n if (this.state.hours.length === 0) {\n var hours = [];\n var onTime = bookStart.clone();\n\n while (onTime.isBefore(bookEnd)) {\n hours.push(onTime.hours());\n onTime = onTime.add(1, 'hour');\n }\n\n this.setState({\n hours: hours\n });\n }\n }\n }, {\n key: \"hoursDisplay\",\n value: function hoursDisplay(h) {\n if (h == 0) return \"12 AM\";else if (h == 12) return \"12 PM\";else return h % 12;\n }\n }, {\n key: \"linkScrollingX\",\n value: function linkScrollingX(e) {\n document.getElementById('topTimeContainer').scrollLeft = e.currentTarget.scrollLeft;\n }\n }, {\n key: \"linkScrollingY\",\n value: function linkScrollingY(e) {\n document.getElementById('locationColumnWrapper').scrollTop = e.currentTarget.scrollTop;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n // let adjustTimes = this.props.userService.apiTypeId() !== \"4CF523BF-F6DD-441C-810F-C87347963B5D\"; \n var adjustTimes = false; //let midnight = moment().startOf('day');\n\n var now = moment();\n var hours = now.hours();\n var minutes = now.minutes(); //let minutesFromMidnightToNow = 220 + now.diff(midnight, 'minutes');\n\n var minutesFromMidnightToNow = 220 + hours * 60 + minutes; //console.log(now.diff(midnight, 'minutes'))\n\n var nowLeftStyle = {\n left: minutesFromMidnightToNow + \"px\"\n };\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"bookContainer\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"topTimeContainer\",\n id: \"topTimeContainer\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"topTimeRow\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"topTimeOverflow\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"barActionWrapper\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-header fa-1-5x pointer\",\n style: {\n color: this.state.barDisplayMode == 0 ? 'green' : 'grey'\n },\n onClick: function onClick() {\n return _this3.setBarDisplayMode(0);\n },\n title: \"Show Event Name\"\n }), \"\\xA0\\xA0\", /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-user fa-1-5x pointer\",\n style: {\n color: this.state.barDisplayMode == 5 ? 'green' : 'grey'\n },\n onClick: function onClick() {\n return _this3.setBarDisplayMode(5);\n },\n title: \"Show Group Name\"\n }), \"\\xA0\\xA0\", /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-wrench fa-1-5x pointer\",\n style: {\n color: this.state.barDisplayMode == 1 ? 'green' : 'grey'\n },\n onClick: function onClick() {\n return _this3.setBarDisplayMode(1);\n },\n title: \"Show Completion Items\"\n }), \"\\xA0\\xA0\", /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cutlery fa-1-5x pointer\",\n style: {\n color: this.state.barDisplayMode == 2 ? 'green' : 'grey'\n },\n onClick: function onClick() {\n return _this3.setBarDisplayMode(2);\n },\n title: \"Show Services\"\n }), \"\\xA0\\xA0\", /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cubes fa-1-5x pointer\",\n style: {\n color: this.state.barDisplayMode == 3 ? 'green' : 'grey'\n },\n onClick: function onClick() {\n return _this3.setBarDisplayMode(3);\n },\n title: \"Show Attachments\"\n }), \"\\xA0\\xA0\", /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cube fa-1-5x pointer\",\n style: {\n color: this.state.barDisplayMode == 4 ? 'green' : 'grey'\n },\n onClick: function onClick() {\n return _this3.setBarDisplayMode(4);\n },\n title: \"Show Drawings\"\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"topTimeRoomPadding\"\n }), this.state.hours.map(function (h) {\n return /*#__PURE__*/React.createElement(\"div\", {\n key: h,\n className: \"tb\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"tbv\"\n }, _this3.hoursDisplay(h)));\n }))), /*#__PURE__*/React.createElement(\"div\", {\n id: \"bookScroll\",\n className: \"bookScroll\",\n onScroll: function onScroll(e) {\n return _this3.linkScrollingX(e);\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"book\",\n onScroll: function onScroll(e) {\n return _this3.linkScrollingY(e);\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"hideLocationScrollBars\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"locationColumnWrapper\",\n id: \"locationColumnWrapper\"\n }, this.props.bookData.map(function (b) {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"buildingColumn buildingColor\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"buildingText buildingTextColor\"\n }, b.Description)), b.Rooms.map(function (r) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"roomColumn\"\n }, _this3.props.showRoomCode && /*#__PURE__*/React.createElement(\"div\", {\n className: \"roomText\"\n }, r.Code), !_this3.props.showRoomCode && /*#__PURE__*/React.createElement(\"div\", {\n className: \"roomText\"\n }, r.Description));\n }));\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"buildingsContainer\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"nowBar\",\n style: nowLeftStyle\n }), this.props.bookData.map(function (b) {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(BuildingRow, {\n hoursDisplay: _this3.hoursDisplay,\n building: b,\n bookStart: _this3.state.bookStart,\n bookEnd: _this3.state.bookEnd\n }), b.Rooms.map(function (r) {\n return /*#__PURE__*/React.createElement(BookRow, {\n key: r.Id,\n onDate: _this3.props.onDate,\n bookRowClicked: _this3.showAddBookingModal,\n room: r,\n hours: _this3.state.hours,\n date: _this3.props.onDate,\n building: b,\n showBookingModal: _this3.showModal,\n eventBarColor: _this3.props.eventBarColor,\n reservedBarColor: _this3.props.reservedBarColor,\n cancelledBarColor: _this3.props.cancelledBarColor,\n textColor: _this3.props.textColor,\n allCompletions: _this3.props.allCompletions,\n barDisplayMode: _this3.state.barDisplayMode,\n settings: _this3.props.settings,\n adjustTimes: adjustTimes,\n userService: _this3.props.userService\n });\n }));\n }))))), /*#__PURE__*/React.createElement(BookingModal, {\n show: this.state.bookingModalShowing,\n booking: this.state.modalItem,\n building: this.state.buildingForModel,\n close: this.hideModal,\n adjustTimes: adjustTimes,\n userService: this.props.userService\n }), /*#__PURE__*/React.createElement(CompletionsModal, {\n show: this.state.completionModalShowing,\n item: this.state.modalItem,\n close: this.hideModal,\n completionTypes: this.state.completionTypes,\n completionsDataService: this.props.completionsDataService,\n userService: this.props.userService\n }), /*#__PURE__*/React.createElement(CarouselModal, {\n show: this.state.carouselModalShowing,\n close: this.hideCarouselModal,\n slidesForModal: this.state.slidesForModal,\n title: this.state.carouselTitle,\n dataService: this.props.slidesDataService,\n item: this.state.carouselModalItem\n }), /*#__PURE__*/React.createElement(AddBookingModal, {\n refresh: this.props.refresh,\n common: this.props.common,\n show: this.state.addBookingModalShowing,\n clickedOnHour: this.state.clickedOnHour,\n room: this.state.roomForAddBooking,\n close: this.hideAddBookingModal,\n apiService: this.props.slidesDataService\n }));\n }\n }]);\n\n return Book;\n}(React.Component);\n\nBook.propTypes = {\n bookData: React.PropTypes.array,\n onDate: React.PropTypes.date,\n eventBarColor: React.PropTypes.string,\n reservedBarColor: React.PropTypes.string,\n cancelledBarColor: React.PropTypes.string,\n textColor: React.PropTypes.string,\n allCompletions: React.PropTypes.array,\n settings: React.PropTypes.array,\n completionsDataService: React.PropTypes.object,\n slidesDataService: React.PropTypes.object,\n userService: React.PropTypes.object,\n common: React.PropTypes.object,\n refresh: React.PropTypes.func,\n showRoomCode: React.PropTypes.bool\n};\nBook.defaultProps = {\n bookData: [],\n onDate: moment().startOf('day'),\n allCompletions: [],\n settings: []\n};\n\nvar AddBookingModal = /*#__PURE__*/function (_React$Component2) {\n _inherits(AddBookingModal, _React$Component2);\n\n var _super2 = _createSuper(AddBookingModal);\n\n function AddBookingModal(props) {\n var _this4;\n\n _classCallCheck(this, AddBookingModal);\n\n _this4 = _super2.call(this, props);\n _this4.addBooking = _this4.addBooking.bind(_assertThisInitialized(_this4));\n _this4.addAndClose = _this4.addAndClose.bind(_assertThisInitialized(_this4));\n _this4.durationClicked = _this4.durationClicked.bind(_assertThisInitialized(_this4));\n _this4.startTimeClicked = _this4.startTimeClicked.bind(_assertThisInitialized(_this4));\n _this4.state = {\n timesForButtons: [],\n potentialDurations: [30, 60, 90, 120, 180, 240, 360, 480],\n selectedStart: \"\",\n selectedDuration: 30\n };\n return _this4;\n }\n\n _createClass(AddBookingModal, [{\n key: \"addBooking\",\n value: function addBooking() {\n var that = this;\n var en = $(\"#eventName\").val();\n var sc = $(\"#setupCount\").val();\n\n if (!en) {\n this.props.common.logger.error('You must supply an event name');\n return;\n }\n\n var dto = {\n eventName: en,\n setupCount: sc,\n startTime: this.state.selectedStart,\n duration: this.state.selectedDuration,\n roomId: this.props.room.Id\n };\n this.props.apiService.saveItem('api/DailySetup/AddBooking', dto, true).then(function (response) {\n if (response.status != 200) {\n that.props.common.logger.error(\"There was a problem creating your booking\");\n } else {\n that.props.common.logger.success(\"Booking Created\");\n that.props.refresh();\n that.props.close();\n }\n }, function (error) {\n console.log(error);\n }); //this.props.notesDataService.newNote(note, this.props.item);\n\n $(\"#eventName\").val(\"\");\n $(\"#setupCount\").val(\"\");\n }\n }, {\n key: \"addAndClose\",\n value: function addAndClose() {\n this.addBooking();\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var bookings = nextProps.room.bookings;\n var quaterHour = nextProps.clickedOnHour;\n quaterHour = (Math.round(quaterHour * 4) / 4).toFixed(2);\n var m = quaterHour.split('.')[1];\n var minutes = m == 25 ? 15 : m == 50 ? 30 : m == 75 ? 45 : 0;\n var flooredHour = Math.floor(nextProps.clickedOnHour);\n var timesForButtons = [];\n var d = new Date();\n var year = d.getFullYear();\n var monthIndex = d.getMonth();\n var day = d.getDate();\n var onDate = moment(new Date(year, monthIndex, day, flooredHour, 0));\n\n for (var i = 0; i < 7; i++) {\n onDate = moment(onDate).add(15, \"m\").toDate();\n timesForButtons.push(onDate);\n }\n\n var ss = new Date(year, monthIndex, day, flooredHour, minutes);\n this.setState({\n timesForButtons: timesForButtons,\n selectedStart: ss,\n selectedDuration: 30\n });\n }\n }, {\n key: \"durationClicked\",\n value: function durationClicked(d) {\n this.setState({\n selectedDuration: d\n });\n }\n }, {\n key: \"startTimeClicked\",\n value: function startTimeClicked(d) {\n this.setState({\n selectedStart: d\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, \"Add New Booking in \", this.props.room.Description)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"newEmsBookingModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Booking Details\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n \"for\": \"eventName\"\n }, \"Event Name:\"), /*#__PURE__*/React.createElement(\"input\", {\n name: \"eventName\",\n id: \"eventName\",\n className: \"form-control\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", null, \"Start At:\"), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"div\", {\n className: \"btn-group\"\n }, this.state.timesForButtons.map(function (d) {\n var o = moment(d).format(\"hh:mm\");\n var s = moment(_this5.state.selectedStart).format(\"hh:mm\");\n var cn = o == s ? \"btn btn-success\" : \" btn btn-grey\";\n return /*#__PURE__*/React.createElement(\"button\", {\n className: cn,\n onClick: function onClick() {\n return _this5.startTimeClicked(d);\n }\n }, moment(d).format('h:mm a'));\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", null, \"Duration: \"), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"div\", {\n className: \"btn-group\"\n }, this.state.potentialDurations.map(function (d) {\n var cn = d == _this5.state.selectedDuration ? \"btn btn-success\" : \" btn btn-grey\";\n var text = d == 30 ? \"30 min\" : d == 60 ? \"1 hr\" : d / 60 + \" hr\";\n return /*#__PURE__*/React.createElement(\"button\", {\n className: cn,\n onClick: function onClick() {\n return _this5.durationClicked(d);\n }\n }, text);\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n \"for\": \"setupCount\"\n }, \"Setup Count:\"), /*#__PURE__*/React.createElement(\"input\", {\n name: \"setupCount\",\n id: \"setupCount\",\n className: \"form-control\"\n }))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.addAndClose\n }, \"Ok\")));\n }\n }]);\n\n return AddBookingModal;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Booking = /*#__PURE__*/function (_React$Component) {\n _inherits(Booking, _React$Component);\n\n var _super = _createSuper(Booking);\n\n function Booking(props) {\n _classCallCheck(this, Booking);\n\n return _super.call(this, props);\n }\n\n _createClass(Booking, [{\n key: \"hasCompletionType\",\n value: function hasCompletionType(ct) {\n var completion = this.getLastCompletionForType(ct.ID, this.props.booking);\n\n if (completion) {\n if (completion.CompletedAtUtc != null) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"getLastCompletionForType\",\n value: function getLastCompletionForType(completionTypeId, item) {\n var completions = item.Completions.filter(this.isCompletionType(completionTypeId));\n completions.sort(function (a, b) {\n a = new Date(a.DateAddedUtc);\n b = new Date(b.DateAddedUtc);\n return a > b ? -1 : a < b ? 1 : 0;\n });\n return completions[0];\n }\n }, {\n key: \"isCompletionType\",\n value: function isCompletionType(completionTypeId) {\n return function (element) {\n return element.CompletionTypeId == completionTypeId;\n };\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var isMazevo = this.props.userService.apiTypeId() === \"0E9DADB2-F56B-4E7E-A3B2-A59632C91D86\";\n var midnight = moment(this.props.date).startOf('day');\n var showEvent = false;\n var showBooking = false; //let timezoneOffsetMinutes = -1 * this.props.building.EmsTimezoneMinuteOffsetFromTenantTimezone\n\n var timezoneOffsetMinutes = this.props.building.EmsTimezoneMinuteOffsetFromTenantTimezone;\n var eventStart, eventEnd, bookingStart, bookingEnd;\n\n if (this.props.adjustTimes) {\n eventStart = moment(this.props.booking.BuildingLocalEventStart).add(timezoneOffsetMinutes, 'minutes');\n eventEnd = moment(this.props.booking.BuildingLocalEventEnd).add(timezoneOffsetMinutes, 'minutes');\n bookingStart = moment(this.props.booking.BuildingLocalReseveredStart).add(timezoneOffsetMinutes, 'minutes');\n bookingEnd = moment(this.props.booking.BuildingLocalReseveredEnd).add(timezoneOffsetMinutes, 'minutes');\n } else {\n eventStart = moment(this.props.booking.BuildingLocalEventStart);\n eventEnd = moment(this.props.booking.BuildingLocalEventEnd);\n bookingStart = moment(this.props.booking.BuildingLocalReseveredStart);\n bookingEnd = moment(this.props.booking.BuildingLocalReseveredEnd);\n }\n\n var notInRoomClass = this.props.booking.AssociatedRoomId > 0 && this.props.booking.AssociatedRoomId !== this.props.booking.RoomId ? \"notInRoom\" : \"\";\n\n if (eventStart.date() === midnight.date() || eventEnd.date() === midnight.date()) {\n showEvent = true;\n }\n\n if (bookingStart.date() === midnight.date() || bookingEnd.date() === midnight.date()) {\n showBooking = true;\n }\n\n var minutesFromMidnightToBookingStart = bookingStart.diff(midnight, 'minutes');\n var minutesFromMidnightToEventStart = eventStart.diff(midnight, 'minutes');\n\n if (minutesFromMidnightToEventStart < 0) {\n eventStart = eventStart.startOf('day').add(1, 'day');\n minutesFromMidnightToEventStart = 0;\n } else {\n minutesFromMidnightToEventStart = eventStart.hours() * 60 + eventStart.minutes();\n }\n\n if (minutesFromMidnightToBookingStart < 0) {\n bookingStart = bookingStart.startOf('day').add(1, 'day');\n minutesFromMidnightToBookingStart = 0;\n } else {\n minutesFromMidnightToBookingStart = bookingStart.hours() * 60 + bookingStart.minutes();\n }\n\n var widthOfBooking = bookingEnd.diff(bookingStart, 'minutes');\n var widthOfEvent = eventEnd.diff(eventStart, 'minutes');\n var eventBarColor = this.props.booking.Status.StatusType == -1 ? this.props.cancelledBarColor : this.props.eventBarColor;\n var eventStyle = {\n left: minutesFromMidnightToEventStart + \"px\",\n width: widthOfEvent + \"px\",\n backgroundColor: eventBarColor\n };\n var reservedStyle = {\n left: minutesFromMidnightToBookingStart + \"px\",\n width: widthOfBooking + \"px\",\n backgroundColor: this.props.reservedBarColor\n };\n var textStyle = {\n width: widthOfEvent - 10 + \"px\",\n color: this.props.textColor\n };\n return /*#__PURE__*/React.createElement(\"div\", {\n onClick: this.props.showBookingModal.bind(this, this.props.booking, this.props.building),\n className: \"pointer\"\n }, showEvent && widthOfEvent > 0 && /*#__PURE__*/React.createElement(\"div\", {\n className: \"e \" + notInRoomClass,\n style: eventStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"eventBarText\",\n style: textStyle\n }, this.props.barDisplayMode == 1 && /*#__PURE__*/React.createElement(\"ul\", {\n className: \"completionIcons\"\n }, this.props.allCompletions.map(function (ct) {\n return _this.hasCompletionType(ct) && /*#__PURE__*/React.createElement(\"li\", {\n key: ct.ID\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: ct.IconClass,\n style: {\n color: ct.IconColor\n }\n }));\n })), this.props.barDisplayMode == 0 && this.props.booking.EventName, this.props.barDisplayMode == 5 && this.props.booking.GroupName, this.props.barDisplayMode == 2 && /*#__PURE__*/React.createElement(ServicesCell, {\n item: this.props.booking,\n settings: this.props.settings,\n toggleServices: function toggleServices() {\n return;\n },\n iconSizeClass: \"\",\n textColor: this.props.textColor,\n userService: this.props.userService\n }), this.props.barDisplayMode == 3 && !isMazevo && this.props.booking.HasBookingAttachment && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cubes fa-1-5x pointer\"\n }), this.props.barDisplayMode == 4 && this.props.booking.HasDrawings && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cube fa-1-5x pointer\"\n }), this.props.barDisplayMode == 4 && isMazevo && this.props.booking.HasBookingAttachment && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cube fa-1-5x pointer\"\n }))), showBooking && widthOfBooking > 0 && widthOfBooking != widthOfEvent && /*#__PURE__*/React.createElement(\"div\", {\n className: \"b \" + notInRoomClass,\n style: reservedStyle\n }, \"\\xA0\"));\n }\n }]);\n\n return Booking;\n}(React.Component);\n\nBooking.propTypes = {\n booking: React.PropTypes.object,\n date: React.PropTypes.date,\n building: React.PropTypes.object,\n showBookingModal: React.PropTypes.func,\n eventBarColor: React.PropTypes.string,\n reservedBarColor: React.PropTypes.string,\n textColor: React.PropTypes.string,\n allCompletions: React.PropTypes.array,\n settings: React.PropTypes.array,\n cancelledBarColor: React.PropTypes.string\n};\nBooking.defaultProps = {\n settings: [],\n cancelledBarColor: 'red'\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar BookingModal = /*#__PURE__*/function (_React$Component) {\n _inherits(BookingModal, _React$Component);\n\n var _super = _createSuper(BookingModal);\n\n function BookingModal(props) {\n var _this;\n\n _classCallCheck(this, BookingModal);\n\n _this = _super.call(this, props);\n _this.state = {\n booking: _this.props.booking,\n showExtend: false\n };\n return _this;\n }\n\n _createClass(BookingModal, [{\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n this.setState({\n booking: nextProps.booking\n });\n var tId = nextProps.userService.tenantId();\n var allowedIds = [\"155\", \"1\", \"166\"];\n\n if (allowedIds.indexOf(tId) >= 0) {\n this.setState({\n showExtend: true\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n //let timezoneOffsetMinutes = -1 * this.props.building.EmsTimezoneMinuteOffsetFromTenantTimezone;\n var timezoneOffsetMinutes = this.props.building.EmsTimezoneMinuteOffsetFromTenantTimezone;\n var eventStart, eventEnd, bookingStart, bookingEnd;\n\n if (this.props.adjustTimes) {\n eventStart = moment(this.props.booking.BuildingLocalEventStart).add(timezoneOffsetMinutes, 'minutes').format(\"LT\");\n eventEnd = moment(this.props.booking.BuildingLocalEventEnd).add(timezoneOffsetMinutes, 'minutes').format(\"LT\");\n bookingStart = moment(this.props.booking.BuildingLocalReseveredStart).add(timezoneOffsetMinutes, 'minutes').format(\"LT\");\n bookingEnd = moment(this.props.booking.BuildingLocalReseveredEnd).add(timezoneOffsetMinutes, 'minutes').format(\"LT\");\n } else {\n eventStart = moment(this.props.booking.BuildingLocalEventStart).format(\"LT\");\n eventEnd = moment(this.props.booking.BuildingLocalEventEnd).format(\"LT\");\n bookingStart = moment(this.props.booking.BuildingLocalReseveredStart).format(\"LT\");\n bookingEnd = moment(this.props.booking.BuildingLocalReseveredEnd).format(\"LT\");\n }\n\n var gtLabel = null;\n var gtData = null;\n\n if (this.props.booking.GroupType) {\n gtLabel = /*#__PURE__*/React.createElement(\"dt\", null, \"Group Type\");\n gtData = /*#__PURE__*/React.createElement(\"dd\", null, this.props.booking.GroupType);\n }\n\n var bcDash = null;\n\n if (this.props.booking.BuildingCode) {\n bcDash = /*#__PURE__*/React.createElement(\"span\", null, \" - \");\n }\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n bsSize: \"lg\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.booking.EventName, \" - \", this.props.booking.BuildingCode, \" \", bcDash, \" \", /*#__PURE__*/React.createElement(\"span\", {\n className: \"roomDesc\"\n }, \" \", this.props.booking.RoomDescription), \" - (\", this.props.booking.SetupType, \", \", this.props.booking.SetupCount, \", act. \", this.props.booking.ActualCount, \")\")), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-md-6\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"groupDetails\"\n }, /*#__PURE__*/React.createElement(\"dl\", null, /*#__PURE__*/React.createElement(\"dt\", null, \"Reserved Start\"), /*#__PURE__*/React.createElement(\"dd\", null, bookingStart, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Event Start\"), /*#__PURE__*/React.createElement(\"dd\", null, eventStart, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Event End\"), /*#__PURE__*/React.createElement(\"dd\", null, eventEnd, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Reserved End\"), /*#__PURE__*/React.createElement(\"dd\", null, bookingEnd, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Status\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.booking.Status && this.props.booking.Status.Description, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Event Type\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.booking.EventType, \"\\xA0\")))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-md-6\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"groupDetails\"\n }, /*#__PURE__*/React.createElement(\"dl\", null, /*#__PURE__*/React.createElement(\"dt\", null, \"Reservation ID\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.booking.ReservationId, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Booking ID\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.booking.EventLocator, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Phone\"), /*#__PURE__*/React.createElement(\"dd\", null, /*#__PURE__*/React.createElement(\"a\", {\n href: \"tel:{this.props.booking.Phone}\"\n }, this.props.booking.Phone), \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Email\"), /*#__PURE__*/React.createElement(\"dd\", null, /*#__PURE__*/React.createElement(\"a\", {\n href: \"mailto:{this.props.booking.Email}\"\n }, this.props.booking.Email), \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Event Coordinator\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.booking.EventCoordinator, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Group\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.booking.GroupName, \"\\xA0\"), gtLabel, gtData, /*#__PURE__*/React.createElement(\"dt\", null, \"Contact\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.booking.FirstContact, \"\\xA0\"))))), this.props.booking.Services && this.props.booking.Services.length > 0 && /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"h4\", null, \"Services\"), /*#__PURE__*/React.createElement(ServicesList, {\n services: this.props.booking.Services,\n minutesSinceLastChange: \"1440\"\n })), this.props.booking.Udfs && this.props.booking.Udfs.length > 0 && /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"h4\", null, \"User Defined Fields\"), /*#__PURE__*/React.createElement(UdfsList, {\n udfs: this.props.booking.Udfs\n }))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"Close\")));\n }\n }]);\n\n return BookingModal;\n}(React.Component);\n\nBookingModal.propTypes = {\n booking: React.PropTypes.object,\n close: React.PropTypes.func\n};\nBookingModal.defaultProps = {\n booking: {\n Status: {}\n }\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar BookRow = /*#__PURE__*/function (_React$Component) {\n _inherits(BookRow, _React$Component);\n\n var _super = _createSuper(BookRow);\n\n function BookRow(props) {\n var _this;\n\n _classCallCheck(this, BookRow);\n\n _this = _super.call(this, props);\n _this.rowClicked = _this.rowClicked.bind(_assertThisInitialized(_this));\n _this.state = {\n startTimesToShow: []\n };\n return _this;\n }\n\n _createClass(BookRow, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {}\n }, {\n key: \"rowClicked\",\n value: function rowClicked(e) {\n var now = new Date();\n\n if (now.getDate() !== this.props.onDate.getDate()) {\n return;\n }\n\n var tId = this.props.userService.tenantId();\n var allowedIds = [\"155\", \"1\", \"166\"];\n\n if (allowedIds.indexOf(tId) === -1) {\n return;\n }\n\n var bookContainer = document.getElementById(\"bookScroll\");\n var scrollLeft = bookContainer.scrollLeft;\n var clientX = e.clientX;\n var totalLeft = scrollLeft + clientX;\n var midnightX = 408;\n var hourOfDay = (totalLeft - midnightX) / 60;\n var nowHour = now.getHours();\n\n for (var i = 0; i < this.props.room.Bookings.length; i++) {\n var bookingStart = moment(this.props.room.Bookings[i].BuildingLocalReseveredStart).toDate();\n var bookingEnd = moment(this.props.room.Bookings[i].BuildingLocalReseveredEnd).toDate();\n var bsHours = bookingStart.getHours();\n var beHours = bookingEnd.getHours();\n\n if (nowHour > hourOfDay) {\n return;\n }\n\n if (hourOfDay > bsHours && hourOfDay < beHours) {\n return;\n }\n }\n\n this.props.bookRowClicked(this.props.room, hourOfDay);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n if (!this.props.room.Bookings) {\n this.props.room.Bookings = [];\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"br \" + this.props[\"class\"],\n onClick: this.rowClicked\n }, this.props.room.Bookings.map(function (b) {\n return /*#__PURE__*/React.createElement(Booking, {\n key: b.Id,\n booking: b,\n date: _this2.props.date,\n building: _this2.props.building,\n showBookingModal: _this2.props.showBookingModal,\n eventBarColor: _this2.props.eventBarColor,\n reservedBarColor: _this2.props.reservedBarColor,\n cancelledBarColor: _this2.props.cancelledBarColor,\n textColor: _this2.props.textColor,\n allCompletions: _this2.props.allCompletions,\n barDisplayMode: _this2.props.barDisplayMode,\n settings: _this2.props.settings,\n adjustTimes: _this2.props.adjustTimes,\n userService: _this2.props.userService\n });\n }));\n }\n }]);\n\n return BookRow;\n}(React.Component);\n\nBookRow.propTypes = {\n \"class\": React.PropTypes.string,\n date: React.PropTypes.date,\n building: React.PropTypes.object,\n showBookingModal: React.PropTypes.func,\n eventBarColor: React.PropTypes.string,\n reservedBarColor: React.PropTypes.string,\n cancelledBarColor: React.PropTypes.string,\n textColor: React.PropTypes.string,\n allCompletions: React.PropTypes.array,\n barDisplayMode: React.PropTypes.number,\n settings: React.PropTypes.array,\n room: React.PropTypes.object,\n bookRowClicked: React.PropTypes.func\n};\nBookRow.defaultProps = {\n bookings: [],\n \"class\": \"\",\n allCompletions: [],\n barDisplayMode: 0,\n settings: []\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar BuildingRow = /*#__PURE__*/function (_React$Component) {\n _inherits(BuildingRow, _React$Component);\n\n var _super = _createSuper(BuildingRow);\n\n function BuildingRow(props) {\n _classCallCheck(this, BuildingRow);\n\n return _super.call(this, props);\n }\n\n _createClass(BuildingRow, [{\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var hours = [];\n var onTime = this.props.bookStart.clone();\n var endTime = this.props.bookEnd.clone();\n var minuteOffset = -1 * this.props.building.EmsTimezoneMinuteOffsetFromTenantTimezone;\n onTime = onTime.add(minuteOffset, 'minute');\n endTime = endTime.add(minuteOffset, 'minute');\n\n while (onTime.isBefore(endTime)) {\n hours.push(onTime.hours());\n onTime = onTime.add(1, 'hour');\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"buildingRow buildingColor\"\n }, hours.map(function (h) {\n return /*#__PURE__*/React.createElement(\"div\", {\n key: h,\n className: \"bTb\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"tbv\"\n }, _this.props.hoursDisplay(h)));\n }));\n }\n }]);\n\n return BuildingRow;\n}(React.Component);\n\nBuildingRow.propTypes = {\n hoursDisplay: React.PropTypes.func,\n building: React.PropTypes.object,\n bookStart: React.PropTypes.object,\n bookEnd: React.PropTypes.object\n};\nBuildingRow.defaultProps = {\n building: {}\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar TimeBlock = /*#__PURE__*/function (_React$Component) {\n _inherits(TimeBlock, _React$Component);\n\n var _super = _createSuper(TimeBlock);\n\n function TimeBlock(props) {\n _classCallCheck(this, TimeBlock);\n\n return _super.call(this, props);\n }\n\n _createClass(TimeBlock, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"tb\"\n }, this.props.hour);\n }\n }]);\n\n return TimeBlock;\n}(React.Component);\n\nTimeBlock.propTypes = {\n hour: React.PropTypes.number\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ACTItem = /*#__PURE__*/function (_React$Component) {\n _inherits(ACTItem, _React$Component);\n\n var _super = _createSuper(ACTItem);\n\n function ACTItem(props) {\n _classCallCheck(this, ACTItem);\n\n return _super.call(this, props);\n }\n\n _createClass(ACTItem, [{\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var s = {};\n\n if (this.props.highlightColor !== \"\") {\n s.color = this.props.highlightColor;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"categoryHeading ACT\"\n }, this.props.service.Category.Description), /*#__PURE__*/React.createElement(\"ul\", null, this.props.service.ServiceOrderDetails.map(function (sod) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: sod.ID,\n style: sod.MinutesSinceLastChange < _this.props.minutesSinceLastChange ? s : {},\n className: sod.MinutesSinceLastChange < _this.props.minutesSinceLastChange ? \"sodRecentlyChanged\" : \"\"\n }, moment(sod.TimeStart).format(\"LT\"), \" \", sod.TimeEnd && /*#__PURE__*/React.createElement(\"span\", null, \" - \", moment(sod.TimeEnd).format(\"LT\"), \" \"), sod.TempResourceDescription, \" \", sod.Notes && /*#__PURE__*/React.createElement(\"p\", {\n className: \"preWrap indent\"\n }, sod.Notes));\n })));\n }\n }]);\n\n return ACTItem;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ATTItem = /*#__PURE__*/function (_React$Component) {\n _inherits(ATTItem, _React$Component);\n\n var _super = _createSuper(ATTItem);\n\n function ATTItem(props) {\n var _this;\n\n _classCallCheck(this, ATTItem);\n\n _this = _super.call(this, props);\n _this.showCheckinModal = _this.showCheckinModal.bind(_assertThisInitialized(_this));\n _this.hideCheckinModal = _this.hideCheckinModal.bind(_assertThisInitialized(_this));\n _this.state = {\n checkinModalShowing: false,\n checkInSod: {}\n };\n return _this;\n }\n\n _createClass(ATTItem, [{\n key: \"showCheckinModal\",\n value: function showCheckinModal(item) {\n this.setState({\n checkinModalShowing: true,\n checkInSod: item\n });\n }\n }, {\n key: \"hideCheckinModal\",\n value: function hideCheckinModal() {\n this.setState({\n checkinModalShowing: false\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var s = {};\n\n if (this.props.highlightColor !== \"\") {\n s.color = this.props.highlightColor;\n }\n\n var internalAttendees = [];\n var externalAttendees = [];\n this.props.service.ServiceOrderDetails.map(function (sod) {\n if (sod.ExternalAttendee) {\n externalAttendees.push(sod);\n } else {\n internalAttendees.push(sod);\n }\n });\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"categoryHeading ATT\"\n }, this.props.service.Category.Description), /*#__PURE__*/React.createElement(\"ul\", null, externalAttendees.length > 0 && /*#__PURE__*/React.createElement(\"li\", null, \"External\", /*#__PURE__*/React.createElement(\"ul\", null, externalAttendees.map(function (sod) {\n return /*#__PURE__*/React.createElement(\"li\", {\n style: sod.MinutesSinceLastChange < _this2.props.minutesSinceLastChange ? s : {},\n className: sod.MinutesSinceLastChange < _this2.props.minutesSinceLastChange ? \"sodRecentlyChanged\" : \"\"\n }, sod.TempResourceDescription, sod.EmailAddress && /*#__PURE__*/React.createElement(\"span\", null, \"\\xA0-\\xA0\", /*#__PURE__*/React.createElement(\"a\", {\n \"ng-href\": \"mailto:{sod.EmailAddress}\"\n }, sod.EmailAddress)), sod.Phone && /*#__PURE__*/React.createElement(\"span\", null, \"\\xA0-\\xA0\", /*#__PURE__*/React.createElement(\"a\", {\n \"ng-href\": \"tel:{sod.Phone}\"\n }, sod.Phone)), /*#__PURE__*/React.createElement(\"span\", null, \"\\xA0-\\xA0\"), sod.CheckedIn && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-check-square green\",\n title: \"Checked in\"\n }), !sod.CheckedIn && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-square red\",\n title: \"Not checked in\"\n }), /*#__PURE__*/React.createElement(\"p\", {\n className: \"preWrap indent\"\n }, sod.Notes), /*#__PURE__*/React.createElement(\"p\", {\n className: \"preWrap indent\"\n }, sod.SpecialInstructions));\n }))), internalAttendees.length > 0 && /*#__PURE__*/React.createElement(\"li\", null, \"Internal\", /*#__PURE__*/React.createElement(\"ul\", null, internalAttendees.map(function (sod) {\n return /*#__PURE__*/React.createElement(\"li\", {\n style: sod.MinutesSinceLastChange < _this2.props.minutesSinceLastChange ? s : {},\n className: sod.MinutesSinceLastChange < _this2.props.minutesSinceLastChange ? \"sodRecentlyChanged\" : \"\"\n }, sod.TempResourceDescription, sod.EmailAddress && /*#__PURE__*/React.createElement(\"span\", null, \"\\xA0-\\xA0\", /*#__PURE__*/React.createElement(\"a\", {\n \"ng-href\": \"mailto:{sod.EmailAddress}\"\n }, sod.EmailAddress)), sod.Phone && /*#__PURE__*/React.createElement(\"span\", null, \"\\xA0-\\xA0\", /*#__PURE__*/React.createElement(\"a\", {\n \"ng-href\": \"tel:{sod.Phone}\"\n }, sod.Phone)), /*#__PURE__*/React.createElement(\"span\", null, \"\\xA0-\\xA0\"), sod.CheckedIn && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-check-square green\",\n title: \"Checked in\"\n }), !sod.CheckedIn && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-square red\",\n title: \"Not checked in\"\n }), /*#__PURE__*/React.createElement(\"p\", {\n className: \"preWrap indent\"\n }, sod.Notes), /*#__PURE__*/React.createElement(\"p\", {\n className: \"preWrap indent\"\n }, sod.SpecialInstructions));\n })))), /*#__PURE__*/React.createElement(ConfirmAttendeeCheckinModal, {\n show: this.state.checkinModalShowing,\n close: this.hideCheckinModal,\n sod: this.state.checkInSod,\n apiService: this.props.apiService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.props.updateItemInCollection\n }));\n }\n }]);\n\n return ATTItem;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar AvailableAtCell = /*#__PURE__*/function (_React$Component) {\n _inherits(AvailableAtCell, _React$Component);\n\n var _super = _createSuper(AvailableAtCell);\n\n function AvailableAtCell(props) {\n var _this;\n\n _classCallCheck(this, AvailableAtCell);\n\n _this = _super.call(this, props);\n _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));\n _this.selectChanged = _this.selectChanged.bind(_assertThisInitialized(_this));\n _this.state = {\n editMode: false,\n timeData: []\n };\n return _this;\n }\n\n _createClass(AvailableAtCell, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n this.loadTimeData();\n }\n }, {\n key: \"loadTimeData\",\n value: function loadTimeData() {\n if (this.state.timeData.length === 0) {\n var times = [],\n i,\n j,\n t,\n h,\n hh,\n m;\n\n for (i = 0; i < 24; i++) {\n hh = i;\n\n if (i === 0) {\n h = \"12\";\n } else {\n if (i > 12) {\n h = i % 12;\n } else {\n h = i;\n }\n }\n\n for (j = 0; j < 4; j++) {\n t = h + \":\" + (j === 0 ? \"00\" : 15 * j);\n m = (hh < 10 ? \"0\" + hh : hh) + \":\" + (j === 0 ? \"00\" : 15 * j);\n t += \" \" + Number(i) < 12 ? \" AM\" : \" PM\";\n times.push({\n value: m,\n text: t\n });\n }\n }\n\n this.setState({\n timeData: times\n });\n }\n }\n }, {\n key: \"roomsAvailableAtHtml\",\n value: function roomsAvailableAtHtml(item) {\n if (item.RoomAvailableAtAsDate) {\n // this will only be populated for EMS PS and only if it is calculated\n var rat = moment(item.RoomAvailableAtAsDate);\n return /*#__PURE__*/React.createElement(\"div\", null, rat.format(\"h:mm A\"));\n }\n\n if (item.RoomAvailableAt) {\n var buildingLocalTime = moment(item.BuildingLocalEventStart);\n var roomAvailSort = moment(item.RoomAvailableAtSort);\n var raat = moment(item.BuildingLocalEventStart);\n var timeParts = item.RoomAvailableAt.split(':');\n raat = raat.hour(timeParts[0]);\n raat = raat.minute(timeParts[1]);\n\n if (roomAvailSort.isBefore(buildingLocalTime, 'day')) {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-chevron-left\"\n }), \"\\xA0\", raat.format(\"h:mm A\"));\n } else {\n return /*#__PURE__*/React.createElement(\"div\", null, raat.format(\"h:mm A\"));\n }\n }\n\n return /*#__PURE__*/React.createElement(\"div\", null, \"\\xA0\");\n }\n }, {\n key: \"toggle\",\n value: function toggle() {\n this.setState({\n editMode: !this.state.editMode\n });\n }\n }, {\n key: \"selectChanged\",\n value: function selectChanged(event) {\n var availAtTime = event.target.value;\n this.props.setAvailableAt(this.props.item, availAtTime);\n this.setState({\n editMode: false\n });\n }\n }, {\n key: \"buildHtml\",\n value: function buildHtml() {\n if (this.state.editMode) {\n var times = this.state.timeData;\n var selectedTime = ''; //var options\n\n if (this.props.item.RoomAvailableAt != null) {\n selectedTime = this.props.item.RoomAvailableAt;\n }\n\n return /*#__PURE__*/React.createElement(\"td\", {\n className: \"noPadding aaCell\"\n }, /*#__PURE__*/React.createElement(\"select\", {\n value: selectedTime,\n onChange: this.selectChanged\n }, /*#__PURE__*/React.createElement(\"option\", {\n value: \"\"\n }), times.map(function (time, i) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: time.value,\n value: time.value\n }, time.text);\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-center\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n onClick: this.toggle\n }, \"cancel\")));\n } else {\n return /*#__PURE__*/React.createElement(\"td\", {\n onClick: this.toggle,\n className: \"aaCell\"\n }, this.roomsAvailableAtHtml(this.props.item));\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.buildHtml();\n }\n }]);\n\n return AvailableAtCell;\n}(React.Component);\n\nAvailableAtCell.propTypes = {\n item: React.PropTypes.object,\n setAvailableAt: React.PropTypes.func\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar AddEmsNoteModal = /*#__PURE__*/function (_React$Component) {\n _inherits(AddEmsNoteModal, _React$Component);\n\n var _super = _createSuper(AddEmsNoteModal);\n\n function AddEmsNoteModal(props) {\n var _this;\n\n _classCallCheck(this, AddEmsNoteModal);\n\n _this = _super.call(this, props);\n _this.addNote = _this.addNote.bind(_assertThisInitialized(_this));\n _this.addAndClose = _this.addAndClose.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(AddEmsNoteModal, [{\n key: \"addNote\",\n value: function addNote() {\n var that = this;\n var notes = $(\"#newNote\").val();\n\n if (notes) {\n var dto = {\n BookingId: this.props.item.BookingId,\n Note: $(\"#newNote\").val()\n };\n this.props.apiService.saveItem('api/DailySetup/AddEmsNote', dto).then(function (response) {\n if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n } //this.props.notesDataService.newNote(note, this.props.item);\n\n\n $(\"#newNote\").val(\"\");\n }\n }, {\n key: \"addAndClose\",\n value: function addAndClose() {\n this.addNote();\n this.props.close();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.EventName || this.props.item.TaskDescription)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"emsNoteModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Notes\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"text-left\"\n }, \"Note\"), /*#__PURE__*/React.createElement(\"textarea\", {\n id: \"newNote\",\n name: \"newNote\",\n className: \"form-control\"\n }))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.addAndClose\n }, \"Ok\")));\n }\n }]);\n\n return AddEmsNoteModal;\n}(React.Component);\n\nAddEmsNoteModal.propTypes = {\n show: React.PropTypes.bool,\n item: React.PropTypes.object,\n apiService: React.PropTypes.object,\n updateItemForBookingAction: React.PropTypes.func,\n updateItemInCollection: React.PropTypes.func\n};\n\nvar ActualCountModal = /*#__PURE__*/function (_React$Component2) {\n _inherits(ActualCountModal, _React$Component2);\n\n var _super2 = _createSuper(ActualCountModal);\n\n function ActualCountModal(props) {\n var _this2;\n\n _classCallCheck(this, ActualCountModal);\n\n _this2 = _super2.call(this, props);\n _this2.setActualAttendance = _this2.setActualAttendance.bind(_assertThisInitialized(_this2));\n _this2.addAndClose = _this2.addAndClose.bind(_assertThisInitialized(_this2));\n _this2.state = {\n value: ''\n };\n _this2.onChange = _this2.onChange.bind(_assertThisInitialized(_this2));\n return _this2;\n }\n\n _createClass(ActualCountModal, [{\n key: \"setActualAttendance\",\n value: function setActualAttendance() {\n var that = this;\n var count = this.state.value;\n\n if (count) {\n var dto = {\n Filters: this.props.filters,\n ActionDto: {\n BookingId: this.props.item.BookingId,\n ActualCount: count\n }\n };\n this.props.apiService.saveItem('api/DailySetup/UpdateActualCount', dto).then(function (response) {\n if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n }\n\n this.setState({\n value: \"\"\n });\n }\n }, {\n key: \"addAndClose\",\n value: function addAndClose() {\n this.setActualAttendance();\n this.props.close();\n }\n }, {\n key: \"onChange\",\n value: function onChange(e) {\n var re = /^[0-9\\b]+$/;\n\n if (e.target.value == '' || re.test(e.target.value)) {\n this.setState({\n value: e.target.value\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.EventName)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"emsActualCountModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Actual Count\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"text-left\",\n \"for\": \"actualCount\"\n }, \"Actual Count\"), /*#__PURE__*/React.createElement(\"input\", {\n type: \"number\",\n id: \"actualCount\",\n name: \"actualCount\",\n className: \"form-control\",\n value: this.state.value,\n onChange: this.onChange\n }))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.addAndClose\n }, \"Ok\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"Cancel\")));\n }\n }]);\n\n return ActualCountModal;\n}(React.Component);\n\nActualCountModal.propTypes = {\n show: React.PropTypes.bool,\n item: React.PropTypes.object,\n apiService: React.PropTypes.object,\n close: React.PropTypes.func,\n updateItemForBookingAction: React.PropTypes.func,\n filters: React.PropTypes.object\n};\n\nvar NoShowBookingModal = /*#__PURE__*/function (_React$Component3) {\n _inherits(NoShowBookingModal, _React$Component3);\n\n var _super3 = _createSuper(NoShowBookingModal);\n\n function NoShowBookingModal(props) {\n var _this3;\n\n _classCallCheck(this, NoShowBookingModal);\n\n _this3 = _super3.call(this, props);\n _this3.noShowBooking = _this3.noShowBooking.bind(_assertThisInitialized(_this3));\n _this3.saveAndClose = _this3.saveAndClose.bind(_assertThisInitialized(_this3));\n return _this3;\n }\n\n _createClass(NoShowBookingModal, [{\n key: \"noShowBooking\",\n value: function noShowBooking() {\n var that = this;\n var dto = {\n Filters: this.props.filters,\n ActionDto: {\n BookingId: this.props.item.BookingId\n }\n };\n this.props.apiService.saveItem('api/DailySetup/NoShowBooking', dto).then(function (response) {\n if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n }\n }, {\n key: \"saveAndClose\",\n value: function saveAndClose() {\n this.noShowBooking();\n this.props.close();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.EventName)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"emsNoShowBookingModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Are you sure you want to No Show this meeting?\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, \"This action can not be undone. Are you sure?\")))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.saveAndClose\n }, \"Yes\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"No\")));\n }\n }]);\n\n return NoShowBookingModal;\n}(React.Component);\n\nNoShowBookingModal.propTypes = {\n show: React.PropTypes.bool,\n item: React.PropTypes.object,\n apiService: React.PropTypes.object,\n close: React.PropTypes.func,\n settings: React.PropTypes.array,\n updateItemForBookingAction: React.PropTypes.func,\n filters: React.PropTypes.object,\n updateItemInCollection: React.PropTypes.func\n};\n\nvar ExtendBookingModal = /*#__PURE__*/function (_React$Component4) {\n _inherits(ExtendBookingModal, _React$Component4);\n\n var _super4 = _createSuper(ExtendBookingModal);\n\n function ExtendBookingModal(props) {\n var _this4;\n\n _classCallCheck(this, ExtendBookingModal);\n\n _this4 = _super4.call(this, props);\n _this4.extendBooking = _this4.extendBooking.bind(_assertThisInitialized(_this4));\n _this4.saveAndClose = _this4.saveAndClose.bind(_assertThisInitialized(_this4));\n _this4.state = {\n potentialDurations: [5, 15, 30, 60, 120],\n selectedDuration: 30\n };\n return _this4;\n }\n\n _createClass(ExtendBookingModal, [{\n key: \"extendBooking\",\n value: function extendBooking() {\n var that = this;\n var dto = {\n Filters: this.props.filters,\n ActionDto: {\n BookingId: this.props.item.BookingId,\n ExtendForXMinutes: that.state.selectedDuration\n }\n };\n this.props.apiService.saveItem('api/DailySetup/ExtendBooking', dto).then(function (response) {\n if (response.status != 200) {\n that.props.common.logger.error(\"There was a problem extending your meeting\");\n } else if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n }\n }, {\n key: \"saveAndClose\",\n value: function saveAndClose() {\n this.extendBooking();\n this.props.close();\n }\n }, {\n key: \"durationClicked\",\n value: function durationClicked(d) {\n this.setState({\n selectedDuration: d\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.EventName)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"emsNoExtendBookingModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Extend this meeting?\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", null, \"How much longer: \"), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"div\", {\n className: \"btn-group\"\n }, this.state.potentialDurations.map(function (d) {\n var cn = d == _this5.state.selectedDuration ? \"btn btn-success\" : \" btn btn-grey\";\n var text = d <= 30 ? d + \" min\" : d == 60 ? \"1 hr\" : d / 60 + \" hr\";\n return /*#__PURE__*/React.createElement(\"button\", {\n className: cn,\n onClick: function onClick() {\n return _this5.durationClicked(d);\n }\n }, text);\n })))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.saveAndClose\n }, \"Yes\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"No\")));\n }\n }]);\n\n return ExtendBookingModal;\n}(React.Component);\n\nExtendBookingModal.propTypes = {\n show: React.PropTypes.bool,\n item: React.PropTypes.object,\n apiService: React.PropTypes.object,\n close: React.PropTypes.func,\n settings: React.PropTypes.array,\n updateItemForBookingAction: React.PropTypes.func,\n filters: React.PropTypes.object,\n updateItemInCollection: React.PropTypes.func\n};\n\nvar EndBookingModal = /*#__PURE__*/function (_React$Component5) {\n _inherits(EndBookingModal, _React$Component5);\n\n var _super5 = _createSuper(EndBookingModal);\n\n function EndBookingModal(props) {\n var _this6;\n\n _classCallCheck(this, EndBookingModal);\n\n _this6 = _super5.call(this, props);\n _this6.endBooking = _this6.endBooking.bind(_assertThisInitialized(_this6));\n _this6.saveAndClose = _this6.saveAndClose.bind(_assertThisInitialized(_this6));\n return _this6;\n }\n\n _createClass(EndBookingModal, [{\n key: \"endBooking\",\n value: function endBooking() {\n var that = this;\n var dto = {\n Filters: this.props.filters,\n ActionDto: {\n BookingId: this.props.item.BookingId\n }\n };\n this.props.apiService.saveItem('api/DailySetup/EndBooking', dto).then(function (response) {\n if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n }\n }, {\n key: \"saveAndClose\",\n value: function saveAndClose() {\n this.endBooking();\n this.props.close();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.EventName)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"emsEndBookingModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Are you sure you want to end this meeting?\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, \"This action can not be undone. Are you sure?\")))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.saveAndClose\n }, \"Yes\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"No\")));\n }\n }]);\n\n return EndBookingModal;\n}(React.Component);\n\nvar ClearServiceModal = /*#__PURE__*/function (_React$Component6) {\n _inherits(ClearServiceModal, _React$Component6);\n\n var _super6 = _createSuper(ClearServiceModal);\n\n function ClearServiceModal(props) {\n var _this7;\n\n _classCallCheck(this, ClearServiceModal);\n\n _this7 = _super6.call(this, props);\n _this7.clearService = _this7.clearService.bind(_assertThisInitialized(_this7));\n _this7.saveAndClose = _this7.saveAndClose.bind(_assertThisInitialized(_this7));\n return _this7;\n }\n\n _createClass(ClearServiceModal, [{\n key: \"clearService\",\n value: function clearService() {\n var that = this;\n var dto = {\n Filters: this.props.filters,\n ActionDto: {\n BookingId: this.props.item.BookingId\n }\n };\n this.props.apiService.saveItem('api/DailySetup/ClearServiceMode', dto).then(function (response) {\n if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n }\n }, {\n key: \"saveAndClose\",\n value: function saveAndClose() {\n this.clearService();\n this.props.close();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.EventName)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"emsEndBookingModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Clear service mode for this room?\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, \"Are you sure?\")))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.saveAndClose\n }, \"Yes\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"No\")));\n }\n }]);\n\n return ClearServiceModal;\n}(React.Component);\n\nvar ConfirmCheckinModal = /*#__PURE__*/function (_React$Component7) {\n _inherits(ConfirmCheckinModal, _React$Component7);\n\n var _super7 = _createSuper(ConfirmCheckinModal);\n\n function ConfirmCheckinModal(props) {\n var _this8;\n\n _classCallCheck(this, ConfirmCheckinModal);\n\n _this8 = _super7.call(this, props);\n _this8.confirmCheckin = _this8.confirmCheckin.bind(_assertThisInitialized(_this8));\n _this8.saveAndClose = _this8.saveAndClose.bind(_assertThisInitialized(_this8));\n return _this8;\n }\n\n _createClass(ConfirmCheckinModal, [{\n key: \"confirmCheckin\",\n value: function confirmCheckin() {\n var that = this;\n var dto = {\n Filters: this.props.filters,\n ActionDto: {\n BookingId: this.props.item.BookingId\n }\n };\n this.props.apiService.saveItem('api/DailySetup/BookingCheckin', dto).then(function (response) {\n if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n }\n }, {\n key: \"saveAndClose\",\n value: function saveAndClose() {\n this.confirmCheckin();\n this.props.close();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.EventName)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"emsEndBookingModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Booking Check-In\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, \"Are you sure you want to check this booking in?\")))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.saveAndClose\n }, \"Yes\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"No\")));\n }\n }]);\n\n return ConfirmCheckinModal;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar BookingHistoryModal = /*#__PURE__*/function (_React$Component) {\n _inherits(BookingHistoryModal, _React$Component);\n\n var _super = _createSuper(BookingHistoryModal);\n\n function BookingHistoryModal(props) {\n _classCallCheck(this, BookingHistoryModal);\n\n return _super.call(this, props);\n }\n\n _createClass(BookingHistoryModal, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, \"Booking History\")), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, null, /*#__PURE__*/React.createElement(\"table\", {\n className: \"table table-condensed table-striped\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", null, \"Field\"), /*#__PURE__*/React.createElement(\"th\", null, \"Old Value\"), /*#__PURE__*/React.createElement(\"th\", null, \"New Value\"), /*#__PURE__*/React.createElement(\"th\", null, \"History Date\"))), /*#__PURE__*/React.createElement(\"tbody\", null, (this.props.item.history == null || this.props.item.history.length == 0) && /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: \"4\"\n }, \"New Booking or New/Changed Services\")), this.props.item.history && this.props.item.history.length > 0 && this.props.item.history.map(function (h) {\n return /*#__PURE__*/React.createElement(\"tr\", {\n key: h.HistoryUniqueId\n }, /*#__PURE__*/React.createElement(\"td\", null, h.FieldName), /*#__PURE__*/React.createElement(\"td\", null, h.OldValue), /*#__PURE__*/React.createElement(\"td\", null, h.NewValue), /*#__PURE__*/React.createElement(\"td\", null, moment(moment.utc(h.DateChangedUtc).toDate()).format(\"L LT\")));\n })))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"Close\")));\n }\n }]);\n\n return BookingHistoryModal;\n}(React.Component);\n\nBookingHistoryModal.propTypes = {\n show: React.PropTypes.bool,\n item: React.PropTypes.object\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar EventsTable = /*#__PURE__*/function (_React$Component) {\n _inherits(EventsTable, _React$Component);\n\n var _super = _createSuper(EventsTable);\n\n function EventsTable(props) {\n var _this;\n\n _classCallCheck(this, EventsTable);\n\n _this = _super.call(this, props);\n _this.hideNewTaskModal = _this.hideNewTaskModal.bind(_assertThisInitialized(_this));\n _this.showNewTaskModal = _this.showNewTaskModal.bind(_assertThisInitialized(_this));\n _this.showAddEmsNoteModal = _this.showAddEmsNoteModal.bind(_assertThisInitialized(_this));\n _this.hideAddEmsNoteModal = _this.hideAddEmsNoteModal.bind(_assertThisInitialized(_this));\n _this.showActualCountModal = _this.showActualCountModal.bind(_assertThisInitialized(_this));\n _this.hideActualCountModal = _this.hideActualCountModal.bind(_assertThisInitialized(_this));\n _this.showNoShowBookingModal = _this.showNoShowBookingModal.bind(_assertThisInitialized(_this));\n _this.hideNoShowBookingModal = _this.hideNoShowBookingModal.bind(_assertThisInitialized(_this));\n _this.showExtendBookingModal = _this.showExtendBookingModal.bind(_assertThisInitialized(_this));\n _this.showEndBookingModal = _this.showEndBookingModal.bind(_assertThisInitialized(_this));\n _this.showClearServiceModal = _this.showClearServiceModal.bind(_assertThisInitialized(_this));\n _this.showConfirmCheckinModal = _this.showConfirmCheckinModal.bind(_assertThisInitialized(_this));\n _this.hideConfirmCheckinModal = _this.hideConfirmCheckinModal.bind(_assertThisInitialized(_this));\n _this.hideExtendBookingModal = _this.hideExtendBookingModal.bind(_assertThisInitialized(_this));\n _this.updateItemInCollection = _this.updateItemInCollection.bind(_assertThisInitialized(_this));\n _this.hideEndBookingModal = _this.hideEndBookingModal.bind(_assertThisInitialized(_this));\n _this.hideClearServiceModal = _this.hideClearServiceModal.bind(_assertThisInitialized(_this));\n _this.isAllDone = _this.isAllDone.bind(_assertThisInitialized(_this));\n _this.showRow = _this.showRow.bind(_assertThisInitialized(_this));\n _this.sort = _this.sort.bind(_assertThisInitialized(_this));\n _this.state = {\n newTaskModalItem: {},\n newTaskModalShowing: false,\n actualCountModalShowing: false,\n servicesShowFor: [],\n linkedTaskModalItem: {},\n addEmsNoteModalShowing: false,\n noShowBookingModalShowing: false,\n extendBookingModalShowing: false,\n clearServiceModalShowing: false,\n endBookingModalShowing: false,\n confirmCheckinModalShowing: false,\n bookingActionItem: {},\n taskTemplates: []\n };\n return _this;\n }\n\n _createClass(EventsTable, [{\n key: \"sort\",\n value: function sort(propertyName, parser, sortPropertyName) {\n this.props.sort(this.props.items, propertyName, parser, sortPropertyName);\n }\n }, {\n key: \"hideNewTaskModal\",\n value: function hideNewTaskModal() {\n this.setState({\n newTaskModalShowing: false\n });\n }\n }, {\n key: \"showAddEmsNoteModal\",\n value: function showAddEmsNoteModal(item) {\n this.setState({\n addEmsNoteModalShowing: true,\n bookingActionItem: item\n });\n }\n }, {\n key: \"hideAddEmsNoteModal\",\n value: function hideAddEmsNoteModal() {\n this.setState({\n addEmsNoteModalShowing: false\n });\n }\n }, {\n key: \"showActualCountModal\",\n value: function showActualCountModal(item) {\n this.setState({\n actualCountModalShowing: true,\n bookingActionItem: item\n });\n }\n }, {\n key: \"showExtendBookingModal\",\n value: function showExtendBookingModal(item) {\n this.setState({\n extendBookingModalShowing: true,\n bookingActionItem: item\n });\n }\n }, {\n key: \"hideExtendBookingModal\",\n value: function hideExtendBookingModal() {\n this.setState({\n extendBookingModalShowing: false\n });\n }\n }, {\n key: \"showEndBookingModal\",\n value: function showEndBookingModal(item) {\n this.setState({\n endBookingModalShowing: true,\n bookingActionItem: item\n });\n }\n }, {\n key: \"showClearServiceModal\",\n value: function showClearServiceModal(item) {\n this.setState({\n clearServiceModalShowing: true,\n bookingActionItem: item\n });\n }\n }, {\n key: \"hideClearServiceModal\",\n value: function hideClearServiceModal() {\n this.setState({\n clearServiceModalShowing: false\n });\n }\n }, {\n key: \"showConfirmCheckinModal\",\n value: function showConfirmCheckinModal(item) {\n this.setState({\n confirmCheckinModalShowing: true,\n bookingActionItem: item\n });\n }\n }, {\n key: \"hideConfirmCheckinModal\",\n value: function hideConfirmCheckinModal() {\n this.setState({\n confirmCheckinModalShowing: false\n });\n }\n }, {\n key: \"hideEndBookingModal\",\n value: function hideEndBookingModal() {\n this.setState({\n endBookingModalShowing: false\n });\n }\n }, {\n key: \"hideActualCountModal\",\n value: function hideActualCountModal() {\n this.setState({\n actualCountModalShowing: false\n });\n }\n }, {\n key: \"showNoShowBookingModal\",\n value: function showNoShowBookingModal(item) {\n this.setState({\n noShowBookingModalShowing: true,\n bookingActionItem: item\n });\n }\n }, {\n key: \"hideNoShowBookingModal\",\n value: function hideNoShowBookingModal() {\n this.setState({\n noShowBookingModalShowing: false\n });\n }\n }, {\n key: \"updateItemInCollection\",\n value: function updateItemInCollection(item) {\n for (var i = 0; i < this.props.items.length; i++) {\n if (this.props.items[i][\"BookingId\"] === item[\"BookingId\"]) {\n this.props.items[i] = item;\n break;\n }\n }\n }\n }, {\n key: \"isAllDone\",\n value: function isAllDone(item) {\n var lastCompletion = this.props.completionsDataService.getLastCompletionForType(0, item);\n\n if (lastCompletion) {\n if (lastCompletion.CompletedAtUtc != null) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"showRow\",\n value: function showRow(item) {\n if (this.props.dropBookingsWhenComplete && this.isAllDone(item)) {\n return false;\n }\n\n if (this.props.checkedInOnly && !item.IsCheckedIn) {\n return false;\n }\n\n return true;\n }\n }, {\n key: \"showNewTaskModal\",\n value: function showNewTaskModal(item) {\n this.props.openNewTaskModal(item);\n return;\n\n var _that = this;\n\n var linkedTask;\n this.props.slidesDataService.getItem(\"api/Tasks/0\").then(function (response) {\n var allUsers = response.data.usersWithDepartments;\n var deptId = parseInt(window.localStorage.getItem(\"SevenPointTaskDepartmentId\")) || 0;\n\n _that.setState({\n departments: response.data.departments,\n allUsers: allUsers,\n taskTemplates: response.data.taskTemplates\n });\n\n linkedTask = {\n ID: -1,\n Description: \"Set \" + item.RoomDescription + \" for \" + item.EventName + \" on \" + moment(item.BuildingLocalEventStart).format(\"L\"),\n StartAt: \"06:00\",\n FinishBy: \"\",\n DisplayOn: new Date().toISOString(),\n DepartmentIds: [deptId],\n DisplayUntil: \"\",\n //DisplayUntil: moment(item.BuildingLocalReseveredStart).add(-1, 'days').toDate().toISOString(),\n DisplaysOnSunday: 0,\n DisplaysOnMonday: 0,\n DisplaysOnTuesday: 0,\n DisplaysOnWednesday: 0,\n DisplaysOnThursday: 0,\n DisplaysOnFriday: 0,\n DisplaysOnSaturday: 0,\n LinkedBookingId: item.BookingId,\n AssignedToUserId: null\n };\n var usersInDepartments = [];\n\n for (var i = 0; i < allUsers.length; i++) {\n var user = allUsers[i];\n\n for (var j = 0; j < user.Departments.length; j++) {\n if (deptId == user.Departments[j]) {\n usersInDepartments.push(user);\n }\n }\n }\n\n _that.setState({\n newTaskModalShowing: true,\n newTaskModalItem: linkedTask,\n linkedTaskModalItem: item,\n initialUsersInDepartment: usersInDepartments\n });\n }, function (error) {});\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var canShowLocationDetails = this.props.userService.apiTypeId() !== \"4D2BFEBD-7631-4AEE-96CF-392CFA0BFB3A\" && this.props.userService.apiTypeId() !== \"5C088F8B-7D16-4C06-B691-7E6FCD4344AD\";\n var haveNoShowStatus = false;\n var showAvailAt = true;\n var serviceHighlightColor = \"\";\n var nothingDoneColor = \"red\";\n\n for (var i = 0; i < this.props.settings.length; i++) {\n if (this.props.settings[i].SettingKey === \"NoShowStatusId\") {\n if (this.props.settings[i].SettingValue > 0) {\n haveNoShowStatus = true;\n }\n } else if (this.props.settings[i].SettingKey === \"AvailableAtTimeToUse\") {\n if (this.props.settings[i].SettingValue.toLowerCase() === 'fb35dae1-e2e8-4aac-b5c0-6236e594acc9') {\n showAvailAt = false;\n }\n } else if (this.props.settings[i].SettingKey === \"ServiceHighlightColor\") {\n serviceHighlightColor = this.props.settings[i].SettingValue;\n } else if (this.props.settings[i].SettingKey === \"NothingDoneDotColor\") {\n nothingDoneColor = this.props.settings[i].SettingValue;\n }\n }\n\n var udfLabel = this.props.userService.apiTypeId() === \"355A9B3B-BF7E-4D96-8B06-27B310EB01F0\" ? \"Custom Attributes\" : \"User Defined Fields\";\n var resTimeLabel = null;\n var resEndTimeLabel = null;\n var brLabel = null;\n\n if (this.props.showReservedTime) {\n resTimeLabel = /*#__PURE__*/React.createElement(\"span\", {\n className: this.props.sortHeaderClass(\"BuildingLocalReseveredStart\"),\n onClick: function onClick() {\n return _this2.sort('BuildingLocalReseveredStart');\n }\n }, \"Res Start\");\n resEndTimeLabel = /*#__PURE__*/React.createElement(\"span\", {\n className: this.props.sortHeaderClass(\"BuildingLocalReseveredEnd\"),\n onClick: function onClick() {\n return _this2.sort('BuildingLocalReseveredEnd');\n }\n }, \"Res End\");\n brLabel = /*#__PURE__*/React.createElement(\"br\", null);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"table\", {\n id: \"dailySetupBookings\",\n className: \"responsiveTable dailySetup table table-condensed table-striped-hiddenRows\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, \"Recent Changes\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"dotColumn\"\n }, \"Done\"), showAvailAt && /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 80 + 'px'\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.props.sortHeaderClass(\"RoomAvailableAtSort\"),\n onClick: function onClick() {\n return _this2.sort('RoomAvailableAt', null, 'RoomAvailableAtSort');\n }\n }, \"Available\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 85 + 'px'\n }\n }, resTimeLabel, brLabel, /*#__PURE__*/React.createElement(\"span\", {\n className: this.props.sortHeaderClass(\"BuildingLocalEventStart\"),\n onClick: function onClick() {\n return _this2.sort('BuildingLocalEventStart');\n }\n }, \"Evt Start\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 80 + 'px'\n }\n }, resEndTimeLabel, brLabel, /*#__PURE__*/React.createElement(\"span\", {\n className: this.props.sortHeaderClass(\"BuildingLocalEventEnd\"),\n onClick: function onClick() {\n return _this2.sort('BuildingLocalEventEnd');\n }\n }, \"Evt End\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n onClick: function onClick() {\n return _this2.sort('RoomDescription');\n },\n className: this.props.sortHeaderClass(\"RoomDescription\")\n }, \"Location\"), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"span\", {\n onClick: function onClick() {\n return _this2.sort('EventName');\n },\n className: this.props.sortHeaderClass(\"EventName\")\n }, \"Event Name\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.props.sortHeaderClass(\"GroupName\"),\n onClick: function onClick() {\n return _this2.sort('GroupName');\n }\n }, \"Group\"), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"span\", {\n className: this.props.sortHeaderClass(\"FirstContact\"),\n onClick: function onClick() {\n return _this2.sort('FirstContact');\n }\n }, \"Contact\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer \" + this.props.sortHeaderClass(\"Status.Description\"),\n onClick: function onClick() {\n return _this2.sort('Status.Description');\n }\n }, \"Status\", /*#__PURE__*/React.createElement(\"br\", null), \"Event Type\"), /*#__PURE__*/React.createElement(\"th\", null, \"Actions\"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"servicesColumn\"\n }, \"Details\"), /*#__PURE__*/React.createElement(\"th\", null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, \"Linked Task\")))), this.props.items.length === 0 && /*#__PURE__*/React.createElement(\"tbody\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: \"11\"\n }, this.props.noEventsMessage))), this.props.items.map(function (item) {\n return /*#__PURE__*/React.createElement(\"tbody\", {\n key: item.BookingId\n }, /*#__PURE__*/React.createElement(BookingRow, {\n key: item.BookingId,\n item: item,\n minutesSinceLastChange: _this2.props.minutesSinceLastChange,\n showReservedTime: _this2.props.showReservedTime,\n settings: _this2.props.settings,\n completionTypes: _this2.props.completionTypes,\n getHistoryForBooking: _this2.props.getHistoryForBooking,\n completionsDataService: _this2.props.completionsDataService,\n showCompletionModal: _this2.props.showCompletionModal,\n showHistoryModal: _this2.props.showHistoryModal,\n allCompletionTypes: _this2.props.allCompletionTypes,\n setAvailableAt: _this2.props.setAvailableAt,\n showNotesModal: _this2.props.showNotesModal,\n showCarouselModal: _this2.props.showCarouselModal,\n showNewTaskModal: _this2.showNewTaskModal,\n showExtendBookingModal: _this2.showExtendBookingModal,\n showEndBookingModal: _this2.showEndBookingModal,\n toggleServices: _this2.props.toggleServices,\n showAddEmsNoteModal: _this2.showAddEmsNoteModal,\n showActualCountModal: _this2.showActualCountModal,\n showNoShowBookingModal: _this2.showNoShowBookingModal,\n showNoShowAction: _this2.props.showNoShowAction,\n showEstimatedCountAction: _this2.props.showEstimatedCountAction,\n showAddToCalendarAction: _this2.props.showAddToCalendarAction,\n onDate: _this2.props.onDate,\n haveNoShowStatus: haveNoShowStatus,\n showAvailAt: showAvailAt,\n apiService: _this2.props.slidesDataService,\n userService: _this2.props.userService,\n limitCompletionsByDeparments: _this2.props.limitCompletionsByDeparments,\n nothingDoneColor: nothingDoneColor,\n showLocationDetailsModal: _this2.props.showLocationDetailsModal,\n canShowLocationDetails: canShowLocationDetails,\n showRow: _this2.showRow(item),\n showRoomCode: _this2.props.showRoomCode,\n showClearServiceModal: _this2.showClearServiceModal,\n showConfirmCheckinModal: _this2.showConfirmCheckinModal\n }), _this2.showRow(item) && item.Services.length > 0 && (item.servicesShowing || _this2.props.expandAllServices) && /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: \"11\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"detailsHeading\"\n }, \"Services\"), /*#__PURE__*/React.createElement(ServicesList, {\n services: item.Services,\n apiService: _this2.props.slidesDataService,\n filters: _this2.props.filters,\n updateItemForBookingAction: _this2.props.updateItemForBookingAction,\n updateItemInCollection: _this2.updateItemInCollection,\n minutesSinceLastChange: _this2.props.minutesSinceLastChange,\n highlightColor: serviceHighlightColor\n }))), _this2.showRow(item) && item.Udfs !== null && item.Udfs.length > 0 && (item.servicesShowing || _this2.props.expandAllServices) && /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: \"11\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"detailsHeading\"\n }, udfLabel), /*#__PURE__*/React.createElement(UdfsList, {\n udfs: item.Udfs\n }))), _this2.showRow(item) && item.LinkedTasks && item.LinkedTasks.length > 0 && (item.servicesShowing || _this2.props.expandAllServices) && /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: \"11\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"detailsHeading\"\n }, \"Linked Tasks\"), /*#__PURE__*/React.createElement(\"div\", {\n style: {\n width: 95 + \"%\"\n },\n className: \"center\"\n }, /*#__PURE__*/React.createElement(\"table\", {\n width: \"100%\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", {\n className: \"dotColumn\"\n }, \"Done\"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 13 + \"%\"\n }\n }, \"Start At\"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 13 + \"%\"\n }\n }, \"Finish By\"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 10 + \"%\"\n }\n }, \"Department\"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 10 + \"%\"\n }\n }, \"Assigned To\"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 34 + \"%\"\n }\n }, \"Description\"), /*#__PURE__*/React.createElement(\"th\", {\n style: {\n width: 5 + \"%\"\n }\n }, \"Notes\"), /*#__PURE__*/React.createElement(\"th\", {\n style: {\n width: 5 + \"%\"\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, \"Linked Tasks\")))), item.LinkedTasks.map(function (task) {\n return /*#__PURE__*/React.createElement(TaskRow, {\n key: task.TaskId,\n item: task,\n includeDate: true,\n showCompletionModal: _this2.props.showCompletionModal,\n showNotesModal: _this2.props.showNotesModal,\n canEditTask: _this2.props.canEditTask,\n editTask: _this2.props.editTask,\n showHistoryModal: _this2.props.showHistoryModal,\n settings: _this2.props.settings,\n completionsDataService: _this2.props.completionsDataService,\n allCompletionTypes: _this2.props.allCompletionTypes,\n getLinkedBooking: _this2.props.getLinkedBooking,\n toggleServices: _this2.props.toggleServices,\n showCarouselModal: _this2.props.showCarouselModal,\n userService: _this2.props.userService,\n limitCompletionsByDeparments: _this2.props.limitCompletionsByDeparments,\n nothingDoneColor: nothingDoneColor,\n hideLinkedBooking: true\n });\n }))))));\n })), /*#__PURE__*/React.createElement(NewTaskModal, {\n show: this.state.newTaskModalShowing,\n linkedTask: this.state.newTaskModalItem,\n departments: this.state.departments,\n allUsers: this.state.allUsers,\n close: this.hideNewTaskModal,\n apiService: this.props.slidesDataService,\n updateBookingWithTaskId: this.props.updateBookingWithTaskId,\n linkedTaskModalItem: this.state.linkedTaskModalItem,\n initialUsersInDepartment: this.state.initialUsersInDepartment,\n taskTemplates: this.state.taskTemplates\n }), /*#__PURE__*/React.createElement(AddEmsNoteModal, {\n show: this.state.addEmsNoteModalShowing,\n close: this.hideAddEmsNoteModal,\n item: this.state.bookingActionItem,\n apiService: this.props.slidesDataService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.updateItemInCollection\n }), /*#__PURE__*/React.createElement(ActualCountModal, {\n show: this.state.actualCountModalShowing,\n close: this.hideActualCountModal,\n item: this.state.bookingActionItem,\n apiService: this.props.slidesDataService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.updateItemInCollection\n }), /*#__PURE__*/React.createElement(NoShowBookingModal, {\n settings: this.props.settings,\n show: this.state.noShowBookingModalShowing,\n close: this.hideNoShowBookingModal,\n item: this.state.bookingActionItem,\n apiService: this.props.slidesDataService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.updateItemInCollection\n }), /*#__PURE__*/React.createElement(ExtendBookingModal, {\n settings: this.props.settings,\n show: this.state.extendBookingModalShowing,\n close: this.hideExtendBookingModal,\n item: this.state.bookingActionItem,\n apiService: this.props.slidesDataService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.updateItemInCollection,\n common: this.props.common\n }), /*#__PURE__*/React.createElement(EndBookingModal, {\n settings: this.props.settings,\n show: this.state.endBookingModalShowing,\n close: this.hideEndBookingModal,\n item: this.state.bookingActionItem,\n apiService: this.props.slidesDataService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.updateItemInCollection,\n common: this.props.common\n }), /*#__PURE__*/React.createElement(ClearServiceModal, {\n settings: this.props.settings,\n show: this.state.clearServiceModalShowing,\n close: this.hideClearServiceModal,\n item: this.state.bookingActionItem,\n apiService: this.props.slidesDataService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.updateItemInCollection,\n common: this.props.common\n }), /*#__PURE__*/React.createElement(ConfirmCheckinModal, {\n settings: this.props.settings,\n show: this.state.confirmCheckinModalShowing,\n close: this.hideConfirmCheckinModal,\n item: this.state.bookingActionItem,\n apiService: this.props.slidesDataService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.updateItemInCollection,\n common: this.props.common\n }));\n }\n }]);\n\n return EventsTable;\n}(React.Component);\n\nEventsTable.propTypes = {\n items: React.PropTypes.array,\n showReservedTime: React.PropTypes.bool,\n minutesSinceLastChange: React.PropTypes.number,\n settings: React.PropTypes.array,\n expandAllServices: React.PropTypes.bool,\n allCompletionTypes: React.PropTypes.array,\n getHistoryForBooking: React.PropTypes.func,\n completionsDataService: React.PropTypes.object,\n setAvailableAt: React.PropTypes.func,\n notesDataService: React.PropTypes.object,\n userService: React.PropTypes.object,\n sort: React.PropTypes.func,\n sortProperty: React.PropTypes.string,\n sortIsDesc: React.PropTypes.bool,\n slidesDataService: React.PropTypes.object,\n showCarouselModal: React.PropTypes.func,\n toggleServices: React.PropTypes.func,\n noEventsMessage: React.PropTypes.string,\n toggleFullView: React.PropTypes.func,\n updateBookingWithTaskId: React.PropTypes.func.isRequired,\n showNoShowAction: React.PropTypes.bool,\n showEstimatedCountAction: React.PropTypes.bool,\n showAddToCalendarAction: React.PropTypes.bool,\n updateItemForBookingAction: React.PropTypes.func,\n filters: React.PropTypes.object\n};\n\nvar BookingRow = /*#__PURE__*/function (_React$Component2) {\n _inherits(BookingRow, _React$Component2);\n\n var _super2 = _createSuper(BookingRow);\n\n function BookingRow(props) {\n var _this3;\n\n _classCallCheck(this, BookingRow);\n\n _this3 = _super2.call(this, props);\n _this3.toggleServices = _this3.toggleServices.bind(_assertThisInitialized(_this3));\n _this3.isAllDone = _this3.isAllDone.bind(_assertThisInitialized(_this3));\n _this3.bookingActionSelect = _this3.bookingActionSelect.bind(_assertThisInitialized(_this3));\n return _this3;\n }\n\n _createClass(BookingRow, [{\n key: \"toggleServices\",\n value: function toggleServices() {\n this.props.toggleServices(this.props.item);\n }\n }, {\n key: \"bookingActionSelect\",\n value: function bookingActionSelect(eventKey) {\n if (eventKey == 1) {\n this.props.showAddEmsNoteModal(this.props.item);\n }\n\n if (eventKey == 2) {\n this.props.showNoShowBookingModal(this.props.item);\n }\n\n if (eventKey == 3) {\n this.props.showActualCountModal(this.props.item);\n }\n\n if (eventKey == 4) {\n this.props.completionsDataService.getIcs(this.props.item);\n }\n\n if (eventKey == 6) {\n this.props.showLocationDetailsModal(this.props.item);\n }\n\n if (eventKey == 7) {\n this.props.showExtendBookingModal(this.props.item);\n }\n\n if (eventKey == 8) {\n this.props.showEndBookingModal(this.props.item);\n }\n\n if (eventKey == 9) {\n this.props.showClearServiceModal(this.props.item);\n }\n\n if (eventKey == 10) {\n this.props.showConfirmCheckinModal(this.props.item);\n }\n }\n }, {\n key: \"isAllDone\",\n value: function isAllDone() {\n var lastCompletion = this.props.completionsDataService.getLastCompletionForType(0, this.props.item);\n\n if (lastCompletion) {\n if (lastCompletion.CompletedAtUtc != null) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"render\",\n value: function render() {\n var tId = this.props.userService.tenantId();\n var showExtendBooking = false;\n var showEndBooking = false;\n var showCheckin = false;\n var allowedIds = [\"1\", \"166\", \"155\"];\n\n if (allowedIds.indexOf(tId) >= 0) {\n showExtendBooking = true;\n }\n\n var allowedEndIds = [\"1\", \"166\"];\n\n if (allowedEndIds.indexOf(tId) >= 0) {\n showEndBooking = true;\n }\n\n var showNoShow = this.props.haveNoShowStatus;\n var startTimeCell = null;\n var endTimeCell = null;\n var onDate = moment(this.props.onDate);\n var reservedStart = moment(this.props.item.BuildingLocalReseveredStart);\n var eventStart = moment(this.props.item.BuildingLocalEventStart);\n var eventEnd = moment(this.props.item.BuildingLocalEventEnd);\n var now = moment();\n\n if (now.isBefore(eventStart) || now.isAfter(eventEnd)) {\n showEndBooking = false;\n showExtendBooking = false;\n\n if (tId == \"166\") {\n if (now.isBefore(eventStart) || now.isSame(eventStart, 'day') == false) {\n showExtendBooking = false;\n } else {\n showExtendBooking = true;\n }\n } else {\n showExtendBooking = false;\n }\n }\n\n if (tId == \"166\") {\n if (this.props.item.IsCheckedIn == false) {\n if (now.isAfter(eventStart) && now.isBefore(eventEnd)) {\n showCheckin = true;\n }\n }\n }\n\n var rowStyle = {};\n\n if (this.props.showReservedTime) {\n if (reservedStart.isBefore(onDate, 'day')) {\n startTimeCell = /*#__PURE__*/React.createElement(\"td\", {\n className: \"showResStartTime\",\n onClick: this.toggleServices\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-chevron-left\",\n title: \"Previous Day\"\n }), this.props.item.BuildingLocalReseveredStartDisplay, /*#__PURE__*/React.createElement(\"br\", null), this.props.item.BuildingLocalEventStartDisplay);\n } else {\n startTimeCell = /*#__PURE__*/React.createElement(TwoRowCell, {\n cellStyle: rowStyle,\n cellClass: \"showResStartTime\",\n item: this.props.item,\n rowOne: this.props.item.BuildingLocalReseveredStartDisplay,\n rowTwo: this.props.item.BuildingLocalEventStartDisplay,\n toggleServices: this.toggleServices\n });\n }\n\n endTimeCell = /*#__PURE__*/React.createElement(TwoRowCell, {\n cellClass: \"showResEndTime\",\n item: this.props.item,\n rowOne: this.props.item.BuildingLocalReseveredEndDisplay,\n rowTwo: this.props.item.BuildingLocalEventEndDisplay,\n toggleServices: this.toggleServices\n });\n } else {\n if (eventStart.isBefore(onDate, 'day')) {\n startTimeCell = /*#__PURE__*/React.createElement(\"td\", {\n cellClass: \"hideResStartTime\",\n toggleServices: this.toggleServices\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-chevron-left\"\n }), this.props.item.BuildingLocalEventStartDisplay);\n } else {\n startTimeCell = /*#__PURE__*/React.createElement(Cell, {\n cellClass: \"hideResStartTime\",\n data: this.props.item.BuildingLocalEventStartDisplay,\n item: this.props.item,\n toggleServices: this.toggleServices\n });\n }\n\n endTimeCell = /*#__PURE__*/React.createElement(Cell, {\n cellClass: \"hideResEndTime\",\n data: this.props.item.BuildingLocalEventEndDisplay,\n item: this.props.item,\n toggleServices: this.toggleServices\n });\n }\n\n var rowClass = \" bookingRow \";\n\n if (this.props.item.Status && this.props.item.Status.StatusType == -1) {\n rowClass += \" cancelled\";\n }\n\n if (this.props.item.MinutesSinceLastChange < this.props.minutesSinceLastChange) {\n rowClass += \" recentlyChanged\";\n }\n\n if ((!this.props.item.Services || this.props.item.Services.length === 0) && (!this.props.item.LinkedTasks || this.props.item.LinkedTasks.length === 0) && (!this.props.item.Udfs || this.props.item.Udfs.length === 0)) {\n rowClass += \" noPointer\";\n }\n\n var notesCell = null;\n var actionButtonStyle = null;\n\n if (this.props.item.RequiresAcknowledgement) {\n notesCell = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-comments fa-1-5x\",\n title: \"View/Add Notes\"\n });\n actionButtonStyle = \"warning\";\n } else if (this.props.item.Notes && this.props.item.Notes.length > 0) {\n notesCell = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-comments fa-1-5x\",\n title: \"View/Add Notes\"\n });\n actionButtonStyle = \"primary\";\n } else {\n notesCell = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-comments-o fa-1-5x\",\n title: \"Add Notes\"\n });\n actionButtonStyle = \"default\";\n }\n\n return this.props.showRow && /*#__PURE__*/React.createElement(\"tr\", {\n key: this.props.item.BookingId,\n className: \"responsiveRow dailySetupRow\" + rowClass\n }, /*#__PURE__*/React.createElement(RecentChangesCell, {\n item: this.props.item,\n minutesSinceLastChange: this.props.minutesSinceLastChange,\n showHistoryModal: this.props.showHistoryModal\n }), /*#__PURE__*/React.createElement(CompletionsCell, {\n item: this.props.item,\n showCompletionModal: this.props.showCompletionModal,\n allCompletionTypes: this.props.allCompletionTypes,\n completionsDataService: this.props.completionsDataService,\n isAllDone: this.isAllDone,\n userService: this.props.userService,\n limitCompletionsByDeparments: this.props.limitCompletionsByDeparments,\n nothingDoneColor: this.props.nothingDoneColor\n }), this.props.showAvailAt && /*#__PURE__*/React.createElement(AvailableAtCell, {\n item: this.props.item,\n setAvailableAt: this.props.setAvailableAt\n }), startTimeCell, endTimeCell, /*#__PURE__*/React.createElement(LocationEventNameCell, {\n showLocationDetailsModal: this.props.showLocationDetailsModal,\n item: this.props.item,\n showCarouselModal: this.props.showCarouselModal,\n toggleServices: this.toggleServices,\n showRoomCode: this.props.showRoomCode,\n userService: this.props.userService\n }), /*#__PURE__*/React.createElement(GroupContactCell, {\n item: this.props.item,\n apiService: this.props.apiService,\n userService: this.props.userService\n }), /*#__PURE__*/React.createElement(TwoRowCell, {\n cellClass: \"seCell\",\n rowOne: this.props.item.Status.Description,\n rowTwo: this.props.item.EventType,\n item: this.props.item,\n toggleServices: this.toggleServices\n }), /*#__PURE__*/React.createElement(\"td\", {\n className: \"aCell\"\n }, this.props.showNoShowAction == false && this.props.showEstimatedCountAction == false && this.props.showAddToCalendarAction == false && /*#__PURE__*/React.createElement(\"a\", {\n onClick: this.props.showNotesModal.bind(this, this.props.item)\n }, notesCell), (this.props.showNoShowAction || this.props.showEstimatedCountAction || this.props.showAddToCalendarAction) && /*#__PURE__*/React.createElement(ReactBootstrap.ButtonToolbar, null, /*#__PURE__*/React.createElement(ReactBootstrap.Dropdown, null, /*#__PURE__*/React.createElement(ReactBootstrap.Dropdown.Toggle, {\n noCaret: true,\n bsStyle: actionButtonStyle,\n \"aria-label\": \"Open booking actions menu\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Glyphicon, {\n glyph: \"pencil\"\n })), /*#__PURE__*/React.createElement(ReactBootstrap.Dropdown.Menu, null, /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"1\",\n onSelect: this.props.showNotesModal.bind(this, this.props.item)\n }, notesCell, \"\\xA0Notes\"), this.props.showNoShowAction && showNoShow && /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"2\",\n onSelect: this.bookingActionSelect\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-close fa-1-5x\",\n title: \"No Show\"\n }), \"\\xA0No Show\"), this.props.showEstimatedCountAction && /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"3\",\n onSelect: this.bookingActionSelect\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-user fa-1-5x\",\n title: \"Actual Count\"\n }), \"\\xA0Actual Count (\", this.props.item.ActualCount, \")\"), this.props.showAddToCalendarAction && /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"4\",\n onSelect: this.bookingActionSelect\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-calendar fa-1-5x\",\n title: \"Download ICS\"\n }), \"\\xA0Add To Calendar\"), /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"5\",\n onSelect: this.props.showNewTaskModal.bind(this, this.props.item)\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-check-square-o \",\n title: \"Add Task\"\n }), \"\\xA0New Task\"), this.props.canShowLocationDetails && /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"6\",\n onSelect: this.bookingActionSelect\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-building fa-1-5x\",\n title: \"Location Details\"\n }), \"\\xA0Location Details\"), showExtendBooking && /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"7\",\n onSelect: this.bookingActionSelect\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-forward fa-1-5x\",\n title: \"Extend Booking\"\n }), \"\\xA0Extend\"), showEndBooking && /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"8\",\n onSelect: this.bookingActionSelect\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-ban fa-1-5x\",\n title: \"End Booking\"\n }), \"\\xA0End\"), this.props.item.RoomNeedsSanitized && /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"9\",\n onSelect: this.bookingActionSelect\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-check fa-1-5x\",\n title: \"Clear Service Mode\"\n }), \"\\xA0Clear Service\"), showCheckin && /*#__PURE__*/React.createElement(ReactBootstrap.MenuItem, {\n eventKey: \"10\",\n onSelect: this.bookingActionSelect\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-check-circle fa-1-5x\",\n title: \"Check-in\"\n }), \"\\xA0Check-in\"))))), /*#__PURE__*/React.createElement(ServicesCell, {\n item: this.props.item,\n settings: this.props.settings,\n toggleServices: this.toggleServices,\n userService: this.props.userService\n }), /*#__PURE__*/React.createElement(\"td\", null, !this.props.isRelatedBooking && moment(this.props.item.BuildingLocalEventStart).isAfter(moment(), 'day') && /*#__PURE__*/React.createElement(\"a\", {\n onClick: this.props.showNewTaskModal.bind(this, this.props.item),\n href: \"#\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa \" + (this.props.item.LinkedTaskId > 0 ? \"fa-check-square-o\" : \"fa-square-o\"),\n title: (this.props.item.LinkedTaskId > 0 ? \"Edit\" : \"Create\") + \" linked task\"\n }), \" \")));\n }\n }]);\n\n return BookingRow;\n}(React.Component);\n\nBookingRow.propTypes = {\n item: React.PropTypes.object,\n settings: React.PropTypes.array,\n showHistory: React.PropTypes.func,\n showCompletionModal: React.PropTypes.func,\n showHistoryModal: React.PropTypes.func,\n setAvailableAt: React.PropTypes.func,\n showCarouselModal: React.PropTypes.func,\n toggleServices: React.PropTypes.func,\n isRelatedBooking: React.PropTypes.bool,\n showAddEmsNoteModal: React.PropTypes.func,\n showNoShowAction: React.PropTypes.bool,\n showEstimatedCountAction: React.PropTypes.bool,\n showAddToCalendarAction: React.PropTypes.bool,\n limitCompletionsByDeparments: React.PropTypes.bool\n};\n\nvar ServicesRow = /*#__PURE__*/function (_React$Component3) {\n _inherits(ServicesRow, _React$Component3);\n\n var _super3 = _createSuper(ServicesRow);\n\n function ServicesRow(props) {\n _classCallCheck(this, ServicesRow);\n\n return _super3.call(this, props);\n }\n\n _createClass(ServicesRow, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"tr\", {\n key: this.props.item.BookingId\n }, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: 11\n }));\n }\n }]);\n\n return ServicesRow;\n}(React.Component);\n\nServicesRow.propTypes = {\n item: React.PropTypes.object\n};\n\nvar Cell = /*#__PURE__*/function (_React$Component4) {\n _inherits(Cell, _React$Component4);\n\n var _super4 = _createSuper(Cell);\n\n function Cell(props) {\n _classCallCheck(this, Cell);\n\n return _super4.call(this, props);\n }\n\n _createClass(Cell, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"td\", {\n className: this.props.cellClass,\n onClick: this.props.toggleServices\n }, this.props.data);\n }\n }]);\n\n return Cell;\n}(React.Component);\n\nCell.propTypes = {\n data: React.PropTypes.string,\n toggleServices: React.PropTypes.func,\n cellClass: React.PropTypes.string\n};\n\nvar TwoRowCell = /*#__PURE__*/function (_React$Component5) {\n _inherits(TwoRowCell, _React$Component5);\n\n var _super5 = _createSuper(TwoRowCell);\n\n function TwoRowCell(props) {\n _classCallCheck(this, TwoRowCell);\n\n return _super5.call(this, props);\n }\n\n _createClass(TwoRowCell, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"td\", {\n style: this.props.cellStyle,\n className: this.props.cellClass,\n onClick: this.props.toggleServices\n }, this.props.rowOne, /*#__PURE__*/React.createElement(\"br\", null), this.props.rowTwo);\n }\n }]);\n\n return TwoRowCell;\n}(React.Component);\n\nTwoRowCell.propTypes = {\n rowOne: React.PropTypes.string,\n rowTwo: React.PropTypes.string,\n toggleServices: React.PropTypes.func,\n cellClass: React.PropTypes.string\n};\n\nvar LocationEventNameCell = /*#__PURE__*/function (_React$Component6) {\n _inherits(LocationEventNameCell, _React$Component6);\n\n var _super6 = _createSuper(LocationEventNameCell);\n\n function LocationEventNameCell(props) {\n var _this4;\n\n _classCallCheck(this, LocationEventNameCell);\n\n _this4 = _super6.call(this, props);\n _this4.pointerClass = _this4.pointerClass.bind(_assertThisInitialized(_this4));\n return _this4;\n }\n\n _createClass(LocationEventNameCell, [{\n key: \"pointerClass\",\n value: function pointerClass(item) {\n if (item && item.Services && item.Services.length > 0) {\n return \"pointer leCell\";\n }\n\n return \"leCell\";\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var isMazevo = this.props.userService.apiTypeId() === \"0E9DADB2-F56B-4E7E-A3B2-A59632C91D86\";\n var checkinToolTip = \"\";\n\n if (this.props.item.LocalCheckin) {\n checkinToolTip = moment(this.props.item.LocalCheckin).format(\"LT\");\n }\n\n var bcDash = null;\n\n if (this.props.item.BuildingCode) {\n bcDash = /*#__PURE__*/React.createElement(\"span\", null, \" - \");\n }\n\n var setupType = null;\n\n if (this.props.item.SetupType) {\n setupType = this.props.item.SetupType + \", \";\n }\n\n var roomDisplay = this.props.showRoomCode ? this.props.item.RoomCode : this.props.item.RoomDescription;\n return /*#__PURE__*/React.createElement(\"td\", {\n className: this.pointerClass(this.props.item),\n onClick: this.props.toggleServices\n }, this.props.item.BuildingCode, \" \", bcDash, \" \", /*#__PURE__*/React.createElement(\"span\", {\n className: \"roomDesc\"\n }, roomDisplay), \" - (\", setupType, this.props.item.SetupCount, \", act. \", this.props.item.ActualCount, \") \\xA0\", this.props.item.HasBookingAttachment && !isMazevo && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cubes fa-1-5x pointer\",\n onClick: function onClick() {\n return _this5.props.showCarouselModal(_this5.props.item, false);\n }\n }), this.props.item.HasBookingAttachment && isMazevo && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cube fa-1-5x pointer\",\n onClick: function onClick() {\n return _this5.props.showCarouselModal(_this5.props.item, false);\n }\n }), this.props.item.HasDrawings && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-cube fa-1-5x pointer\",\n onClick: function onClick() {\n return _this5.props.showCarouselModal(_this5.props.item, true);\n }\n }), /*#__PURE__*/React.createElement(\"br\", null), this.props.item.EventName, \"\\xA0\", this.props.item.IsCheckedIn && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-check-square green\",\n title: checkinToolTip\n }));\n }\n }]);\n\n return LocationEventNameCell;\n}(React.Component);\n\nLocationEventNameCell.propTypes = {\n item: React.PropTypes.object,\n showCarouselModal: React.PropTypes.func,\n toggleServices: React.PropTypes.func\n};\n\nvar ServicesCell = /*#__PURE__*/function (_React$Component7) {\n _inherits(ServicesCell, _React$Component7);\n\n var _super7 = _createSuper(ServicesCell);\n\n function ServicesCell(props) {\n _classCallCheck(this, ServicesCell);\n\n return _super7.call(this, props);\n }\n\n _createClass(ServicesCell, [{\n key: \"renderClassName\",\n value: function renderClassName(keyName, defaultCss) {\n for (var i = 0; i < this.props.settings.length; i++) {\n if (this.props.settings[i].SettingKey === keyName) {\n if (this.props.settings[i].SettingValue !== \"\") {\n return this.props.settings[i].SettingValue;\n } else {\n break;\n }\n }\n }\n\n return defaultCss;\n }\n /*\r\n {this.props.item.HasACT &&  }\r\n {this.props.item.HasATT &&  }\r\n {this.props.item.HasNOT &&  }\r\n {this.props.item.HasCAT &&  }\r\n {this.props.item.HasRSO &&  }\r\n {this.props.item.HasRES &&  }\r\n */\n\n }, {\n key: \"buildIconColor\",\n value: function buildIconColor(item) {\n if (item.IconColor) {\n return item.IconColor;\n }\n\n return \"\";\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n var linkStyle = {\n textDecoration: \"none\",\n color: this.props.textColor\n };\n var udfLabel = this.props.userService.apiTypeId() === \"355A9B3B-BF7E-4D96-8B06-27B310EB01F0\" ? \"Custom Attributes\" : \"User Defined Fields\";\n return /*#__PURE__*/React.createElement(\"td\", {\n onClick: this.props.toggleServices,\n className: \"serCell\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n href: \"#\",\n style: linkStyle\n }, /*#__PURE__*/React.createElement(\"ul\", {\n className: \"completionIcons\"\n }, this.props.item.CategoryIcons.map(function (x) {\n return /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"i\", {\n className: x.IconClass,\n title: x.ToolTip,\n style: {\n color: _this6.buildIconColor(x)\n }\n }, \"\\xA0\"));\n }), this.props.item.LinkedTasks && this.props.item.LinkedTasks.length > 0 && /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-check-square-o\",\n title: \"Linked Tasks\"\n }, \"\\xA0\")), this.props.item.Udfs && this.props.item.Udfs.length > 0 && /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"i\", {\n className: this.renderClassName('UdfIconClass', 'fa fa-info-circle'),\n title: udfLabel\n }, \"\\xA0\"))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"visuallyhidden\"\n }, \"Click to toggle details\")));\n }\n }]);\n\n return ServicesCell;\n}(React.Component);\n\nServicesCell.propTypes = {\n item: React.PropTypes.object,\n settings: React.PropTypes.array,\n toggleServices: React.PropTypes.func,\n iconSizeClass: React.PropTypes.string,\n textColor: React.PropTypes.string\n};\nServicesCell.defaultProps = {\n iconSizeClass: \"fa-1-5x\",\n textColor: \"\"\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar CarouselModal = /*#__PURE__*/function (_React$Component) {\n _inherits(CarouselModal, _React$Component);\n\n var _super = _createSuper(CarouselModal);\n\n function CarouselModal(props) {\n var _this;\n\n _classCallCheck(this, CarouselModal);\n\n _this = _super.call(this, props);\n _this.isPdf = _this.isPdf.bind(_assertThisInitialized(_this));\n _this.isDocx = _this.isDocx.bind(_assertThisInitialized(_this));\n _this.isImage = _this.isImage.bind(_assertThisInitialized(_this));\n _this.isDrawing = _this.isDrawing.bind(_assertThisInitialized(_this));\n _this.isiPhone = _this.isiPhone.bind(_assertThisInitialized(_this));\n _this.getToken = _this.getToken.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(CarouselModal, [{\n key: \"getToken\",\n value: function getToken() {\n var userData = JSON.parse(window.localStorage.getItem('7PointUserData'));\n\n if (userData && userData.bearerToken) {\n return userData.bearerToken;\n }\n }\n }, {\n key: \"endsWith\",\n value: function endsWith(str, suffix) {\n return str.match(suffix + \"$\") == suffix;\n }\n }, {\n key: \"isPdf\",\n value: function isPdf(slide) {\n if (slide) {\n if (slide.FileName) {\n var fn = slide.FileName.toLowerCase();\n return this.endsWith(fn, \".pdf\");\n }\n }\n\n return false;\n }\n }, {\n key: \"isDocx\",\n value: function isDocx(slide) {\n if (slide) {\n if (slide.FileName) {\n var fn = slide.FileName.toLowerCase();\n return this.endsWith(fn, \".docx\");\n }\n }\n\n return false;\n }\n }, {\n key: \"isDrawing\",\n value: function isDrawing(slide) {\n return slide.Url;\n }\n }, {\n key: \"isiPhone\",\n value: function isiPhone() {\n if (/iPhone/.test(navigator.userAgent)) return true;else return false;\n }\n }, {\n key: \"isImage\",\n value: function isImage(slide) {\n if (slide) {\n if (slide.FileName) {\n var fn = slide.FileName.toLowerCase();\n\n if (this.endsWith(fn, \".png\") || this.endsWith(fn, \".bmp\") || this.endsWith(fn, \".gif\") || this.endsWith(fn, \".jpg\") || this.endsWith(fn, \".jpeg\") || this.endsWith(fn, \".ico\") || this.endsWith(fn, \".tif\") || this.endsWith(fn, \".tiff\") || this.endsWith(fn, \".svg\")) {\n return true;\n }\n }\n }\n\n return false;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n bsSize: \"large\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.title)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, null, /*#__PURE__*/React.createElement(ReactBootstrap.Carousel, {\n interval: 0,\n controls: this.props.slidesForModal.length > 1\n }, this.props.slidesForModal.map(function (slide) {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Carousel.Item, {\n key: slide.ID\n }, !slide.IsExternalFile && /*#__PURE__*/React.createElement(\"div\", {\n style: {\n minHeight: 250 + \"px\"\n },\n className: \"text-center\"\n }, _this2.isPdf(slide) && /*#__PURE__*/React.createElement(\"a\", {\n href: \"api/dailysetup/GetSetupDiagramAsPdf?bookingId=\" + _this2.props.item.BookingId + \"&reservationId=\" + _this2.props.item.ReservationId + \"&attachmentId=\" + slide.ID + \"&token=\" + _this2.getToken(),\n target: \"_blank\"\n }, \"Open in New\"), !_this2.isDrawing(slide) && /*#__PURE__*/React.createElement(\"h3\", null, slide.Description), _this2.isImage(slide) && /*#__PURE__*/React.createElement(\"img\", {\n src: \"data:image/png;base64,\" + slide.Base64Data,\n style: {\n \"margin\": \"auto\",\n \"maxWidth\": \"100%\"\n }\n }), _this2.isPdf(slide) && /*#__PURE__*/React.createElement(PDF, {\n pdfData: slide.StoredFile\n }, /*#__PURE__*/React.createElement(Viewer, null)), _this2.isiPhone() && _this2.isPdf(slide) && /*#__PURE__*/React.createElement(\"object\", {\n data: \"data:application/pdf;base64,\" + slide.Base64Data,\n type: \"application/pdf\",\n style: {\n \"max-width\": \"98vw\",\n \"max-height\": \"95vh\"\n }\n }), /*#__PURE__*/React.createElement(ReactBootstrap.Carousel.Caption, null, _this2.isDrawing(slide) && /*#__PURE__*/React.createElement(\"h3\", null, slide.Description), _this2.isDrawing(slide) && /*#__PURE__*/React.createElement(\"a\", {\n href: slide.Url,\n target: \"_blank\"\n }, \"Open\"))), slide.IsExternalFile && /*#__PURE__*/React.createElement(\"div\", {\n style: {\n minHeight: 250 + \"px\"\n },\n className: \"text-center\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n href: \"api/DailySetup/GetExternalAttachment?objectId=\" + slide.Description + \"&fileName=\" + slide.FileName,\n target: \"_blank\"\n }, slide.FileName)));\n }))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"Close\")));\n }\n }]);\n\n return CarouselModal;\n}(React.Component);\n\nCarouselModal.propTypes = {\n slidesForModal: React.PropTypes.array,\n dataService: React.PropTypes.object\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar CATItem = /*#__PURE__*/function (_React$Component) {\n _inherits(CATItem, _React$Component);\n\n var _super = _createSuper(CATItem);\n\n function CATItem(props) {\n _classCallCheck(this, CATItem);\n\n return _super.call(this, props);\n }\n\n _createClass(CATItem, [{\n key: \"render\",\n value: function render() {\n var gar = \"\";\n\n if (this.props.service.GuaranteedCount > 0) {\n gar = \", gc. \" + this.props.service.GuaranteedCount;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"categoryHeading CAT\"\n }, this.props.service.Category.Description, \" - \", this.props.service.ServiceType, \" (est. \", this.props.service.EstimatedCount, gar, \") from \", moment(this.props.service.TimeStart).format(\"LT\"), \" to \", moment(this.props.service.TimeEnd).format(\"LT\")), /*#__PURE__*/React.createElement(SodItems, {\n ServiceOrderDetails: this.props.service.ServiceOrderDetails,\n minutesSinceLastChange: this.props.minutesSinceLastChange,\n apiService: this.props.apiService,\n filters: this.props.filters,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n updateItemInCollection: this.props.updateItemInCollection,\n highlightColor: this.props.highlightColor\n }));\n }\n }]);\n\n return CATItem;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar CompletionsCell = /*#__PURE__*/function (_React$Component) {\n _inherits(CompletionsCell, _React$Component);\n\n var _super = _createSuper(CompletionsCell);\n\n function CompletionsCell(props) {\n _classCallCheck(this, CompletionsCell);\n\n return _super.call(this, props);\n }\n\n _createClass(CompletionsCell, [{\n key: \"isAllDone\",\n value: function isAllDone() {\n var lastCompletion = this.props.completionsDataService.getLastCompletionForType(0, this.props.item);\n\n if (lastCompletion) {\n if (lastCompletion.CompletedAtUtc != null) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"isNothingCompleted\",\n value: function isNothingCompleted() {\n if (this.props.allCompletionTypes) {\n for (var i = 0; i < this.props.allCompletionTypes.length; i++) {\n var completion = this.props.completionsDataService.getLastCompletionForType(this.props.allCompletionTypes[i].ID, this.props.item);\n\n if (completion) {\n if (this.props.limitCompletionsByDeparments) {\n if (this.userHasCompletionDepartment(this.props.allCompletionTypes[i])) {\n if (completion.CompletedAtUtc != null) {\n return false;\n }\n }\n } else {\n if (completion.CompletedAtUtc != null) {\n return false;\n }\n }\n }\n }\n }\n\n return true;\n }\n }, {\n key: \"hasAnyCompletion\",\n value: function hasAnyCompletion() {\n if (this.props.allCompletionTypes) {\n for (var i = 0; i < this.props.allCompletionTypes.length; i++) {\n var completion = this.props.completionsDataService.getLastCompletionForType(this.props.allCompletionTypes[i].ID, this.props.item);\n\n if (completion) {\n if (completion.CompletedAtUtc != null) {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n }, {\n key: \"completionClass\",\n value: function completionClass() {\n var completion = this.props.item.Completions[0];\n\n if (completion) {\n if (completion.CompletedAtUtc) {\n if (completion.Color) {\n return {\n \"backgroundColor\": completion.Color\n };\n } else {\n return {\n \"backgroundColor\": \"#076d10\"\n };\n }\n }\n }\n\n return {\n \"backgroundColor\": this.props.nothingDoneColor\n };\n }\n }, {\n key: \"userHasCompletionDepartment\",\n value: function userHasCompletionDepartment(completionType) {\n var userDepartmentIds = this.props.userService.departmentIds();\n\n for (var i = 0; i < userDepartmentIds.length; i++) {\n if (completionType.DepartmentId == userDepartmentIds[i]) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"hasCompletionType\",\n value: function hasCompletionType(ct) {\n var completion = this.props.completionsDataService.getLastCompletionForType(ct.ID, this.props.item);\n\n if (completion) {\n if (completion.CompletedAtUtc != null) {\n if (this.props.limitCompletionsByDeparments) {\n return this.userHasCompletionDepartment(ct);\n } else {\n return true;\n }\n }\n }\n\n return false;\n }\n }, {\n key: \"completionInitials\",\n value: function completionInitials() {\n var completion = this.props.item.Completions[0];\n\n if (completion) {\n if (completion.CompletedAtUtc) {\n return completion.Initials;\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var initials = this.completionInitials();\n var completionStyle = this.completionClass();\n var result = null;\n\n if (this.isAllDone()) {\n result = /*#__PURE__*/React.createElement(\"a\", {\n href: \"#\",\n onClick: this.props.showCompletionModal.bind(this, this.props.item),\n \"aria-label\": \"All Done, Click to Open Completions Dialog\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"taskCircle\",\n style: completionStyle,\n title: \"Completions\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-center taskCircleText\"\n }, initials)));\n } else if (this.hasAnyCompletion() && this.isNothingCompleted()) {\n result = /*#__PURE__*/React.createElement(\"a\", {\n href: \"#\",\n onClick: this.props.showCompletionModal.bind(this, this.props.item),\n \"aria-label\": \"Nothing Done, Click to open completions dialog\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"taskCircle\",\n style: {\n backgroundColor: this.props.nothingDoneColor,\n position: 'relative'\n },\n title: \"Completions\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"nestedCircle\",\n style: {\n backgroundColor: 'white'\n }\n })));\n } else if (!this.hasAnyCompletion()) {\n result = /*#__PURE__*/React.createElement(\"a\", {\n href: \"#\",\n onClick: this.props.showCompletionModal.bind(this, this.props.item),\n \"aria-label\": \"Nothing Done, Click to open completions dialog\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"taskCircle\",\n style: completionStyle,\n title: \"Completions\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-center taskCircleText\"\n }, \"\\xA0\")));\n } else {\n result = /*#__PURE__*/React.createElement(\"a\", {\n href: \"#\",\n onClick: this.props.showCompletionModal.bind(this, this.props.item),\n \"aria-label\": \"List of what's be done, Click to open completions dialog\"\n }, /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"ul\", {\n className: \"completionIcons\"\n }, this.props.allCompletionTypes.map(function (ct) {\n return _this.hasCompletionType(ct) && /*#__PURE__*/React.createElement(\"li\", {\n key: ct.ID,\n title: ct.Description\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: ct.IconClass,\n style: {\n color: ct.IconColor\n },\n \"aria-label\": ct.Description\n }));\n }))));\n }\n\n var pointerStyle = {\n cursor: \"pointer\"\n };\n return /*#__PURE__*/React.createElement(\"td\", {\n style: pointerStyle,\n className: \"cCell\"\n }, result);\n }\n }]);\n\n return CompletionsCell;\n}(React.Component);\n\nCompletionsCell.propTypes = {\n item: React.PropTypes.object,\n allCompletionTypes: React.PropTypes.array,\n completionsComplete: React.PropTypes.func,\n showCompletionModal: React.PropTypes.func,\n completionsDataService: React.PropTypes.object,\n isAllDone: React.PropTypes.func,\n userService: React.PropTypes.object,\n limitCompletionsByDeparments: React.PropTypes.bool,\n nothingDoneColor: React.PropTypes.string\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CompletionsModal = /*#__PURE__*/function (_React$Component) {\n _inherits(CompletionsModal, _React$Component);\n\n var _super = _createSuper(CompletionsModal);\n\n function CompletionsModal(props) {\n var _this;\n\n _classCallCheck(this, CompletionsModal);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"F\", void 0);\n\n _this.loadAllDoneItem = _this.loadAllDoneItem.bind(_assertThisInitialized(_this));\n _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));\n _this.addCompletion = _this.addCompletion.bind(_assertThisInitialized(_this));\n _this.state = {\n endBooking: true\n };\n return _this;\n }\n\n _createClass(CompletionsModal, [{\n key: \"addCompletion\",\n value: function addCompletion(allDoneId) {\n this.props.completionsDataService.completeItem(allDoneId, this.props.item);\n }\n }, {\n key: \"handleChange\",\n value: function handleChange(event) {\n var target = event.target;\n var fieldVal = target.type === 'checkbox' ? target.checked : target.value;\n this.setState({\n endBooking: fieldVal\n });\n }\n }, {\n key: \"completionButtonClass\",\n value: function completionButtonClass(completionTypeId) {\n var lastCompletion = this.props.completionsDataService.getLastCompletionForType(completionTypeId, this.props.item);\n\n if (lastCompletion) {\n if (lastCompletion.CompletedAtUtc != null) {\n return \"btn btn-success\";\n } else {\n return \"btn btn-danger\";\n }\n } else {\n return \"btn btn-danger\";\n }\n }\n }, {\n key: \"loadAllDoneItem\",\n value: function loadAllDoneItem() {\n var result = null;\n\n for (var i = 0; i < this.props.completionTypes.length; i++) {\n var ct = this.props.completionTypes[i];\n\n if (this.props.completionTypes[i].ID == 0 && (ct.AvailableForBooking && this.props.item.TaskId == 0 || ct.AvailableForTask && this.props.item.TaskId > 0 || ct.AvailableForServiceOrder && this.props.item.ID > 0)) {\n result = this.props.completionTypes[i];\n break;\n }\n }\n\n return result;\n }\n }, {\n key: \"completionSpan\",\n value: function completionSpan(i) {\n var itemStyle = {\n display: \"inline-block\"\n };\n itemStyle.backgroundColor = i.Color ? i.Color : '#1171a3';\n return /*#__PURE__*/React.createElement(\"span\", {\n style: itemStyle,\n className: \"taskCircle text-center taskCircleText\"\n }, i.Initials);\n }\n }, {\n key: \"compeltionDetails\",\n value: function compeltionDetails(i) {\n var result = null;\n\n if (i.CompletedAtUtc) {\n var completedAt = moment(moment.utc(i.CompletedAtUtc).toDate()).format(\"L LT\");\n result = /*#__PURE__*/React.createElement(\"span\", null, completedAt, \" - \", /*#__PURE__*/React.createElement(\"i\", {\n className: i.IconClass,\n style: {\n color: i.IconColor\n }\n }), \" \", i.CompletionTypeDescription, \" - Completed By - \", i.UserName);\n } else {\n var restAt = moment(moment.utc(i.DateAddedUtc).toDate()).format(\"L LT\");\n result = /*#__PURE__*/React.createElement(\"span\", {\n className: \"red\"\n }, restAt, \" - \", /*#__PURE__*/React.createElement(\"i\", {\n className: i.IconClass,\n style: {\n color: i.IconColor\n }\n }), \" \", i.CompletionTypeDescription, \" - Reset By - \", i.UserName);\n }\n\n return result;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var loc = \"\";\n\n if (this.props.item.BuildingCode) {\n loc = this.props.item.BuildingCode;\n loc += \" - \";\n }\n\n if (this.props.item.RoomDescription) {\n loc += this.props.item.RoomDescription;\n }\n\n var sortedItemCompletions = [];\n\n if (this.props.item && this.props.item.Completions) {\n sortedItemCompletions = this.props.item.Completions.sort(function (a, b) {\n a = new Date(a.DateAddedUtc);\n b = new Date(b.DateAddedUtc);\n return a > b ? -1 : a < b ? 1 : 0;\n });\n }\n\n var allDoneItem = this.loadAllDoneItem();\n var allDone = null;\n\n if (allDoneItem != null) {\n allDone = /*#__PURE__*/React.createElement(\"div\", {\n className: \"row text-center\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n className: \"margin-right \" + this.completionButtonClass(allDoneItem.ID),\n onClick: function onClick() {\n return _this2.addCompletion(allDoneItem.ID);\n }\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: allDoneItem.IconClass\n }), allDoneItem.Description));\n }\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n bsSize: \"lg\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.ServiceType || this.props.item.EventName || this.props.item.TaskDescription), loc && /*#__PURE__*/React.createElement(\"h7\", null, loc)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Complete\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"col-md-12\"\n }, this.props.completionTypes.map(function (ct) {\n return ct.ID > 0 && (ct.AvailableForBooking && _this2.props.item.TaskId == 0 || ct.AvailableForTask && _this2.props.item.TaskId > 0 || ct.AvailableForServiceOrder && _this2.props.item.ID > 0) && /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n className: \"margin-right \" + _this2.completionButtonClass(ct.ID),\n style: {\n \"marginBottom\": \".5em\"\n },\n key: ct.ID,\n onClick: function onClick() {\n return _this2.props.completionsDataService.completeItem(ct.ID, _this2.props.item);\n }\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: ct.IconClass\n }), ct.Description);\n }))), /*#__PURE__*/React.createElement(\"hr\", null), allDone, /*#__PURE__*/React.createElement(\"div\", {\n className: \"row notesList\"\n }, /*#__PURE__*/React.createElement(\"ul\", null, sortedItemCompletions.map(function (i) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: i.ID\n }, _this2.completionSpan(i), \"\\xA0\", _this2.compeltionDetails(i));\n })))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"Close\")));\n }\n }]);\n\n return CompletionsModal;\n}(React.Component);\n\nCompletionsModal.propTypes = {\n show: React.PropTypes.bool,\n item: React.PropTypes.object,\n completionTypes: React.PropTypes.array,\n completionsDataService: React.PropTypes.object,\n userService: React.PropTypes.object,\n updateItemInCollection: React.PropTypes.func\n};\n\"use strict\";\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar DailySetup = /*#__PURE__*/function (_React$Component) {\n _inherits(DailySetup, _React$Component);\n\n var _super = _createSuper(DailySetup);\n\n function DailySetup(props) {\n var _this;\n\n _classCallCheck(this, DailySetup);\n\n _this = _super.call(this, props);\n _this.completeClick = _this.completeClick.bind(_assertThisInitialized(_this));\n _this.hideCompletionModal = _this.hideCompletionModal.bind(_assertThisInitialized(_this));\n _this.showCompletionModal = _this.showCompletionModal.bind(_assertThisInitialized(_this));\n _this.hideNotesModal = _this.hideNotesModal.bind(_assertThisInitialized(_this));\n _this.showNotesModal = _this.showNotesModal.bind(_assertThisInitialized(_this));\n _this.hideHistoryModal = _this.hideHistoryModal.bind(_assertThisInitialized(_this));\n _this.showHistoryModal = _this.showHistoryModal.bind(_assertThisInitialized(_this));\n _this.sortHeaderClass = _this.sortHeaderClass.bind(_assertThisInitialized(_this));\n _this.canEditTask = _this.canEditTask.bind(_assertThisInitialized(_this));\n _this.hideCarouselModal = _this.hideCarouselModal.bind(_assertThisInitialized(_this));\n _this.showCarouselModal = _this.showCarouselModal.bind(_assertThisInitialized(_this));\n _this.showLocationDetailsModal = _this.showLocationDetailsModal.bind(_assertThisInitialized(_this));\n _this.hideLocationDetailsModal = _this.hideLocationDetailsModal.bind(_assertThisInitialized(_this));\n _this.minimize = _this.minimize.bind(_assertThisInitialized(_this));\n _this.isTaskAllDone = _this.isTaskAllDone.bind(_assertThisInitialized(_this));\n _this.toggleTaskShowingMode = _this.toggleTaskShowingMode.bind(_assertThisInitialized(_this));\n _this.toggleSoSchedule = _this.toggleSoSchedule.bind(_assertThisInitialized(_this));\n _this.updateItemInCollection = _this.updateItemInCollection.bind(_assertThisInitialized(_this));\n _this.handleFilterServices = _this.handleFilterServices.bind(_assertThisInitialized(_this));\n _this.applyServicesFilter = _this.applyServicesFilter.bind(_assertThisInitialized(_this));\n _this.state = {\n completionModalShowing: false,\n completionModalItem: {},\n completionTypes: [],\n notesModalItem: {},\n notesModalShowing: false,\n historyModalShowing: false,\n historyModalItem: {},\n carouselModalShowing: false,\n carouselModalItem: {},\n slidesForModal: [],\n newTaskModalItem: {},\n newTaskModalShowing: false,\n tasks: [],\n totalTaskCount: 0,\n taskShowingMode: 1,\n locationModalShowing: false,\n locationDetailsModalItem: {},\n activeDepartments: [],\n soItems: [],\n soTotalItemCount: 0,\n filteredSoItems: [],\n showSoSchedule: false,\n dropBookingsWhenComplete: false,\n showRoomCode: window.localStorage.getItem(\"OpsShowRoomCode\") == 'true' ? true : false\n };\n return _this;\n }\n\n _createClass(DailySetup, [{\n key: \"toggleSoSchedule\",\n value: function toggleSoSchedule() {\n var newSoSchedule = !this.state.showSoSchedule;\n this.setState({\n showSoSchedule: newSoSchedule\n });\n }\n }, {\n key: \"toggleRoomCode\",\n value: function toggleRoomCode() {\n var newShowRoomCode = !this.state.showRoomCode;\n window.localStorage.setItem(\"OpsShowRoomCode\", '' + newShowRoomCode);\n this.setState({\n showRoomCode: newShowRoomCode\n });\n }\n }, {\n key: \"updateItemInCollection\",\n value: function updateItemInCollection(itemToUpdate) {\n var tempCollection = this.props.bookings.concat();\n\n for (var i = 0; i < tempCollection.length; i++) {\n if (tempCollection[i][\"BookingId\"] === itemToUpdate[\"BookingId\"]) {\n tempCollection[i] = itemToUpdate;\n break;\n }\n }\n\n this.props.bookings = tempCollection;\n }\n }, {\n key: \"showLocationDetailsModal\",\n value: function showLocationDetailsModal(item) {\n //no ad astra or centers\n if (this.props.userService.apiTypeId() !== \"4D2BFEBD-7631-4AEE-96CF-392CFA0BFB3A\" && this.props.userService.apiTypeId() !== \"5C088F8B-7D16-4C06-B691-7E6FCD4344AD\") {\n var _that = this;\n\n this.props.slidesDataService.getItems('api/DailySetup/GetLocationDetails/' + item.RoomId).then(function (response) {\n var locationData = response.data;\n\n _that.setState({\n locationModalShowing: true,\n locationDetailsModalItem: locationData\n });\n }, function (error) {});\n }\n }\n }, {\n key: \"showCarouselModal\",\n value: function showCarouselModal(item, isForDiagrams) {\n var _that = this;\n\n if (!isForDiagrams) {\n _that.setState({\n carouselTitle: \"Attachments\"\n });\n\n var idForCall = \"\";\n\n if (item.AdAstraEventId) {\n idForCall = item.AdAstraEventId;\n } else {\n idForCall = item.BookingId;\n }\n\n this.props.slidesDataService.getItems('api/DailySetup/GetSetupDiagrams/' + idForCall + '?reservationId=' + item.ReservationId).then(function (response) {\n _that.setState({\n carouselModalShowing: true,\n carouselModalItem: item,\n slidesForModal: response.data\n });\n }, function (error) {});\n } else {\n _that.setState({\n carouselTitle: \"Drawings\"\n });\n\n if (item.ExternalDrawingUrl) {\n window.open(item.ExternalDrawingUrl);\n } else {\n this.props.slidesDataService.getItems('api/DailySetup/GetDrawings/' + item.BookingId).then(function (response) {\n var drawings = response.data;\n var slides = [];\n\n for (var j = 0; j < drawings.length; j++) {\n var url = drawings[j].Url;\n\n if (url) {\n if (url.toLowerCase().indexOf(\"socialtables.com\") != -1 || url.toLowerCase().indexOf(\"bit.ly\") != -1 || url.toLowerCase().indexOf(\"allseated.com\") != -1 || url.toLowerCase().indexOf(\"teams.microsoft.com\") != -1 || url.toLowerCase().indexOf(\"sharepoint.com\") != -1 || url.toLowerCase().indexOf(\"prismm.com\") != -1) {\n slides.push(drawings[j]);\n }\n }\n }\n\n if (slides.length > 0) {\n if (slides.length == 1) {\n window.open(slides[0].Url);\n } else {\n _that.setState({\n carouselModalShowing: true,\n carouselModalItem: item,\n slidesForModal: slides\n });\n }\n }\n }, function (error) {});\n }\n }\n }\n }, {\n key: \"hideCarouselModal\",\n value: function hideCarouselModal() {\n this.setState({\n carouselModalShowing: false\n });\n }\n }, {\n key: \"hideLocationDetailsModal\",\n value: function hideLocationDetailsModal() {\n this.setState({\n locationModalShowing: false\n });\n }\n }, {\n key: \"canEditTask\",\n value: function canEditTask(task) {\n if (this.props.userService.userType() == \"0\") {\n return this.props.userService.userId() == task.CreatedById;\n } else {\n return true;\n }\n }\n }, {\n key: \"completeClick\",\n value: function completeClick(event) {\n this.setState({\n completionModalShowing: true\n });\n }\n }, {\n key: \"hideNotesModal\",\n value: function hideNotesModal() {\n this.setState({\n notesModalShowing: false\n });\n }\n }, {\n key: \"showNotesModal\",\n value: function showNotesModal(item) {\n var _that = this;\n\n this.props.slidesDataService.getItems(\"api/Departments/Active\").then(function (response) {\n _that.setState({\n activeDepartments: response.data\n });\n }, function (error) {\n console.log(error);\n });\n\n if (item.Notes && item.Notes.length > 0) {\n var apiPath;\n\n if (item.TaskId > 0) {\n var isoDate = moment(this.props.onDate).format(\"YYYY-MM-DD\");\n apiPath = \"api/DailySetup/GetNotesForTask/\" + item.TaskId + \"/\" + isoDate;\n } else {\n apiPath = \"api/DailySetup/GetNotesForBooking/\" + item.BookingId;\n }\n\n this.props.slidesDataService.getItems(apiPath).then(function (response) {\n item.Notes = response.data;\n\n _that.setState({\n notesModalShowing: true,\n notesModalItem: item\n });\n }, function (error) {});\n } else {\n this.setState({\n notesModalShowing: true,\n notesModalItem: item\n });\n }\n }\n }, {\n key: \"hideCompletionModal\",\n value: function hideCompletionModal() {\n this.setState({\n completionModalShowing: false\n });\n }\n }, {\n key: \"showCompletionModal\",\n value: function showCompletionModal(item) {\n var _that = this;\n\n this.props.completionsDataService.getCompletionTypesForItem(item).then(function (result) {\n _that.setState({\n completionModalShowing: true,\n completionModalItem: item,\n completionTypes: result\n });\n }, function (error) {});\n }\n }, {\n key: \"hideHistoryModal\",\n value: function hideHistoryModal() {\n this.setState({\n historyModalShowing: false\n });\n }\n }, {\n key: \"showHistoryModal\",\n value: function showHistoryModal(item) {\n this.props.getHistoryForBooking(item);\n this.setState({\n historyModalShowing: true,\n historyModalItem: item\n });\n }\n }, {\n key: \"sortHeaderClass\",\n value: function sortHeaderClass(propertyName) {\n if (this.props.sortProperty === propertyName) {\n if (this.props.sortIsDesc) {\n return \"st-sort-descent\";\n } else {\n return \"st-sort-ascent\";\n }\n }\n\n return \"\";\n }\n }, {\n key: \"minimize\",\n value: function minimize(tableId, iconId) {\n var $wcontent = $(\"#\" + tableId);\n var iElement = $(\"#\" + iconId);\n\n if ($wcontent.is(':visible')) {\n iElement.removeClass('fa fa-chevron-up');\n iElement.addClass('fa fa-chevron-down');\n } else {\n iElement.removeClass('fa fa-chevron-down');\n iElement.addClass('fa fa-chevron-up');\n }\n\n $wcontent.toggle(500);\n }\n }, {\n key: \"toggleTaskShowingMode\",\n value: function toggleTaskShowingMode(newMode) {\n this.setState({\n taskShowingMode: newMode\n });\n }\n }, {\n key: \"isTaskAllDone\",\n value: function isTaskAllDone(task) {\n var lastCompletion = this.props.completionsDataService.getLastCompletionForType(0, task);\n\n if (lastCompletion) {\n if (lastCompletion.CompletedAtUtc != null) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"handleFilterServices\",\n value: function handleFilterServices(event) {\n this.applyServicesFilter();\n }\n }, {\n key: \"applyServicesFilter\",\n value: function applyServicesFilter() {\n var filterString = document.getElementById(\"servicesFilter\").value;\n var soItems = this.state.soItems;\n var regExp = new RegExp(filterString, \"gi\");\n\n var check = function check(obj) {\n if (obj !== null && _typeof(obj) === \"object\") {\n return Object.values(obj).some(check);\n }\n\n if (Array.isArray(obj)) {\n return obj.some(check);\n }\n\n return (typeof obj === \"string\" || typeof obj === \"number\") && regExp.test(obj);\n };\n\n this.setState({\n filteredSoItems: soItems.filter(check)\n });\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n var taskClone = nextProps.tasks.concat();\n var totalTaskCount = nextProps.allTasksCount;\n var taskForState = [];\n var numberToRemoveFromCount = 0;\n var settingExist = false;\n var dropBookingsWhenComplete = false;\n\n for (var i = 0; i < nextProps.settings.length; i++) {\n if (nextProps.settings[i].SettingKey === \"DropTaskWhenComplete\") {\n settingExist = true;\n\n if (nextProps.settings[i].SettingValue === \"1\") {\n taskClone.map(function (t) {\n if (!_this2.isTaskAllDone(t)) {\n taskForState.push(t);\n } else {\n numberToRemoveFromCount++;\n }\n });\n } else {\n taskForState = taskClone;\n }\n } else if (nextProps.settings[i].SettingKey === \"DropBookingsWhenComplete\") {\n if (nextProps.settings[i].SettingValue === \"1\") {\n dropBookingsWhenComplete = true;\n }\n }\n }\n\n if (!settingExist) {\n taskForState = taskClone;\n }\n\n totalTaskCount = totalTaskCount - numberToRemoveFromCount;\n var soItemCount = 0;\n var bookingsClone = nextProps.bookings.concat();\n var soItemsForState = [];\n bookingsClone.map(function (b) {\n if (b.Services) {\n for (var _i = 0; _i < b.Services.length; _i++) {\n var soItem = b.Services[_i];\n\n if (soItem.Category.ResourceCategoryTypeCode === \"RSO\" || soItem.Category.ResourceCategoryTypeCode === \"CAT\") {\n soItem.RoomDescription = b.RoomDescription;\n soItem.GroupName = b.GroupName;\n soItem.EventName = b.EventName;\n soItemsForState.push(soItem);\n soItemCount++;\n }\n }\n }\n });\n\n if (soItemsForState) {\n soItemsForState.sort(function (a, b) {\n return a.TimeStart > b.TimeStart ? 1 : -1;\n });\n }\n\n this.setState({\n tasks: taskForState,\n totalTaskCount: totalTaskCount,\n soItems: soItemsForState,\n soTotalItemCount: soItemCount,\n dropBookingsWhenComplete: dropBookingsWhenComplete,\n filteredSoItems: soItemsForState\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this,\n _React$createElement;\n\n var showServiceOrderSchedule = this.props.userService.isEmsApiType();\n var showSoScheduleText = this.state.showSoSchedule ? \"Show Booking Schedule\" : \"Show Service Schedule\";\n var showRoomCodeText = this.state.showRoomCode ? \"Show Room Description\" : \"Show Room Code\";\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-icons pull-right\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this3.minimize(\"tasksTable\", \"taskCollapse\");\n },\n href: \"#\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-chevron-up\",\n id: \"taskCollapse\",\n \"aria-label\": \"Collapase or Expand Table\"\n }))), /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Tasks \", /*#__PURE__*/React.createElement(\"small\", null, \"(\", this.state.tasks.length, \" / \", this.state.totalTaskCount, \") \"))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\",\n id: \"tasksTable\"\n }, /*#__PURE__*/React.createElement(TasksTable, (_React$createElement = {\n sortHeaderClass: this.sortHeaderClass,\n sort: this.props.sort,\n settings: this.props.settings,\n tasks: this.props.tasks,\n canEditTask: this.canEditTask,\n editTask: this.props.editTask,\n showNotesModal: this.showNotesModal,\n completionsDataService: this.props.completionsDataService,\n showCompletionModal: this.showCompletionModal,\n allCompletionTypes: this.props.allCompletionTypes,\n getLinkedBooking: this.props.getLinkedBooking,\n slidesDataService: this.props.slidesDataService,\n setAvailableAt: this.props.setAvailableAt,\n userService: this.props.userService\n }, _defineProperty(_React$createElement, \"showNotesModal\", this.showNotesModal), _defineProperty(_React$createElement, \"showHistoryModal\", this.showHistoryModal), _defineProperty(_React$createElement, \"showCarouselModal\", this.showCarouselModal), _defineProperty(_React$createElement, \"settings\", this.props.settings), _defineProperty(_React$createElement, \"toggleServices\", this.props.toggleServices), _defineProperty(_React$createElement, \"apiService\", this.props.slidesDataService), _defineProperty(_React$createElement, \"limitCompletionsByDeparments\", this.props.limitCompletionsByDeparments), _React$createElement)))), this.props.showDailySetup && /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"span\", null, /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this3.toggleRoomCode();\n },\n href: \"#\"\n }, showRoomCodeText), \"\\xA0\\xA0\\xA0\"), showServiceOrderSchedule && /*#__PURE__*/React.createElement(\"div\", {\n className: \"pull-right\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this3.toggleSoSchedule();\n },\n href: \"#\"\n }, showSoScheduleText)), !this.state.showSoSchedule && /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue clearBoth\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-icons pull-right\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this3.minimize(\"bookingsTable\", \"bookingCollapse\");\n },\n href: \"#\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-chevron-up\",\n id: \"bookingCollapse\",\n \"aria-label\": \"Collapase or Expand Bookings Table\"\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Events\"), /*#__PURE__*/React.createElement(\"small\", {\n className: \"page-title-subtle\"\n }, \"(\", this.props.bookings.length, \" / \", this.props.allBookingsCount, \")\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\",\n id: \"bookingsTable\"\n }, /*#__PURE__*/React.createElement(EventsTable, {\n items: this.props.bookings,\n showReservedTime: this.props.showReservedTime,\n minutesSinceLastChange: this.props.minutesSinceLastChange,\n settings: this.props.settings,\n expandAllServices: this.props.expandAllServices,\n completionsComplete: this.props.completionsComplete,\n allCompletionTypes: this.props.allCompletionTypes,\n getHistoryForBooking: this.props.getHistoryForBooking,\n completionsDataService: this.props.completionsDataService,\n sortHeaderClass: this.sortHeaderClass,\n sort: this.props.sort,\n slidesDataService: this.props.slidesDataService,\n setAvailableAt: this.props.setAvailableAt,\n userService: this.props.userService,\n showNotesModal: this.showNotesModal,\n showHistoryModal: this.showHistoryModal,\n showCompletionModal: this.showCompletionModal,\n showCarouselModal: this.showCarouselModal,\n toggleServices: this.props.toggleServices,\n noEventsMessage: this.props.noEventsMessage,\n updateBookingWithTaskId: this.props.updateBookingWithTaskId,\n showNoShowBookingModal: this.showNoShowBookingModal,\n showNoShowAction: this.props.showNoShowAction,\n showEstimatedCountAction: this.props.showEstimatedCountAction,\n showAddToCalendarAction: this.props.showAddToCalendarAction,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n onDate: this.props.onDate,\n limitCompletionsByDeparments: this.props.limitCompletionsByDeparments,\n canEditTask: this.canEditTask,\n editTask: this.props.editTask,\n showLocationDetailsModal: this.showLocationDetailsModal,\n dropBookingsWhenComplete: this.state.dropBookingsWhenComplete,\n checkedInOnly: this.props.checkedInOnly,\n showRoomCode: this.state.showRoomCode,\n common: this.props.common,\n openNewTaskModal: this.props.openNewTaskModal\n })))), this.state.showSoSchedule && /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue clearBoth\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-icons pull-right\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this3.minimize(\"soTable\", \"soCollapse\");\n }\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-chevron-up\",\n id: \"soCollapse\"\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left so-schedule-title\"\n }, \"Services\"), /*#__PURE__*/React.createElement(\"small\", {\n className: \"page-title-subtle\"\n }, \"(\", this.state.filteredSoItems.length, \" / \", this.state.soTotalItemCount, \")\\xA0\\xA0\"), showServiceOrderSchedule && /*#__PURE__*/React.createElement(ReactBootstrap.FormControl, {\n type: \"text\",\n placeholder: \"Filter Services\",\n onKeyUp: this.handleFilterServices,\n className: \"smallInput\",\n id: \"servicesFilter\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\",\n id: \"soTable\"\n }, /*#__PURE__*/React.createElement(SoSchedule, {\n items: this.state.filteredSoItems,\n settings: this.props.settings,\n sortHeaderClass: this.sortHeaderClass,\n sort: this.props.sort,\n minutesSinceLastChange: this.props.minutesSinceLastChange,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n completionsDataService: this.props.completionsDataService,\n showCompletionModal: this.showCompletionModal,\n allCompletionTypes: this.props.allCompletionTypes,\n userService: this.props.userService,\n slidesDataService: this.props.slidesDataService\n }))), /*#__PURE__*/React.createElement(BookingHistoryModal, {\n show: this.state.historyModalShowing,\n item: this.state.historyModalItem,\n close: this.hideHistoryModal\n }), /*#__PURE__*/React.createElement(CompletionsModal, {\n show: this.state.completionModalShowing,\n item: this.state.completionModalItem,\n close: this.hideCompletionModal,\n completionTypes: this.state.completionTypes,\n completionsDataService: this.props.completionsDataService,\n userService: this.props.userService,\n updateItemInCollection: this.updateItemInCollection\n }), /*#__PURE__*/React.createElement(NotesModal, {\n show: this.state.notesModalShowing,\n item: this.state.notesModalItem,\n close: this.hideNotesModal,\n notesDataService: this.props.notesDataService,\n userService: this.props.userService,\n departments: this.state.activeDepartments\n }), /*#__PURE__*/React.createElement(CarouselModal, {\n show: this.state.carouselModalShowing,\n close: this.hideCarouselModal,\n slidesForModal: this.state.slidesForModal,\n title: this.state.carouselTitle,\n dataService: this.props.slidesDataService,\n item: this.state.carouselModalItem\n }), /*#__PURE__*/React.createElement(RoomDetailsModal, {\n show: this.state.locationModalShowing,\n item: this.state.locationDetailsModalItem,\n close: this.hideLocationDetailsModal\n }));\n }\n }]);\n\n return DailySetup;\n}(React.Component);\n\nDailySetup.propTypes = {\n soitems: React.PropTypes.array,\n tasks: React.PropTypes.array,\n allTasksCount: React.PropTypes.number,\n sort: React.PropTypes.func,\n sortProperty: React.PropTypes.string,\n sortIsDesc: React.PropTypes.bool,\n userService: React.PropTypes.object,\n completionsDataService: React.PropTypes.object,\n bookings: React.PropTypes.array,\n allBookingsCount: React.PropTypes.number,\n showDailySetup: React.PropTypes.bool,\n settings: React.PropTypes.array,\n notesDataService: React.PropTypes.object,\n allCompletionTypes: React.PropTypes.array,\n setAvailableAt: React.PropTypes.func,\n showReservedTime: React.PropTypes.bool,\n expandAllServices: React.PropTypes.bool,\n editTask: React.PropTypes.func,\n slidesDataService: React.PropTypes.object,\n getLinkedBooking: React.PropTypes.func,\n toggleServices: React.PropTypes.func,\n minutesSinceLastChange: React.PropTypes.number,\n getHistoryForBooking: React.PropTypes.func,\n noEventsMessage: React.PropTypes.string,\n updateBookingWithTaskId: React.PropTypes.func,\n showNoShowAction: React.PropTypes.bool,\n showEstimatedCountAction: React.PropTypes.bool,\n showAddToCalendarAction: React.PropTypes.bool,\n updateItemForBookingAction: React.PropTypes.func,\n filters: React.PropTypes.object,\n onDate: React.PropTypes.object,\n limitCompletionsByDeparments: React.PropTypes.bool,\n checkedInOnly: React.PropTypes.bool,\n common: React.PropTypes.object,\n openNewTaskModal: React.PropTypes.func\n};\nDailySetup.defaultProps = {\n tasks: [],\n allTasksCount: 0,\n bookings: [],\n allBookingsCount: 0,\n settings: []\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n// See http://jszen.blogspot.com/2007/03/how-to-build-simple-calendar-with.html for calendar logic.\nvar instanceCount = 0;\nvar CalendarHeader = React.createClass({\n displayName: 'DatePickerHeader',\n propTypes: {\n displayDate: React.PropTypes.object.isRequired,\n minDate: React.PropTypes.string,\n maxDate: React.PropTypes.string,\n onChange: React.PropTypes.func.isRequired,\n monthLabels: React.PropTypes.array.isRequired,\n previousButtonElement: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.object]).isRequired,\n nextButtonElement: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.object]).isRequired\n },\n displayingMinMonth: function displayingMinMonth() {\n if (!this.props.minDate) return false;\n var displayDate = new Date(this.props.displayDate);\n var minDate = new Date(this.props.minDate);\n return minDate.getFullYear() == displayDate.getFullYear() && minDate.getMonth() == displayDate.getMonth();\n },\n displayingMaxMonth: function displayingMaxMonth() {\n if (!this.props.maxDate) return false;\n var displayDate = new Date(this.props.displayDate);\n var maxDate = new Date(this.props.maxDate);\n return maxDate.getFullYear() == displayDate.getFullYear() && maxDate.getMonth() == displayDate.getMonth();\n },\n handleClickPrevious: function handleClickPrevious() {\n var newDisplayDate = new Date(this.props.displayDate);\n newDisplayDate.setDate(1);\n newDisplayDate.setMonth(newDisplayDate.getMonth() - 1);\n this.props.onChange(newDisplayDate);\n },\n handleClickNext: function handleClickNext() {\n var newDisplayDate = new Date(this.props.displayDate);\n newDisplayDate.setDate(1);\n newDisplayDate.setMonth(newDisplayDate.getMonth() + 1);\n this.props.onChange(newDisplayDate);\n },\n render: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-center\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-muted pull-left datepicker-previous-wrapper\",\n onClick: this.handleClickPrevious,\n style: {\n cursor: 'pointer'\n }\n }, this.displayingMinMonth() ? null : this.props.previousButtonElement), /*#__PURE__*/React.createElement(\"span\", null, this.props.monthLabels[this.props.displayDate.getMonth()], \" \", this.props.displayDate.getFullYear()), /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-muted pull-right datepicker-next-wrapper\",\n onClick: this.handleClickNext,\n style: {\n cursor: 'pointer'\n }\n }, this.displayingMaxMonth() ? null : this.props.nextButtonElement));\n }\n});\nvar daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar Calendar = React.createClass({\n displayName: 'DatePickerCalendar',\n propTypes: {\n selectedDate: React.PropTypes.object,\n displayDate: React.PropTypes.object.isRequired,\n minDate: React.PropTypes.string,\n maxDate: React.PropTypes.string,\n onChange: React.PropTypes.func.isRequired,\n dayLabels: React.PropTypes.array.isRequired,\n cellPadding: React.PropTypes.string.isRequired,\n weekStartsOn: React.PropTypes.number,\n showTodayButton: React.PropTypes.bool,\n todayButtonLabel: React.PropTypes.string,\n roundedCorners: React.PropTypes.bool\n },\n handleClick: function handleClick(day) {\n var newSelectedDate = this.setTimeToNoon(new Date(this.props.displayDate));\n newSelectedDate.setDate(day);\n this.props.onChange(newSelectedDate);\n },\n handleClickToday: function handleClickToday() {\n var newSelectedDate = this.setTimeToNoon(new Date());\n this.props.onChange(newSelectedDate);\n },\n setTimeToNoon: function setTimeToNoon(date) {\n date.setHours(12);\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return date;\n },\n render: function render() {\n var _this = this;\n\n var currentDate = this.setTimeToNoon(new Date());\n var selectedDate = this.props.selectedDate ? this.setTimeToNoon(new Date(this.props.selectedDate)) : null;\n var minDate = this.props.minDate ? this.setTimeToNoon(new Date(this.props.minDate)) : null;\n var maxDate = this.props.maxDate ? this.setTimeToNoon(new Date(this.props.maxDate)) : null;\n var year = this.props.displayDate.getFullYear();\n var month = this.props.displayDate.getMonth();\n var firstDay = new Date(year, month, 1);\n var startingDay = this.props.weekStartsOn > 1 ? firstDay.getDay() - this.props.weekStartsOn + 7 : this.props.weekStartsOn === 1 ? firstDay.getDay() === 0 ? 6 : firstDay.getDay() - 1 : firstDay.getDay();\n var monthLength = daysInMonth[month];\n\n if (month == 1) {\n if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {\n monthLength = 29;\n }\n }\n\n var weeks = [];\n var day = 1;\n\n for (var i = 0; i < 9; i++) {\n var week = [];\n\n for (var j = 0; j <= 6; j++) {\n if (day <= monthLength && (i > 0 || j >= startingDay)) {\n var className = null;\n var date = new Date(year, month, day, 12, 0, 0, 0).toISOString();\n var beforeMinDate = minDate && Date.parse(date) < Date.parse(minDate);\n var afterMinDate = maxDate && Date.parse(date) > Date.parse(maxDate);\n\n if (beforeMinDate || afterMinDate) {\n week.push( /*#__PURE__*/React.createElement(\"td\", {\n key: j,\n style: {\n padding: this.props.cellPadding\n },\n className: \"text-muted\"\n }, day));\n } else {\n if (Date.parse(date) === Date.parse(selectedDate)) {\n className = 'bg-primary';\n } else if (Date.parse(date) === Date.parse(currentDate)) {\n className = 'text-primary';\n }\n\n week.push( /*#__PURE__*/React.createElement(\"td\", {\n key: j,\n onClick: this.handleClick.bind(this, day),\n style: {\n cursor: 'pointer',\n padding: this.props.cellPadding,\n borderRadius: this.props.roundedCorners ? 5 : 0\n },\n className: className\n }, day));\n }\n\n day++;\n } else {\n week.push( /*#__PURE__*/React.createElement(\"td\", {\n key: j\n }));\n }\n }\n\n weeks.push( /*#__PURE__*/React.createElement(\"tr\", {\n key: i\n }, week));\n\n if (day > monthLength) {\n break;\n }\n }\n\n return /*#__PURE__*/React.createElement(\"table\", {\n className: \"text-center\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, this.props.dayLabels.map(function (label, index) {\n return /*#__PURE__*/React.createElement(\"td\", {\n key: index,\n className: \"text-muted\",\n style: {\n padding: _this.props.cellPadding\n }\n }, /*#__PURE__*/React.createElement(\"small\", null, label));\n }))), /*#__PURE__*/React.createElement(\"tbody\", null, weeks), this.props.showTodayButton && /*#__PURE__*/React.createElement(\"tfoot\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: this.props.dayLabels.length,\n style: {\n paddingTop: '9px'\n }\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n block: true,\n bsSize: \"xsmall\",\n className: \"u-today-button\",\n onClick: this.handleClickToday\n }, this.props.todayButtonLabel)))));\n }\n});\n\nvar DatePicker = /*#__PURE__*/function (_React$Component) {\n _inherits(DatePicker, _React$Component);\n\n var _super = _createSuper(DatePicker);\n\n function DatePicker(props) {\n var _this2;\n\n _classCallCheck(this, DatePicker);\n\n _this2 = _super.call(this, props);\n _this2.getDayLabels = _this2.getDayLabels.bind(_assertThisInitialized(_this2));\n _this2.makeDateValues = _this2.makeDateValues.bind(_assertThisInitialized(_this2));\n _this2.clear = _this2.clear.bind(_assertThisInitialized(_this2));\n _this2.handleHide = _this2.handleHide.bind(_assertThisInitialized(_this2));\n _this2.handleKeyDown = _this2.handleKeyDown.bind(_assertThisInitialized(_this2));\n _this2.handleFocus = _this2.handleFocus.bind(_assertThisInitialized(_this2));\n _this2.handleBlur = _this2.handleBlur.bind(_assertThisInitialized(_this2));\n _this2.getValue = _this2.getValue.bind(_assertThisInitialized(_this2));\n _this2.getFormattedValue = _this2.getFormattedValue.bind(_assertThisInitialized(_this2));\n _this2.getCalendarPlacement = _this2.getCalendarPlacement.bind(_assertThisInitialized(_this2));\n _this2.makeInputValueString = _this2.makeInputValueString.bind(_assertThisInitialized(_this2));\n _this2.handleBadInput = _this2.handleBadInput.bind(_assertThisInitialized(_this2));\n _this2.handleInputChange = _this2.handleInputChange.bind(_assertThisInitialized(_this2));\n _this2.onChangeMonth = _this2.onChangeMonth.bind(_assertThisInitialized(_this2));\n _this2.onChangeDate = _this2.onChangeDate.bind(_assertThisInitialized(_this2));\n _this2.state = {\n focused: false,\n inputFocused: false,\n placeholder: _this2.props.placeholder || _this2.props.dateFormat,\n separator: _this2.props.dateFormat.match(/[^A-Z]/)[0],\n dayLabels: _this2.getDayLabels()\n };\n\n var dates = _this2.makeDateValues(null);\n\n Object.assign(_this2.state, dates);\n return _this2;\n }\n\n _createClass(DatePicker, [{\n key: \"getDayLabels\",\n value: function getDayLabels() {\n if (this.props.weekStartsOn > 1) {\n return this.props.dayLabels.slice(this.props.weekStartsOn).concat(this.props.dayLabels.slice(0, this.props.weekStartsOn));\n } else if (this.props.weekStartsOn === 1) {\n return this.props.dayLabels.slice(1).concat(this.props.dayLabels.slice(0, 1));\n } else {\n return this.props.dayLabels;\n }\n }\n }, {\n key: \"makeDateValues\",\n value: function makeDateValues(isoString) {\n var displayDate;\n var selectedDate = isoString ? new Date(\"\".concat(isoString.slice(0, 10), \"T12:00:00.000Z\")) : null;\n var minDate = this.props.minDate ? new Date(\"\".concat(isoString.slice(0, 10), \"T12:00:00.000Z\")) : null;\n var maxDate = this.props.maxDate ? new Date(\"\".concat(isoString.slice(0, 10), \"T12:00:00.000Z\")) : null;\n var inputValue = isoString ? this.makeInputValueString(selectedDate) : null;\n\n if (selectedDate) {\n displayDate = new Date(selectedDate);\n } else {\n var today = new Date(\"\".concat(new Date().toISOString().slice(0, 10), \"T12:00:00.000Z\"));\n\n if (minDate && Date.parse(minDate) >= Date.parse(today)) {\n displayDate = minDate;\n } else if (maxDate && Date.parse(maxDate) <= Date.parse(today)) {\n displayDate = maxDate;\n } else {\n displayDate = today;\n }\n }\n\n return {\n value: selectedDate ? selectedDate.toISOString() : null,\n displayDate: displayDate,\n selectedDate: selectedDate,\n inputValue: inputValue\n };\n }\n }, {\n key: \"clear\",\n value: function clear() {\n if (this.props.onClear) {\n this.props.onClear();\n } else {\n this.setState(this.makeDateValues(null));\n }\n\n if (this.props.onChange) {\n this.props.onChange(null, null);\n }\n }\n }, {\n key: \"handleHide\",\n value: function handleHide() {\n if (this.state.inputFocused) {\n return;\n }\n\n this.setState({\n focused: false\n });\n\n if (this.props.onBlur) {\n var event = document.createEvent('CustomEvent');\n event.initEvent('Change Date', true, false);\n ReactDOM.findDOMNode(this.refs.hiddenInput).dispatchEvent(event);\n this.props.onBlur(event);\n }\n }\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(e) {\n if (e.which === 9 && this.state.inputFocused) {\n this.setState({\n focused: false\n });\n\n if (this.props.onBlur) {\n var event = document.createEvent('CustomEvent');\n event.initEvent('Change Date', true, false);\n ReactDOM.findDOMNode(this.refs.hiddenInput).dispatchEvent(event);\n this.props.onBlur(event);\n }\n }\n }\n }, {\n key: \"handleFocus\",\n value: function handleFocus() {\n if (this.state.focused === true) {\n return;\n }\n\n var placement = this.getCalendarPlacement();\n this.setState({\n inputFocused: true,\n focused: true,\n calendarPlacement: placement\n });\n\n if (this.props.onFocus) {\n var event = document.createEvent('CustomEvent');\n event.initEvent('Change Date', true, false);\n ReactDOM.findDOMNode(this.refs.hiddenInput).dispatchEvent(event);\n this.props.onFocus(event);\n }\n }\n }, {\n key: \"handleBlur\",\n value: function handleBlur() {\n this.setState({\n inputFocused: false\n });\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState) {\n return !(this.state.inputFocused === true && nextState.inputFocused === false);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.state.selectedDate ? this.state.selectedDate.toISOString() : null;\n }\n }, {\n key: \"getFormattedValue\",\n value: function getFormattedValue() {\n return this.state.displayDate ? this.state.inputValue : null;\n }\n }, {\n key: \"getCalendarPlacement\",\n value: function getCalendarPlacement() {\n var tag = Object.prototype.toString.call(this.props.calendarPlacement);\n var isFunction = tag === '[object AsyncFunction]' || tag === '[object Function]' || tag === '[object GeneratorFunction]' || tag === '[object Proxy]';\n\n if (isFunction) {\n return this.props.calendarPlacement();\n } else {\n return this.props.calendarPlacement;\n }\n }\n }, {\n key: \"makeInputValueString\",\n value: function makeInputValueString(date) {\n var month = date.getMonth() + 1;\n var day = date.getDate(); //this method is executed during intialState setup... handle a missing state properly\n\n var separator = this.state ? this.state.separator : this.props.dateFormat.match(/[^A-Z]/)[0];\n\n if (this.props.dateFormat.match(/MM.DD.YYYY/)) {\n return (month > 9 ? month : \"0\".concat(month)) + separator + (day > 9 ? day : \"0\".concat(day)) + separator + date.getFullYear();\n } else if (this.props.dateFormat.match(/DD.MM.YYYY/)) {\n return (day > 9 ? day : \"0\".concat(day)) + separator + (month > 9 ? month : \"0\".concat(month)) + separator + date.getFullYear();\n } else {\n return date.getFullYear() + separator + (month > 9 ? month : \"0\".concat(month)) + separator + (day > 9 ? day : \"0\".concat(day));\n }\n }\n }, {\n key: \"handleBadInput\",\n value: function handleBadInput(originalValue) {\n var parts = originalValue.replace(new RegExp(\"[^0-9\".concat(this.state.separator, \"]\")), '').split(this.state.separator);\n\n if (this.props.dateFormat.match(/MM.DD.YYYY/) || this.props.dateFormat.match(/DD.MM.YYYY/)) {\n if (parts[0] && parts[0].length > 2) {\n parts[1] = parts[0].slice(2) + (parts[1] || '');\n parts[0] = parts[0].slice(0, 2);\n }\n\n if (parts[1] && parts[1].length > 2) {\n parts[2] = parts[1].slice(2) + (parts[2] || '');\n parts[1] = parts[1].slice(0, 2);\n }\n\n if (parts[2]) {\n parts[2] = parts[2].slice(0, 4);\n }\n } else {\n if (parts[0] && parts[0].length > 4) {\n parts[1] = parts[0].slice(4) + (parts[1] || '');\n parts[0] = parts[0].slice(0, 4);\n }\n\n if (parts[1] && parts[1].length > 2) {\n parts[2] = parts[1].slice(2) + (parts[2] || '');\n parts[1] = parts[1].slice(0, 2);\n }\n\n if (parts[2]) {\n parts[2] = parts[2].slice(0, 2);\n }\n }\n\n this.setState({\n inputValue: parts.join(this.state.separator)\n });\n }\n }, {\n key: \"handleInputChange\",\n value: function handleInputChange() {\n var originalValue = ReactDOM.findDOMNode(this.refs.input).value;\n var inputValue = originalValue.replace(/(-|\\/\\/)/g, this.state.separator).slice(0, 10);\n\n if (!inputValue) {\n this.clear();\n return;\n }\n\n var month, day, year;\n\n if (this.props.dateFormat.match(/MM.DD.YYYY/)) {\n if (!inputValue.match(/[0-1][0-9].[0-3][0-9].[1-2][0-9][0-9][0-9]/)) {\n return this.handleBadInput(originalValue);\n }\n\n month = inputValue.slice(0, 2).replace(/[^0-9]/g, '');\n day = inputValue.slice(3, 5).replace(/[^0-9]/g, '');\n year = inputValue.slice(6, 10).replace(/[^0-9]/g, '');\n } else if (this.props.dateFormat.match(/DD.MM.YYYY/)) {\n if (!inputValue.match(/[0-3][0-9].[0-1][0-9].[1-2][0-9][0-9][0-9]/)) {\n return this.handleBadInput(originalValue);\n }\n\n day = inputValue.slice(0, 2).replace(/[^0-9]/g, '');\n month = inputValue.slice(3, 5).replace(/[^0-9]/g, '');\n year = inputValue.slice(6, 10).replace(/[^0-9]/g, '');\n } else {\n if (!inputValue.match(/[1-2][0-9][0-9][0-9].[0-1][0-9].[0-3][0-9]/)) {\n return this.handleBadInput(originalValue);\n }\n\n year = inputValue.slice(0, 4).replace(/[^0-9]/g, '');\n month = inputValue.slice(5, 7).replace(/[^0-9]/g, '');\n day = inputValue.slice(8, 10).replace(/[^0-9]/g, '');\n }\n\n var monthInteger = parseInt(month, 10);\n var dayInteger = parseInt(day, 10);\n var yearInteger = parseInt(year, 10);\n\n if (monthInteger > 12 || dayInteger > 31) {\n return this.handleBadInput(originalValue);\n }\n\n if (!isNaN(monthInteger) && !isNaN(dayInteger) && !isNaN(yearInteger) && monthInteger <= 12 && dayInteger <= 31 && yearInteger > 999) {\n var selectedDate = new Date(yearInteger, monthInteger - 1, dayInteger, 12, 0, 0, 0);\n this.setState({\n selectedDate: selectedDate,\n displayDate: selectedDate,\n value: selectedDate.toISOString()\n });\n\n if (this.props.onChange) {\n this.props.onChange(selectedDate.toISOString(), inputValue);\n }\n }\n\n this.setState({\n inputValue: inputValue\n });\n }\n }, {\n key: \"onChangeMonth\",\n value: function onChangeMonth(newDisplayDate) {\n this.setState({\n displayDate: newDisplayDate\n });\n }\n }, {\n key: \"onChangeDate\",\n value: function onChangeDate(newSelectedDate) {\n var inputValue = this.makeInputValueString(newSelectedDate);\n this.setState({\n inputValue: inputValue,\n selectedDate: newSelectedDate,\n displayDate: newSelectedDate,\n value: newSelectedDate.toISOString(),\n focused: false\n });\n\n if (this.props.onBlur) {\n var event = document.createEvent('CustomEvent');\n event.initEvent('Change Date', true, false);\n ReactDOM.findDOMNode(this.refs.hiddenInput).dispatchEvent(event);\n this.props.onBlur(event);\n }\n\n if (this.props.onChange) {\n this.props.onChange(newSelectedDate.toISOString(), inputValue, this.props.id);\n }\n }\n }, {\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(newProps) {\n var value = newProps.value;\n\n if (this.getValue() !== value) {\n this.setState(this.makeDateValues(value));\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var calendarHeader = /*#__PURE__*/React.createElement(CalendarHeader, {\n previousButtonElement: this.props.previousButtonElement,\n nextButtonElement: this.props.nextButtonElement,\n displayDate: this.state.displayDate,\n minDate: this.props.minDate,\n maxDate: this.props.maxDate,\n onChange: this.onChangeMonth,\n monthLabels: this.props.monthLabels,\n dateFormat: this.props.dateFormat\n });\n var control = this.props.customControl ? React.cloneElement(this.props.customControl, {\n onKeyDown: this.handleKeyDown,\n value: this.state.inputValue || '',\n required: this.props.required,\n placeholder: this.state.focused ? this.props.dateFormat : this.state.placeholder,\n ref: 'input',\n disabled: this.props.disabled,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n onChange: this.handleInputChange,\n className: this.props.className,\n style: this.props.style,\n autoComplete: this.props.autoComplete\n }) : /*#__PURE__*/React.createElement(ReactBootstrap.FormControl, {\n onKeyDown: this.handleKeyDown,\n value: this.state.inputValue || '',\n required: this.props.required,\n ref: \"input\",\n type: \"text\",\n className: this.props.className,\n style: this.props.style,\n autoFocus: this.props.autoFocus,\n disabled: this.props.disabled,\n placeholder: this.state.focused ? this.props.dateFormat : this.state.placeholder,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n onChange: this.handleInputChange,\n autoComplete: this.props.autoComplete\n });\n return /*#__PURE__*/React.createElement(ReactBootstrap.InputGroup, {\n ref: \"inputGroup\",\n bsClass: this.props.showClearButton ? this.props.bsClass : '',\n bsSize: this.props.bsSize,\n id: this.props.id ? \"\".concat(this.props.id, \"_group\") : null\n }, control, /*#__PURE__*/React.createElement(ReactBootstrap.Overlay, {\n rootClose: true,\n onHide: this.handleHide,\n show: this.state.focused,\n container: function container() {\n return _this3.props.calendarContainer || ReactDOM.findDOMNode(_this3.refs.overlayContainer);\n },\n target: function target() {\n return ReactDOM.findDOMNode(_this3.refs.input);\n },\n placement: this.state.calendarPlacement,\n delayHide: 200\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Popover, {\n id: \"date-picker-popover-\".concat(this.props.instanceCount),\n className: \"date-picker-popover\",\n title: calendarHeader\n }, /*#__PURE__*/React.createElement(Calendar, {\n cellPadding: this.props.cellPadding,\n selectedDate: this.state.selectedDate,\n displayDate: this.state.displayDate,\n onChange: this.onChangeDate,\n dayLabels: this.state.dayLabels,\n weekStartsOn: this.props.weekStartsOn,\n showTodayButton: this.props.showTodayButton,\n todayButtonLabel: this.props.todayButtonLabel,\n minDate: this.props.minDate,\n maxDate: this.props.maxDate,\n roundedCorners: this.props.roundedCorners\n }))), /*#__PURE__*/React.createElement(\"div\", {\n ref: \"overlayContainer\",\n style: {\n position: 'relative'\n }\n }), /*#__PURE__*/React.createElement(\"input\", {\n ref: \"hiddenInput\",\n type: \"hidden\",\n id: this.props.id,\n name: this.props.name,\n value: this.state.value || '',\n \"data-formattedvalue\": this.state.value ? this.state.inputValue : ''\n }), this.props.showClearButton && !this.props.customControl && /*#__PURE__*/React.createElement(ReactBootstrap.InputGroup.Addon, {\n onClick: this.props.disabled ? null : this.clear,\n style: {\n cursor: this.state.inputValue && !this.props.disabled ? 'pointer' : 'not-allowed'\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n style: {\n opacity: this.state.inputValue && !this.props.disabled ? 1 : 0.5\n }\n }, this.props.clearButtonElement)), this.props.children);\n }\n }]);\n\n return DatePicker;\n}(React.Component);\n\nDatePicker.propTypes = {\n defaultValue: React.PropTypes.string,\n value: React.PropTypes.string,\n required: React.PropTypes.bool,\n className: React.PropTypes.string,\n style: React.PropTypes.object,\n minDate: React.PropTypes.string,\n maxDate: React.PropTypes.string,\n cellPadding: React.PropTypes.string,\n autoComplete: React.PropTypes.string,\n placeholder: React.PropTypes.string,\n dayLabels: React.PropTypes.array,\n monthLabels: React.PropTypes.array,\n onChange: React.PropTypes.func,\n onClear: React.PropTypes.func,\n onBlur: React.PropTypes.func,\n onFocus: React.PropTypes.func,\n autoFocus: React.PropTypes.bool,\n disabled: React.PropTypes.bool,\n weekStartsOnMonday: function weekStartsOnMonday(props, propName, componentName) {\n if (props[propName]) {\n return new Error(\"Prop '\".concat(propName, \"' supplied to '\").concat(componentName, \"' is obsolete. Use 'weekStartsOn' instead.\"));\n }\n },\n weekStartsOn: React.PropTypes.number,\n clearButtonElement: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.object]),\n showClearButton: React.PropTypes.bool,\n previousButtonElement: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.object]),\n nextButtonElement: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.object]),\n calendarPlacement: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.func]),\n dateFormat: React.PropTypes.string,\n // 'MM/DD/YYYY', 'DD/MM/YYYY', 'YYYY/MM/DD', 'DD-MM-YYYY'\n bsClass: React.PropTypes.string,\n bsSize: React.PropTypes.string,\n calendarContainer: React.PropTypes.object,\n id: React.PropTypes.string,\n name: React.PropTypes.string,\n showTodayButton: React.PropTypes.bool,\n todayButtonLabel: React.PropTypes.string,\n instanceCount: React.PropTypes.number,\n customControl: React.PropTypes.object,\n roundedCorners: React.PropTypes.bool,\n children: React.PropTypes.oneOfType([React.PropTypes.arrayOf(React.PropTypes.node), React.PropTypes.node])\n};\nDatePicker.defaultProps = {\n dateFormat: 'MM/DD/YYYY',\n cellPadding: '5px',\n dayLabels: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n monthLabels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n clearButtonElement: '×',\n previousButtonElement: '<',\n nextButtonElement: '>',\n calendarPlacement: 'bottom',\n showClearButton: true,\n autoFocus: false,\n disabled: false,\n showTodayButton: true,\n todayButtonLabel: 'Today',\n autoComplete: 'on',\n instanceCount: 1,\n style: {\n width: '100%'\n },\n roundedCorners: false\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar GroupContactCell = /*#__PURE__*/function (_React$Component) {\n _inherits(GroupContactCell, _React$Component);\n\n var _super = _createSuper(GroupContactCell);\n\n function GroupContactCell(props) {\n var _this2;\n\n _classCallCheck(this, GroupContactCell);\n\n _this2 = _super.call(this, props);\n _this2.toggle = _this2.toggle.bind(_assertThisInitialized(_this2));\n _this2.state = {\n show: false\n };\n return _this2;\n }\n\n _createClass(GroupContactCell, [{\n key: \"toggle\",\n value: function toggle() {\n console.log(this.props.item.Phone);\n\n if (!this.state.show && !this.props.item.Phone) {\n var _this = this;\n\n var apiTypeId = this.props.userService.apiTypeId();\n\n if (apiTypeId === \"4CF523BF-F6DD-441C-810F-C87347963B5D\") {\n //platform services\n this.props.apiService.getItem(\"api/DailySetup/ReservationDetails/\" + this.props.item.ReservationId).then(function (response) {\n _this.props.item.Phone = response.data.Phone;\n\n if (response.data.EmailAddress) {\n _this.props.item.Email = response.data.EmailAddress;\n }\n\n _this.props.item.GroupType = response.data.GroupType;\n _this.props.item.WebUser = response.data.WebUser;\n _this.props.item.EventCoordinator = response.data.EventCoordinator;\n _this.props.item.SalesPerson = response.data.SalesPerson;\n });\n }\n\n if (apiTypeId === \"0E9DADB2-F56B-4E7E-A3B2-A59632C91D86\") {\n this.props.apiService.getItem(\"api/DailySetup/MazevoEventDetails/\" + this.props.item.EventLocator).then(function (response) {\n _this.props.item.Phone = response.data.Phone;\n\n if (response.data.EmailAddress) {\n _this.props.item.Email = response.data.EmailAddress;\n }\n });\n }\n }\n\n this.setState({\n show: !this.state.show\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var ecLabel = /*#__PURE__*/React.createElement(\"dt\", null, \"Event Coordinator\");\n var ecData = /*#__PURE__*/React.createElement(\"dd\", null, this.props.item.EventCoordinator, \"\\xA0\");\n var spLabel = /*#__PURE__*/React.createElement(\"dt\", null, \"Sales Person\");\n var spData = /*#__PURE__*/React.createElement(\"dd\", null, this.props.item.SalesPerson, \"\\xA0\");\n var commentData = \"\";\n var dateChanged = moment.utc(this.props.item.DateChangedUtc).toDate();\n var r = moment(dateChanged).format(\"MM/DD/YYYY hh:mm A\");\n var apiTypeId = this.props.userService.apiTypeId();\n\n if (apiTypeId === \"BCA944F7-7795-45CD-A21B-CB5F16DC4175\" && this.props.item.GroupComments.length > 0) {\n commentData = /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"b\", null, \"Group Comments\"), /*#__PURE__*/React.createElement(\"ul\", null, this.props.item.GroupComments.map(function (c) {\n return /*#__PURE__*/React.createElement(\"li\", null, c);\n })));\n }\n\n var gtLabel = null;\n var gtData = null;\n\n if (this.props.item.GroupType) {\n gtLabel = /*#__PURE__*/React.createElement(\"dt\", null, \"Group Type\");\n gtData = /*#__PURE__*/React.createElement(\"dd\", null, this.props.item.GroupType);\n }\n\n var wuLabel = null;\n var wuData = null;\n\n if (this.props.item.WebUser) {\n wuLabel = /*#__PURE__*/React.createElement(\"dt\", null, \"Everyday User\");\n wuData = /*#__PURE__*/React.createElement(\"dd\", null, this.props.item.WebUser);\n }\n\n var popoverClickRootClose = /*#__PURE__*/React.createElement(ReactBootstrap.Popover, {\n id: \"popover-\" + this.props.item.BookingId,\n title: \"Details\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"groupDetails\"\n }, /*#__PURE__*/React.createElement(\"dl\", null, /*#__PURE__*/React.createElement(\"dt\", null, \"Reservation ID\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.item.ReservationId, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Booking ID\"), /*#__PURE__*/React.createElement(\"dd\", null, this.props.item.EventLocator, \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Phone\"), /*#__PURE__*/React.createElement(\"dd\", null, /*#__PURE__*/React.createElement(\"a\", {\n href: \"tel:{this.props.item.Phone}\"\n }, this.props.item.Phone), \"\\xA0\"), /*#__PURE__*/React.createElement(\"dt\", null, \"Email\"), /*#__PURE__*/React.createElement(\"dd\", null, /*#__PURE__*/React.createElement(\"a\", {\n href: \"mailto:{this.props.item.Email}\"\n }, this.props.item.Email), \"\\xA0\"), ecLabel, ecData, this.props.item.SalesPerson && spLabel, this.props.item.SalesPerson && spData, gtLabel, gtData, wuLabel, wuData, /*#__PURE__*/React.createElement(\"dt\", null, \"Modified At\"), /*#__PURE__*/React.createElement(\"dd\", null, r)), commentData));\n return /*#__PURE__*/React.createElement(ReactBootstrap.OverlayTrigger, {\n trigger: \"click\",\n rootClose: true,\n placement: \"top\",\n overlay: popoverClickRootClose\n }, /*#__PURE__*/React.createElement(\"td\", {\n onClick: this.toggle,\n className: \"pointer gcCell\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.props.item.IsVip ? 'vipEvent' : ''\n }, this.props.item.GroupName, \"\\xA0\", this.props.item.GroupComments.length > 0 && /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-user-plus fa-1-2x pointer\",\n title: \"Has preferences\"\n }), /*#__PURE__*/React.createElement(\"br\", null), this.props.item.FirstContact, \"\\xA0\")));\n }\n }]);\n\n return GroupContactCell;\n}(React.Component);\n\nGroupContactCell.propTypes = {\n item: React.PropTypes.object,\n apiService: React.PropTypes.object,\n userService: React.PropTypes.object\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar NewTaskModal = /*#__PURE__*/function (_React$Component) {\n _inherits(NewTaskModal, _React$Component);\n\n var _super = _createSuper(NewTaskModal);\n\n function NewTaskModal(props) {\n var _this;\n\n _classCallCheck(this, NewTaskModal);\n\n _this = _super.call(this, props);\n _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));\n _this.handleClear = _this.handleClear.bind(_assertThisInitialized(_this));\n _this.saveAndClose = _this.saveAndClose.bind(_assertThisInitialized(_this));\n _this.handleDepartmentChange = _this.handleDepartmentChange.bind(_assertThisInitialized(_this));\n _this.handleDateChanged = _this.handleDateChanged.bind(_assertThisInitialized(_this));\n _this.validate = _this.validate.bind(_assertThisInitialized(_this));\n _this.isDepartmentChecked = _this.isDepartmentChecked.bind(_assertThisInitialized(_this));\n _this.handleTemplateChanged = _this.handleTemplateChanged.bind(_assertThisInitialized(_this));\n _this.state = {\n LinkedTask: _this.props.linkedTask,\n usersInDepartments: [],\n taskTemplates: [],\n selectedTemplate: ''\n };\n return _this;\n }\n\n _createClass(NewTaskModal, [{\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n this.setState({\n LinkedTask: nextProps.linkedTask\n });\n this.setState({\n usersInDepartments: nextProps.initialUsersInDepartment\n });\n this.setState({\n taskTemplates: nextProps.taskTemplates\n });\n }\n }, {\n key: \"handleChange\",\n value: function handleChange(event) {\n var linkedTask = this.state.LinkedTask;\n var target = event.target;\n var fieldName = target.id;\n var fieldVal = target.type === 'checkbox' ? target.checked : target.value;\n linkedTask[fieldName] = fieldVal;\n this.setState({\n LinkedTask: linkedTask\n });\n }\n }, {\n key: \"handleTemplateChanged\",\n value: function handleTemplateChanged(event) {\n var linkedTask = this.state.LinkedTask;\n var target = event.target;\n var selectedTemplateId = target.value;\n this.setState({\n selectedTemplate: selectedTemplateId\n });\n\n if (selectedTemplateId) {\n for (var i = 0; i < this.state.taskTemplates.length; i++) {\n var t = this.state.taskTemplates[i];\n\n if (selectedTemplateId === t.UId) {\n if (linkedTask.Description) {\n linkedTask.Description = linkedTask.Description + '\\n' + t.Description;\n } else {\n linkedTask.Description = t.Description;\n }\n\n linkedTask.DepartmentIds = t.DepartmentIds;\n linkedTask.StartAt = moment(t.StartAt, 'HH:mm').format(\"HH:mm\");\n linkedTask.FinishBy = moment(t.FinishBy, 'HH:mm').format(\"HH:mm\");\n break;\n }\n }\n }\n\n this.setState({\n LinkedTask: linkedTask\n });\n }\n }, {\n key: \"handleDepartmentChange\",\n value: function handleDepartmentChange(event) {\n //this.handleChange(event);\n var linkedTask = this.state.LinkedTask;\n var target = event.target;\n var fieldId = target.id;\n var idParts = fieldId.split(\"-\");\n var deptId = Number(idParts[1]);\n\n if (target.checked) {\n linkedTask.DepartmentIds.push(deptId);\n } else {\n var index = linkedTask.DepartmentIds.indexOf(deptId);\n\n if (index > -1) {\n linkedTask.DepartmentIds.splice(index, 1);\n }\n }\n\n var usersInDepartments = [];\n var addedUserIds = [];\n\n for (var i = 0; i < this.props.allUsers.length; i++) {\n var user = this.props.allUsers[i];\n\n for (var j = 0; j < user.Departments.length; j++) {\n for (var ii = 0; ii < linkedTask.DepartmentIds.length; ii++) {\n if (linkedTask.DepartmentIds[ii] == user.Departments[j]) {\n if (addedUserIds.indexOf(user.Id) === -1) {\n addedUserIds.push(user.Id);\n usersInDepartments.push(user);\n }\n }\n }\n }\n }\n\n this.setState({\n LinkedTask: linkedTask,\n usersInDepartments: usersInDepartments\n });\n }\n }, {\n key: \"handleDateChanged\",\n value: function handleDateChanged(isoDate, dateOnly, controlId) {\n var linkedTask = this.state.LinkedTask;\n linkedTask[controlId] = isoDate;\n this.setState({\n LinkedTask: linkedTask\n });\n }\n }, {\n key: \"handleClear\",\n value: function handleClear(id) {\n this.handleDateChanged(\"\", null, id);\n }\n }, {\n key: \"isDepartmentChecked\",\n value: function isDepartmentChecked(id) {\n if (this.state.LinkedTask && this.state.LinkedTask.DepartmentIds) {\n return this.state.LinkedTask.DepartmentIds.indexOf(id) >= 0;\n }\n\n return false;\n }\n }, {\n key: \"saveAndClose\",\n value: function saveAndClose() {\n var _that = this;\n\n var linkedTask = this.state.LinkedTask;\n var mStartAt = moment(linkedTask.StartAt, 'HH:mm');\n var mDisplayOn = moment(linkedTask.DisplayOn, 'YYYY-MM-DD');\n linkedTask.DisplayOn = mDisplayOn.format(\"YYYY-MM-DDT00:00\");\n this.props.apiService.saveItem('api/Tasks', linkedTask).then(function (saveResult) {\n _that.props.updateBookingWithTaskId(_that.props.linkedTaskModalItem, saveResult.data.TaskId);\n\n _that.props.close();\n })[\"catch\"](function (error) {});\n }\n }, {\n key: \"validateHaveData\",\n value: function validateHaveData(linkedTask, key, errors) {\n if (this.isEmpty(linkedTask[key])) {\n errors[key] = \"Required\";\n } else {\n errors[key] = \"\";\n }\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty(data) {\n return !data || data.length === 0;\n }\n }, {\n key: \"validate\",\n value: function validate() {\n var linkedTask = this.state.LinkedTask;\n var errors = {};\n\n if (linkedTask) {\n this.validateHaveData(linkedTask, \"Description\", errors);\n this.validateHaveData(linkedTask, \"DisplayOn\", errors);\n this.validateHaveData(linkedTask, \"StartAt\", errors);\n this.validateShowOnDays(linkedTask, errors);\n this.validateDisplayUntil(linkedTask, errors);\n }\n\n return errors;\n }\n }, {\n key: \"validateShowOnDays\",\n value: function validateShowOnDays(linkedTask, errors) {\n if (!this.isEmpty(linkedTask.DisplayUntil)) {\n if (linkedTask.DisplaysOnSunday || linkedTask.DisplaysOnMonday || linkedTask.DisplaysOnTuesday || linkedTask.DisplaysOnWednesday || linkedTask.DisplaysOnThursday || linkedTask.DisplaysOnFriday || linkedTask.DisplaysOnSunday) {\n errors.WeekDayDisplay = \"\";\n } else {\n errors.WeekDayDisplay = \"Repeating tasks must repeat on a least one day of the week\";\n }\n } else {\n errors.WeekDayDisplay = \"\";\n }\n }\n }, {\n key: \"validateDisplayUntil\",\n value: function validateDisplayUntil(linkedTask, errors) {\n var key = \"DisplayUntil\";\n\n if (this.isEmpty(linkedTask.DisplayUntil) || this.isEmpty(linkedTask.StartAt) || this.isEmpty(linkedTask.DisplayOn)) {\n errors[key] = \"\";\n return;\n }\n\n var mStartAt = moment(linkedTask.StartAt, 'HH:mm');\n var mDisplayOn = moment(linkedTask.DisplayOn, 'YYYY-MM-DD');\n var fromLocal = new Date(mDisplayOn.get('year'), mDisplayOn.get('month'), mDisplayOn.get('day'), mStartAt.get('hour'), mStartAt.get('minutes'), 0, 0);\n var displayFrom = moment(fromLocal);\n var displayUntil = moment(linkedTask[\"DisplayUntil\"]);\n\n if (displayFrom.isAfter(displayUntil)) {\n errors[key] = \"Display Until must be after Display On\";\n } else {\n errors[key] = \"\";\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var errors = this.validate();\n var isDisabled = Object.keys(errors).some(function (x) {\n return errors[x];\n });\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n bsSize: \"lg\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, \"New Linked Task\")), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, null, /*#__PURE__*/React.createElement(\"form\", null, /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n controlId: \"taskTemplate\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.ControlLabel, null, \"Template\"), /*#__PURE__*/React.createElement(ReactBootstrap.FormControl, {\n componentClass: \"select\",\n value: this.state.selectedTemplate,\n onChange: this.handleTemplateChanged,\n id: \"taskTemplate\"\n }, /*#__PURE__*/React.createElement(\"option\", {\n key: \"\",\n value: \"\"\n }), this.state.taskTemplates.map(function (template, i) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: template.UId,\n value: template.UId\n }, template.TemplateName);\n }))), /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n controlId: \"Description\",\n validationState: errors.Description.length > 0 ? \"error\" : null\n }, /*#__PURE__*/React.createElement(ReactBootstrap.ControlLabel, null, \"Description\"), /*#__PURE__*/React.createElement(ReactBootstrap.FormControl, {\n type: \"textarea\",\n value: this.state.LinkedTask.Description,\n placeholder: \"Enter text\",\n componentClass: \"textarea\",\n onChange: this.handleChange\n }), /*#__PURE__*/React.createElement(ReactBootstrap.HelpBlock, null, errors.Description)), /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n controlId: \"DepartmentId\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.ControlLabel, null, \"Departments\"), /*#__PURE__*/React.createElement(\"div\", null, this.props.departments.map(function (dept, i) {\n return /*#__PURE__*/React.createElement(\"label\", {\n style: {\n paddingRight: 20 + \"px\",\n fontWeight: \"normal\"\n }\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"dept-\" + dept.ID,\n onChange: _this2.handleDepartmentChange,\n checked: _this2.isDepartmentChecked(dept.ID)\n }), dept.Description);\n }))), /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n controlId: \"AssignedToUserId\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.ControlLabel, null, \"Assigned To \"), /*#__PURE__*/React.createElement(ReactBootstrap.FormControl, {\n componentClass: \"select\",\n value: this.state.LinkedTask.AssignedToUserId,\n onChange: this.handleChange,\n id: \"AssignedToUserId\"\n }, /*#__PURE__*/React.createElement(\"option\", {\n key: \"\",\n value: \"\"\n }, \"(unassigned)\"), this.state.usersInDepartments.map(function (user, i) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: user.Id,\n value: user.Id\n }, user.UserName);\n }))), /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n validationState: errors.DisplayOn.length > 0 ? \"error\" : null\n }, /*#__PURE__*/React.createElement(ReactBootstrap.ControlLabel, null, \"Display On\"), /*#__PURE__*/React.createElement(DatePicker, {\n id: \"DisplayOn\",\n onChange: this.handleDateChanged,\n value: this.state.LinkedTask.DisplayOn\n }), this.isEmpty(this.state.LinkedTask.DisplayOn) && /*#__PURE__*/React.createElement(ReactBootstrap.HelpBlock, null, \"Required\")), /*#__PURE__*/React.createElement(TimePicker, {\n id: \"StartAt\",\n label: \"Start At\",\n onChange: this.handleChange,\n value: this.state.LinkedTask.StartAt,\n validationState: errors.StartAt.length > 0 ? \"error\" : null,\n feedBack: errors.StartAt,\n allowEmpty: false\n }), /*#__PURE__*/React.createElement(TimePicker, {\n id: \"FinishBy\",\n label: \"Finish By\",\n onChange: this.handleChange,\n value: this.state.LinkedTask.FinishBy,\n validationState: null\n }), /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n validationState: errors.DisplayUntil.length > 0 ? \"error\" : null\n }, /*#__PURE__*/React.createElement(ReactBootstrap.ControlLabel, null, \"Display Until\"), /*#__PURE__*/React.createElement(DatePicker, {\n id: \"DisplayUntil\",\n onClear: function onClear() {\n _this2.handleClear('DisplayUntil');\n },\n onChange: this.handleDateChanged,\n value: this.state.LinkedTask.DisplayUntil\n }), /*#__PURE__*/React.createElement(ReactBootstrap.HelpBlock, null, errors.DisplayUntil)), /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n validationState: errors.WeekDayDisplay.length > 0 ? \"error\" : null\n }, /*#__PURE__*/React.createElement(ReactBootstrap.FormControl.Static, null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"help-block control-label\"\n }, \"Show on the following days\")), /*#__PURE__*/React.createElement(\"label\", {\n style: {\n paddingRight: 20 + \"px\",\n fontWeight: \"normal\"\n }\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"DisplaysOnSunday\",\n onChange: this.handleChange,\n checked: this.state.LinkedTask.DisplaysOnSunday,\n disabled: !this.state.LinkedTask.DisplayUntil\n }), \"Sunday\"), /*#__PURE__*/React.createElement(\"label\", {\n style: {\n paddingRight: 20 + \"px\",\n fontWeight: \"normal\"\n }\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"DisplaysOnMonday\",\n onChange: this.handleChange,\n checked: this.state.LinkedTask.DisplaysOnMonday,\n disabled: !this.state.LinkedTask.DisplayUntil\n }), \"Monday\"), /*#__PURE__*/React.createElement(\"label\", {\n style: {\n paddingRight: 20 + \"px\",\n fontWeight: \"normal\"\n }\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"DisplaysOnTuesday\",\n onChange: this.handleChange,\n checked: this.state.LinkedTask.DisplaysOnTuesday,\n disabled: !this.state.LinkedTask.DisplayUntil\n }), \"Tuesday\"), /*#__PURE__*/React.createElement(\"label\", {\n style: {\n paddingRight: 20 + \"px\",\n fontWeight: \"normal\"\n }\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"DisplaysOnWednesday\",\n onChange: this.handleChange,\n checked: this.state.LinkedTask.DisplaysOnWednesday,\n disabled: !this.state.LinkedTask.DisplayUntil\n }), \"Wednesday\"), /*#__PURE__*/React.createElement(\"label\", {\n style: {\n paddingRight: 20 + \"px\",\n fontWeight: \"normal\"\n }\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"DisplaysOnThursday\",\n onChange: this.handleChange,\n checked: this.state.LinkedTask.DisplaysOnThursday,\n disabled: !this.state.LinkedTask.DisplayUntil\n }), \"Thursday\"), /*#__PURE__*/React.createElement(\"label\", {\n style: {\n paddingRight: 20 + \"px\",\n fontWeight: \"normal\"\n }\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"DisplaysOnFriday\",\n onChange: this.handleChange,\n checked: this.state.LinkedTask.DisplaysOnFriday,\n disabled: !this.state.LinkedTask.DisplayUntil\n }), \"Friday\"), /*#__PURE__*/React.createElement(\"label\", {\n style: {\n paddingRight: 20 + \"px\",\n fontWeight: \"normal\"\n }\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"DisplaysOnSaturday\",\n onChange: this.handleChange,\n checked: this.state.LinkedTask.DisplaysOnSaturday,\n disabled: !this.state.LinkedTask.DisplayUntil\n }), \"Saturday\"), /*#__PURE__*/React.createElement(ReactBootstrap.HelpBlock, null, errors.WeekDayDisplay)))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.saveAndClose,\n className: \"btn btn-primary\",\n disabled: isDisabled\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-save\"\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"detailsButtonText\"\n }, \"Save\")), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"Close\")));\n }\n }]);\n\n return NewTaskModal;\n}(React.Component);\n\nNewTaskModal.propTypes = {\n departments: React.PropTypes.array,\n linkedTask: React.PropTypes.object,\n apiService: React.PropTypes.object,\n linkedTaskModalItem: React.PropTypes.object,\n updateBookingWithTaskId: React.PropTypes.func,\n allUsers: React.PropTypes.array,\n initialUsersInDepartment: React.PropTypes.array\n};\nNewTaskModal.defaultProps = {\n departments: [],\n allUsers: [],\n linkedTask: {},\n linkedTaskModalItem: {},\n initialUsersInDepartment: []\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar NotesModal = /*#__PURE__*/function (_React$Component) {\n _inherits(NotesModal, _React$Component);\n\n var _super = _createSuper(NotesModal);\n\n function NotesModal(props) {\n var _this;\n\n _classCallCheck(this, NotesModal);\n\n _this = _super.call(this, props);\n _this.addNote = _this.addNote.bind(_assertThisInitialized(_this));\n _this.isFormInvalid = _this.isFormInvalid.bind(_assertThisInitialized(_this));\n _this.deleteNote = _this.deleteNote.bind(_assertThisInitialized(_this));\n _this.deleteAttachment = _this.deleteAttachment.bind(_assertThisInitialized(_this));\n _this.updateNote = _this.updateNote.bind(_assertThisInitialized(_this));\n _this.canEdit = _this.canEdit.bind(_assertThisInitialized(_this));\n _this.canDelete = _this.canDelete.bind(_assertThisInitialized(_this));\n _this.addAndClose = _this.addAndClose.bind(_assertThisInitialized(_this));\n _this.acknowledgeNote = _this.acknowledgeNote.bind(_assertThisInitialized(_this));\n _this.toggleDepartment = _this.toggleDepartment.bind(_assertThisInitialized(_this));\n _this.modalClosing = _this.modalClosing.bind(_assertThisInitialized(_this));\n _this.state = {\n disableDepartment: true,\n isFormInvalid: false\n };\n return _this;\n }\n\n _createClass(NotesModal, [{\n key: \"canEdit\",\n value: function canEdit(n) {\n return n.CreatedById == this.props.userService.userId();\n }\n }, {\n key: \"canDelete\",\n value: function canDelete(n) {\n return this.canEdit(n) || this.props.userService.userType() > 0;\n }\n }, {\n key: \"toggleDepartment\",\n value: function toggleDepartment() {\n if ($(\"#alertUser\").is(\":checked\")) {\n this.setState({\n disableDepartment: false\n });\n } else {\n $(\"#department\").val(\"\");\n this.setState({\n disableDepartment: true\n });\n }\n }\n }, {\n key: \"addNote\",\n value: function addNote() {\n this.isFormInvalid();\n var note = {};\n note.Notes = $(\"#newNote\").val();\n note.DepartmentId = $(\"#department\").val();\n var that = this;\n var p = this.props.notesDataService.newNote(note, this.props.item);\n\n if (p) {\n p.then(function (x) {\n var found = false;\n\n for (var i = 0; i < that.props.item.Notes.length; i++) {\n if (that.props.item.Notes[i].ID === x.ID) {\n found = true;\n break;\n }\n }\n\n if (found === false) {\n that.props.item.Notes.push(x);\n }\n });\n }\n\n $(\"#newNote\").val(\"\");\n this.setState({\n invalidForm: false\n });\n }\n }, {\n key: \"isFormInvalid\",\n value: function isFormInvalid() {\n var imgInput = document.getElementById(\"photo\");\n var isUploading = imgInput && imgInput.files.length > 0;\n var hasNoteValue = $(\"#newNote\").val();\n\n if (isUploading) {\n if (hasNoteValue) {\n this.setState({\n isFormInvalid: false\n });\n } else {\n this.setState({\n isFormInvalid: true\n });\n }\n } else {\n this.setState({\n isFormInvalid: false\n });\n }\n }\n }, {\n key: \"addAndClose\",\n value: function addAndClose() {\n this.isFormInvalid();\n\n if (!this.state.isFormInvalid) {\n this.addNote();\n this.props.close();\n }\n }\n }, {\n key: \"updateNote\",\n value: function updateNote(note) {\n note.Notes = $(\"#editingNotes\").val();\n this.props.notesDataService.updateNote(note, this.props.item);\n this.refs.editOverlay.hide();\n }\n }, {\n key: \"deleteNote\",\n value: function deleteNote(note) {\n this.props.notesDataService.deleteNote(note, this.props.item);\n\n if (this.refs.editOverlay) {\n this.refs.editOverlay.hide();\n }\n }\n }, {\n key: \"acknowledgeNote\",\n value: function acknowledgeNote(note) {\n this.props.notesDataService.acknowledgeNote(note, this.props.item);\n this.refs.acknowledgeOverlay.hide();\n }\n }, {\n key: \"deleteAttachment\",\n value: function deleteAttachment(id, note) {\n this.props.notesDataService.deleteAttachment(id, note);\n this.refs.overlay.hide();\n }\n }, {\n key: \"deleteConfirmationPopover\",\n value: function deleteConfirmationPopover(id, type, title, clickFunc) {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Popover, {\n id: \"popover-\" + type + id,\n title: title\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-center\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"btn btn-danger\",\n onClick: clickFunc\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-trash-o\"\n }), \"Delete\"), /*#__PURE__*/React.createElement(\"button\", {\n className: \"btn btn-warning btn-form-md\",\n onClick: function onClick() {\n _this2.refs.overlay.hide();\n }\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-undo\"\n }), \"Cancel\")));\n }\n }, {\n key: \"editPopover\",\n value: function editPopover(note, type, title, clickFunc) {\n var _this3 = this;\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Popover, {\n id: \"popover-\" + type + note.ID,\n title: title\n }, /*#__PURE__*/React.createElement(\"textarea\", {\n className: \"entryEdit\",\n defaultValue: note.Notes,\n id: \"editingNotes\"\n }), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-center\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"btn btn-primary\",\n onClick: clickFunc\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-trash-o\"\n }), \"Save\"), /*#__PURE__*/React.createElement(\"button\", {\n className: \"btn btn-warning btn-form-md\",\n onClick: function onClick() {\n _this3.refs.editOverlay.hide();\n }\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-undo\"\n }), \"Cancel\")));\n }\n }, {\n key: \"acknowledgePopover\",\n value: function acknowledgePopover(note, type, title, clickFunc) {\n var _this4 = this;\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Popover, {\n id: \"popover-\" + type + note.ID,\n title: title\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-center\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"btn btn-primary\",\n onClick: clickFunc\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-thumbs-up\"\n }), \"Acknowledge\"), /*#__PURE__*/React.createElement(\"button\", {\n className: \"btn btn-warning btn-form-md\",\n onClick: function onClick() {\n _this4.refs.acknowledgeOverlay.hide();\n }\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-undo\"\n }), \"Cancel\")));\n }\n }, {\n key: \"modalClosing\",\n value: function modalClosing() {\n this.setState({\n disableDepartment: true,\n isFormInvalid: false\n });\n this.props.close();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var sortedNotes = [];\n\n if (this.props.item && this.props.item.Notes) {\n sortedNotes = this.props.item.Notes.sort(function (a, b) {\n a = new Date(a.DateAddedUtc);\n b = new Date(b.DateAddedUtc);\n return a > b ? -1 : a < b ? 1 : 0;\n });\n }\n\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.modalClosing,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, this.props.item.EventName && /*#__PURE__*/React.createElement(\"h3\", null, \" \", this.props.item.EventName), this.props.item.TaskDescription && /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.TaskDescription)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"notesModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Notes\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"text-left\"\n }, \"Note\"), /*#__PURE__*/React.createElement(\"textarea\", {\n id: \"newNote\",\n name: \"newNote\",\n className: \"form-control\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left fileUpload\"\n }, /*#__PURE__*/React.createElement(\"label\", null, \"Upload\\xA0\"), /*#__PURE__*/React.createElement(\"input\", {\n id: \"photo\",\n name: \"photo\",\n type: \"file\",\n className: \"upload\",\n accept: \"image/*\"\n })), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"hr\", null), /*#__PURE__*/React.createElement(\"div\", {\n className: \"pull-left\"\n }, /*#__PURE__*/React.createElement(\"label\", null, /*#__PURE__*/React.createElement(\"input\", {\n type: \"checkbox\",\n id: \"alertUser\",\n onClick: function onClick() {\n return _this5.toggleDepartment();\n }\n }), \"Urgent Action Required\")), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"br\", null), /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"pull-left\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"text-left\"\n }, \"Alert users in this department\\xA0\")), /*#__PURE__*/React.createElement(\"select\", {\n id: \"department\",\n name: \"department\",\n className: \"form-control\",\n disabled: this.state.disableDepartment\n }, /*#__PURE__*/React.createElement(\"option\", {\n value: \"\"\n }), this.props.departments.map(function (dept, i) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: dept.ID,\n value: dept.ID\n }, dept.Description);\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"btn btn-primary\",\n onClick: function onClick() {\n return _this5.addNote();\n }\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-plus\"\n }), \"Add Note\"), /*#__PURE__*/React.createElement(\"br\", null), this.state.isFormInvalid && /*#__PURE__*/React.createElement(\"span\", {\n className: \"red\"\n }, \"You must supply a note... \")), /*#__PURE__*/React.createElement(\"div\", {\n className: \"row notesList\"\n }, /*#__PURE__*/React.createElement(\"ul\", null, sortedNotes.map(function (n) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: n.ID\n }, /*#__PURE__*/React.createElement(\"span\", {\n style: {\n display: \"inline-block\",\n backgroundColor: n.Color ? n.Color : \"#1171a3\"\n },\n className: \"taskCircle text-center taskCircleText\"\n }, n.Initials), /*#__PURE__*/React.createElement(\"span\", {\n className: \"userName\"\n }, n.UserName), /*#__PURE__*/React.createElement(\"p\", {\n className: \"notesListNote\"\n }, n.Notes), /*#__PURE__*/React.createElement(\"div\", {\n className: \"timeAndActions noHoverA\"\n }, moment(moment.utc(n.DateAddedUtc).toDate()).format(\"MMM DD [at] hh:mm A\"), \"\\xA0\", _this5.canEdit(n) && /*#__PURE__*/React.createElement(ReactBootstrap.OverlayTrigger, {\n trigger: \"click\",\n rootClose: true,\n placement: \"top\",\n ref: \"editOverlay\",\n overlay: _this5.editPopover(n, \"editNote\", \"Edit Note\", function () {\n return _this5.updateNote(n);\n })\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: \"noHoverA\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-edit fa-1-5x icon-vertical-middle\"\n }), \" Edit\\xA0\")), _this5.canDelete(n) && /*#__PURE__*/React.createElement(ReactBootstrap.OverlayTrigger, {\n trigger: \"click\",\n rootClose: true,\n placement: \"top\",\n ref: \"overlay\",\n overlay: _this5.deleteConfirmationPopover(n.ID, \"note\", \"Delete Note\", function () {\n return _this5.deleteNote(n);\n })\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: \"noHoverA\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-trash-o fa-1-5x icon-vertical-middle\"\n }), \" Delete\")), n.UserCanAcknowledge && /*#__PURE__*/React.createElement(\"div\", {\n className: \"pull-right\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.OverlayTrigger, {\n trigger: \"click\",\n rootClose: true,\n placement: \"top\",\n ref: \"acknowledgeOverlay\",\n overlay: _this5.acknowledgePopover(n, \"ack\", \"Acknowledge Note\", function () {\n return _this5.acknowledgeNote(n);\n })\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: \"noHoverA\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-thumbs-up fa-1-5x icon-vertical-middle\"\n }), \" Acknowledge\"))), n.AcknowledgedBy && /*#__PURE__*/React.createElement(\"div\", {\n className: \"pull-right\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-thumbs-up fa-1-5x icon-vertical-middle\"\n }), \" by \", n.AcknowledgedBy)), n.Base64Data && /*#__PURE__*/React.createElement(\"div\", {\n className: \"photoBox\"\n }, /*#__PURE__*/React.createElement(\"img\", {\n src: \"data:image/png;base64,\" + n.Base64Data,\n style: {\n margin: 'auto'\n }\n }), /*#__PURE__*/React.createElement(\"br\", null), _this5.canDelete(n) && /*#__PURE__*/React.createElement(ReactBootstrap.OverlayTrigger, {\n trigger: \"click\",\n rootClose: true,\n placement: \"top\",\n ref: \"overlay\",\n overlay: _this5.deleteConfirmationPopover(n.AttachmentId, \"att\", \"Delete Attachment\", function () {\n return _this5.deleteAttachment(n.AttachmentId, n);\n })\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: \"noHoverA\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-thumbs-up fa-1-5x icon-vertical-middle\"\n }), \" Delete\"))));\n })))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, this.state.isFormInvalid && /*#__PURE__*/React.createElement(\"span\", {\n className: \"red\"\n }, \"You must supply a note... \"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.addAndClose\n }, \"Ok\")));\n }\n }]);\n\n return NotesModal;\n}(React.Component);\n\nNotesModal.propTypes = {\n show: React.PropTypes.bool,\n item: React.PropTypes.object,\n notesDataService: React.PropTypes.object\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar NOTItem = /*#__PURE__*/function (_React$Component) {\n _inherits(NOTItem, _React$Component);\n\n var _super = _createSuper(NOTItem);\n\n function NOTItem(props) {\n _classCallCheck(this, NOTItem);\n\n return _super.call(this, props);\n }\n\n _createClass(NOTItem, [{\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var s = {};\n\n if (this.props.highlightColor !== \"\") {\n s.color = this.props.highlightColor;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"categoryHeading NOT\"\n }, this.props.service.Category.Description), this.props.service.ServiceOrderDetails.map(function (sod) {\n return /*#__PURE__*/React.createElement(\"p\", {\n style: sod.MinutesSinceLastChange < _this.props.minutesSinceLastChange ? s : {},\n className: \"preWrap indent\" + (sod.MinutesSinceLastChange < _this.props.minutesSinceLastChange ? \"sodRecentlyChanged\" : \"\"),\n key: sod.ID,\n dangerouslySetInnerHTML: {\n __html: sod.Notes\n },\n highlightColor: _this.props.highlightColor\n });\n }));\n }\n }]);\n\n return NOTItem;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar PDF = /*#__PURE__*/function (_React$Component) {\n _inherits(PDF, _React$Component);\n\n var _super = _createSuper(PDF);\n\n function PDF(props) {\n var _this;\n\n _classCallCheck(this, PDF);\n\n _this = _super.call(this, props);\n _this.state = {\n pdf: null,\n scale: 1.2\n };\n return _this;\n }\n\n _createClass(PDF, [{\n key: \"getChildContext\",\n value: function getChildContext() {\n return {\n pdf: this.state.pdf,\n scale: this.state.scale\n };\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n var that = this;\n pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';\n var pdfData = window.atob(this.props.pdfData);\n var loadingTask = pdfjsLib.getDocument({\n data: pdfData\n });\n loadingTask.promise.then(function (pdf) {\n _this2.setState({\n pdf: pdf\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"pdf-context\"\n }, this.props.children);\n }\n }]);\n\n return PDF;\n}(React.Component);\n\nPDF.propTypes = {\n pdfData: React.PropTypes.string.isRequired\n};\nPDF.childContextTypes = {\n pdf: React.PropTypes.object,\n scale: React.PropTypes.number\n};\n\nvar Page = /*#__PURE__*/function (_React$Component2) {\n _inherits(Page, _React$Component2);\n\n var _super2 = _createSuper(Page);\n\n function Page(props) {\n var _this3;\n\n _classCallCheck(this, Page);\n\n _this3 = _super2.call(this, props);\n _this3.state = {\n status: 'N/A',\n page: null,\n width: 0,\n height: 0\n };\n return _this3;\n }\n\n _createClass(Page, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps, nextState, nextContext) {\n return this.context.pdf != nextContext.pdf || this.state.status !== nextState.status;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(nextProps, nextState, nextContext) {\n this._update(nextContext.pdf);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this._update(this.context.pdf);\n }\n }, {\n key: \"_update\",\n value: function _update(pdf) {\n if (pdf) {\n this._loadPage(pdf);\n } else {\n this.setState({\n status: 'loading'\n });\n }\n }\n }, {\n key: \"_loadPage\",\n value: function _loadPage(pdf) {\n if (this.state.status === 'rendering' || this.state.page != null) return;\n pdf.getPage(this.props.index).then(this._renderPage.bind(this), function (error) {\n console.log(error);\n });\n this.setState({\n status: 'rendering'\n });\n }\n }, {\n key: \"_renderPage\",\n value: function _renderPage(page) {\n var scale = this.context.scale;\n var canvas = this.refs.canvas;\n var context = canvas.getContext('2d');\n var viewport = page.getViewport({\n scale: scale\n });\n var outputScale = window.devicePixelRatio || 1;\n canvas.width = Math.floor(viewport.width * outputScale);\n canvas.height = Math.floor(viewport.height * outputScale);\n canvas.style.width = Math.floor(viewport.width) + \"px\";\n canvas.style.heigth = Math.floor(viewport.height) + \"px\";\n var transform = outputScale !== 1 ? [outputScale, 0, 0, outputScale, 0, 0] : null;\n var renderContext = {\n canvasContext: context,\n transform: transform,\n viewport: viewport\n };\n var renderTask = page.render(renderContext);\n renderTask.promise.then(function () {});\n this.setState({\n status: 'rendered',\n page: page\n }); //style={{ width, height }}\n }\n }, {\n key: \"render\",\n value: function render() {\n var status = this.state.status;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: 'pdf-page {status}'\n }, /*#__PURE__*/React.createElement(\"canvas\", {\n ref: \"canvas\"\n }));\n }\n }]);\n\n return Page;\n}(React.Component);\n\nPage.propTypes = {\n index: React.PropTypes.number.isRequired\n};\nPage.contextTypes = PDF.childContextTypes;\n\nvar Viewer = /*#__PURE__*/function (_React$Component3) {\n _inherits(Viewer, _React$Component3);\n\n var _super3 = _createSuper(Viewer);\n\n function Viewer() {\n _classCallCheck(this, Viewer);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(Viewer, [{\n key: \"render\",\n value: function render() {\n var pdf = this.context.pdf; //let numPages = pdf ? pdf.pdfInfo.numPages : 0\n\n var numPages = pdf ? pdf.numPages : 0;\n var fingerprint = pdf ? pdf.fingerprints : 'none';\n var pages = Array.apply(null, {\n length: numPages\n }).map(function (v, i) {\n return /*#__PURE__*/React.createElement(Page, {\n index: i + 1,\n key: \"\".concat(fingerprint, \"-\").concat(i)\n });\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"pdf-viewer\"\n }, pages);\n }\n }]);\n\n return Viewer;\n}(React.Component);\n\nViewer.contextTypes = PDF.childContextTypes;\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar SPPdfViewer = /*#__PURE__*/function (_React$Component) {\n _inherits(SPPdfViewer, _React$Component);\n\n var _super = _createSuper(SPPdfViewer);\n\n function SPPdfViewer(props) {\n var _this;\n\n _classCallCheck(this, SPPdfViewer);\n\n _this = _super.call(this, props);\n _this.state = {\n pdfUrl: null\n };\n return _this;\n }\n\n _createClass(SPPdfViewer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n console.log(this.props.pdfData);\n var bytes = window.atob(this.props.pdfData);\n var length = bytes.length;\n var out = new Uint8Array(length);\n\n while (length--) {\n out[length] = bytes.charCodeAt(length);\n }\n\n var blob = new Blob([out], {\n type: 'application/pdf'\n });\n this.setState({\n pdfUrl: URL.createObjectURL(blob)\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n style: {\n border: '1px solid rgba(0, 0, 0, 0.3)',\n height: '750px'\n }\n }, /*#__PURE__*/React.createElement(Viewer, {\n fileUrl: this.state.pdfUrl\n }));\n }\n }]);\n\n return SPPdfViewer;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar RecentChangesCell = /*#__PURE__*/function (_React$Component) {\n _inherits(RecentChangesCell, _React$Component);\n\n var _super = _createSuper(RecentChangesCell);\n\n function RecentChangesCell(props) {\n _classCallCheck(this, RecentChangesCell);\n\n return _super.call(this, props);\n }\n\n _createClass(RecentChangesCell, [{\n key: \"render\",\n value: function render() {\n var clickHtml = this.props.showHistoryModal.bind(this, this.props.item);\n var cellStyle = {\n width: '30px',\n cursor: 'default',\n textAlign: 'center'\n };\n var bookingIconClass = \"\";\n var bookingTitle = \"\";\n var bookingIcon = null;\n\n if (this.props.item.MinutesSinceLastChange < this.props.minutesSinceLastChange) {\n if (this.props.item.MinutesSinceFirstCompletion > this.props.item.MinutesSinceLastChange && this.props.item.MinutesSinceLastChange > 0) {\n bookingIconClass = \"fa-warning\";\n cellStyle.cursor = \"pointer\";\n bookingTitle = \"Booking change after completion\";\n } else {\n if (this.props.item.DateAddedUtc == this.props.item.DateChangedUtc) {\n bookingIconClass = \"fa-bolt\";\n bookingTitle = \"New booking\";\n } else {\n bookingIconClass = \"fa-exclamation\";\n cellStyle.cursor = \"pointer\";\n bookingTitle = \"Recent booking changes\";\n }\n }\n\n bookingIcon = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-1-5x \" + bookingIconClass,\n title: bookingTitle\n });\n }\n\n var soIconClass = \"\";\n var soTitle = \"\";\n var soIcon = null;\n\n if (this.props.item.MinutesSinceLastDetailChange < this.props.minutesSinceLastChange && this.props.item.MinutesSinceLastDetailChange > 0) {\n if (this.props.item.MinutesSinceFirstCompletion >= this.props.item.MinutesSinceLastDetailChange) {\n soIconClass = \"fa-italic\";\n cellStyle.cursor = \"pointer\";\n soTitle = \"Service change after completion\";\n } else {\n soIconClass = \"fa-info\";\n cellStyle.cursor = \"pointer\";\n soTitle = \"Recent service changes\";\n }\n\n soIcon = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-1-5x \" + soIconClass,\n title: soTitle\n });\n }\n\n var needsSanatized = null;\n\n if (this.props.item.RoomNeedsSanitized) {\n needsSanatized = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-1-5x fa-circle serviceMode\",\n title: \"Room needs service\"\n });\n }\n\n var requireAck = null;\n\n if (this.props.item.RequiresAcknowledgement) {\n requireAck = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-1-5x fa-bell faa-flash animated orange\",\n title: \"High priority note\"\n });\n }\n\n return /*#__PURE__*/React.createElement(\"td\", {\n className: \"rcCell\",\n style: cellStyle,\n onClick: clickHtml\n }, /*#__PURE__*/React.createElement(\"a\", {\n href: \"#\",\n \"aria-label\": \"open booking history\"\n }, requireAck, bookingIcon, soIcon, needsSanatized));\n }\n }]);\n\n return RecentChangesCell;\n}(React.Component);\n\nRecentChangesCell.propTypes = {\n item: React.PropTypes.object,\n minutesSinceLastChange: React.PropTypes.number,\n close: React.PropTypes.func\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar RESItem = /*#__PURE__*/function (_React$Component) {\n _inherits(RESItem, _React$Component);\n\n var _super = _createSuper(RESItem);\n\n function RESItem(props) {\n _classCallCheck(this, RESItem);\n\n return _super.call(this, props);\n }\n\n _createClass(RESItem, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"categoryHeading RES\"\n }, this.props.service.Category.Description), /*#__PURE__*/React.createElement(SodItems, {\n ServiceOrderDetails: this.props.service.ServiceOrderDetails,\n minutesSinceLastChange: this.props.minutesSinceLastChange,\n apiService: this.props.apiService,\n filters: this.props.filters,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n updateItemInCollection: this.props.updateItemInCollection,\n highlightColor: this.props.highlightColor\n }));\n }\n }]);\n\n return RESItem;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar RoomDetailsModal = /*#__PURE__*/function (_React$Component) {\n _inherits(RoomDetailsModal, _React$Component);\n\n var _super = _createSuper(RoomDetailsModal);\n\n function RoomDetailsModal(props) {\n _classCallCheck(this, RoomDetailsModal);\n\n return _super.call(this, props);\n }\n\n _createClass(RoomDetailsModal, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.Description)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"locationDetailsModal\"\n }, /*#__PURE__*/React.createElement(\"div\", null, this.props.item && this.props.item.Notes && /*#__PURE__*/React.createElement(\"span\", {\n className: \"userName\"\n }, \"Notes:\\xA0\"), /*#__PURE__*/React.createElement(\"span\", {\n className: \"preWrap\"\n }, \" \", this.props.item && this.props.item.Notes)), this.props.item && this.props.item.Features && this.props.item.Features.length > 0 && /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Features\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"row setupTypesList\"\n }, /*#__PURE__*/React.createElement(\"ul\", null, this.props.item.Features.map(function (st) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: st.ID\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"userName\"\n }, st.Description));\n }))))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Setups\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"row setupTypesList\"\n }, /*#__PURE__*/React.createElement(\"ul\", null, this.props.item && this.props.item.SetupTypes && this.props.item.SetupTypes.map(function (st) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: st.ID\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"userName\"\n }, st.Description), \" \", st.MinCapacity > 0 ? \" - min: \" + st.MinCapacity : \"\", \" \", st.MaxCapacity > 0 ? \" - max: \" + st.MaxCapacity : \"\", st.ImageData && /*#__PURE__*/React.createElement(\"div\", {\n className: \"photoBox\"\n }, /*#__PURE__*/React.createElement(\"img\", {\n src: \"data:image/png;base64,\" + st.ImageData,\n style: {\n margin: 'auto'\n }\n }), /*#__PURE__*/React.createElement(\"br\", null)));\n }))))), this.props.item && this.props.item.Images && this.props.item.Images.length > 0 && /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Images\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"row setupTypesList\"\n }, /*#__PURE__*/React.createElement(\"ul\", null, this.props.item.Images.map(function (st) {\n return /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"photoBox\"\n }, /*#__PURE__*/React.createElement(\"img\", {\n src: \"data:image/png;base64,\" + st,\n style: {\n margin: 'auto'\n }\n }), /*#__PURE__*/React.createElement(\"br\", null)));\n })))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"Close\")));\n }\n }]);\n\n return RoomDetailsModal;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar RSOItem = /*#__PURE__*/function (_React$Component) {\n _inherits(RSOItem, _React$Component);\n\n var _super = _createSuper(RSOItem);\n\n function RSOItem(props) {\n _classCallCheck(this, RSOItem);\n\n return _super.call(this, props);\n }\n\n _createClass(RSOItem, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"span\", {\n className: \"categoryHeading RSO\"\n }, this.props.service.Category.Description, \" - \", this.props.service.ServiceType, \" from \", moment(this.props.service.TimeStart).format(\"LT\"), \" to \", moment(this.props.service.TimeEnd).format(\"LT\")), /*#__PURE__*/React.createElement(SodItems, {\n ServiceOrderDetails: this.props.service.ServiceOrderDetails,\n minutesSinceLastChange: this.props.minutesSinceLastChange,\n apiService: this.props.apiService,\n filters: this.props.filters,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n updateItemInCollection: this.props.updateItemInCollection,\n highlightColor: this.props.highlightColor\n }));\n }\n }]);\n\n return RSOItem;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ServicesList = /*#__PURE__*/function (_React$Component) {\n _inherits(ServicesList, _React$Component);\n\n var _super = _createSuper(ServicesList);\n\n function ServicesList(props) {\n _classCallCheck(this, ServicesList);\n\n return _super.call(this, props);\n }\n\n _createClass(ServicesList, [{\n key: \"render\",\n value: function render() {\n var _this = this;\n\n var s = {};\n\n if (this.props.highlightColor !== \"\") {\n s.color = this.props.highlightColor;\n }\n\n return /*#__PURE__*/React.createElement(\"ul\", null, this.props.services.map(function (so) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: so.ID,\n style: so.MinutesSinceLastChange < _this.props.minutesSinceLastChange ? s : {},\n className: so.MinutesSinceLastChange < _this.props.minutesSinceLastChange ? \"soRecentlyChanged\" : \"\"\n }, so.Category.ResourceCategoryTypeCode === \"RES\" && /*#__PURE__*/React.createElement(RESItem, {\n service: so,\n minutesSinceLastChange: _this.props.minutesSinceLastChange,\n apiService: _this.props.apiService,\n filters: _this.props.filters,\n updateItemForBookingAction: _this.props.updateItemForBookingAction,\n updateItemInCollection: _this.props.updateItemInCollection,\n highlightColor: _this.props.highlightColor\n }), so.Category.ResourceCategoryTypeCode === \"ACT\" && /*#__PURE__*/React.createElement(ACTItem, {\n service: so,\n minutesSinceLastChange: _this.props.minutesSinceLastChange,\n highlightColor: _this.props.highlightColor\n }), so.Category.ResourceCategoryTypeCode === \"RSO\" && /*#__PURE__*/React.createElement(RSOItem, {\n service: so,\n minutesSinceLastChange: _this.props.minutesSinceLastChange,\n apiService: _this.props.apiService,\n filters: _this.props.filters,\n updateItemForBookingAction: _this.props.updateItemForBookingAction,\n updateItemInCollection: _this.props.updateItemInCollection,\n highlightColor: _this.props.highlightColor\n }), so.Category.ResourceCategoryTypeCode === \"CAT\" && /*#__PURE__*/React.createElement(CATItem, {\n service: so,\n minutesSinceLastChange: _this.props.minutesSinceLastChange,\n apiService: _this.props.apiService,\n filters: _this.props.filters,\n updateItemForBookingAction: _this.props.updateItemForBookingAction,\n updateItemInCollection: _this.props.updateItemInCollection,\n highlightColor: _this.props.highlightColor\n }), so.Category.ResourceCategoryTypeCode === \"NOT\" && /*#__PURE__*/React.createElement(NOTItem, {\n service: so,\n minutesSinceLastChange: _this.props.minutesSinceLastChange,\n highlightColor: _this.props.highlightColor\n }), so.Category.ResourceCategoryTypeCode === \"ATT\" && /*#__PURE__*/React.createElement(ATTItem, {\n service: so,\n minutesSinceLastChange: _this.props.minutesSinceLastChange,\n highlightColor: _this.props.highlightColor,\n apiService: _this.props.apiService,\n filters: _this.props.filters,\n updateItemForBookingAction: _this.props.updateItemForBookingAction,\n updateItemInCollection: _this.props.updateItemInCollection\n }));\n }));\n }\n }]);\n\n return ServicesList;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar SodItems = /*#__PURE__*/function (_React$Component) {\n _inherits(SodItems, _React$Component);\n\n var _super = _createSuper(SodItems);\n\n function SodItems(props) {\n var _this;\n\n _classCallCheck(this, SodItems);\n\n _this = _super.call(this, props);\n _this.showQtyUpdateModal = _this.showQtyUpdateModal.bind(_assertThisInitialized(_this));\n _this.hideQtyUpdateModal = _this.hideQtyUpdateModal.bind(_assertThisInitialized(_this));\n _this.state = {\n updateQtyModalShowing: false,\n updateQtySod: {}\n };\n return _this;\n }\n\n _createClass(SodItems, [{\n key: \"showQtyUpdateModal\",\n value: function showQtyUpdateModal(item) {\n this.setState({\n updateQtyModalShowing: true,\n updateQtySod: item\n });\n }\n }, {\n key: \"hideQtyUpdateModal\",\n value: function hideQtyUpdateModal() {\n this.setState({\n updateQtyModalShowing: false\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var s = {};\n\n if (this.props.highlightColor !== \"\") {\n s.color = this.props.highlightColor;\n }\n\n return /*#__PURE__*/React.createElement(\"ul\", null, this.props.ServiceOrderDetails.map(function (sod) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: sod.ID,\n style: sod.MinutesSinceLastChange < _this2.props.minutesSinceLastChange ? s : {},\n className: sod.MinutesSinceLastChange < _this2.props.minutesSinceLastChange ? \"sodRecentlyChanged\" : \"\"\n }, sod.Quantity, \"\\xA0-\\xA0\", sod.TempResourceDescription || sod.Resource && sod.Resource.Description || \"Bad Config - Missing Resource\", sod.AllowQtyEdit && /*#__PURE__*/React.createElement(\"span\", {\n onClick: function onClick() {\n return _this2.showQtyUpdateModal(sod);\n }\n }, \"\\xA0-\\xA0\", /*#__PURE__*/React.createElement(\"i\", {\n className: \"pointer fa fa-pencil black\",\n title: \"Edit Quantity\"\n })), sod.Groupings && sod.Groupings.map(function (rg) {\n return /*#__PURE__*/React.createElement(\"ul\", {\n key: rg.ResourceGroupID\n }, /*#__PURE__*/React.createElement(\"li\", null, rg.Description, /*#__PURE__*/React.createElement(\"ul\", null, rg.Items.map(function (i) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: i.ID\n }, i.Description, \" \", i.Notes && /*#__PURE__*/React.createElement(\"span\", null, \" - \", i.Notes));\n }))));\n }), sod.Notes && /*#__PURE__*/React.createElement(\"p\", {\n className: \"preWrap indent\"\n }, sod.Notes), /*#__PURE__*/React.createElement(\"p\", {\n className: \"preWrap indent\"\n }, sod.SpecialInstructions));\n }), /*#__PURE__*/React.createElement(UpdateSodQtyModal, {\n show: this.state.updateQtyModalShowing,\n close: this.hideQtyUpdateModal,\n sod: this.state.updateQtySod,\n apiService: this.props.apiService,\n updateItemForBookingAction: this.props.updateItemForBookingAction,\n filters: this.props.filters,\n updateItemInCollection: this.props.updateItemInCollection\n }));\n }\n }]);\n\n return SodItems;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof2(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar SoSchedule = /*#__PURE__*/function (_React$Component) {\n _inherits(SoSchedule, _React$Component);\n\n var _super = _createSuper(SoSchedule);\n\n function SoSchedule(props) {\n var _this;\n\n _classCallCheck(this, SoSchedule);\n\n _this = _super.call(this, props);\n _this.hideAssignServiceModal = _this.hideAssignServiceModal.bind(_assertThisInitialized(_this));\n _this.showAssignUserModal = _this.showAssignUserModal.bind(_assertThisInitialized(_this));\n _this.sortHeaderClass = _this.sortHeaderClass.bind(_assertThisInitialized(_this));\n _this.sort = _this.sort.bind(_assertThisInitialized(_this));\n _this.state = {\n assignServiceModalShowing: false,\n itemForAssignTo: {},\n allUsers: [],\n currentSortColumn: \"TimeStart\",\n isSortDesc: false\n };\n return _this;\n }\n\n _createClass(SoSchedule, [{\n key: \"showAssignUserModal\",\n value: function showAssignUserModal(item) {\n var _that = this;\n\n this.props.slidesDataService.getItem(\"api/DailySetup/GetUsersWithDepartments\").then(function (response) {\n _that.setState({\n assignServiceModalShowing: true,\n itemForAssignTo: item,\n allUsers: response.data\n });\n });\n }\n }, {\n key: \"hideAssignServiceModal\",\n value: function hideAssignServiceModal() {\n this.setState({\n assignServiceModalShowing: false\n });\n }\n }, {\n key: \"sort\",\n value: function sort(propertyName) {\n var _typeof = typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\" ? function (obj) {\n return _typeof2(obj);\n } : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n\n var isDesc = this.state.isSortDesc;\n\n if (this.state.currentSortColumn === propertyName) {\n isDesc = !this.state.isSortDesc;\n this.setState({\n isSortDesc: isDesc\n });\n } else {\n isDesc = false;\n this.setState({\n currentSortColumn: propertyName,\n isSortDesc: false\n });\n }\n\n var props = {\n prop: propertyName,\n desc: isDesc\n };\n\n var _sortBy = function () {\n var _defaults = {\n parser: function parser(x) {\n return x;\n },\n desc: false\n };\n\n var isObject = function isObject(o) {\n return o !== null && (typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) === \"object\";\n };\n\n var isDefined = function isDefined(v) {\n return typeof v !== \"undefined\";\n }; //gets the item to be sorted\n\n\n function getItem(x) {\n var sortObj = x;\n var sortProp = this.prop;\n var parts = this.prop.split('.');\n\n if (parts.length > 1) {\n sortObj = x[parts[0]];\n sortProp = parts[1];\n }\n\n var isProp = isObject(sortObj) && isDefined(sortObj[sortProp]);\n return this.parser(isProp ? sortObj[sortProp] : sortObj);\n }\n\n return function (array, options) {\n if (!(array instanceof Array) || !array.length) return [];\n var opt = Object.assign({}, _defaults, options);\n opt.desc = opt.desc ? -1 : 1;\n return array.sort(function (a, b) {\n a = getItem.call(opt, a);\n b = getItem.call(opt, b);\n\n if (a === null) {\n return -1;\n } else if (b === null) {\n return 1;\n }\n\n if (a.toLowerCase) {\n a = a.toLowerCase();\n b = b.toLowerCase();\n }\n\n return opt.desc * (a < b ? -1 : +(a > b));\n });\n };\n }();\n\n _sortBy(this.props.items, props);\n }\n }, {\n key: \"sortHeaderClass\",\n value: function sortHeaderClass(propertyName) {\n if (this.state.currentSortColumn === propertyName) {\n if (this.state.isSortDesc) {\n return \"st-sort-descent\";\n } else {\n return \"st-sort-ascent\";\n }\n }\n\n return \"\";\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n //let canShowLocationDetails = this.props.userService.apiTypeId() !== \"4D2BFEBD-7631-4AEE-96CF-392CFA0BFB3A\" && this.props.userService.apiTypeId() !== \"5C088F8B-7D16-4C06-B691-7E6FCD4344AD\";\n var nothingDoneColor = \"red\";\n var serviceHighlightColor = \"\";\n\n for (var i = 0; i < this.props.settings.length; i++) {\n if (this.props.settings[i].SettingKey === \"NothingDoneDotColor\") {\n nothingDoneColor = this.props.settings[i].SettingValue;\n } else if (this.props.settings[i].SettingKey === \"ServiceHighlightColor\") {\n serviceHighlightColor = this.props.settings[i].SettingValue;\n }\n }\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"table\", {\n id: \"soScheduleTable\",\n className: \"responsiveTable dailySetup table table-condensed table-striped-hiddenRows\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", {\n className: \"dotColumn\"\n }, \"Done\"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 85 + 'px'\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"TimeStart\"),\n onClick: function onClick() {\n return _this2.sort('TimeStart');\n }\n }, \"Start\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 80 + 'px'\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"TimeEnd\"),\n onClick: function onClick() {\n return _this2.sort('TimeEnd');\n }\n }, \"End\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n onClick: function onClick() {\n return _this2.sort('RoomDescription');\n },\n className: this.sortHeaderClass(\"RoomDescription\")\n }, \"Location\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n onClick: function onClick() {\n return _this2.sort('EventName');\n },\n className: this.sortHeaderClass(\"EventName\")\n }, \"Event Name\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"GroupName\"),\n onClick: function onClick() {\n return _this2.sort('GroupName');\n }\n }, \"Group\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n onClick: function onClick() {\n return _this2.sort('EstimatedCount');\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"EstimatedCount\")\n }, \"PPL\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n onClick: function onClick() {\n return _this2.sort('ServiceType');\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"ServiceType\")\n }, \"Service Type\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n onClick: function onClick() {\n return _this2.sort('AssignedTo');\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"AssignedTo\")\n }, \"Assigned To\")))), this.props.items.length === 0 && /*#__PURE__*/React.createElement(\"tbody\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: \"9\"\n }, \"No services scheduled today\"))), this.props.items.map(function (item) {\n return /*#__PURE__*/React.createElement(\"tbody\", {\n key: item.ID\n }, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", null, /*#__PURE__*/React.createElement(CompletionsCell, {\n item: item,\n showCompletionModal: _this2.props.showCompletionModal,\n allCompletionTypes: _this2.props.allCompletionTypes,\n completionsDataService: _this2.props.completionsDataService,\n userService: _this2.props.userService,\n limitCompletionsByDeparments: _this2.props.limitCompletionsByDeparments,\n nothingDoneColor: nothingDoneColor\n })), /*#__PURE__*/React.createElement(\"td\", null, moment(item.TimeStart).format(\"LT\")), /*#__PURE__*/React.createElement(\"td\", null, moment(item.TimeEnd).format(\"LT\")), /*#__PURE__*/React.createElement(\"td\", null, item.RoomDescription), /*#__PURE__*/React.createElement(\"td\", null, item.EventName), /*#__PURE__*/React.createElement(\"td\", null, item.GroupName), /*#__PURE__*/React.createElement(\"td\", null, item.EstimatedCount), /*#__PURE__*/React.createElement(\"td\", null, item.ServiceType), /*#__PURE__*/React.createElement(\"td\", null, item.AssignedToUserId > 0 && /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this2.showAssignUserModal(item);\n }\n }, item.AssignedTo), item.AssignedToUserId == 0 && /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this2.showAssignUserModal(item);\n }\n }, \"assign\"))), /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: \"9\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"detailsHeading\"\n }, \"Resources\"), /*#__PURE__*/React.createElement(SodItems, {\n ServiceOrderDetails: item.ServiceOrderDetails,\n minutesSinceLastChange: _this2.props.minutesSinceLastChange,\n apiService: _this2.props.slidesDataService,\n filters: _this2.props.filters,\n updateItemForBookingAction: _this2.props.updateItemForBookingAction,\n updateItemInCollection: _this2.props.updateItemInCollection,\n highlightColor: serviceHighlightColor\n }))));\n })), /*#__PURE__*/React.createElement(AssignServiceModal, {\n show: this.state.assignServiceModalShowing,\n linkedTask: this.state.newTaskModalItem,\n departments: this.state.departments,\n allUsers: this.state.allUsers,\n close: this.hideAssignServiceModal,\n apiService: this.props.slidesDataService,\n updateBookingWithTaskId: this.props.updateBookingWithTaskId,\n initialUsersInDepartment: this.state.initialUsersInDepartment,\n item: this.state.itemForAssignTo\n }));\n }\n }]);\n\n return SoSchedule;\n}(React.Component);\n\nSoSchedule.propTypes = {\n items: React.PropTypes.array,\n minutesSinceLastChange: React.PropTypes.number,\n settings: React.PropTypes.array,\n allCompletionTypes: React.PropTypes.array,\n completionsDataService: React.PropTypes.object,\n notesDataService: React.PropTypes.object,\n userService: React.PropTypes.object,\n sort: React.PropTypes.func,\n sortProperty: React.PropTypes.string,\n sortIsDesc: React.PropTypes.bool,\n filters: React.PropTypes.object\n};\n\nvar AssignServiceModal = /*#__PURE__*/function (_React$Component2) {\n _inherits(AssignServiceModal, _React$Component2);\n\n var _super2 = _createSuper(AssignServiceModal);\n\n function AssignServiceModal(props) {\n var _this3;\n\n _classCallCheck(this, AssignServiceModal);\n\n _this3 = _super2.call(this, props);\n _this3.assignService = _this3.assignService.bind(_assertThisInitialized(_this3));\n _this3.saveAndClose = _this3.saveAndClose.bind(_assertThisInitialized(_this3));\n _this3.handleChange = _this3.handleChange.bind(_assertThisInitialized(_this3));\n _this3.state = {\n selectedUserId: 0\n };\n return _this3;\n }\n\n _createClass(AssignServiceModal, [{\n key: \"handleChange\",\n value: function handleChange(event) {\n var target = event.target;\n var fieldVal = target.value;\n this.props.item.AssignedToUserId = fieldVal;\n this.setState({\n selectedUserId: fieldVal\n });\n }\n }, {\n key: \"assignService\",\n value: function assignService() {\n var that = this;\n var dto = {\n ServiceOrderId: this.props.item.ID,\n AssignedToUserId: this.state.selectedUserId\n };\n this.props.apiService.saveItem('api/DailySetup/AssignUserToService', dto).then(function (response) {\n that.props.close();\n }, function (error) {\n console.log(error);\n });\n }\n }, {\n key: \"saveAndClose\",\n value: function saveAndClose() {\n this.assignService();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.item.ServiceType)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"assignServiceModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Assign User to this service\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n controlId: \"AssignedToUserId\"\n }, /*#__PURE__*/React.createElement(ReactBootstrap.ControlLabel, null, \"Assigned To \"), /*#__PURE__*/React.createElement(ReactBootstrap.FormControl, {\n componentClass: \"select\",\n value: this.props.item.AssignedToUserId,\n onChange: this.handleChange,\n id: \"AssignedToUserId\"\n }, /*#__PURE__*/React.createElement(\"option\", {\n key: \"0\",\n value: \"0\"\n }, \"(unassigned)\"), this.props.allUsers.map(function (user, i) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: user.Id,\n value: user.Id\n }, user.UserName);\n }))))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.saveAndClose\n }, \"Yes\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"No\")));\n }\n }]);\n\n return AssignServiceModal;\n}(React.Component);\n\nAssignServiceModal.propTypes = {\n show: React.PropTypes.bool,\n item: React.PropTypes.object,\n apiService: React.PropTypes.object,\n close: React.PropTypes.func,\n settings: React.PropTypes.array,\n updateItemForBookingAction: React.PropTypes.func,\n filters: React.PropTypes.object,\n updateItemInCollection: React.PropTypes.func\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar TasksTable = /*#__PURE__*/function (_React$Component) {\n _inherits(TasksTable, _React$Component);\n\n var _super = _createSuper(TasksTable);\n\n function TasksTable(props) {\n var _this;\n\n _classCallCheck(this, TasksTable);\n\n _this = _super.call(this, props);\n _this.sort = _this.sort.bind(_assertThisInitialized(_this));\n _this.sortHeaderClass = _this.sortHeaderClass.bind(_assertThisInitialized(_this));\n _this.state = {\n tasks: _this.props.tasks,\n sortedTasks: [],\n sortBy: 'TaskStartAt',\n sortDir: 'ASC'\n };\n return _this;\n }\n\n _createClass(TasksTable, [{\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n var _this2 = this;\n\n this.setState({\n tasks: [].concat(nextProps.tasks)\n }, function () {\n return _this2.sort(_this2.state.sortBy, true);\n });\n }\n }, {\n key: \"sortHeaderClass\",\n value: function sortHeaderClass(propertyName) {\n if (this.state.sortBy === propertyName) {\n if (this.state.sortDir === \"DESC\") {\n return \"st-sort-descent\";\n } else {\n return \"st-sort-ascent\";\n }\n }\n\n return \"\";\n }\n }, {\n key: \"sort\",\n value: function sort(propertyName, dontChangeDirection) {\n var sortDir = this.state.sortDir;\n var sortBy = propertyName;\n\n if (!dontChangeDirection) {\n if (sortBy === this.state.sortBy) {\n sortDir = this.state.sortDir === 'ASC' ? 'DESC' : 'ASC';\n } else {\n sortDir = 'DESC';\n }\n }\n\n var rows = this.state.tasks.slice();\n rows.sort(function (a, b) {\n var sortVal = 0;\n var aSort = a[sortBy];\n var bSort = b[sortBy];\n var multiplier = sortDir === 'DESC' ? -1 : 1;\n\n if (aSort) {\n aSort = aSort.toLowerCase();\n } else {\n return -1 * multiplier;\n }\n\n if (bSort) {\n bSort = bSort.toLowerCase();\n } else {\n return 1 * multiplier;\n }\n\n if (aSort > bSort) {\n sortVal = 1;\n }\n\n if (aSort < bSort) {\n sortVal = -1;\n }\n\n sortVal = sortVal * multiplier;\n return sortVal;\n });\n this.setState({\n sortBy: sortBy,\n sortDir: sortDir,\n sortedTasks: rows\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var nothingDoneColor = \"red\";\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"table\", {\n id: \"dailySetupTasks\",\n className: \"responsiveTable table table-condensed table-striped\"\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", {\n className: \"dotColumn\"\n }, \"Done\"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 13 + \"%\"\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"TaskStartAt\"),\n onClick: function onClick() {\n return _this3.sort('TaskStartAt');\n }\n }, \"Start At\"), \" \"), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 13 + \"%\"\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"TaskFinishBy\"),\n onClick: function onClick() {\n return _this3.sort('TaskFinishBy');\n }\n }, \"Finish By\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 10 + \"%\"\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"Department\"),\n onClick: function onClick() {\n return _this3.sort('Department');\n }\n }, \"Department\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 10 + \"%\"\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"AssignedTo\"),\n onClick: function onClick() {\n return _this3.sort('AssignedTo');\n }\n }, \"Assigned To\")), /*#__PURE__*/React.createElement(\"th\", {\n className: \"pointer\",\n style: {\n width: 34 + \"%\"\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: this.sortHeaderClass(\"TaskDescription\"),\n onClick: function onClick() {\n return _this3.sort('TaskDescription');\n }\n }, \"Description\")), /*#__PURE__*/React.createElement(\"th\", {\n style: {\n width: 5 + \"%\"\n }\n }, \"Notes\"), /*#__PURE__*/React.createElement(\"th\", {\n style: {\n width: 5 + \"%\"\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, \"Linked Task\")))), this.state.sortedTasks.map(function (task) {\n return /*#__PURE__*/React.createElement(TaskRow, {\n key: task.TaskId,\n item: task,\n showCompletionModal: _this3.props.showCompletionModal,\n showNotesModal: _this3.props.showNotesModal,\n canEditTask: _this3.props.canEditTask,\n editTask: _this3.props.editTask,\n showHistoryModal: _this3.props.showHistoryModal,\n settings: _this3.props.settings,\n completionsDataService: _this3.props.completionsDataService,\n allCompletionTypes: _this3.props.allCompletionTypes,\n getLinkedBooking: _this3.props.getLinkedBooking,\n toggleServices: _this3.props.toggleServices,\n showCarouselModal: _this3.props.showCarouselModal,\n userService: _this3.props.userService,\n limitCompletionsByDeparments: _this3.props.limitCompletionsByDeparments,\n nothingDoneColor: nothingDoneColor\n });\n })));\n }\n }]);\n\n return TasksTable;\n}(React.Component);\n\nTasksTable.propTypes = {\n tasks: React.PropTypes.array,\n sort: React.PropTypes.func,\n sortHeaderClass: React.PropTypes.func,\n editTask: React.PropTypes.func,\n settings: React.PropTypes.array,\n allCompletionTypes: React.PropTypes.array,\n getLinkedBooking: React.PropTypes.func,\n toggleServices: React.PropTypes.func,\n showCarouselModal: React.PropTypes.func,\n userService: React.PropTypes.object,\n limitCompletionsByDeparments: React.PropTypes.bool\n};\n\nvar TaskRow = /*#__PURE__*/function (_React$Component2) {\n _inherits(TaskRow, _React$Component2);\n\n var _super2 = _createSuper(TaskRow);\n\n function TaskRow(props) {\n var _this4;\n\n _classCallCheck(this, TaskRow);\n\n _this4 = _super2.call(this, props);\n _this4.isAllDone = _this4.isAllDone.bind(_assertThisInitialized(_this4));\n return _this4;\n }\n\n _createClass(TaskRow, [{\n key: \"isAllDone\",\n value: function isAllDone() {\n var lastCompletion = this.props.completionsDataService.getLastCompletionForType(0, this.props.item);\n\n if (lastCompletion) {\n if (lastCompletion.CompletedAtUtc != null) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n var showAvailAt = true;\n\n for (var i = 0; i < this.props.settings.length; i++) {\n if (this.props.settings[i].SettingKey === \"AvailableAtTimeToUse\") {\n if (this.props.settings[i].SettingValue.toLowerCase() === 'fb35dae1-e2e8-4aac-b5c0-6236e594acc9') {\n showAvailAt = false;\n }\n }\n }\n\n var notesCell = null;\n\n if (this.props.item.Notes && this.props.item.Notes.length > 0) {\n notesCell = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-comments fa-1-5x\",\n title: \"View/Add Notes\"\n });\n } else {\n notesCell = /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-comments-o fa-1-5x\",\n title: \"Add Notes\"\n });\n }\n\n var myTaskClass = '';\n\n if (this.props.userService.userId() == this.props.item.AssignedToUserId) {\n myTaskClass = 'assignedToMe';\n }\n\n var displayRow = true;\n\n for (var _i = 0; _i < this.props.settings.length; _i++) {\n if (this.props.settings[_i].SettingKey === \"DropTaskWhenComplete\") {\n if (this.props.settings[_i].SettingValue === \"1\") {\n if (this.isAllDone()) {\n displayRow = false;\n }\n }\n\n continue;\n } else if (this.props.settings[_i].SettingKey === \"NothingDoneDotColor\") {\n nothingDoneColor = this.props.settings[_i].SettingValue;\n }\n }\n\n return displayRow && /*#__PURE__*/React.createElement(\"tbody\", null, /*#__PURE__*/React.createElement(\"tr\", {\n key: this.props.item.TaskId,\n className: \"responsiveRow dailySetupRow \" + myTaskClass\n }, /*#__PURE__*/React.createElement(CompletionsCell, {\n item: this.props.item,\n showCompletionModal: this.props.showCompletionModal,\n allCompletionTypes: this.props.allCompletionTypes,\n completionsDataService: this.props.completionsDataService,\n isAllDone: this.isAllDone,\n limitCompletionsByDeparments: this.props.limitCompletionsByDeparments,\n userService: this.props.userService,\n nothingDoneColor: this.props.nothingDoneColor\n }), /*#__PURE__*/React.createElement(\"td\", null, this.props.includeDate && moment(this.props.item.TaskDisplayOn).format(\"MM/DD/yyyy \"), \" \", moment(this.props.item.TaskStartAt).format(\"h:mm A\"), \"\\xA0\"), /*#__PURE__*/React.createElement(\"td\", null, this.props.item.TaskFinishBy && moment(this.props.item.TaskFinishBy).format(\"h:mm A\"), \"\\xA0\"), /*#__PURE__*/React.createElement(\"td\", null, this.props.item.Department), /*#__PURE__*/React.createElement(\"td\", null, this.props.item.AssignedTo, \"\\xA0\"), /*#__PURE__*/React.createElement(\"td\", {\n className: \"preWrap\"\n }, this.props.canEditTask(this.props.item) && /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this5.props.editTask(_this5.props.item);\n }\n }, this.props.item.TaskDescription), !this.props.canEditTask(this.props.item) && this.props.item.TaskDescription), /*#__PURE__*/React.createElement(\"td\", {\n onClick: this.props.showNotesModal.bind(this, this.props.item)\n }, /*#__PURE__*/React.createElement(\"a\", null, notesCell)), /*#__PURE__*/React.createElement(\"td\", null, this.props.item.LinkedBookingId && !this.props.hideLinkedBooking && /*#__PURE__*/React.createElement(\"a\", {\n onClick: function onClick() {\n return _this5.props.getLinkedBooking(_this5.props.item);\n }\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: \"fa fa-calendar-check-o\",\n title: \"View linked event\"\n })))), this.props.item.RelatedBookingItem && this.props.item.showingRelatedBooking && !this.props.hideLinkedBooking && /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: 8\n }, /*#__PURE__*/React.createElement(\"table\", {\n style: {\n width: 100 + \"%\"\n }\n }, /*#__PURE__*/React.createElement(\"thead\", null, /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"th\", null), /*#__PURE__*/React.createElement(\"th\", {\n className: \"dotColumn\"\n }, \"Done\"), /*#__PURE__*/React.createElement(\"th\", {\n style: {\n width: 80 + 'px'\n }\n }, \"Available\"), /*#__PURE__*/React.createElement(\"th\", {\n style: {\n width: 85 + 'px'\n }\n }, \"Starts\"), /*#__PURE__*/React.createElement(\"th\", {\n style: {\n width: 80 + 'px'\n }\n }, \"Ends\"), /*#__PURE__*/React.createElement(\"th\", null, \"Location/Event Name\"), /*#__PURE__*/React.createElement(\"th\", null, \"Group/Contact\"), /*#__PURE__*/React.createElement(\"th\", null, \"Status\"), /*#__PURE__*/React.createElement(\"th\", null, \"Notes\"), /*#__PURE__*/React.createElement(\"th\", null, \"Services\"), /*#__PURE__*/React.createElement(\"th\", null))), /*#__PURE__*/React.createElement(\"tbody\", null, /*#__PURE__*/React.createElement(BookingRow, {\n key: \"related-\" + this.props.item.RelatedBookingItem.BookingId,\n item: this.props.item.RelatedBookingItem,\n minutesSinceLastChange: this.props.minutesSinceLastChange,\n showReservedTime: this.props.showReservedTime,\n settings: this.props.settings,\n completionTypes: this.props.completionTypes,\n getHistoryForBooking: this.props.getHistoryForBooking,\n completionsDataService: this.props.completionsDataService,\n showCompletionModal: this.props.showCompletionModal,\n showHistoryModal: this.props.showHistoryModal,\n allCompletionTypes: this.props.allCompletionTypes,\n setAvailableAt: this.props.setAvailableAt,\n showNotesModal: this.props.showNotesModal,\n showCarouselModal: this.props.showCarouselModal,\n showNewTaskModal: this.showNewTaskModal,\n toggleServices: this.props.toggleServices,\n isRelatedBooking: true,\n apiService: this.props.apiService,\n userService: this.props.userService,\n showAvailAt: showAvailAt,\n nothingDoneColor: nothingDoneColor,\n showRow: true\n }), this.props.item.RelatedBookingItem.Services.length > 0 && /*#__PURE__*/React.createElement(\"tr\", null, /*#__PURE__*/React.createElement(\"td\", {\n colSpan: \"11\"\n }, /*#__PURE__*/React.createElement(ServicesList, {\n services: this.props.item.RelatedBookingItem.Services,\n minutesSinceLastChange: this.props.minutesSinceLastChange\n }))))))));\n }\n }]);\n\n return TaskRow;\n}(React.Component);\n\nTaskRow.propTypes = {\n item: React.PropTypes.object,\n settings: React.PropTypes.array,\n showCompletionModal: React.PropTypes.func,\n showCarouselModal: React.PropTypes.func,\n showNotesModal: React.PropTypes.func,\n userService: React.PropTypes.object,\n editTask: React.PropTypes.func,\n showRelatedBooking: React.PropTypes.func,\n showHistoryModal: React.PropTypes.func,\n toggleServices: React.PropTypes.func,\n isAllDone: React.PropTypes.func\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar TimePicker = /*#__PURE__*/function (_React$Component) {\n _inherits(TimePicker, _React$Component);\n\n var _super = _createSuper(TimePicker);\n\n function TimePicker(props) {\n var _this;\n\n _classCallCheck(this, TimePicker);\n\n _this = _super.call(this, props);\n _this.state = {\n editMode: false,\n timeData: []\n };\n return _this;\n }\n\n _createClass(TimePicker, [{\n key: \"componentWillMount\",\n value: function componentWillMount() {\n this.loadTimeData();\n }\n }, {\n key: \"loadTimeData\",\n value: function loadTimeData() {\n if (this.state.timeData.length === 0) {\n var times = [],\n i,\n j,\n t,\n h,\n hh,\n m;\n\n for (i = 0; i < 24; i++) {\n hh = i;\n\n if (i === 0) {\n h = \"12\";\n } else {\n if (i > 12) {\n h = i % 12;\n } else {\n h = i;\n }\n }\n\n for (j = 0; j < 4; j++) {\n t = h + \":\" + (j === 0 ? \"00\" : 15 * j);\n m = (hh < 10 ? \"0\" + hh : hh) + \":\" + (j === 0 ? \"00\" : 15 * j);\n t += \" \" + Number(i) < 12 ? \" AM\" : \" PM\";\n times.push({\n value: m,\n text: t\n });\n }\n }\n\n this.setState({\n timeData: times\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var times = this.state.timeData;\n return /*#__PURE__*/React.createElement(ReactBootstrap.FormGroup, {\n controlId: this.props.id,\n validationState: this.props.validationState\n }, /*#__PURE__*/React.createElement(ReactBootstrap.ControlLabel, null, this.props.label), /*#__PURE__*/React.createElement(ReactBootstrap.FormControl, {\n componentClass: \"select\",\n value: this.props.value,\n onChange: this.props.onChange\n }, this.props.allowEmpty && /*#__PURE__*/React.createElement(\"option\", {\n value: \"\"\n }), times.map(function (time, i) {\n return /*#__PURE__*/React.createElement(\"option\", {\n key: time.value,\n value: time.value\n }, time.text);\n })), /*#__PURE__*/React.createElement(ReactBootstrap.HelpBlock, null, this.props.feedBack));\n }\n }]);\n\n return TimePicker;\n}(React.Component);\n\nTimePicker.propTypes = {\n allowEmpty: React.PropTypes.bool,\n value: React.PropTypes.string,\n onChange: React.PropTypes.func.isRequired,\n validationState: React.PropTypes.string,\n feedBack: React.PropTypes.string\n};\nTimePicker.defaultProps = {\n allowEmpty: true,\n value: '',\n validationState: null,\n feedBack: ''\n};\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar UdfsList = /*#__PURE__*/function (_React$Component) {\n _inherits(UdfsList, _React$Component);\n\n var _super = _createSuper(UdfsList);\n\n function UdfsList(props) {\n var _this;\n\n _classCallCheck(this, UdfsList);\n\n _this = _super.call(this, props);\n _this.addHyperlinks = _this.addHyperlinks.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(UdfsList, [{\n key: \"addHyperlinks\",\n value: function addHyperlinks(text) {\n // Create your regex pattern for urls \n var urlPattern = /\\b((?:[a-z][\\w-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\z`!()\\[\\]{};:'\".,<>?«»“”‘’]))/ig; // Check string for any url patterns and wrap them in anchor tags \n\n var result = text.replace(urlPattern, function (url) {\n return \"\").concat(url.trim(), \"\");\n });\n return result;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return /*#__PURE__*/React.createElement(\"ul\", null, this.props.udfs.map(function (udf) {\n return /*#__PURE__*/React.createElement(\"li\", null, udf.Description, /*#__PURE__*/React.createElement(\"ul\", null, /*#__PURE__*/React.createElement(\"li\", {\n className: \"preWrap\",\n dangerouslySetInnerHTML: {\n __html: _this2.addHyperlinks(udf.FieldValue)\n }\n })));\n }));\n }\n }]);\n\n return UdfsList;\n}(React.Component);\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar UpdateSodQtyModal = /*#__PURE__*/function (_React$Component) {\n _inherits(UpdateSodQtyModal, _React$Component);\n\n var _super = _createSuper(UpdateSodQtyModal);\n\n function UpdateSodQtyModal(props) {\n var _this;\n\n _classCallCheck(this, UpdateSodQtyModal);\n\n _this = _super.call(this, props);\n _this.updateSodQty = _this.updateSodQty.bind(_assertThisInitialized(_this));\n _this.updateAndClose = _this.updateAndClose.bind(_assertThisInitialized(_this));\n _this.state = {\n value: \"\"\n };\n _this.onChange = _this.onChange.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(UpdateSodQtyModal, [{\n key: \"componentWillReceiveProps\",\n value: function componentWillReceiveProps(nextProps) {\n this.setState({\n value: nextProps.sod.Quantity\n });\n }\n }, {\n key: \"updateSodQty\",\n value: function updateSodQty() {\n var that = this;\n var qty = this.state.value;\n\n if (qty) {\n var dto = {\n Filters: this.props.filters,\n SoId: this.props.sod.ServiceOrderID,\n SodId: this.props.sod.ID,\n NewQuantity: qty,\n IsCheckinRequest: false\n };\n this.props.apiService.saveItem('api/DailySetup/UpdateSod', dto).then(function (response) {\n if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n }\n\n this.setState({\n value: \"\"\n });\n }\n }, {\n key: \"updateAndClose\",\n value: function updateAndClose() {\n this.updateSodQty();\n this.props.close();\n }\n }, {\n key: \"onChange\",\n value: function onChange(e) {\n var re = /^[0-9\\b]+$/;\n\n if (e.target.value === '' || re.test(e.target.value)) {\n this.setState({\n value: e.target.value\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, this.props.sod.TempResourceDescription || this.props.sod.Resource && this.props.sod.Resource.Description || \"Bad Config - Missing Resource\")), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"updateSodModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Specify New Quantity\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: \"text-left\",\n htmlFor: \"quantity\"\n }, \"Quantity\"), /*#__PURE__*/React.createElement(\"input\", {\n type: \"number\",\n id: \"quantity\",\n name: \"quantity\",\n className: \"form-control\",\n value: this.state.value,\n onChange: this.onChange\n }))))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.updateAndClose\n }, \"Ok\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"Cancel\")));\n }\n }]);\n\n return UpdateSodQtyModal;\n}(React.Component);\n\nvar ConfirmAttendeeCheckinModal = /*#__PURE__*/function (_React$Component2) {\n _inherits(ConfirmAttendeeCheckinModal, _React$Component2);\n\n var _super2 = _createSuper(ConfirmAttendeeCheckinModal);\n\n function ConfirmAttendeeCheckinModal(props) {\n var _this2;\n\n _classCallCheck(this, ConfirmAttendeeCheckinModal);\n\n _this2 = _super2.call(this, props);\n _this2.confirmCheckin = _this2.confirmCheckin.bind(_assertThisInitialized(_this2));\n _this2.saveAndClose = _this2.saveAndClose.bind(_assertThisInitialized(_this2));\n return _this2;\n }\n\n _createClass(ConfirmAttendeeCheckinModal, [{\n key: \"confirmCheckin\",\n value: function confirmCheckin() {\n var that = this;\n var dto = {\n Filters: this.props.filters,\n SoId: this.props.sod.ServiceOrderID,\n SodId: this.props.sod.ID,\n NewQuantity: 0,\n IsCheckinRequest: true\n };\n this.props.apiService.saveItem('api/DailySetup/UpdateSod', dto).then(function (response) {\n if (response.data) {\n that.props.updateItemForBookingAction(response.data);\n that.props.updateItemInCollection(response.data);\n }\n }, function (error) {\n console.log(error);\n });\n }\n }, {\n key: \"saveAndClose\",\n value: function saveAndClose() {\n this.confirmCheckin();\n this.props.close();\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ReactBootstrap.Modal, {\n show: this.props.show,\n onHide: this.props.close,\n enforceFocus: false\n }, /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Header, {\n closeButton: true\n }, /*#__PURE__*/React.createElement(\"h3\", null, \"Checkin \", this.props.sod.TempResourceDescription)), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Body, {\n id: \"emsEndBookingModal\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget wblue\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-head truncate\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"page-title pull-left\"\n }, \"Attendee Check-In\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"clearfix\"\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"widget-content text-center text-info\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"text-left form-group\"\n }, \"Are you sure you want to check in \", this.props.sod.TempResourceDescription, \"?\")))), /*#__PURE__*/React.createElement(ReactBootstrap.Modal.Footer, null, /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.saveAndClose\n }, \"Yes\"), /*#__PURE__*/React.createElement(ReactBootstrap.Button, {\n onClick: this.props.close\n }, \"No\")));\n }\n }]);\n\n return ConfirmAttendeeCheckinModal;\n}(React.Component);","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('Excel', Excel);\r\n\r\n Excel.$inject = ['fileDownloader'];\r\n /* @ngInject */\r\n function Excel(downloader) {\r\n return {\r\n downloadExcel: downloadExcel\r\n }\r\n\r\n function tableToCsv(tableId, html) {\r\n var $table = html ? $(html) : $(tableId);\r\n var $rows = $table.find('tr:has(th), tr:has(td)');\r\n\r\n // Temporary delimiter characters unlikely to be typed by keyboard\r\n // This is to avoid accidentally splitting the actual contents\r\n var tmpColDelim = String.fromCharCode(11); // vertical tab character\r\n var tmpRowDelim = String.fromCharCode(0); // null character\r\n\r\n // actual delimiter characters for CSV format\r\n var colDelim = '\",\"';\r\n var rowDelim = '\"\\r\\n\"';\r\n\r\n // Grab text from table into CSV formatted string\r\n var csv = '\"' + $rows.map(function (i, row) {\r\n var $row = $(row),\r\n $cols = $row.find('th, td');\r\n\r\n return $cols.map(function (j, col) {\r\n var $col = $(col);\r\n var text = $col.text();\r\n if (text) {\r\n text = text.trim();\r\n }\r\n\r\n return text.replace(/\"/g, '\"\"'); // escape double quotes\r\n\r\n }).get().join(tmpColDelim);\r\n\r\n }).get().join(tmpRowDelim)\r\n .split(tmpRowDelim).join(rowDelim)\r\n .split(tmpColDelim).join(colDelim) + '\"';\r\n\r\n return csv;\r\n }\r\n\r\n function downloadExcel(tableId, downloadName, html) {\r\n var data = tableToCsv(tableId, html);\r\n downloader.download(data, \"data:application/csv\", downloadName);\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('ReportFileBuilder', ReportFileBuilder);\r\n\r\n ReportFileBuilder.$inject = ['Excel'];\r\n /* @ngInject */\r\n function ReportFileBuilder(excel) {\r\n return {\r\n exportToExcel: exportToExcel,\r\n exportToPdf: exportToPdf\r\n };\r\n\r\n function exportToExcel(fileName, tableId, colIndexToRemove, tableHtml) {\r\n if (!tableHtml) {\r\n var clonedTable = $(tableId).clone(true);\r\n if (colIndexToRemove) {\r\n $(clonedTable).find('tr').find('td:eq(' + colIndexToRemove + '),th:eq(' + colIndexToRemove + ')').remove();\r\n }\r\n tableHtml = clonedTable.html();\r\n }\r\n excel.downloadExcel(tableId, fileName + '.csv', tableHtml);\r\n }\r\n\r\n function exportToPdf(fileName, tableId, filters) {\r\n var rows = [];\r\n\r\n $.each($(tableId + ' tr'), function (i, row) {\r\n var cols = [];\r\n $.each($(row).find(\"td, th\"), function (j, cell) {\r\n var oCell = $(cell);\r\n var txt = oCell.text().trim() || \" \";\r\n var img = oCell.find('img')[0];\r\n if (img) {\r\n cols.push({ image: img.src });\r\n }\r\n else {\r\n cols.push(txt);\r\n }\r\n });\r\n rows.push(cols);\r\n });\r\n\r\n\r\n var docHeader = fileName + \" - \";\r\n docHeader += moment(filters.fromDate).format(\"MM/DD/YYYY\") + \" - \" + moment(filters.toDate).format(\"MM/DD/YYYY\");\r\n\r\n var docDefinition = {\r\n header: { text: docHeader, margin: [5, 5, 0, 0] },\r\n footer: function (currentPage, pageCount) { return { text: currentPage.toString() + ' of ' + pageCount, alignment: 'right', margin: [0, 0, 5, 0] }; },\r\n pageOrientation: 'landscape',\r\n content: [\r\n {\r\n table: {\r\n // headers are automatically repeated if the table spans over multiple pages\r\n // you can declare how many rows should be treated as headers\r\n headerRows: 1,\r\n body: rows,\r\n dontBreakRows: true\r\n }\r\n }\r\n ]\r\n };\r\n \r\n pdfMake.createPdf(docDefinition).download(docHeader + \".pdf\");\r\n \r\n }\r\n\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.reports')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'reports',\r\n config: {\r\n abstract: true,\r\n url: '/reports',\r\n template: '',\r\n settings: {\r\n authMode: 1,\r\n requireOps: true\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'reports.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/reports/list.html?v=' + opsIncludeVersion,\r\n controller: 'ReportsListController',\r\n controllerAs: 'vm',\r\n title: 'Reports',\r\n settings: {\r\n authMode: 1,\r\n nav: 600,\r\n content: ' Reports',\r\n allowedUserTypes: [2, 1],\r\n requireOps: true,\r\n \r\n }\r\n }\r\n }\r\n , {\r\n state: 'reports.notes',\r\n config: {\r\n url: '/notes',\r\n templateUrl: 'app/reports/notes/report.html?v=' + opsIncludeVersion,\r\n controller: 'DailyNotesReportController',\r\n controllerAs: 'vm',\r\n title: 'Reports',\r\n settings: {}\r\n\r\n }\r\n },\r\n {\r\n state: 'reports.analytics',\r\n config: {\r\n url: '/analytics',\r\n templateUrl: 'app/reports/analytics/report.html?v=' + opsIncludeVersion,\r\n controller: 'CompletionsByRangeController',\r\n controllerAs: 'vm',\r\n title: 'Reports',\r\n settings: {}\r\n\r\n }\r\n },\r\n {\r\n state: 'reports.dailylogs',\r\n config: {\r\n url: '/dailylogs',\r\n templateUrl: 'app/reports/dailyLogs/report.html?v=' + opsIncludeVersion,\r\n controller: 'DailyLogsReportController',\r\n controllerAs: 'vm',\r\n title: 'Reports',\r\n settings: {}\r\n }\r\n },\r\n {\r\n state: 'reports.eventcompletions',\r\n config: {\r\n url: '/eventcompletions',\r\n templateUrl: 'app/reports/eventCompletions/report.html?v=' + opsIncludeVersion,\r\n controller: 'EventCompletionsReportController',\r\n controllerAs: 'vm',\r\n title: 'Event Completions Report',\r\n settings: {}\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.reports')\r\n .controller('ReportsListController', ReportsListController);\r\n\r\n ReportsListController.$inject = ['common', 'dataservice'];\r\n /* @ngInject */\r\n function ReportsListController(common, dataservice) {\r\n var vm = this;\r\n vm.title = 'Reports';\r\n vm.opsIncludeVersion = common.opsIncludeVersion;\r\n \r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.surveys')\r\n .controller('SurveyDetailsController', SurveyDetailsController);\r\n\r\n SurveyDetailsController.$inject = [\r\n '$state', '$stateParams', '$window',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function SurveyDetailsController($state, $stateParams, $window, bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.counts = [];\r\n vm.deletedQuestions = [];\r\n vm.deletedOptions = [];\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n vm.preventDelete = preventDelete;\r\n\r\n vm.questionClick = questionClick;\r\n vm.addQuestion = addQuestion;\r\n vm.addOption = addOption;\r\n vm.showMove = showMove;\r\n vm.moveOpt = moveOpt;\r\n vm.deleteOpt = deleteOpt;\r\n vm.deleteQuestion = deleteQuestion;\r\n vm.answerTypeText = answerTypeText;\r\n vm.isRequiredAndNotActivated = isRequiredAndNotActivated;\r\n vm.sendOnData = [];\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), initLookups(), getItem(), getCounts()];\r\n\r\n return common.$q.all(promises).then(function (data) {\r\n\r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"surveys.list\");\r\n }\r\n\r\n function preventDelete() {\r\n if (vm.counts.length > 0 || $stateParams.id === \"\") {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Survey')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/Surveys/\" + vm.item.UId).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id;\r\n return val === \"\";\r\n }\r\n\r\n function getCounts() {\r\n return dataservice.getItems('api/Surveys/CountsOfEntries/' + $stateParams.id).then(function (response) {\r\n vm.counts = response.data;\r\n return vm.counts;\r\n }, function (error) { });\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.Active = 1;\r\n vm.item.AskStandardUsers = 1;\r\n vm.item.AskManagers = 1;\r\n vm.item.AskAdmins = 1;\r\n vm.item.Questions = [];\r\n common.setAuditInfo(vm.item);\r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/Surveys/\" + val)\r\n .then(function (data) {\r\n if (data) {\r\n vm.item = data.data;\r\n if (!vm.item.Questions) {\r\n vm.item.Questions = [];\r\n }\r\n common.setAuditInfo(vm.item);\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n\r\n function initLookups() {\r\n }\r\n\r\n function save() {\r\n\r\n vm.isSaving = true;\r\n \r\n if (vm.deletedOptions.length > 0) {\r\n dataservice.saveItem('api/Surveys/DeleteQuestionItems', vm.deletedOptions).then(function (saveResult) {\r\n }, function (error) { });\r\n }\r\n\r\n if (vm.deletedQuestions.length > 0) {\r\n dataservice.saveItem('api/Surveys/DeleteQuestions', vm.deletedQuestions).then(function (saveResult) {\r\n }, function (error) { });\r\n }\r\n\r\n dataservice.saveItem('api/Surveys/Save', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n\r\n }\r\n\r\n function isRequiredAndNotActivated(question) {\r\n return !question.Activated && question.Required == true;\r\n }\r\n\r\n function deleteQuestion(question) {\r\n if (question.HasBeenAnswered) {\r\n var deleteMsg = \"This question has been answered. Deleting it will also delete all responses to the question. Are you sure you want to delete this question?\";\r\n\r\n return bsDialog.deleteDialog('Survey Question', deleteMsg, \"Yes\", \"No\").then(function () {\r\n vm.deletedQuestions.push(question);\r\n vm.item.Questions.splice(vm.item.Questions.indexOf(question), 1);\r\n }, function () { });\r\n\r\n }\r\n else {\r\n if (question.ID > 0) {\r\n vm.deletedQuestions.push(question);\r\n }\r\n vm.item.Questions.splice(vm.item.Questions.indexOf(question), 1);\r\n }\r\n\r\n }\r\n\r\n function deleteOpt(question, opt) {\r\n if (opt.ID > 0) {\r\n\r\n if (question.HasBeenAnswered) {\r\n var deleteMsg = \"This question has been answered. Deleting this option will also delete all responses to the question that answered with this option. Are you sure you want to delete this option?\";\r\n\r\n return bsDialog.deleteDialog('Log Type', deleteMsg, \"Yes\", \"No\").then(function () {\r\n vm.deletedOptions.push(opt);\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }, function () { });\r\n\r\n }\r\n else {\r\n vm.deletedOptions.push(opt);\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }\r\n }\r\n else {\r\n question.Items.splice(question.Items.indexOf(opt), 1);\r\n }\r\n\r\n }\r\n\r\n function showMove(dir, question, opt) {\r\n if (dir == -1) {\r\n if (question.Items.indexOf(opt) == 0) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n else {\r\n if (question.Items.indexOf(opt) == (question.Items.length - 1)) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n\r\n function moveOpt(dir, question, opt) {\r\n var index = question.Items.indexOf(opt);\r\n var newIndex = index + dir;\r\n\r\n var removedElement;\r\n if (newIndex > -1 && newIndex < question.Items.length) {\r\n removedElement = question.Items.splice(index, 1)[0];\r\n }\r\n\r\n question.Items.splice(newIndex, 0, removedElement);\r\n }\r\n\r\n function questionClick(question) {\r\n for (var i = 0; i < vm.item.Questions.length; i++) {\r\n vm.item.Questions[i].Activated = false;\r\n }\r\n question.Activated = true;\r\n }\r\n\r\n function answerTypeText(question) {\r\n switch (question.AnswerType) {\r\n case 1:\r\n return \"Short Answer\";\r\n case 2:\r\n return \"Paragraph\";\r\n case 3:\r\n return \"Multiple Choice\";\r\n case 4:\r\n return \"Checkboxes\";\r\n case 5:\r\n return \"Dropdown\";\r\n case 6:\r\n return \"Date\";\r\n case 7:\r\n return \"Time\"\r\n }\r\n }\r\n\r\n function addQuestion() {\r\n for (var i = 0; i < vm.item.Questions.length; i++) {\r\n vm.item.Questions[i].Activated = false;\r\n }\r\n var question = {};\r\n\r\n question.Question = \"\";\r\n question.AnswerType = 1;\r\n question.AnswerTypeText = \"Short Answer\";\r\n question.Items = [];\r\n question.Active = true;\r\n question.Activated = true;\r\n question.Sequence = vm.item.Questions.length;;\r\n question.Required = false;\r\n vm.item.Questions.push(question);\r\n }\r\n\r\n function addOption(question) {\r\n var i = question.Items.length + 1;\r\n var opt = { Description: \"Option \" + i, Active: true };\r\n question.Items.push(opt)\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.surveys')\r\n .controller('SurveyListController', SurveyListController);\r\n\r\n SurveyListController.$inject = ['common', 'dataservice', 'bootstrap.dialog', 'config', '$http'];\r\n /* @ngInject */\r\n function SurveyListController(common, dataservice, bsDialog, config, $http) {\r\n var vm = this;\r\n vm.title = 'Surveys';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/Surveys').then(function (response) {\r\n var data = response.data;\r\n vm.items = data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.surveys')\r\n .controller('SurveyResultsController', SurveyResultsController);\r\n\r\n SurveyResultsController.$inject = [\r\n '$state', '$stateParams', 'common', 'dataservice'\r\n ];\r\n\r\n function SurveyResultsController($state, $stateParams, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n vm.common = common;\r\n vm.cancel = cancel;\r\n vm.surveyResults = [];\r\n vm.textQuestions = [];\r\n vm.displayedTextQuestions = [];\r\n vm.answerDetailsId = '';\r\n vm.showAnswerDetails = showAnswerDetails;\r\n vm.chartOptions = {\r\n legend: { display: true, position: 'bottom' },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n var allData = data.datasets[tooltipItem.datasetIndex].data;\r\n var tooltipLabel = data.labels[tooltipItem.index];\r\n var tooltipData = allData[tooltipItem.index];\r\n var total = 0;\r\n for (var i in allData) {\r\n total += allData[i];\r\n }\r\n var tooltipPercentage = Math.round((tooltipData / total) * 100);\r\n return tooltipLabel + ': ' + tooltipPercentage + '%';\r\n }\r\n }\r\n }\r\n };\r\n\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem()];\r\n\r\n return common.$q.all(promises).then(function (data) {\r\n\r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n $state.go(\"surveys.list\");\r\n }\r\n\r\n function showAnswerDetails($event, item) {\r\n \r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n vm.answerDetailsId = item.UId;\r\n }\r\n\r\n\r\n function getItem() {\r\n var surveyUId = $stateParams.id;\r\n\r\n return dataservice.getItem(\"api/Surveys/Results/\" + surveyUId)\r\n .then(function (response) {\r\n if (response) {\r\n var data = response.data;\r\n vm.title = data.Description;\r\n vm.textQuestions = data.TextQuestionResponses;\r\n vm.displayedTextQuestions = [].concat(vm.textQuestions);\r\n \r\n for (var i = 0; i < data.QuestionResponses.length; i++) {\r\n if (data.QuestionResponses[i].AnswerType !== 2 && data.QuestionResponses[i].AnswerType !== 1) {\r\n vm.surveyResults.push({ Question: data.QuestionResponses[i].Question, ChartData: data.QuestionResponses[i].Data, ChartLabels: data.QuestionResponses[i].Labels });\r\n }\r\n \r\n }\r\n \r\n\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.surveys')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'surveys',\r\n config: {\r\n abstract: true,\r\n url: '/surveys',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.tenantId() != \"1\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'surveys.list',\r\n config: {\r\n url: '/surveylist',\r\n templateUrl: 'app/surveys/list.html?v=' + opsIncludeVersion,\r\n controller: 'SurveyListController',\r\n controllerAs: 'vm',\r\n title: 'Questions'\r\n }\r\n },\r\n {\r\n state: 'surveys.details',\r\n config: {\r\n url: '/survey/:id',\r\n templateUrl: 'app/surveys/details.html?v=' + opsIncludeVersion,\r\n controller: 'SurveyDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Survey Details',\r\n settings: {}\r\n }\r\n },\r\n {\r\n state: 'surveys.results',\r\n config: {\r\n url: '/surveyresult/:id',\r\n templateUrl: 'app/surveys/results.html?v=' + opsIncludeVersion,\r\n controller: 'SurveyResultsController',\r\n controllerAs: 'vm',\r\n title: 'Survey Results',\r\n settings: {}\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tasks')\r\n .factory('linkedTask.dialog', linkedTaskDialog);\r\n\r\n linkedTaskDialog.$inject = ['$uibModal', '$templateCache', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function linkedTaskDialog($modal, $templateCache, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n\r\n $templateCache.put('linkedTaskDialog.tpl.html?v=' + opsIncludeVersion,\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '

New Linked Task

' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
');\r\n\r\n return service;\r\n\r\n function display(item, settings) {\r\n var modalOptions = {\r\n templateUrl: 'linkedTaskDialog.tpl.html?v=' + opsIncludeVersion,\r\n controller: LinkedTaskModalInstance,\r\n controllerAs: \"vm\",\r\n keyboard: true,\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n item: item,\r\n settings: settings\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $modal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n LinkedTaskModalInstance.$inject = ['$uibModalInstance', 'options', 'common', 'dataservice', '$window'];\r\n\r\n /* @ngInject */\r\n function LinkedTaskModalInstance($modalInstance, options, common, dataservice, $window) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n vm.okText = 'Save';\r\n vm.cancelText = 'Cancel';\r\n vm.item = undefined;\r\n vm.cancel = function () {\r\n $modalInstance.dismiss('cancel');\r\n };\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.openDatePicker = openDatePicker;\r\n vm.usersInDepartments = [];\r\n vm.allUsers = [];\r\n vm.templates = [];\r\n vm.dpStatus = {\r\n displayOnOpen: false,\r\n }\r\n vm.datePickerOptions = {\r\n showWeeks: false,\r\n ngModelOptions: {\r\n allowInvalid: false\r\n }\r\n };\r\n vm.departments = [];\r\n vm.departmentChange = departmentChange;\r\n vm.templateChange = templateChange;\r\n vm.selectedTemplate = null;\r\n\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem()];\r\n return common.$q.all(promises).then(function (data) {\r\n departmentChange();\r\n }, function (error) { });\r\n\r\n }\r\n\r\n function openDatePicker($event) {\r\n vm.dpStatus.displayOnOpen = true;\r\n }\r\n\r\n function templateChange() {\r\n if (vm.selectedTemplate) {\r\n for (var i = 0; i < vm.templates.length; i++) {\r\n var t = vm.templates[i];\r\n if (vm.selectedTemplate === t.UId) {\r\n if (vm.item.Description) {\r\n vm.item.Description += \"\\n\" + t.Description;\r\n }\r\n else {\r\n vm.item.Description = t.Description;\r\n }\r\n\r\n vm.item.DepartmentIds = t.DepartmentIds;\r\n vm.item.StartAtDisplay = moment(t.StartAtDisplay.substr(0, 16)).toDate();\r\n if (t.FinishByDisplay !== null) {\r\n vm.item.IncludeFinishBy = 1;\r\n vm.item.FinishByDisplay = moment(t.FinishByDisplay.substr(0, 16)).toDate();\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getItem() {\r\n \r\n return dataservice.getItem(\"api/Tasks/0\")\r\n .then(function (response) {\r\n if (response) {\r\n vm.departments = response.data.departments;\r\n vm.allUsers = response.data.usersWithDepartments;\r\n vm.templates = response.data.taskTemplates;\r\n vm.item = {};\r\n vm.item.Description = \"Set \" + options.item.RoomDescription + \" for \" + options.item.EventName + \" on \" + moment(options.item.BuildingLocalEventStart).format(\"L\"),\r\n vm.item.StartAtDisplay = moment().set(\"hour\", 6).set(\"minute\", 0).toDate();\r\n vm.item.IncludeFinishBy = 0;\r\n vm.item.EmailUserTheyHaveANewTask = 0;\r\n vm.item.LinkedBookingId = options.item.BookingId;\r\n var displayOn = new Date();\r\n if (options.settings) {\r\n for (var i = 0; i < options.settings.length; i++) {\r\n if (options.settings[i].SettingKey == \"UseBookingDateForLinkedTask\") {\r\n if (options.settings[i].SettingValue == \"1\") {\r\n displayOn = new Date(options.item.BuildingLocalEventStart);\r\n }\r\n }\r\n }\r\n }\r\n\r\n vm.item.DisplayOn = displayOn\r\n try {\r\n var deptIdsAsString = $window.localStorage.getItem(\"SevenPointTaskDepartmentIds\");\r\n vm.item.DepartmentIds = [];\r\n if (deptIdsAsString) {\r\n try {\r\n var deptIds = deptIdsAsString.split(',');\r\n for (var i = 0; i < deptIds.length; i++) {\r\n for (var j = 0; j < vm.departments.length; j++) {\r\n if (vm.departments[j].ID == deptIds[i]) {\r\n vm.item.DepartmentIds.push(deptIds[i])\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n catch (error) {\r\n console.log(error);\r\n vm.item.DepartmentIds = [];\r\n vm.item.DepartmentIds.push(0);\r\n }\r\n }\r\n else {\r\n vm.item.DepartmentIds = [];\r\n vm.item.DepartmentIds.push(0);\r\n }\r\n }\r\n catch (error) {\r\n console.log(error);\r\n vm.item.DepartmentIds = [];\r\n vm.item.DepartmentIds.push(0);\r\n }\r\n\r\n vm.item.StartAtDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 6, 0, 0, 0)\r\n vm.item.FinishByDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 17, 0, 0, 0);\r\n vm.item.AssignedToUserId = 0;\r\n vm.item.EmailUserTheyHaveANewTask = 0\r\n common.setAuditInfo(vm.item);\r\n\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n });\r\n }\r\n\r\n function departmentChange() {\r\n vm.usersInDepartments = [];\r\n var addedUserIds = [];\r\n for (var i = 0; i < vm.allUsers.length; i++) {\r\n var user = vm.allUsers[i];\r\n for (var j = 0; j < user.Departments.length; j++) {\r\n for (var ii = 0; ii < vm.item.DepartmentIds.length; ii++) {\r\n if (vm.item.DepartmentIds[ii] == user.Departments[j]) {\r\n if (addedUserIds.indexOf(user.Id) === -1) {\r\n addedUserIds.push(user.Id);\r\n vm.usersInDepartments.push(user);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function save() {\r\n if (vm.item.DepartmentIds.length === 0) {\r\n common.logger.error(\"You must select at least one department\");\r\n return;\r\n }\r\n\r\n var fromLocal = common.buildDateTime(vm.item.DisplayOn, vm.item.StartAtDisplay);\r\n\r\n if (vm.item.DisplayUntil) {\r\n var displayFrom = moment(fromLocal);\r\n var displayUntil = moment(vm.item.DisplayUntil);\r\n\r\n if (displayFrom.isAfter(displayUntil)) {\r\n common.logger.error(\"Display Until must be after Display On\");\r\n return;\r\n }\r\n\r\n\r\n if (!vm.item.DisplaysOnSunday\r\n && !vm.item.DisplaysOnMonday\r\n && !vm.item.DisplaysOnTuesday\r\n && !vm.item.DisplaysOnWednesday\r\n && !vm.item.DisplaysOnThursday\r\n && !vm.item.DisplaysOnFriday\r\n && !vm.item.DisplaysOnSaturday\r\n ) {\r\n common.logger.error(\"Repeating tasks must repeat on a least one day of the week\");\r\n return;\r\n }\r\n\r\n }\r\n\r\n\r\n if (vm.item.IncludeFinishBy == 1) {\r\n\r\n var toLocal = common.buildDateTime(vm.item.DisplayOn, vm.item.FinishByDisplay);\r\n if (toLocal < fromLocal) {\r\n logger.error(\"Finish By must be after Start At\")\r\n return;\r\n }\r\n vm.item.FinishBy = moment(toLocal).format(\"HH:mm\");\r\n }\r\n else {\r\n vm.item.FinishBy = null;\r\n }\r\n\r\n vm.item.DisplayOn = moment(fromLocal).format(\"YYYY-MM-DDT00:00\");\r\n\r\n vm.item.StartAt = moment(fromLocal).format(\"HH:mm\");\r\n vm.isSaving = true;\r\n $window.localStorage.setItem(\"SevenPointTaskDepartmentIds\", vm.item.DepartmentIds.join());\r\n dataservice.saveItem('api/Tasks', vm.item).then(function (saveResult) {\r\n\r\n vm.isSaving = false;\r\n common.notifier.notify(common.config.events.taskCountChange);\r\n $modalInstance.close(saveResult);\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n\r\n \r\n\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tasks')\r\n .directive('taskCells', taskCells);\r\n\r\n taskCells.$inject = [ 'opsIncludeVersion']\r\n /* @ngInject */\r\n function taskCells(opsIncludeVersion) {\r\n \r\n var directive = {\r\n restrict: 'A',\r\n link: link,\r\n scope: {\r\n 'item': '=',\r\n 'completions': '=',\r\n 'completionTypes': '=',\r\n 'notes': '=',\r\n 'canEdit': '&'\r\n },\r\n templateUrl: 'app/tasks/_taskCells.html?v=' + opsIncludeVersion\r\n };\r\n\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n }\r\n }\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tasks')\r\n .controller('TaskDetailController', TaskDetailController);\r\n\r\n TaskDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice', '$window'\r\n ];\r\n\r\n function TaskDetailController($state, $stateParams, bsDialog, common, dataservice, $window) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n vm.openDatePicker = openDatePicker;\r\n vm.usersInDepartments = [];\r\n vm.allUsers = [];\r\n vm.templates = [];\r\n vm.dpStatus = {\r\n displayOnOpen: false,\r\n }\r\n vm.datePickerOptions = {\r\n showWeeks: false,\r\n ngModelOptions: {\r\n allowInvalid: false\r\n }\r\n };\r\n vm.departments = [];\r\n vm.departmentChange = departmentChange;\r\n vm.templateChange = templateChange;\r\n vm.selectedTemplate = null;\r\n \r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem()];\r\n return common.$q.all(promises).then(function (data) {\r\n departmentChange();\r\n }, function (error) { });\r\n \r\n }\r\n\r\n function openDatePicker($event) {\r\n vm.dpStatus.displayOnOpen = true;\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n if ($stateParams.fromDailySetup) {\r\n $state.go(\"dailysetup\");\r\n }\r\n else {\r\n if ($stateParams.fromDisplay) {\r\n $state.go(\"tasks.display\");\r\n }\r\n else {\r\n $state.go(\"tasks.list\");\r\n }\r\n }\r\n \r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Task')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/Tasks/\" + vm.item.ID).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"0\";\r\n }\r\n\r\n\r\n function templateChange() {\r\n if (vm.selectedTemplate) {\r\n for (var i = 0; i < vm.templates.length; i++) {\r\n var t = vm.templates[i];\r\n if (vm.selectedTemplate === t.UId) {\r\n if (vm.item.Description) {\r\n vm.item.Description += \"\\n\" + t.Description;\r\n }\r\n else {\r\n vm.item.Description = t.Description;\r\n }\r\n \r\n vm.item.DepartmentIds = t.DepartmentIds;\r\n vm.item.StartAtDisplay = moment(t.StartAtDisplay.substr(0, 16)).toDate();\r\n if (t.FinishByDisplay !== null) {\r\n vm.item.IncludeFinishBy = 1;\r\n vm.item.FinishByDisplay = moment(t.FinishByDisplay.substr(0, 16)).toDate();\r\n }\r\n \r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n return dataservice.getItem(\"api/Tasks/\" + val)\r\n .then(function (response) {\r\n if (response) {\r\n vm.departments = response.data.departments;\r\n vm.allUsers = response.data.usersWithDepartments;\r\n vm.templates = response.data.taskTemplates;\r\n\r\n if (val === '0') {\r\n vm.item = {};\r\n vm.item.IncludeFinishBy = 0;\r\n var d = common.getMainState(\"mainDate\");\r\n vm.item.DisplayOn = d;\r\n try {\r\n var deptIdsAsString = $window.localStorage.getItem(\"SevenPointTaskDepartmentIds\");\r\n vm.item.DepartmentIds = [];\r\n if (deptIdsAsString) {\r\n try {\r\n var deptIds = deptIdsAsString.split(',');\r\n for (var i = 0; i < deptIds.length; i++) {\r\n for (var j = 0; j < vm.departments.length; j++) {\r\n if (vm.departments[j].ID == deptIds[i]) {\r\n vm.item.DepartmentIds.push(deptIds[i])\r\n}\r\n}\r\n \r\n }\r\n \r\n }\r\n catch (error) {\r\n console.log(error);\r\n vm.item.DepartmentIds = [];\r\n vm.item.DepartmentIds.push(0);\r\n }\r\n }\r\n else {\r\n vm.item.DepartmentIds = [];\r\n vm.item.DepartmentIds.push(0);\r\n }\r\n }\r\n catch (error) {\r\n console.log(error);\r\n vm.item.DepartmentIds = [];\r\n vm.item.DepartmentIds.push(0);\r\n }\r\n \r\n vm.item.StartAtDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 6, 0, 0, 0)\r\n vm.item.FinishByDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 17, 0, 0, 0);\r\n vm.item.AssignedToUserId = 0;\r\n vm.item.EmailUserTheyHaveANewTask = 0;\r\n vm.item.CreateAsIndividualTasks = 0;\r\n vm.item.EndTaskWhenCompleted = 0;\r\n common.setAuditInfo(vm.item);\r\n }\r\n else {\r\n vm.item = response.data.item;\r\n\r\n vm.item.DisplayOn = moment(vm.item.DisplayOn.substr(0, 16)).toDate();\r\n vm.item.StartAtDisplay = moment(vm.item.StartAtDisplay.substr(0, 16)).toDate();\r\n if (vm.item.FinishByDisplay !== null) {\r\n vm.item.IncludeFinishBy = 1;\r\n vm.item.FinishByDisplay = moment(vm.item.FinishByDisplay.substr(0, 16)).toDate();\r\n }\r\n else {\r\n vm.item.IncludeFinishBy = 0;\r\n var d = new Date();\r\n vm.item.FinishByDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 17, 0, 0, 0);\r\n }\r\n common.setAuditInfo(vm.item);\r\n common.convertDateStringsToDates(vm.item);\r\n }\r\n \r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n function departmentChange() {\r\n vm.usersInDepartments = [];\r\n var addedUserIds = [];\r\n for (var i = 0; i < vm.allUsers.length; i++) {\r\n var user = vm.allUsers[i];\r\n for (var j = 0; j < user.Departments.length; j++) {\r\n for (var ii = 0; ii < vm.item.DepartmentIds.length; ii++) {\r\n if (vm.item.DepartmentIds[ii] == user.Departments[j]) {\r\n if (addedUserIds.indexOf(user.Id) === -1) {\r\n addedUserIds.push(user.Id);\r\n vm.usersInDepartments.push(user);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function save() {\r\n if (vm.item.DepartmentIds.length === 0) {\r\n common.logger.error(\"You must select at least one department\");\r\n return;\r\n }\r\n \r\n var fromLocal = common.buildDateTime(vm.item.DisplayOn, vm.item.StartAtDisplay);\r\n \r\n if (vm.item.DisplayUntil) {\r\n var displayFrom = moment(fromLocal);\r\n var displayUntil = moment(vm.item.DisplayUntil);\r\n\r\n if (displayFrom.isAfter(displayUntil)) {\r\n common.logger.error(\"Display Until must be after Display On\");\r\n return;\r\n }\r\n\r\n\r\n if (!vm.item.DisplaysOnSunday\r\n && !vm.item.DisplaysOnMonday\r\n && !vm.item.DisplaysOnTuesday\r\n && !vm.item.DisplaysOnWednesday\r\n && !vm.item.DisplaysOnThursday\r\n && !vm.item.DisplaysOnFriday\r\n && !vm.item.DisplaysOnSaturday\r\n ) {\r\n common.logger.error(\"Repeating tasks must repeat on a least one day of the week\");\r\n return;\r\n }\r\n\r\n }\r\n\r\n\r\n if (vm.item.IncludeFinishBy == 1) {\r\n \r\n var toLocal = common.buildDateTime(vm.item.DisplayOn, vm.item.FinishByDisplay);\r\n if (toLocal < fromLocal) {\r\n logger.error(\"Finish By must be after Start At\")\r\n return;\r\n }\r\n vm.item.FinishBy = moment(toLocal).format(\"HH:mm\");\r\n }\r\n else {\r\n vm.item.FinishBy = null;\r\n }\r\n\r\n vm.item.DisplayOn = moment(fromLocal).format(\"YYYY-MM-DDT00:00\");\r\n \r\n vm.item.StartAt = moment(fromLocal).format(\"HH:mm\");\r\n vm.isSaving = true;\r\n $window.localStorage.setItem(\"SevenPointTaskDepartmentIds\", vm.item.DepartmentIds.join());\r\n dataservice.saveItem('api/Tasks', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n common.notifier.notify(common.config.events.taskCountChange);\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tasks')\r\n .controller('TasksController', TasksController);\r\n\r\n TasksController.$inject = ['$scope', 'common', 'dataservice', 'bootstrap.dialog', 'config', 'completions', 'notes', 'backendHubProxy' ];\r\n /* @ngInject */\r\n function TasksController($scope, common, dataservice, bsDialog, config, completions, notes, backendHubProxy) {\r\n var vm = this;\r\n vm.title = \"Tasks\"\r\n vm.items = [];\r\n vm.isLoading = true;\r\n vm.onDate = common.getMainState(\"mainDate\");\r\n vm.showItemDetails = showItemDetails;\r\n vm.completions = completions;\r\n vm.notes = notes;\r\n vm.refresh = getItems;\r\n vm.canEdit = canEdit;\r\n vm.displayedItems = [];\r\n vm.hasCompletionType = completions.hasCompletionType;\r\n vm.showCompletionDot = showCompletionDot;\r\n vm.completionTypes = [];\r\n \r\n\r\n activate();\r\n\r\n $scope.$on('$destroy', function () {\r\n backendHubProxy.stop();\r\n });\r\n\r\n function activate() {\r\n backendHubProxy.displayedItems = vm.displayedItems;\r\n backendHubProxy.startListening();\r\n\r\n common.notifier.subscribe(common.config.events.mainDateChange, $scope, dateChanged);\r\n var promises = [getItems(), getCompletionTypes()];\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n common.notifier.notify(config.events.refreshCounts);\r\n }, function (error) { });\r\n }\r\n\r\n function showCompletionDot(item) {\r\n return completions.isAllDone(item) || completions.isNothingCompleted(item, vm.completionTypes)\r\n }\r\n\r\n function showItemDetails(i) {\r\n return bsDialog.htmlBodyDialog(i.Description, i.Notes);\r\n }\r\n\r\n\r\n function canEdit(item) {\r\n if (common.userService.userType() == \"0\") {\r\n return common.userService.userId() == item.CreatedById;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n function getItems() {\r\n var m = moment(vm.onDate).format(\"YYYY-MM-DD\");\r\n return dataservice.getItems('api/Tasks/GetForDate?forDate=' + m).then(function (response) {\r\n vm.items = response.data;\r\n backendHubProxy.items = vm.items;\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function dateChanged(eventName, newDate) {\r\n vm.onDate = newDate;\r\n getItems();\r\n }\r\n\r\n function getCompletionTypes() {\r\n\r\n return dataservice.getItems('api/CompletionTypes').then(function (response) {\r\n vm.completionTypes = response.data;\r\n return vm.completionTypes;\r\n }, function (error) { });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tasks')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'tasks',\r\n config: {\r\n abstract: true,\r\n url: '/tasks',\r\n template: '',\r\n settings: {\r\n authMode: 1,\r\n requireOps: true\r\n \r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'tasks.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/tasks/list.html?v=' + opsIncludeVersion,\r\n controller: 'TasksListController',\r\n controllerAs: 'vm',\r\n title: 'Tasks',\r\n resolve: {\r\n canAccess: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'tasks.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/tasks/details.html?v=' + opsIncludeVersion,\r\n controller: 'TaskDetailController',\r\n controllerAs: 'vm',\r\n title: 'Tasks',\r\n params: { fromDisplay: true, fromDailySetup: false},\r\n settings: {}\r\n }\r\n },\r\n {\r\n state: 'tasks.display',\r\n config: {\r\n url: '/display',\r\n templateUrl: 'app/tasks/tasks.html?v=' + opsIncludeVersion,\r\n controller: 'TasksController',\r\n controllerAs: 'vm',\r\n title: 'Tasks',\r\n settings: {\r\n nav: 400,\r\n content: ' Tasks',\r\n badgeContent: '{{vm.tasksCount}}',\r\n authMode: 1,\r\n requireOps: true,\r\n mobileButton: true\r\n }\r\n }\r\n },\r\n {\r\n state: 'tasks.templates',\r\n config: {\r\n url: '/templates',\r\n templateUrl: 'app/tasks/templatesList.html?v=' + opsIncludeVersion,\r\n controller: 'TasksTemplatesController',\r\n controllerAs: 'vm',\r\n title: 'Task Templates',\r\n resolve: {\r\n canAccess: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'tasks.templatedetails',\r\n config: {\r\n url: '/templatedetails/:uid',\r\n templateUrl: 'app/tasks/templatedetails.html?v=' + opsIncludeVersion,\r\n controller: 'TaskTemplateDetailController',\r\n controllerAs: 'vm',\r\n title: 'Task Template',\r\n resolve: {\r\n canAccess: ['userService', function (userService) {\r\n if (userService.userType() == \"0\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tasks')\r\n .controller('TasksListController', TasksListController);\r\n\r\n TasksListController.$inject = ['common', 'dataservice', 'bootstrap.dialog', 'config'];\r\n /* @ngInject */\r\n function TasksListController(common, dataservice, bsDialog, config) {\r\n var vm = this;\r\n\r\n vm.title = 'Tasks';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.refresh = refresh;\r\n vm.showItemDetails = showItemDetails;\r\n vm.toDate = moment().add(2, 'months').toDate();\r\n vm.fromDate = moment().add(-1, 'months').toDate();\r\n vm.getTasks = getItems;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(config.events.refreshCounts);\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n \r\n var f = moment(vm.fromDate).format(\"YYYYMMDD\");\r\n var t = moment(vm.toDate).format(\"YYYYMMDD\");\r\n\r\n\r\n return dataservice.getItems('api/Tasks/GetForRange/' + f + '/' + t).then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function showItemDetails(i) {\r\n return bsDialog.htmlBodyDialog(i.Title, i.Description);\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tasks')\r\n .controller('TasksTemplatesController', TasksTemplatesController);\r\n\r\n TasksTemplatesController.$inject = ['common', 'dataservice', 'config'];\r\n /* @ngInject */\r\n function TasksTemplatesController(common, dataservice, config) {\r\n var vm = this;\r\n vm.title = 'Task Templates';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItems()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n common.notifier.notify(config.events.refreshCounts);\r\n }, function (error) { });\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/Tasks/GetTemplates').then(function (response) {\r\n vm.items = response.data;\r\n vm.displayedItems = [].concat(vm.items);\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tasks')\r\n .controller('TaskTemplateDetailController', TaskTemplateDetailController);\r\n\r\n TaskTemplateDetailController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice', '$window', '$timeout'\r\n ];\r\n\r\n function TaskTemplateDetailController($state, $stateParams,\r\n bsDialog, common, dataservice, $window, $timeout) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n \r\n vm.cancel = cancel;\r\n vm.deleteItem = deleteItem;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.isNew = isNew;\r\n vm.departments = [];\r\n \r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem(), initLookups()];\r\n return common.$q.all(promises).then(function (data) {\r\n }, function (error) { });\r\n \r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"tasks.templates\");\r\n }\r\n\r\n function deleteItem() {\r\n return bsDialog.deleteDialog('Task Template')\r\n .then(confirmDelete, function () { });\r\n\r\n function confirmDelete() {\r\n dataservice.deleteItem(\"api/Tasks/DeleteTemplate/\" + vm.item.UId).then(success).catch(failed);\r\n\r\n function success() {\r\n backToList();\r\n }\r\n\r\n function failed(error) {\r\n logger.error(error);\r\n }\r\n }\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.uid; \r\n return val === \"\";\r\n }\r\n\r\n function initLookups() {\r\n return dataservice.getItem(\"api/Departments/Active\")\r\n .then(function (response) {\r\n if (response) {\r\n vm.departments = response.data;\r\n }\r\n }).catch(function (error) {\r\n logger.error('Error loading departments');\r\n \r\n });\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.uid;\r\n \r\n if (val === '') {\r\n vm.item = {};\r\n vm.item.IncludeFinishBy = 0;\r\n var d = new Date();\r\n vm.item.DepartmentIds = [parseInt($window.localStorage.getItem(\"SevenPointTaskDepartmentId\")) || 0];\r\n vm.item.StartAtDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 6, 0, 0, 0)\r\n vm.item.FinishByDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 17, 0, 0, 0);\r\n }\r\n else {\r\n return dataservice.getItem(\"api/Tasks/Template/\" + val)\r\n .then(function (response) {\r\n if (response) {\r\n vm.item = response.data;\r\n \r\n vm.item.StartAtDisplay = moment(vm.item.StartAtDisplay.substr(0, 16)).toDate();\r\n if (vm.item.FinishByDisplay !== null) {\r\n vm.item.IncludeFinishBy = 1;\r\n vm.item.FinishByDisplay = moment(vm.item.FinishByDisplay.substr(0, 16)).toDate();\r\n }\r\n else {\r\n vm.item.IncludeFinishBy = 0;\r\n var d = new Date();\r\n vm.item.FinishByDisplay = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 17, 0, 0, 0);\r\n }\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n }\r\n\r\n\r\n function save() {\r\n var fromLocal = common.buildDateTime(new Date(), vm.item.StartAtDisplay);\r\n \r\n if (vm.item.IncludeFinishBy == 1) {\r\n \r\n var toLocal = common.buildDateTime(fromLocal, vm.item.FinishByDisplay);\r\n if (toLocal < fromLocal) {\r\n logger.error(\"Finish By must be after Start At\")\r\n return;\r\n }\r\n vm.item.FinishBy = moment(toLocal).format(\"HH:mm\");\r\n }\r\n else {\r\n vm.item.FinishBy = null;\r\n }\r\n\r\n vm.item.StartAt = moment(fromLocal).format(\"HH:mm\");\r\n vm.isSaving = true;\r\n dataservice.saveItem('api/Tasks/SaveTemplate', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tenantReporting')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'tenantreporting',\r\n config: {\r\n abstract: true,\r\n url: '/tenantreporting',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.tenantId() != \"1\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'tenantreporting.reports',\r\n config: {\r\n url: '/reports',\r\n templateUrl: 'app/tenantReporting/reports.html?v=' + opsIncludeVersion,\r\n controller: 'TenantReportsController',\r\n controllerAs: 'vm',\r\n title: 'Tenant Reports'\r\n }\r\n }\r\n\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tenants')\r\n .controller('TenantReportsController', TenantReportsController);\r\n\r\n TenantReportsController.$inject = ['common', 'dataservice', 'Excel'];\r\n /* @ngInject */\r\n function TenantReportsController(common, dataservice, excel) {\r\n var vm = this;\r\n vm.title = 'Tenant Reports';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.reportTypes = [];\r\n vm.reportType = '';\r\n vm.generate = generate;\r\n vm.exportToExcel = exportToExcel;\r\n vm.reportData = {};\r\n\r\n vm.TotalItems = 0;\r\n vm.TotalItems1 = 0;\r\n vm.TotalItems2 = 0;\r\n vm.TotalItems3 = 0;\r\n vm.TotalItems4 = 0;\r\n vm.TotalItems5 = 0;\r\n vm.TotalItems6 = 0;\r\n vm.TotalItems7 = 0;\r\n vm.TotalItems8 = 0;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), loadReportTypes()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function loadReportTypes() {\r\n vm.reportTypes.push({ Action: 'Count/BookingCompletions', Description: 'Booking Completions' });\r\n vm.reportTypes.push({ Action: 'Count/TaskCompletions', Description: 'Task Completions' });\r\n vm.reportTypes.push({ Action: 'Count/BookingNotes', Description: 'Booking Notes' });\r\n vm.reportTypes.push({ Action: 'Count/TaskNotes', Description: 'Task Notes' });\r\n vm.reportTypes.push({ Action: 'Count/Alerts', Description: 'Alerts' });\r\n vm.reportTypes.push({ Action: 'Count/LogEntries', Description: 'Log Entries' });\r\n vm.reportTypes.push({ Action: 'Count/Users', Description: 'Users' });\r\n vm.reportTypes.push({ Action: 'Count/Attachments', Description: 'Attachments' });\r\n vm.reportTypes.push({ Action: 'Count/Tasks', Description: 'Tasks' });\r\n vm.reportTypes.push({ Action: 'Count/FloorPlans', Description: 'Floor Plans' });\r\n vm.reportTypes.push({ Action: 'Count/EventDisplays', Description: 'Event Displays' });\r\n vm.reportTypes.push({ Action: 'Count/PaymentTemplates', Description: 'Payment Templates' });\r\n vm.reportTypes.sort(_reportTypeSorter);\r\n }\r\n function _reportTypeSorter(a, b) {\r\n if (a.Description < b.Description) {\r\n return -1;\r\n }\r\n if (a.Description > b.Description) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n\r\n function exportToExcel(id) {\r\n var clonedTable = $(id).clone(true);\r\n var fileName = \"unfound\";\r\n for (var i = 0; i < vm.reportTypes.length; i++) {\r\n if (vm.reportTypes[i].Action == vm.reportType) {\r\n fileName = vm.reportTypes[i].Description;\r\n break;\r\n }\r\n }\r\n\r\n excel.downloadExcel(id, fileName + '.csv', clonedTable.html());\r\n\r\n }\r\n\r\n function generate() {\r\n return dataservice.getItems('api/TenantReports/' + vm.reportType).then(function (response) {\r\n vm.TotalItems = 0;\r\n vm.TotalItems1 = 0;\r\n vm.TotalItems2 = 0;\r\n vm.TotalItems3 = 0;\r\n vm.TotalItems4 = 0;\r\n vm.TotalItems5 = 0;\r\n vm.TotalItems6 = 0;\r\n vm.TotalItems7 = 0;\r\n vm.TotalItems8 = 0;\r\n vm.reportData = response.data;\r\n vm.items = vm.reportData.Data;\r\n vm.displayedItems = [].concat(vm.items);\r\n\r\n for (var i = 0; i < vm.displayedItems.length; i++) {\r\n var onItem = vm.displayedItems[i];\r\n vm.TotalItems += onItem.NumberOfItems;\r\n vm.TotalItems1 += onItem.NumberOfItems1;\r\n vm.TotalItems2 += onItem.NumberOfItems2;\r\n vm.TotalItems3 += onItem.NumberOfItems3;\r\n vm.TotalItems4 += onItem.NumberOfItems4;\r\n vm.TotalItems5 += onItem.NumberOfItems5;\r\n vm.TotalItems6 += onItem.NumberOfItems6;\r\n vm.TotalItems7 += onItem.NumberOfItems7;\r\n vm.TotalItems8 += onItem.NumberOfItems8;\r\n }\r\n\r\n }, function (error) { });\r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tenants')\r\n .controller('TenantDetailsController', TenantDetailsController);\r\n\r\n TenantDetailsController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'dataservice'\r\n ];\r\n\r\n function TenantDetailsController($state, $stateParams,\r\n bsDialog, common, dataservice) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.cancel = cancel;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.filters = undefined;\r\n vm.isNew = isNew;\r\n vm.openDatePicker = openDatePicker;\r\n vm.opsIncludeVersion = common.opsIncludeVersion;\r\n vm.dpStatus = {\r\n displayOnOpen: false,\r\n }\r\n vm.showPassword = showPassword;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItem(), initLookups()];\r\n return common.$q.all(promises).then(function (data) {\r\n \r\n }, function (error) { });\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function openDatePicker($event) {\r\n vm.dpStatus.displayOnOpen = true;\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"tenants.list\");\r\n }\r\n\r\n \r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"-1\";\r\n }\r\n\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n if (val === '-1') {\r\n vm.item = {};\r\n vm.item.Active = 1;\r\n vm.item.ShowTerms = 1;\r\n vm.item.HasOps = 1;\r\n vm.item.SingleSignOn = 0;\r\n \r\n return vm.item;\r\n }\r\n\r\n return dataservice.getItem(\"api/Tenants/\" + val)\r\n .then(function (data) {\r\n vm.item = data.data;\r\n vm.item.ActiveUntilUtc = moment(vm.item.ActiveUntilUtc).toDate();\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n function initLookups() {\r\n dataservice.getItems(\"api/Tenants/Timezones\").then(function (data) {\r\n vm.timezones = data.data;\r\n }, function (error) { });\r\n\r\n dataservice.getItems(\"api/Tenants/ApiTypes\").then(function (data) {\r\n vm.ApiTypes = data.data;\r\n }, function (error) { });\r\n\r\n }\r\n\r\n function showPassword() {\r\n return true;\r\n }\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n if (isNew()) {\r\n vm.item.ID = -1;\r\n }\r\n dataservice.saveItem('api/Tenants', vm.item).then(function (saveResult) {\r\n vm.isSaving = false;\r\n backToList();\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tenants')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'tenants',\r\n config: {\r\n abstract: true,\r\n url: '/tenants',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n if (userService.tenantId() != \"1\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'tenants.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/tenants/list.html?v=' + opsIncludeVersion,\r\n controller: 'TenantsListController',\r\n controllerAs: 'vm',\r\n title: 'Tenants'\r\n }\r\n },\r\n {\r\n state: 'tenants.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/tenants/details.html?v=' + opsIncludeVersion,\r\n controller: 'TenantDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Tenant Details',\r\n settings: {}\r\n }\r\n }\r\n \r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.tenants')\r\n .controller('TenantsListController', TenantsListController);\r\n\r\n TenantsListController.$inject = ['common', 'dataservice', 'bootstrap.dialog', 'config', '$http'];\r\n /* @ngInject */\r\n function TenantsListController(common, dataservice, bsDialog, config, $http) {\r\n var vm = this;\r\n vm.TotalAmount = 0;\r\n vm.TotalNumberOfUsers = 0;\r\n vm.TotalCustomers = 0;\r\n vm.TotalInstalls = 0;\r\n vm.DailyActiveUsers = 0;\r\n vm.RemainingAmount = 0;\r\n vm.OpsAmount = 0;\r\n vm.OtherAmount = 0;\r\n vm.OurApiCount = 0;\r\n vm.PSApiCount = 0;\r\n vm.R25Count = 0;\r\n vm.AdAstraCount = 0;\r\n vm.MazevoCount = 0;\r\n vm.TotalLicensedUsers = 0;\r\n vm.TotalEventDisplays = 0;\r\n vm.TotalPaymentTemplates = 0;\r\n vm.title = 'Tenants';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.rowClass = rowClass;\r\n vm.getApiVersion = getApiVersion;\r\n vm.hideApiGet = hideApiGet;\r\n vm.getEmsDbVersion = getEmsDbVersion;\r\n vm.hideEmsDbGet = hideEmsDbGet;\r\n vm.currentOutgoingIp = \"\";\r\n vm.showInactive = false;\r\n vm.emailToUnlock = \"\";\r\n vm.unlockUser = unlockUser;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getIp()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function getIp() {\r\n return dataservice.getItem(\"api/Tenants/OutGoingIP\").then(function (response) {\r\n vm.currentOutgoingIp = response.data;\r\n }, function (error) { })\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/Tenants').then(function (response) {\r\n var thisYear = (new Date()).getFullYear();\r\n var nextYear = thisYear + 1;\r\n var endOfYear = moment(new Date(\"1/1/\" + nextYear));\r\n var today = moment();\r\n var data = response.data;\r\n for (var i = 0; i < data.length; i++) {\r\n if (data[i].DataApiUrl) {\r\n data[i].HasApi = true;\r\n }\r\n else {\r\n data[i].HasApi = false;\r\n }\r\n }\r\n vm.items = data;\r\n vm.displayedItems = [].concat(vm.items);\r\n \r\n for (var i in data) {\r\n var expireUtc = moment.utc(data[i].ActiveUntilUtc);\r\n \r\n var a = data[i].Amount || 0;\r\n if(a > 0) {\r\n vm.TotalCustomers++;\r\n vm.TotalLicensedUsers += data[i].NumberOfUsers;\r\n vm.TotalEventDisplays += data[i].NumberOfDisplayTemplates;\r\n vm.TotalPaymentTemplates += data[i].NumberOfPaymentTemplates;\r\n }\r\n\r\n if (expireUtc.isBefore(endOfYear) && expireUtc.isAfter(today)) {\r\n vm.RemainingAmount += parseFloat(a);\r\n }\r\n\r\n if (data[i].ID != 1) {\r\n vm.OpsAmount += parseFloat(a);\r\n }\r\n else {\r\n vm.OtherAmount += parseFloat(a);\r\n }\r\n\r\n \r\n\r\n vm.TotalAmount += parseFloat(a);\r\n vm.TotalNumberOfUsers += parseFloat(data[i].CountOfUsers);\r\n vm.DailyActiveUsers += parseFloat(data[i].DailyActiveUsers);\r\n if (data[i].DataApiUrl) {\r\n vm.TotalInstalls++;\r\n\r\n switch (data[i].ApiType) {\r\n case \"CollegeNet API\":\r\n vm.R25Count++;\r\n break;\r\n case \"Seven Point EMS API\":\r\n vm.OurApiCount++;\r\n break;\r\n case \"Ad Astra API\":\r\n vm.AdAstraCount++;\r\n break;\r\n case \"EMS API\":\r\n vm.PSApiCount++;\r\n break;\r\n case \"Mazevo API\":\r\n vm.MazevoCount++;\r\n break;\r\n }\r\n\r\n }\r\n }\r\n vm.AnnualAmount = vm.TotalAmount;\r\n vm.RemainingAmount = vm.RemainingAmount;\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function rowClass(item) {\r\n var activeUntil = moment(item.ActiveUntilUtc);\r\n var amount = item.Amount;\r\n\r\n if (amount > 0) {\r\n if (activeUntil < moment().add(1, 'month')) {\r\n return { 'background-color': '#ffb0b0' }\r\n }\r\n }\r\n else {\r\n \r\n if (activeUntil.isSame(\"2000-01-01\") || activeUntil.isSame(\"2016-01-01\")) {\r\n return { 'background-color': '#edeefc' }\r\n }\r\n if (activeUntil < moment().add(1, 'month')) {\r\n return { 'background-color': '#f2f259' }\r\n }\r\n }\r\n \r\n }\r\n\r\n function getApiVersion(item) {\r\n dataservice.getItems('api/Tenants/ApiVersion/' + item.ID).then(function (response) {\r\n item.ApiVersion = response.data.Message;\r\n }, function (error) { })\r\n }\r\n\r\n function unlockUser() {\r\n if (vm.emailToUnlock) {\r\n var dto = {\r\n emailToUnlock: vm.emailToUnlock\r\n };\r\n dataservice.saveItem('api/Tenants/UnlockUser', dto, true).then(function (response) {\r\n \r\n if (response.data.Success) {\r\n common.logger.success(\"User Unlocked\");\r\n }\r\n else {\r\n common.logger.warning(\"User not found\", null, \"Warning\", true);\r\n }\r\n }, function (error) { })\r\n }\r\n }\r\n\r\n function getEmsDbVersion(item) {\r\n dataservice.getItems('api/Tenants/EmsDbVersion/' + item.ID).then(function (response) {\r\n item.EmsDbVersion = response.data.Message;\r\n }, function (error) { })\r\n }\r\n\r\n function hideApiGet(item) {\r\n if (item.ApiVersion)\r\n return true;\r\n if (!item.DataApiUrl)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n\r\n function hideEmsDbGet(item) {\r\n if (item.EmsDbVersion)\r\n return true;\r\n if (!item.DataApiUrl)\r\n return true;\r\n\r\n return false;\r\n }\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.users')\r\n .controller('UserDetailsController', UserDetailsController);\r\n\r\n UserDetailsController.$inject = [\r\n '$state', '$stateParams',\r\n 'bootstrap.dialog', 'common', 'config', 'dataservice', 'userService', \r\n ];\r\n\r\n function UserDetailsController($state, $stateParams,\r\n bsDialog, common, config, dataservice, userService) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n var logger = common.logger;\r\n var $q = common.$q;\r\n vm.opsIncludeVersion = common.opsIncludeVersion;\r\n vm.cancel = cancel;\r\n vm.isSaving = false;\r\n vm.save = save;\r\n vm.item = undefined;\r\n vm.submitForm = submitForm;\r\n vm.isNew = isNew;\r\n vm.userTypes = [{ id:0, label: \"Standard\" }, { id:1, label : \"Manager\" }, { id:2, label : \"Admin\" }];\r\n vm.tenants = [];\r\n vm.tenantForUserCrud = {};\r\n vm.departments = [];\r\n vm.billingDepartments = [];\r\n vm.passwordPattern = /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[ !\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_`{|}~]).{12,}$/;\r\n vm.hasOps = common.userService.hasOps() == 1;\r\n vm.showFilters = common.userService.apiTypeId() !== common.config.apiTypes.centersXml;\r\n vm.showPassword = showPassword;\r\n vm.requirePassword = requirePassword;\r\n vm.currentPasswordRequired = false;\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem(), getFilterTypes(), getTenants(), getTenantForUserCrud(),\r\n getDepartments(), getBillingDepartments() ];\r\n return common.$q.all(promises).then(function (data) {\r\n\r\n }, function (error) { });\r\n }\r\n\r\n function submitForm(valid) {\r\n save();\r\n }\r\n\r\n function cancel() {\r\n backToList();\r\n }\r\n\r\n function backToList() {\r\n $state.go(\"users.list\");\r\n }\r\n\r\n function isNew() {\r\n var val = $stateParams.id; \r\n return val === \"0\";\r\n }\r\n\r\n function getItem() {\r\n var val = $stateParams.id;\r\n\r\n return dataservice.getItem(\"api/Users/\" + val)\r\n .then(function (data) {\r\n \r\n if (data) {\r\n vm.item = data.data;\r\n if (!vm.item.FilterTypes) {\r\n vm.item.FilterTypes = [];\r\n if (common.userService.apiTypeId() === common.config.apiTypes.centersXml) {\r\n vm.item.FilterTypes.push(0);\r\n }\r\n }\r\n if (!vm.item.BillingDepartments) {\r\n vm.item.BillingDepartments = [];\r\n }\r\n\r\n if (val === '0') {\r\n vm.item.Departments = [];\r\n }\r\n\r\n common.setAuditInfo(vm.item);\r\n } else {\r\n logger.warning('Could not find item with id = ' + val);\r\n $state.go('404');\r\n }\r\n })\r\n .catch(function (error) {\r\n logger.error('Error while getting item with id = ' + val + '; ' + error);\r\n $state.go('404');\r\n });\r\n }\r\n\r\n function getFilterTypes() {\r\n return dataservice.getItems(\"api/FilterTypes/Active\")\r\n .then(function (data) {\r\n vm.filterTypes = data.data;\r\n }, function (error) { })\r\n }\r\n\r\n function getDepartments() {\r\n return dataservice.getItems(\"api/Departments/Active\")\r\n .then(function (response) {\r\n vm.departments = response.data;\r\n }, function (error) { })\r\n }\r\n\r\n function getTenants() {\r\n if (common.userService.tenantId() == 1) {\r\n dataservice.getItems(\"api/Tenants/SimpleGetAll\").then(function (data) {\r\n vm.tenants = data.data;\r\n }, function (error) { })\r\n }\r\n }\r\n\r\n function getTenantForUserCrud() {\r\n dataservice.getItems(\"api/Tenants/GetForUserCrud\").then(function (data) {\r\n vm.tenantForUserCrud = data.data;\r\n }, function (error) { })\r\n }\r\n\r\n function getBillingDepartments() {\r\n dataservice.getItems(\"api/Users/BillingDepartments\").then(function (response) {\r\n vm.billingDepartments = response.data;\r\n }, function (error) { })\r\n }\r\n\r\n function showPassword() {\r\n if (vm.tenantForUserCrud) {\r\n if (vm.tenantForUserCrud.ForceSso) {\r\n return false;\r\n }\r\n\r\n return !hasSsoLogin();\r\n\r\n }\r\n return true;\r\n }\r\n\r\n function hasSsoLogin() {\r\n if (vm.item && vm.item.Logins) {\r\n for (var i = 0; i < vm.item.Logins.length; i++) {\r\n if (vm.item.Logins[i].ProviderKey) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function requirePassword() {\r\n if (isNew()) {\r\n if (vm.tenantForUserCrud) {\r\n if (vm.tenantForUserCrud.ForceSso) {\r\n return false;\r\n }\r\n if (vm.tenantForUserCrud.SingleSignOn) {\r\n return !hasSsoLogin();\r\n }\r\n }\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n\r\n function save() {\r\n vm.isSaving = true;\r\n\r\n if (vm.item.FilterTypes.length == 0 && userService.hasOps() == \"1\") {\r\n logger.error(\"User must have at least one filter\", \"\", \"Error\");\r\n return;\r\n }\r\n\r\n dataservice.saveItem('api/Users/Save', vm.item, true).then(function (saveResult) {\r\n vm.isSaving = false;\r\n var result = saveResult.data;\r\n if (result.Succeeded) {\r\n backToList();\r\n }\r\n else {\r\n var errors = \"\";\r\n for (var i = 0; i < result.Errors.length; i++) {\r\n errors += result.Errors[i] + \"\\n\";\r\n }\r\n logger.error(errors, \"\", \"Error\");\r\n }\r\n\r\n }).catch(function (error) {\r\n vm.isSaving = false;\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.users')\r\n .factory('userEdit.dialog', userEditDialog);\r\n\r\n userEditDialog.$inject = ['$uibModal', '$templateCache', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function userEditDialog($modal, $templateCache, opsIncludeVersion) {\r\n var service = {\r\n display: display\r\n }\r\n\r\n $templateCache.put('userEditDialog.tpl.html?v=' + opsIncludeVersion,\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '

Account Details

' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n '
' +\r\n '
' +\r\n ' ' +\r\n ' ' +\r\n '
' +\r\n '
');\r\n\r\n return service;\r\n\r\n function display() {\r\n var modalOptions = {\r\n templateUrl: 'userEditDialog.tpl.html?v=' + opsIncludeVersion,\r\n controller: UserEditModalInstance,\r\n controllerAs: \"vm\",\r\n keyboard: true,\r\n size: 'lg',\r\n resolve: {\r\n options: function () {\r\n return {\r\n };\r\n }\r\n }\r\n };\r\n\r\n return $modal.open(modalOptions).result;\r\n }\r\n }\r\n\r\n\r\n UserEditModalInstance.$inject = ['$uibModalInstance', 'options', 'common', 'dataservice', 'userService', 'config'];\r\n\r\n /* @ngInject */\r\n function UserEditModalInstance($modalInstance, options, common, dataservice, userService, config) {\r\n /*jshint validthis: true */\r\n var vm = this;\r\n vm.okText = 'Update';\r\n vm.cancelText = 'Cancel';\r\n vm.item = undefined;\r\n vm.passwordPattern = /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[ !\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_`{|}~]).{12,}$/;\r\n vm.showPassword = showPassword;\r\n vm.requirePassword = requirePassword;\r\n vm.tenantForUserCrud = {};\r\n vm.currentPasswordRequired = true;\r\n\r\n vm.save = function () {\r\n vm.isSaving = true;\r\n\r\n dataservice.saveItem('api/Users/Save', vm.item, true).then(function (saveResult) {\r\n vm.isSaving = false;\r\n var result = saveResult.data;\r\n if (result.Succeeded) {\r\n $modalInstance.close('ok');\r\n }\r\n else {\r\n var errors = \"\";\r\n for (var i = 0; i < result.Errors.length; i++) {\r\n errors += result.Errors[i] + \"\\n\";\r\n }\r\n common.logger.error(errors, \"\", \"Error\");\r\n }\r\n }, function (error) { })\r\n };\r\n vm.cancel = function () {\r\n $modalInstance.dismiss('cancel');\r\n };\r\n\r\n activate();\r\n\r\n function activate() {\r\n var promises = [getItem(), getTenantForUserCrud()];\r\n return common.$q.all(promises).then(function () {\r\n }, function (error) { });\r\n }\r\n\r\n function getTenantForUserCrud() {\r\n dataservice.getItems(\"api/Tenants/GetForUserCrud\").then(function (data) {\r\n vm.tenantForUserCrud = data.data;\r\n }, function (error) { })\r\n }\r\n\r\n function showPassword() {\r\n if (vm.tenantForUserCrud) {\r\n if (vm.tenantForUserCrud.ForceSso) {\r\n vm.currentPasswordRequired = false;\r\n return false;\r\n }\r\n\r\n return !hasSsoLogin();\r\n\r\n }\r\n return true;\r\n }\r\n\r\n function hasSsoLogin() {\r\n if (vm.item) {\r\n for (var i = 0; i < vm.item.Logins.length; i++) {\r\n if (vm.item.Logins[i].ProviderKey) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function requirePassword() {\r\n return false;\r\n }\r\n\r\n\r\n function getItem() {\r\n return dataservice.getItem(\"api/Users/Current\")\r\n .then(function (data) {\r\n if (data) {\r\n\r\n vm.item = data.data;\r\n } else {\r\n common.logger.warning('Could not find your user');\r\n }\r\n })\r\n .catch(function (error) {\r\n common.logger.error('Error locating your user' + error);\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.users')\r\n .run(appRun);\r\n\r\n appRun.$inject = ['routerHelper', 'opsIncludeVersion'];\r\n /* @ngInject */\r\n function appRun(routerHelper, opsIncludeVersion) {\r\n routerHelper.configureStates(getStates(opsIncludeVersion));\r\n }\r\n\r\n function getStates(opsIncludeVersion) {\r\n return [\r\n {\r\n state: 'users',\r\n config: {\r\n abstract: true,\r\n url: '/users',\r\n template: '',\r\n settings: {\r\n authMode: 1\r\n },\r\n resolve: {\r\n authenticationRequired: ['userService', function (userService) {\r\n userService.isAuthenticatedThrowError();\r\n if (userService.userType() != \"2\") {\r\n throw { name: \"NotAdmin\" };\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n {\r\n state: 'users.list',\r\n config: {\r\n url: '/list',\r\n templateUrl: 'app/users/list.html?v=' + opsIncludeVersion,\r\n controller: 'UsersListController',\r\n controllerAs: 'vm',\r\n title: 'Users'\r\n }\r\n },\r\n {\r\n state: 'users.details',\r\n config: {\r\n url: '/detail/:id',\r\n templateUrl: 'app/users/details.html?v=' + opsIncludeVersion,\r\n controller: 'UserDetailsController',\r\n controllerAs: 'vm',\r\n title: 'User',\r\n settings: {}\r\n }\r\n }\r\n ];\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.users')\r\n .controller('UsersListController', UsersListController);\r\n\r\n UsersListController.$inject = ['$stateParams', 'common', 'config', 'dataservice'];\r\n /* @ngInject */\r\n function UsersListController($stateParams, common, config, dataservice) {\r\n var vm = this;\r\n\r\n vm.title = 'Users';\r\n vm.displayedItems = [];\r\n vm.items = [];\r\n vm.refresh = refresh;\r\n vm.colorDot = colorDot;\r\n vm.convertUserType = convertUserType;\r\n vm.isLicenseValid = true;\r\n vm.licenseInfo = {};\r\n vm.unlockUser = unlockUser;\r\n vm.emailToUnlock = '';\r\n activate();\r\n\r\n function activate() {\r\n var promises = [common.checkIsAdmin(), getItems(), getLicenseInfo()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function getLicenseInfo() {\r\n return dataservice.getItems('api/Tenants/GetLicenseInfo').then(function (response) {\r\n vm.licenseInfo = response.data;\r\n vm.isLicenseValid = vm.licenseInfo.NumberOfUsersLicensed >= vm.licenseInfo.NumberOfActiveUsers;\r\n return vm.licenseInfo;\r\n }, function (error) { });\r\n }\r\n\r\n function convertUserType(item) {\r\n switch (item.UserType) {\r\n case 0:\r\n return \"Standard\";\r\n case 1:\r\n return \"Manager\";\r\n case 2:\r\n return \"Admin\";\r\n default:\r\n return \"Unknown\";\r\n }\r\n }\r\n\r\n function getItems() {\r\n return dataservice.getItems('api/Users').then(function (response) {\r\n vm.items = vm.displayedItems = response.data;\r\n \r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function refresh() {\r\n getItems();\r\n }\r\n\r\n function colorDot(item) {\r\n if (item.Color) {\r\n return { \"background-color\": item.Color}\r\n }\r\n else {\r\n return { \"background-color\": \"green\" }\r\n }\r\n }\r\n\r\n function unlockUser() {\r\n if (vm.emailToUnlock) {\r\n var dto = {\r\n emailToUnlock: vm.emailToUnlock\r\n };\r\n \r\n dataservice.saveItem('api/Tenants/UnlockUser', dto, true).then(function (response) {\r\n \r\n if (response.data.Success) {\r\n common.logger.success(\"User Unlocked\");\r\n }\r\n else {\r\n common.logger.warning(\"User not found\", null, \"Warning\", true);\r\n }\r\n }, function (error) { })\r\n }\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .directive('spCompareTo', spCompareTo);\r\n\r\n /* @ngInject */\r\n function spCompareTo() {\r\n var directive = {\r\n require: \"ngModel\",\r\n scope: {\r\n 'otherModelValue': '=spCompareTo'\r\n },\r\n link: link\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attributes, ngModel) {\r\n ngModel.$validators.compareTo = function (modelValue) {\r\n return modelValue == scope.otherModelValue;\r\n };\r\n\r\n scope.$watch(\"otherModelValue\", function () {\r\n ngModel.$validate();\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .directive('spCountBox', spCountBox);\r\n\r\n /* @ngInject */\r\n spCountBox.$inject = ['$parse'];\r\n function spCountBox($parse) {\r\n //Usage:\r\n //
\r\n var directive = {\r\n scope: {\r\n 'icon': '@',\r\n 'count': '@',\r\n 'state': '@',\r\n 'footer': '@',\r\n 'title': '@',\r\n 'color': '@',\r\n 'backgroundcolor': '@'\r\n },\r\n template: \r\n '',\r\n restrict: 'EA',\r\n compile: compile\r\n };\r\n return directive;\r\n\r\n function compile(element, attrs) {\r\n if (!attrs.footer) { attrs.footer = attrs.title; }\r\n if (!attrs.color) { attrs.color = \"primary\"; }\r\n \r\n if (!attrs.backgroundcolor) { attrs.backgroundcolor = attrs.color };\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .directive('spWidgetHeader', spWidgetHeader);\r\n\r\n /* @ngInject */\r\n function spWidgetHeader() {\r\n //Usage:\r\n //
\r\n // Creates:\r\n //
\r\n var directive = {\r\n scope: {\r\n 'title': '@',\r\n 'subtitle': '@',\r\n 'rightText': '@',\r\n 'allowCollapse': '@'\r\n },\r\n template: '
' +\r\n '
' +\r\n '' +\r\n '
' +\r\n '
{{title}}
' +\r\n '({{subtitle}})' +\r\n '
' +\r\n '{{rightText}}' +\r\n '
' +\r\n '
',\r\n restrict: 'EA'\r\n };\r\n return directive;\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .directive('spWidgetMinimize', spWidgetMinimize);\r\n\r\n /* @ngInject */\r\n function spWidgetMinimize() {\r\n var directive = {\r\n link: link,\r\n template: '',\r\n restrict: 'A'\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n attrs.$set('href', '#');\r\n attrs.$set('wminimize');\r\n element.click(minimize);\r\n\r\n function minimize(e) {\r\n e.preventDefault();\r\n var $wcontent = element.parent().parent().parent().next('.widget-content');\r\n var iElement = element.children('i');\r\n\r\n if ($wcontent.is(':visible')) {\r\n iElement.removeClass('fa fa-chevron-up');\r\n iElement.addClass('fa fa-chevron-down');\r\n } else {\r\n iElement.removeClass('fa fa-chevron-down');\r\n iElement.addClass('fa fa-chevron-up');\r\n }\r\n $wcontent.toggle(500);\r\n }\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.auth')\r\n .factory('authDataService', authDataService);\r\n\r\n authDataService.$inject = ['$http', '$q', 'exception', 'logger'];\r\n /* @ngInject */\r\n function authDataService($http, $q, exception, logger) {\r\n var service = {\r\n login: login,\r\n logout: logout,\r\n saveUserConfigOptions: saveUserConfigOptions,\r\n acceptTerms: acceptTerms,\r\n getFilters: getFilters,\r\n getCurrentUser: getCurrentUser,\r\n getAccessToken: getAccessToken,\r\n getFilterData: getFilterData,\r\n checkIsAdmin: checkIsAdmin\r\n };\r\n\r\n return service;\r\n\r\n function getFilters(userId) {\r\n return $http.get('api/FilterTypes/ForUser/' + userId);\r\n }\r\n\r\n function getFilterData(filterTypeId) {\r\n return $http.get('api/Users/FilterData/' + filterTypeId);\r\n }\r\n\r\n function getCurrentUser() {\r\n return $http.get('api/Users/Current');\r\n }\r\n\r\n function checkIsAdmin() {\r\n return $http.get('api/Users/IsCurrentUserAdmin');\r\n }\r\n\r\n\r\n function logout() {\r\n return $http.post('api/Account/logout');\r\n }\r\n\r\n function acceptTerms() {\r\n return $http.post('api/Users/AcceptTerms', {});\r\n }\r\n\r\n function saveUserConfigOptions(data) {\r\n return $http.post('api/Users/SetConfigOptions', data).catch(fail);\r\n\r\n\r\n function fail(e) {\r\n return exception.catcher('Login Failed')();\r\n }\r\n\r\n }\r\n\r\n function getAccessToken(tempKey) {\r\n return $http.get('api/Account/LocalToken?externalAccessToken=' + tempKey.external_access_token);\r\n }\r\n\r\n function login(data) {\r\n var config = {\r\n headers: { \"Content-Type\": \"application/x-www-form-urlencoded\" },\r\n transformRequest: function (obj) {\r\n var str = [];\r\n for (var p in obj) {\r\n str.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]));\r\n }\r\n return str.join(\"&\");\r\n }\r\n };\r\n return $http.post('Token', data, config).catch(fail);\r\n\r\n function success(response) {\r\n logger.info(\"Login Successful\")\r\n return response;\r\n }\r\n\r\n function fail(e) {\r\n \r\n return exception.catcher('Login Failed')(e);\r\n }\r\n\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.auth')\r\n .factory('authInterceptor', authInterceptor)\r\n .config(config);\r\n\r\n config.$inject = ['$httpProvider'];\r\n\r\n /* @ngInject */\r\n function config($httpProvider) {\r\n $httpProvider.interceptors.push('authInterceptor');\r\n }\r\n\r\n authInterceptor.$inject = ['$q', '$location', '$injector', '$window', 'config', 'notifier'];\r\n /* @ngInject */\r\n function authInterceptor($q, $location, $injector, $window, config, notifier) {\r\n var inFlightAuthRequest = null;\r\n\r\n var service = {\r\n request: request,\r\n responseError: responseError\r\n };\r\n\r\n return service;\r\n ///////\r\n\r\n \r\n function request(config) {\r\n config.headers = config.headers || {};\r\n var userData = JSON.parse($window.localStorage.getItem('7PointUserData'));\r\n if (userData && userData.bearerToken) {\r\n if (config.url) {\r\n if (config.url.indexOf('html') === -1) {\r\n \r\n config.headers.Authorization = 'Bearer ' + userData.bearerToken;\r\n }\r\n }\r\n \r\n }\r\n if (config.url) {\r\n if (config.url.indexOf('.html') === -1) {\r\n if (config.headers) {\r\n var bt = document.getElementById(\"mainBodyTag\");\r\n config.headers[\"X-CSFR-Token\"] = bt.getAttribute(\"sp-request-verification-token\");\r\n }\r\n }\r\n }\r\n\r\n return config || $q.when(config)\r\n }\r\n\r\n \r\n function responseError(rejection) {\r\n if (rejection.status === 401) {\r\n $window.localStorage.removeItem('7PointUserData');\r\n notifier.notify(config.events.authenticationChange);\r\n $injector.get('$state').go('login', { returnUrl: $location.path() });\r\n }\r\n return $q.reject(rejection);\r\n }\r\n \r\n\r\n function responseErrorRefresh(response) {\r\n if (response.status === 401) {\r\n $injector.get('$state').go('logout', { reason: \"Your session was terminated, please login in again\" });\r\n if (response.data === \"SessionRevoked\") {\r\n $injector.get('$state').go('logout', { reason: \"Your session was terminated, please login in again\" });\r\n }\r\n else {\r\n \r\n var deferred = $q.defer();\r\n if (!inFlightAuthRequest) {\r\n var userData = JSON.parse($window.localStorage.getItem('7PointUserData'));\r\n if (userData && userData.refreshToken) {\r\n var data = { \"grant_type\": \"refresh_token\", \"refresh_token\": userData.refreshToken }\r\n var refreshTokenConfig = {\r\n headers: { \"Content-Type\": \"application/x-www-form-urlencoded\" },\r\n transformRequest: function (obj) {\r\n var str = [];\r\n for (var p in obj) {\r\n str.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]));\r\n }\r\n return str.join(\"&\");\r\n }\r\n };\r\n inFlightAuthRequest = $injector.get(\"$http\").post('Token', data, refreshTokenConfig);\r\n }\r\n else {\r\n $window.localStorage.removeItem('7PointUserData');\r\n notifier.notify(config.events.authenticationChange);\r\n $injector.get('$state').go('login', { returnUrl: $location.path() });\r\n return;\r\n }\r\n }\r\n\r\n inFlightAuthRequest.then(function (r) {\r\n \r\n inFlightAuthRequest = null;\r\n userData = {};\r\n var d = r.data;\r\n userData.isAuthenticated = true;\r\n userData.userName = d.UserName;\r\n userData.userType = d.UserType;\r\n userData.userId = d.UserId;\r\n userData.tenantId = d.TenantId;\r\n userData.bearerToken = d.access_token;\r\n userData.refreshToken = d.refresh_token;\r\n userData.hasOps = d.HasOps;\r\n userData.numberOfPaymentTemplates = d.NumberOfPaymentTemplates;\r\n userData.numberOfDisplayTemplates = d.NumberOfDisplayTemplates;\r\n userData.departmentIds = d.DepartmentIds;\r\n userData.billingDepartmentIds = d.BillingDepartmentIds;\r\n userData.activeUntilUtc = d.ActiveUntilUtc;\r\n userData.apiTypeId = d.ApiTypeId;\r\n userData.expirationDate = new Date(d['.expires']);\r\n userData.filterTypeId = d.FilterTypeId;\r\n userData.hasDataApi = d.HasDataApi;\r\n $window.localStorage.setItem('7PointUserData', JSON.stringify(userData));\r\n\r\n $injector.get('$http').get('api/Users/FilterData/' + d.FilterTypeId).then(function (response) {\r\n userData.filterData = response.data;\r\n $window.localStorage.setItem('7PointUserData', JSON.stringify(userData));\r\n });\r\n \r\n\r\n\r\n $injector.get('$http')(response.config).then(function (resp) {\r\n deferred.resolve(resp);\r\n }, function (resp) {\r\n deferred.reject();\r\n });\r\n }, function (response) {\r\n inFlightAuthRequest = null;\r\n $window.localStorage.removeItem('7PointUserData');\r\n notifier.notify(config.events.authenticationChange);\r\n deferred.reject();\r\n $injector.get('$state').go('login', { returnUrl: $location.path() });\r\n\r\n return;\r\n });\r\n\r\n return deferred.promise;\r\n \r\n }\r\n }\r\n return response || $q.when(response)\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.auth')\r\n .factory('userService', userService);\r\n\r\n userService.$inject = ['$window', 'config', 'authDataService', 'notifier', 'bootstrap.dialog', 'survey.dialog', 'dataservice' ];\r\n\r\n /* @ngInject */\r\n function userService($window, config, authDataService, notifier, bsDialog, surveyDialog, dataService) {\r\n var userDataKey = \"7PointUserData\";\r\n var _userData;\r\n var service = {\r\n NotAuthenticatedException: NotAuthenticatedException,\r\n isAuthenticated: isAuthenticated,\r\n isAuthenticatedThrowError: isAuthenticatedThrowError,\r\n login: login,\r\n logout: logout,\r\n getUserData: getUserData,\r\n userDataKey: userDataKey,\r\n userName: userName,\r\n userId: userId,\r\n tenantId: tenantId,\r\n userType: userType,\r\n departmentIds: departmentIds,\r\n billingDepartmentIds: billingDepartmentIds,\r\n hasOps: hasOps,\r\n apiTypeId: apiTypeId,\r\n numberOfDisplayTemplates: numberOfDisplayTemplates,\r\n numberOfPaymentTemplates: numberOfPaymentTemplates,\r\n activeUntilUtc: activeUntilUtc,\r\n saveUserConfigOptions: saveUserConfigOptions,\r\n getAccessToken: getAccessToken,\r\n userConfigOptions: userConfigOptions,\r\n filterData: filterData,\r\n filterTypeId: filterTypeId,\r\n hasDataApi: hasDataApi,\r\n isEmsApiType: isEmsApiType,\r\n checkIsAdmin: checkIsAdmin,\r\n isMazevoApi: isMazevoApi,\r\n isCollegeNetApi: isCollegeNetApi\r\n\r\n };\r\n\r\n return service;\r\n\r\n\r\n function NotAuthenticatedException(msg) {\r\n this.name = 'AuthenticationRequired';\r\n this.message = msg;\r\n notifier.notify(config.events.authenticationChange);\r\n }\r\n\r\n function getAccessToken(externalAccessToken, successCallback, errorCallback) {\r\n authDataService.getAccessToken(externalAccessToken).then(function (response) {\r\n if (response) {\r\n if (response.status !== 200) {\r\n if (response.data) {\r\n errorCallback(response.data.description || response.data.Message || \"Unknown error trying to login\");\r\n }\r\n }\r\n else {\r\n _finalizeLogin(response.data, successCallback, errorCallback);\r\n }\r\n }\r\n else {\r\n errorCallback(response.data.description || response.data.Message || \"Unknown error trying to login\");\r\n }\r\n \r\n }, function (e) {\r\n if (typeof errorCallback === 'function') {\r\n if (e && e.data) {\r\n errorCallback(e.data.description || e.data.Message || \"Unknown error trying to login\");\r\n }\r\n else {\r\n errorCallback(\"Unknown error trying to login.\");\r\n }\r\n }\r\n });\r\n }\r\n\r\n function _setUserData(d) {\r\n \r\n var userData = {};\r\n userData.isAuthenticated = true;\r\n userData.userName = d.UserName;\r\n userData.userType = d.UserType;\r\n userData.userId = d.UserId;\r\n userData.tenantId = d.TenantId;\r\n userData.bearerToken = d.access_token;\r\n userData.refreshToken = d.refresh_token;\r\n userData.hasOps = d.HasOps;\r\n userData.numberOfPaymentTemplates = d.NumberOfPaymentTemplates;\r\n userData.numberOfDisplayTemplates = d.NumberOfDisplayTemplates;\r\n userData.departmentIds = d.DepartmentIds;\r\n userData.billingDepartmentIds = d.BillingDepartmentIds;\r\n userData.activeUntilUtc = d.ActiveUntilUtc;\r\n userData.apiTypeId = d.ApiTypeId;\r\n userData.expirationDate = new Date(d['.expires']);\r\n userData.filterTypeId = d.FilterTypeId;\r\n userData.hasDataApi = d.HasDataApi;\r\n\r\n _saveUserData(userData);\r\n\r\n authDataService.getFilterData(userData.filterTypeId).then(function (response) {\r\n userData.filterData = response.data;\r\n _saveUserData(userData);\r\n \r\n }, function (error) { console.log(\"problem loading filter \" + error); })\r\n\r\n }\r\n\r\n function _finalizeLogin(d, successCallback, errorCallback) {\r\n if (d.NeedsToAcceptTerms == \"1\") {\r\n return bsDialog.confirmationDialog(\"Terms\", \"\", \"Agree\", \"Decline\", 'app/dialogs/_terms.html').then(function (result) {\r\n _setUserData(d);\r\n authDataService.acceptTerms().then(function (x) {\r\n notifier.notify(config.events.authenticationChange);\r\n if (typeof successCallback === 'function') {\r\n\r\n successCallback();\r\n }\r\n }, function (e) { });\r\n\r\n }, function () {\r\n errorCallback(\"Login failed. User declined terms.\");\r\n });\r\n }\r\n else {\r\n _setUserData(d);\r\n\r\n if (d.SurveyToShowUId) {\r\n surveyDialog.display({ SurveyUId: d.SurveyToShowUId }).then(function () { }, function () { });\r\n }\r\n\r\n notifier.notify(config.events.authenticationChange);\r\n\r\n if (typeof successCallback === 'function') {\r\n successCallback();\r\n }\r\n }\r\n }\r\n\r\n\r\n function login(data, successCallback, errorCallback) {\r\n\r\n authDataService.login(data).then(function (response) {\r\n if (response.status === 400) {\r\n handleError(response);\r\n }\r\n else {\r\n _finalizeLogin(response.data, successCallback, errorCallback);\r\n }\r\n \r\n\r\n }, handleError);\r\n\r\n function handleError(e) {\r\n if (typeof errorCallback === 'function') {\r\n if (e && e.data && e.data.error_description) {\r\n errorCallback(\"Login failed. \" + e.data.error_description);\r\n }\r\n\r\n else {\r\n errorCallback(\"Unknown error trying to login.\");\r\n }\r\n }\r\n }\r\n\r\n }\r\n \r\n function _saveUserData(userData) {\r\n $window.localStorage.setItem(userDataKey, JSON.stringify(userData));\r\n }\r\n\r\n function saveUserConfigOptions(updateDto, selectedFilterData) {\r\n\r\n authDataService.saveUserConfigOptions(updateDto);\r\n var userData = getUserData();\r\n userData.filterTypeId = updateDto.filterTypeId;\r\n userData.filterData = selectedFilterData;\r\n _saveUserData(userData);\r\n\r\n }\r\n\r\n function logout() {\r\n dataService.saveItem('api/Account/logout').then(function (response) {\r\n clearUserData();\r\n notifier.notify(config.events.authenticationChange);\r\n }, function (error) {\r\n clearUserData();\r\n notifier.notify(config.events.authenticationChange);\r\n });\r\n \r\n }\r\n\r\n function isAuthenticatedThrowError() {\r\n if (!isAuthenticated()) {\r\n throw new NotAuthenticatedException(\"User Not Authenticated\");\r\n }\r\n return true;\r\n }\r\n\r\n function isAuthenticated() {\r\n var userData = getUserData();\r\n if (userData && userData.isAuthenticated) {\r\n //return (userData.isAuthenticated && !isTokenExpired(userData.expirationDate))\r\n return (userData.isAuthenticated)\r\n }\r\n return false;\r\n }\r\n\r\n function _getRefreshToken() {\r\n var userData = getUserData();\r\n if (userData && userData.refreshToken) {\r\n return (userData.refreshToken);\r\n }\r\n return \"\";\r\n }\r\n\r\n function userId() {\r\n var userData = getUserData();\r\n if (userData && userData.userId) {\r\n return (userData.userId);\r\n }\r\n return \"Guest\";\r\n }\r\n\r\n function hasDataApi() {\r\n var userData = getUserData();\r\n if (userData && userData.hasDataApi) {\r\n return userData.hasDataApi;\r\n }\r\n return \"0\";\r\n }\r\n\r\n function tenantId() {\r\n var userData = getUserData();\r\n if (userData && userData.tenantId) {\r\n return userData.tenantId;\r\n }\r\n return \"-1\";\r\n }\r\n\r\n function activeUntilUtc() {\r\n var userData = getUserData();\r\n if (userData && userData.activeUntilUtc) {\r\n return userData.activeUntilUtc;\r\n }\r\n return \"\";\r\n }\r\n\r\n function apiTypeId() {\r\n var userData = getUserData();\r\n if (userData && userData.apiTypeId) {\r\n return userData.apiTypeId.toUpperCase();\r\n }\r\n return \"\";\r\n }\r\n\r\n function isEmsApiType() {\r\n \r\n var ourApi = \"BCA944F7-7795-45CD-A21B-CB5F16DC4175\";\r\n var psApi = \"4CF523BF-F6DD-441C-810F-C87347963B5D\";\r\n var apiType = apiTypeId();\r\n if (apiType == ourApi || psApi == apiType) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n\r\n }\r\n\r\n function isMazevoApi() {\r\n\r\n var apiTypeId = \"0E9DADB2-F56B-4E7E-A3B2-A59632C91D86\";\r\n var userData = getUserData();\r\n var apiType = \"\";\r\n if (userData && userData.apiTypeId) {\r\n apiType = userData.apiTypeId.toUpperCase();\r\n }\r\n \r\n if (apiType == apiTypeId) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n\r\n }\r\n\r\n function isCollegeNetApi() {\r\n\r\n var apiTypeId = \"355A9B3B-BF7E-4D96-8B06-27B310EB01F0\";\r\n var userData = getUserData();\r\n var apiType = \"\";\r\n if (userData && userData.apiTypeId) {\r\n apiType = userData.apiTypeId.toUpperCase();\r\n }\r\n\r\n if (apiType == apiTypeId) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n\r\n }\r\n\r\n\r\n function hasOps() {\r\n var userData = getUserData();\r\n if (userData && userData.hasOps) {\r\n return userData.hasOps;\r\n }\r\n return \"0\";\r\n }\r\n\r\n function numberOfDisplayTemplates() {\r\n var userData = getUserData();\r\n if (userData && userData.numberOfDisplayTemplates) {\r\n return userData.numberOfDisplayTemplates;\r\n }\r\n return \"0\";\r\n }\r\n\r\n function numberOfPaymentTemplates() {\r\n var userData = getUserData();\r\n if (userData && userData.numberOfPaymentTemplates) {\r\n return userData.numberOfPaymentTemplates;\r\n }\r\n return \"0\";\r\n }\r\n\r\n function userName() {\r\n var userData = getUserData();\r\n if (userData && userData.userName) {\r\n return (userData.userName);\r\n }\r\n return \"Guest\";\r\n }\r\n\r\n function userType() {\r\n var userData = getUserData();\r\n if (userData && userData.userType) {\r\n return (userData.userType);\r\n }\r\n return \"0\";\r\n }\r\n\r\n function departmentIds() {\r\n var userData = getUserData();\r\n if (userData && userData.departmentIds) {\r\n return userData.departmentIds.split(',');\r\n }\r\n return [];\r\n }\r\n\r\n function billingDepartmentIds() {\r\n var userData = getUserData();\r\n if (userData) {\r\n if (userData.billingDepartmentIds && userData.billingDepartmentIds.length > 0) {\r\n return userData.billingDepartmentIds.split(',');\r\n }\r\n }\r\n return [];\r\n }\r\n\r\n function checkIsAdmin() {\r\n return authDataService.checkIsAdmin().then(function (response) {\r\n return response.data;\r\n }, function (error) { });\r\n \r\n }\r\n\r\n function filterTypeId() {\r\n var userData = getUserData();\r\n if (userData && userData.filterTypeId) {\r\n return userData.filterTypeId;\r\n }\r\n return 0;\r\n }\r\n\r\n\r\n function filterData() {\r\n var userData = getUserData();\r\n if (userData) {\r\n if (userData.filterData) {\r\n return userData.filterData;\r\n }\r\n }\r\n return {};\r\n }\r\n\r\n function userConfigOptions() {\r\n var userData = getUserData();\r\n if (userData && userData.configOptions) {\r\n var base64Options = userData.configOptions;\r\n if (base64Options) {\r\n return angular.fromJson(atob(base64Options));\r\n }\r\n }\r\n return {};\r\n }\r\n\r\n function getUserData() {\r\n //if (!_userData) {\r\n var s = $window.localStorage.getItem(userDataKey);\r\n if (s) {\r\n try {\r\n //_userData = JSON.parse($window.localStorage.getItem(userDataKey));\r\n return JSON.parse($window.localStorage.getItem(userDataKey));\r\n }\r\n catch (error) { }\r\n }\r\n else {\r\n // _userData = null;\r\n }\r\n //}\r\n //return _userData;\r\n return null;\r\n }\r\n\r\n\r\n function isTokenExpired(expirationDate) {\r\n var now = new Date();\r\n expirationDate = new Date(expirationDate);\r\n if (expirationDate - now > 0) {\r\n return false;\r\n }\r\n else {\r\n try {\r\n return refreshToken().then(function () {\r\n return false;\r\n });\r\n }\r\n catch (refreshTokenError) {\r\n \r\n clearUserData();\r\n return true;\r\n }\r\n\r\n \r\n \r\n }\r\n }\r\n\r\n function clearUserData() {\r\n _userData = null;\r\n $window.localStorage.removeItem(userDataKey);\r\n }\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.backendHubProxy')\r\n .factory('backendHubProxy', backendHubProxy);\r\n\r\n backendHubProxy.$inject = ['$rootScope', 'common', 'config', 'signalrEndPoint', '$timeout'];\r\n\r\n /* @ngInject */\r\n function backendHubProxy($rootScope, common, config, signalrEndPoint, $timeout) {\r\n var _connection;\r\n var _stopCalled = false;\r\n\r\n var service = {\r\n startListening: startListening,\r\n stop: stop,\r\n items: [],\r\n displayedItems: [],\r\n bookData: [],\r\n displayedBookData : [],\r\n topic: {}\r\n };\r\n\r\n return service;\r\n\r\n function stop() {\r\n if (_connection && _connection.state && _connection.state !== 4 /* disconnected */) {\r\n _stopCalled = true;\r\n _connection.stop();\r\n }\r\n } \r\n\r\n function startListening() {\r\n _connection = $.hubConnection(signalrEndPoint);\r\n _connection.logging = false;\r\n var proxy = _connection.createHubProxy(\"sevenPointHub\");\r\n var userData = JSON.parse(localStorage.getItem('7PointUserData'));\r\n if (userData && userData.bearerToken) {\r\n _connection.qs = { \"Bearer\": userData.bearerToken };\r\n }\r\n\r\n proxy.on(\"alertAdded\", function (result) {\r\n _addAlert(result);\r\n });\r\n\r\n proxy.on(\"noteAdded\", function (result) {\r\n _addNote(result);\r\n });\r\n \r\n proxy.on(\"taskAdded\", function (result) {\r\n \r\n _addTask(result);\r\n });\r\n\r\n proxy.on(\"availableAtUpdated\", function (result) {\r\n _availableAtUpdated(result);\r\n });\r\n \r\n \r\n proxy.on(\"taskNoteDeleted\", function (id) {\r\n _deleteNote(id);\r\n });\r\n \r\n proxy.on(\"noteUpdate\", function (result) {\r\n _updateNote(result);\r\n })\r\n\r\n proxy.on(\"noteAcknowledged\", function (result) {\r\n _acknowledgeNote(result);\r\n })\r\n\r\n proxy.on(\"removeServiceOrderAssignmet\", function (result) {\r\n _removeServiceOrderAssignment(result);\r\n });\r\n\r\n proxy.on(\"serviceOrderAssigned\", function (result) {\r\n _serviceOrderAssigned(result);\r\n });\r\n\r\n \r\n proxy.on(\"completionAdded\", function (result) {\r\n _completionAdded(result);\r\n });\r\n\r\n proxy.on(\"bookingUpdated\", function (result) {\r\n _bookingUpdated(result);\r\n });\r\n\r\n proxy.on(\"logEntryAdded\", function (result) {\r\n _logEntryAdded(result);\r\n });\r\n\r\n proxy.on(\"logEntryUpdated\", function (result) {\r\n _logEntryUpdated(result);\r\n });\r\n\r\n proxy.on(\"deleteEntry\", function (result) {\r\n _logEntryDeleted(result);\r\n });\r\n\r\n proxy.on(\"communityTopicCommentSaved\", function (comment) {\r\n _commentSaved(comment);\r\n });\r\n\r\n _connection.starting(function () {\r\n common.notifier.notify(common.config.events.signalRStatusChange, \"Connection Starting\");\r\n });\r\n\r\n _connection.received(function (data) {\r\n // common.notifier.notify(common.config.events.signalRStatusChange, \"Recieving Data\");\r\n });\r\n \r\n _connection.connectionSlow(function () {\r\n common.notifier.notify(common.config.events.signalRStatusChange, \"We are currently experiencing difficulties with the connection.\");\r\n });\r\n\r\n _connection.reconnecting(function () {\r\n common.notifier.notify(common.config.events.signalRStatusChange, \"Attempting to reconnect\");\r\n });\r\n\r\n _connection.reconnected(function () {\r\n common.notifier.notify(common.config.events.signalRStatusChange, \"Reconnected\");\r\n });\r\n\r\n _connection.stateChanged(function (states) {\r\n var userData = JSON.parse(localStorage.getItem('7PointUserData'));\r\n if (userData && userData.bearerToken) {\r\n _connection.qs = { \"Bearer\": userData.bearerToken };\r\n }\r\n var newState = \"\";\r\n switch (states.newState) {\r\n case 0:\r\n newState = \"Connecting\";\r\n break;\r\n case 1:\r\n newState = \"Connected\";\r\n break;\r\n case 2:\r\n newState = \"Reconneting\";\r\n break;\r\n case 4:\r\n newState = \"Disconnected\";\r\n break;\r\n\r\n }\r\n common.notifier.notify(common.config.events.signalRStatusChange, newState);\r\n });\r\n\r\n _connection.disconnected(function () {\r\n if (!_stopCalled) {\r\n common.notifier.notify(common.config.events.signalRStatusChange, \"Disconnected\");\r\n $timeout(function () { _startConnectionAndSubscribe(_connection, proxy) }, 5000);\r\n }\r\n });\r\n\r\n _startConnectionAndSubscribe(_connection, proxy);\r\n\r\n //_connection.start().done(function () { proxy.invoke(\"subscribe\").done(function () { }); });\r\n }\r\n\r\n function _startConnectionAndSubscribe(connection, proxy) {\r\n connection.start().done(function () {\r\n proxy.invoke(\"subscribe\").done(function () {\r\n });\r\n }).fail(function () { common.config.events.signalRStatusChange, \"Could Not Connect\" })\r\n _stopCalled = false;\r\n }\r\n\r\n\r\n function _addNote(result) {\r\n _addItemToSubCollection(result, \"Notes\", \"ID\", \"DateAddedUtc\");\r\n _processForToast();\r\n }\r\n\r\n function _completionAdded(result) {\r\n _addItemToSubCollection(result, \"Completions\", \"DateAddedUtc\", \"DateAddedUtc\");\r\n _addCompletionToBookData(service.bookData, result);\r\n _addCompletionToBookData(service.displayedBookData, result);\r\n $rootScope.$apply();\r\n }\r\n\r\n function _addCompletionToBookData(bookData, result) {\r\n if (bookData && bookData.length > 0) {\r\n\r\n for (var i = 0; i < bookData.length; i++) {\r\n var building = bookData[i];\r\n for (var ii = 0; ii < building.Rooms.length; ii++) {\r\n var room = building.Rooms[ii];\r\n for (var iii = 0; iii < room.Bookings.length; iii++) {\r\n var t = room.Bookings[iii];\r\n if (t[\"BookingId\"] == result.ParentId) {\r\n var matched = false;\r\n for (var j = 0; j < t[\"Completions\"].length; j++) {\r\n if (t[\"Completions\"][j][\"DateAddedUtc\"] == result[\"DateAddedUtc\"]) {\r\n matched = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!matched) {\r\n t[\"Completions\"].push(result);\r\n t[\"Completions\"].sort(function (a, b) {\r\n a = new Date(a[\"DateAddedUtc\"]);\r\n b = new Date(b[\"DateAddedUtc\"]);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n function _removeServiceOrderAssignment(soId) {\r\n for (var i = 0; i < service.items.length; i++) {\r\n var b = service.items[i];\r\n if (b.Services) {\r\n for (var j = 0; j < b.Services.length; j++) {\r\n var onService = b.Services[j];\r\n if (onService.ID == soId) {\r\n onService.AssignedToUserId = 0;\r\n onService.AssignedTo = \"\";\r\n }\r\n }\r\n }\r\n }\r\n _removeServiceAssignmentFromBookData(service.bookData, soId);\r\n _removeServiceAssignmentFromBookData(service.displayedBookData, soId);\r\n \r\n\r\n service.displayedItems = [].concat(service.items);\r\n $rootScope.$apply();\r\n }\r\n\r\n function _removeServiceAssignmentFromBookData(bookData, soId) {\r\n if (bookData && bookData.length > 0) {\r\n for (var i = 0; i < bookData.length; i++) {\r\n var building = bookData[i];\r\n for (var ii = 0; ii < building.Rooms.length; ii++) {\r\n var room = building.Rooms[ii];\r\n for (var iii = 0; iii < room.Bookings.length; iii++) {\r\n var t = room.Bookings[iii];\r\n if (t.Services) {\r\n for (var j = 0; j < t.Services.length; j++) {\r\n var onService = t.Services[j];\r\n if (onService.ID == soId) {\r\n onService.AssignedToUserId = 0;\r\n onService.AssignedTo = \"\";\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n function _serviceOrderAssigned(dto) {\r\n for (var i = 0; i < service.items.length; i++) {\r\n var b = service.items[i];\r\n if (b.Services) {\r\n for (var j = 0; j < b.Services.length; j++) {\r\n var onService = b.Services[j];\r\n if (onService.ID == dto.ServiceOrderId) {\r\n onService.AssignedToUserId = dto.AssignedToUserId;\r\n onService.AssignedTo = dto.AssignedTo;\r\n }\r\n }\r\n }\r\n }\r\n\r\n _addServiceOrderAssignmentToBookData(service.bookData, dto);\r\n _addServiceOrderAssignmentToBookData(service.displayedBookData, dto);\r\n\r\n service.displayedItems = [].concat(service.items);\r\n $rootScope.$apply();\r\n }\r\n function _addServiceOrderAssignmentToBookData(bookData, dto) {\r\n if (bookData && bookData.length > 0) {\r\n for (var i = 0; i < bookData.length; i++) {\r\n var building = bookData[i];\r\n for (var ii = 0; ii < building.Rooms.length; ii++) {\r\n var room = building.Rooms[ii];\r\n for (var iii = 0; iii < room.Bookings.length; iii++) {\r\n var t = room.Bookings[iii];\r\n if (t.Services) {\r\n for (var j = 0; j < t.Services.length; j++) {\r\n var onService = t.Services[j];\r\n if (onService.ID == dto.ServiceOrderId) {\r\n onService.AssignedToUserId = dto.AssignedToUserId;\r\n onService.AssignedTo = dto.AssignedTo;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n}\r\n\r\n function _commentSaved(comment) {\r\n if (service.topic.UId === comment.CommunityTopicUId) {\r\n\r\n var updated = false;\r\n for (var i = 0; i < service.items.length; i++) {\r\n if (service.items[i].ID === comment.ID) {\r\n for (var key in item) {\r\n service.items[i][key] = comment[key];\r\n }\r\n updated = true;\r\n break;\r\n }\r\n }\r\n if (!updated) {\r\n service.items.push(comment);\r\n service.items.sort(function (a, b) {\r\n a = new Date(a[\"DateAddedUtc\"]);\r\n b = new Date(b[\"DateAddedUtc\"]);\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n });\r\n }\r\n service.displayedItems = [].concat(service.items);\r\n\r\n $rootScope.$apply();\r\n }\r\n }\r\n \r\n function _addAlert(item) {\r\n common.notifier.notify(config.events.refreshCounts);\r\n var displayFrom = moment.utc(item.DisplayFromUtc).toDate();\r\n var displayTo = moment.utc(item.DisplayToUtc).toDate();\r\n var utcNow = moment.utc().toDate();\r\n\r\n var userDepartments = common.userService.departmentIds();\r\n \r\n var dId = item.DepartmentId + \"\";\r\n if (displayFrom < utcNow && utcNow < displayTo && (userDepartments.indexOf(dId) >= 0 || dId == 0) ){\r\n \r\n var updated = false;\r\n for (var i = 0; i < service.items.length; i++) {\r\n if (service.items[i].ID == item.ID) {\r\n for (var key in item) {\r\n service.items[i][key] = item[key];\r\n }\r\n updated = true;\r\n break;\r\n }\r\n }\r\n if (!updated) {\r\n service.items.push(item);\r\n }\r\n service.displayedItems = [].concat(service.items);\r\n $rootScope.$apply();\r\n }\r\n }\r\n\r\n function _logEntryAdded(item) {\r\n var onDateDisplay = moment(common.getMainState(\"mainDate\")).format(\"YYYY-MM-DD\");\r\n var itemDateDisplay = moment(item.DisplayOn).format(\"YYYY-MM-DD\");\r\n\r\n if (onDateDisplay == itemDateDisplay) {\r\n \r\n var updated = false;\r\n for (var i = 0; i < service.items.length; i++) {\r\n if (service.items[i].ID == item.ID) {\r\n service.items[i] == item;\r\n updated = true;\r\n break;\r\n }\r\n }\r\n if (!updated) {\r\n service.items.push(item);\r\n }\r\n\r\n service.displayedItems = [].concat(service.items);\r\n $rootScope.$apply();\r\n }\r\n \r\n }\r\n\r\n\r\n function _addTask(result) {\r\n var userDepartments = common.userService.departmentIds();\r\n \r\n common.notifier.notify(config.events.refreshCounts);\r\n var onDateDisplay = moment(common.getMainState(\"mainDate\")).format(\"YYYY-MM-DD\");\r\n var itemDateDisplay = moment(result.TaskDisplayOn).format(\"YYYY-MM-DD\");\r\n var dIds = result.DepartmentIds;\r\n \r\n for (var j = 0; j < dIds.length; j++) {\r\n var updated = false;\r\n var dId = dIds[j] + \"\";\r\n //this will add the task to display at the top\r\n if (onDateDisplay == itemDateDisplay && userDepartments.indexOf(dId) >= 0) {\r\n for (var i = 0; i < service.items.length; i++) {\r\n if (service.items[i].TaskId == result.TaskId) {\r\n service.items[i] = result;\r\n updated = true;\r\n break;\r\n }\r\n }\r\n if (!updated) {\r\n service.items.push(result);\r\n }\r\n }\r\n }\r\n service.displayedItems = [].concat(service.items);\r\n\r\n if (result.LinkedBookingId > 0) {\r\n for (var i = 0; i < service.items.length; i++) {\r\n if (service.items[i].BookingId == result.LinkedBookingId) {\r\n if (!service.items[i].LinkedTasks) {\r\n service.items[i].LinkedTasks = [];\r\n }\r\n service.items[i].LinkedTasks.push(result);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n $rootScope.$apply();\r\n }\r\n\r\n function _bookingUpdated(result) {\r\n for (var i = 0; i < service.items.length; i++) {\r\n var b = service.items[i];\r\n if (b.BookingId == result.BookingId) {\r\n b.BuildingLocalEventEnd = result.BuildingLocalEventEnd;\r\n b.BuildingLocalEventEndDisplay = result.BuildingLocalEventEndDisplay;\r\n b.BuildingLocalReseveredEnd = result.BuildingLocalReseveredEnd;\r\n b.BuildingLocalReseveredEndDisplay = result.BuildingLocalReseveredEndDisplay;\r\n service.items[i] = b;\r\n }\r\n }\r\n\r\n _updateBookingInBookData(service.bookData, result);\r\n _updateBookingInBookData(service.displayedBookData, result);\r\n \r\n service.displayedItems = [].concat(service.items);\r\n $rootScope.$apply();\r\n }\r\n\r\n function _updateBookingInBookData(bookData, result) {\r\n if (bookData && bookData.length > 0) {\r\n for (var i = 0; i < bookData.length; i++) {\r\n var building = bookData[i];\r\n for (var ii = 0; ii < building.Rooms.length; ii++) {\r\n var room = building.Rooms[ii];\r\n for (var iii = 0; iii < room.Bookings.length; iii++) {\r\n var t = room.Bookings[iii];\r\n if (t.BookingId == result.BookingId) {\r\n t.BuildingLocalEventEnd = result.BuildingLocalEventEnd;\r\n t.BuildingLocalEventEndDisplay = result.BuildingLocalEventEndDisplay;\r\n t.BuildingLocalReseveredEnd = result.BuildingLocalReseveredEnd;\r\n t.BuildingLocalReseveredEndDisplay = result.BuildingLocalReseveredEndDisplay;\r\n\r\n room.Bookings[iii] = t;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n function _availableAtUpdated(result) {\r\n for (var i = 0; i < service.items.length; i++) {\r\n var b = service.items[i];\r\n if (b.BookingId == result.BookingId) {\r\n\r\n var buildingLocalTime = moment(b.BuildingLocalEventStart);\r\n var raat = moment(b.BuildingLocalEventStart);\r\n var timeParts = result.AvailableAt.split(':');\r\n raat = raat.hour(timeParts[0]);\r\n raat = raat.minute(timeParts[1]);\r\n\r\n b.RoomAvailableAt = raat.format(\"HH:mm\");\r\n\r\n if (raat.isAfter(buildingLocalTime)) {\r\n b.RoomAvailableAtSort = raat.subtract(1, 'days').format(\"YYYY-MM-DDTHH:mm\");\r\n }\r\n else {\r\n b.RoomAvailableAtSort = raat.format(\"YYYY-MM-DDTHH:mm\");\r\n }\r\n\r\n break;\r\n }\r\n }\r\n service.displayedItems = [].concat(service.items);\r\n $rootScope.$apply();\r\n }\r\n\r\n function _deleteNote(id) {\r\n _deleteNoteFromItemWithNotes(id, service.items);\r\n for (var j = 0; j < service.items.length; j++) {\r\n _deleteNoteFromItemWithNotes(id, service.items[j].LinkedTasks);\r\n }\r\n $rootScope.$apply();\r\n }\r\n\r\n function _deleteNoteFromItemWithNotes(id, colT) {\r\n if (colT && colT.length > 0) {\r\n for (var i = 0; i < colT.length; i++) {\r\n var matched = false;\r\n $.each(colT[i].Notes, function (index, result) {\r\n if (result) {\r\n if (result[\"ID\"] == id) {\r\n colT[i].Notes.splice(index, 1);\r\n matched = true;\r\n return false;\r\n }\r\n }\r\n });\r\n if (matched) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n function _logEntryUpdated(entry) {\r\n for (var i = 0; i < service.items.length; i++) {\r\n var t = service.items[i];\r\n if (t.ID == entry.ID) {\r\n t.Entry = entry.Entry;\r\n break;\r\n }\r\n }\r\n $rootScope.$apply();\r\n }\r\n\r\n function _logEntryDeleted(id) {\r\n $.each(service.items, function (index, result) {\r\n if (result) {\r\n if (result[\"ID\"] == id) {\r\n service.items.splice(index, 1);\r\n }\r\n }\r\n });\r\n $rootScope.$apply();\r\n }\r\n \r\n\r\n function _updateNote(note) {\r\n var idProp = note.BookingId == 0 ? \"TaskId\" : \"BookingId\";\r\n for (var i = 0; i < service.items.length; i++) {\r\n var t = service.items[i];\r\n _updateNoteInItemWithNotes(idProp, t, note);\r\n if (t.LinkedTasks && t.LinkedTasks.length > 0) {\r\n for (var j = 0; j < t.LinkedTasks.length; j++) {\r\n var lt = t.LinkedTasks[j];\r\n _updateNoteInItemWithNotes(idProp, lt, note);\r\n }\r\n }\r\n }\r\n $rootScope.$apply();\r\n }\r\n\r\n function _acknowledgeNote(note) {\r\n for (var i = 0; i < service.items.length; i++) {\r\n var t = service.items[i];\r\n\r\n if (t.BookingId == note.ParentId) {\r\n t.RequiresAcknowledgement = false;\r\n for (var j = 0; j < t.Notes.length; j++) {\r\n if (t.Notes[j].ID == note.ID) {\r\n t.Notes[j].Notes = note.Notes;\r\n t.Notes[j].AcknowledgedBy = note.AcknowledgedBy;\r\n t.Notes[j].AcknowledgedByInitials = note.AcknowledgedByInitials;\r\n t.Notes[j].AcknowledgedAtUtc = note.AcknowledgedAtUtc;\r\n t.Notes[j].UserCanAcknowledge = note.UserCanAcknowledge;\r\n break;\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n _processForToast();\r\n\r\n $rootScope.$apply();\r\n }\r\n\r\n function _processForToast() {\r\n var numberOfItemsRequiringAttention = 0;\r\n for (var i = 0; i < service.items.length; i++) {\r\n var onItem = service.items[i];\r\n if (onItem.RequiresAcknowledgement) {\r\n numberOfItemsRequiringAttention++;\r\n }\r\n }\r\n common.logger.clearToast();\r\n if (numberOfItemsRequiringAttention > 0) {\r\n common.logger.forceAcknowledge(\"There are \" + numberOfItemsRequiringAttention + \" items that need your attention\", \"Urgent Action Required\");\r\n }\r\n }\r\n\r\n\r\n function _updateNoteInItemWithNotes(idProp, t, note) {\r\n if (t[idProp] == note[idProp]) {\r\n for (var j = 0; j < t.Notes.length; j++) {\r\n if (t.Notes[j].ID == note.ID) {\r\n t.Notes[j].Notes = note.Notes;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n function _addItemToSubCollection(dto, subCollectionName, subCollectionCompareProperty, subCollectionSortProperty) {\r\n var idProp = \"BookingId\";\r\n if (dto.ParentType == 2) {\r\n idProp = \"TaskId\";\r\n }\r\n else if (dto.ParentType == 9) {\r\n idProp = \"DailyLogEntryId\";\r\n }\r\n else if (dto.ParentType == 10) {\r\n idProp = \"ID\";\r\n }\r\n\r\n if (dto.ParentType == 10) { //new service order completion\r\n for (var i = 0; i < service.items.length; i++) {\r\n var rootItem = service.items[i];\r\n if (rootItem.Services != null) {\r\n for (var j = 0; j < rootItem.Services.length; j++) {\r\n var onService = rootItem.Services[j];\r\n if (onService.ID == dto.ParentId) {\r\n onService.Completions.push(dto);\r\n onService.Completions.sort(function (a, b) {\r\n a = new Date(a[\"DateAddedUtc\"]);\r\n b = new Date(b[\"DateAddedUtc\"]);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < service.items.length; i++) {\r\n var t = service.items[i];\r\n if (t[idProp] == dto.ParentId) {\r\n if (subCollectionName === \"Notes\") {\r\n if (dto.DepartmentId !== null && !dto.AcknowledgedAtUtc) {\r\n t.RequiresAcknowledgement = true;\r\n }\r\n }\r\n var matched = false;\r\n for (var j = 0; j < t[subCollectionName].length; j++) {\r\n if (t[subCollectionName][j][subCollectionCompareProperty] == dto[subCollectionCompareProperty]) {\r\n matched = true;\r\n break;\r\n }\r\n }\r\n if (!matched) {\r\n t[subCollectionName].push(dto);\r\n t[subCollectionName].sort(function (a, b) {\r\n a = new Date(a[subCollectionSortProperty]);\r\n b = new Date(b[subCollectionSortProperty]);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n }\r\n\r\n break;\r\n }\r\n }\r\n if (dto.ParentType == 2) {\r\n for (var iii = 0; iii < service.items.length; iii++) {\r\n var onItem = service.items[iii];\r\n if (onItem.LinkedTasks && onItem.LinkedTasks.length > 0) {\r\n for (var ii = 0; ii < onItem.LinkedTasks.length; ii++) {\r\n var onLinkedTask = onItem.LinkedTasks[ii];\r\n if (onLinkedTask[idProp] == dto.ParentId) {\r\n var linkedMatched = false;\r\n for (var jj = 0; jj < onLinkedTask[subCollectionName].length; jj++) {\r\n if (onLinkedTask[subCollectionName][jj][subCollectionCompareProperty] == dto[subCollectionCompareProperty]) {\r\n linkedMatched = true;\r\n break;\r\n }\r\n }\r\n if (!linkedMatched) {\r\n onLinkedTask[subCollectionName].push(dto);\r\n onLinkedTask[subCollectionName].sort(function (a, b) {\r\n a = new Date(a[subCollectionSortProperty]);\r\n b = new Date(b[subCollectionSortProperty]);\r\n return a > b ? -1 : a < b ? 1 : 0\r\n });\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n \r\n $rootScope.$apply();\r\n }\r\n\r\n \r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular.module('blocks.directives', ['smart-table']);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.directives')\r\n .directive('spCheckboxList', spCheckboxList);\r\n\r\n spCheckboxList.$inject = ['opsIncludeVersion'];\r\n /* @ngInject */\r\n function spCheckboxList(opsIncludeVersion) {\r\n var directive = {\r\n restrict: 'E',\r\n link: link,\r\n scope: {\r\n 'label': '@',\r\n 'listData': '=',\r\n 'selectedArray': '=',\r\n 'allowSelectAll': '@',\r\n 'disabled': '=',\r\n 'helpTextField': '@',\r\n 'dynamicLabel': '=',\r\n 'toggleFn': '&'\r\n },\r\n templateUrl: 'app/blocks/directives/_checkboxList.html?v=' + opsIncludeVersion\r\n };\r\n\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n scope.filterString = \"\";\r\n scope.filterShowing = false;\r\n scope.filterClick = function () {\r\n scope.filterShowing = !scope.filterShowing;\r\n if (!scope.filterShowing) {\r\n scope.filterString = \"\";\r\n }\r\n }\r\n\r\n scope.toggleSelection = function (itemId, selectedArray) {\r\n var wasSelected = false;\r\n for (var i = 0; i < selectedArray.length; i++) {\r\n if (selectedArray[i] == itemId) {\r\n selectedArray.splice(i, 1);\r\n wasSelected = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!wasSelected) {\r\n selectedArray.push(itemId);\r\n }\r\n if (scope.toggleFn) {\r\n scope.toggleFn();\r\n }\r\n }\r\n\r\n scope.showFilter = function () {\r\n\r\n }\r\n\r\n var allSelected = false;\r\n scope.isSelected = function (itemId, selectedArray) {\r\n if (!selectedArray) {\r\n return false;\r\n }\r\n for (var i = 0; i < selectedArray.length; i++) {\r\n if (selectedArray[i] == itemId) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n scope.toggleAll = function (selectedArrary) {\r\n if (!scope.disabled) {\r\n if (allSelected) {\r\n selectedArrary.length = 0;\r\n allSelected = false;\r\n if (scope.toggleFn) {\r\n scope.toggleFn();\r\n }\r\n return;\r\n }\r\n else {\r\n allSelected = true;\r\n }\r\n for (var i = 0; i < scope.listData.length; i++) {\r\n var id = scope.listData[i].ID;\r\n if (selectedArrary.indexOf(id) == -1) {\r\n selectedArrary.push(id);\r\n }\r\n }\r\n if (scope.toggleFn) {\r\n scope.toggleFn();\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.directives')\r\n .directive('spFormAutoFillFix', spFormAutoFillFix);\r\n\r\n spFormAutoFillFix.$inject = ['$timeout'];\r\n /* @ngInject */\r\n function spFormAutoFillFix($timeout) {\r\n var directive = {\r\n restrict: 'A',\r\n link: link\r\n };\r\n\r\n return directive;\r\n\r\n function link(scope, element, attrs, ctrl) {\r\n // Fixes Chrome bug: https://groups.google.com/forum/#!topic/angular/6NlucSskQjY\r\n element.prop('method', 'POST');\r\n\r\n if (attrs.ngSubmit) {\r\n $timeout(function () {\r\n \r\n element.unbind('submit').submit(function (e) {\r\n e.preventDefault();\r\n element.find('input, textarea, select').trigger('input').trigger('change').trigger('keydown');\r\n scope.$apply(attrs.ngSubmit);\r\n });\r\n }, 0);\r\n }\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.directives')\r\n .directive('spHelpText', spHelpText);\r\n\r\n spHelpText.$inject = ['$state', 'helpTextFactory', '$compile' ];\r\n /* @ngInject */\r\n function spHelpText($state, helpTextFactory, $compile) {\r\n var directive = {\r\n restrict: 'A',\r\n link: link,\r\n scope: { \r\n 'helpTextField': '@',\r\n 'showAsIcon': '@',\r\n 'popoverPlacement': '@'\r\n }\r\n };\r\n\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n helpTextFactory.helpTextData().then(function (data) {\r\n \r\n if (data) {\r\n \r\n var state = $state.current.name;\r\n var _showAsIcon = false;\r\n var field;\r\n if (element[0].tagName === \"LABEL\") {\r\n _showAsIcon = true;\r\n field = attrs[\"for\"]\r\n }\r\n else {\r\n field = scope.helpTextField;\r\n }\r\n\r\n if (scope.showAsIcon) {\r\n _showAsIcon = true;\r\n }\r\n\r\n if (!scope.popoverPlacement) {\r\n scope.popoverPlacement = \"top\";\r\n \r\n }\r\n \r\n for (var i = 0; i < data.length; i++) {\r\n var d = data[i];\r\n if (d.State === state && d.FieldName == field || d.State === \"dailysetup\" && d.FieldName == field) {\r\n if (_showAsIcon) {\r\n var escaped = d.HelpText.replace(new RegExp(/\\\"/g), \""\");\r\n escaped = escaped.replace(new RegExp(/'/g), \"\\\\'\");\r\n var ico = $compile(\"\")(scope);\r\n element.append(\" \");\r\n element.append(ico);\r\n }\r\n else {\r\n element.html(d.HelpText);\r\n }\r\n \r\n }\r\n }\r\n }\r\n }, function (error) { });\r\n \r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.directives')\r\n .directive('spTimePicker', spTimePicker);\r\n\r\n /* @ngInject */\r\n function spTimePicker() {\r\n var directive = {\r\n restrict: 'E',\r\n link: link,\r\n scope: { \r\n 'label': '@',\r\n 'controlId': '@',\r\n 'bindTo': '='\r\n },\r\n template: '' +\r\n ''\r\n };\r\n\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n var times = [], i, j, t, h, hh, m;\r\n\r\n for (i = 0; i < 24; i++) {\r\n hh = i;\r\n if (i === 0) {\r\n h = \"12\";\r\n }\r\n else {\r\n if (i > 12) {\r\n h = i % 12;\r\n }\r\n else {\r\n h = i;\r\n }\r\n }\r\n for (j = 0; j < 4; j++) {\r\n t = (h + \":\" + (j === 0 ? \"00\" : 15 * j));\r\n m = ((hh < 10 ? \"0\" + hh : hh) + \":\" + (j === 0 ? \"00\" : 15 * j));\r\n t += \" \" + Number(i) < 12 ? \" AM\" : \" PM\"\r\n times.push({ value: m, text: t });\r\n }\r\n }\r\n\r\n scope.times = times;\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.directives')\r\n .directive('stResetSearch', stResetSearch);\r\n\r\n stResetSearch.$inject = ['notifier', 'config'];\r\n /* @ngInject */\r\n function stResetSearch(notifier, config) {\r\n var directive = {\r\n restrict: 'EA',\r\n require: '^stTable',\r\n link: link,\r\n scope: {\r\n 'controlId': '@'\r\n }\r\n\r\n };\r\n\r\n return directive;\r\n\r\n function link(scope, element, attrs, ctrl) {\r\n return element.bind('click', function () {\r\n return scope.$apply(function () {\r\n var tableState;\r\n notifier.notify(config.events.filterCleared);\r\n document.getElementById(scope.controlId).value = \"\";\r\n tableState = ctrl.tableState();\r\n tableState.search.predicateObject = {};\r\n tableState.pagination.start = 0;\r\n return ctrl.pipe();\r\n });\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.directives')\r\n .directive('stShowInactive', stShowInactive)\r\n \r\n /* @ngInject */\r\n function stShowInactive() {\r\n var directive = {\r\n restrict: 'A',\r\n require: '^stTable',\r\n link: link,\r\n bindToController: true\r\n };\r\n\r\n return directive;\r\n\r\n function link(scope, element, attrs, ctrl) {\r\n \r\n scope.$watch('vm.showInactive', function (value) {\r\n ctrl.search(!value, 'Active');\r\n })\r\n return ctrl.pipe();\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.directives')\r\n .directive('stShowPastEvents', stShowPastEvents)\r\n .filter(\"dailySetupFilter\", dailySetupFilter);\r\n \r\n dailySetupFilter.$inject = ['$filter', '$timeout', 'common'];\r\n /* @ngInject */\r\n function dailySetupFilter($filter, $timeout, common) {\r\n var filterFilter = $filter('filter');\r\n var standardComparator = function standardComparator(obj, text) {\r\n text = ('' + text).toLowerCase();\r\n return ('' + obj).toLowerCase().indexOf(text) > -1;\r\n };\r\n\r\n return function dailySetupFilter(array, expression) {\r\n function customComparator(actual, expected) {\r\n\r\n if (angular.isObject(expected)) {\r\n\r\n //date range\r\n if (expected.after) {\r\n try {\r\n if (actual != '0001-01-01T00:00:00') {\r\n var end = moment(actual).toDate();\r\n if (end < new Date()) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n } catch (e) {\r\n return false;\r\n }\r\n\r\n } \r\n return true;\r\n\r\n }\r\n return standardComparator(actual, expected);\r\n }\r\n\r\n var output = filterFilter(array, expression, customComparator);\r\n return output;\r\n };\r\n }\r\n \r\n\r\n /* @ngInject */\r\n function stShowPastEvents() {\r\n var directive = {\r\n restrict: 'A',\r\n require: '^stTable',\r\n link: link,\r\n bindToController: true,\r\n //controller: 'DailySetupController',\r\n //controllerAs: 'vm'\r\n\r\n };\r\n\r\n return directive;\r\n\r\n function link(scope, element, attrs, ctrl) {\r\n \r\n return element.bind('click', function () {\r\n return scope.$apply(function () {\r\n scope.vm.showHistoricalItems = !scope.vm.showHistoricalItems;\r\n var query = {};\r\n var predicate = \"BuildingLocalReseveredEnd\";\r\n if (!scope.vm.showHistoricalItems) {\r\n query.after = true;\r\n }\r\n else {\r\n query.after = null;\r\n }\r\n \r\n ctrl.search(query, predicate);\r\n\r\n return ctrl.pipe();\r\n });\r\n });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.exception')\r\n .factory('exception', exception);\r\n\r\n exception.$inject = ['$q', 'logger'];\r\n /* @ngInject */\r\n function exception($q, logger) {\r\n var service = {\r\n catcher: catcher\r\n };\r\n return service;\r\n\r\n function catcher(message, suppressLogger) {\r\n return function (e) {\r\n var thrownDescription;\r\n var newMessage;\r\n if (e && e.data) {\r\n if(e.data.description)\r\n {\r\n thrownDescription = '\\n' + e.data.description;\r\n }\r\n else if (e.data.Message) {\r\n thrownDescription = '\\n' + e.data.Message;\r\n }\r\n else if (e.data.error_description) {\r\n thrownDescription = '\\n' + e.data.error_description;\r\n }\r\n else if (e.data.error) {\r\n thrownDescription = '\\n' + e.data.error;\r\n }\r\n newMessage = message + thrownDescription;\r\n e.data.description = newMessage;\r\n }\r\n if (!suppressLogger) {\r\n logger.error(newMessage || message);\r\n }\r\n return $q.reject(e);\r\n };\r\n }\r\n\r\n \r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.exception')\r\n .provider('exceptionHandler', exceptionHandlerProvider)\r\n .config(config);\r\n\r\n /**\r\n * Must configure the exception handling\r\n */\r\n function exceptionHandlerProvider() {\r\n /* jshint validthis:true */\r\n this.config = {\r\n appErrorPrefix: undefined\r\n };\r\n\r\n this.configure = function (appErrorPrefix) {\r\n this.config.appErrorPrefix = appErrorPrefix;\r\n };\r\n\r\n this.$get = function () {\r\n return { config: this.config };\r\n };\r\n }\r\n\r\n config.$inject = ['$provide'];\r\n\r\n /**\r\n * Configure by setting an optional string value for appErrorPrefix.\r\n * Accessible via config.appErrorPrefix (via config value).\r\n * @param {Object} $provide\r\n */\r\n /* @ngInject */\r\n function config($provide) {\r\n $provide.decorator('$exceptionHandler', extendExceptionHandler);\r\n }\r\n\r\n extendExceptionHandler.$inject = ['$delegate', 'exceptionHandler', 'logger'];\r\n\r\n /**\r\n * Extend the $exceptionHandler service to also display a toast.\r\n * @param {Object} $delegate\r\n * @param {Object} exceptionHandler\r\n * @param {Object} logger\r\n * @return {Function} the decorated $exceptionHandler service\r\n */\r\n function extendExceptionHandler($delegate, exceptionHandler, logger) {\r\n return function (exception, cause) {\r\n var appErrorPrefix = exceptionHandler.config.appErrorPrefix || '';\r\n var errorData = { exception: exception, cause: cause };\r\n exception.message = appErrorPrefix + exception.message;\r\n $delegate(exception, cause);\r\n /**\r\n * Could add the error to a service's collection,\r\n * add errors to $rootScope, log errors to remote web server,\r\n * or log locally. Or throw hard. It is entirely up to you.\r\n * throw exception;\r\n *\r\n * @example\r\n * throw { message: 'error message we added' };\r\n */\r\n logger.error(exception.message, errorData);\r\n };\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\n\n angular\r\n .module('blocks.filters')\r\n .filter('boolToYes', boolToYes);\r\n\r\n \r\n function boolToYes() {\r\n return function(input) {\r\n return input ? 'Yes' : '';\r\n }\r\n }\r\n\n})();\n\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.filters')\r\n .filter('noteDateDisplay', noteDateDisplay);\r\n\r\n\r\n function noteDateDisplay() {\r\n return function (input) {\r\n var local = moment.utc(input).toDate();\r\n return moment(local).format(\"MMM DD [at] hh:mm A\");\r\n }\r\n }\r\n\r\n})();\r\n\r\n","(function () {\r\n 'use strict';\n\n angular\r\n .module('blocks.filters')\r\n .filter('utcToLocal', utcToLocal)\r\n .filter('utcToLocalDate', utcToLocalDate);\r\n\r\n\r\n function utcToLocal() {\r\n return function (input) {\r\n var local = moment.utc(input).toDate();\r\n var r = moment(local).format(\"MM/DD/YYYY hh:mm A\");\r\n if (r === \"Invalid date\") {\r\n return \"\";\r\n }\r\n else {\r\n return r;\r\n }\r\n }\r\n }\r\n\r\n function utcToLocalDate() {\r\n return function (input) {\r\n var local = moment.utc(input).toDate();\r\n return moment(local).format(\"MM/DD/YYYY\");\r\n }\r\n }\r\n\n})();\n\n","(function () {\r\n 'use strict';\n\n angular\r\n .module('blocks.filters')\r\n .filter('utcToLocalTime', utcToLocalTime);\r\n\r\n\r\n function utcToLocalTime() {\r\n return function (input) {\r\n var local = moment.utc(input).toDate();\r\n return moment(local).format(\"hh:mm A\");\r\n }\r\n }\r\n\n})();\n\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.logger')\r\n .factory('logger', logger);\r\n\r\n logger.$inject = ['$log', 'toastr'];\r\n\r\n /* @ngInject */\r\n function logger($log, toastr) {\r\n var service = {\r\n showToasts: true,\r\n\r\n error: error,\r\n info: info,\r\n success: success,\r\n warning: warning,\r\n forceAcknowledge: forceAcknowledge,\r\n clearToast: clearToast,\r\n\r\n // straight to console; bypass toastr\r\n log: $log.log\r\n };\r\n\r\n return service;\r\n /////////////////////\r\n\r\n function error(message, data, title) {\r\n toastr.error(message, title);\r\n $log.error('Error: ' + message, data);\r\n }\r\n\r\n function info(message, data, title) {\r\n //toastr.info(message, title);\r\n $log.info('Info: ' + message, data);\r\n }\r\n\r\n function success(message, data, title) {\r\n toastr.success(message, title);\r\n $log.info('Success: ' + message, data);\r\n }\r\n\r\n function warning(message, data, title, show) {\r\n if (show) {\r\n toastr.warning(message, title);\r\n }\r\n \r\n $log.warn('Warning: ' + message, data);\r\n }\r\n\r\n var _forcedToast = null;\r\n function forceAcknowledge(message, data, title) {\r\n var cnfg = {\r\n \"closeButton\": true,\r\n \"newestOnTop\": false,\r\n \"preventDuplicates\": false,\r\n \"onclick\": null,\r\n \"showDuration\": \"300\",\r\n \"hideDuration\": \"1000\",\r\n \"timeOut\": \"0\",\r\n \"extendedTimeOut\": \"0\",\r\n \"showEasing\": \"swing\",\r\n \"hideEasing\": \"linear\",\r\n \"showMethod\": \"fadeIn\",\r\n \"hideMethod\": \"fadeOut\"\r\n }\r\n clearToast();\r\n _forcedToast = toastr.warning(message, title, cnfg);\r\n }\r\n\r\n function clearToast() {\r\n if (_forcedToast) {\r\n toastr.clear(_forcedToast);\r\n }\r\n _forcedToast = null;\r\n\r\n }\r\n\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.notifications')\r\n .factory('notifier', notifier);\r\n\r\n notifier.$inject = ['$rootScope'];\r\n\r\n /* @ngInject */\r\n function notifier($rootScope) {\r\n var service = {\r\n subscribe: subscribe,\r\n notify: notify,\r\n };\r\n\r\n return service;\r\n /////////////////////\r\n\r\n function subscribe(eventName, scope, callback) {\r\n var handler = $rootScope.$on(eventName, callback);\r\n scope.$on('$destroy', handler);\r\n }\r\n\r\n function notify(eventName, data) {\r\n $rootScope.$emit(eventName, data);\r\n }\r\n }\r\n}());\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('blocks.router')\r\n .provider('routerHelper', routerHelperProvider)\r\n .config(config);\r\n\r\n config.$inject = ['$provide'];\r\n\r\n /* @ngInject */\r\n function config($provide, opsIncludeVersion) {\r\n $provide.decorator('$browser', [\r\n '$delegate', function ($delegate) {\r\n\r\n var _baseHref = $delegate.baseHref,\r\n _url = $delegate.url;\r\n\r\n $delegate.baseHref = function () {\r\n return _baseHref().toLowerCase();\r\n };\r\n $delegate.url = function (url, replace) {\r\n // no need to modify the setter\r\n if (url) {\r\n return _url(url, replace);\r\n }\r\n // just lowercase the getter\r\n return _url().toLowerCase();\r\n };\r\n return $delegate;\r\n }\r\n ]);\r\n }\r\n\r\n routerHelperProvider.$inject = ['$locationProvider', '$stateProvider', '$urlRouterProvider'];\r\n /* @ngInject */\r\n function routerHelperProvider($locationProvider, $stateProvider, $urlRouterProvider) {\r\n /* jshint validthis:true */\r\n var config = {\r\n docTitle: undefined,\r\n resolveAlways: {}\r\n };\r\n\r\n $locationProvider.html5Mode(true);\r\n\r\n this.configure = function (cfg) {\r\n angular.extend(config, cfg);\r\n };\r\n\r\n this.$get = RouterHelper;\r\n RouterHelper.$inject = ['$location', '$rootScope', '$state', 'logger', 'userService', 'common'];\r\n /* @ngInject */\r\n function RouterHelper($location, $rootScope, $state, logger, userService, common) {\r\n var handlingStateChangeError = false;\r\n var hasOtherwise = false;\r\n var stateCounts = {\r\n errors: 0,\r\n changes: 0\r\n };\r\n\r\n var service = {\r\n configureStates: configureStates,\r\n getStates: getStates,\r\n stateCounts: stateCounts\r\n };\r\n\r\n init();\r\n\r\n return service;\r\n\r\n ///////////////\r\n\r\n function configureStates(states, otherwisePath) {\r\n states.forEach(function (state) {\r\n state.config.resolve =\r\n angular.extend(state.config.resolve || {}, config.resolveAlways);\r\n $stateProvider.state(state.state, state.config);\r\n });\r\n if (otherwisePath && !hasOtherwise) {\r\n hasOtherwise = true;\r\n $urlRouterProvider.otherwise(otherwisePath);\r\n }\r\n }\r\n\r\n function handleRoutingErrors() {\r\n // Route cancellation:\r\n // On routing error, go to the root.\r\n // Provide an exit clause if it tries to do it twice.\r\n $rootScope.$on('$stateChangeError',\r\n function (event, toState, toParams, fromState, fromParams, error) {\r\n \r\n if (handlingStateChangeError) {\r\n return;\r\n }\r\n if (error.name === 'NotAdmin') {\r\n $state.go('404');\r\n return;\r\n }\r\n if (error.name === 'AuthenticationRequired') {\r\n $state.go('login', { returnUrl: toState.name });\r\n return;\r\n }\r\n stateCounts.errors++;\r\n handlingStateChangeError = true;\r\n var destination = (toState &&\r\n (toState.title || toState.name || toState.loadedTemplateUrl)) ||\r\n 'unknown target';\r\n var msg = 'Error routing to ' + destination + '. ' +\r\n (error.data || '') + '.
' + (error.statusText || '') +\r\n ': ' + (error.status || '');\r\n logger.warning(msg, [toState]);\r\n $location.path('/');\r\n }\r\n );\r\n }\r\n\r\n function init() {\r\n handleRoutingErrors();\r\n updateDocTitle();\r\n }\r\n\r\n function getStates() { return $state.get(); }\r\n\r\n function updateDocTitle() {\r\n $rootScope.$on('$stateChangeSuccess',\r\n function (event, toState, toParams, fromState, fromParams) {\r\n stateCounts.changes++;\r\n handlingStateChangeError = false;\r\n var title = config.docTitle + ' ' + (toState.title || '');\r\n $rootScope.title = title; // data bind to \r\n $(\"html, body\").animate({ scrollTop: 0 }, 200);\r\n common.notifier.notify(common.config.events.stateChanged);\r\n }\r\n );\r\n }\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.reports')\r\n .controller('CompletionsByRangeController', CompletionsByRangeController);\r\n\r\n CompletionsByRangeController.$inject = ['$scope', '$stateParams', '$sce', 'common', 'dataservice', '$timeout' ];\r\n /* @ngInject */\r\n function CompletionsByRangeController($scope, $stateParams, $sce, common, dataservice, $timeout) {\r\n var vm = this;\r\n vm.title = \"Completions By Range\";\r\n vm.isLoading = true;\r\n vm.filters = {\r\n fromDate: new Date(),\r\n toDate: new Date()\r\n };\r\n\r\n vm.forDateOpen = false;\r\n vm.openDatePicker = openDatePicker;\r\n vm.generate = generate;\r\n \r\n vm.openDatePicker = openDatePicker;\r\n vm.dpStatus = {\r\n fromDateOpen: false,\r\n toDateOpen: false\r\n }\r\n\r\n vm.generated = false;\r\n\r\n\r\n vm.userService = common.userService;\r\n vm.bookingCompletionsGraphData = [];\r\n vm.bookingCompletionsGraphLabels = [];\r\n\r\n vm.bookingCompletionsByDepartmentGraphData = [];\r\n vm.bookingCompletionsByDepartmentGraphLabels = [];\r\n vm.bookingCompletionsByUserGraphData = [];\r\n vm.bookingCompletionsByUserGraphLabels = [];\r\n vm.taskCompletionsGraphData = [];\r\n vm.taskCompletionsGraphLabels = [];\r\n vm.taskCompletionsByDepartmentGraphData = [];\r\n vm.taskCompletionsByDepartmentGraphLabels = [];\r\n vm.taskCompletionsByUserGraphData = [];\r\n vm.taskCompletionsByUserGraphLabels = [];\r\n\r\n vm.logCompletionsGraphData = [];\r\n vm.logCompletionsGraphLabels = [];\r\n vm.logCompletionsByDepartmentGraphData = [];\r\n vm.logCompletionsByDepartmentGraphLabels = [];\r\n vm.logCompletionsByUserGraphData = [];\r\n vm.logCompletionsByUserGraphLabels = [];\r\n vm.chartOptions = {\r\n legend: { display: true, position: 'bottom' },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n var allData = data.datasets[tooltipItem.datasetIndex].data;\r\n var tooltipLabel = data.labels[tooltipItem.index];\r\n var tooltipData = allData[tooltipItem.index];\r\n var total = 0;\r\n for (var i in allData) {\r\n total += allData[i];\r\n }\r\n var tooltipPercentage = Math.round((tooltipData / total) * 100);\r\n return tooltipLabel + ': ' + tooltipPercentage + '%';\r\n }\r\n }\r\n }\r\n };\r\n\r\n activate();\r\n\r\n function activate() {\r\n \r\n var promises = []\r\n return common.$q.all(promises).then(function () {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n vm.isLoading = false;\r\n }, function (error) { });\r\n }\r\n\r\n function openDatePicker(isStart) {\r\n if (isStart) {\r\n vm.dpStatus.fromDateOpen = true;\r\n vm.dpStatus.toDateOpen = false;\r\n }\r\n else {\r\n vm.dpStatus.fromDateOpen = false;\r\n vm.dpStatus.toDateOpen = true;\r\n }\r\n\r\n }\r\n\r\n function generate() {\r\n var fromDate = moment(vm.filters.fromDate);\r\n var toDate = moment(vm.filters.toDate);\r\n \r\n\r\n return dataservice.getItems('api/AnalyticsReport/CompletionsByReport?localFromDate=' + fromDate.toISOString() + \"&localToDate=\" + toDate.toISOString())\r\n .then(function (response) {\r\n var data = response.data;\r\n vm.bookingCompletionsGraphData = data.BookingCompletionsGraphData;\r\n vm.bookingCompletionsGraphLabels = data.BookingCompletionsGraphLabels;\r\n vm.bookingCompletionsByDepartmentGraphData = data.BookingCompletionsByDepartmentGraphData;\r\n vm.bookingCompletionsByDepartmentGraphLabels = data.BookingCompletionsByDepartmentGraphLabels;\r\n vm.bookingCompletionsByUserGraphData = data.BookingCompletionsByUserGraphData;\r\n vm.bookingCompletionsByUserGraphLabels = data.BookingCompletionsByUserGraphLabels;\r\n vm.taskCompletionsGraphData = data.TaskCompletionsGraphData;\r\n vm.taskCompletionsGraphLabels = data.TaskCompletionsGraphLabels;\r\n vm.taskCompletionsByDepartmentGraphData = data.TaskCompletionsByDepartmentGraphData;\r\n vm.taskCompletionsByDepartmentGraphLabels = data.TaskCompletionsByDepartmentGraphLabels;\r\n vm.taskCompletionsByUserGraphData = data.TaskCompletionsByUserGraphData;\r\n vm.taskCompletionsByUserGraphLabels = data.TaskCompletionsByUserGraphLabels;\r\n\r\n vm.logCompletionsGraphData = data.LogCompletionsGraphData;\r\n vm.logCompletionsGraphLabels = data.LogCompletionsGraphLabels;\r\n vm.logCompletionsByDepartmentGraphData = data.LogCompletionsByDepartmentGraphData;\r\n vm.logCompletionsByDepartmentGraphLabels = data.LogCompletionsByDepartmentGraphLabels;\r\n vm.logCompletionsByUserGraphData = data.LogCompletionsByUserGraphData;\r\n vm.logCompletionsByUserGraphLabels = data.LogCompletionsByUserGraphLabels;\r\n vm.generated = true;\r\n }, function (error) { });\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.reports')\r\n .controller('EventCompletionsReportController', EventCompletionsReportController);\r\n\r\n EventCompletionsReportController.$inject = ['$window', 'common', 'dataservice', 'carousel.dialog', 'ReportFileBuilder'];\r\n /* @ngInject */\r\n function EventCompletionsReportController($window, common, dataservice, carouselDialog, reportFileBuilder) {\r\n var vm = this;\r\n vm.title = 'Event Completions Report';\r\n vm.filters = {\r\n fromDate: new Date(),\r\n toDate: new Date()\r\n };\r\n vm.items = [];\r\n vm.displayedItems = [].concat(vm.items);\r\n vm.openDatePicker = openDatePicker;\r\n vm.exportToExcel = exportToExcel;\r\n vm.exportToPdf = exportToPdf;\r\n \r\n vm.generated = false;\r\n vm.dpStatus = {\r\n fromDateOpen: false,\r\n toDateOpen: false\r\n };\r\n\r\n vm.generate = generate;\r\n\r\n activate();\r\n\r\n function activate() {\r\n vm.filters.forDate = new Date();\r\n var promises = [];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n\r\n function exportToExcel(id) {\r\n reportFileBuilder.exportToExcel(\"Events Completion Report\", id);\r\n }\r\n\r\n \r\n\r\n function exportToPdf(id) {\r\n reportFileBuilder.exportToPdf(\"Events Completion Report\", id, vm.filters);\r\n }\r\n\r\n function openDatePicker(isStart) {\r\n if (isStart) {\r\n vm.dpStatus.fromDateOpen = true;\r\n vm.dpStatus.toDateOpen = false;\r\n }\r\n else {\r\n vm.dpStatus.fromDateOpen = false;\r\n vm.dpStatus.toDateOpen = true;\r\n }\r\n\r\n }\r\n\r\n \r\n function generate() {\r\n vm.filters.fromDateLocalString = moment(vm.filters.fromDate).format(\"YYYY-MM-DD\");\r\n vm.filters.toDateLocalString = moment(vm.filters.toDate).format(\"YYYY-MM-DD\");\r\n\r\n return dataservice.query('api/Reports/EventCompletions', vm.filters).then(function (response) {\r\n vm.items = response.data;\r\n vm.generated = true;\r\n return vm.items;\r\n }, function (error) { });\r\n\r\n }\r\n\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.reports')\r\n .controller('DailyNotesReportController', DailyNotesReportController);\r\n\r\n DailyNotesReportController.$inject = ['$window', 'common', 'dataservice', 'carousel.dialog', 'ReportFileBuilder'];\r\n /* @ngInject */\r\n function DailyNotesReportController($window, common, dataservice, carouselDialog, reportFileBuilder) {\r\n var vm = this;\r\n vm.title = 'Notes Report';\r\n vm.filters = {\r\n fromDate: new Date(),\r\n toDate: new Date(),\r\n NoteTypes: []\r\n };\r\n vm.filterData = {\r\n NoteTypes: []\r\n };\r\n vm.items = [];\r\n vm.displayedItems = [].concat(vm.items);\r\n vm.forDateOpen = false;\r\n vm.openDatePicker = openDatePicker;\r\n vm.generate = generate;\r\n vm.showAttachment = showAttachment;\r\n vm.openDatePicker = openDatePicker;\r\n vm.exportToExcel = exportToExcel;\r\n vm.exportToPdf = exportToPdf;\r\n vm.dpStatus = {\r\n fromDateOpen: false,\r\n toDateOpen: false\r\n };\r\n\r\n vm.generated = false;\r\n vm.bookingIdText = bookingIdText;\r\n \r\n\r\n activate();\r\n\r\n function activate() {\r\n vm.filterData.NoteTypes.push({ ID: 2, Description: \"Task\" });\r\n vm.filterData.NoteTypes.push({ ID: 1, Description: \"Booking\" });\r\n var promises = [];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function bookingIdText(item) {\r\n if (item.BookingId == 0) {\r\n return \"\";\r\n }\r\n else {\r\n return item.BookingId;\r\n }\r\n }\r\n\r\n function openDatePicker(isStart) {\r\n if (isStart) {\r\n vm.dpStatus.fromDateOpen = true;\r\n vm.dpStatus.toDateOpen = false;\r\n }\r\n else {\r\n vm.dpStatus.fromDateOpen = false;\r\n vm.dpStatus.toDateOpen = true;\r\n }\r\n\r\n }\r\n\r\n function generate() {\r\n vm.generated = true;\r\n return dataservice.query('api/NotesReport/Report', vm.filters).then(function (response) {\r\n vm.items = response.data;\r\n return vm.items;\r\n }, function (error) { });\r\n }\r\n\r\n function exportToExcel(id) {\r\n reportFileBuilder.exportToExcel(\"Notes Report\", id, 7);\r\n }\r\n\r\n \r\n function exportToPdf(id) {\r\n reportFileBuilder.exportToPdf(\"Notes Report\", id, vm.filters);\r\n }\r\n\r\n function showAttachment(item) {\r\n var parentTypeId = 0;\r\n if (item.BookingId > 0) {\r\n parentTypeId = 4;\r\n }\r\n else {\r\n parentTypeId = 3;\r\n }\r\n \r\n\r\n dataservice.getItems('api/Attachments/GetForParentType/' + parentTypeId + '/' + item.ID).then(function (response) {\r\n return carouselDialog.display(response.data);\r\n }, function (error) { });\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.reports')\r\n .controller('DailyLogsReportController', DailyLogsReportController);\r\n\r\n DailyLogsReportController.$inject = ['$window', 'common', 'dataservice', 'carousel.dialog', 'ReportFileBuilder'];\r\n /* @ngInject */\r\n function DailyLogsReportController($window, common, dataservice, carouselDialog, reportFileBuilder) {\r\n var vm = this;\r\n vm.title = 'Daily Logs Report';\r\n vm.filters = {\r\n fromDate: new Date(),\r\n toDate: new Date()\r\n \r\n };\r\n vm.items = [];\r\n vm.displayedItems = [].concat(vm.items);\r\n vm.showAttachment = showAttachment;\r\n vm.openDatePicker = openDatePicker;\r\n vm.exportToExcel = exportToExcel;\r\n vm.exportToPdf = exportToPdf;\r\n vm.emailPdf = emailPdf;\r\n vm.generated = false;\r\n vm.dpStatus = {\r\n fromDateOpen: false,\r\n toDateOpen: false\r\n }\r\n vm.getSingleItemAnswerText = getSingleItemAnswerText;\r\n vm.formatDateTimeAnswer = formatDateTimeAnswer;\r\n vm.generate = generate;\r\n vm.selectedOnly = selectedOnly;\r\n vm.emailShowing = false;\r\n vm.showEmail = showEmail;\r\n /*\r\n vm.getHtmlForAuto = getHtmlForAuto; \r\n function getHtmlForAuto() {\r\n var d = moment(vm.filters.fromDate);\r\n\r\n dataservice.getItems('api/DailyLogs/GetHtmlForAuto?dateIso=' + d.format(\"YYYY-MM-DD\")).then(function (response) {\r\n console.log(response.data);\r\n });\r\n }\r\n */\r\n activate();\r\n\r\n function activate() {\r\n vm.filters.forDate = new Date();\r\n var promises = [getFilters()];\r\n return common.$q.all(promises).then(function (data) {\r\n common.logger.info('Activated ' + vm.title + ' View');\r\n }, function (error) { });\r\n }\r\n\r\n function _utcToLocal(input) {\r\n var local = moment.utc(input).toDate();\r\n return moment(local).format(\"MM/DD/YYYY hh:mm A\");\r\n }\r\n\r\n function exportToExcel(id) {\r\n\r\n var allowCompletions = vm.items[0].AllowCompletions;\r\n var reportTable = \"\";\r\n\r\n reportTable += '<table class=\"dailyLogTable responsiveTable table table-condensed table-striped\">'\r\n reportTable += '<thead><tr>';\r\n reportTable += '<th>Added By</th>';\r\n reportTable += '<th>Added At</th>';\r\n reportTable += '<th>Entry Title</th>';\r\n if (allowCompletions) {\r\n reportTable += '<th>Last Completion</th>';\r\n }\r\n \r\n\r\n var firstEntry = vm.items[0];\r\n for (var i = 0; i < firstEntry.Questions.length; i++) {\r\n var q = firstEntry.Questions[i];\r\n if (q.AnswerType !== 8) {\r\n reportTable += \"<th>\" + q.Question + \"</th>\";\r\n }\r\n }\r\n reportTable += \"</tr>\";\r\n reportTable += \"</thead>\";\r\n \r\n for (var i = 0; i < vm.items.length; i++) {\r\n var item = vm.items[i];\r\n reportTable += \"<tr>\";\r\n \r\n reportTable += \"<td>\" + item.UserName + \"</td>\";\r\n reportTable += \"<td>\" + _utcToLocal(item.DateAddedUtc) + \"</td>\";\r\n reportTable += \"<td>\" + item.Entry + \"</td>\";\r\n if (allowCompletions) {\r\n if (item.LastCompletion) {\r\n reportTable += \"<td>\" + item.LastCompletion + \"<br />by:\" + item.CompletedBy + \"<br/>at:\" + _utcToLocal(item.CompletedAtUtc) + \"</td > \";\r\n\r\n }\r\n else {\r\n reportTable += \"<td> </td>\";\r\n }\r\n }\r\n for (var j = 0; j < item.Questions.length; j++) {\r\n var q = item.Questions[j];\r\n reportTable += \"<td>\";\r\n switch (q.AnswerType) {\r\n case 1:\r\n case 2:\r\n reportTable += q.Answer;\r\n break;\r\n case 3:\r\n case 5:\r\n reportTable += getSingleItemAnswerText(q);\r\n break;\r\n case 4:\r\n for (var jj = 0; jj < q.Items.length; jj++) {\r\n if (q.Items[jj].Selected) {\r\n reportTable += q.Items[jj].Description + \"\\n\";\r\n }\r\n }\r\n break;\r\n case 6:\r\n reportTable += formatDateTimeAnswer(q.Answer, true);\r\n break;\r\n case 7:\r\n reportTable += formatDateTimeAnswer(q.Answer, false);\r\n break;\r\n\r\n }\r\n reportTable += \"</td>\";\r\n }\r\n\r\n reportTable += \"</tr>\";\r\n }\r\n reportTable += \"</table>\";\r\n\r\n reportFileBuilder.exportToExcel(_getFileName(''), id, null, reportTable);\r\n }\r\n\r\n \r\n\r\n function getSingleItemAnswerText(question) {\r\n var answer = question.Answer;\r\n for (var i = 0; i < question.Items.length; i++) {\r\n if (question.Items[i].ID == answer) {\r\n return question.Items[i].Description;\r\n }\r\n }\r\n return \"\";\r\n }\r\n\r\n function formatDateTimeAnswer(answer, isDate) {\r\n if (answer) {\r\n var m = moment(answer);\r\n if (isDate) {\r\n return m.format(\"L\");\r\n }\r\n else {\r\n return m.format(\"LT\");\r\n }\r\n }\r\n else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function selectedOnly(item) {\r\n return item.Selected;\r\n }\r\n\r\n function _getFileName(ext) {\r\n var logTypeDesc = \"\";\r\n for (var i = 0; i < vm.logTypes.length; i++) {\r\n if (vm.logTypes[i].ID == vm.filters.LogTypeId) {\r\n return vm.logTypes[i].Description + ext;\r\n }\r\n }\r\n }\r\n\r\n var _logReportName = \"\";\r\n\r\n function exportToPdf(id) {\r\n var docDefinition = _generatePdf();\r\n\r\n var pdf = pdfMake.createPdf(docDefinition).download(_logReportName);\r\n }\r\n\r\n function _getBrowser() {\r\n var userAgent = $window.navigator.userAgent;\r\n var browsers = { edge: /edge/i, chrome: /chrome/i, safari: /safari/i, firefox: /firefox/i, ie: /internet explorer/i };\r\n\r\n for (var key in browsers) {\r\n if (browsers[key].test(userAgent)) {\r\n return key;\r\n }\r\n }\r\n return \"unknown\";\r\n }\r\n\r\n function emailPdf() {\r\n\r\n var mailDto = {};\r\n mailDto.Recipients = [];\r\n if (vm.mailTo) {\r\n if (vm.mailTo.indexOf('@') > 0) {\r\n if (vm.mailTo.indexOf(',') > 0 && vm.mailTo.indexOf(';') > 0) {\r\n common.logger.error(\"Please use only a comma or a semicolon as seperators. Do not use a combination of both.\")\r\n return;\r\n }\r\n\r\n if (vm.mailTo.indexOf(',') > 0) {\r\n mailDto.Recipients = vm.mailTo.split(',');\r\n }\r\n\r\n if (vm.mailTo.indexOf(';') > 0) {\r\n mailDto.Recipients = vm.mailTo.split(';');\r\n }\r\n\r\n if(mailDto.Recipients.length == 0) {\r\n mailDto.Recipients.push(vm.mailTo);\r\n }\r\n }\r\n else {\r\n common.logger.error(\"You must supply an valid email to send the report to\");\r\n }\r\n }\r\n else {\r\n common.logger.error(\"You must supply an email to send the report to\");\r\n return;\r\n }\r\n\r\n var logType = \"\";\r\n\r\n for(var i = 0; i < vm.logTypes.length; i++) {\r\n if(vm.logTypes[i].ID == vm.filters.LogTypeId) {\r\n logType = vm.logTypes[i].Description;\r\n \r\n mailDto.HtmlBody = vm.logTypes[i].MessageHtml;\r\n break;\r\n }\r\n }\r\n \r\n mailDto.subject = logType + \" from \" + moment(vm.filters.fromDate).format(\"MM/DD/YYYY\") + \" to \" + moment(vm.filters.toDate).format(\"MM/DD/YYYY\");;\r\n \r\n var docDefinition = _generatePdf();\r\n pdfMake.createPdf(docDefinition).getBase64(function (encodedString) {\r\n \r\n mailDto.Attachments = [];\r\n var attach = {};\r\n attach.Base64Data = encodedString;\r\n attach.ContentType = \"application/pdf\";\r\n attach.FileName = logType + \".pdf\";\r\n mailDto.Attachments.push(attach);\r\n mailDto.LogTypeId = vm.filters.LogTypeId;\r\n\r\n dataservice.saveItem(\"api/Mail/SendMessage\", mailDto, false, \"Message Sent\").then(function (response) {\r\n vm.mailTo = \"\";\r\n vm.emailShowing = false;\r\n }, function (error) { });\r\n\r\n });\r\n \r\n }\r\n\r\n function showEmail($event) {\r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n vm.emailShowing = true;\r\n\r\n }\r\n\r\n function _generatePdf() {\r\n var allowCompletions = vm.displayedItems[0].AllowCompletions;\r\n\r\n var cols = [\r\n { text: \"Added By\", style: \"tableHeader\" },\r\n { text: \"Added At\", style: \"tableHeader\" },\r\n { text: \"Entry Title\", style: \"tableHeader\" },\r\n { text: \"Attachment\", style: \"tableHeader\" }\r\n ];\r\n\r\n if (allowCompletions) {\r\n cols.push({ text: \"Last Completion\", style: \"tableHeader\" });\r\n }\r\n \r\n var bodyObj = [\r\n cols\r\n ];\r\n\r\n for (var i = 0; i < vm.displayedItems.length; i++) {\r\n var item = vm.displayedItems[i];\r\n var row = [];\r\n \r\n row.push({ text: item.UserName, style: \"entryRow\" });\r\n row.push({ text: moment(moment.utc(item.DateAddedUtc).toDate()).format(\"L LT\"), style: \"entryRow\" });\r\n row.push({ text: item.Entry, style: \"entryRow\" });\r\n if (item.HasAttachment) {\r\n var cellContent = [];\r\n for (var j = 0; j < item.Attachments.length; j++) {\r\n if (item.Attachments[j].Base64Data) {\r\n cellContent.push({ image: \"data:image/png;base64,\" + item.Attachments[j].Base64Data });\r\n cellContent.push({ text: \"\", margin: [0, 3, 0, 0] });\r\n }\r\n else {\r\n cellContent.push({ text: \"Attachment Type not supported in PDF\", style: \"entryRow\" });\r\n }\r\n }\r\n row.push(cellContent);\r\n \r\n }\r\n else {\r\n row.push({ text: \"\", style: \"entryRow\" });\r\n }\r\n if (allowCompletions) {\r\n if (item.LastCompletion) {\r\n row.push({ text: item.LastCompletion + \"\\nby:\" + item.CompletedBy + \"\\nat:\" + _utcToLocal(item.CompletedAtUtc), style: \"entryRow\" });\r\n }\r\n else {\r\n row.push({ text: \"\", style: \"entryRow\" });\r\n }\r\n }\r\n \r\n bodyObj.push(row);\r\n\r\n var questions = [];\r\n for (var j = 0; j < item.Questions.length; j++) {\r\n var question = item.Questions[j];\r\n var questionStack = [];\r\n questionStack.push({ text: question.Question, margin: [10, 2, 0, 0], style: \"question\" })\r\n switch (question.AnswerType) {\r\n case 1:\r\n case 2:\r\n questionStack.push({ text: question.Answer ? question.Answer : '', margin: [20, 2, 0, 0], style: \"answer\" });\r\n break;\r\n case 5:\r\n case 3:\r\n questionStack.push({ text: getSingleItemAnswerText(question), margin: [20, 2, 0, 0], style: \"answer\" });\r\n break;\r\n case 6:\r\n questionStack.push({ text: formatDateTimeAnswer(question.Answer, true), margin: [20, 2, 0, 0], style: \"answer\" });\r\n break;\r\n case 7:\r\n questionStack.push({ text: formatDateTimeAnswer(question.Answer, false), margin: [20, 2, 0, 0], style: \"answer\" });\r\n break;\r\n case 4:\r\n for (var ii = 0; ii < question.Items.length; ii++) {\r\n var itemText = question.Items[ii].Description;\r\n if (question.Items[ii].Selected && item.IncludeEmptyResponses) {\r\n itemText = \"X - \" + itemText\r\n }\r\n \r\n if (question.Items[ii].Selected || item.IncludeEmptyResponses) {\r\n questionStack.push({ text: itemText, margin: [20, 2, 0, 0], style: \"answer\" });\r\n }\r\n }\r\n break;\r\n case 8:\r\n if (question.Answer) {\r\n questionStack.push({ image: question.Answer });\r\n }\r\n break;\r\n }\r\n questions.push(questionStack);\r\n }\r\n\r\n var detailRow = [{\r\n stack: [questions]\r\n , colSpan: cols.length\r\n }];\r\n\r\n bodyObj.push(detailRow);\r\n }\r\n\r\n\r\n var ws = [100, 125, \"*\", 250];\r\n if (allowCompletions) {\r\n ws.push(100);\r\n }\r\n\r\n var tableObj = {\r\n headerRows: 1,\r\n widths: ws,\r\n body: bodyObj,\r\n dontBreakRows: false\r\n };\r\n\r\n var docHeader = _getFileName('') + \" - \";\r\n docHeader += moment(vm.filters.fromDate).format(\"MM/DD/YYYY\") + \" - \" + moment(vm.filters.toDate).format(\"MM/DD/YYYY\");\r\n _logReportName = docHeader + \".pdf\";\r\n var docDefinition = {\r\n title: 'Log Report',\r\n header: { text: docHeader, margin: [3, 3, 0, 0] },\r\n footer: function (currentPage, pageCount) { return { text: currentPage.toString() + ' of ' + pageCount, alignment: 'right', margin: [0, 0, 5, 0] }; },\r\n pageOrientation: 'landscape',\r\n content: [\r\n {\r\n table: tableObj,\r\n layout: 'noBorders'\r\n }\r\n ],\r\n styles: {\r\n tableHeader: { fontSize: 16, bold: true },\r\n entryRow: { fillColor: '#dedede' },\r\n question: { fontSize: 12, bold: true },\r\n answer: { italics: true }\r\n }\r\n };\r\n return docDefinition;\r\n }\r\n\r\n \r\n function openDatePicker(isStart) {\r\n if (isStart) {\r\n vm.dpStatus.fromDateOpen = true;\r\n vm.dpStatus.toDateOpen = false;\r\n }\r\n else {\r\n vm.dpStatus.fromDateOpen = false;\r\n vm.dpStatus.toDateOpen = true;\r\n }\r\n\r\n }\r\n\r\n function showAttachment(item) {\r\n dataservice.getItems('api/Attachments/GetForParentType/8/' + item.ID).then(function (response) {\r\n return carouselDialog.display(response.data);\r\n }, function (error) { });\r\n }\r\n\r\n function getFilters() {\r\n return dataservice.getItems('api/LogTypes').then(function (response) {\r\n var data = response.data;\r\n var filterd = [];\r\n for (var i = 0; i < data.length; i++) {\r\n if (data[i].Active) {\r\n filterd.push(data[i]);\r\n }\r\n }\r\n vm.logTypes = filterd;\r\n return vm.logTypes;\r\n }, function (error) {\r\n console.log(\"Error in getFilters()\");\r\n console.log(error);\r\n });\r\n }\r\n\r\n function generate() {\r\n vm.generated = true;\r\n vm.filters.fromDateLocalString = moment(vm.filters.fromDate).format(\"YYYY-MM-DD\");\r\n vm.filters.toDateLocalString = moment(vm.filters.toDate).format(\"YYYY-MM-DD\");\r\n\r\n return dataservice.query('api/DailyLogs/Report', vm.filters).then(function (response) {\r\n vm.items = response.data;\r\n return vm.items;\r\n }, function (error) { });\r\n\r\n }\r\n\r\n }\r\n})();\r\n"]}