{# <script src="{{ asset('condensed_assets/javascript.js',) }}"></script> #}
{# {{ dump( constant('ApplicationBundle\\Constants\\GeneralConstant::NOTIFICATION_SERVER')) }}; #}
{% if not include_html is defined %}
{% set include_html=1 %}
{% if app.request.request.get('skipHTML') !='' %}
{% set include_html= 0 %}
{% endif %}
{% endif %}
{% if include_html!=1 %}
{% endif %}
<style>
@media (min-width: 320px) and (max-width: 480px) {
#deepLinkModal p {
font-weight: bold;
font-size: 12px !important;
line-height: 1.5 !important;
}
}
</style>
{% set BUDDYBEE_ADMIN_LEVEL= session[UserConstants.BUDDYBEE_ADMIN_LEVEL] is defined? session[UserConstants.BUDDYBEE_ADMIN_LEVEL]:0 %}
{% include '@Application/modals/input_forms/verify_otp_modal.html.twig' %}
<footer class="footer">
<a class="nav-link cta book_now_cta" href="{{ url('consultant_search_page') }}" style="text-transform: none;"
><span class="trn" data-trn-key="_BOOK_NOW_CTA_" style="vertical-align: middle;padding: 2px 6px;
display: inline-block;"></span> <i class="fa fa-arrow-right"></i></a>
{# <a class="nav-link cta twus" style=" #}
{# border: 2px solid #22b14c; #}
{# text-transform: capitalize; #}
{# color: #22b14c !important; #}
{# z-index: 9999999; #}
{# /*display: flex;*/ #}
{# flex-direction: row; #}
{# vertical-align: middle;" href="{{ url('live_support_page_applicant') }}" #}
{# ><span style="background: url('{{ absolute_url(path('dashboard')) }}buddybee_assets/images/video_call_icon.png'); #}
{# width: 30px; #}
{# height: 30px; #}
{# display: inline-block; #}
{# background-size: contain; #}
{# background-repeat: no-repeat; #}
{# background-position: center; #}
{# "></span> <span class="trn" data-trn-key="_TALK_WITH_US_CTA_" style="vertical-align: middle;padding: 2px 6px; #}
{# display: block; #}
{# "></span></a> #}
<div class="modal fade" style="z-index: 99999;" id="bookNowModal" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header" style="text-align: center;display: block;">
<h5 class="modal-title" id="exampleModalLabel" style="text-align: center;">Select your
Preference</h5>
{# <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> #}
</div>
<style>
.consTypeSelectorBtn {
display: block;
width: 100%;
padding: 0.25rem 1rem;
clear: both;
font-weight: 400;
color: #212529;
text-align: inherit;
text-decoration: none;
white-space: nowrap;
background-color: transparent;
border: 0;
}
.consTypeSelectorBtn:focus, .consTypeSelectorBtn:hover {
color: #1e2125;
/*background-color: #e9ecef;*/
}
.consTypeSelectorBtn p {
font-family: Inter;
font-style: normal;
/* font-weight: bold; */
line-height: 29px;
padding: 7px;
align-items: center;
text-align: center;
color: #4B4B4B;
/* background: #1d5b9e; */
background: white;
border-radius: 0px;
border: 1px solid #1B6CB4;
width: 69%;
font-size: 16px;
font-weight: 600;
text-transform: uppercase;
margin: auto !important;
}
</style>
<div class="modal-body">
<div class="row">
<div class="col-md-12" style="text-align: left;">
<a class="consTypeSelectorBtn " id=""
href="{{ url('admin_consultant_search_page') }}">
<div class="">
<p style="margin: 0px;text-transform: none;">
{# <span class="" src="" #}
{# style="font-weight: normal; background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/bkash_logo.png); #}
{# background-size: contain; #}
{# background-repeat: no-repeat; #}
{# background-position: left; #}
{# width:3rem; #}
{# height: 1rem; #}
{# display: inline-block; #}
{# margin: auto; #}
{# vertical-align: middle;"></span> #}
Primary Consultancy</p>
</div>
</a>
<a class="consTypeSelectorBtn " id=""
href="{{ url('consultant_search_page') }}">
<div class="">
<p style="margin: 0px;text-transform: none;">
{# <span class="" src="" #}
{# style="font-weight: normal; background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/bkash_logo.png); #}
{# background-size: contain; #}
{# background-repeat: no-repeat; #}
{# background-position: left; #}
{# width:3rem; #}
{# height: 1rem; #}
{# display: inline-block; #}
{# margin: auto; #}
{# vertical-align: middle;"></span> #}
Expert Consultancy</p>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<form action="{{ path('recharge_account') }}" method="post" id="rechargeForm">
{# <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#reviewModal"> #}
{# Rate your Consultant #}
{# </button> #}
<!-- Modal -->
<div class="modal fade" id="rechargeAccountOwnModal" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header" style="text-align: center;display: block;">
<h5 class="modal-title" id="exampleModalLabel" style="text-align: center;">Add Fund to Your
Account</h5>
{# <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> #}
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12" style="text-align: left;">
<div class="form-group">
<label for="">Recharge Amount (Euro)</label>
<input type="number" class="form-control" name="rechargeAmount" id="rechargeAmount">
</div>
<div class="form-group">
<label for="">Bee Code</label>
<input type="text" class="form-control" name="rechargeBeeCode" id="rechargeBeeCode"
placeholder="if you have" value="">
<input type="hidden" class="form-control" name="rechargeApplicantId"
id="rechargeApplicantId" placeholder="if you have"
value="{{ session[UserConstants.USER_ID] is defined ?session[UserConstants.USER_ID]:0 }}">
</div>
<br>
<button type="button" style="width: 48%;height: 3rem;"
class="btn btn-secondary" data-bs-dismiss="modal">Close
</button>
<button type="button" style="width: 48%;height: 3rem;"
class="btn btn-primary recharge_submit">Proceed
</button>
</div>
</div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</form>
<div class="modal fade " style="z-index:9999999999999999999" id="deepLinkModal" tabindex="-1"
aria-labelledby="exampleModalLabel"
aria-hidden="true" data-bs-backdrop="false">
<div class="modal-dialog modal-dialog-centered modal-xl" style="
/*position:fixed;*/
align-items: end;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
width: 100%;
top:auto;
right:auto;
left:auto;
bottom:0;">
<div class="modal-content" style=" text-align: center;
border-radius: 15px 15px 0 0;
">
<div class="modal-body">
<h5 class="modal-title" id="exampleModalLabel" style=" text-align: center;
font-size: 1rem;
color: #616467;
margin-bottom: 1rem;
margin-top: .5rem;
">Explore BuddyBee with...</h5>
<div class="row deep_link_choice _AND_" style="margin-bottom:10px;">
<div class="col-md-8 col-sm-8"
style="text-align: left; display: flex; justify-content: space-evenly;">
<div style="background:url({{ absolute_url(path('dashboard')) }}buddybee_assets/android-icon-192x192.png);
height: 40px;
width: 40px;
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
border-radius: 29%;
display: inline-block;
border: 1px solid #d7dbe1;" class="cons_image_view">
</div>
<div style="
height: 40px;
width: 200px;
padding-top: 10px;;
padding-left: 10px;;
border-radius: 50%;display: inline-block" class="">
<p>BuddyBee App</p>
</div>
</div>
<div class="col-md-4 col-sm-4" style="text-align: left; padding-top: 5px;">
<button type="button" style="width: 100%;
height: 33px;
font-size: 12px;
/*margin-top: 10px; */
color: #ffffff;
background-color: #1d5b9e;
font-weight: bold;
border: none;"
class="btn btn_deep_link_selector btn-primary" data-deeplink-choice="_AND_"
data-bs-dismiss="modal">Open
</button>
</div>
</div>
<div class="row deep_link_choice _IPHONE_" style="margin-bottom:10px;">
<div class="col-md-8 col-sm-8"
style="text-align: left; display: flex; justify-content: space-evenly;">
<div style="background:url({{ absolute_url(path('dashboard')) }}buddybee_assets/android-icon-192x192.png);
height: 40px;
width: 40px;
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
border-radius: 29%;
display: inline-block;
border: 1px solid #d7dbe1;" class="cons_image_view">
</div>
<div style="
height: 40px;
width: 200px;
padding-top: 10px;;
padding-left: 10px;;
border-radius: 50%;display: inline-block" class="">
<p>BuddyBee App</p>
</div>
</div>
<div class="col-md-4 col-sm-4" style="text-align: left; padding-top: 5px;">
<button type="button" style="width: 100%;
height: 33px;
font-size: 12px;
/*margin-top: 10px; */
/*color: #261a0c;*/
/*background-color: #fac53a;*/
color: #ffffff;
background-color: #1d5b9e;
font-weight: bold;
border: none;"
class="btn btn_deep_link_selector btn-primary" data-deeplink-choice="_IPHONE_"
data-bs-dismiss="modal">Open
</button>
</div>
</div>
<div class="row deep_link_choice _BROWSER_" style="margin-bottom:10px;">
<div class="col-md-8 col-sm-8"
style="text-align: left; display: flex; justify-content: space-evenly;">
<div style="background:url({{ absolute_url(path('dashboard')) }}buddybee_assets/chrome_logo.png);
height: 40px;
width: 40px;
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
border-radius: 29%;
display: inline-block;
border: none;" class="cons_image_view">
</div>
<div style="
height: 40px;
width: 200px;
padding-top: 10px;;
padding-left: 10px;;
border-radius: 50%;display: inline-block" class="">
<p>Browser</p>
</div>
</div>
<div class="col-md-4 col-sm-4" style="text-align: left; padding-top: 5px;">
<button type="button" style="width: 100%;
height: 33px;
font-size: 12px;
/*margin-top: 10px;*/
color: #1d5b9e;
/*color: #261a0c;*/
background-color: #dddad3;
font-weight: bold;
border: none;"
class="btn btn_deep_link_selector btn-primary" data-deeplink-choice="_BROWSER_"
data-bs-dismiss="modal">Continue
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="download-app">
<div class="container">
<div class="row">
<div class="col-md-8 my-auto">
<div class="download-app-content">
<span>BuddyBee on the go</span>
<p>Start or schedule consultants anytime, anywhere with Android and iPhone apps</p>
<div class="download-store">
{# <a href="#" target="_blank"><img #}
{# src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/app-store.png" #}
{# alt="app-store"></a> #}
<a href="https://play.google.com/store/apps/details?id=eu.buddybee.consultancy"
target="_blank"><img
src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/google-play.png"
alt="google-play"></a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="download-app-img">
<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/video-call.png"
alt="video-call">
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="image" style="text-align: center;">
<img src="https://buddybee.eu/buddybee_assets/images/aamarpay-footer.png" alt="" style="max-width: 50%;">
</div>
</div>
<div class="footer-menu">
<div class="container">
<div class="row">
<div class="col-md-12">
<ul class="d-flex justify-content-between m-0">
<li><a href="#">Copyright ©{{ 'now'|date('Y') }} BuddyBee</a></li>
<li><a href="#">Powered by ©{{ 'now'|date('Y') }} HoneyBee IoT Ltd. </a></li>
{# <li><a href="#">©2021 Buddybee</a></li> #}
<li><a href="{{ url('contact_page') }}">Contact</a></li>
<li><a href="{{ url('buddybee_terms_of_service') }}">Terms of Service</a></li>
<li><a href="{{ url('buddybee_privacy_policy') }}">Privacy Policy</a></li>
<li><a href="{{ url('buddybee_refund_policy') }}">Refund Policy</a></li>
<li><a href="{{ url('buddybee_cancellation_policy') }}">Cancellation Policy</a></li>
<li><a href="{{ url('help_page') }}">Help</a></li>
{# <li><a href="{{ url('under_construction') }}">Mission Statement</a></li> #}
</ul>
</div>
</div>
</div>
</div>
</footer>
<style>
.stepIndicator {
cursor: pointer;
}
</style>
<style>
#promptForInfoModal {
/*box-shadow: 0px 6px 18px rgb(0 0 0 / 9%);*/
/*border-radius: 12px;*/
}
#promptForInfoModal .modal-body {
padding: 0 1rem;
}
#promptForInfoModal p {
margin-bottom: .5rem !important;
}
#promptForInfoModal .selectize-control {
min-width: 100%;
}
#promptForInfoModal .selectize-input.items {
border: 1px solid #d0d0d0;
padding: 8px 8px;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
box-sizing: border-box;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .1);
border-radius: 3px;
}
#promptForInfoModalForm {
max-width: 500px;
background-color: #ffffff;
/*margin: 40px auto;*/
padding: 40px;
box-shadow: 0px 6px 18px rgb(0 0 0 / 9%);
/*border-radius: 12px;*/
}
#promptForInfoModalForm .form-header {
gap: 5px;
text-align: center;
font-size: .9em;
}
#promptForInfoModalForm .form-header .stepIndicator {
position: relative;
flex: 1;
padding-bottom: 30px;
}
#promptForInfoModalForm .form-header .stepIndicator.active {
font-weight: 600;
}
#promptForInfoModalForm .form-header .stepIndicator.finish {
font-weight: 600;
color: #009688;
}
#promptForInfoModalForm .form-header .stepIndicator::before {
content: "";
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
z-index: 9;
width: 20px;
height: 20px;
background-color: #d5efed;
border-radius: 50%;
border: 3px solid #ecf5f4;
}
#promptForInfoModalForm .form-header .stepIndicator.active::before {
background-color: #a7ede8;
border: 3px solid #d5f9f6;
}
#promptForInfoModalForm .form-header .stepIndicator.finish::before {
background-color: #009688;
border: 3px solid #b7e1dd;
}
#promptForInfoModalForm .form-header .stepIndicator::after {
content: "";
position: absolute;
left: 50%;
bottom: 8px;
width: 100%;
height: 3px;
background-color: #f3f3f3;
}
#promptForInfoModalForm .form-header .stepIndicator.active::after {
background-color: #a7ede8;
}
#promptForInfoModalForm .form-header .stepIndicator.finish::after {
background-color: #009688;
}
#promptForInfoModalForm .form-header .stepIndicator:last-child:after {
display: none;
}
#promptForInfoModalForm input {
padding: 15px 20px;
width: 100%;
font-size: 1em;
border: 1px solid #e3e3e3;
border-radius: 5px;
}
#promptForInfoModalForm input:focus {
border: 1px solid #009688;
outline: 0;
}
#promptForInfoModalForm input.invalid {
border: 1px solid #ffaba5;
}
#promptForInfoModalForm .step {
display: none;
}
#promptForInfoModalForm .form-footer {
overflow: auto;
gap: 20px;
}
#promptForInfoModalForm .form-footer button {
background-color: #1d5b9e;
border: 1px solid #1d5b9e;
color: #ffffff;
border: none;
padding: 13px 30px;
font-size: 1em;
cursor: pointer;
border-radius: 5px;
flex: 1;
margin-top: 5px;
}
#promptForInfoModalForm .form-footer button:hover {
opacity: 0.8;
}
#promptForInfoModalForm .form-footer #promptInfo_prevBtn {
background-color: #fff;
color: #009688;
}
</style>
<style>
#selectPurchaseModal {
/*box-shadow: 0px 6px 18px rgb(0 0 0 / 9%);*/
/*border-radius: 12px;*/
}
#selectPurchaseModal .modal-body {
padding: 0 1rem;
}
#selectPurchaseModal p {
margin-bottom: .5rem;
}
#selectPurchaseModal .selectize-control {
min-width: 100%;
}
#selectPurchaseModal .selectize-input.items {
border: 1px solid #d0d0d0;
padding: 8px 8px;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
box-sizing: border-box;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .1);
border-radius: 3px;
}
#selectPurchaseModalForm {
max-width: 500px;
background-color: #ffffff;
/*margin: 40px auto;*/
padding: 40px;
box-shadow: 0px 6px 18px rgb(0 0 0 / 9%);
/*border-radius: 12px;*/
}
#selectPurchaseModalForm .form-header {
gap: 5px;
text-align: center;
font-size: .9em;
}
#selectPurchaseModalForm .form-header .stepIndicator {
position: relative;
flex: 1;
padding-bottom: 30px;
}
#selectPurchaseModalForm .form-header .stepIndicator.active {
font-weight: 600;
}
#selectPurchaseModalForm .form-header .stepIndicator.finish {
font-weight: 600;
color: #009688;
}
#selectPurchaseModalForm .form-header .stepIndicator::before {
content: "";
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
z-index: 9;
width: 20px;
height: 20px;
background-color: #d5efed;
border-radius: 50%;
border: 3px solid #ecf5f4;
}
#selectPurchaseModalForm .form-header .stepIndicator.active::before {
background-color: #a7ede8;
border: 3px solid #d5f9f6;
}
#selectPurchaseModalForm .form-header .stepIndicator.finish::before {
background-color: #009688;
border: 3px solid #b7e1dd;
}
#selectPurchaseModalForm .form-header .stepIndicator::after {
content: "";
position: absolute;
left: 50%;
bottom: 8px;
width: 100%;
height: 3px;
background-color: #f3f3f3;
}
#selectPurchaseModalForm .form-header .stepIndicator.active::after {
background-color: #a7ede8;
}
#selectPurchaseModalForm .form-header .stepIndicator.finish::after {
background-color: #009688;
}
#selectPurchaseModalForm .form-header .stepIndicator:last-child:after {
display: none;
}
#selectPurchaseModalForm input {
padding: 15px 20px;
width: 100%;
font-size: 1em;
border: 1px solid #e3e3e3;
border-radius: 5px;
}
#selectPurchaseModalForm input:focus {
border: 1px solid #009688;
outline: 0;
}
#selectPurchaseModalForm input.invalid {
border: 1px solid #ffaba5;
}
#selectPurchaseModalForm .step {
display: none;
}
#selectPurchaseModalForm .form-footer {
overflow: auto;
gap: 20px;
}
#selectPurchaseModalForm .form-footer button {
background-color: #1d5b9e;
border: 1px solid #1d5b9e;
color: #ffffff;
border: none;
padding: 13px 30px;
font-size: 1em;
cursor: pointer;
border-radius: 5px;
flex: 1;
margin-top: 5px;
}
#selectPurchaseModalForm .form-footer button:hover {
opacity: 0.8;
}
#selectPurchaseModalForm .form-footer #promptInfo_prevBtn {
background-color: #fff;
color: #009688;
}
</style>
<div class="modal fade" id="promptForInfoModal" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header" style="">
<h6 class="modal-title" id="exampleModalLabel" style="text-align: left;">
Please Fill up Your Info for Better Communication</h6>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
{# <span aria-hidden="true">×</span> #}
</button>
</div>
<div class="modal-body">
<div class="row">
{% if session['triggerPromptInfoModalFlag'] is defined %}
{% if session['triggerPromptInfoModalFlag'] == 1 %}
{% if session['relevantRequiredPromptFields'] is defined %}
{% set relevantRequiredPromptFields =session['relevantRequiredPromptFields']|jsonDecode() %}
{% if not relevantRequiredPromptFields is empty %}
<form id="promptForInfoModalForm" action="#!">
<!-- start step indicators -->
<div class="form-header d-flex mb-4">
{% if 'email' in relevantRequiredPromptFields or 'phone' in relevantRequiredPromptFields or 'currentCountryId' in relevantRequiredPromptFields %}
<span class="stepIndicator">Contact Info</span>
{% endif %}
{% if 'preferredTopicIdsAsConsultant' in relevantRequiredPromptFields
or 'preferredTopicIdsAsStudent' in relevantRequiredPromptFields
or 'preferredConsultancyTopicCountryIds' in relevantRequiredPromptFields %}
<span class="stepIndicator">Preferences</span>
{% endif %}
{# <span class="stepIndicator">Relevant Info</span> #}
{# <span class="stepIndicator">Preferences</span> #}
</div>
<!-- end step indicators -->
<!-- step one -->
{% if 'email' in relevantRequiredPromptFields or 'phone' in relevantRequiredPromptFields or 'currentCountryId' in relevantRequiredPromptFields %}
{# <span class="stepIndicator">Contact Info</span> #}
<div class="step">
{# <p class="text-center mb-4">Your Email Address</p> #}
{% if 'email' in relevantRequiredPromptFields %}
<div class="mb-3">
<input type="email" class="promptForInfoAutoUpdateData required"
data-set-method="setOAuthEmail"
data-field-type="_TEXT_"
data-relevant-prompt-field="email"
data-modify-trans-date="0"
placeholder="Your Email">
</div>
{% endif %}
{% if 'phone' in relevantRequiredPromptFields %}
<div class="mb-3">
<input type="phone" class="promptForInfoAutoUpdateData required"
data-set-method="setPhone"
data-field-type="_TEXT_"
data-relevant-prompt-field="phone"
data-modify-trans-date="0"
placeholder="Your Phone No.">
</div>
{% endif %}
{% if 'currentCountryId' in relevantRequiredPromptFields %}
<p class=" mb-4">Your Current Country</p>
<div class="mb-3">
<select class="promptForInfoAutoUpdateData required"
data-set-method="setCurrentCountryId,setCountry"
data-field-type="_VALUE_"
data-relevant-prompt-field="currentCountryId"
data-modify-trans-date="0"
id="currentCountryIdPromptForInfo"
name="currentCountryIdPromptForInfo[]">
</select>
</div>
{% endif %}
</div>
{% endif %}
<!-- step two -->
{% if 'preferredTopicIdsAsConsultant' in relevantRequiredPromptFields
or 'preferredTopicIdsAsStudent' in relevantRequiredPromptFields
or 'preferredConsultancyTopicCountryIds' in relevantRequiredPromptFields %}
<div class="step">
{% if 'preferredTopicIdsAsStudent' in relevantRequiredPromptFields %}
<p class=" mb-4">Your Preferred topics as Student</p>
<div class="mb-3">
<select class=" promptForInfoAutoUpdateData"
data-set-method="setPreferredTopicIdsAsStudent"
data-field-type="_JSON_"
data-relevant-prompt-field="preferredTopicIdsAsStudent"
data-modify-trans-date="0"
id="preferredTopicIdsAsStudentPromptForInfo"
name="preferredTopicIdsAsStudentPromptForInfo[]"
multiple>
</select>
</div>
{% endif %}
{% if 'preferredTopicIdsAsConsultant' in relevantRequiredPromptFields %}
<p class=" mb-4">Your Preferred topics as Consultant</p>
<div class="mb-3">
<select class=" promptForInfoAutoUpdateData"
data-set-method="setPreferredTopicIdsAsConsultant"
data-field-type="_JSON_"
data-relevant-prompt-field="preferredTopicIdsAsConsultant"
data-modify-trans-date="0"
id="preferredTopicIdsAsConsultantPromptForInfo"
name="preferredTopicIdsAsConsultantPromptForInfo[]"
multiple>
</select>
</div>
{% endif %}
{% if 'preferredConsultancyTopicCountryIds' in relevantRequiredPromptFields %}
<p class=" mb-4">Countries you wish to go</p>
<div class="mb-3">
<select class=" promptForInfoAutoUpdateData"
data-set-method="setPreferredConsultancyTopicCountryIds"
data-field-type="_JSON_"
data-relevant-prompt-field="preferredConsultancyTopicCountryIds"
data-modify-trans-date="0"
id="preferredConsultancyTopicCountryIdsPromptForInfo"
name="preferredConsultancyTopicCountryIdsPromptForInfo[]"
multiple>
</select>
</div>
{% endif %}
</div>
{% endif %}
<!-- step three -->
<!-- start previous / next buttons -->
<div class="form-footer d-flex">
<button type="button" class="prevBtn" id="promptForInfo_prevBtn"
onclick="promptInfo_nextPrev(-1)">
Previous
</button>
<button type="button" class="nextBtn" id="promptForInfo_nextBtn"
onclick="promptInfo_nextPrev(1)">
Next
</button>
</div>
<!-- end previous / next buttons -->
</form>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
{# <div class="modal-footer"> #}
{# </div> #}
</div>
</div>
</div>
<div class="modal fade" id="selectPurchaseModal" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header" style="">
<h6 class="modal-title" id="exampleModalLabel" style="text-align: left;">
Get Consultation</h6>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
{# <span aria-hidden="true">×</span> #}
</button>
</div>
<div class="modal-body">
<div class="row">
<style>
.box-selector {
padding: 10px 4px;
cursor: pointer;
}
.box-selector .inside {
padding: 5px;
border-radius: 5px;
-webkit-box-shadow: 10px 10px 48px -24px rgba(14, 26, 87, 1);
-moz-box-shadow: 10px 10px 48px -24px rgba(14, 26, 87, 1);
box-shadow: 10px 10px 48px -24px rgba(14, 26, 87, 1);
}
.box-selector .inside input {
cursor: pointer
}
.box-selector .inside textarea {
text-align: center;
cursor: pointer;
width: 100%;
border: none;
resize: none;
font-size: 14px;
color: #1d5b9e;
font-weight: bold;
}
.box-selector.sch_selector_mon .inside,
.box-selector.sch_selector_day .inside
/*.box-selector.sch_selector_time .inside*/
{
padding: 10px 5px;
}
.box-selector.sch_selector_time .inside {
padding: 4px 5px;
}
.step .view_if_has_schedules {
display: none;
}
.box-selector.active:not(.man_sch_selector) .inside {
border: 2px solid #1d5b9e;
-webkit-box-shadow: 10px 10px 24px -3px rgba(29, 91, 158, 1);
-moz-box-shadow: 10px 10px 24px -3px rgba(29, 91, 158, 1);
box-shadow: 10px 10px 24px -3px rgba(29, 91, 158, 1);
}
.box-selector.active.man_sch_selector .inside {
border: 2px solid #1d5b9e;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.box-selector.sch_selector_mon.active .inside,
.box-selector.sch_selector_day.active .inside,
.box-selector.sch_selector_time.active .inside {
border: 2px solid #1d5b9e;
-webkit-box-shadow: 4px 7px 24px -3px rgba(29, 91, 158, 1);
-moz-box-shadow: 10px 10px 24px -3px rgba(29, 91, 158, 1);
box-shadow: 4px 7px 24px -3px rgba(29, 91, 158, 1);
}
.box-selector .img {
margin-bottom: 5px;
}
.box-selector .title {
text-align: center;
margin-bottom: 1px;
font-size: 13px;
}
.box-selector.paymentMethodSelectorBtn .title {
text-align: center;
margin-bottom: 1px;
font-size: 14px;
}
.box-selector .sub-title {
font-size: 12px;
color: grey;
}
#selectPurchaseModal .routineTable {
text-align: left;
vertical-align: middle;
}
#selectPurchaseModal .routineTable .icon-delete {
color: darkred;
font-weight: bold;
}
#selectPurchaseModal .routineTable .icon-delete .fa {
padding: 10px;
border-radius: 39px;
border: 1px solid #eddcdc;
width: 34px;
height: 34px;
text-align: center;
}
#selectPurchaseModal .routineTable .icon-check {
color: green;
font-weight: bold;
}
#selectPurchaseModal .routineTable .icon-check .fa {
opacity: 0.1;
}
#selectPurchaseModal .routineTable .icon-check.isChecked .fa {
opacity: 1;
}
#selectPurchaseModal .routineTable .icon-check .fa {
padding: 10px;
border-radius: 39px;
border: 1px solid #eddcdc;
width: 34px;
height: 34px;
text-align: center;
}
</style>
<form id="selectPurchaseModalForm" action="#">
<!-- start step indicators -->
<div class="form-header d-flex mb-4">
<span class="stepIndicator seq_0" data-seq-id="0">Select Country</span>
<span class="stepIndicator seq_1" data-seq-id="1">Select Topic</span>
<span class="stepIndicator seq_2" data-seq-id="2">Select Consultant</span>
<span class="stepIndicator seq_3" data-seq-id="3">Select Schedule</span>
<span class="stepIndicator seq_4" data-seq-id="4">Confirm</span>
<span class="stepIndicator seq_5" data-seq-id="5">Payment</span>
</div>
<div class="step seq_0 ">
<h5 class=" ">Select a Country</h5>
<div class="row clearfix cn_holder">
{% if not countries_data is defined %}
{% set countries_data=''|getCountriesBuddyBee %}
{% endif %}
{% for ind,cntry in countries_data %}
<div class="box-selector cn_selector cn_{{ cntry.id }} col-md-3 col-sm-6"
data-id="{{ cntry.id }}"
data-gen-class="cn_selector"
>
<div class="inside">
<div class="img" href="{{ url('dashboard') }}" style="
background:url(' {{ absolute_url(path('dashboard')) }}{{ cntry.flagImage }}');
height: 50px !important;
width: 100%;
/* max-width: 30% !important; */
background-position: center;
background-size: contain;
background-repeat: no-repeat;
">
</div>
<h6 class="title" style="height: 2rem;">{{ cntry.name }}</h6>
{# <p class="sub-title"> </p> #}
</div>
</div>
{% endfor %}
</div>
</div>
<div class="step seq_1 ">
<h5 class=" ">Select a Topic</h5>
<div class="row clearfix topic_holder">
</div>
</div>
<div class="step seq_2">
<h5 class=" ">Select a Consultant</h5>
<div class="row clearfix cons_holder">
</div>
</div>
<div class="step seq_3">
<h5 class="view_if_has_schedules">Select Month</h5>
<div class="row clearfix sch_holder_month view_if_has_schedules"></div>
<h5 class="view_if_has_schedules">Select Day</h5>
<div class="row clearfix sch_holder_day view_if_has_schedules"></div>
<h5 class="view_if_has_schedules">Select Time</h5>
<div class="row clearfix sch_holder_time view_if_has_schedules"></div>
<p class="view_if_has_schedules"> -------or------- </p>
<h5 class=" ">Select Preferred Schedule (Upto 3)</h5>
<div class="row clearfix sch_holder">
{% for hh in 1..3 %}
<div class="box-selector man_sch_selector man_sch_{{ hh }} col-md-4 col-sm-6"
data-id="{{ hh }}"
data-gen-class="man_sch_selector"
>
<div class="inside">
<textarea
class="add_basic_day_picker man_sch_selector_dp man_sch_selector_dp{{ hh }} "
data-id="{{ hh }}" placeholder="Click to set Schedule"
data-gen-class="man_sch_selector_dp"></textarea>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="step seq_4">
<h5 class=" ">Your Purchase Summary</h5>
<div class="row clearfix summary_holder">
<p class="cntry_p">Country : <span>Germany</span></p>
<p class="topic_p"> Name & Type: <span>Single Consultation</span></p>
<p class="cons_p">Consultant : <span>Ahmed Zahid Omar</span></p>
<p class="coins_p">Coins : <span class="routineCoinNeededTotalSpan"></span></p>
</div>
<style>
#selectPurchaseModal .routineTable {
text-align: left;
vertical-align: middle;
}
#selectPurchaseModal .routineTable .icon-delete {
color: darkred;
font-weight: bold;
}
#selectPurchaseModal .routineTable .icon-delete .fa {
padding: 10px;
border-radius: 39px;
border: 1px solid #eddcdc;
width: 34px;
height: 34px;
text-align: center;
}
#selectPurchaseModal .routineTable .icon-check {
color: green;
font-weight: bold;
}
#selectPurchaseModal .routineTable .icon-check .fa {
opacity: 0.1;
}
#selectPurchaseModal .routineTable .icon-check.isChecked .fa {
opacity: 1;
}
#selectPurchaseModal .routineTable .icon-check .fa {
padding: 10px;
border-radius: 39px;
border: 1px solid #eddcdc;
width: 34px;
height: 34px;
text-align: center;
}
</style>
<table class="table table-condensed table-striped routineTable">
<tbody></tbody>
<tfoot>
<tr>
<td>Total Bee Coins Needed</td>
<td style="text-align: left;"><b class="routineCoinNeededTotalSpan">0</b><br>
</td>
<td></td>
</tr>
</tfoot>
</table>
</div>
<div class="step seq_5">
<h5 class=" ">Direct Payment</h5>
<div class="row">
<div class="box-selector pm_selector pm_1 col-md-4 col-sm-6 paymentMethodSelectorBtn"
data-id="1"
data-gen-class="pm_selector"
>
<div class="inside">
<div class="img" href="{{ url('dashboard') }}" style="
background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/stripe_logo.png);
height: 50px !important;
width: 100%;
/* max-width: 30% !important; */
background-position: center;
background-size: contain;
background-repeat: no-repeat;
">
</div>
<h6 class="title" style="height: 2rem;">Stripe</h6>
{# <p class="sub-title"> </p> #}
</div>
</div>
<div class="box-selector pm_selector pm_2 col-md-4 col-sm-6 paymentMethodSelectorBtn"
data-id="2"
data-gen-class="pm_selector"
>
<div class="inside">
<div class="img" href="{{ url('dashboard') }}" style="
background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/bkash_logo.png);
height: 50px !important;
width: 100%;
/* max-width: 30% !important; */
background-position: center;
background-size: contain;
background-repeat: no-repeat;
">
</div>
<h6 class="title" style="height: 2rem;">Bkash</h6>
{# <p class="sub-title"> </p> #}
</div>
</div>
<div class="box-selector pm_selector pm_3 col-md-4 col-sm-6 paymentMethodSelectorBtn"
data-id="3"
data-gen-class="pm_selector"
>
<div class="inside">
<div class="img" href="{{ url('dashboard') }}" style="
background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/aamarpay_logo.png);
height: 50px !important;
width: 100%;
/* max-width: 30% !important; */
background-position: center;
background-size: contain;
background-repeat: no-repeat;
">
</div>
<h6 class="title" style="height: 2rem;">Card</h6>
{# <p class="sub-title"> </p> #}
</div>
</div>
</div>
<h5 class=" ">Purchase Bee Card</h5>
<div class="row">
{% set encData={
} %}
{# {% set encData={ #}
{# "rtlId": retailerId is defined?retailerId:0 , #}
{# "schTs": scheduleId is defined?scheduleId:0 , #}
{# "cnsId":consultantDetails is defined and not consultantDetails is null ?consultantDetails.applicantId:0, #}
{# "stdntId": session[UserConstants.USER_ID] is defined ?session[UserConstants.USER_ID]:0 , #}
{# "aams": autoAssignMeetingSession is defined ?autoAssignMeetingSession:0 , #}
{# "rpsc": requiredPurchaseSessionCount is defined ?requiredPurchaseSessionCount:0, #}
{# "scc":sessionConsumeCount is defined?sessionConsumeCount:0, #}
{# "tId":topic is defined and not topic is null? topic.id:0, #}
{# "dur":sessionDuration is defined?sessionDuration:0, #}
{# "sem":topicSessionValue is defined? topicSessionValue:0 , #}
{# } %} #}
{% set link_data=url('purchase_bee_card_page',{ 'encData':(encData|json_encode) | urlencrypt } ) %}
<div class="box-selector pm_selector pm_4 col-md-4 col-sm-6 paymentMethodSelectorBtn"
data-id="4"
data-gen-class="pm_selector"
>
<div class="inside">
<div class="img" href="{{ url('dashboard') }}" style="
background: url({{ absolute_url(path('dashboard')) }}buddybee_assets/ms-icon-310x310.png);
height: 50px !important;
width: 100%;
/* max-width: 30% !important; */
background-position: center;
background-size: contain;
background-repeat: no-repeat;
">
</div>
<h6 class="title" style="height: 2rem;">Claim Bee Card</h6>
{# <p class="sub-title"> </p> #}
</div>
</div>
{# <div class="box-selector pm_selector pm_5 col-md-4 col-sm-6 paymentMethodSelectorBtn" #}
{# data-id="5" #}
{# data-gen-class="pm_selector" #}
{# > #}
{# <div class="inside"> #}
{# <div class="img" href="{{ url('dashboard') }}" style=" #}
{# background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/bkash_logo.png); #}
{# height: 50px !important; #}
{# width: 100%; #}
{# /* max-width: 30% !important; */ #}
{# background-position: center; #}
{# background-size: contain; #}
{# background-repeat: no-repeat; #}
{# "> #}
{# </div> #}
{# <h6 class="title" style="height: 2rem;">Bkash</h6> #}
{# #}{# <p class="sub-title"> </p> #}
{# </div> #}
{# </div> #}
{# <div class="box-selector pm_selector pm_6 col-md-4 col-sm-6 paymentMethodSelectorBtn" #}
{# data-id="6" #}
{# data-gen-class="pm_selector" #}
{# > #}
{# <div class="inside"> #}
{# <div class="img" href="{{ url('dashboard') }}" style=" #}
{# background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/aamarpay_logo.png); #}
{# height: 50px !important; #}
{# width: 100%; #}
{# /* max-width: 30% !important; */ #}
{# background-position: center; #}
{# background-size: contain; #}
{# background-repeat: no-repeat; #}
{# "> #}
{# </div> #}
{# <h6 class="title" style="height: 2rem;">Card</h6> #}
{# #}{# <p class="sub-title"> </p> #}
{# </div> #}
{# </div> #}
</div>
{# <h5 class=" ">Others</h5>#}
<div class="row clearfix ">
<div class="box-selector col-md-12 col-sm-6"
data-id="promo"
data-gen-class="">
<div class="inside">
<h6 class="title" style="height: 2rem;font-size: 14px;">Promo Code</h6>
<input class="form-control "
data-id="promo" placeholder="Promo Code"
data-gen-class="">
<h6 class="title" style="height: 2rem;font-size: 14px;"> </h6>
</div>
</div>
</div>
</div>
<div class="form-footer d-flex">
<button type="button" class="prevBtn" id="selectPurchaseModal_prevBtn">
Previous
</button>
<button type="button" class="nextBtn" id="selectPurchaseModal_nextBtn">
Next
</button>
</div>
</form>
</div>
</div>
{# <div class="modal-footer"> #}
{# </div> #}
</div>
</div>
</div>
{# some over riding css for buttons and stuffs #}
<!-- back to top btn -->
<a id="back-top"><i class="fas fa-chevron-up"></i></a>
<!-- back to top btn -->
<!-- Option 1: Bootstrap Bundle with Popper -->
{# <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" #}
{# integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" #}
{# crossorigin="anonymous"> #}
{# </script> #}
{# temp start #}
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"
integrity=""
crossorigin="anonymous"></script>
{# temp end #}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
{# <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script> #}
<!-- jquery cdn -->
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.13.3/js/standalone/selectize.min.js"></script>
<script type="text/javascript" src="{{ absolute_url(path('dashboard')) }}jqueryui/jquery.form.js"></script>
<!-- calender js -->
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/mini-event-calendar.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<!-- countdown js -->
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/jquery.countdown.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<!-- process circle js -->
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/progresscircle.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<!-- custom js-->
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/main.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/imgProgress.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<!-- owl carousel -->
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/owl.carousel.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<!-- wow js -->
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/wow.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
{# <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/AppOffcanvas.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script> #}
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/moment.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<script type="text/javascript" src="{{ absolute_url(path('dashboard')) }}alertify/lib/alertify.min.js"></script>
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/plugin/bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<script src="{{ absolute_url(path('dashboard')) }}js/jquery.translate.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/bindWithDelay.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/generic.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<script src="{{ absolute_url(path('dashboard')) }}js/language_pack.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<script src="{{ absolute_url(path('dashboard')) }}condensed_assets/ifvisible.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
<link rel="stylesheet" href="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/sweetalert/sweetalert.css">
<script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/sweetalert/sweetalert.min.js"></script>
<link rel="stylesheet" href="{{ asset('css/cal_print.css') }}" media="print">
<script type="text/javascript"
src="{{ absolute_url(path('dashboard')) }}buddybee_assets/plugin/fullcalendar3/fullcalendar.min.js"></script>
<script type="text/javascript"
src="{{ absolute_url(path('dashboard')) }}buddybee_assets/plugin/fullcalendar3/scheduler/scheduler.min.js"></script>
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js"></script>
<style>
.btn {
border-radius: 15rem;
}
.withdraw p,
.sweet-alert button,
.paymentMethodSelectorBtn p {
border-radius: 42px;
}
</style>
</body>
<script>
var socketInitiated = 0;
var offcanvasCalendarInitiated = 0;
var offCalendarLastRefreshedTs = 0;
var tb_pathToImage = "{{ absolute_url(path('dashboard'))~'buddybee_assets/images/circle-pending-image.png' }}";
var buddybee_socket = '';
var buddybee_socket_user_name = '{{ session[UserConstants.USER_NAME] is defined? session[UserConstants.USER_NAME]:'' }}';
var buddybee_socket_user_id = 'BBEE_{{ session[UserConstants.USER_ID] is defined? session[UserConstants.USER_ID]:0 }}';
var current_user_user_id = {{ session[UserConstants.USER_ID] is defined? session[UserConstants.USER_ID]:0 }};
var buddybee_socket_user_session_token = '{{ session['token'] is defined? session['token']:'_GEN_' }}';
{% set curr_route=app.request.attributes.get('_route') %}
var CURRENT_ROUTE = '{{ curr_route }}';
var deepLinkModalLastShown = window.localStorage.getItem('deepLinkModalLastShown');
// var deepLinkModalLastShown = 0;
var currTsForDlM = {{ ''|date('U') }};
if (deepLinkModalLastShown == 'null' || deepLinkModalLastShown == null) {
deepLinkModalLastShown = 0
}
var upcomingMeetingDataForRedirect = window.localStorage.getItem('UNMData');
var upcomingNextMeetingIdForRedirect = window.localStorage.getItem('UNMId');
var upcomingNextMeetingTsForRedirect = window.localStorage.getItem('UNMTs');
if (upcomingMeetingDataForRedirect == 'null' || upcomingMeetingDataForRedirect == null) {
upcomingMeetingDataForRedirect = "[]"
}
if (upcomingNextMeetingIdForRedirect == 'null' || upcomingNextMeetingIdForRedirect == null) {
upcomingNextMeetingIdForRedirect = 0
}
if (upcomingNextMeetingTsForRedirect == 'null' || upcomingNextMeetingTsForRedirect == null) {
upcomingNextMeetingTsForRedirect = 0
}
upcomingMeetingDataForRedirect = JSON.parse(upcomingMeetingDataForRedirect);
var deepLinkModal = new bootstrap.Modal(document.getElementById('deepLinkModal'), {
keyboard: false
});
var bookNowModal = new bootstrap.Modal(document.getElementById('bookNowModal'), {
keyboard: false
});
var promptForInfoModal = new bootstrap.Modal(document.getElementById('promptForInfoModal'), {
keyboard: false
});
var selectPurchaseModal = new bootstrap.Modal(document.getElementById('selectPurchaseModal'), {
keyboard: false
});
{% if not countries_data is defined %}
{% set countries_data=''|getCountriesBuddyBee %}
{% endif %}
var countries_data ={{ countries_data|json_encode()|raw() }}
var topic_data_by_id = {}
var perSessionMinute = 20; // Current tab is set to be the first tab (0)
var COIN_GENERAL_MULT = 100; // Current tab is set to be the first tab (0)
var currentTab = 0; // Current tab is set to be the first tab (0)
var currentTabSelectPurchaseModal = 0; // Current tab is set to be the first tab (0)
var triggerRefreshUpcomingSession = 0; // Current tab is set to be the first tab (0)
// promptInfo_showTab(currentTab); // Display the current tab
{% if (session[UserConstants.USER_ID] is defined ) %}
function refreshOffCanvasCalendar(force) {
force = force || 0
if (offcanvasCalendarInitiated == 0) {
// alert('here')
$('#calendarHere').fullCalendar({
// $('#scheduleCalendar').fullCalendar({
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
height: 554,
// header: false,
header: {
left: 'today prev,next',
center: 'title',
right: 'timelineDay,timelineWeek,timelineMonth,timelineYear,month',
},
buttonText: {
month: 'calendar',
timelineMonth: 'month',
},
eventClick: function (calEvent, jsEvent, view) {
// console.log(calEvent)
swal({
title: calEvent.title,
text: 'Meeting On ' + calEvent.topic_name + ' on ' + moment.unix(calEvent.scheduled_time_ts).format('MMM DD, YYYY HH:mm'),
type: "info",
showCancelButton: true,
// confirmButtonColor: "#DD6B55",
confirmButtonText: "View!",
cancelButtonText: "Exit",
closeOnConfirm: false,
closeOnCancel: true,
timer: 10000,
}, function (isConfirm) {
if (isConfirm) {
{% if BUDDYBEE_ADMIN_LEVEL >=1 %}
window.location.href = '{{ path('consultancy_session') }}/' + calEvent.id + '?adminView=1'
{% else %}
window.location.href = '{{ path('consultancy_session') }}/' + calEvent.id + ''
{% endif %}
swal("Sweet!", "Taking you there. Please Wait", "success");
} else {
// swal("Oops", "You cannot do that!", "error");
}
});
// alert('Event: ' + calEvent.title);
// alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
// alert('View: ' + view.name);
//
// // change the border color just for fun
// $(this).css('border-color', 'red');
},
// themeSystem:'jquery-ui',
editable: true,
eventStartEditable: true,
eventDurationEditable: true,
droppable: true,
slotDuration: '00:30:00',
defaultView: 'month',
eventRender: function (eventObj, $el) {
// $('#example').popover(options)
$el.popover({
title: eventObj.topic_name,
content: 'Meeting Between ' + eventObj.title + ' on ' + moment.unix(eventObj.scheduled_time_ts).format('MMM DD, YYYY HH:mm'),
trigger: 'hover',
placement: 'top',
container: 'body',
html: true,
template: '<div class="popover" role="tooltip">' +
'<div class="arrow">' +
'</div' +
'><h3 class="popover-header">' +
'</h3>' +
'<div class="popover-body">' +
'</div>' +
'<button class="btn btn-success">PIKA</button>' +
'</div>'
});
},
// resourceAreaHeaderContent: 'Rooms',
resourceColumns: [
{
labelText: 'Schedule',
field: 'title'
}
// {
// labelText: 'Occupancy',
// field: 'occupancy'
// }
],
resources: [],
views: {
basic: {
// options apply to basicWeek and basicDay views
},
agenda: {
slotDuration: '00:30:00',
// options apply to agendaWeek and agendaDay views
},
week: {
// options apply to basicWeek and agendaWeek views
},
day: {
// options apply to basicDay and agendaDay views
},
timelineWeek: {
groupByResource: true,
slotDuration: '00:30:00',
// options apply to basicDay and agendaDay views
}
},
drop: function (date, allDay) {
// this function is called when something is dropped
// retrieve the dropped element's stored Event Object
var originalEventObject = $(this).data('eventObject');
// we need to copy it, so that multiple events don't have a reference to the same object
var copiedEventObject = $.extend({}, originalEventObject);
// assign it the date that was reported
copiedEventObject.start = date;
copiedEventObject.allDay = allDay;
copiedEventObject.className = originalEventObject.className;
// render the event on the calendar
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
$('#scheduleCalendar').fullCalendar('renderEvent', copiedEventObject, true);
// is the "remove after drop" checkbox checked?
if ($('#drop-remove').is(':checked')) {
// if so, remove the element from the "Draggable Events" list
$(this).remove();
}
},
events: [],
});
offcanvasCalendarInitiated = 1;
}
var currOpTs = moment().unix();
if ((offCalendarLastRefreshedTs + 120) < currOpTs || force == 1) {
var pika_ind_id = 'NNNAI';
$.ajax({
url: BaseURL + "select_data_ajax_public",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1, //required for CORS
//sessionData: sessionData //required only if using cordova for CORS
query: '_EMPTY_',
tableName: "entity_meeting_session",
entity_group: 1,
valueField: "session_id",
textField: "meeting_room_id",
// selectFieldList:[ ///skip this property for all fields
// 'client_name','client_id','address'
//
// ],
selectorId: 7,
isMultiple: 1,
itemLimit: '_ALL_', // for all : '_ALL_'
offset: 0, // default value:0 (from start)
orderByConditions: [ //sequential
// {
// field: 'rating',
// fieldValues: [5,1,9],
// sortType:'ASC'
// },
// {
// field: 'is_featured',
// sortType:'DESC'
// },
{
field: 'scheduled_time_ts',
sortType: 'ASC'
}
],
dataId: pika_ind_id,
// textField: "rendered_text",
//
// renderTextFormat: "#__id__ __name__",
// andConditions: [
// //{type: "like", field: "name", value: query},
// {type: "=", field: "delivery_receipt_id", value: $('.dr_id' + pika_ind_id).val()},
// {type: "=", field: "product_id", value: $('.selectize_me_ssp' + pika_ind_id).val()},
// {type: "=", field: "position", value: 3}
// ],
mustConditions: [
//{type: "like", field: "name", value: query},
//{type: "=", field: "delivery_rceipt_id", value: $('.dr_id' + pika_ind_id).val()},
//{type: "in", field: "alottment_tagged", value: [0,'null','']},
// {type: "<=", field: "scheduled_time_ts", value: moment().add('60', 'days').unix()},
{type: ">=", field: "scheduled_time_ts", value: moment().subtract('45', 'days').unix()},
// {type: "=", field: "product_id", value: $('.ssp' + pika_ind_id).val()},
// {type: "=", field: "warehouse_id", value: $('#warehouseId').val()},
// {type: "=", field: "warehouse_action_id", value: $('.wa' + pika_ind_id).val()},
// {type: "=", field: "position", value: 1}
],
andOrConditions: [
{% if BUDDYBEE_ADMIN_LEVEL>=5 %}
{% elseif BUDDYBEE_ADMIN_LEVEL >=1 %}
{# { #}
{# type: "in", #}
{# field: "is_admin", #}
{# value: [0, 'null'] #}
{# }, #}
{# { #}
{# type: "in", #}
{# field: "assigned_sales_representative_id", #}
{# value: [0, 'null',{{ session[UserConstants.USER_ID] }}] #}
{# }, #}
{% else %}
{type: "=", field: "student_id", value: {{ session[UserConstants.USER_ID] }}},
{type: "=", field: "consultant_id", value: {{ session[UserConstants.USER_ID] }}},
{% endif %}
// {type: "like", field: "client_numerical_code", value: query},
// {type: "like", field: "client_name", value: query},
// {type: "like", field: "client_id", value: query},
// {type: "like", field: "contact_number", value: query},
// {type: "like", field: "email", value: query},
],
joinTableData: [
{
tableName: "entity_applicant_details",
joinFieldPrimary: "student_id",
joinOn: 'applicant_id',
selectPrefix: 'student_',
selectFieldList: [
'firstname', 'lastname', 'image', 'professional_title'
]
},
{
tableName: "entity_create_topic",
joinFieldPrimary: "topic_id",
joinOn: 'id',
selectPrefix: 'topic_',
selectFieldList: [
'topic_name',
]
},
{
tableName: "entity_applicant_details",
joinFieldPrimary: "consultant_id",
joinOn: 'applicant_id',
selectPrefix: 'consultant_',
selectFieldList: [
'firstname', 'lastname', 'image', 'professional_title', 'current_country_id'
]
},
],
convertDateToStringFieldList: [
{field: 'created_at', format: 'U'}
],
convertToObject: [
// 'carton_product_by_code_ids','another'
],
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
offCalendarLastRefreshedTs = moment().unix()
// callback(res.data);
var str = '';
var currUnix = moment().unix();
var added_cntry_id = [];
var added_event_id = [];
$('#calendarHere').fullCalendar('addResource', {
id: 'cntry__OTHER_COUNTRIES_',
// parentId: 'a',
title: 'Others'
});
for (var t = 0; t < res.data.length; t++) {
var c_data = res.data[t];
if (c_data.consultant_current_country_id == '' || c_data.consultant_current_country_id == 0 || c_data.consultant_current_country_id == null)
c_data.consultant_current_country_id = '_OTHER_COUNTRIES_';
// // console.log('added_cntry_id')
// // console.log(added_cntry_id)
if (added_cntry_id.indexOf(c_data.consultant_current_country_id) != -1) {
} else {
$('#calendarHere').fullCalendar('addResource', {
id: 'cntry_' + c_data.consultant_current_country_id,
// parentId: 'a',
title: typeof countries_data[c_data.consultant_current_country_id] !== 'undefined' ? countries_data[c_data.consultant_current_country_id]['name'] : ''
});
added_cntry_id.push(c_data.consultant_current_country_id)
}
if (added_event_id.indexOf(c_data.consultant_id + '_' + c_data.student_id) != -1) {
} else {
$('#calendarHere').fullCalendar('addResource', {
id: 'r_' + c_data.consultant_id + '_' + c_data.student_id,
parentId: 'cntry_' + c_data.consultant_current_country_id,
title: c_data.consultant_firstname + ' -- ' + c_data.student_firstname
});
added_event_id.push(c_data.consultant_id + '_' + c_data.student_id)
}
var eventColor = 'darkgreen';
var textColor = '#fff';
var endTimeMoment = moment.unix(c_data.scheduled_time_ts).add(c_data.duration_left_min, 'minutes');
if (currUnix < c_data.scheduled_time_ts) {
//upcoming
if (c_data.is_paid_full == 1)
eventColor = '#fb7400';
else
eventColor = '#d586a3';
// textColor='#212529';
} else if (currUnix < endTimeMoment.unix())
eventColor = '#1d5b9e'; //ongoing
else
eventColor = 'darkgreen'; //completed
var eventObj2 = {
id: c_data.session_id,
color: eventColor,
textColor: textColor,
resourceId: 'r_' + c_data.consultant_id + '_' + c_data.student_id,
title: c_data.consultant_firstname + ' -- ' + c_data.student_firstname,
consultant_id: c_data.consultant_id,
student_id: c_data.student_id,
meeting_room_id: c_data.meeting_room_id,
scheduled_time_ts: c_data.scheduled_time_ts,
topic_id: c_data.topic_id,
topic_name: c_data.topic_topic_name,
session_value: c_data.session_value,
consultant_firstname: c_data.consultant_firstname,
consultant_lastname: c_data.consultant_lastname,
student_firstname: c_data.student_firstname,
student_lastname: c_data.student_lastname,
start: moment.unix(c_data.scheduled_time_ts).add(0, 'days'),
end: endTimeMoment,
allDay: false
};
// eventArray.push(eventObj2)
$('#calendarHere').fullCalendar('renderEvent', eventObj2, true);
}
}
});
}
}
{% endif %}
function stepShowTab(n, parentSelector) {
// alert('here')
// This function will display the specified tab of the form...
parentSelector = parentSelector || '#selectPurchaseModal'
var prevN = -1;
$(parentSelector + ' .stepIndicator.active').each(function (gg, elem) {
prevN = 1 * $(elem).data('seqId');
});
var newN = 0;
if (n === '+1') {
newN = (1 * prevN) + 1;
} else if (n === '-1') {
newN = (1 * prevN) - 1;
} else
newN = n;
if (!$(parentSelector + ' .stepIndicator.seq_' + newN).length)
newN = (1 * prevN);
if (!$(parentSelector + ' .stepIndicator.seq_' + (newN + 1)).length)
$(parentSelector + " .nextBtn").text('Confirm');
else
$(parentSelector + " .nextBtn").text('Next');
if (!$(parentSelector + ' .stepIndicator.seq_' + (newN - 1)).length)
$(parentSelector + " .prevBtn").hide();
else
$(parentSelector + " .prevBtn").show();
// alert(prevN)
// alert(newN)
// alert($(parentSelector+' .stepIndicator.seq_'+(newN+1)).length)
if (prevN == newN) {
$(parentSelector).modal('hide')
return false;
}
$(parentSelector + ' .stepIndicator').removeClass('active')
$(parentSelector + ' .step').hide()
$(parentSelector + ' .step.seq_' + newN).show()
for (var gg = 0; gg <= newN; gg++)
$(parentSelector + ' .stepIndicator.seq_' + gg).addClass('active')
var triggerFunc = $(parentSelector + ' .step.seq_' + newN).attr('data-trigger-function');
if (typeof triggerFunc !== 'undefined' && triggerFunc !== false) {
window[triggerFunc]();
}
}
function selectDataOnPurchaseModal(cntry_id, t_id, cons_id, sch_ids, additional_coins) {
options = {
countryId: 0,
topicId: 0,
consultantId: 0,
scheduleIds: [],
}
}
function submitPurchaseModalData() {
var data = {}
}
function populateTopicListOnPurchaseModal(countryId, query) {
var pika_ind_id = "_NA_";
$('#selectPurchaseModal .topic_holder').empty();
$.ajax({
url: BaseURL + "select_data_ajax_public",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1,
//sessionData: sessionData
query: query,
tableName: "entity_create_topic",
valueField: "id",
textField: "topic_name",
entity_group: 1,
selectorId: '_NA_',
isMultiple: 0,
dataId: pika_ind_id,
// isMultiple: 0,
//textField: "rendered_text",
//
//renderTextFormat: "#__id__ __name__",
andConditions: [],
andOrConditions: [],
mustConditions: [
{type: "=", field: "consultancy_enabled", value: 1},
{type: "=", field: "country_id", value: countryId},
{# {% if not curr_data is empty %} #}
{# {type: "in", field: "id", value: {{ curr_data|json_encode|raw() }} }, #}
{# {% else %} #}
{# {% if consultantDetails.isAdmin>0 %} #}
{# {type: "like", field: "topic_marker", value: '_support_ _report_to_admin_'}, #}
{# {% else %} #}
{# {type: "!=", field: "only_bookable_by_admin", value: '1'}, #}
{# {type: "not like", field: "topic_marker", value: '_support_'}, #}
{# {type: "not like", field: "topic_marker", value: '_report_to_admin_'}, #}
{# {% endif %} #}
{# {% endif %} #}
],
convertToObject: [
'routine_data'
],
skipDefaultCompanyId: 1
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
topic_data_by_id = res.dataById
for (var jj = 0; jj < res.data.length; jj++) {
var dt = res.data[jj];
var is_package = 0;
if (dt['topic_marker'] != null)
if (dt['topic_marker'].indexOf('_package_') !== -1)
is_package = 1;
var ggStr = ' <div class="box-selector tp_selector tp_' + dt['id'] + ' col-md-3 col-sm-6"' +
' data-id="' + dt['id'] + '" ' +
' data-gen-class="tp_selector" ' +
'>' +
'<div class="inside">' +
' <div class="img" style="' +
"background:url(' {{ absolute_url(path('dashboard')) }}" + dt['topic_image'] + "');" +
' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' +
'<h6 class="title" style="height: 3rem; font-size:12px">' + dt['topic_name'] + '</h6> ' +
// '<p class="sub-title">'+dt['topic_summary']+'</p>' +
'<p class="sub-title" style="text-align:center;">' + (is_package == 1 ? 'Package' : (dt['meeting_type'] == 2 ? 'Offline Process' : 'Online Session')) + '</p>' +
// '<p class="sub-title">'+dt['topic_summary']+'</p>' +
'</div></div>';
$('#selectPurchaseModal .topic_holder').append(ggStr);
}
}
});
}
function populateConsultantListOnPurchaseModal(tpId, query) {
var pika_ind_id = "_NA_";
$('#selectPurchaseModal .cons_holder').empty();
$.ajax({
url: BaseURL + "select_data_ajax_public",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1,
//sessionData: sessionData
query: query,
tableName: "entity_applicant_details",
valueField: "applicant_id",
textField: "firstname",
entity_group: 1,
selectorId: '_NA_',
isMultiple: 0,
dataId: pika_ind_id,
// isMultiple: 0,
//textField: "rendered_text",
//
//renderTextFormat: "#__id__ __name__",
andConditions: [],
andOrConditions: [
{type: "like", field: "preferred_topic_ids_as_consultant", value: '"' + tpId + '"'},
{type: "like", field: "preferred_topic_ids_as_consultant", value: '[]'},
// {type: "like", field: "preferred_topic_ids_as_consultant", value: ''},
// {type: "like", field: "preferred_topic_ids_as_consultant", value: 'null'},
{type: "=", field: "preferred_topic_ids_as_consultant", value: 'null'},
],
mustConditions: [
{type: "=", field: "is_consultant", value: 1},
{# {% if not curr_data is empty %} #}
{# {type: "in", field: "id", value: {{ curr_data|json_encode|raw() }} }, #}
{# {% else %} #}
{# {% if consultantDetails.isAdmin>0 %} #}
{# {type: "like", field: "topic_marker", value: '_support_ _report_to_admin_'}, #}
{# {% else %} #}
{# {type: "!=", field: "only_bookable_by_admin", value: '1'}, #}
{# {type: "not like", field: "topic_marker", value: '_support_'}, #}
{# {type: "not like", field: "topic_marker", value: '_report_to_admin_'}, #}
{# {% endif %} #}
{# {% endif %} #}
],
convertToObject: [
'routine_data'
],
skipDefaultCompanyId: 1
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
// topic_data_by_id = res.dataById
for (var jj = 0; jj < res.data.length; jj++) {
var dt = res.data[jj];
var ggStr = ' <div class="box-selector cons_selector cons_' + dt['id'] + ' col-md-3 col-sm-6"' +
' data-id="' + dt['applicant_id'] + '" ' +
' data-gen-class="cons_selector" ' +
'>' +
'<div class="inside">' +
' <div class="img" style="' +
"background:url(' {{ absolute_url(path('dashboard')) }}" + dt['image'] + "');" +
' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' +
'<h6 class="title" style="height: 2rem; font-size:12px">' + dt['firstname'] + ' ' + dt['lastname'] + '</h6> ' +
// '<p class="sub-title">'+dt['topic_summary']+'</p>' +
'</div></div>';
$('#selectPurchaseModal .cons_holder').append(ggStr);
}
// alert('pika master')
}
});
}
function populateScheduleListOnPurchaseModal(consId, durValue, query) {
var pika_ind_id = "_NA_";
// $('#selectPurchaseModal .sch_holder').empty();
$('#selectPurchaseModal .sch_holder_month').empty();
$('#selectPurchaseModal .sch_holder_day').empty();
$('#selectPurchaseModal .sch_holder_time').empty();
durValue = durValue || 30;
var options = {
'_NEXT_60_DAYS_': 1,
// '_THIS_DAY_':1,
// '_NEXT_DAYS_':20,
}
$.ajax({
url: BaseURL + 'get_consultant_schedules',
type: 'POST',
dataType: 'json',
data: {
consultantId: consId,
startDateStr: '@' + moment().unix(),
// endDateStr: $('#preferredScheduleDate').val() + ' 23:59:59 ' + moment().format("ZZ"),
endDateStr: '',
durationMin: durValue,
// durationMin: sessionDurationSelector.getValue() != '' ? perSessionMinute * sessionDurationSelector.getValue() : 90,
options: options,
returnJson: 1
},
error: function () {
// callback();
},
success: function (res) {
;
// $('#').val(res.);
$('#selectPurchaseModal .view_if_has_schedules').hide();
if (res.success == true) {
//// for (var l = 0; l < res.sessionsArray.length; l++) {
//// $('#rescheduledSemesterSelector').append($("<option></option>").attr("value", res.sessionsArray[l].id).text(res.sessionsArray[l].name));
//// }
for (var jj = 0; jj < res.data.scheduleList.length; jj++) {
var sch_dt = res.data.scheduleList[jj];
var ggStr = ' <div class="box-selector sch_selector_time ' +
'sch_mon_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM') + ' ' +
'sch_day_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM_DD') + ' ' +
'sch_' + sch_dt['timeUnix'] + ' ' +
'sch_' + sch_dt['timeUnix'] + ' col-md-3 col-sm-6"' +
' data-id="' + sch_dt['timeUnix'] + '" ' +
' data-gen-class="sch_selector_time" ' +
'>' +
'<div class="inside">' +
{# ' <div class="img" style="' + #}
{# "background:url(' {{ absolute_url(path('dashboard')) }}"+dt['image']+"');"+ #}
{# ' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' + #}
'<h6 class="title" style="">' + (moment.unix(sch_dt['timeUnix']).format('HH:mm')) + '</h6> ' +
// '<p class="sub-title">'+dt['topic_summary']+'</p>' +
'</div></div>';
var ggStrday = ' <div class="box-selector sch_selector_day ' +
'sch_mon_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM') + ' ' +
'sch_day_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM_DD') + ' col-md-3 col-sm-6"' +
' data-id="' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM_DD') + '" ' +
' data-gen-class="sch_selector_day" ' +
'>' +
'<div class="inside">' +
{# ' <div class="img" style="' + #}
{# "background:url(' {{ absolute_url(path('dashboard')) }}"+dt['image']+"');"+ #}
{# ' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' + #}
'<h6 class="title" style="">' + (moment.unix(sch_dt['timeUnix']).format('DD')) + '</h6> ' +
// '<p class="sub-title">'+dt['topic_summary']+'</p>' +
'</div></div>';
var ggStrmon = ' <div class="box-selector sch_selector_mon ' +
'sch_mon_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM') + ' ' +
// 'sch_day'+moment.unix(sch_dt['timeUnix']).format('YYYY_MM')+' ' +
' col-md-3 col-sm-6"' +
' data-id="' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM') + '" ' +
' data-gen-class="sch_selector_mon" ' +
'>' +
'<div class="inside">' +
{# ' <div class="img" style="' + #}
{# #}{# "background:url(' {{ absolute_url(path('dashboard')) }}"+dt['image']+"');"+ #}
{# ' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' + #}
'<h6 class="title" style="">' + (moment.unix(sch_dt['timeUnix']).format('MMM')) + '</h6> ' +
// '<p class="sub-title">'+dt['topic_summary']+'</p>' +
'</div></div>';
if (!$('.sch_selector_mon.sch_mon_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM')).length)
$('#selectPurchaseModal .sch_holder_month').append(ggStrmon);
if (!$('.sch_selector_day.sch_day_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM_DD')).length)
$('#selectPurchaseModal .sch_holder_day').append(ggStrday);
$('#selectPurchaseModal .sch_holder_time').append(ggStr);
}
if (res.data.scheduleList.length > 0) {
$('#selectPurchaseModal h5.view_if_has_schedules').css('display', 'block');
$('#selectPurchaseModal p.view_if_has_schedules').css('display', 'block');
$('#selectPurchaseModal div.row.view_if_has_schedules').css('display', 'flex');
}
$('.sch_' + res.data.closestDateTs).trigger('click');
// rescheduledconsultancyScheduleSelector.clear();
// rescheduledconsultancyScheduleSelector.disable();
// rescheduledconsultancyScheduleSelector.clearOptions();
// rescheduledconsultancyScheduleSelector.load(function (callback) {
//
// rescheduledconsultancyScheduleSelector.enable();
// var modifiedList = [];
// for (var l = 0; l < res.data.scheduleList.length; l++) {
// var sch_dt = res.data.scheduleList[l];
// sch_dt['time_user_zone'] = moment.unix(sch_dt['timeUnix']).format('MMM DD, YYYY HH:mm');
// // sch_dt['time_user_zone']=sch_dt['time'];
// modifiedList.push(sch_dt);
// }
//
//
// callback(modifiedList);
//
//
// });
// rescheduledconsultancyScheduleSelector.setValue(res.data.closestDateTs)
} else {
}
}
});
}
function refreshRoutinePackageListOnPurchaseModal(t_id) {
var dt = [];
$('#selectPurchaseModal .routineTable tbody').empty();
var topicIdForRoutine = t_id;
// var sessionDurationSelectorValue=sessionDurationSelector.getValue();
var sessionDurationSelectorValue = 100;
// var scheduledTimeTsValue=consultancyScheduleSeletor.getValue();
var scheduledTimeTsValue = moment().unix();
if (typeof topic_data_by_id[topicIdForRoutine] !== 'undefined') {
if (topic_data_by_id[topicIdForRoutine]['routine_data'].length) {
dt = topic_data_by_id[topicIdForRoutine]['routine_data'];
} else {
dt = [
{
sequence: 1,
topicId: topicIdForRoutine,
topicName: topic_data_by_id[topicIdForRoutine]['topic_name'],
meetingType: topic_data_by_id[topicIdForRoutine]['meeting_type'],
duration: sessionDurationSelectorValue != '' ? (perSessionMinute * sessionDurationSelectorValue) / (COIN_GENERAL_MULT * 1) : 0,
offset: 0,
coins: sessionDurationSelectorValue != '' ? (1 * sessionDurationSelectorValue) : 0,
scheduledTimeTs: scheduledTimeTsValue != '' ? (1 * scheduledTimeTsValue) : 0,
nextSequenceStart: 0,
modifiable: 0,
}
];
}
}
for (var poi = 0; poi < dt.length; poi++) {
var cc_pika = dt[poi];
if (cc_pika['meetingType'] == 2) //offline
{
$('#selectPurchaseModal .routineTable tbody').append(
'<tr>' +
'<td>' + cc_pika.topicName + '</td>' +
'<td style="text-align: left;"><b>Deliverable</b><br>' +
'Bee Coins: ' + cc_pika.coins + '<br>' +
(typeof cc_pika.scheduledDateTs !== 'undefined' ?
('Lead Dt.<br>' + (cc_pika.scheduledTimeTs == 0 ? '' : moment.unix(cc_pika.scheduledDateTs).format('MMMM DD, YYYY HH:mm ZZ'))) :
('')
) +
'</td>' +
'<td>' +
'<input class="routineCoinNeeded" name="routine_coins[]" type="hidden" value="' + cc_pika.coins + '">' +
'<input class="routineTopicId" name="routine_topic_id[]" type="hidden" value="' + cc_pika.topicId + '">' +
(typeof cc_pika.modifiable == 1 ? '<a class="icon-check isChecked modifiable" href="javascript:void(0);"><i class="fa fa-check"></i></a>' : '<a class="icon-check isChecked modifiable" href="javascript:void(0);"><i class="fa fa-check"></i></a>') +
// '<a class="icon-delete" href="javascript:void(0);"><i class="fa fa-times"></i></a>' +
'</td>' +
'</tr>'
)
} else {
{
$('#selectPurchaseModal .routineTable tbody').append(
'<tr>' +
'<td>' + cc_pika.topicName + '</td>' +
'<td style="text-align: left;"><b>Online</b><br>' +
'Bee Coins: ' + cc_pika.coins + '<br>' +
'Duration: ' + cc_pika.duration + '<br>' +
(typeof cc_pika.scheduledTimeTs !== 'undefined' ?
('Scheduled Time: <br>' + (cc_pika.scheduledTimeTs == 0 ? '' : moment.unix(cc_pika.scheduledTimeTs).format('MMMM DD, YYYY HH:mm ZZ'))) :
('')
) +
'</td>' +
'<td>' +
'<input class="routineCoinNeeded" name="routine_coins[]" type="hidden" value="' + cc_pika.coins + '">' +
'<input class="routineTopicId" name="routine_topic_id[]" type="hidden" value="' + cc_pika.topicId + '">' +
(typeof cc_pika.modifiable == 1 ? '<a class="icon-check isChecked modifiable" href="javascript:void(0);"><i class="fa fa-check"></i></a>' :
'<a class="icon-check isChecked " href="javascript:void(0);"><i class="fa fa-check"></i></a>') +
// '<a class="icon-delete" href="javascript:void(0);"><i class="fa fa-check"></i></a>' +
// '<a class="icon-delete" href="javascript:void(0);"><i class="fa fa-times"></i></a>' +
'</td>' +
'</tr>'
)
}
}
}
recalculateRoutinePackageOnPurchaseModal();
}
function recalculateRoutinePackageOnPurchaseModal() {
var tot_coin = 0;
$('#selectPurchaseModal .routineTable .icon-check').each(function (indy, elem) {
if ($(elem).hasClass('isChecked'))
tot_coin += (1 * $('#selectPurchaseModal .routineTable .routineCoinNeeded').eq(indy).val())
})
$('#selectPurchaseModal .routineCoinNeededTotalInput').val(tot_coin)
$('#selectPurchaseModal .routineCoinNeededTotalSpan').text(tot_coin)
}
function initiate_prompt_info_modal() {
if ($('#promptForInfoModal #currentCountryIdPromptForInfo').length)
$('#promptForInfoModal #currentCountryIdPromptForInfo').selectize({
placeholder: 'Select Your Current Country',
// options: APTL.productListArray,
options: [],
valueField: 'value',
labelField: 'text',
preload: 'focus',
searchField: ['text', 'value'],
// render: {
// option: function (item, escape) {
// return '<div class="p-l-10 p-r-10">'
// + '<h6>' + escape(item[label_for_product]) + '</h6> '
// + '<span>Code:' + escape(item.productCode) + '</span> '
// //+ '<span>Name:'+item.name+'</span> '
// //+ '<span>DEBUG:'+item.score+'</span>'
// + '</div>';
// }
// },
onChange: function (value) {
if (!value) return;
// productId = preliminary_reg_data_by_id[value]['product_id']
// getbomData();
//
},
load: function (query, callback) {
// if (!query.length) return // callback();
if (!query.length) query = '_EMPTY_';
var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
$.ajax({
url: BaseURL + "select_data_ajax",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1,
//sessionData: sessionData
query: query,
tableName: "entity_countries",
valueField: "country_id",
textField: "name_en",
entity_group: 1,
selectorId: $($(this)[0].$input["0"]).attr('id'),
isMultiple: 0,
dataId: pika_ind_id,
// isMultiple: 0,
//textField: "rendered_text",
//
//renderTextFormat: "#__id__ __name__",
andConditions: [
{type: "like", field: "name_en", value: query}
],
mustConditions: [
// {type: "=", field: "approved", value: 1}
],
convertToObject: [
// 'accessories', 'issues'
],
skipDefaultCompanyId: 1
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
// preliminary_reg_data_by_id = res.dataById
callback(res.data);
if (res.setValueArray.length != 0 && res.selectorId != '') {
if (res.isMultiple == 1)
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
else
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
}
// alert('pika master')
}
});
},
onLoad: function (data) {
// // console.log(data)
// alert('here')
if (!data.length) return;
// pbcs.open()
if (data.length == 1) {
// alert('hi')
// productionScheduleSelector.setValue(data[0].value)
}
}
});
if ($('#promptForInfoModal #preferredConsultancyTopicCountryIdsPromptForInfo').length)
$('#promptForInfoModal #preferredConsultancyTopicCountryIdsPromptForInfo').selectize({
placeholder: 'Select Your Preferred Country',
// options: APTL.productListArray,
options: [],
valueField: 'value',
labelField: 'text',
preload: 'focus',
searchField: ['text', 'value'],
// render: {
// option: function (item, escape) {
// return '<div class="p-l-10 p-r-10">'
// + '<h6>' + escape(item[label_for_product]) + '</h6> '
// + '<span>Code:' + escape(item.productCode) + '</span> '
// //+ '<span>Name:'+item.name+'</span> '
// //+ '<span>DEBUG:'+item.score+'</span>'
// + '</div>';
// }
// },
onChange: function (value) {
if (!value) return;
// productId = preliminary_reg_data_by_id[value]['product_id']
// getbomData();
//
},
load: function (query, callback) {
// if (!query.length) return // callback();
if (!query.length) query = '_EMPTY_';
var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
$.ajax({
url: BaseURL + "select_data_ajax",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1,
//sessionData: sessionData
query: query,
tableName: "entity_countries",
valueField: "country_id",
textField: "name_en",
entity_group: 1,
selectorId: $($(this)[0].$input["0"]).attr('id'),
isMultiple: 1,
dataId: pika_ind_id,
// isMultiple: 0,
//textField: "rendered_text",
//
//renderTextFormat: "#__id__ __name__",
andConditions: [
{type: "like", field: "name_en", value: query}
],
mustConditions: [
// {type: "=", field: "approved", value: 1}
],
convertToObject: [
// 'accessories', 'issues'
],
skipDefaultCompanyId: 1
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
// preliminary_reg_data_by_id = res.dataById
callback(res.data);
if (res.setValueArray.length != 0 && res.selectorId != '') {
if (res.isMultiple == 1)
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
else
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
}
// alert('pika master')
}
});
},
onLoad: function (data) {
// // console.log(data)
// alert('here')
if (!data.length) return;
// pbcs.open()
if (data.length == 1) {
// alert('hi')
// productionScheduleSelector.setValue(data[0].value)
}
}
});
if ($('#promptForInfoModal #preferredTopicIdsAsStudentPromptForInfo').length)
$('#promptForInfoModal #preferredTopicIdsAsStudentPromptForInfo').selectize({
placeholder: 'Preferred Topic Ids as Student',
multiple: true,
// options: APTL.productListArray,
options: [],
valueField: 'value',
labelField: 'text',
preload: 'focus',
searchField: ['text', 'value'],
// render: {
// option: function (item, escape) {
// return '<div class="p-l-10 p-r-10">'
// + '<h6>' + escape(item[label_for_product]) + '</h6> '
// + '<span>Code:' + escape(item.productCode) + '</span> '
// //+ '<span>Name:'+item.name+'</span> '
// //+ '<span>DEBUG:'+item.score+'</span>'
// + '</div>';
// }
// },
onChange: function (value) {
if (!value) return;
// productId = preliminary_reg_data_by_id[value]['product_id']
// getbomData();
//
},
load: function (query, callback) {
// if (!query.length) return // callback();
if (!query.length) query = '_EMPTY_';
var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
$.ajax({
url: BaseURL + "select_data_ajax",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1,
//sessionData: sessionData
query: query,
tableName: "entity_create_topic",
valueField: "id",
textField: "topic_name",
entity_group: 1,
selectorId: $($(this)[0].$input["0"]).attr('id'),
isMultiple: 1,
dataId: pika_ind_id,
// isMultiple: 0,
//textField: "rendered_text",
//
//renderTextFormat: "#__id__ __name__",
andConditions: [
{type: "like", field: "topic_name", value: query}
],
mustConditions: [
{type: "=", field: "consultancy_enabled", value: 1}
],
convertToObject: [
// 'accessories', 'issues'
],
skipDefaultCompanyId: 1
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
// preliminary_reg_data_by_id = res.dataById
callback(res.data);
if (res.setValueArray.length != 0 && res.selectorId != '') {
if (res.isMultiple == 1)
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
else
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
}
// alert('pika master')
}
});
},
onLoad: function (data) {
// console.log(data)
// alert('here')
if (!data.length) return;
// pbcs.open()
if (data.length == 1) {
// alert('hi')
// productionScheduleSelector.setValue(data[0].value)
}
}
});
if ($('#promptForInfoModal #preferredTopicIdsAsConsultantPromptForInfo').length)
$('#promptForInfoModal #preferredTopicIdsAsConsultantPromptForInfo').selectize({
placeholder: 'Preferred Topic Ids as Consultant',
multiple: true,
// options: APTL.productListArray,
options: [],
valueField: 'value',
labelField: 'text',
preload: 'focus',
searchField: ['text', 'value'],
// render: {
// option: function (item, escape) {
// return '<div class="p-l-10 p-r-10">'
// + '<h6>' + escape(item[label_for_product]) + '</h6> '
// + '<span>Code:' + escape(item.productCode) + '</span> '
// //+ '<span>Name:'+item.name+'</span> '
// //+ '<span>DEBUG:'+item.score+'</span>'
// + '</div>';
// }
// },
onChange: function (value) {
if (!value) return;
// productId = preliminary_reg_data_by_id[value]['product_id']
// getbomData();
//
},
load: function (query, callback) {
// if (!query.length) return // callback();
if (!query.length) query = '_EMPTY_';
var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
$.ajax({
url: BaseURL + "select_data_ajax",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1,
//sessionData: sessionData
query: query,
tableName: "entity_create_topic",
valueField: "id",
textField: "topic_name",
entity_group: 1,
selectorId: $($(this)[0].$input["0"]).attr('id'),
isMultiple: 1,
dataId: pika_ind_id,
// isMultiple: 0,
//textField: "rendered_text",
//
//renderTextFormat: "#__id__ __name__",
andConditions: [
{type: "like", field: "topic_name", value: query}
],
mustConditions: [
{type: "=", field: "consultancy_enabled", value: 1}
],
convertToObject: [
// 'accessories', 'issues'
],
skipDefaultCompanyId: 1
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
// preliminary_reg_data_by_id = res.dataById
callback(res.data);
if (res.setValueArray.length != 0 && res.selectorId != '') {
if (res.isMultiple == 1)
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
else
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
}
// alert('pika master')
}
});
},
onLoad: function (data) {
// console.log(data)
// alert('here')
if (!data.length) return;
// pbcs.open()
if (data.length == 1) {
// alert('hi')
// productionScheduleSelector.setValue(data[0].value)
}
}
});
$('.promptForInfoAutoUpdateData').not('.selectize-control').change(function () {
// // console.log('* The text was changed');
$.post('{{ url('update_inline_value') }}', {
// returnJson: 1,
// sessionData: sessionData
entityName: typeof $(this).data('entityName') !== 'undefined' ? $(this).data('entityName') : 'EntityApplicantDetails',
entityBundle: typeof $(this).data('entityBundle') !== 'undefined' ? $(this).data('entityBundle') : 'CompanyGroup',
setValue: $(this).val(),
relevantRequiredPromptField: $(this).data('relevantPromptField'),
clearRequiredPromptFlag: 1,
setMethod: $(this).data('setMethod'),
findField: typeof $(this).data('findField') !== 'undefined' ? $(this).data('findField') : 'applicantId',
findValue: typeof $(this).data('findValue') !== 'undefined' ? $(this).data('findValue') : '{{ session[UserConstants.USER_ID] is defined? session[UserConstants.USER_ID]:0 }}',
fieldType: typeof $(this).data('fieldType') !== 'undefined' ? $(this).data('fieldType') : '_TEXT_',
modifyTransDateFlag: typeof $(this).data('modifyTransDate') !== 'undefined' ? $(this).data('modifyTransDate') : 0,
{# findValue: {{ consultantDetails.applicantId }}, #}
})
.done(function (data) {
// console.log(data);
// if (data.success == true) {
// swal({
// title: "Sweet!",
// text: "Updated",
// imageUrl: BaseURL + "images/thumbs-up.png"
// });
//// alertify.success("Order Confirmation Done");
//
//
// } else {
// swal({
// title: "Sorry!",
// text: "Your Action failed !",
// imageUrl: BaseURL + "images/Bee_Sad_Emote.png"
// });
//// alertify.success("Order Confirmation Failed");
//
//// $('#barcode_selector_cont').waitMe('hide');
//
// }
})
.fail(function () {
});
});
document.getElementById('promptForInfoModal').addEventListener('hidden.bs.modal', function (event) {
$('.promptForInfoAutoUpdateData').not('.selectize-control').trigger('change');
})
promptForInfoModal.show();
promptInfo_showTab(currentTab); // Display the current tab
}
function promptInfo_showTab(n) {
// This function will display the specified tab of the form...
// stepShowTab(n,'#promptForInfoModal')
// retrunb false;
$('#promptForInfoModal .step').eq(n).show();
//... and fix the Previous/Next buttons:
if (n == 0) {
document.getElementById("promptForInfo_prevBtn").style.display = "none";
} else {
document.getElementById("promptForInfo_prevBtn").style.display = "inline";
}
if (n == ($('#promptForInfoModal .step').length - 1)) {
document.getElementById("promptForInfo_nextBtn").innerHTML = "Finish";
} else {
document.getElementById("promptForInfo_nextBtn").innerHTML = "Next";
}
//... and run a function that will display the correct step indicator:
$('#promptForInfoModal .stepIndicator').removeClass('active')
for (var gg = 0; gg <= n; gg++)
$('#promptForInfoModal .stepIndicator').eq(gg).addClass('active')
}
function promptInfo_nextPrev(n) {
// Exit the function if any field in the current tab is invalid:
if (n == 1 && !promptInfo_validateForm()) return false;
$('#promptForInfoModal .step').eq(currentTab).hide();
// Increase or decrease the current tab by 1:
currentTab = currentTab + n;
// if you have reached the end of the form...
if (currentTab >= $('#promptForInfoModal .step').length) {
// ... the form gets submitted:
// // console.log($('#selectPurchaseModal .step'))
// alert($('#selectPurchaseModal .step').length)
// document.getElementById("signUpForm").submit();
promptForInfoModal.hide();
return false;
}
// Otherwise, display the correct tab:
promptInfo_showTab(currentTab);
}
function promptInfo_validateForm() {
// This function deals with validation of the form fields
var x, y, i, valid = true;
// x = document.getElementsByClassName("step");
// y = x[currentTab].getElementsByTagName("input");
//
//
//
//
// // A loop that checks every input field in the current tab:
// for (i = 0; i < y.length; i++) {
// // If a field is empty...
// if (y[i].value == "") {
// // add an "invalid" class to the field:
// y[i].className += " invalid";
// // and set the current valid status to false
// valid = false;
// }
// }
// // If the valid status is true, mark the step as finished and valid:
// if (valid) {
// document.getElementsByClassName("stepIndicator")[currentTab].className += " finish";
// }
$('#promptForInfoModal .step input').each(function (indumia, elemele) {
if ($(elemele).hasClass('required') && $(elemele).val() == '') {
$(elemele).addClass('invalid')
valid = false;
} else {
}
})
if (valid) {
$('#promptForInfoModal .stepIndicator').eq(currentTab).addClass('finish')
// document.getElementsByClassName("stepIndicator")[currentTab].className += " finish";
}
return valid; // return the valid status
}
function promptInfo_fixStepIndicator(n) {
// This function removes the "active" class of all steps...
var i, x = document.getElementsByClassName("stepIndicator");
for (i = 0; i < x.length; i++) {
x[i].className = x[i].className.replace(" active", "");
}
//... and adds the "active" class on the current step:
x[n].className += " active";
}
function addScript(src) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
document.getElementsByTagName('head')[0].appendChild(s);
return s; // to remove it later
}
function checkAndRedirectToMeeting(force) {
var curr_ts_now = moment().unix();
// if(CURRENT_ROUTE=='consultancy_session' && force==0)
// {
// if(typeof currentMeetingSessionId !== 'undefined')
// {
// if(upcomingNextMeetingIdForRedirect==currentMeetingSessionId)
// {
// return;
// }
//
// }
//
// }
if (upcomingNextMeetingTsForRedirect != 0) {
if (curr_ts_now >= (upcomingNextMeetingTsForRedirect - 120)) //redirect before 2 min
{
window.localStorage.setItem('UNMId', 0);
window.localStorage.setItem('UNMTs', 0);
window.location.href = "{{ url('consultancy_session') }}/" + upcomingNextMeetingIdForRedirect;
}
}
}
function refreshUpcomingMeetingList() {
// // console.log('_______________________TRIGGERED_______________________')
if (current_user_user_id != 0) {
$.ajax({
url: BaseURL + "select_data_ajax_public",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1,
//sessionData: sessionData
query: '',
tableName: "entity_meeting_session",
valueField: "session_id",
// textField: "topic_name",
entity_group: 1,
selectorId: '_NO_NEED_',
isMultiple: 0,
dataId: 0,
// isMultiple: 0,
textField: "session_id",
//
andOrConditions: [
{type: "=", field: "consultant_id", value: current_user_user_id},
{type: "=", field: "student_id", value: current_user_user_id}
],
mustConditions: [
// {type: "=", field: "is_paid_full", value: 1},
{type: ">=", field: "scheduled_time_ts", value: moment().unix()},
{# {% if not curr_data is empty %} #}
// {type: "!=", field: "applicant_id", value: $('#rescheduledStudentId').val()}
{# {% endif %} #}
],
orderByConditions: [
{
field: 'scheduled_time_ts',
sortType: 'ASC'
}
{# {% if not curr_data is empty %} #}
// {type: "!=", field: "applicant_id", value: $('#rescheduledStudentId').val()}
{# {% endif %} #}
],
convertToObject: [
// 'accessories', 'issues'
],
skipDefaultCompanyId: 1
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
// preliminary_reg_data_by_id = res.dataById
upcomingNextMeetingIdForRedirect = 0;
upcomingNextMeetingTsForRedirect = 0;
upcomingMeetingDataForRedirect = [];
for (var bogu = 0; bogu < res.data.length; bogu++) {
if (res.data[bogu].is_paid_full == 1) {
upcomingMeetingDataForRedirect.push({
id: res.data[bogu].session_id,
ts: res.data[bogu].scheduled_time_ts,
})
}
}
if (upcomingMeetingDataForRedirect.length != 0) {
upcomingNextMeetingIdForRedirect = upcomingMeetingDataForRedirect[0]['id'];
upcomingNextMeetingTsForRedirect = upcomingMeetingDataForRedirect[0]['ts'];
}
if (typeof refresh_upcoming_meeting_on_dashboard !== 'undefined')
refresh_upcoming_meeting_on_dashboard(res.data);
// if(CURRENT_ROUTE=='consultancy_session')
// {
// if(typeof currentMeetingSessionId !== 'undefined')
// {
// if(upcomingNextMeetingIdForRedirect==currentMeetingSessionId)
// {
// clearInterval(triggerRefreshUpcomingSession);
// }
// else
// checkAndRedirectToMeeting(0);
//
// }
// else
// checkAndRedirectToMeeting(0);
//
//// clearInterval(triggerRefreshUpcomingSession);
//
// }
// else
checkAndRedirectToMeeting(0);
}
});
}
}
function triggerRefreshUpcomingMeetingList(intervalHere) {
if (current_user_user_id != 0) {
triggerRefreshUpcomingSession = setInterval(function () {
refreshUpcomingMeetingList();
//seconds
}, intervalHere)
}
}
</script>
{% if constant('ApplicationBundle\\Constants\\GeneralConstant::BUDDYBEE_SOCKET_ENABLED')==1 %}
{# now check softone #}
{# {% if notification_enabled==1 %} #}
{% if session[UserConstants.USER_ID] is defined %}
{% set buddybee_socket_server=constant('ApplicationBundle\\Constants\\GeneralConstant::BUDDYBEE_SOCKET_SERVER') %}
{% set buddybee_socket_server_full = 'https://'~buddybee_socket_server %}
{% if 'localhost:' in buddybee_socket_server %}
{% set buddybee_socket_server_full = url_wo_port ~':'~ buddybee_socket_server|split('localhost:')[1] %}
{% else %}
{% set buddybee_socket_server_full = 'https://'~buddybee_socket_server %}
{% endif %}
{# <script type="text/javascript" src="{{ constant('ApplicationBundle\\Constants\\GeneralConstant::NOTIFICATION_SERVER')=='localhost:5000'?url_wo_port~':5000':constant('ApplicationBundle\\Constants\\GeneralConstant::NOTIFICATION_SERVER') }}/socket.io/socket.io.js"></script> #}
{# <script type="text/javascript" src="{{ buddybee_socket_server_full }}/socket.io/socket.io.js"></script> #}
<script type="text/javascript">
var buddybeeKeepAliveCall = {};
var lastActivityTs = 0;
function refreshKeepAliveCall() {
buddybeeKeepAliveCall = setInterval(function () {
var nowTs = moment().unix(),
differenceFromStartTime = meetingStartTime.diff(now), // 86400000;
differenceFromEndTime = meetingEndTime.diff(now); // 86400000;
if (nowTs - lastActivityTs > 60) {
clearInterval(buddybeeKeepAliveCall);
} else {
buddybee_socket.emit('update_my_socket', {
userId: buddybee_socket_user_id,
token: buddybee_socket_user_session_token,
});
}
//seconds
}, 30000)
}
// // console.log(io)
function initiateBuddybeeSocket() {
lastActivityTs = moment().unix();
$.getScript('{{ buddybee_socket_server_full }}/socket.io/socket.io.js', function () {
{# $.getScript('{{ absolute_url(path('dashboard')) }}buddybee_assets/js/socket-io.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}', function () { #}
if (io) {
{# socket=io.connect( '{{ constant('ApplicationBundle\\Constants\\GeneralConstant::NOTIFICATION_SERVER') }}' ); #}
buddybee_socket = io.connect('{{ buddybee_socket_server_full }}');
buddybee_socket.emit('update_my_socket', {
userId: buddybee_socket_user_id,
token: buddybee_socket_user_session_token,
user_status: '_ON_',
force_broadcast: 1,
});
// buddybee_socket.on('_SEND_TEXT_TO_MOBILE_', function (dataObj) {
// // console.log('_SEND_TEXT_TO_MOBILE__SEND_TEXT_TO_MOBILE__SEND_TEXT_TO_MOBILE__SEND_TEXT_TO_MOBILE__SEND_TEXT_TO_MOBILE__SEND_TEXT_TO_MOBILE__SEND_TEXT_TO_MOBILE__SEND_TEXT_TO_MOBILE_')
// // console.log(dataObj)
//
//
// });
addScript("{{ absolute_url(path('dashboard')) }}buddybee_assets/js/generic_buddybee_sockets.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}")
{% if curr_route =='consultancy_session' or curr_route =='_nothing_new_' %}
{% else %}
ifvisible.setIdleDuration(120);
ifvisible.onEvery(30, function () {
// // console.log('not idle')
buddybee_socket.emit('update_my_socket', {
userId: buddybee_socket_user_id,
token: buddybee_socket_user_session_token,
});
});
// ifvisible.onEvery(300, function () {
//// // console.log('not idle')
// buddybee_socket.emit('update_my_socket', {
// userId: buddybee_socket_user_id,
// token: buddybee_socket_user_session_token,
// });
// });
ifvisible.idle(function () {
document.body.style.opacity = 0.5;
buddybee_socket.emit('update_my_socket', {
userId: buddybee_socket_user_id,
token: buddybee_socket_user_session_token,
user_status: '_AWAY_',
force_broadcast: 1,
});
});
ifvisible.wakeup(function () {
document.body.style.opacity = 1;
buddybee_socket.emit('update_my_socket', {
userId: buddybee_socket_user_id,
token: buddybee_socket_user_session_token,
user_status: '_ON_',
force_broadcast: 1,
});
});
{% endif %}
// buddybee_socket.emit('update_my_socket', {
// userId: buddybee_socket_user_id,
// token: buddybee_socket_user_session_token,
// });
if (typeof pageSocketInit !== 'undefined')
pageSocketInit();
buddybee_socket.on('user_status_update', function (dataObj) {
// console.log(dataObj)
});
buddybee_socket.on('_SOCKET_NOTIFICATION_HERE_', function (dataObj) {
if (typeof dataObj.targetRoute !== 'undefined') {
if (dataObj.targetRoute == 'consultancy_session')
refreshUpcomingMeetingList();
}
// console.log(dataObj)
});
buddybee_socket.on('refresh_upcoming_meeting_list', function (dataObj) {
refreshUpcomingMeetingList();
// console.log(dataObj)
});
// console.log(buddybee_socket);
}
});
}
</script>
{# <script src="{{ absolute_url(path('dashboard')) }}js/inno_notify.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script> #}
{% endif %}
{# {% endif %} #}
{% endif %}
<script>
var honeybeeLocale = 'en';
jQuery.browser = {
msie: false,
// version: 0
};
function check_filters_default() {
// alert("here")
$('.filter_this').hide()
$('.filter_with_this').each(function () {
// alert($(this).attr('id'))
// alert($(this).val())
if ($(this).attr('type') == 'checkbox' && $(this).prop('checked') == false)
return;
if ($(this).attr('type') == 'radio' && $(this).is(':checked') == false)
return;
var selector_name = '.filter_' + ($(this).attr('id')) + '_' + $(this).val();
// alert(selector_name)
$(selector_name).show()
})
}
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
$(document).ready(function () {
{% if session['triggerPromptInfoModalFlag'] is defined %}
{% if session['triggerPromptInfoModalFlag'] == 1 %}
initiate_prompt_info_modal();
{% endif %}
{% endif %}
{% if app.session.get('devAdminMode') ==1 %}
{% endif %}
$('.book_now_cta').click(function (ev) {
ev.preventDefault();
selectPurchaseModal.show();
})
stepShowTab(currentTabSelectPurchaseModal, '#selectPurchaseModal')
$(document).on('click', '#selectPurchaseModal .routineTable tbody .icon-check.modifiable', function () {
if ($(this).hasClass('isChecked'))
$(this).removeClass('isChecked');
else
$(this).addClass('isChecked')
recalculateRoutinePackageOnPurchaseModal();
})
$(document).on('click', '.offCanvasCalendarTrigger', function () {
refreshOffCanvasCalendar()
})
$(document).on('click', '.box-selector', function () {
$('.' + $(this).data('genClass')).removeClass('active')
$(this).addClass('active')
})
$(document).on('click', '#selectPurchaseModal .prevBtn', function () {
//validate action here
// if (!validateForm()) return false;
stepShowTab('-1', '#selectPurchaseModal')
})
$(document).on('click', '#selectPurchaseModal .stepIndicator', function () {
//validate action here
// if (!validateForm()) return false;
stepShowTab($(this).data('seqId'), '#selectPurchaseModal')
})
$(document).on('click', '#selectPurchaseModal .nextBtn', function () {
//validate action here
// if (!validateForm()) return false;
stepShowTab('+1', '#selectPurchaseModal')
})
$(document).on('click', '#selectPurchaseModal .cn_selector', function () {
populateTopicListOnPurchaseModal($(this).data('id'));
stepShowTab('+1', '#selectPurchaseModal')
if ($('.box-selector.cn_selector.active').length)
$('.cntry_p span').text($('.box-selector.cn_selector.active .title').text())
})
$(document).on('click', '#selectPurchaseModal .tp_selector', function () {
refreshRoutinePackageListOnPurchaseModal($(this).data('id'));
populateConsultantListOnPurchaseModal($(this).data('id'));
stepShowTab('+1', '#selectPurchaseModal');
if ($('.box-selector.tp_selector.active').length)
$('.topic_p span').text($('.box-selector.tp_selector.active .title').text() + ' ( ' + $('.box-selector.tp_selector.active .sub-title').text() + ' )')
})
$(document).on('click', '#selectPurchaseModal .cons_selector', function () {
populateScheduleListOnPurchaseModal($(this).data('id'));
stepShowTab('+1', '#selectPurchaseModal')
if ($('.box-selector.cons_selector.active').length)
$('.cons_p span').text($('.box-selector.cons_selector.active .title').text())
})
$(document).on('click', '#selectPurchaseModal .sch_selector_mon', function () {
$('#selectPurchaseModal .sch_selector_day').hide();
// alert($(this).data('id'))
$('#selectPurchaseModal .sch_selector_day.sch_mon_' + $(this).data('id')).show();
// populateScheduleListOnPurchaseModal($(this).data('id'));
// stepShowTab('+1','#selectPurchaseModal')
})
$(document).on('click', '#selectPurchaseModal .sch_selector_day', function () {
$('#selectPurchaseModal .sch_selector_time').hide();
$('#selectPurchaseModal .sch_selector_time.sch_day_' + $(this).data('id')).show();
// populateScheduleListOnPurchaseModal($(this).data('id'));
// stepShowTab('+1','#selectPurchaseModal')
})
$(document).on('click', '#selectPurchaseModal .sch_selector_time', function () {
// alert('here')
$('#selectPurchaseModal .sch_selector_mon.sch_mon_' + moment.unix($(this).data('id')).format('YYYY_MM')).trigger('click');
$('#selectPurchaseModal .sch_selector_day.sch_day_' + moment.unix($(this).data('id')).format('YYYY_MM_DD')).trigger('click');
})
if (CURRENT_ROUTE == 'consultancy_session') {
// if (typeof currentMeetingSessionId !== 'undefined') {
// if (upcomingNextMeetingIdForRedirect == currentMeetingSessionId) {
// clearInterval(triggerRefreshUpcomingSession);
// }
// else
// checkAndRedirectToMeeting(0);
//
// }
// else
// checkAndRedirectToMeeting(0);
// clearInterval(triggerRefreshUpcomingSession);
} else
setTimeout(function () {
refreshUpcomingMeetingList();
triggerRefreshUpcomingMeetingList(60000);
}, 20000);
// Windows Phone must come first because its UA also contains "Android"
// alert(userAgent);
if ((currTsForDlM - deepLinkModalLastShown) > (3600 * 24)) {
// alert('in DLM');
if (/windows phone/i.test(userAgent)) {
// alert("Android");
$('.deep_link_choice').hide();
$('.deep_link_choice._AND_').show();
// $('.deep_link_choice._IPHONE_').show();
$('.deep_link_choice._BROWSER_').show();
deepLinkModal.show()
}
if (/Android/i.test(userAgent)) {
// alert("Android");
$('.deep_link_choice').hide();
$('.deep_link_choice._AND_').show();
// $('.deep_link_choice._IPHONE_').show();
$('.deep_link_choice._BROWSER_').show();
deepLinkModal.show()
}
// iOS detection from: http://stackoverflow.com/a/9039885/177710
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
// alert("iOS");
$('.deep_link_choice').hide();
// $('.deep_link_choice._AND_').show();
$('.deep_link_choice._IPHONE_').show();
$('.deep_link_choice._BROWSER_').show();
deepLinkModal.show()
}
window.localStorage.setItem('deepLinkModalLastShown', currTsForDlM)
}
// deepLinkModal.show()
$('#buddybee_preloader').fadeOut('slow', function () {
$(this).remove();
});
if (typeof initiateOtpModal !== 'undefined') {
// initiateOtpModal()
}
$(document).on('click', 'a', function (e) {
if ($(this).attr('href') == '{{ url('under_construction') }}') {
e.preventDefault();
swal({
title: "Oh Snap!",
type: 'warning',
text: "This page is Under Construction.",
timer: 3000,
showConfirmButton: false
});
}
if ($(this).attr('href') == '{{ url('user_logout') }}') {
// e.preventDefault();
if (buddybee_socket != '') {
buddybee_socket.emit('update_my_socket', {
userId: buddybee_socket_user_id,
user_status: '_OFF_',
force_broadcast: 1,
});
}
}
});
$(document).on('click', '.admin-menu-toggler', function (e) {
$('.buddybee_admin_sidebar').toggle()
})
$(document).on('click', 'a.book_now_cta', function (e) {
// e.preventDefault();
// bookNowModal.show()
})
$(document).on('change', '.filter_with_this', function () {
check_filters_default()
})
$(document).on('click', '.btn_deep_link_selector', function () {
if ($(this).attr('data-deeplink-choice') == '_AND_')
window.location.href = "https://play.google.com/store/apps/details?id=eu.buddybee.consultancy";
// deepLinkModal.hide()
})
check_filters_default();
$('#currentClientTime').val(moment().format('YYYY-MM-DD HH:mm:ss'))
{% if constant('ApplicationBundle\\Constants\\GeneralConstant::BUDDYBEE_SOCKET_ENABLED')==1 %}
{# now check softone #}
{# {% if notification_enabled==1 %} #}
{% if session[UserConstants.USER_ID] is defined %}
initiateBuddybeeSocket();
{% endif %}
{% endif %}
$('.schedule_date_picker').not('.datepicker').bootstrapMaterialDatePicker({
format: 'MMMM DD, YYYY',
clearButton: true,
weekStart: 6,
time: false,
switchOnClick: true,
monthPicker: true
// format: 'HH:mm',
// clearButton: true,
// date: false,
// switchOnClick:true
});
$('.schedule_date_time_picker').not('.datepicker').bootstrapMaterialDatePicker({
//format: 'dddd DD MMMM YYYY',
// format: ' HH:mm',
// clearButton: true,
// weekStart: 6,
// time: true,
// switchOnClick: true,
// monthPicker: false
format: 'HH:mm',
clearButton: true,
date: false,
switchOnClick: true
});
{# alert('{{ curr_route }}') #}
{% if curr_route=='applicant_dashboard' or curr_route=='dashboard' or curr_route=='consultant_dashboard' or curr_route=='buddybee_admin_dashboard' %}
{% if session[UserConstants.USER_ID] is defined %}
{% if session[UserConstants.USER_ID]!=0 %}
var globLsDataStr = window.localStorage.getItem('lsData');
var globLsData = {};
if (globLsDataStr != 'null' && globLsDataStr != null)
globLsData = JSON.parse(globLsDataStr);
// console.log(globLsData)
if (typeof globLsData['checkoutPending'] !== 'undefined') {
if (globLsData['checkoutPending'] == 1)
window.location.href = "{{ url('pricing_plan_page') }}?autoRedirected=1";
}
{% endif %}
{% endif %}
{% endif %}
// // console.log(globLsData)
$('#small_search_button').click(function () {
// $( '.small_search_content .selectize-control.searchbox.small_search' ).animate({
// opacity: 0.25,
// left: "+=50",
// width: "0"
// }, 5000, function() {
// // Animation complete.
// });
if ($('.small_search_content .selectize-control.searchbox.small_search').hasClass('search_shown')) {
// $('.small_search_content .selectize-control.searchbox.small_search').hide();
$('.small_search_content .selectize-control.searchbox.small_search').removeClass('search_shown');
// $('.searchbar-content.small_search_content').css('border','1px solid #1d5b9e33;');
$('.small_search_content .selectize-control.searchbox.small_search').animate({
// opacity: 0.25,
// left: "+=50",
width: "0"
}, 500, function () {
// Animation complete.
$('.small_search_content .selectize-control.searchbox.small_search').hide();
$('.small_search_content .selectize-control.searchbox.small_search').removeClass('search_shown');
$('.searchbar-content.small_search_content').removeClass('search_shown');
});
} else {
// $('.small_search_content .selectize-control.searchbox.small_search').show();
// $('.searchbar-content.small_search_content').css('border','1px solid #1d5b9e33;');
$('.small_search_content .selectize-control.searchbox.small_search').css('display', 'inline-flex')
$('.small_search_content .selectize-control.searchbox.small_search').addClass('search_shown');
$('.searchbar-content.small_search_content').addClass('search_shown');
$('.small_search_content .selectize-control.searchbox.small_search').animate({
// opacity: 0.25,
// left: "+=50",
width: "224"
}, 500, function () {
// Animation complete.
// $('.searchbar-content.small_search_content').css('border','1px solid #1d5b9e33;');
});
}
})
{# var small_search_box=$(".searchbox").selectize({ #}
{# valueField: "url", #}
{# labelField: "name", #}
{# searchField: "name", #}
{# create: false, #}
{# preload:true, #}
{# score: function (search) { #}
{# var score = this.getScoreFunction(search); #}
{# return function (item) { #}
{# return score(item) * (1 + Math.min(item.watchers / 100, 1)); #}
{# }; #}
{# }, #}
{# onChange: function (value) { #}
{# if (!value.length) return; #}
{# window.location.href=value; #}
{# //addProductToListById(value); #}
{# // alert(value) #}
{# // small_search_box.clear() #}
{# // small_search_box.focus() #}
{# }, #}
{# load: function (query, callback) { #}
{# if (!query.length) return callback(); #}
{# $.ajax({ #}
{# url: "{{ url('search_buddybee') }}/" + encodeURIComponent(query), #}
{# type: "GET", #}
{# error: function () { #}
{# callback(); #}
{# }, #}
{# success: function (res) { #}
{# // console.log(res.data) #}
{# callback(res.data.slice(0, 10)); #}
{# }, #}
{# }); #}
{# }, #}
{# })[0].selectize; #}
var small_search_box = $(".searchbox").selectize({
valueField: "url",
labelField: "name",
searchField: "name",
create: false,
maxItems: 1,
preload: 'focus',
render: {
option: function (item, escape) {
return (
'<div style="padding: 10px;">' +
'<span class="title">' +
'<span class="name" style="display:block;font-size: 18px;">' +
// '<i class="icon ' +
// (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
// '"></i>' +
// "<div class='form-control mainDiv'>" +
// '<span class="name">' +
escape(item.name) +
"</span>" +
'<span class="description" style="padding-top:2px; display: block">' +
escape(item.description) +
"</span>" +
// '<span class="description">' +
// escape(item.description) +
"</span>" +
"</div>"
);
// return (
// "<div>" +
// '<span class="title">' +
// '<span class="name"><i class="icon ' +
// (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
// '"></i>' +
// escape(item.name) +
// "</span>" +
//
// "</span>" +
// '<span class="description">' +
// escape(item.description) +
// "</span>" +
//
// "</div>"
// );
},
},
onChange: function (value) {
if (!value.length) return;
var sval = value
small_search_box.setValue([])
window.location.href = sval;
//addProductToListById(value);
// alert(value)
// small_search_box.clear()
// small_search_box.focus()
},
load: function (query, callback) {
// if (!query.length) return callback();
$.ajax({
url: "{{ url('search_buddybee') }}/" + encodeURIComponent(query),
type: "GET",
error: function () {
callback();
},
success: function (res) {
// console.log(res.data)
callback(res.data);
},
});
},
})[0].selectize;
$('.selectize-control.searchbox .selectize-input.items input').addClass('trn')
$('.selectize-control.searchbox .selectize-input.items input').attr('data-trn-key', '_SMALL_SEARCH_PH_');
_t = $('body').translate({
lang: "en",
t: lang_pack
});
if (typeof (window.localStorage) !== "undefined")
honeybeeLocale = window.localStorage.getItem('honeybeeLocale');
// alert(honeybeeLocale)
if (honeybeeLocale !== "undefined" && honeybeeLocale != 'null' && honeybeeLocale != null) {
_t.lang(honeybeeLocale);
} else {
honeybeeLocale = 'en'
}
$(".locale_changer").click(function (ev) {
var lang = $(this).attr("data-locale");
_t.lang(lang);
honeybeeLocale = lang;
$(".locale_changer").removeClass('activeLocale')
$(this).addClass('activeLocale');
$(".curr_locale_text").text($(this).text());
if (typeof (window.localStorage) !== "undefined")
honeybeeLocale = window.localStorage.setItem('honeybeeLocale', honeybeeLocale);
// // console.log(lang);
ev.preventDefault();
});
if ($('#viewAsId').length) {
$('#viewAsId').selectize({
placeholder: 'Choose User',
multiple: false,
// options: APTL.productListArray,
options: [],
valueField: 'value',
labelField: 'text',
searchField: ['text', 'value', 'phone', 'email', 'o_auth_email', 'firstname', 'lastname'],
preload: 'focus',
render: {
option: function (item, escape) {
return (
'<div style="padding: 2px; display:flex;">' +
'<span class="title" style=" min-width: 2rem;display: inline-block;">' +
((item.image != null && item.image != '') ? '<img style="border-radius: 50%;height: 2rem;width: 2rem;" src="' + item.image + '" alt="" class="img-fluid" >' :
'<img style="border-radius: 50%;height: 2rem;width: 2rem;" src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/consultant_image_ph_male.png" alt="" class="img-fluid" >') +
"</span>" +
'<span class="name" style="padding-left:0.5rem;font-size: 12px; display:inline-block;">' +
// '<i class="icon ' +
// (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
// '"></i>' +
// "<div class='form-control mainDiv'>" +
// '<span class="name">' +
'#' + escape(item.applicant_id) + ' ' + escape(item.firstname) + ' ' + escape(item.lastname) + '<br> ' + escape(item.phone) + ' - ' + escape(item.o_auth_email) +
"</span>" +
// '<span class="description">' +
// escape(item.description) +
// "</span>" +
"</div>"
);
// return (
// "<div>" +
// '<span class="title">' +
// '<span class="name"><i class="icon ' +
// (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
// '"></i>' +
// escape(item.name) +
// "</span>" +
//
// "</span>" +
// '<span class="description">' +
// escape(item.description) +
// "</span>" +
//
// "</div>"
// );
},
},
onChange: function (value) {
if (!value.length) return;
window.location.href = '{{ absolute_url(path('view_as_user_buddybee')) }}/' + value;
//addProductToListById(value);
// alert(value)
// small_search_box.clear()
// small_search_box.focus()
},
load: function (query, callback) {
// if (!query.length) return // callback();
if (!query.length) query = '_EMPTY_';
var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
$.ajax({
url: BaseURL + "select_data_ajax_public",
type: 'POST',
dataType: 'json',
data: {
//returnJson: 1,
//sessionData: sessionData
query: query,
tableName: "entity_applicant_details",
valueField: "applicant_id",
// textField: "topic_name",
entity_group: 1,
selectorId: $($(this)[0].$input["0"]).attr('id'),
isMultiple: 0,
dataId: pika_ind_id,
// isMultiple: 0,
textField: "rendered_text",
//
renderTextFormat: " __firstname__ __lastname__",
andOrConditions: [
{type: "like", field: "firstname", value: query},
{type: "like", field: "lastname", value: query},
{type: "like", field: "phone", value: query},
{type: "like", field: "email", value: query},
{type: "=", field: "applicant_id", value: isNaN(query) ? '' : query}
],
mustConditions: [
{% if BUDDYBEE_ADMIN_LEVEL>=5 %}
{% elseif BUDDYBEE_ADMIN_LEVEL >=1 %}
{
type: "in",
field: "is_admin",
value: [0, 'null']
},
{
type: "in",
field: "assigned_sales_representative_id",
value: [0, 'null',{{ session[UserConstants.USER_ID] }}]
},
{% else %}
{% endif %}
// {type: "=", field: "is_consultant", value: 1},
{# {% if not curr_data is empty %} #}
// {type: "!=", field: "applicant_id", value: $('#rescheduledStudentId').val()}
{# {% endif %} #}
],
convertToObject: [
// 'accessories', 'issues'
],
skipDefaultCompanyId: 1
// setDataForSingle: 1,
},
error: function () {
// callback();
},
success: function (res) {
// preliminary_reg_data_by_id = res.dataById
callback(res.data);
if (res.setValueArray.length != 0 && res.selectorId != '') {
if (res.isMultiple == 1)
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
else
$('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
}
// alert('pika master')
}
});
},
})[0].selectize;
}
$('.recharge_submit').click(function (e) {
e.preventDefault();
$('#rechargeForm').submit();
});
// alert('.locale_changer.'+honeybeeLocale)
// alert($('.locale_changer.'+honeybeeLocale).text())
$(".curr_locale_text").text($('.locale_changer.' + honeybeeLocale).text());
$('.add_basic_day_picker').not('.datepicker').bootstrapMaterialDatePicker({
//format: 'dddd DD MMMM YYYY',
format: 'MMMM DD, YYYY HH:mm',
clearButton: true,
weekStart: 6,
time: true,
switchOnClick: true,
monthPicker: true
});
});
</script>
</html>