Jobs
No Jobs

No Jobs Found!

We couldn't find what you are searching for.

Try searching something else

`; accordion.append(accordionItem); // Creating Accordion body let accordionBody = document.getElementById( "accord-body-" + accordCount ); // Creating list of jobs inside accordion jobs[department].forEach((job) => { let accordionBodyItem = document.createElement("div"); accordionBodyItem.className = "job-tile d-flex align-items-center justify-content-between"; accordionBodyItem.innerHTML = `
${job["name"]}

We are looking for a customer success trainee to join our team.

100% Remote

`; accordionBody.appendChild(accordionBodyItem); // Creating info pills if (job["min_annual_salary"] && job["max_annual_salary"]) { let infoPills = document.getElementById( "info-pills-" + accordCount ); let salaryRange = document.createElement("p"); salaryRange.className = "blue-bg"; salaryRange.innerHTML = `${getCurrencySymbol( job["currency_id"] )}${job["min_annual_salary"].toLocaleString()} - ${getCurrencySymbol( job["currency_id"] )}${job[ "max_annual_salary" ].toLocaleString()}`; infoPills.appendChild(salaryRange); } accordCount = accordCount + 1; }); } if (accordion.innerHTML == "") { document.getElementsByClassName("no-jobs-sec")[0].style.display = "block"; } else { document.getElementsByClassName("no-jobs-sec")[0].style.display = "none"; } } // Function to get jobs function getJobs() { let requestOptions = { method: "GET", redirect: "follow", }; fetch( "https://solutions-test.recruitcrm.io/get-jobs/" + account_id, requestOptions ) .then((response) => response.text()) .then((result) => { // Resetting data inside Database const tx = db.transaction("jobs", "readwrite"); const store = tx.objectStore("jobs"); const deleteReq = store.clear(); deleteReq.onsuccess = (event) => { console.log("deleted"); }; let res = JSON.parse(result); res["data"].forEach((element) => { store.put(element); }); tx.oncomplete = function () { console.log("Complete"); }; }) .catch((error) => console.log("error", error)); } // Function to get jobs ansynchronously when no database is available async function forceGetJobs() { let requestOptions = { method: "GET", redirect: "follow", }; await fetch( "https://solutions-test.recruitcrm.io/get-jobs/" + account_id, requestOptions ) .then((response) => response.text()) .then((result) => { // Storing data in the DB const tx = db.transaction("jobs", "readwrite"); const store = tx.objectStore("jobs"); const deleteReq = store.clear(); deleteReq.onsuccess = (event) => { console.log("deleted"); }; let res = JSON.parse(result); res["data"].forEach((element) => { store.put(element); }); tx.oncomplete = function () { console.log("Complete"); }; // populateJobList(formatJobData(res["data"], [])); formatJobData(res["data"], allJobs); // Get formatted data populateDepartmentDropdowns(dropdowns); // Populate department dropdown populateJobList(allJobs); // Populate job list }); } // Function to search jobs function searchJobs() { let searchInput = document.getElementById("search-box").value.toUpperCase(); let accordionItems = document.getElementsByClassName("accordion-item"); // First setting all the job tiles to display none for (let accordion of accordionItems) { accordion.style.display = "none"; } document.getElementsByClassName("no-jobs-sec")[0].style.display = "block"; let jobTiles = document.getElementsByClassName("job-tile"); // Setting display block to only matched job tiles for (let tile of jobTiles) { let jobName = tile["children"][0]["children"][0]["innerText"]; if (jobName.toUpperCase().indexOf(searchInput) > -1) { tile.style.setProperty("display", "flex", "important"); tile["parentElement"]["parentElement"][ "parentElement" ].style.setProperty("display", "block"); document.getElementsByClassName("no-jobs-sec")[0].style.display = "none"; } else { tile.style.setProperty("display", "none", "important"); } } }