'+''+'
'+'
'+'
',buttons:{formSubmit:{text:decodeURIComponent(data.btn.replace(/\+/g,' ')),btnClass:'btn-blue',action:function(){var allow=this.$content.find('#chkAgree').is(':checked');if(!allow){$.alert({title:decodeURIComponent(data.title_error.replace(/\+/g,' ')),theme:'box-custom',useBootstrap:false,content:decodeURIComponent(data.content_error.replace(/\+/g,' ')),});return false;} $("#frmispolicy").submit();}}},});}} function shareHandler(onSite,url,title){url=url||window.location.href;title=title||'';let prefix='https:/'+'/';let shareUrl='';switch(onSite){case'facebook':shareUrl=`${prefix}www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;break;case'gmail':shareUrl=`${prefix}mail.google.com/mail/u/0/?view=cm&fs=1&to&su=${encodeURIComponent(title)}&body=${encodeURIComponent(url)}`;break;case'mail':shareUrl=`mailto:?subject=${encodeURIComponent(title)}&body=${encodeURIComponent(url)}`;break;case'zalo':shareUrl=`${prefix}zalo.me/?u=${encodeURIComponent(url)}`;break;case'linkedin':shareUrl=`${prefix}www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}`;break;default:console.log('sharing error!') return;} window.open(shareUrl,'_blank');} (function($){$.fn.loadingShow=function(){this.each(function(){var $element=$(this);$element.css("position","relative");$element.append(`
`);});return this;};})(jQuery);(function($){$.fn.loadingHide=function(){this.each(function(){var $element=$(this);$element.css("position","");$element.find("#loading_page").remove();});return this;};})(jQuery);var arrDataEmpID=[];function getEmpEocID(){var arrEmpID=[];$('.job-item a.company-name:not').each(function(i,item){var empID=$(this).attr("data-empid");if(empID!=''&&empID!=undefined&&!arrEmpID.includes(empID)&&!arrDataEmpID[empID]){arrEmpID.push(empID);}}) if(arrEmpID.length>10){let groups=[];for(let i=0;i0){var data=JSON.stringify({"ids":ids});$.ajax({type:"post",url:DOMAIN_KV+"/get-emp-eoc.json",data:data,dataType:"json",success:function(response){if(response.status==1){$.each(response.data,function(index,item){arrDataEmpID[index]=item;});} parseHtmlEOCBadge(arrDataEmpID);}});}} function parseHtmlEOCBadge(data){if(data){$('.job-item a.company-name').each(function(i,item){var empID=$(this).attr("data-empid") if(arrDataEmpID[empID]){var jobItemParent=$(this).closest('.job-item');var labelWinner=jobItemParent.find('.label-winner');if(labelWinner.length>0){if(jobItemParent.hasClass('has-icon')){jobItemParent.removeClass('has-icon') jobItemParent.addClass('has-both')}else{jobItemParent.addClass('has-badge')} if(!jobItemParent.hasClass('job-security')){labelWinner.html(`

${arrDataEmpID[empID].PRIZE_NAME}

`);}}}})} return'';} function resetFormWithChosen(formSelector){$(formSelector)[0].reset();$(formSelector+' .chosen-select').chosen('destroy').chosen();$(formSelector+' .chosen-select-max-three').chosen('destroy').chosen({max_selected_options:3});$(formSelector+' .chosen-select-max-five').chosen('destroy').chosen({max_selected_options:5});} function show_noti_promise(type,content,more_link,icon,multi){return new Promise((resolve,reject)=>{try{const class_type=type===1?'success-modal':'remove-modal';content=content||(type===1?language.popup_msg_success:language.popup_msg_error);let txt_icon;if(icon){txt_icon=icon;}else{txt_icon=type===1?'./img/icon-success.png':'./img/icon-error.png';} more_link=more_link||'';const txt_multi=multi?1:0;if(txt_multi===0){$.fancybox.close('all');} const html_popup=`
`;$.fancybox.open(html_popup,{afterClose:()=>{resolve();},clickSlide:'close',clickOutside:'close',touch:false});$(document).on('click','.fancybox-slide',function(e){if($(e.target).is('.fancybox-slide')){resolve();}});}catch(error){reject(error);}});} document.addEventListener('DOMContentLoaded',()=>{const tables=document.querySelectorAll('.text-industryInfo table');tables.forEach((table)=>{const wrapper=document.createElement('div');wrapper.style.overflowX='auto';wrapper.style.width='100%';table.parentNode.insertBefore(wrapper,table);wrapper.appendChild(table);});});function formatFileSize(fileSize){if(fileSize&&Number(fileSize)>0){const sizeInKB=(fileSize/1024).toFixed(1);return sizeInKB>1024?(sizeInKB/1024).toFixed(1)+' MB • Completed':sizeInKB+' KB • Completed';} return'0 KB • Completed';} document.addEventListener('DOMContentLoaded',()=>{const trackingElements=document.querySelectorAll('[data-tracking]');trackingElements.forEach(element=>{element.addEventListener('click',()=>{const key=element.dataset.trackingKey;let des=element.dataset.trackingDes||'';des=`pathUrl:${window.location.pathname}${' '}|${' '}Des:${des}`;if(typeof trackingEvent==='function'){trackingEvent({key,des});}});});});function trackingEvent(data){$.ajax({url:ROOT_KIEMVIEC+'jobseekers/tracking-event',type:'POST',data:data,});} /*matching-libary.js*/ var matchingJob=[];function checkmatchingAll(lsJobIdMatching,force=false){if(memberLogin=='yes'||force){const resume_id=localStorage.getItem('resume_id_matching');const latestMatchingType=localStorage.getItem('latest_matching_type')||'cv_resume';const resumeData=localStorage.getItem('resumeData')?JSON.parse(localStorage.getItem('resumeData')):null;let json_data={'lsJob':lsJobIdMatching,'lang':CURRENT_LANGUAGE};if(latestMatchingType==='resume_upload'&&resumeData){json_data={...json_data,'resume_data':JSON.stringify(resumeData.data)};}else if(!latestMatchingType||latestMatchingType==='cv_resume'){json_data={...json_data,'resume_id':resume_id};} $.ajax({type:'POST',url:ROOT_KIEMVIEC+'check-matching',data:json_data,dataType:'json',async:true}).done(function(res){if(res.status==1){$.each(res.data,function(key,item){let idItemJob="matching_robot_"+item.job_id;let idItemJobMobile="matching_robot_mobile_"+item.job_id;let score=item.score;if(score!=false){showRobotRanking(idItemJob,score);showRobotRankingMobile(idItemJobMobile,score);}else{$(`#${idItemJob}${' .matching-ai-pc'}`).remove();$(`#${idItemJobMobile}${' svg'}`).remove();}});}});}} function lazyloadmatching(force=false) {$('.matching-scores').hide();let lsJobIdMatching=[];$('.matching-scores:not(.matching-scores-checking)').each(function(){let dataId=$(this).attr('dataid');if(lsJobIdMatching.includes(dataId)){return;} lsJobIdMatching.push(dataId);});if(lsJobIdMatching.length>0) checkmatchingAll(lsJobIdMatching,force);} function showRobotRanking(targetId,score){const renderer=new JobSeekerRankingBot(targetId,{percentage:score,},CURRENT_LANGUAGE) renderer.render();} function showRobotRankingMobile(targetId,score){const renderer=new JobSeekerRankingBot(targetId,{percentage:score,device:'mobile'},CURRENT_LANGUAGE) renderer.render();} $(document).ready(function(){lazyloadmatching();});