{"version":3,"names":[],"mappings":"","sources":["search.js"],"sourcesContent":["import * as capSvc from './services/capService.js';\r\nimport searchRequestModel from './models/searchRequestModel.js'\r\nimport searchDisplayModel from \"./models/searchDisplayModel.js\";\r\nimport {footer} from \"./searchFooter.js\";\r\nimport {keyTabNavigation} from \"../utilities/navigation.js\";\r\n\r\nwindow.loadJobDetail = loadJobDetail;\r\nwindow.hideCaliNotice = hideCaliNotice;\r\nwindow.acceptGdpr = acceptGdpr;\r\ncapSvc.checkReferral();\r\nlet prevBrandId = sessionStorage.getItem('prevBrandId')\r\nlet brandId;\r\nbrandId = capSvc.getBrand();\r\ncapSvc.injectTags(\"JobSearch\");\r\n\r\nlet direction = \"asc\"\r\nconst columns = [\r\n {path: \"title\", name: \"Title\", justification: \"text-left\"},\r\n {path: \"id\", name: \"ID\", justification: \"text-left\"},\r\n {path: \"positionType\", name: \"Position Type\", justification: \"text-left\"},\r\n {path: \"city\", name: \"City\", justification: \"text-left\"},\r\n {path: \"stateProvince\", name: \"State\", justification: \"text-center\"},\r\n {path: \"datePosted\", name: \"Date Posted\", justification: \"text-center\"}\r\n];\r\nif(sessionStorage.getItem('brandId') === 'staffmarkgroup') {\r\n columns.push({path: \"brandName\", name: \"Brand\", justification: \"text-left\"})\r\n};\r\n\r\ncolumns.push({path: \"isRemote\", name: \"Remote\", justification: \"text-center\"})\r\n\r\nlet bodyRequest = null\r\nif(sessionStorage.getItem('bodyRequest') === null || brandId !== prevBrandId){\r\n console.log('reset search params')\r\n bodyRequest = searchRequestModel\r\n sessionStorage.setItem('bodyRequest', JSON.stringify(bodyRequest))\r\n}else{\r\n bodyRequest = JSON.parse(sessionStorage.getItem('bodyRequest'))\r\n}\r\n\r\nlet displayData = searchDisplayModel\r\nconst searchDiv = document.getElementById(\"brandBody\");\r\n\r\nsearchDiv.innerHTML =\r\n `\r\n
${totalResults} Positions Found
\r\n${name}\r\n \r\n | `\r\n )).join('')}\r\n\t\t\t\t\t\t
---|
Sorry, we couldn't find any positions matching your criteria.
\r\n