PageSourceSearch

https://wonion.nl/app/hp/js/controllers/apps/relatie/contactmomenten.js?v=906621677

js wonion.nl collected 2026-10-05 02:38:28 UTC 2,803 bytes, 68 lines download raw bytes

1app.controller("ContactmomentenController", ["$scope", "relatiesService", "sharepointFileService", "multiselectService", "kvhpFileService", "moduleService",
2    function ($scope, relatiesService, sharepointFileService, multiselectService, kvhpFileService, moduleService) {
3
4        $scope.loading = true;
5        $scope.selectedOptions = [];
6  
7        relatiesService.getContactmomenten()
8        .then(function (data) {
9            data = encodeUriForLinks(data);
10			$scope.contactmomenten = data;
11
12			for (var i = 0; i < $scope.contactmomenten.length; i++) {
13				if ($scope.contactmomenten[i]?.zaak?.hideOnHuurdersPortaal) {
14					$scope.contactmomenten.splice(i, 1);
15					i--;
16				}
17			}
18
19            $scope.loading = false;
20            if (!$scope.contactmomenten.length) {
21                $scope.errorMessage = "Er zijn geen contactmomenten gevonden";
22            }
23            if ($scope.hasModule("KlantVensterV3HuurdersPortaal")) {
24                return null;
25            }
26            return relatiesService.huurderGetZaken();
27        }).then(function(allCases){
28            $scope.allCases = allCases.map(relatiesService.extractCasesForMultiselect);
29            var labelNoCases = multiselectService.getMsgNoCases();
30            $scope.allCases.unshift({ value: 0, label: labelNoCases})
31            
32        }, function () {
33            $scope.loading = false;
34            $scope.errorMessage = "Er is iets misgegaan bij het ophalen van uw gegevens";
35        });
36        
37        $scope.applySelection = function () {
38            var zakenIds = multiselectService.getZakenIds($scope.selectedOptions, $scope.allCases);
39            relatiesService.huurderFilterContactmomenten(zakenIds)
40            .then(function(result){
41                $scope.contactmomenten = result;
42            })
43        }
44        $scope.allCases = [ ];
45
46        $scope.openDocument = function (document) {
47            if ($scope.hasModule("KlantVensterV3HuurdersPortaal")) {
48                kvhpFileService.huurderGetFileForRelatie(document.relaties[0].id, document.businessKey, document.bestandsnaam);
49            }
50            else {
51                sharepointFileService.huurderGetFileForRelatie(document.id, document.bestandsnaam);
52            }               
53        };
54
55        $scope.hasModule = function (name) {
56            return moduleService.hasModule(name);
57        };
58
59        function encodeUriForLinks(data) {
60            return data.map( function(item) {
61                if (item.informatieobject && item.informatieobject.bestandslocatie) {
62                    item.bestandslocatie = encodeURIComponent(item.informatieobject.bestandslocatie.trim());
63                }
64                return item;
65            })
66        }
67    }
68]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.