Publicerad: 2026-08-27

Credit Analyst (Swedish)
${titleText} `); let grid = columnOne.querySelector('.job-grid'); let allTokens = Array.from(columnOne.querySelectorAll('.joblayouttoken')); // --- 1. CAPTURE VARIABLES FOR BUSINESS RULES --- let jobLocationValue = ""; let countryRegionValue = ""; let regionValue = ""; let ipeLevelValue = null; let employeeGroupValue = ""; // --- INTERNAL USER VALIDATION VIA CUSTOM PLUGIN --- // Reads global flags injected by the authentication plugin let pluginWindowCheck = !!window.isSFInternalUser; let pluginSessionCheck = sessionStorage.getItem('SF_Internal_User') === 'true'; let isInternalPortal = pluginWindowCheck || pluginSessionCheck; // Iterate through all tokens to capture their values before manipulating the DOM allTokens.forEach(el => { let labelEl = el.querySelector('.joblayouttoken-label'); if (!labelEl) return; let labelText = labelEl.innerText; let propId = generatePropertyId(labelText); let valueEl = el.querySelector('.rtltextaligneligible'); let valueText = valueEl ? valueEl.textContent.trim() : ""; if (propId === "JobLocation") { jobLocationValue = valueText; } else if (propId === "CountryRegion") { countryRegionValue = valueText; } else if (propId === "Region") { regionValue = valueText; } else if (propId === "IPELevel") { let match = valueText.match(/\d+/); if (match) ipeLevelValue = parseInt(match[0], 10); } else if (propId === "EmployeeGroup") { employeeGroupValue = valueText.toLowerCase(); } }); // --- 2. BUSINESS RULES VALIDATION --- let isSalaryPaid = employeeGroupValue.includes('salary'); let isIpeValid = ipeLevelValue !== null && ipeLevelValue fullLocationLower.includes(state)); let hasStateAbbr = allowedUSAbbr.some(abbr => { let regex = new RegExp(`\\b${abbr}\\b`); return regex.test(fullLocationLower); }); isSalaryLocationValid = hasFullStateName || hasStateAbbr; } else { isSalaryLocationValid = allowedGlobalCountries.some(country => fullLocationLower.includes(country)); } // Job Level Visibility Rule (Legacy locations + EER Region) let allowedJobLevelLocations = ["austria", "slovakia", "lithuania", "latvia"]; let isJobLevelLocationValid = allowedJobLevelLocations.some(loc => fullLocationLower.includes(loc)); let isEERRegion = regionValue.toUpperCase().trim() === "EER"; // Final flags to determine if the fields should be shown let showSalaryRange = isSalaryLocationValid && isIpeValid && isSalaryPaid; let showJobLevel = (isJobLevelLocationValid || isEERRegion) && isIpeValid && isSalaryPaid && isInternalPortal; // --- 3. TOKEN PROCESSING AND DISPLAY --- let keepAddingToGrid = true; allTokens.forEach(el => { // Stop adding elements to the grid once the job description starts if (!keepAddingToGrid || el.querySelector('[itemprop="description"]')) { return; } let labelEl = el.querySelector('.joblayouttoken-label'); if (labelEl) { let labelText = labelEl.innerText; let customPropertyid = generatePropertyId(labelText); // --- ABSOLUTE REMOVAL OF LOGIC-ONLY TOKENS --- if ( customPropertyid === "EmployeeGroup" || customPropertyid === "CountryRegion" || customPropertyid === "Region" || customPropertyid === "IPELevel" ) { el.style.display = 'none'; // Force visual hiding el.remove(); // Remove from DOM return; } // --- APPLY VISIBILITY BUSINESS FILTERS --- if (customPropertyid === "SalaryRange" && !showSalaryRange) { el.style.display = 'none'; el.remove(); return; } if (customPropertyid === "JobLevel" && !showJobLevel) { el.style.display = 'none'; el.remove(); return; } // Cosmetic adjustment for short labels if (labelText.includes("(Short)")) { labelEl.innerText = labelText.replace(/\(Short\)/g, "(s)"); } // Append custom icons based on the mapped property ID let elType = labelEl.nextElementSibling; if (elType) { let icon = ''; let iconUrl = ''; switch (customPropertyid) { case 'JobLocation': icon = 'glyphicon-map-marker'; break; case 'BusinessUnit': icon = 'glyphicon-briefcase'; break; case 'JobCategory': icon = 'glyphicon-dashboard'; break; case 'EmploymentType': icon = 'glyphicon-star-empty'; break; case 'ReqID': icon = 'glyphicon-calendar'; break; case 'WorkLocationType': icon = 'glyphicon-paste'; break; case 'JobLevel': iconUrl = 'https://rmkcdn.successfactors.com/ef55fddb/b4cf3492-3cb2-4e29-a914-3.png'; break; case 'SalaryRange': iconUrl = 'https://rmkcdn.successfactors.com/ef55fddb/3bd06ab1-e5dc-4e72-abcb-3.png'; break; case 'TAPartner': iconUrl = 'https://rmkcdn.successfactors.com/ef55fddb/66a66419-f8c9-4f0e-b94a-6.png'; break; default: icon = ''; } let iconHtml = ''; if (icon) { iconHtml = ``; } else if (iconUrl) { iconHtml = ``; } labelEl.parentElement.insertAdjacentHTML('beforebegin', ` ${iconHtml}`); let wrapper = el.querySelector(`.job-token-${customPropertyid}-wrapper`); wrapper.appendChild(labelEl.parentElement); // Clean up empty text nodes let emptySibling = document.querySelector(`.job-token-${customPropertyid}-wrapper`).nextSibling; if(emptySibling && emptySibling.nodeType === 3) emptySibling.remove(); } // Flag to stop processing grid items when TA Partner is reached if (customPropertyid === "TAPartner") { keepAddingToGrid = false; } } grid.appendChild(el); }); }});/** * Robust Mapping Function * Scans the label for keywords, effectively bypassing any issues caused by translations. */function generatePropertyId(jobLayoutTokenLabel) { let normalized = jobLayoutTokenLabel.toLowerCase(); // Helper function to search for keywords regardless of formatting or active language const contains = (arr) => arr.some(keyword => normalized.includes(keyword)); if (contains(["employee group"])) return "EmployeeGroup"; if (contains(["ipe level", "ipe"])) return "IPELevel"; // Order matters: 'country' will correctly match 'country/region' if (contains(["country", "land", "país", "pays", "paese", "kraj", "krajina"])) return "CountryRegion"; if (contains(["region", "región", "région", "регион", "地区"])) return "Region"; if (contains(["posting job location", "joblokation", "job location", "jobsted", "arbeitsort", "ubicación", "site de l'emploi", "lokalizacja", "местоположение", "miesto", "职位地点", "sede di lavoro"])) return "JobLocation"; if (contains(["salary range", "recruitment salary", "løninterval", "gehaltsspanne", "przedział wynagrodzenia", "fourchette", "rango salarial", "mzdové rozpätie", "lønramme", "диапазон зарплаты"])) return "SalaryRange"; if (contains(["posting job level", "job level", "jobniveau", "joblevel", "nivel del puesto", "niveau du poste", "poziom stanowiska", "уровень должности", "úroveň pozície"])) return "JobLevel"; if (contains(["employm