1(function() { 2 'use strict'; 3 4 angular 5 .module("irk") 6 .controller("PlatnoscOnlineController", PlatnoscOnlineController); 7 8 function PlatnoscOnlineController($scope, $modalInstance, $http, toaster, i18n, wydzial, etapStudiow, proces, rachunek, kwotaPlatnosci, oswiadczeniaPlatnosciOnline, parentScope) { 9 10 var i18nSukces = 'interfejs.irk.komponent.Platnosci.FormularzPlatnosciWyswietlony'; 11 var i18nNieznanyBlad = 'interfejs.irk.komponent.Platnosci.WystapilNieznanyBlad'; 12 13 $scope.wydzial = wydzial; 14 $scope.etapStudiow = etapStudiow; 15 $scope.proces = proces; 16 $scope.rachunek = rachunek; 17 $scope.kwotaPlatnosci = kwotaPlatnosci; 18 $scope.oswiadczeniaPlatnosciOnline = oswiadczeniaPlatnosciOnline; 19 20 $scope.zamknij = function() { 21 $modalInstance.close(); 22 }; 23 24 $scope.isWszystkieOswiadczeniaPotwierdzone = function() { 25 for(var i = 0; i < $scope.oswiadczeniaPlatnosciOnline.length; ++i) { 26 var oswiadczenie = $scope.oswiadczeniaPlatnosciOnline[i]; 27 if(!oswiadczenie.potwierdzone) { 28 return false; 29 } 30 } 31 return true; 32 }; 33 34 var getNrPotwierdzonegoOswiadczeniaList = function() { 35 var nrPotwierdzonegoOswiadczeniaList = []; 36 for(var i = 0; i < $scope.oswiadczeniaPlatnosciOnline.length; ++i) { 37 var oswiadczenie = $scope.oswiadczeniaPlatnosciOnline[i]; 38 if(oswiadczenie.potwierdzone) { 39 nrPotwierdzonegoOswiadczeniaList.push(oswiadczenie.nrOswiadczenia); 40 } 41 } 42 return nrPotwierdzonegoOswiadczeniaList; 43 }; 44 45 $scope.rozpocznij = function() { 46 var params = { 47 idProcesu: proces.idProcesuRekrutacyjnego, 48 nrRachunku: rachunek.numerKontaString, 49 wartosc: kwotaPlatnosci.amount, 50 waluta: kwotaPlatnosci.currency, 51 nrPotwierdzonegoOswiadczeniaList: getNrPotwierdzonegoOswiadczeniaList() 52 } 53 return $http.post('REST/platnosconline/rozpocznij', params) 54 .then(function(response) { 55 var bledy = response.data.bledy; 56 if(bledy.length > 0) { 57 toaster.pop('error', bledy[0]); 58 } 59 else if(!response.data.sukces) { 60 i18n.get(i18nNieznanyBlad).then(function(komunikat) { 61 toaster.pop('error', komunikat); 62 }); 63 } 64 else { 65 i18n.get(i18nSukces).then(function(komunikat) { 66 toaster.pop('success', komunikat); 67 }); 68 window.open(response.data.url); 69 parentScope.updateWykazOplat() 70 } 71 $scope.zamknij(); 72 }); 73 }; 74 } 75 76})();
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.