"Leave Calculation" Discussions/Downloads - Cite.Co (2024)

"Leave Calculation" Discussions/Downloads - Cite.Co (1) "Leave Calculation" Discussions/Downloads - Cite.Co (2)

"Leave Calculation" Discussions/Downloads - Cite.Co (5)

Post New

My Library

#Tags

Members

Market

No Tags Found!

Trending

☰Home#Higher Studies #Mba Admission #Resign Immediately #New Employee #Increment Letter #Resignation Email #Retaining Allowance #Contract Labour #Termination Policy #Gross Salary #Income Tax #Form 11 #Performance Management #Minimum Wages #Pf Account #Provident Fund #Statutory Compliance #Best Practices #Labor Laws #Human Resource #Charge Sheet

Discussions and downloads related to "#Leave Calculation". Help out users who have questions on this topic from your experiences and knowledge or share your own query. Register Here to contribute and learn.

Start A New Discussion →
'+ ''+ ''+ ''; }); return folderHtml; } function selectForMove(id, prefix) { $(".participation-box").not($('#'+prefix+'folder_id_'+id)).removeClass('active'); $('#'+prefix+'folder_id_'+id).toggleClass('active'); $('#movableFolderId').val(id); } function filterThreads(id, prefix) { $(".dirlist").not($('#'+prefix+'folder_id_'+id)).removeClass('active'); $('#'+prefix+'folder_id_'+id).toggleClass('active'); $("div.threadfilter > div.participation-box").each(function(){ if($('#'+prefix+'folder_id_'+id).hasClass('active')) { $(this).toggle($(this).data('folderid') === id); } else { $(this).show(); } }); } function moveToDirectory() { var movableThreadId = $("#movableThreadId").val(); var movableFolderId = $("#movableFolderId").val(); $.post({ url:"/authyfi.php", data:{ action: 'moveThreadToFolder', threadId: movableThreadId, folderId: movableFolderId }, dataType: 'text' }).done(function( data ) { toastr.success('Thread moved successfully.'); $("#movableThreadId").val(''); $("#movableFolderId").val(''); if ( $('#participation-options-wrapper-'+movableThreadId)) { $('#participation-options-wrapper-'+movableThreadId).toggleClass('active'); } $('#mangeThreadModal').modal('hide'); }); } function openThreadManageDailog(threadId, prefix) { $('#mangeThreadModal').modal('show'); $("#movableThreadId").val(threadId); $("#movableThreadPrefix").val(prefix); $.post({ url:"/authyfi.php", data:{ action: 'getUserSubFolders'}, dataType: 'text' }).done(function( data ) { $("#folderlist").html(prepareDirectoryList(data, prefix)); }); } function createNewDirectory() { var newDirectoryValue = $("#createNewDirectory").val(); var newDirectoryPrefix = $("#movableThreadPrefix").val(); $.post({ url:"/authyfi.php", data:{ action: 'addUserSubFolders', newDirectoryValue: newDirectoryValue}, dataType: 'text' }).done(function( data ) { if (data) { $("#createNewDirectory").val(''); toastr.success('New directory created successfully.'); $("#folderlist").html(prepareDirectoryList(data, newDirectoryPrefix)); } }); } function removeDirectory(id, prefix) { $.post({ url:"/authyfi.php", data:{ action: 'removeUserSubFolders', did: id}, dataType: 'text' }).done(function( data ) { if (data) { toastr.success('Directory removed successfully.'); $("#folderlist").html(prepareDirectoryList(data, prefix)); } }); } function openUnsubscribeDailog(threadId, prefix) { $('#mangeThreadModal').modal('show'); $("#movableThreadId").val(threadId); $("#movableThreadPrefix").val(prefix); $.post({ url:"/authyfi.php", data:{ action: 'getUserSubFolders'}, dataType: 'text' }).done(function( data ) { $("#folderlist").html(prepareDirectoryList(data, prefix)); }); } function validateEmail(email){ return String(email) .toLowerCase() .match( /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ ); } function shareLinkOnEmail() { var sharableThreadIdValue = $("#sharableThreadId").val(); var shareRequestFromValue = $("#shareRequestFrom").val(); var sharableEmailValue = $("#emailShare").val(); var isValidEmail = validateEmail(sharableEmailValue); if (isValidEmail && sharableThreadIdValue && sharableEmailValue) { $.post({ url:"/authyfi.php", data:{ action: 'shareViaEmail', email: sharableEmailValue, thread_id:sharableThreadIdValue, shareVia:shareRequestFromValue }, dataType: 'text' }) .done(function( data ) { toastr.success('Linked shared on email successfully.'); setTimeout(function(){ $('#shareViaEmailModal').modal('hide'); if(shareRequestFromValue != 'search') { if ( $('#participation-options-wrapper-'+sharableThreadIdValue)) { $('#participation-options-wrapper-'+sharableThreadIdValue).toggleClass('active'); } } }, 1000); }); } else { alert('invalid email address'); } } function copyThreadLink(id, flag) { navigator.clipboard.writeText(window.location.protocol + '//' + window.location.host + '/showthread.php?t='+id); toastr.success('Linked copied successfully.'); if ( $('#participation-options-wrapper-'+id) && flag) { $('#participation-options-wrapper-'+id).toggleClass('active'); } } function myFilterFunction() { document.getElementById('myFilter').classList.toggle('show'); } function myLeadersFilterFunction() { document.getElementById('myLeadersFilter').classList.toggle('show'); } function loadMoreLeaders() { $("#load-more-button-leader").hide(); $("#spinner-leaders").show(); $.post({ url:"/authyfi.php", data:{ action: 'getLeaders', filter:$('#currentLeaderPostLike').val(), page: $('#leaderCurrentPage').val()}, dataType: 'text' }).done(function( data ) { //add code here $("#leader-list").append(data); $("#spinner-leaders").hide(); $("#load-more-button-leader").show(); $('#leaderCurrentPage').val(parseInt($('#leaderCurrentPage').val()) + 1); }); } function getLeaderPostLikes() { var countryPostLikes = document.getElementById('post-like-leaders-select2'); var data = [ { title: 'Posts', value: 'filter_by_post' }, { title: 'Likes', value: 'filter_by_like' }, ]; data.forEach( function (item) { var option = document.createElement('option'); option.text = item.title; option.value = item.value; countryPostLikes.appendChild(option); }); } function formatLeaderPostLike(post) { if (!post.id) { return post.text; } var post = $('' + post.text + ''); return post; } function onClickLeadersApply() { var selectedLeaderPostLike = document.getElementById('post-like-leaders-select2').value; $('#currentLeaderPostLike').val(selectedLeaderPostLike); $("#leader-list").empty(); $('#leaderCurrentPage').val(1); loadMoreLeaders(); } function onClickLeadersReset() { $('#post-like-leaders-select2').val(''); $('#post-like-leaders-select2').trigger('change'); $('#currentLeaderPostLike').val(''); $("#leader-list").empty(); $('#leaderCurrentPage').val(1); loadMoreLeaders(); } function loadMoreMembers() { $("#load-more-button-week-members").hide(); $("#spinner-member").show(); $.post({ url:"/authyfi.php", data:{ action: 'getMemberList', page: $('#mamweekCurrentPage').val()}, dataType: 'text' }).done(function( data ) { //add code here $("#member-week-list").append(data); $("#spinner-member").hide(); $("#load-more-button-week-members").show(); $('#mamweekCurrentPage').val(parseInt($('#mamweekCurrentPage').val()) + 1); }); } function loadMoreLatestMembers() { $("#load-more-button-latest-reg").hide(); $("#spinner-member-latest").show(); $.post({ url:"/authyfi.php", data:{ action: 'getLatestMemberList', page: $('#latestRegCurrentPage').val()}, dataType: 'text' }).done(function( data ) { //add code here $("#main-member-list").append(data); $("#spinner-member-latest").hide(); $("#load-more-button-latest-reg").show(); $('#latestRegCurrentPage').val(parseInt($('#latestRegCurrentPage').val()) + 1); }); } function loadMoreCityMembers() { $("#load-more-button-city").hide(); $("#spinner-city-member").show(); $.post({ url:"/authyfi.php", data:{ action: 'getMemberListByLocation', city: $('#currentCity').val(), country: $('#currentCountry').val(), filter:$('#currentPostLike').val(), page: $('#cityCurrentPage').val()}, dataType: 'text' }).done(function( data ) { //add code here if(data.includes("No member(s) found in")) { $("#city-member-list").append(data); $("#spinner-city-member").hide(); $("#load-more-button-city").hide(); } else { $("#city-member-list").append(data); $("#spinner-city-member").hide(); $("#load-more-button-city").show(); $('#cityCurrentPage').val(parseInt($('#cityCurrentPage').val()) + 1); } }); cityMembersCount(); } function cityMembersCount() { $.post({ url:"/authyfi.php", data:{ action: 'getMemberCountByLocation', city: $('#currentCity').val(), country: $('#currentCountry').val(), filter:$('#currentPostLike').val(), page: $('#cityCurrentPage').val()}, dataType: 'text' }).done(function( data ) { //add code here $('#totalCityMembers').text('Total members : ' + data); }); } function getCountryData() { $.post({ url:"/authyfi.php", data:{ action: 'getCountryList'}, dataType: 'json' }).done(function( data ) { var countrySelect = document.getElementById('country-select2'); data.sort(function(a, b) { return a.name.common.localeCompare(b.name.common); }); countryList = data; var selectedData = data.filter(function(a) { return a.name.common === $('#currentCountry').val(); }); data.forEach( function (country) { var option = document.createElement('option'); option.text = country.name.common; option.value = country.cca2; countrySelect.appendChild(option); }); if(selectedData){ $('#country-select2').val(selectedData[0].cca2); $('#country-select2').trigger('change'); } }); } function formatCountry(country) { if (!country.id) { return country.text; } var country = $('' + country.text + ''); return country; } function getCities() { $('#post-like-select2').val(''); $('#post-like-select2').trigger('change'); var selectedCountry = document.getElementById('country-select2').value; if(selectedCountry){ fetch('https://countriesnow.space/api/v0.1/countries/cities/q?iso2='+selectedCountry) .then((response) => response.json()) .then((data) => { var citySelect = document.getElementById('city-select2'); citySelect.innerHTML = ''; var selectedCityData = data.data.filter(function(a) { return a === $('#currentCity').val(); }); data.data.forEach((city) => { const option = document.createElement('option'); option.text = city; option.value = city; citySelect.appendChild(option); }); if(selectedCityData){ $('#city-select2').val(selectedCityData[0]); $('#city-select2').trigger('change'); } }); } } function formatCity(city) { if (!city.id) { return city.text; } var city = $('' + city.text + ''); return city; } function getCityName() { var selectedCity = document.getElementById('city-select2').value; $('#currentCity').val(selectedCity); var selectedCountryAlpha = document.getElementById('country-select2').value; var selectedfinalData = countryList.filter(function(a) { return a.cca2 === selectedCountryAlpha; }); $('#currentCountry').val(selectedfinalData[0].name.common); if(!document.getElementById('myFilter').classList.contains('show')) { loadMoreCityMembers(); } } function getPostLikes() { var countryPostLikes = document.getElementById('post-like-select2'); var data = [ { title: 'Posts', value: 'filter_by_post' }, { title: 'Likes', value: 'filter_by_like' }, ]; data.forEach( function (item) { var option = document.createElement('option'); option.text = item.title; option.value = item.value; countryPostLikes.appendChild(option); }); $('#post-like-select2').select2({ templateResult: formatPostLike, }); } function formatPostLike(post) { if (!post.id) { return post.text; } var post = $('' + post.text + ''); return post; } function onClickApply() { var selectedCity = document.getElementById('city-select2').value; $('#currentCity').val(selectedCity); var selectedCountry1 = document.getElementById('country-select2').value; var selectedfinalData = countryList.filter(function (a) { return a.cca2 === selectedCountry1; }); if (selectedfinalData.length > 0) { $('#currentCountry').val(selectedfinalData[0].name.common); } var selectedPostLike = document.getElementById('post-like-select2').value; $('#currentPostLike').val(selectedPostLike); $("#city-member-list").empty(); $('#cityCurrentPage').val(1); loadMoreCityMembers(); } function onClickReset() { $('#currentPostLike').val(''); $('#currentCountry').val($('#loginUserCountry').val()); $('#currentCity').val($('#loginUserCity').val()); getCountryData(); $("#city-member-list").empty(); $('#cityCurrentPage').val(1); loadMoreCityMembers(); } $(document).ready(function () { $("#newMenu").delay(150).animate({ "background-color": "#ef6730" }, 350, function () { $("#newMenu").animate({ "background-color": "#c2e7ff" }, 200); $("#newMenu").delay(150).animate({ "background-color": "#ef6730" }, 350, function () { $("#newMenu").animate({ "background-color": "#c2e7ff" }, 200); }); }); }); if(window.location.pathname === '/members.php') { loadMoreLeaders(); $('#post-like-leaders-select2').select2({ templateResult: formatLeaderPostLike, }); getLeaderPostLikes(); loadMoreMembers(); loadMoreLatestMembers(); var countryList = []; $('#country-select2').select2({ templateResult: formatCountry, }); getCountryData(); $('#city-select2').select2({ templateResult: formatCity, }); getPostLikes(); } if(window.location.pathname === '/market.php' || window.location.pathname === '/market' || window.location.pathname === '/market/') { getUnreadNotifications(); getJobList(); getCompanyList(); $('#closeIcon').on('click', function () { $('#search-input').val(''); $('#closeIcon').addClass('d-none'); applyFilter(''); }); let registerEventFlag = false; getJobCountryList('job-country-select'); getJobCountryList('event-country-select'); } if (window.location.pathname === '/marketAddJob.php') { if (window.location.href.split('?').length > 1) { if (window.location.href.split('?')[1].split('=')[1].includes('Job')) { let selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; selectForm('job-tab',selectedId); } if (window.location.href.split('?')[1].split('=')[1].includes('Event')) { let selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; selectForm('event-tab',selectedId); } if (window.location.href.split('?')[1].split('=')[1].includes('Offers')) { let selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; if (!selectedId) { $('#offer-img').addClass('d-none'); } selectForm('offer-tab',selectedId); } } // getCompanyList(); getJobCountryList('job-country-select2'); } if (window.location.pathname === '/marketSingleInteraction.php') { getMyJobPosting(); } if(window.location.pathname === '/marketDetail.php') { if ($('#detail_mode').val() === 'event') { getEventList(); // getSingleInteraction('event',$("#detail_item").val()); } if ($('#detail_mode').val() === 'job') { getJobList(); // getSingleInteraction('job',$("#detail_item").val()); } if ($('#detail_mode').val() === 'offering') { getOfferingsList(); // getSingleInteraction('offer',$("#detail_item").val()); } } if(window.location.pathname === '/library.php') { const suggestionEl = document.getElementById('suggestions'); $('#closeIcon').on('click', function () { $('#search-input').val(''); $('#closeIcon').addClass('d-none'); suggestionEl.innerHTML = ''; }); function onChangeInput(e, type) { if (e.target.value.length) { $('#closeIcon').removeClass('d-none'); } else { $('#closeIcon').addClass('d-none'); } const inputVal = e.target.value.toLowerCase(); var key = e.which; if (key == 13) { $.post({ url:"/authyfi.php", data:{ action: 'searchPostAndFiles', searchType: type, searchTerm: inputVal}, dataType: 'json' }).done(function( data ) { if (data != '') { let suggestionValues = ''; data.forEach( function (item) { suggestionValues += '
  • '+ '

    '+item.title+'

    '+ '

    '+ '

    '+ '"Leave Calculation" Discussions/Downloads - Cite.Co (68)'+ '

    '+ '

    '+ '"Leave Calculation" Discussions/Downloads - Cite.Co (69)'+ '

    '+ '

    '+ '
  • '; }); suggestionEl.innerHTML = suggestionValues; } }); } } function selectOption(postid, type) { if (type == 'byPostTitle' || type == 'bySubscription') { window.open(window.location.protocol + '//' + window.location.host + '/showthread.php?t='+postid, '_blank').focus(); } else if (type == 'byFileName') { window.open(window.location.protocol + '//' + window.location.host + '/attachment.php?attachmentid='+postid, '_blank').focus(); } } function selectCopy(postid, type) { if (type == 'byPostTitle' || type == 'bySubscription') { navigator.clipboard.writeText(window.location.protocol + '//' + window.location.host + '/showthread.php?t='+postid); toastr.success('Post link copied successfully.'); } else if (type == 'byFileName') { navigator.clipboard.writeText(window.location.protocol + '//' + window.location.host + '/attachment.php?attachmentid='+postid); toastr.success('File link copied successfully.'); } } function selectShare(postid, type) { $('#closeIcon').click(); $('#shareViaEmailModal').modal('show'); $("#sharableThreadId").val(postid); $("#shareRequestFrom").val(type); } } /* Marketplace */ function applyForJobs(){ $('#applyJobModal').modal('show'); } function getUnreadNotifications() { $.post({ url:"/marketplaceApi.php", data: {action: 'getUserNotificationsAll'}, }).done( function (response) { if (response && response > 0) { $('#main_unread_counter').html('('+response+')'); } else { $('#main_unread_counter').html(''); } }); } /* Delete company */ function deleteCompany(){ var companyId = $('#selectedCompanyId').val() $.post({ url:"/marketplaceApi.php", data: {action: 'deleteCompany', id: companyId}, }).done( function (response) { if (response) { toastr.success('Company removed successfully'); $('#confirmDeleteModal').modal('hide'); $("#addCompanyModal").modal('show'); getCompanyList(); setTimeout(() => { showCompanyModal(); }, 1000); } }) } function deleteJob(){ $('#confirmDeleteJobModal').modal('hide'); var mainJobId = $('#selectedDeleteJobId').val() $.post({ url:"/marketplaceApi.php", data: {action: 'deleteJob', id: mainJobId}, }).done( function (response) { if (response) { toastr.success('Job removed successfully'); $('#confirmDeleteModal').modal('hide'); getJobList(); } }) } function deleteEvent(){ $('#confirmDeleteEventModal').modal('hide'); var mainJobId = $('#selectedDeleteEventId').val() $.post({ url:"/marketplaceEventApi.php", data: {action: 'deleteEvent', id: mainJobId}, }).done( function (response) { if (response) { toastr.success('Event removed successfully'); // $('#confirmDeleteModal').modal('hide'); getEventList(); } }) } function deleteOffering(){ $('#confirmDeleteOfferingModal').modal('hide'); var mainJobId = $('#selectedDeleteOfferingId').val() $.post({ url:"/marketplaceOfferApi.php", data: {action: 'deleteOffer', id: mainJobId}, }).done( function (response) { if (response) { toastr.success('Offering removed successfully'); // $('#confirmDeleteModal').modal('hide'); getOfferingsList(); } }) } function addCustomCompany(){ $('#addOtherCompanyModal').modal('show'); getJobCountryList('job-country-select3'); } function onChangeSearch(e){ if (e.target.value.length) { $('#closeIcon').removeClass('d-none'); } else { $('#closeIcon').addClass('d-none'); } const inputVal = e.target.value.toLowerCase(); var key = e.which; if (key == 13) { applyFilter(inputVal); } } function onChangeSearchEvent(e) { if (e.target.value.length) { $('#closeIcon').removeClass('d-none'); } else { $('#closeIcon').addClass('d-none'); } const inputVal = e.target.value.toLowerCase(); var key = e.which; if (key == 13) { applyEventFilter(inputVal); } } function applyFilter(searchString){ var payload = { action: 'getAllJobs', f_experience: $('#filter-experience').val(), f_salary: $('#filter-salary').val(), f_country: $('#job-country-select option:selected').text() !== 'All' ? $('#job-country-select option:selected').text() : '', f_city: $('#job-city-select').val(), f_emp_type: $('#filter-emp-type').val(), s_term: '' }; if (searchString || $('#search-input').val()) { searchString = $('#search-input').val(); payload['s_term'] = searchString; } else { delete payload['s_term']; } getJobList(true,payload); } function resetFilter(){ $('#filter-experience').val(''); $('#filter-salary').val(''); $('#filter-emp-type').val(''); $('#search-input').val('') getJobList(false); } function applyEventFilter(searchString){ var payload = { action: 'getAllEvents', f_category: $('#filter-category').val(), f_price: $('#filter-price').val(), f_date: $('#event-date').val(), s_term: '' }; if (searchString || $('#search-event-input').val()) { searchString = $('#search-event-input').val(); payload['s_term'] = searchString; } else { delete payload['s_term']; } getEventList(true,payload); } function applyOfferingsFilter(searchString) { var payload = { action: 'getAllOffers', f_category: $('#filter-offer-category').val(), f_acquirement: $('#filter-offer-acquire').val(), s_term: '' }; if (searchString || $('#search-offerings-input').val()) { searchString = $('#search-offerings-input').val(); payload['s_term'] = searchString; } else { delete payload['s_term']; } getOfferingsList(true,payload); } function resetEventFilter(){ $('#filter-category').val(''); $('#filter-offer-acquire').val(''); $('#filter-price').val(''); $('#search-event-input').val(''); getEventList(false); } function resetOfferingsFilter(){ $('#filter-offer-category').val(''); $('#search-offerings-input').val('') getOfferingsList(false); } function getJobList(isFilterApplied, payload) { $("#jobListRef").empty(); var jobId = $("#detail_item").val() var data = []; $.post({ url:"/marketplaceApi.php", data: isFilterApplied ? payload : {action: 'getAllJobs', id: jobId}, dataType: 'json' }).done(function( data ) { var selectedJobId = 0; $("#jobListRef").innerHTML = ''; $('#filterCount').html('' + data.length + ''); // html += ' ' + data[index].experience + ''; var html = ''; for (var index = 0; index < data.length; index++) {// OLD IMPL. html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; if (!jobId) { html += '

    ' + data[index].title + '

    '; } else { html += '

    ' + data[index].title + '

    '; } html += '

    '; html += '' + data[index].company_name + ' | ' + ''; html += ''; html += ' Location: ' + data[index].location + ''; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; if((0 && 0 != data[index].owner) || isAdmin) { // html += '

    '; html += ''; // html += '

    ' } else if (!0) { // html += '

    '; html += ''; html += '

    '; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (70)'; html += ''; html += '

    '; // html += '

    '; } if ((0 && 0 == data[index].owner) || isAdmin){ html += '

    '; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (71)'; html += ''; html += ''; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (73)'; html += '

    '; } html += '

    '; // if (!jobId) { // html += '

    ' // } html += '

    '; html += '

    '; // job-main-parent end // SHOW/HIDE section html += '

    '; html += '

    '; html += '

    '; html += '

    ' +data[index].experience+ '

    '; html += '

    '; html += '

    '; html += '

    ' +data[index].salary_range+ '

    '; html += '

    '; data[index].tags.map(function(el) { var formatel = el.replace(" ", ""); html += '

    ' + formatel + '

    ';}); html += '

    '; if (jobId) { html += '

    ' + data[index].description + '

    '; } html += ' Valid Till : ' + data[index].fromDate + '-' + data[index].toDate + ''; html += '

    '; // SHOW HIDE SECTION END html += '

    '; html += '

    '; } var htmlElement = $(html); $("#jobListRef").append(htmlElement); if (jobId) { viewApplication(0,data[0].job_id,true,1); } });}function getEventList(isFilterApplied, payload) { var eventId = $("#detail_item").val() $.post({ url:"/marketplaceEventApi.php", data: isFilterApplied ? payload : {action: 'getAllEvents',id: eventId}, dataType: 'json' }).done(function (data) { $("#eventListRef").html('') $('#eventFilterCount').html('' + data.length + ''); // html += ' ' + data[index].experience + ''; var html = ''; for (var index = 0; index < data.length; index++) { html += '

    '; html += '

    '; html += '

    '; html += '

    '; if (!eventId) { html += '

    ' + data[index].title + '

    '; } else { html += '

    ' + data[index].title + '

    '; } html += '

    '; html += '' + data[index]['company_name'] + ''; html += ''; html += ' Location: ' + data[index]['location'] + ''; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; if((0 && 0 != data[index].owner) || isAdmin) { // html += '

    '; html += ''; // html += '

    ' } else if (!0) { // html += '

    '; html += ''; html += '

    '; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (74)'; html += ''; html += '

    '; // html += '

    '; } if ((0 && 0 == data[index].owner) || isAdmin){ html += '

    '; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (75)'; html += ''; html += ''; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (77)'; html += '

    '; } html += '

    '; // if (!eventId) { // html += '

    ' // } html += '

    '; html += '

    '; // SHOW/HIDE section html += '

    '; html += '

    '; data[index].tags.map(function(el) { var formatel = el.replace(" ", ""); html += '

    ' + formatel + '

    ';}); html += '

    '; if (eventId) { html += '

    ' + data[index].description + '

    '; } html += ' Deadline : ' + data[index].fromDate + ''; html += ' Last date of registration : ' + data[index].toDate + ''; html += '

    '; // SHOW/HIDE section END html += '

    '; html += '

    '; } var htmlElement = $(html); $("#eventListRef").append(htmlElement); if (eventId) { viewApplication(0,data[0].event_id,true,2); } })}function getOfferingsList(isFilterApplied, payload){ var offerId = $("#detail_item").val() $.post({ url:"/marketplaceOfferApi.php", data: isFilterApplied ? payload : {action: 'getAllOffers',id: offerId}, dataType: 'json' }).done(function (data) { $("#offeringsListRef").html('') $('#offeringsFilterCount').html('' + data.length + ''); // html += ' ' + data[index].experience + ''; var html = ''; for (var index = 0; index < data.length; index++) { html += '

    '; html += '

    ' html += '

    '; html += '

    '; if (!offerId) { html += '

    ' + (data[index].offer_acquire_type === 'provide' ? 'PROVIDING' : 'REQUIRED') + ' | ' + data[index].title + '

    '; } else { html += '

    ' + (data[index].offer_acquire_type === 'provide' ? 'PROVIDING' : 'REQUIRED') + ' | ' + data[index].title + '

    '; } html += '

    '; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; if((0 && 0 != data[index].owner) || isAdmin) { // html += '

    '; html += ''; // html += '

    '; } else if (!0) { // html += '

    '; html += ''; html += '

    '; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (78)'; html += ''; html += '

    '; // html += '

    '; } if ((0 && 0 == data[index].owner) || isAdmin){ html += '

    '; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (79)'; html += ''; html += ''; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (81)'; html += '

    '; } html += '

    '; html += '

    '; // if (!offerId) { // html += '

    ' // } html += '

    '; // SHOW/HIDE section html += '

    '; if (data[index].tags.length) { html += '

    '; data[index].tags.map(function(el) { var formatel = el.replace(" ", ""); html += '

    ' + formatel + '

    ';}); html += '

    '; } if (offerId) { html += '

    ' + data[index].description + '

    '; if (data[index].additional_info !== '') { html += '' + data[index].additional_info + ''; } } html += ' Price Range : ' + data[index].price_range + ''; html += '

    '; // SHOW/HIDE section END html += '

    '; html += '

    '; } var htmlElement = $(html); $("#offeringsListRef").append(htmlElement); if (eventId) { viewApplication(0,data[0].offer_id,true,3); } });} function getMyJobPosting(){ $("#main_unread_counter").html(''); $("#main_unread_counter").hide(); $.post({ url:"/marketplaceApi.php", data:{ action: 'getUserJobs'}, dataType: 'json' }).done(function( data ) { let myJobPost = data; $("#jobPostingRef").innerHTML = ''; var html = ''; for (let index = 0; index < myJobPost.length; index++) { html += '

    '; html += '

    '; html += '

    '; html += '

    ' + 'JOB | ' + myJobPost[index].title + '

    '; // html += '

    ' + 'JOB | ' + myJobPost[index].title + '

    '; html += '

    '; html += ''; html += ' Location: ' + myJobPost[index].location + ''; html += ''; html += '

    '; html += '

    '; // html += '

    ' + myJobPost[index].description + '

    '; html += '

    '; if(0) { html += ''; // if (myJobPost[index].total_application !== '0') { html += '' + myJobPost[index].total_application + ''; // } } html += '

    '; html += '

    '; html += ''; html += '

    '; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); $("#jobPostingRef").html(''); $("#jobPostingRef").append(htmlElement); getMyEventPosting(); }); } function getMyEventPosting(){ $.post({ url:"/marketplaceEventApi.php", data:{ action: 'getUserEvents'}, dataType: 'json' }).done(function( data ) { let myEventPost = data; var html = ''; for (let index = 0; index < myEventPost.length; index++) { html += '

    '; html += '

    '; html += '

    '; html += '

    ' + 'EVENT | ' + myEventPost[index].title + '

    '; // html += '

    ' + 'EVENT | ' + myEventPost[index].title + '

    '; html += '

    '; html += ''; html += ' Location: ' + myEventPost[index].location + ''; html += ''; html += '

    '; html += '

    '; html += '

    '; if(0) { html += ''; // if (myEventPost[index].total_application !== '0') { html += '' + myEventPost[index].total_application + ''; // } } html += '

    '; html += '

    '; html += ''; html += '

    '; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); $("#jobPostingRef").append(htmlElement); getMyOfferingPosting(); }); } function getMyOfferingPosting(){ $.post({ url:"/marketplaceOfferApi.php", data:{ action: 'getUserOffers'}, dataType: 'json' }).done(function( data ) { let myOfferPost = data; var html = ''; for (let index = 0; index < myOfferPost.length; index++) { html += '

    '; html += '

    '; html += '

    '; html += '

    ' + 'OFFER | ' + (data[index].offer_acquire_type === 'provide' ? 'PROVIDING' : 'REQUIRED') + ' | ' + myOfferPost[index].title + '

    '; html += '

    '; html += ''; html += ' Price Range: ' + myOfferPost[index].offer_price + ''; html += ''; html += '

    '; html += '

    '; // html += '

    ' + myOfferPost[index].description + '

    '; // if (myOfferPost[index].additional_info !== '') { // html += '' + myOfferPost[index].additional_info + ''; // } html += '

    '; if(0) { html += ''; // if (myOfferPost[index].total_application !== '0') { html += '' + myOfferPost[index].total_application + ''; // } } html += '

    '; html += '

    '; html += ''; html += '

    '; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); $("#jobPostingRef").append(htmlElement); if (!$('#jobPostingRef').children().length) { $('#jobPostingNoData').removeClass('d-none'); } }); } function getSingleInteraction(type,id) { if (type === 'job') { $.post({ url:"/marketplaceApi.php", data:{ action: 'getUserJobs', id: id}, dataType: 'json' }).done(function( data ) { let myJobPost = data; $("#jobInteractionRef").innerHTML = ''; var html = ''; for (let index = 0; index < myJobPost.length; index++) { html += '

    '; // html += '

    ' + myJobPost[index].title + '

    '; html += '

    ' + 'JOB | ' + myJobPost[index].title + '

    '; html += '

    '; html += ''; html += ' Location: ' + myJobPost[index].location + ''; html += ''; html += '

    '; // html += '

    ' + myJobPost[index].description + '

    '; if(0) { html += ''; // if (myJobPost[index].total_application !== '0') { html += '' + myJobPost[index].total_application + ''; // } } html += ''; html += '

    '; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); $("#jobInteractionRef").html(''); $("#jobInteractionRef").append(htmlElement); }); } else if(type === 'event'){ $.post({ url:"/marketplaceEventApi.php", data:{ action: 'getUserEvents',id:id}, dataType: 'json' }).done(function( data ) { let myEventPost = data; $("#eventInteractionRef").innerHTML = ''; var html = ''; for (let index = 0; index < myEventPost.length; index++) { html += '

    '; // html += '

    ' + myEventPost[index].title + '

    '; html += '

    ' + 'EVENT | ' + myEventPost[index].title + '

    '; html += '

    '; html += ''; html += ' Location: ' + myEventPost[index].location + ''; html += ''; html += '

    '; html += '

    '; myEventPost[index].tags.map(function(el) { var formatel = el.replace(" ", ""); html += '

    ' + formatel + '

    ';}); html += '

    '; // html += '

    ' + myEventPost[index].description + '

    '; if(0) { html += ''; // if (myEventPost[index].total_application !== '0') { html += '' + myEventPost[index].total_application + ''; // } } html += ''; html += '

    '; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); $("#eventInteractionRef").append(htmlElement); }); } else if(type === 'offer') { $.post({ url:"/marketplaceOfferApi.php", data:{ action: 'getUserOffers',id:id}, dataType: 'json' }).done(function( data ) { let myOfferPost = data; $("#offerInteractionRef").innerHTML = ''; var html = ''; for (let index = 0; index < myOfferPost.length; index++) { html += '

    '; // html += '

    ' + myOfferPost[index].title + '

    '; html += '

    ' + 'EVENT | ' + myEventPost[index].title + '

    '; html += '

    '; html += ''; html += ' Price Range: ' + myOfferPost[index].offer_price + ''; html += ''; html += '

    '; html += '

    '; html += '

    ' + myOfferPost[index].offer_category + '

    '; myOfferPost[index].tags.map(function(el) { var formatel = el.replace(" ", ""); html += '

    ' + formatel + '

    ';}); html += '

    '; // html += '

    ' + myOfferPost[index].description + '

    '; // if (myOfferPost[index].additional_info !== '') { // html += '' + myOfferPost[index].additional_info + ''; // } if(0) { html += ''; // if (myOfferPost[index].total_application !== '0') { html += '' + myOfferPost[index].total_application + ''; // } } html += ''; html += '

    '; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); $("#offerInteractionRef").append(htmlElement); }); } } function showJobSection(index){ $('#arrow' + index).toggleClass('rotate'); $('#additional-section-job' + index).toggleClass('d-none'); } function showEventSection(index) { $('#arrow' + index).toggleClass('rotate'); $('#additional-section-event' + index).toggleClass('d-none'); } function showOfferSection(index) { $('#arrow' + index).toggleClass('rotate'); $('#additional-section-offer' + index).toggleClass('d-none'); } function viewApplication(index, jobId, isReplace, actionType){ if (actionType == 1) { var currentJobApplicationPage = isReplace ? 1: $('#appliedJobRefPagination_'+jobId+'_'+index).val(); $.post({ url:"/marketplaceApi.php", data:{ action: 'getAppliedUserJobs', job_id: jobId, currPage: currentJobApplicationPage}, dataType: 'json' }).done(function (data) { var html = ''; if (data.length) { $('#loadMoreLatestJobApp_'+jobId+'_'+index).show(); if (+data[0].totalRecords === data.length) { $('#loadMoreLatestJobApp_'+jobId+'_'+index).hide(); } } else { if (currentJobApplicationPage === 1) { html += ' No interactions yet - please remain patient. You can copy the job link (from the job tab copy icon) and promote it on your website and other social media sites as well. '; } $('#loadMoreLatestJobApp_'+jobId+'_'+index).hide(); } if(isReplace) { $("#appliedJobRef" + index).innerHTML = ''; } for (let i = 0; i < data.length; i++) { html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += ' '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; // PART 1 applier details html+='

    ' html += '

    '; // html += '' + data[i].created_at + ''; html += '

    '; html += '

    ' + data[i].about_me + '

    '; html += '

    '; html += '

    '; data[i].skills.split(',').map(function(el) { var formatel = el.replace(" ", ""); html += '

    ' + formatel + '

    ';}); html += '

    '; html += '

    '; html += '

    '; html += ' ' + ' Download'; html += '

    '; html += '

    '; // PART 2 CHATBOX html += '

    '; html += 'Chat '; html += '

    '; data[i].comments.forEach(function (comment) { html += '

    '; html += '

    '; if(comment.user_id != 0 ) { html += ' '; } html += '

    ' + comment.comment + '

    '; html += '

    '; html += '' + comment.created_at + ''; html += '

    '; }) html += '

    '; // input html += '

    '; html += ''; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); if(isReplace) { $("#appliedJobRef" + index).html(htmlElement); } else { $("#appliedJobRef" + index).append(htmlElement); } }) } else if (actionType == 2) {// EVENT IMPL var currentJobApplicationPage = isReplace ? 1: $('#appliedEventRefPagination_'+jobId+'_'+index).val(); $.post({ url:"/marketplaceEventApi.php", data:{ action: 'getAppliedUserEvents', event_id: jobId, currPage: currentJobApplicationPage}, dataType: 'json' }).done(function (data) { var html = ''; if (data.length) { $('#loadMoreLatestEventApp_'+jobId+'_'+index).show(); if (+data[0].totalRecords === data.length) { $('#loadMoreLatestEventApp_'+jobId+'_'+index).hide(); } } else { if (currentJobApplicationPage === 1) { html += 'No interactions yet - please remain patient. You can copy the event link (from the event tab copy icon) and promote it on your website and other social media sites as well. '; } $('#loadMoreLatestEventApp_'+jobId+'_'+index).hide(); } if(isReplace) { $("#appliedEventRef" + index).innerHTML = ''; } for (let i = 0; i < data.length; i++) { html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += ' '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; // PART 1 applier details html+='

    ' html += '

    '; // html += '' + data[i].created_at + ''; html += '

    '; html += '

    ' + data[i].full_name + '

    '; html += '

    No. of guests: ' + data[i].no_of_participent + '

    '; // html += '

    '; // html += ' ' + ' Download'; // html += '

    '; html += '

    '; // PART 2 CHATBOX html += '

    '; html += 'Chat '; html += '

    '; data[i].comments.forEach(function (comment) { html += '

    '; html += '

    '; if(comment.user_id != 0 ) { html += ' '; } html += '

    ' + comment.comment + '

    '; html += '

    '; html += '' + comment.created_at + ''; html += '

    '; }) html += '

    '; // input html += '

    '; html += ''; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); if(isReplace) { $("#appliedEventRef" + index).html(htmlElement); } else { $("#appliedEventRef" + index).append(htmlElement); } }) } else if (actionType == 3) {// OFfer IMPL var currentJobApplicationPage = isReplace ? 1: $('#appliedOfferRefPagination_'+jobId+'_'+index).val(); $.post({ url:"/marketplaceOfferApi.php", data:{ action: 'getAppliedUserOffers', offer_id: jobId, currPage: currentJobApplicationPage}, dataType: 'json' }).done(function (data) { var html = ''; if (data.length) { $('#loadMoreLatestOfferApp_'+jobId+'_'+index).show(); if (+data[0].totalRecords === data.length) { $('#loadMoreLatestOfferApp_'+jobId+'_'+index).hide(); } } else { if (currentJobApplicationPage === 1) { html += ' No interactions yet - please remain patient. You can copy the offer link (from the offer tab copy icon) and promote it on your website and other social media sites as well. '; } $('#loadMoreLatestOfferApp_'+jobId+'_'+index).hide(); } if(isReplace) { $("#appliedOfferRef" + index).innerHTML = ''; } for (let i = 0; i < data.length; i++) { html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += ' '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; // PART 1 applier details html+='

    ' html += '

    '; // html += '' + data[i].created_at + ''; html += '

    '; html += '

    ' + data[i].full_name + '

    '; // html += '

    '; // html += ' ' + ' Download'; // html += '

    '; html += '

    '; // PART 2 CHATBOX html += '

    '; html += 'Chat '; html += '

    '; data[i].comments.forEach(function (comment) { html += '

    '; html += '

    '; if(comment.user_id != 0 ) { html += ' '; } html += '

    ' + comment.comment + '

    '; html += '

    '; html += '' + comment.created_at + ''; html += '

    '; }) html += '

    '; // input html += '

    '; html += ''; html += ''; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; html += '

    '; } var htmlElement = $(html); if(isReplace) { $("#appliedOfferRef" + index).html(htmlElement); } else { $("#appliedOfferRef" + index).append(htmlElement); } }) } } function loadMoreJobApplications(index, jobId) { var currJobAppPage = $('#appliedJobRefPagination_'+jobId+'_'+index).val(); currJobAppPage = parseInt(currJobAppPage) + 1; $('#appliedJobRefPagination_'+jobId+'_'+index).val(currJobAppPage); viewApplication(index, jobId, false, 1); } function loadMoreEventApplications(index, eventId){ var currJobAppPage = $('#appliedEventRefPagination_'+eventId+'_'+index).val(); currJobAppPage = parseInt(currJobAppPage) + 1; $('#appliedEventRefPagination_'+eventId+'_'+index).val(currJobAppPage); viewApplication(index, eventId, false, 2); } function loadMoreOfferApplications(index, offerId){ var currJobAppPage = $('#appliedOfferRefPagination_'+offerId+'_'+index).val(); currJobAppPage = parseInt(currJobAppPage) + 1; $('#appliedOfferRefPagination_'+offerId+'_'+index).val(currJobAppPage); viewApplication(index, offerId, false, 3); } function selectForm(tab, selectedItemId) { $('#' + tab + '-content').removeClass('d-none'); $("#" + tab).removeClass('cat-card'); $("#" + tab).addClass('cat-card-active'); switch (tab) { case 'job-tab': $('#' + 'event-tab' + '-content').addClass('d-none'); $('#' + 'event-tab').removeClass('cat-card-active') $("#" + 'event-tab').addClass('cat-card'); $('#' + 'offer-tab' + '-content').addClass('d-none'); $('#' + 'offer-tab').removeClass('cat-card-active') $("#" + 'offer-tab').addClass('cat-card'); fillJobForm(selectedItemId); break; case 'event-tab': $('#' + 'job-tab' + '-content').addClass('d-none'); $('#' + 'job-tab').removeClass('cat-card-active') $("#" + 'job-tab').addClass('cat-card'); $('#' + 'offer-tab' + '-content').addClass('d-none'); $('#' + 'offer-tab').removeClass('cat-card-active') $("#" + 'offer-tab').addClass('cat-card'); fillEventForm(selectedItemId); break; case 'offer-tab': $('#' + 'job-tab' + '-content').addClass('d-none'); $('#' + 'job-tab').removeClass('cat-card-active') $("#" + 'job-tab').addClass('cat-card'); $('#' + 'event-tab' + '-content').addClass('d-none'); $('#' + 'event-tab').removeClass('cat-card-active') $("#" + 'event-tab').addClass('cat-card'); fillOfferForm(selectedItemId); break; default: break; } } function fillJobForm(jobId) { $.post({ url:"/marketplaceApi.php", data: {action: 'getAllJobs', id: jobId}, dataType: 'json' }).done(function (data) { $('#job-title').val(data[0].title); $('#job-desc').val(data[0].description.replace(/
    /gi, "\n")); $('#job-tags').val(data[0].tags.join(',')); $('#job-experience').val(data[0].experience); $('#job-salary').val(data[0].salary_range); $('#job-employement').val(data[0].employment_type); }) } function fillEventForm(eventId) { $.post({ url:"/marketplaceEventApi.php", data: {action: 'getAllEvents',id: eventId}, dataType: 'json' }).done(function (data) { $('#event-title').val(data[0].title); $('#event-desc').val(data[0].description); $('#event-category').val(data[0].event_category); $('#event-tags').val(data[0].tags.join(',')); $('#venue-info').val(data[0].location); $('#event-date').val(data[0].fromDate); $('#event-deadline').val(data[0].toDate); $('#organizer-info').val(data[0]['organizer-info']); $('#' + (data[0].avalibility === '1' ? 'open' : 'closed')).prop('checked',true); }) } function fillOfferForm(offerId) { $.post({ url:"/marketplaceOfferApi.php", data: {action: 'getAllOffers',id: offerId}, dataType: 'json' }) .done(function (data) { $('#offer-title').val(data[0].title); $('#offer-desc').val(data[0].description); $('#offer-price-range').val(data[0].price_range); $('#offer-additional-info').val(data[0].additional_info); $('#offer-tags').val(data[0].tags.join(',')); if (data[0].files !== '') { $("#offer-img").attr("src",data[0].files); } else { $("#offer-img").addClass('d-none'); } $('#' + (data[0].category === 'RealEstate' ? 'real-estate' : data[0].category.toLowerCase()) ).prop('checked',true); $('#' + (data[0].offer_acquire_type.toLowerCase()) ).prop('checked',true); }) } function handleMessage(chatData) { if (chatData && chatData.sender_id != 0) { var newChatMessage = ''; newChatMessage += '

    '; newChatMessage += '

    '; newChatMessage += ''; newChatMessage += '

    ' + chatData.message + '

    '; newChatMessage += '

    '; newChatMessage += '' + chatData.created_at + ''; newChatMessage += '

    '; $("#comments-"+chatData.room_id).append(newChatMessage); $("#comments-"+chatData.room_id).animate({scrollTop: $("#comments-"+chatData.room_id).prop("scrollHeight")}, 500); playchataudio(); } else if(chatData && chatData.sender_id == 0){ var newChatMessage = ''; newChatMessage += '

    '; newChatMessage += '

    '; newChatMessage += '

    ' + chatData.message + '

    '; newChatMessage += '

    '; newChatMessage += '' + chatData.created_at + ''; newChatMessage += '

    '; $("#comments-"+chatData.room_id).append(newChatMessage); $("#comments-"+chatData.room_id).animate({scrollTop: $("#comments-"+chatData.room_id).prop("scrollHeight")}, 500); } } function addComment(jobAppId, jobId, jobIndex, roomId,actionType){ var message = $('#chat-input-' + jobId + '-' + jobAppId).val(); if(message.trim()) { if (actionType === 1) { var payload = { action: 'addJobComment', jobAppId: jobAppId, room_id: roomId, comment: message } $.post({ url:"/marketplaceApi.php", data:payload, dataType: 'json' }).done(function( data ) { //toastr.success('Comment added.'); $('#chat-input-' + jobId + '-' + jobAppId).val(' '); }); } else if(actionType === 2) { var payload = { action: 'addEventComment', eventAppId: jobAppId, room_id: roomId, comment: message } $.post({ url:"/marketplaceEventApi.php", data:payload, dataType: 'json' }).done(function( data ) { //toastr.success('Comment added.'); $('#chat-input-' + jobId + '-' + jobAppId).val(' '); }); } else if(actionType === 3) { var payload = { action: 'addOfferComment', offerAppId: jobAppId, room_id: roomId, comment: message } $.post({ url:"/marketplaceOfferApi.php", data:payload, dataType: 'json' }).done(function( data ) { //toastr.success('Comment added.'); $('#chat-input-' + jobId + '-' + jobAppId).val(' '); }); } } } function calcHeight(id,jobId){ let ref = $('#chat-input-' + jobId + '-' + id); let numberOfLineBreaks = (ref.val().match(/\n/g) || []).length; // min-height + lines x line-height + padding + border let newHeight = 20 + numberOfLineBreaks * 20 + 12 + 5; ref.css("height", newHeight + "px"); } function getCompanyList() { $.post({ url:"/marketplaceApi.php", data:{ action: 'getUserCompanies'}, dataType: 'json' }).done(function( data ) { companyData = data; $("#job-company-list").empty() var html = ''; html += ''; companyData.map(function(el) { html += '' }) var cmpList = $(html); $("#job-company-list").append(cmpList); }); } function selectCompany() { var selectedCmp = $("input[name='companyName']:checked").val(); if (selectedCmp) { $.post({ url:"/marketplaceApi.php", data:{ action: 'getUserCompanies'}, dataType: 'json' }).done(function (companyData) { companyData.forEach((el) => { if (el.id === selectedCmp) { $("#job-company-list").val(el.id); } }) }) } else { $("#job-company-list").val('0'); } $("#addCompanyModal").modal('hide'); $("#addNewJobModal").modal('show'); } function addCompany(){ $("#cmp-form").validate({ errorPlacement: function(error, element) {} }); if ($("#cmp-form").valid()) { $.post({ url:"/marketplaceApi.php", data:{ action: 'addCompany', 'cmp-name' : $('#cmp-name').val(), 'cmp-desc' : $('#cmp-desc').val(), 'country-select3' : $('#country-select3').val(), 'city-select3' : $('#city-select3').val(), 'cmp-size' : $('#cmp-size').val(), 'cmp-addr' : $('#cmp-addr').val(), }, dataType: 'json' }).done((data) => { toastr.success('Company added successfully.'); $("#cmp-form").trigger('reset'); $('#addOtherCompanyModal').modal('hide'); $("#addCompanyModal").modal('show'); getCompanyList(); setTimeout(() => { showCompanyModal(); }, 1000); }); } } function showCompanyModal(){ $("#addCompanyModal").modal('show'); var html = ''; $("#companyListRef").html('') for (let index = 0; index < companyData.length; index++) { html += '

    ' html += '

    '; html += ''; html += ''; html += '

    '; html += '"Leave Calculation" Discussions/Downloads - Cite.Co (86)'; html += '

    '; } var htmlElement = $(html); $("#companyListRef").append(htmlElement); } function confirmDeleteCompany(companyId){ $('#confirmDeleteModal').modal('show'); $('#selectedCompanyId').val(companyId); } function confirmDeleteJob(jobId){ event.stopPropagation(); $('#confirmDeleteJobModal').modal('show'); $('#selectedDeleteJobId').val(jobId); } function confirmDeleteEvent(eventId){ event.stopPropagation(); $('#confirmDeleteEventModal').modal('show'); $('#selectedDeleteEventId').val(eventId); } function confirmDeleteOffering(offeringId){ event.stopPropagation(); $('#confirmDeleteOfferingModal').modal('show'); $('#selectedDeleteOfferingId').val(offeringId); } function genericCopyRoute(id,type) { event.stopPropagation(); let mode = 'job'; if (type === 1) { mode = 'job'; } else if (type === 2) { mode = 'event'; } else if (type === 3) { mode = 'offering'; } var url="https://www.citehr.com/marketDetail.php?mode=" +mode+ "&item=" + id; // Copy url navigator.clipboard.writeText(url); toastr.success(` link copied successfully.`); } function getJobCountryList(id) { $.post({ url:"/authyfi.php", data:{ action: 'getCountryList'}, dataType: 'json' }).done(function( data ) { data.sort(function(a, b) { return a.name.common.localeCompare(b.name.common); }); countryList = data; var selectedData = data.filter(function (a) { return a.name.common === "India"; }); data.forEach(function (country) { var countrySelect = document.getElementById(id); var option = document.createElement("option"); option.text = country.name.common; option.value = country.cca2; if (countrySelect) { countrySelect.appendChild(option); } }); if (selectedData.length > 0 && id !== 'job-country-select') { $("#" + id).val(selectedData[0].cca2); // Select the option with a value of '1' $("#" + id).trigger("change"); } }); } function getJobCities(id, countryId, parentRef) { var selectedCountry = document.getElementById(countryId).value; fetch('https://countriesnow.space/api/v0.1/countries/cities/q?iso2='+selectedCountry) .then((response) => response.json()) .then((data) => { var citySelect = document.getElementById(id); citySelect.innerHTML = ''; // Reset city dropdown var selectedCityData = data.data.filter(function (a) { return a === 'Gurgaon'; }); data.data.forEach((city) => { const option = document.createElement('option'); option.text = city; option.value = city; citySelect.appendChild(option); }); if (selectedCityData && selectedCityData.length && countryId !== 'job-country-select') { var newOption = new Option(selectedCityData[0], selectedCityData[0], true, true); $('#'+id).append(newOption).trigger('change'); } }); // SET option value of country let ref = ( countryId === 'job-country-select3' ) ? $("#" + parentRef) : $(document.body) $('#' + countryId).select2({ dropdownParent: ref, templateResult: function (data, container) { if (!data.id) { return data.text; } var country = $('' + data.text + ''); return country; } }); // SET option value of country $('#' + id).select2({ dropdownParent: ref, templateResult: function (data, container) { if (!data.id) { return data.text; } var country = $('' + data.text + ''); return country; } }); } // SET option value of city $('#city-select2').select2({ templateResult: function (data, container) { if (!data.id) { return data.text; } var country = $('' + data.text + ''); return country; } }); function sendApplication(){ // jobRegisterBtn $("#applier-form").validate({ errorPlacement: function(error, element) {} }); if ($("#applier-form").valid()) { $('#jobRegisterBtn').append(''); var fd = new FormData(); fd.append('jobId', $('#selectedJobId').val()); fd.append('skills', $('#skills').val()); fd.append('aboutMe', $('#about-me').val()); var files = $('#myfile')[0].files; // Check file selected or not if(files.length > 0 ){ fd.append('file',files[0]); }else{ alert("Please select a file."); } $.post({ url:"/marketApplyJob.php", data: fd, dataType: 'json', contentType: false, processData: false, }).done(function(response){ if(response){ toastr.success('Job applied successfully.'); $('#jobRegisterBtn').html('Apply'); $('#applyJobModal').modal('hide'); $("#applier-form").trigger('reset'); }else{ $('#jobRegisterBtn').html('Apply'); alert('File not uploaded'); } }); } } function registerEvent() { $("#event-register-form").validate({ errorPlacement: function(error, element) {} }); if ($("#event-register-form").valid()) { registerEventFlag = true; $('#eventRegisterBtn').append(''); const payload = { eventId: $('#selectedEventId').val(), name: $("#event-fullname").val(), email: $("#event-email").val(), phone: $("#event-phone").val(), numberOfGuest: $("#number-guest").val() } $.post({ url:"/marketApplyEvent.php", data: payload, dataType: 'json' }).done(function(response){ if(response){ registerEventFlag = false; toastr.success('Registered for event successfully'); $('#eventRegisterBtn').html('Register'); $('#applyEventModal').modal('hide'); $("#event-register-form").trigger('reset'); } }); // $('#applyEventModal').modal('hide'); } } function registerOffer() { // offerRegisterBtn $("#offer-register-form").validate({ errorPlacement: function(error, element) {} }); if ($("#offer-register-form").valid()) { $('#offerRegisterBtn').append(''); const payload = { offerId: $('#selectedOfferId').val(), name: $("#offer-fullname").val(), email: $("#offer-email").val(), phone: $("#offer-phone").val() } $.post({ url:"/marketApplyOffer.php", data: payload, dataType: 'json' }).done(function(response){ if(response){ toastr.success('Registered for offfer successfully'); $('#applyOfferModal').modal('hide'); $("#offer-register-form").trigger('reset'); $('#offerRegisterBtn').html('Inquiry'); } }); // $('#applyOfferModal').modal('hide'); } } function incrCounter(){ let counterValue = parseInt($("#number-guest").val()) $("#number-guest").val(counterValue + 1) } function decrCounter(){ let counterValue = parseInt($("#number-guest").val()) if (counterValue > 1) { $("#number-guest").val(counterValue - 1) } } function applyJob(selectedJobId) { $('#applyJobModal').modal('show'); $('#selectedJobId').val(selectedJobId); } function applyEvent(eventId){ $('#selectedEventId').val(eventId); $('#applyEventModal').modal('show'); } function applyOfferings(offerId) { $('#selectedOfferId').val(offerId); $('#applyOfferModal').modal('show'); } function addNewJob(status) { if ($('#job-title').val().length < 20) { toastr.error('Please make sure the job title is descriptive'); return; } $("#job-posters-form").validate({ errorPlacement: function (error, element) { } }); if ($("#job-posters-form").valid()) { $('#addJobBtn').append(''); // let selectedId = 0; if (window.location.href.split('?').length > 1) { selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; } if (!selectedId) { $.post({ url: "/marketplaceApi.php", data: { action: 'addJob', 'status': status, 'job-title': $('#job-title').val(), 'job-desc': $('#job-desc').val(), 'job-tags': $('#job-tags').val(), 'job-salary': $('#job-salary').val(), 'job-country': $('#job-country-select2 option:selected').text(), 'job-city': $('#job-city-select2').val(), 'job-experience': $('#job-experience').val(), 'job-employement': $('#job-employement').val() }, dataType: 'json' }).done(function (data) { toastr.success('New Job added successfully.'); $('#addJobBtn').html('Save & Publish'); $("#job-posters-form").trigger('reset'); window.location.href = 'https://www.citehr.com/market.php'; }); } else { $.post({ url: "/marketplaceApi.php", data: { action: 'updateJob', 'job-id': selectedId, 'job-title': $('#job-title').val(), 'job-desc': $('#job-desc').val(), 'job-tags': $('#job-tags').val(), 'job-salary': $('#job-salary').val(), 'job-country': $('#job-country-select2 option:selected').text(), 'job-city': $('#job-city-select2').val(), 'job-experience': $('#job-experience').val(), 'job-employement': $('#job-employement').val() }, dataType: 'json' }).done(function (data) { toastr.success('Job updated successfully.'); $("#job-posters-form").trigger('reset'); $('#addJobBtn').html('Save & Publish'); getJobList(); if (window.location.href.split('?').length > 1) { let selectedId = 0; selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; let mode = 'job'; window.location.href = 'https://www.citehr.com/marketDetail.php?mode=' +mode+ '&item=' +selectedId; } }); } } } function postEvent(){ $("#event-post-form").validate({ errorPlacement: function (error, element) { } }); if ($("#event-post-form").valid()) { $('#addEventBtn').append(''); let selectedId = 0; if (window.location.href.split('?').length > 1) { selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; } if (!selectedId) { $.post({ url: "/marketplaceEventApi.php", data: { action: 'addEvent', 'event-category': $('#event-category').val(), 'event-title': $('#event-title').val(), 'event-desc': $('#event-desc').val(), 'event-tags': $('#event-tags').val(), 'event-date': $('#event-date').val(), 'venue-info': $('#venue-info').val(), 'organizer-info': $('#organizer-info').val(), 'price': $('input[name="price"]:checked').val(), 'event-deadline': $('#event-deadline').val(), 'avalibility': $('input[name="avalibility"]:checked').val(), }, dataType: 'json' }).done(function (data) { toastr.success('New Event added successfully.'); getEventList(); $("#event-post-form").trigger('reset'); $('#addEventBtn').html('Save & Publish'); window.location.href = 'https://www.citehr.com/market.php'; }); } else { $.post({ url: "/marketplaceEventApi.php", data: { action: 'updateEvent', 'event-id': selectedId, 'event-category': $('#event-category').val(), 'event-title': $('#event-title').val(), 'event-desc': $('#event-desc').val(), 'event-tags': $('#event-tags').val(), 'event-date': $('#event-date').val(), 'venue-info': $('#venue-info').val(), 'organizer-info': $('#organizer-info').val(), 'price': $('input[name="price"]:checked').val(), 'event-deadline': $('#event-deadline').val(), 'avalibility': $('input[name="avalibility"]:checked').val(), }, dataType: 'json' }).done(function (data) { toastr.success('Event updated successfully.'); getEventList(); $("#event-post-form").trigger('reset'); $('#addEventBtn').html('Save & Publish'); if (window.location.href.split('?').length > 1) { let selectedId = 0; selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; let mode = 'event'; window.location.href = 'https://www.citehr.com/marketDetail.php?mode=' +mode+ '&item=' +selectedId; } }); } } } function postOffer(){ $("#offer-posters-form").validate({ errorPlacement: function (error, element) { } }); // Validate category selection const category = document.querySelector('input[name="offer-cat"]:checked'); if (!category) { alert("Please choose a category."); return; } // Validate real estate fields if category is Real Estate // if (category.value === "RealEstate") { // const realEstateFields = ['address', 'city', 'state', 'zipCode']; // for (const field of realEstateFields) { // const value = document.querySelector(`[name=""]`).value.trim(); // if (!value) { // alert(`Please enter a value for .`); // return; // } // } // } if ($("#offer-posters-form").valid()) { $('#addOfferBtn').append(''); let selectedId = 0; if (window.location.href.split('?').length > 1) { selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; } var fd = new FormData(); if (selectedId) { fd.append('action', 'updateOffer'); } else { fd.append('action', 'addOffer'); } fd.append('offer-category', $('input[name="offer-cat"]:checked').val()); fd.append('offer-acquire-type', $('input[name="offer-acquire-type"]:checked').val()) fd.append('offer-title', $('#offer-title').val()); fd.append('offer-desc', $('#offer-desc').val()); fd.append('offer-price-range', $('#offer-price-range').val()); fd.append('offer-additional-info', $('#offer-additional-info').val()); fd.append('offer-tags', $('#offer-tags').val()); var files = $('#additional-file')[0].files; if (files.length > 0 ) { fd.append('offerFiles',files[0]); } if (!selectedId) { $.post({ url: "/marketplaceOfferApi.php", data: fd, dataType: 'json', contentType: false, processData: false, }).done(function (data) { toastr.success('New Offers added successfully.'); $('#addOfferBtn').html('Save & Publish'); // getEventList(); $("#offer-posters-form").trigger('reset'); window.location.href = 'https://www.citehr.com/market.php'; }); } else { fd.append('offer-id', selectedId); $.post({ url: "/marketplaceOfferApi.php", data: fd, dataType: 'json', contentType: false, processData: false, }).done(function (data) { toastr.success('Offers updated successfully.'); $("#offer-posters-form").trigger('reset'); $('#addOfferBtn').html('Save & Publish'); if (window.location.href.split('?').length > 1) { let selectedId = 0; selectedId = window.location.href.split('?')[1].split('=')[1].includes('&') ? window.location.href.split('?')[1].split('=')[2] : 0; let mode = 'offering'; window.location.href = 'https://www.citehr.com/marketDetail.php?mode=' +mode+ '&item=' +selectedId; } }); } } } function updateUnreadCounter(room_id) { var currCounterVal = $('#'+room_id).val(); if (currCounterVal != '') { $('#'+room_id).val(parseInt(currCounterVal) + 1); } else { $('#'+room_id).val(1); } } function getUserRooms() { $.post({ url:"/marketplaceApi.php", data: {action: 'getUserRooms'}, dataType: 'json' }).done(function(response){ if(response){ channels = response; if(socket) { response.map((channel) => { socket.emit("leave", channel); socket.emit("join", channel); }); } } }); } function updateReadCounter(room_id, i, type, index) { // scroll to bottom let chatboxCoords = $("#comments-" + room_id)[0].getBoundingClientRect(); let chatboxHeight = $("#comments-" + room_id).prop('scrollHeight'); $("#comments-" + room_id).animate({scrollTop: chatboxCoords.x + chatboxHeight}, 1500); $("#applications_"+type+"_"+index+'_'+i).toggleClass('active'); $.post({ url:"/marketplaceApi.php", data: {action: 'updateCounter', room_id: room_id}, dataType: 'json' }).done(function(response){ if(response){ $('#'+room_id).hide(); } }); } /* Marketplace End */ function showHidePostBox(id, threadid){ if($('#postid_'+id).hasClass('hide')){ $('#postid_'+id).find('a').first().css("pointer-events","auto").css("cursor","pointer"); $('#postid_'+id).find('a').first().css("color", "blue"); $('#postid_' + id).find('a').first().on('click', function (e) { e.stopImmediatePropagation(); }); $('#postid_'+id).removeClass('hide'); } else{ $('#postid_'+id).find('a').first().css("color", "black").css("pointer-events", "none").css("cursor","default"); $('#postid_'+id).addClass('hide'); } } function loaddashboardpost(event, loadmore) { var dcpage = 1; var dccountry = $('#dashboard_country_filter').val(); if(loadmore) { dcpage = $('#dashboard_c_page').val(); dcpage = parseInt(dcpage)+1; } else { dcpage = 1; } $.post({ url:"/authyfi.php", data: {action: 'loadMoreIndexPosts', country: dccountry, page: dcpage}, dataType: 'text' }).done(function(response){ if(response){ if(loadmore) { $("#feeds").append(response); $('#dashboard_c_page').val(dcpage); } else { $("#feeds").html(response); $('#dashboard_page').val(1); } } }); } function getCountryFromLocation() { let countryFromCookie = document.cookie.match(new RegExp('(^| )' + 'country' + '=([^;]+)')); if (countryFromCookie) { countryFiller(countryFromCookie[2]); } } function countryFiller(countryName) { $('#dashboard_country_filter').val(countryName); $.post({ url: "/authyfi.php", data: { action: 'loadMoreIndexPosts', country: countryName, page: 1 }, dataType: 'text' }).done(function (response) { if (response) { $("#feeds").html(response); $('#dashboard_page').val(1); } }); }

    Contact Us Privacy Policy Disclaimer Terms Of Service

    All rights reserved @ 2024 CiteHR ®

    All Copyright And Trademarks in Posts Held By Respective Owners.

    "Leave Calculation" Discussions/Downloads - Cite.Co (2024)
    Top Articles
    Latest Posts
    Article information

    Author: Nathanial Hackett

    Last Updated:

    Views: 6373

    Rating: 4.1 / 5 (52 voted)

    Reviews: 91% of readers found this page helpful

    Author information

    Name: Nathanial Hackett

    Birthday: 1997-10-09

    Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

    Phone: +9752624861224

    Job: Forward Technology Assistant

    Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

    Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.