1(function() { 2 'use strict'; 3 4 angular 5 .module('irk') 6 .factory('ModulAdresy', ModulAdresy); 7 8 function ModulAdresy(AbstractModulService, i18n) { 9 return angular.extend({}, AbstractModulService, { 10 getGroupName: function() { 11 return 'ModulAdresyV1Intake'; 12 }, 13 14 process: function($mainScope) { 15 var typAdresuLabelMap = {}; 16 angular.extend($mainScope, { 17 getTypAdresuLabel: function(typAdresu) { 18 var result = typAdresuLabelMap[typAdresu]; 19 if(!result) { 20 i18n.get('interfejs.irk.modul.adresy.v1.ModulAdresy.TypAdresu.' + typAdresu) 21 .then(function(value) { 22 typAdresuLabelMap[typAdresu] = value; 23 }); 24 } 25 return result; 26 }, 27 28 isWyswietlacEtykieteAdresowa: function(adresIntakeList, typAdresu) { 29 var zamieszkania = null; 30 var korespondencji = null; 31 for(var intake of adresIntakeList) { 32 if(intake.TypAdresu.value === 'Z') { 33 zamieszkania = intake; 34 } 35 if(intake.TypAdresu.value === 'K') { 36 korespondencji = intake; 37 } 38 } 39 var adres = korespondencji.TakiJakZamieszkania.value === 'false' ? 40 korespondencji : zamieszkania; 41 return adres.IdKraju.value != null && adres.IdKraju.value != 'PL' && typAdresu === 'K'; 42 } 43 }); 44 } 45 }); 46 } 47})();
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.