PageSourceSearch

https://dfe.eprviamineira.com.br/content/js/angular/controllers/notificationsController.js

js eprviamineira.com.br collected 2026-10-02 18:16:08 UTC 1,936 bytes, 60 lines download raw bytes

1(function (window, angular) {
2    'use strict';
3
4    angular
5        .module('RFPe')
6        .controller('notificationsController', NotificationsController);
7
8    NotificationsController.$inject = ['$scope', 'userService', '$interval'];
9
10    function NotificationsController($scope, userService, $interval) {
11
12        $scope.page = 0;
13        $scope.notifications = [];
14
15        getNotifications($scope.page);
16
17        $interval(function () {
18            $scope.notifications = [];
19            $scope.page = 0;
20            getNotifications($scope.page);
21        }, 120000);
22
23        $(".notifications-list").scroll(function () {
24            if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
25                $scope.$apply(function () {
26                    $scope.page++;
27                    getNotifications($scope.page);
28                });
29            };
30        });
31
32        function getNotifications(page) {
33            userService.getNotifications(page)
34                .success(function (notification) {
35                    $scope.notificationsCount = notification.notificationsCount;
36                    notification.itens.forEach(function (notification) {
37                        $scope.notifications.push(notification);
38                    });
39                });
40        };
41
42        $scope.open = function (notification) {
43            debugger;
44            if (!notification.read) {
45                userService.readNotification(notification.id)
46                .success(function (data) {
47                    window.location = '/admin/chamados?open=' + notification.ticketId;
48                }).error(function (data) {
49                    window.location = '/admin/chamados?open=' + notification.ticketId;
50                });
51            }
52            else {
53                window.location = '/admin/chamados?open=' + notification.ticketId;
54            }
55
56        };
57
58    };
59
60})(window, angular);

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.