PageSourceSearch

https://gradana.co.id/assets/js/controllers/frontend/pinjam-frontend.js

js gradana.co.id collected 2026-10-07 21:53:02 UTC 2,690 bytes, 80 lines download raw bytes

1'use strict';
2
3/* Controllers */
4
5angular
6    .module('app')
7    .controller('PinjamFrontendCtrl', PinjamFrontendController);
8    PinjamFrontendController.$inject = ['$scope', '$rootScope','ServerService', 'SettingsService', '$state', '$location', '$anchorScroll', '$http'];
9    function PinjamFrontendController($scope, $rootScope, ServerService, SettingsService, $state, $location, $anchorScroll, $http){
10
11        var vm = this;
12        var currentUser = {};
13
14        vm.getProperties = [];
15        $scope.currentPage = 0;
16        $scope.pageSize = 4;
17        $scope.page = {
18            currentPage : 0
19        };
20        // vm.baseImageURL = "https://s3-ap-southeast-1.amazonaws.com/gradana/";
21        // vm.baseImageURL = "https://gradana-backup-test.oss-ap-southeast-5.aliyuncs.com/";
22        vm.baseImageURL = "https://gradana-prod.oss-ap-southeast-5.aliyuncs.com/";
23
24        if($state.params.scrollTo === 'faq'){
25            $location.hash('faqPinjam');
26            $anchorScroll();
27        }
28
29        $scope.navigatePage = function(toPage) {
30            if (toPage === 'signupBorrower') {
31                $state.go('access.signup', { role: 'peminjam' , type: 'GraDP'});
32            }
33        }
34
35        $scope.numberOfPages=function(){
36            if(vm.properties){
37                return Math.ceil(vm.properties.length/$scope.pageSize);
38            }
39            return 0;
40        }
41
42        vm.getProperties = function() {
43            var query = {
44                isActive: 'true',
45                sortBy: 'orderNumber'
46            }
47
48            ServerService.GetProperties(currentUser, query, function(response) {
49                if(response) {
50                    vm.properties = response.data;
51                }
52            })
53        }
54
55        vm.getProperties();
56
57        $scope.goToPropertyDetail = function(propertiId) {
58            $state.go('propertiDetail', { propertiId: propertiId })
59        }
60
61        function loadLanguageContent(language) {
62            $http.get(`assets/i18n/gradp/${language}.json`).then(function (response) {
63                $scope.textContent = response.data;
64            }, function (error) {
65                console.error("Error loading language file:", error);
66            });
67        }
68    
69        $scope.currentLanguage = localStorage.getItem("language") || "id";
70    
71        $scope.$watch(function () {
72            return localStorage.getItem("language");
73        }, function (newValue) {
74            if (newValue) {
75                $scope.currentLanguage = newValue;
76                loadLanguageContent(newValue);
77                console.log("Current Language changed to:", $scope.currentLanguage);
78            }
79        });
80    }

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.