https://rekrutacja.pedagogium.pl/pdg-irk-app/content/script/irk/pa…/modul/faktura/v1/ModulFaktura.js
1(function() { 2 'use strict'; 3 4 angular 5 .module('irk') 6 .factory('ModulFaktura', ModulFaktura); 7 function ModulFaktura(AbstractModulService) { 8 var modul = angular.extend({}, AbstractModulService); 9 10 modul.getGroupName = function() { 11 return 'ModulFakturaV1Intake'; 12 } 13 14 modul.process = function($mainScope) { 15 var krajePlusPusty = []; 16 $mainScope.getKraje = function() { 17 var kraje = $mainScope.wartosciSlownikowe['Kraj']; 18 if(kraje && kraje.length != 0 && krajePlusPusty.length == 0) { 19 krajePlusPusty = JSON.parse(JSON.stringify(kraje)); 20 krajePlusPusty.unshift({value: null, label: '-----'}); 21 } 22 return krajePlusPusty; 23 }; 24 25 $mainScope.isWybranyRodzajPlatnika = function() { 26 var intakeList = $mainScope.groups.ModulFakturaV1IntakeList; 27 if(typeof intakeList == 'undefined' || intakeList.length == 0) { 28 return false; 29 } 30 var rodzajField = intakeList[0].RodzajPlatnika; 31 return rodzajField != null && rodzajField.value.length != 0; 32 }; 33 34 $mainScope.isOsobaFizyczna = function() { 35 return isRodzajPlatnika('OSOBA_FIZYCZNA'); 36 }; 37 38 $mainScope.isFirma = function() { 39 return isRodzajPlatnika('FIRMA'); 40 }; 41 42 var isRodzajPlatnika = function(rodzajPlatnika) { 43 var intakeList = $mainScope.groups.ModulFakturaV1IntakeList; 44 if(typeof intakeList == 'undefined' || intakeList.length == 0) { 45 return false; 46 } 47 var rodzajField = intakeList[0].RodzajPlatnika; 48 return rodzajField != null && rodzajField.value === rodzajPlatnika; 49 }; 50 51 $mainScope.wstawDaneKandydata = function() { 52 var intakeList = $mainScope.groups.ModulFakturaV1IntakeList; 53 var daneKandydata = $mainScope.daneKandydata; 54 if(typeof intakeList == 'undefined' || intakeList.length == 0 55 || typeof daneKandydata == 'undefined' || daneKandydata.length == 0) { 56 return; 57 } 58 intakeList[0].NazwaSkrocona.value = daneKandydata.nazwaSkrocona; 59 intakeList[0].Imie.value = daneKandydata.imie; 60 intakeList[0].ImiePozostale.value = daneKandydata.imiePozostale; 61 intakeList[0].Nazwisko.value = daneKandydata.nazwisko; 62 intakeList[0].Pesel.value = daneKandydata.pesel; 63 intakeList[0].Ulica.value = daneKandydata.ulica; 64 intakeList[0].NrDomu.value = daneKandydata.nrDomu; 65 intakeList[0].NrLokalu.value = daneKandydata.nrLokalu; 66 intakeList[0].Miasto.value = daneKandydata.miasto; 67 intakeList[0].KodPocztowy.value = daneKandydata.kodPocztowy; 68 intakeList[0].IdKraju.value = daneKandydata.idKraju; 69 }; 70 71 } 72 73 return modul; 74 } 75})();
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.