{"version":3,"sources":["app.js","filters/unsafe.js","interceptors/loaderInterceptor.js","services/loaderService.js","services/locationsService.js","services/servicePointsService.js","services/serviceRequestsService.js","services/serviceRequestStatusesService.js","services/storageService.js","services/utilityService.js","views/layout.js","views/blocks/servicelistblock/index.js","views/pages/formspage/index.js","views/pages/qrcodepage/index.js","views/pages/startpagecontainer/index.js","views/pages/statuspage/index.js","sidebar.js","cookies.js","footer.js"],"names":["angular","module","config","$httpProvider","$locationProvider","interceptors","push","html5Mode","enabled","requireBase","hashPrefix","element","document","ready","bootstrap","filter","$sce","val","trustAsHtml","factory","$q","$rootScope","$timeout","loaderService","request","onRequest","when","requestError","rejection","onResponse","reject","response","responseError","service","timer","pendingRequests","this","loading","disabled","self","cancel","$http","search","options","post","searchFloors","searchRooms","get","id","Upload","serviceRequest","attachment","upload","url","data","json","charAt","substr","$window","storage","localStorage","setItem","key","value","JSON","stringify","getItem","item","parse","removeItem","decode","s","decodeURIComponent","replace","pl","match","query","window","location","substring","queryString","exec","getQueryStringParameter","controller","$scope","vm","closeAll","event","target","closest","subMenuIsOpened","className","isSearchOpened","isUserContainerOpened","$watch","newValue","setItemMaxHeight","itemBodyId","body","getElementById","height","i","children","length","$","outerHeight","style","maxHeight","utilityService","storageService","serviceRequestStatusesService","locationsService","servicePointsService","serviceRequestsService","page","vcRecaptchaService","hideForm","submittingForm","acceptGdrp","successCreateServiceRequest","errorCreateServiceRequest","errorGetLocationsNotFound","errorGetLocationsServiceUnavailable","errorGetLocationsError","errorMessage","undefined","newServiceRequest","AdditionalFields","customers","locations","locationsFilter","services","subServices","faultReportServices","SubId","Id","orderServices","workTypes","additionalFields","faultReportAdditionalFields","orderAdditionalFields","usePredefinedLocations","receiverId","descriptionMandatory","phoneNumberMandatory","namePreference","receiverServicesEnabled","qs","workType","testMode","storedValues","customerId","locationId","name","email","phone","storeValues","getNextLocationLevel","currentLevel","locationLevels","level","getLocationLevelHierarchy","list","foundLocation","findLocationLevel","Children","splice","ParentId","getNextLocations","currentLocationLevel","currentParentId","addAllDecendants","isCurrentLevel","Level","getLocations","CustomerId","ReceiverId","PhoneNumberMandatory","NamePreference","FilterLocationIds","setCustomerLevelLocations","locationLevel","parentId","selectedLocation","nextLocationLevel","levelLocationChanged","setServiceRequestLocation","LocationId","AssetSiteId","SiteId","AssetOrganizationId","workTypeChanged","subService","workTypeId","WorkType","Name","ServiceId","ServiceName","serviceChanged","Label","initAdditionalFields","customerChanged","customer","deferred","defer","required","requiredLocationLevel","resetLocationLevels","resolve","then","handleGetLocationsError","promise","parentLocations","isFirst","parentLocationLevel","j","Type","LocationBuildingId","updateLocationChildren","LocationFloorId","newChildren","status","recaptchaSetResponse","recaptcha","hasResponse","RecaptchaResponse","userFullName","Email","userEmail","Phone","userPhone","showCustomerOptions","showLocationOptions","subServiceChanged","createServiceRequest","firstInvalidElement","top","createServiceRequestForm","$valid","visible","$setUntouched","$setPristine","createdServiceRequest","scrollTo","behavior","Message","execute","widgetId","parentOffset","first","parent","offset","focus","TestMode","toLowerCase","recaptchaEnabled","recaptchaSiteKey","recaptchaVisible","setWidgetId","setResponse","reload","detailsRequired","errorNotFound","errorServiceUnavailable","errorGeneral","useDefaultService","locationPath","assets","problemDescriptions","selectedAssetsChanged","asset","problemDescription","selectedAssets","assetId","assetIndex","indexOf","assetAndProblemDescriptionId","problemDescriptionIndex","Assets","ProblemDescriptionIds","setDetailsRequired","assetsChanged","selectedProblemDescriptionsChanged","notFound","hri","servicePoint","Hri","AssetId","customerName","CustomerName","Path","ProblemDescriptions","serviceRequestStatus","success","getServiceRequestStatus","on","e","toggleClass","dataLayer","observerCallbacks","showCookieSettings","toggleCookieSettingsChanged","callback","toggleCookieSettings","forEach","$cookies","cookies","cookieContainerLoaded","cookieName","acceptedCookies","getCookie","acceptedCookiesCopy","copy","showCookieInfo","hasAcceptedCookies","acceptCookies","accepted","cookie","additionalCookies","expires","Date","setFullYear","getFullYear","put","path","cookieThirdparty","updateCookieSettings","cancelCookieSettings","currentAcceptedC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B,WACxBlP,GAAGgO,gBAAkBrT,QAAQwT,KAAKD,qBAClCL,QAAQH,wBAYV,SAASO,YACP,IAAIkB,yBAA2BvB,SAASlQ,IAAIqQ,YACxCqB,sBAAwB,KAK5B,MAAO,CACLf,mBAC2B,OAL3Be,sBAD8B,MAA5BD,yBACsBxQ,KAAKI,MAAMoQ,0BAKjCC,wBACIA,sBAAsBf,mBAE5BI,kBAC2B,MAAzBW,uBACIA,sBAAsBX,mBAhBhCZ,QAAQL,4BAP4B,WAC7BxN,GAAGuN,qBACNvN,GAAGgO,gBAAkBC,YACrBC,oBAAsBvT,QAAQwT,KAAKnO,GAAGgO,kBAExChO,GAAGuN,mBAAqBM,QAAQN,wBAvEtC;CCFA,wBAEI5S,QAAQC,OAAO,OAAOkF,WAAW,gBAAiB,CAAC,UAEnD,SAAoB+N,SACP9Q,KAEN2Q,qBAAuB,WACtBG,QAAQH,2BARpB","file":"app.js","sourcesContent":["(function () {\r\n 'use strict';\r\n angular.module('app', ['ngMessages', 'ngFileUpload', 'vcRecaptcha', 'ngCookies'])\r\n .config(function ($httpProvider, $locationProvider) {\r\n $httpProvider.interceptors.push('loaderInterceptor');\r\n $locationProvider.html5Mode({ enabled: true, requireBase: false }).hashPrefix('!');\r\n });\r\n angular.element(document)\r\n .ready(function () {\r\n angular.bootstrap(document, ['app']);\r\n });\r\n})();","angular.module('app').filter('unsafe', function ($sce) {\r\n return function(val) {\r\n return $sce.trustAsHtml(val);\r\n }\r\n});","angular.module('app')\r\n .factory('loaderInterceptor', function ($q, $rootScope, $timeout, loaderService) {\r\n return {\r\n 'request': function (config) {\r\n loaderService.onRequest();\r\n return config || $q.when(config);\r\n },\r\n 'requestError': function (rejection) {\r\n loaderService.onResponse();\r\n return $q.reject(rejection);\r\n },\r\n 'response': function (response) {\r\n loaderService.onResponse();\r\n return response || $q.when(response);\r\n },\r\n 'responseError': function (rejection) {\r\n loaderService.onResponse();\r\n return $q.reject(rejection);\r\n }\r\n };\r\n });","angular.module('app').service('loaderService', function ($timeout) {\r\n var timer = null;\r\n var wait = 1000;\r\n var pendingRequests = 0;\r\n\r\n this.loading = false;\r\n this.disabled = false;\r\n\r\n this.onRequest = function () {\r\n pendingRequests++;\r\n\r\n var self = this;\r\n timer = $timeout(function () {\r\n self.loading = !self.disabled && pendingRequests > 0;\r\n }, wait);\r\n }\r\n\r\n this.onResponse = function () {\r\n pendingRequests--;\r\n\r\n if (timer) {\r\n $timeout.cancel(timer);\r\n }\r\n\r\n this.loading = !this.disabled && pendingRequests > 0;\r\n }\r\n});","angular.module('app').service('locationsService', function ($http) {\r\n this.search = function (options) {\r\n var url = \"/api/locations/search\";\r\n return $http.post(url, options);\r\n };\r\n\r\n this.searchFloors = function (options) {\r\n var url = \"/api/locations/floors/search\";\r\n return $http.post(url, options);\r\n };\r\n\r\n this.searchRooms = function (options) {\r\n var url = \"/api/locations/rooms/search\";\r\n return $http.post(url, options);\r\n };\r\n});","angular.module('app').service('servicePointsService', function ($http) {\r\n this.get = function (id) {\r\n return $http.get(\"/api/servicepoints/\" + id);\r\n };\r\n});","angular.module('app').service('serviceRequestsService', function ($http, Upload) {\r\n this.post = function (serviceRequest, attachment) {\r\n return Upload.upload({\r\n url: '/api/servicerequests/post',\r\n data: { serviceRequest: Upload.json(serviceRequest), attachment: attachment }\r\n });\r\n };\r\n});","angular.module('app').service('serviceRequestStatusesService', function ($http) {\r\n this.get = function (id) {\r\n if (id.charAt(0) === '#') {\r\n id = id.substr(1);\r\n }\r\n return $http.get(\"/api/servicerequeststatuses/\" + id);\r\n };\r\n});","angular.module('app').service('storageService', function ($window) {\r\n var storage = $window.localStorage;\r\n\r\n this.setItem = function (key, value) {\r\n if (value) {\r\n storage && storage.setItem(key, JSON.stringify(value));\r\n }\r\n }\r\n\r\n this.getItem = function (key) {\r\n var item = storage && storage.getItem(key);\r\n return JSON.parse(item);\r\n }\r\n\r\n this.removeItem = function (key) {\r\n return storage && storage.removeItem(key);\r\n }\r\n});","angular.module('app').service('utilityService', function () {\r\n var match,\r\n pl = /\\+/g,\r\n search = /([^&=]+)=?([^&]*)/g,\r\n decode = function (s) { return decodeURIComponent(s.replace(pl, \" \")); },\r\n query = window.location.search.substring(1);\r\n var queryString = {};\r\n while ((match = search.exec(query))) {\r\n queryString[decode(match[1])] = decode(match[2]);\r\n }\r\n\r\n this.getQueryStringParameter = function (key) {\r\n return queryString[key];\r\n }\r\n});\r\n","(function () {\r\n 'use strict';\r\n angular.module('app').controller('layout', controller);\r\n\r\n function controller($scope, loaderService) {\r\n var vm = this;\r\n\r\n vm.loading = false; \r\n vm.closeAll = closeAll; \r\n\r\n $scope.$watch(function () {\r\n return loaderService.loading;\r\n }, function (newValue) {\r\n vm.loading = newValue;\r\n });\r\n\r\n function closeAll(event) {\r\n if (event.target.closest('.has-sublevel') == null && event.target.closest('.minimenu') == null)\r\n vm.subMenuIsOpened = false;\r\n if (event.target.className != 'button--toggle-search' && event.target.closest('.search') == null)\r\n vm.isSearchOpened = false;\r\n if (event.target.className != 'button--user' && event.target.closest('.user__info') == null)\r\n vm.isUserContainerOpened = false; \r\n }; \r\n }\r\n})()","(function () {\r\n 'use strict';\r\n angular.module('app').controller('blocks.servicelistblock.index', controller);\r\n\r\n function controller() {\r\n var vm = this;\r\n\r\n vm.setItemMaxHeight = setItemMaxHeight;\r\n\r\n function setItemMaxHeight(itemBodyId) {\r\n var body = document.getElementById(itemBodyId);\r\n var height = 0;\r\n\r\n for (var i = 0; i < body.children.length; i++) {\r\n height = height + $(body.children[i]).outerHeight(true);\r\n } \r\n\r\n if (body.style.maxHeight == 0 || body.style.maxHeight == \"0px\") {\r\n body.style.maxHeight = height + \"px\";\r\n }\r\n else {\r\n body.style.maxHeight = 0; \r\n }\r\n }; \r\n }\r\n})()","(function () {\r\n 'use strict';\r\n angular.module('app').controller('pages.formspage.index', controller);\r\n\r\n function controller($scope, $q, utilityService, storageService, serviceRequestStatusesService, locationsService, servicePointsService, serviceRequestsService, page, vcRecaptchaService, $window) {\r\n var vm = this;\r\n vm.hideForm = false;\r\n vm.submittingForm = false;\r\n vm.acceptGdrp = false;\r\n vm.successCreateServiceRequest = false;\r\n vm.errorCreateServiceRequest = false;\r\n vm.errorGetLocationsNotFound = false;\r\n vm.errorGetLocationsServiceUnavailable = false;\r\n vm.errorGetLocationsError = false;\r\n vm.errorMessage = undefined;\r\n\r\n vm.newServiceRequest = {};\r\n vm.newServiceRequest.AdditionalFields = [];\r\n\r\n vm.customers = page.customers;\r\n vm.locations = page.locations;\r\n vm.locationsFilter = page.locationsFilter;\r\n vm.services = [];\r\n vm.subServices = [];\r\n\r\n vm.faultReportServices = page.faultReportServices.filter(s => s.SubId == null);\r\n for (var i = 0; i < vm.faultReportServices.length; i++) {\r\n vm.faultReportServices[i].subServices = page.faultReportServices.filter(s => s.Id == vm.faultReportServices[i].Id && s.SubId != null);\r\n }\r\n\r\n vm.orderServices = page.orderServices.filter(s => s.SubId == null);\r\n for (var i = 0; i < vm.orderServices.length; i++) {\r\n vm.orderServices[i].subServices = page.orderServices.filter(s => s.Id == vm.orderServices[i].Id && s.SubId != null);\r\n }\r\n\r\n vm.workTypes = page.workTypes;\r\n vm.additionalFields = [];\r\n vm.faultReportAdditionalFields = page.faultReportAdditionalFields;\r\n vm.orderAdditionalFields = page.orderAdditionalFields;\r\n vm.usePredefinedLocations = vm.locations.length > 0;\r\n vm.receiverId = page.receiverId;\r\n vm.descriptionMandatory = page.descriptionMandatory;\r\n vm.phoneNumberMandatory = page.phoneNumberMandatory;\r\n vm.namePreference = page.namePreference;\r\n vm.receiverServicesEnabled = page.receiverServicesEnabled;\r\n\r\n var qs = {\r\n workType: utilityService.getQueryStringParameter(\"wt\"),\r\n testMode: utilityService.getQueryStringParameter(\"testmode\")\r\n };\r\n\r\n var storedValues = {\r\n customerId: storageService.getItem(\"serviceRequest-CustomerId\"),\r\n locationId: storageService.getItem(\"serviceRequest-LocationId\"),\r\n name: storageService.getItem(\"serviceRequest-Name\"),\r\n email: storageService.getItem(\"serviceRequest-Email\"),\r\n phone: storageService.getItem(\"serviceRequest-Phone\"),\r\n storeValues: storageService.getItem(\"serviceRequest-StoreValues\")\r\n };\r\n\r\n vm.storeValues = storedValues.storeValues || false;\r\n\r\n vm.newServiceRequest.Name = storedValues.name || page.userFullName || undefined;\r\n vm.newServiceRequest.Email = storedValues.email || page.userEmail || undefined;\r\n vm.newServiceRequest.Phone = storedValues.phone || page.userPhone || undefined;\r\n\r\n vm.showCustomerOptions = true;\r\n vm.showLocationOptions = true;\r\n\r\n vm.workTypeChanged = workTypeChanged;\r\n vm.customerChanged = customerChanged;\r\n vm.serviceChanged = serviceChanged;\r\n vm.subServiceChanged = subServiceChanged;\r\n vm.getLocations = getLocations;\r\n vm.levelLocationChanged = levelLocationChanged;\r\n vm.createServiceRequest = createServiceRequest;\r\n\r\n (function () {\r\n if (qs.testMode) {\r\n vm.newServiceRequest.TestMode = true;\r\n }\r\n\r\n if (vm.workTypes.length === 1) {\r\n workTypeChanged(vm.workTypes[0]);\r\n } else if (qs.workType) {\r\n for (var i = 0; i < vm.workTypes.length; i++) {\r\n if (vm.workTypes[i].Id.toLowerCase() === qs.workType.toLowerCase()) {\r\n workTypeChanged(vm.workTypes[i]);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (vm.customers.length === 1) {\r\n customerChanged(vm.customers[0]);\r\n }\r\n else if (storedValues.customerId) {\r\n for (var j = 0; j < vm.customers.length; j++) {\r\n if (vm.customers[j].Id === storedValues.customerId) {\r\n customerChanged(vm.customers[j]);\r\n break;\r\n }\r\n }\r\n }\r\n vm.showCustomerOptions = vm.customers.length > 1;\r\n })();\r\n\r\n vm.recaptcha = {\r\n enabled: page.recaptchaEnabled,\r\n key: page.recaptchaSiteKey,\r\n visible: page.recaptchaVisible,\r\n widgetId: null,\r\n response: null,\r\n setWidgetId: recaptchaSetWidgetId,\r\n setResponse: recaptchaSetResponse,\r\n reload: recaptchaReload\r\n };\r\n\r\n function initAdditionalFields(additionalFields) {\r\n vm.newServiceRequest.AdditionalFields = [];\r\n for (var i = 0; i < additionalFields.length; i++) {\r\n vm.newServiceRequest.AdditionalFields[i] = { Label: additionalFields[i].Label };\r\n }\r\n };\r\n\r\n function resetLocationLevels(locationLevels) {\r\n var list = [];\r\n for (var i = 0; i < locationLevels.length; i++) {\r\n list.push({\r\n name: locationLevels[i].Name,\r\n level: locationLevels[i].Level,\r\n required: locationLevels[i].Level <= page.requiredLocationLevel,\r\n locations: [],\r\n selectedLocation: undefined\r\n });\r\n }\r\n return list;\r\n };\r\n\r\n function getNextLocationLevel(currentLevel, locationLevels) {\r\n for (var i = 0; i < locationLevels.length; i++) {\r\n if (locationLevels[i].level > currentLevel) {\r\n return locationLevels[i];\r\n }\r\n }\r\n return undefined;\r\n };\r\n\r\n function getLocationLevelHierarchy(locationId, locationLevels, list) {\r\n var foundLocation = findLocationLevel(locationId, locationLevels);\r\n if (!foundLocation) return list;\r\n\r\n list.splice(0, 0, foundLocation);\r\n if (foundLocation.ParentId) {\r\n getLocationLevelHierarchy(foundLocation.ParentId, locationLevels, list);\r\n }\r\n return list;\r\n };\r\n\r\n function findLocationLevel(locationId, locationLevels) {\r\n if (locationLevels === undefined || locationLevels === null) {\r\n return undefined;\r\n }\r\n for (var i = 0; i < locationLevels.length; i++) {\r\n if (locationLevels[i].Id === locationId) {\r\n return locationLevels[i];\r\n }\r\n\r\n var foundLocation = findLocationLevel(locationId, locationLevels[i].Children);\r\n if (foundLocation) {\r\n return foundLocation;\r\n }\r\n }\r\n return undefined;\r\n };\r\n\r\n function getNextLocations(locations, currentLocationLevel, currentParentId, list, addAllDecendants) {\r\n if (locations) {\r\n for (var i = 0; i < locations.length; i++) {\r\n var isCurrentLevel = locations[i].Level === currentLocationLevel.level;\r\n if (currentParentId) {\r\n addAllDecendants = addAllDecendants || locations[i].ParentId === currentParentId;\r\n if (addAllDecendants && isCurrentLevel) {\r\n list.push(locations[i]);\r\n }\r\n getNextLocations(locations[i].Children, currentLocationLevel, currentParentId, list, addAllDecendants);\r\n } else {\r\n if (isCurrentLevel) {\r\n list.push(locations[i]);\r\n } else {\r\n getNextLocations(locations[i].Children, currentLocationLevel, currentParentId, list, false);\r\n }\r\n }\r\n }\r\n };\r\n return list;\r\n };\r\n\r\n function getLocations(customerId) {\r\n var data = {\r\n CustomerId: customerId,\r\n ReceiverId: vm.receiverId,\r\n PhoneNumberMandatory: vm.phoneNumberMandatory,\r\n NamePreference: vm.namePreference,\r\n FilterLocationIds: vm.locationsFilter\r\n };\r\n return locationsService.search(data);\r\n };\r\n\r\n function setCustomerLevelLocations(customerId, locationLevel, locations, parentId) {\r\n if (locationLevel === undefined || locationLevel === null) {\r\n return;\r\n }\r\n locationLevel.selectedLocation = undefined;\r\n\r\n var list = [];\r\n locationLevel.locations = getNextLocations(locations, locationLevel, parentId, list, false);\r\n\r\n var nextLocationLevel = getNextLocationLevel(locationLevel.level, vm.locationLevels);\r\n while (nextLocationLevel) {\r\n nextLocationLevel.locations = [];\r\n nextLocationLevel.selectedLocation = undefined;\r\n nextLocationLevel = getNextLocationLevel(nextLocationLevel.level, vm.locationLevels);\r\n }\r\n if (locationLevel.locations.length === 1) {\r\n locationLevel.selectedLocation = locationLevel.locations[0];\r\n levelLocationChanged(locationLevel.locations[0]);\r\n }\r\n };\r\n\r\n function setServiceRequestLocation(serviceRequest, location) {\r\n if (!location) return;\r\n\r\n serviceRequest.LocationId = location.Id;\r\n serviceRequest.AssetSiteId = location.SiteId;\r\n serviceRequest.AssetOrganizationId = location.AssetOrganizationId;\r\n };\r\n\r\n function workTypeChanged(workType) {\r\n if (!workType) return;\r\n\r\n vm.service = null;\r\n vm.subService = null;\r\n vm.workTypeId = workType.Id;\r\n vm.newServiceRequest.WorkType = workType.Name;\r\n vm.newServiceRequest.ServiceId = undefined;\r\n vm.newServiceRequest.ServiceName = undefined;\r\n\r\n if (workType.Id === \"FAULT_REPORT\") {\r\n vm.services = vm.faultReportServices;\r\n if (vm.faultReportServices.length === 1) {\r\n serviceChanged(vm.faultReportServices[0]);\r\n }\r\n vm.subServices = [];\r\n vm.additionalFields = vm.faultReportAdditionalFields;\r\n } else if (workType.Id === \"ORDER\") {\r\n vm.services = vm.orderServices;\r\n if (vm.orderServices.length === 1) {\r\n serviceChanged(vm.orderServices[0]);\r\n }\r\n vm.subServices = [];\r\n vm.additionalFields = vm.orderAdditionalFields;\r\n }\r\n else {\r\n vm.services = [];\r\n vm.subServices = [];\r\n vm.additionalFields = [];\r\n }\r\n initAdditionalFields(vm.additionalFields);\r\n };\r\n\r\n function customerChanged(customer) {\r\n if (!customer) return;\r\n\r\n vm.customer = customer;\r\n vm.newServiceRequest.CustomerId = customer.Id;\r\n vm.newServiceRequest.LocationId = undefined;\r\n vm.newServiceRequest.AssetSiteId = undefined;\r\n vm.newServiceRequest.AssetOrganizationId = undefined;\r\n\r\n var deferred = $q.defer();\r\n\r\n vm.locationLevels = resetLocationLevels(page.locationLevels);\r\n if (vm.usePredefinedLocations) {\r\n deferred.resolve();\r\n }\r\n else {\r\n if (vm.receiverServicesEnabled) {\r\n getLocations(vm.newServiceRequest.CustomerId).then(\r\n function (response) {\r\n vm.locations = response.data;\r\n deferred.resolve();\r\n },\r\n function (response) {\r\n handleGetLocationsError(response);\r\n deferred.reject();\r\n });\r\n }\r\n }\r\n\r\n deferred.promise.then(function () {\r\n if (storedValues.locationId) {\r\n var parentLocations = getLocationLevelHierarchy(storedValues.locationId, vm.locations, []);\r\n if (parentLocations.length === 0) {\r\n setCustomerLevelLocations(vm.newServiceRequest.CustomerId, vm.locationLevels[0], vm.locations);\r\n }\r\n\r\n var isFirst = true;\r\n for (var i = 0; i < parentLocations.length; i++) {\r\n var parentLocationLevel = undefined;\r\n for (var j = 0; j < vm.locationLevels.length; j++) {\r\n if (vm.locationLevels[j].level === parentLocations[i].Level) {\r\n parentLocationLevel = vm.locationLevels[j];\r\n }\r\n }\r\n\r\n if (!parentLocationLevel) continue;\r\n parentLocationLevel.locations = getNextLocations(vm.locations, parentLocationLevel, parentLocations[i].ParentId, [], isFirst);\r\n parentLocationLevel.selectedLocation = parentLocations[i];\r\n\r\n setServiceRequestLocation(vm.newServiceRequest, parentLocations[i]);\r\n\r\n isFirst = false;\r\n }\r\n } else {\r\n setCustomerLevelLocations(vm.newServiceRequest.CustomerId, vm.locationLevels[0], vm.locations);\r\n }\r\n });\r\n };\r\n\r\n function serviceChanged(service) {\r\n if (!service) return;\r\n\r\n vm.subServices = service.subServices || [];\r\n if (vm.subServices.length < 0) return;\r\n\r\n vm.newServiceRequest.ServiceId = service.Id;\r\n vm.newServiceRequest.ServiceName = service.Name;\r\n };\r\n\r\n function subServiceChanged(subService) {\r\n if (!subService) return;\r\n\r\n vm.newServiceRequest.ServiceId = subService.SubId;\r\n vm.newServiceRequest.ServiceName = subService.Name;\r\n };\r\n\r\n function levelLocationChanged(location) {\r\n if (!location) return;\r\n\r\n setServiceRequestLocation(vm.newServiceRequest, location);\r\n\r\n var nextLocationLevel = getNextLocationLevel(location.Level, vm.locationLevels);\r\n if (!nextLocationLevel) return;\r\n\r\n var data = {\r\n CustomerId: vm.newServiceRequest.CustomerId,\r\n ReceiverId: vm.receiverId,\r\n SiteId: location.SiteId,\r\n ParentId: location.Id,\r\n FilterLocationIds: vm.locationsFilter,\r\n NamePreference: vm.namePreference\r\n };\r\n\r\n if (location.Type === 'BUILDING') {\r\n vm.newServiceRequest.LocationBuildingId = location.Id;\r\n locationsService.searchFloors(data).then(function (response) {\r\n updateLocationChildren(vm.locations, location.Id, response.data);\r\n setCustomerLevelLocations(vm.newServiceRequest.CustomerId, nextLocationLevel, vm.locations, location.Id);\r\n }, function (response) {\r\n handleGetLocationsError(response);\r\n });\r\n }\r\n if (location.Type === 'FLOOR') {\r\n vm.newServiceRequest.LocationFloorId = location.Id;\r\n locationsService.searchRooms(data).then(function (response) {\r\n updateLocationChildren(vm.locations, location.Id, response.data);\r\n setCustomerLevelLocations(vm.newServiceRequest.CustomerId, nextLocationLevel, vm.locations, location.Id);\r\n }, function (response) {\r\n handleGetLocationsError(response);\r\n });\r\n }\r\n else {\r\n setCustomerLevelLocations(vm.newServiceRequest.CustomerId, nextLocationLevel, vm.locations, location.Id);\r\n }\r\n };\r\n\r\n function updateLocationChildren(locations, parentId, newChildren) {\r\n if (locations) {\r\n for (var i = 0; i < locations.length; i++) {\r\n if (locations[i].Id === parentId) {\r\n for (var j = 0; j < newChildren.length; j++) {\r\n newChildren[j].Level = locations[i].Level + 1;\r\n }\r\n locations[i].Children = newChildren;\r\n break;\r\n }\r\n updateLocationChildren(locations[i].Children, parentId, newChildren);\r\n }\r\n }\r\n };\r\n\r\n function handleGetLocationsError(response) {\r\n if (response.status === 404) {\r\n vm.errorGetLocationsNotFound = true;\r\n }\r\n else if (response.status === 503) {\r\n vm.errorGetLocationsServiceUnavailable = true;\r\n }\r\n else {\r\n vm.errorGetLocationsError = true;\r\n }\r\n vm.hideForm = true;\r\n };\r\n\r\n function recaptchaSetWidgetId(widgetId) {\r\n vm.recaptcha.widgetId = widgetId;\r\n if (!vm.recaptcha.visible) {\r\n vcRecaptchaService.execute(vm.recaptcha.widgetId);\r\n }\r\n };\r\n\r\n function recaptchaSetResponse(response) {\r\n vm.recaptcha.response = response;\r\n vm.recaptcha.hasResponse = vm.recaptcha.response && vm.recaptcha.response.length > 0;\r\n vm.newServiceRequest.RecaptchaResponse = vm.recaptcha.response;\r\n };\r\n\r\n function recaptchaReload() {\r\n vcRecaptchaService.reload(vm.recaptcha.widgetId);\r\n recaptchaSetResponse(null);\r\n };\r\n\r\n function createServiceRequest() {\r\n if (!vm.createServiceRequestForm.$valid) {\r\n var firstInvalidElement = angular.element('input.ng-invalid, select.ng-invalid').first();\r\n var parentOffset = firstInvalidElement.parent().offset();\r\n var headerHeight = 125;\r\n\r\n if (firstInvalidElement && parentOffset) {\r\n var top = parentOffset.top - headerHeight;\r\n firstInvalidElement.focus();\r\n $window.scrollTo({ top: top, behavior: 'smooth' });\r\n }\r\n\r\n return;\r\n }\r\n if (vm.recaptcha.enabled && !vm.recaptcha.visible && !vm.recaptcha.hasResponse) {\r\n vcRecaptchaService.execute(vm.recaptcha.widgetId);\r\n return;\r\n }\r\n\r\n vm.submittingForm = true;\r\n serviceRequestsService.post(vm.newServiceRequest, vm.attachment).then(function (response) {\r\n vm.createServiceRequestForm.$setUntouched();\r\n vm.createServiceRequestForm.$setPristine();\r\n vm.successCreateServiceRequest = true;\r\n vm.errorCreateServiceRequest = false;\r\n vm.hideForm = true;\r\n vm.submittingForm = false;\r\n vm.createdServiceRequest = response.data;\r\n $window.scrollTo({ top: 0, behavior: 'smooth' });\r\n\r\n if (vm.storeValues) {\r\n storeValues();\r\n } else {\r\n removeStoredValues();\r\n }\r\n }, function (response) {\r\n $window.scrollTo({ top: 0, behavior: 'smooth' });\r\n vm.successCreateServiceRequest = false;\r\n vm.errorCreateServiceRequest = true;\r\n vm.hideForm = true;\r\n vm.submittingForm = false;\r\n vm.errorMessage = response.data.Message;\r\n });\r\n };\r\n\r\n function storeValues() {\r\n storageService.setItem(\"serviceRequest-CustomerId\", vm.newServiceRequest.CustomerId);\r\n storageService.setItem(\"serviceRequest-LocationId\", vm.newServiceRequest.LocationId);\r\n storageService.setItem(\"serviceRequest-Name\", vm.newServiceRequest.Name);\r\n storageService.setItem(\"serviceRequest-Email\", vm.newServiceRequest.Email);\r\n storageService.setItem(\"serviceRequest-Phone\", vm.newServiceRequest.Phone);\r\n storageService.setItem(\"serviceRequest-StoreValues\", vm.storeValues);\r\n };\r\n\r\n function removeStoredValues() {\r\n storageService.removeItem(\"serviceRequest-CustomerId\");\r\n storageService.removeItem(\"serviceRequest-LocationId\");\r\n storageService.removeItem(\"serviceRequest-Name\");\r\n storageService.removeItem(\"serviceRequest-Email\");\r\n storageService.removeItem(\"serviceRequest-Phone\");\r\n storageService.removeItem(\"serviceRequest-StoreValues\");\r\n };\r\n }\r\n})()","(function () {\r\n 'use strict';\r\n angular.module('app').controller('pages.qrcodepage.index',\r\n ['utilityService', 'storageService', 'servicePointsService', 'serviceRequestsService', 'page', 'vcRecaptchaService', '$window', controller]);\r\n\r\n function controller(utilityService, storageService, servicePointsService, serviceRequestsService, page, vcRecaptchaService, $window) {\r\n var vm = this;\r\n vm.serviceRequest = {};\r\n vm.detailsRequired = true;\r\n vm.hideForm = false;\r\n vm.acceptGdrp = false;\r\n vm.successCreateServiceRequest = false;\r\n vm.errorCreateServiceRequest = false;\r\n vm.errorNotFound = false;\r\n vm.errorServiceUnavailable = false;\r\n vm.errorGeneral = false;\r\n\r\n vm.newServiceRequest = {};\r\n\r\n vm.useDefaultService = false;\r\n vm.services = page.services;\r\n vm.workTypes = page.workTypes;\r\n vm.receiverServicesEnabled = page.receiverServicesEnabled;\r\n\r\n vm.locationPath = undefined;\r\n vm.assets = undefined;\r\n vm.problemDescriptions = undefined;\r\n\r\n vm.selectedAssetsChanged = selectedAssetsChanged;\r\n vm.selectedProblemDescriptionsChanged = selectedProblemDescriptionsChanged;\r\n vm.serviceChanged = serviceChanged;\r\n vm.createServiceRequest = createServiceRequest;\r\n\r\n vm.notFound = false;\r\n\r\n var qs = {\r\n hri: utilityService.getQueryStringParameter(\"hri\"),\r\n testMode: utilityService.getQueryStringParameter(\"testmode\")\r\n };\r\n\r\n var storedValues = {\r\n email: storageService.getItem(\"serviceRequest-Email\"),\r\n storeValues: storageService.getItem(\"serviceRequest-StoreValues\")\r\n };\r\n\r\n vm.storeValues = storedValues.storeValues || false;\r\n\r\n vm.newServiceRequest.Email = storedValues.email || page.userEmail || undefined;\r\n\r\n (function () {\r\n if (qs.testMode) {\r\n vm.newServiceRequest.TestMode = true;\r\n }\r\n\r\n for (var i = 0; i < vm.workTypes.length; i++) {\r\n if (vm.workTypes[i].Id === \"FAULT_REPORT\") {\r\n vm.newServiceRequest.WorkType = vm.workTypes[i].Name;\r\n break;\r\n }\r\n }\r\n\r\n if (vm.services.length === 1) {\r\n vm.useDefaultService = true;\r\n serviceChanged(vm.services[0]);\r\n }\r\n\r\n if (qs.hri) {\r\n if (vm.receiverServicesEnabled) {\r\n servicePointsService.get(qs.hri).then(\r\n function (response) {\r\n var servicePoint = response.data;\r\n vm.newServiceRequest.CustomerId = servicePoint.CustomerId;\r\n vm.newServiceRequest.LocationId = servicePoint.LocationId;\r\n vm.newServiceRequest.AssetSiteId = servicePoint.AssetSiteId;\r\n vm.newServiceRequest.AssetOrganizationId = servicePoint.AssetOrganizationId;\r\n vm.newServiceRequest.Hri = servicePoint.Hri;\r\n vm.newServiceRequest.AssetId = servicePoint.AssetId;\r\n vm.newServiceRequest.Assets = [];\r\n vm.newServiceRequest.ProblemDescriptionIds = [];\r\n\r\n vm.customerName = servicePoint.CustomerName;\r\n vm.locationPath = servicePoint.Path;\r\n vm.assets = servicePoint.Assets;\r\n vm.problemDescriptions = servicePoint.ProblemDescriptions;\r\n }, function (response) {\r\n if (response.status === 404) {\r\n vm.errorNotFound = true;\r\n }\r\n else if (response.status === 503) {\r\n vm.errorServiceUnavailable = true;\r\n }\r\n else {\r\n vm.errorGeneral = true;\r\n }\r\n vm.hideForm = true;\r\n });\r\n }\r\n }\r\n else {\r\n vm.errorNotFound = true;\r\n vm.hideForm = true;\r\n }\r\n })();\r\n\r\n vm.recaptcha = {\r\n enabled: page.recaptchaEnabled,\r\n key: page.recaptchaSiteKey,\r\n visible: page.recaptchaVisible,\r\n widgetId: null,\r\n response: null,\r\n setWidgetId: recaptchaSetWidgetId,\r\n setResponse: recaptchaSetResponse,\r\n reload: recaptchaReload\r\n };\r\n\r\n function selectedAssetsChanged(asset, problemDescription) {\r\n if (!vm.selectedAssets) vm.selectedAssets = [];\r\n\r\n var assetId = asset.Id;\r\n var assetIndex = vm.selectedAssets.indexOf(assetId);\r\n\r\n if (problemDescription) {\r\n var assetAndProblemDescriptionId = assetId + '-' + problemDescription.Id;\r\n\r\n var problemDescriptionIndex = vm.selectedAssets.indexOf(assetAndProblemDescriptionId);\r\n if (problemDescriptionIndex > -1) {\r\n vm.selectedAssets.splice(problemDescriptionIndex, 1);\r\n }\r\n else {\r\n vm.selectedAssets.push(assetAndProblemDescriptionId);\r\n if (assetIndex === -1) {\r\n // Add asset if not already added\r\n vm.selectedAssets.push(assetId);\r\n }\r\n }\r\n }\r\n else {\r\n if (assetIndex > -1) {\r\n // Remove asset\r\n vm.selectedAssets.splice(assetIndex, 1);\r\n // Remove all items related to asset\r\n for (var j = vm.selectedAssets.length; j > 0; j--) {\r\n if (vm.selectedAssets[j - 1].substr(0, assetId.length) === assetId) {\r\n vm.selectedAssets.splice(j - 1, 1);\r\n }\r\n }\r\n }\r\n else {\r\n vm.selectedAssets.push(assetId);\r\n }\r\n }\r\n\r\n assetsChanged(asset, problemDescription);\r\n };\r\n\r\n function selectedProblemDescriptionsChanged(problemDescription) {\r\n if (problemDescription) {\r\n var problemDescriptionIndex = vm.newServiceRequest.ProblemDescriptionIds.indexOf(problemDescription.Id);\r\n if (problemDescriptionIndex > -1) {\r\n vm.newServiceRequest.ProblemDescriptionIds.splice(problemDescriptionIndex, 1);\r\n }\r\n else {\r\n vm.newServiceRequest.ProblemDescriptionIds.push(problemDescription.Id);\r\n }\r\n\r\n setDetailsRequired();\r\n }\r\n };\r\n\r\n function assetsChanged(asset, problemDescription) {\r\n var assetIndex = -1;\r\n for (var i = 0; i < vm.newServiceRequest.Assets.length; i++) {\r\n if (vm.newServiceRequest.Assets[i].Id === asset.Id) {\r\n assetIndex = i;\r\n break;\r\n }\r\n }\r\n\r\n if (!problemDescription && assetIndex > -1) {\r\n vm.newServiceRequest.Assets.splice(assetIndex, 1);\r\n }\r\n else if (assetIndex === -1) {\r\n vm.newServiceRequest.Assets.push({ Id: asset.Id, ProblemDescriptionIds: [] });\r\n assetIndex = vm.newServiceRequest.Assets.length - 1;\r\n }\r\n\r\n setDetailsRequired();\r\n\r\n if (!problemDescription) return;\r\n\r\n var problemDescriptionIndex = -1;\r\n for (var j = 0; j < vm.newServiceRequest.Assets[assetIndex].ProblemDescriptionIds.length; j++) {\r\n if (vm.newServiceRequest.Assets[assetIndex].ProblemDescriptionIds[j] === problemDescription.Id) {\r\n problemDescriptionIndex = j;\r\n break;\r\n }\r\n }\r\n\r\n if (problemDescriptionIndex > -1) {\r\n vm.newServiceRequest.Assets[assetIndex].ProblemDescriptionIds.splice(problemDescriptionIndex, 1);\r\n }\r\n else {\r\n vm.newServiceRequest.Assets[assetIndex].ProblemDescriptionIds.push(problemDescription.Id);\r\n }\r\n };\r\n\r\n function setDetailsRequired() {\r\n vm.detailsRequired = vm.newServiceRequest.Assets.length === 0 && vm.newServiceRequest.ProblemDescriptionIds.length === 0;\r\n };\r\n\r\n function serviceChanged(service) {\r\n if (!service) return;\r\n\r\n vm.newServiceRequest.ServiceId = service.Id;\r\n vm.newServiceRequest.ServiceName = service.Name;\r\n };\r\n function recaptchaSetWidgetId(widgetId) {\r\n vm.recaptcha.widgetId = widgetId;\r\n if (!vm.recaptcha.visible) {\r\n vcRecaptchaService.execute(vm.recaptcha.widgetId);\r\n }\r\n };\r\n\r\n function recaptchaSetResponse(response) {\r\n vm.recaptcha.response = response;\r\n vm.recaptcha.hasResponse = vm.recaptcha.response && vm.recaptcha.response.length > 0;\r\n vm.newServiceRequest.RecaptchaResponse = vm.recaptcha.response;\r\n };\r\n\r\n function recaptchaReload() {\r\n vcRecaptchaService.reload(vm.recaptcha.widgetId);\r\n recaptchaSetResponse(null);\r\n };\r\n\r\n function createServiceRequest() {\r\n vm.newServiceRequest.Name = vm.newServiceRequest.Email;\r\n\r\n serviceRequestsService.post(vm.newServiceRequest, vm.attachment).then(function (response) {\r\n vm.createServiceRequestForm.$setUntouched();\r\n vm.createServiceRequestForm.$setPristine();\r\n vm.successCreateServiceRequest = true;\r\n vm.errorCreateServiceRequest = false;\r\n vm.hideForm = true;\r\n vm.createdServiceRequest = response.data;\r\n $window.scrollTo({ top: 0, behavior: 'smooth' });\r\n\r\n if (vm.storeValues) {\r\n storeValues();\r\n } else {\r\n removeStoredValues();\r\n }\r\n }, function (response) {\r\n vm.successCreateServiceRequest = false;\r\n vm.errorCreateServiceRequest = true;\r\n vm.errorMessage = response.data.Message;\r\n });\r\n };\r\n\r\n function storeValues() {\r\n storageService.setItem(\"serviceRequest-Email\", vm.newServiceRequest.Email);\r\n storageService.setItem(\"serviceRequest-StoreValues\", vm.storeValues);\r\n };\r\n\r\n function removeStoredValues() {\r\n storageService.removeItem(\"serviceRequest-Email\");\r\n storageService.removeItem(\"serviceRequest-StoreValues\");\r\n };\r\n }\r\n})()","(function () {\r\n 'use strict';\r\n angular.module('app').controller('pages.startpagecontainer.index', controller);\r\n\r\n function controller($scope, $window) {\r\n var vm = this;\r\n }\r\n})()","(function () {\r\n 'use strict';\r\n angular.module('app').controller('pages.statuspage.index', ['utilityService', 'serviceRequestStatusesService', controller]);\r\n\r\n function controller(utilityService, serviceRequestStatusesService) {\r\n var vm = this;\r\n vm.serviceRequestStatus = {};\r\n vm.success = false;\r\n vm.errorNotFound = false;\r\n vm.errorServiceUnavailable = false;\r\n vm.errorGeneral = false;\r\n\r\n var qs = {\r\n id: utilityService.getQueryStringParameter(\"id\")\r\n };\r\n\r\n vm.getServiceRequestStatus = getServiceRequestStatus;\r\n\r\n (function () {\r\n if (qs.id) {\r\n vm.id = qs.id;\r\n getServiceRequestStatus(qs.id);\r\n }\r\n })();\r\n\r\n function getServiceRequestStatus(id) {\r\n vm.success = false;\r\n vm.errorNotFound = false;\r\n vm.errorServiceUnavailable = false;\r\n vm.errorGeneral = false;\r\n\r\n serviceRequestStatusesService.get(id).then(\r\n function (response) {\r\n vm.serviceRequestStatus = response.data;\r\n vm.success = true;\r\n },\r\n function (response) {\r\n vm.success = false;\r\n if (response.status === 404) {\r\n vm.errorNotFound = true;\r\n }\r\n else if (response.status === 503) {\r\n vm.errorServiceUnavailable = true;\r\n }\r\n else {\r\n vm.errorGeneral = true;\r\n }\r\n });\r\n };\r\n }\r\n})()","$(document).ready(function () {\r\n $('.has-sublevel .toggle-navigation-1').on('click', function (e) {\r\n $(this).closest('.level-1').toggleClass('expanded');\r\n });\r\n});\r\n","var dataLayer = (window.dataLayer = window.dataLayer || []);\r\n\r\n(function () {\r\n \"use strict\";\r\n angular.module(\"app\").service(\"cookies\", function () {\r\n var observerCallbacks = [];\r\n\r\n var notifyObservers = function () {\r\n angular.forEach(observerCallbacks, function (callback) {\r\n callback();\r\n });\r\n };\r\n\r\n this.showCookieSettings = false;\r\n\r\n this.toggleCookieSettingsChanged = function (callback) {\r\n observerCallbacks.push(callback);\r\n };\r\n\r\n this.toggleCookieSettings = function () {\r\n this.showCookieSettings = !this.showCookieSettings;\r\n notifyObservers();\r\n };\r\n });\r\n\r\n angular\r\n .module(\"app\")\r\n .controller(\"shared.cookies\", [\r\n \"$window\",\r\n \"$cookies\",\r\n \"cookies\",\r\n controller,\r\n ]);\r\n function controller($window, $cookies, cookies) {\r\n var vm = this;\r\n vm.cookieContainerLoaded = true;\r\n var cookieName = \"accept-cookies\";\r\n\r\n vm.acceptedCookies = getCookie();\r\n var acceptedCookiesCopy = angular.copy(vm.acceptedCookies);\r\n\r\n vm.showCookieInfo = !vm.acceptedCookies.hasAcceptedCookies;\r\n vm.showCookieSettings = false;\r\n\r\n vm.acceptCookies = function (accepted) {\r\n vm.acceptedCookies.hasAcceptedCookies = true;\r\n if (typeof accepted != \"undefined\") {\r\n vm.acceptedCookies.additionalCookies = accepted;\r\n }\r\n setCookie(vm.acceptedCookies);\r\n vm.showCookieInfo = false;\r\n sendEventAcceptedCookieThirdParty();\r\n };\r\n\r\n vm.updateCookieSettings = function () {\r\n vm.toggleCookieSettings();\r\n vm.acceptCookies();\r\n };\r\n\r\n vm.toggleCookieSettings = function () {\r\n cookies.toggleCookieSettings();\r\n };\r\n\r\n vm.cancelCookieSettings = function () {\r\n vm.acceptedCookies = angular.copy(acceptedCookiesCopy);\r\n cookies.toggleCookieSettings();\r\n };\r\n\r\n var onToggleCookieSettingsChanged = function () {\r\n if (!vm.showCookieSettings) {\r\n vm.acceptedCookies = getCookie();\r\n acceptedCookiesCopy = angular.copy(vm.acceptedCookies);\r\n }\r\n vm.showCookieSettings = cookies.showCookieSettings;\r\n };\r\n cookies.toggleCookieSettingsChanged(onToggleCookieSettingsChanged);\r\n\r\n function getCookie() {\r\n var currentAcceptedCookieRaw = $cookies.get(cookieName);\r\n var currentAcceptedCookie = null;\r\n if (currentAcceptedCookieRaw != null) {\r\n currentAcceptedCookie = JSON.parse(currentAcceptedCookieRaw);\r\n }\r\n\r\n return {\r\n hasAcceptedCookies:\r\n currentAcceptedCookie != null\r\n ? currentAcceptedCookie.hasAcceptedCookies\r\n : false,\r\n additionalCookies:\r\n currentAcceptedCookie != null\r\n ? currentAcceptedCookie.additionalCookies\r\n : false,\r\n };\r\n }\r\n\r\n function setCookie(cookie) {\r\n var expires = new Date();\r\n expires.setFullYear(expires.getFullYear() + 1);\r\n $cookies.put(cookieName, JSON.stringify(cookie), {\r\n expires: expires,\r\n path: \"/\",\r\n });\r\n }\r\n\r\n function sendEventAcceptedCookieThirdParty() {\r\n if (!vm.showCookieInfo) {\r\n if (vm.acceptedCookies.additionalCookies) {\r\n dataLayer.push({ cookieThirdparty: \"granted\" });\r\n dataLayer.push({ event: \"cookieThirdparty-access-granted\" });\r\n } else {\r\n dataLayer.push({ cookieThirdparty: \"denied\" });\r\n }\r\n }\r\n }\r\n }\r\n})();\r\n","(function () {\r\n 'use strict';\r\n angular.module('app').controller('shared.footer', ['cookies', controller]);\r\n\r\n function controller(cookies) {\r\n var vm = this;\r\n\r\n vm.toggleCookieSettings = function () {\r\n cookies.toggleCookieSettings();\r\n }\r\n }\r\n})()"]}