{% include '@Application/inc/buddybee_new_header.html.twig' %}
<style>
.consultant-bio-img img {
height: 154px;
border-radius: 10%;
}
.small_language_img {
}
.consultant-bio-img .cons_image_view {
height: 154px;
width: 154px;
border-radius: 14px;
background-size: contain !important;
background-repeat: no-repeat !important;
background-position: center !important;
}
.consultant_search_bar.searchbar-content {
position: relative;
}
.consultant_search_bar.searchbar-content a {
position: absolute;
right: 9px;
top: 7px;
}
.filter_div img {
/*display: block;*/
color: #fff;
/*padding: 10px 0;*/
font-size: 14px;
background: #1D5B9E;
width: 40px;
height: 40px;
padding: 6px;
text-align: center;
line-height: 51px;
border-radius: 50%;
}
.filter_div_btn {
}
.filter_div {
display: inline-block;
width: 70px;
padding: 10px 0;
position: relative;
}
.consultant-title .searchbar {
width: 290px;
display: inline-block;
position: relative;
}
.filter_div_content {
padding: 20px;
width: 300px;
min-height: 400px;
height: auto;
left: -115px;
position: absolute;
z-index: 99999;
background: white;
display: none;;
/*border:1px solid darkblue;*/
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
.filter_div_content .head {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #f1e4e4;
}
.filter_div_content .head .title {
font-size: 13px;
display: inline-block;
float: left;
margin-bottom: 0.5rem;
}
.filter_div_content .head .title.right {
float: right;
color: #1D5B9E;
font-weight: bold;
text-decoration: none;
}
.filter_div_content .body {
text-align: left;
/*padding-top: 15px;*/
}
.filter_div_content .body .title {
margin-top: 15px;
margin-bottom: 2px;
font-size: 11px;
text-align: left;
text-transform: uppercase;
color: #6c757d;
}
.filter_div_content .body .option {
}
.filter_div_content .body .form-check {
text-align: left;
width: 49%;
display: inline-block;
}
.filter_div_content .body .form-check .form-check-label span {
font-size: 13px;;
}
.filter_div_content .body .form-check .form-check-input:checked {
background-color: #1D5B9E;
border-color: #1D5B9E;
}
@media (min-width: 320px) and (max-width: 480px) {
.consultant-title .searchbar {
width: 250px;
}
.filter_div_content {
left: unset;
right: 0;
}
}
@media (min-width: 481px) and (max-width: 540px) {
.consultant-title .searchbar {
width: 250px;
}
.filter_div_content {
left: unset;
right: 0;
}
}
@media (min-width: 320px) and (max-width: 480px) {
.consultant-bio-img .cons_image_view {
height: 60px !important;
width: 60px !important;
}
.book_btn_span {
display: none;
}
.rating_value_span {
display: block;
padding: 0 21px;;
}
}
.consultant-bio {
cursor: pointer;
flex-direction: column;
}
.consultant-bio-right, .consultant-bio-left, .consultant-bio-left .cons_image_view {
width: 100%;
}
.consultant-bio-right h3 {
color: #6E6B78;
font-size: 20px;
margin-top: 13px;;
margin-bottom: 13px;;
/*font-family: nexa;*/
font-weight: bold;;
}
.consultant-bio-right p {
color: #6E6B78;
font-size: 16px;
margin-top: 3px;;
/*font-family: nexa;*/
font-weight: 300;;
}
.consultant-bio-right i.fa {
font-weight: normal;;
}
.consultant-bio-right button.btn-event-action {
width: 48%;
height: 50px;;
background: white;
border-radius: 5px;;
border: 1px solid #1D5B9E;
color: #1D5B9E;
}
.consultant-bio-right button.btn-event-action.btn-event-going.going {
background: #1D5B9E;
border: 1px solid #1D5B9E;
color: white;
}
.consultant-bio-right button.btn-event-action.btn-event-going.not_going {
}
.consultant-bio-right button.btn-event-action.btn-event-save.saved {
}
.cta
{
display: block;;
}
</style>
<section class="consultant-section">
{% set countries_data='_HAS_CONSULTANT_'|getCountriesBuddyBee('object') %}
{% set language_list='_ALL_'|getLanguagesBuddyBee('object') %}
<div class="consultant-title">
<div class="container">
<div class="row mb-5">
<div class="col-md-3"></div>
<div class="col-md-6" style="position: relative;text-align: center">
<h2>All Events</h2>
</div>
<div class="col-md-3"></div>
</div>
</div>
</div>
<div class="consultant-list">
<div class="container">
<div class="row pList" style="justify-content: space-evenly;">
</div>
<div class="row ">
<div class="col-md-12 ">
<div class="page-pagination mt-5" id="consultant_pagination">
</div>
</div>
</div>
</div>
</div>
</section>
{% include '@Application/footer/buddybee_new_footer.html.twig' %}
<script type="text/javascript"
src="{{ absolute_url(path('dashboard')) }}condensed_assets/pagination/pagination.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<script>
var countries_data ={{ countries_data|json_encode()|raw() }}
var language_list ={{ language_list|json_encode()|raw() }}
var skipEventIds ={{ skipEventIds|json_encode()|raw() }}
var attendingEventIds ={{ attendingEventIds|json_encode()|raw() }}
var followingEventIds ={{ followingEventIds|json_encode()|raw() }}
var topic_conditional_string = ""
var config = {
'mainTableAlias': "mainTable",
'mainTableClass': "CompanyGroupBundle:EntityCreateTopic",
'mainTableIdField': "Id",
// 'otherConditions': " (mainTable.CompanyId=1 and mainTable.status=1) ",
// 'otherConditions': " ( mainTable.isConsultant=1 and mainTable.accountStatus=1 ) ",
{% set THIS_USER_ID= 0 %}
{% if (session[UserConstants.USER_ID] is defined ) %}
{% set THIS_USER_ID =session[UserConstants.USER_ID] %}
{% endif %}
'otherConditions': " ( mainTable.isEvent=1) ",
'dateFieldsToStr': ['createdAt'],
'dateFieldsToStrFormat': ['m-d-Y h:i'],
'convertToObjectFields': [],
'skipColumnNames': [],
'flagColNames': [],
columns:[
{
name: 'mainTable.eventStartDateTs',
search:{
value:'',
regex:false
}
}
],
'order': [
{
"column": "0",
"dir": "desc",
}
],
'flagConversionByCols': {},
'joinTableList': [
// {
// 'tableClass': "CompanyGroupBundle\\Entity\\EntityApplicantDetails",
// 'tableAlias': "consultantTable",
// 'onField': 'applicantId',
// "onMainTableField": "applicantId",
// "fields": {
// //'alisaFiled':'actiual field Name'
// 'consultantFirstName': 'firstname',
// 'consultantLastName': 'lastname',
// 'consultantImage': 'image',
//
// }
// },
// {
// 'tableClass': "CompanyGroupBundle\\Entity\\EntityApplicantDetails",
// 'tableAlias': "studentTable",
// 'onField': 'applicantId',
// "onMainTableField": "studentId",
// "fields": {
// //'alisaFiled':'actiual field Name'
// 'studentFirstName': 'firstname',
// 'studentLastName': 'lastname',
// 'studentImage': 'image',
//
// }
// },
],
'returnJson': 1,
'getUnitListFlag': 1
}
var pika = null;
function refresh_filter() {
var new_other_cond = "( mainTable.isEvent=1 )";
{#{% if topicId !=0 %}#}
{#new_other_cond+=" ) and mainTable.preferredTopicIdsAsConsultant like '%\"{{ topicId }}\"%' ) ";#}
{#{% else %}#}
// new_other_cond += " ) "
{#{% endif %}#}
config.otherConditions = new_other_cond;
if (pika != null)
pika.pagination(1)
else
pika = $('#consultant_pagination').pagination({
dataSource: "{{ url('generic_datatable_ajax_company_group') }}?dataTableQry=1",
locator: 'data',
// totalNumberLocator: function(response) {
// // you can return totalNumber by analyzing response content
// return Math.floor(Math.random() * (1000 - 100)) + 100;
// },
pageSize: 10,
classPrefix: "pico",
ulClassName: "pagination justify-content-center",
// totalNumber: 6,
totalNumberLocator: function (response) {
// you can return totalNumber by analyzing response content
return response.totalObjectsCount != 0 ? (response.totalObjectsCount) : 0;
},
className: "pagination-div",
// pageRange: null,
// prevText :'<i class="material-icons">chevron_left</i>',
// nextText :'<i class="material-icons">chevron_right</i>',
ajax: {
beforeSend: function () {
// dataContainer.html('Loading data from flickr.com ...');
},
"type": 'POST',
"data": {
returnJson: 1,
config: config
// sessionData: sessionData,
// getUnitListFlag:getUnitListFlag
}
},
callback: function (data, pagination) {
// template method of yourself
var html = "";
// alert('working')
// console.log(data)
$('html,body').stop().animate({scrollTop: 0}, 500, 'swing', function () {
// alert("Finished animating");
});
for (var k = 0; k < data.length; k++) {
var row_here = data[k]
html += '<div class="consultant-bio d-flex justify-content-between col-md-3" onclick="return 0;window.location.href=\'{{ path('consultant_profile') }}/' + row_here.mainTable.id + '\'"> ' +
'<div class="consultant-bio-left" > ' +
'<div class="consultant-bio-img"> ' +
'<div style="background:url(' + row_here.mainTable.topicImage + '); "class="cons_image_view"></div> ' +
'</div> ' +
'</div> ' +
'<div class="consultant-bio-right" style="min-height:8rem;"><h3>' + row_here.mainTable.topicName + '</h3>' +
'<p><i class="fa fa-map-marker"></i> ' + row_here.mainTable.address + '</p>' +
'<p><i class="fa fa-calendar"></i> <span class="convert_to_moment_time" data-moment-ts-format="DD/MM/YYYY" data-moment-ts="' + row_here.mainTable.eventStartDateTs + '">15/01/2023</span> <i class="fa fa-clock"></i> <span class="convert_to_moment_time" data-moment-ts-format="HH:mm" data-moment-ts="' + row_here.mainTable.eventStartDateTs + '">11:00 AM</span> </p>' +
'<div class="row" style="padding-top: 10px;">' +
' <div class="col-md-12" style="text-align: left;display: flex;flex-direction:row;justify-content: space-between; ">' +
'<button type="button" style="" class="btn btn-event-action btn-event-save btn-default '+(followingEventIds.indexOf(row_here.mainTable.id)!=-1?'saved':'')+' btn-event-save_' + row_here.mainTable.id + '" data-event-id="' + row_here.mainTable.id + '">'+(followingEventIds.indexOf(row_here.mainTable.id)!=-1?'Saved':'Save')+'' +
'</button>' +
'<button type="button" style="" class="btn btn-event-action btn-event-going btn-default '+(attendingEventIds.indexOf(row_here.mainTable.id)!=-1?'going':'')+' btn-event-going_' + row_here.mainTable.id + '" data-event-id="' + row_here.mainTable.id + '">'+(attendingEventIds.indexOf(row_here.mainTable.id)!=-1?'Going':'Attend')+'' +
'</button>' +
'</div>' +
'</div>' +
'</div>' +
'</div>'
}
// console.log(data)
$('.pList').html(html);
refresh_moment_times();
}
})
}
$(document).ready(function () {
var lastViewedConsultantListStr = window.localStorage.getItem('lvcl');
var lastViewedConsultantList = [];
if (lastViewedConsultantListStr != 'null' && lastViewedConsultantListStr != null)
lastViewedConsultantList = JSON.parse(lastViewedConsultantListStr);
$('.consFilter').change(function () {
refresh_filter()
// op
})
$(document).on('click', '.btn-event-save', function (e) {
e.preventDefault();
var newStatus=$(this).hasClass('saved')? 0:1;
$.ajax({
url: BaseURL + "mark_buddybee_event",
type: 'POST',
dataType: 'json',
data: {
relId: $(this).data('eventId'),
eventId: $(this).data('eventId'),
applicantId: {{ applicantId }},
followStatus: newStatus,
attendingStatus: "_UNCHANGED_",
},
error: function () {
// callback();
},
success: function (res) {
;
// $('#').val(res.);
if (res.success == true) {
if(res.followStatus==1) {
$('.btn-event-save_' + res.relId).addClass('saved')
$('.btn-event-save_' + res.relId).text('Saved')
}
else {
$('.btn-event-save_' + res.relId).removeClass('saved')
$('.btn-event-save_' + res.relId).text('Save')
}
// swal("Success", "Done!", "success");
}
else {
if(res.applicantId==0) {
swal("Oops", "You need to Login to perform this action!", "warning");
}
else {
swal("Oops", "Could not perform the action!", "error");
}
}
}
});
})
$(document).on('click', '.btn-event-going', function (e) {
e.preventDefault();
var newStatus=$(this).hasClass('going')? 0:1;
$.ajax({
url: BaseURL + "mark_buddybee_event",
type: 'POST',
dataType: 'json',
data: {
relId: $(this).data('eventId'),
eventId: $(this).data('eventId'),
applicantId: {{ applicantId }},
followStatus: "_UNCHANGED_",
attendingStatus: newStatus,
},
error: function () {
// callback();
},
success: function (res) {
;
// $('#').val(res.);
if (res.success == true) {
if(res.attendingStatus==1) {
$('.btn-event-going_'+res.relId).addClass('going')
$('.btn-event-going_'+res.relId).text('Going')
}
else {
$('.btn-event-going_'+res.relId).removeClass('going')
$('.btn-event-going_'+res.relId).text('Attend')
}
// swal("Success", "Done!", "success");
}
else {
if(res.applicantId==0) {
swal("Oops", "You need to Login to perform this action!", "warning");
}
else {
swal("Oops", "Could not perform the action!", "error");
}
}
}
});
})
refresh_filter()
$(document).mouseup(function (e) {
var container = $(".filter_div_content");
// if the target of the click isn't the container nor a descendant of the container
if (!container.is(e.target) && container.has(e.target).length === 0) {
container.hide();
}
});
$('.filter_div_btn').click(function (e) {
e.preventDefault();
$('.filter_div_content').toggle()
})
});
function refresh_moment_times() {
$('.convert_to_moment_time').each(function (ind, elem) {
var moment_time = moment.unix($(elem).attr('data-moment-ts'));
// console.log($(elem).attr('data-moment-ts'));
var format = $(elem).attr('data-moment-ts-format');
var toReplaceStr = '';
if (format == '_today_or_date_') {
toReplaceStr = moment_time.fromNow()
}
else {
toReplaceStr = moment_time.format(format)
}
$(elem).text(toReplaceStr)
});
}
</script>
<style type="text/css">
body {
/*-moz-transform: scale(0.5, 0.5); !* Moz-browsers *!*/
zoom: 1; /* Other non-webkit browsers */
zoom: 100%; /* Webkit browsers */
}
/*.modal-dialog {*/
/*width: 75%;*/
/*}*/
.trans_amount {
text-align: right;
}
</style>