src/ApplicationBundle/Resources/views/footer/buddybee_new_footer.html.twig line 27

Open in your IDE?
  1. {# <script src="{{ asset('condensed_assets/javascript.js',) }}"></script> #}
  2. {# {{  dump( constant('ApplicationBundle\\Constants\\GeneralConstant::NOTIFICATION_SERVER')) }}; #}
  3.     {% if not include_html is defined %}
  4.         {% set include_html=1 %}
  5.         {% if  app.request.request.get('skipHTML') !='' %}
  6.             {% set include_html= 0 %}
  7.         {% endif %}
  8.     {% endif %}
  9. {% if include_html!=1 %}
  10. {% endif %}
  11. <style>
  12.     @media (min-width: 320px) and (max-width: 480px) {
  13.         #deepLinkModal p {
  14.             font-weight: bold;
  15.             font-size: 12px !important;
  16.             line-height: 1.5 !important;
  17.         }
  18.     }
  19. </style>
  20. {% set BUDDYBEE_ADMIN_LEVEL= session[UserConstants.BUDDYBEE_ADMIN_LEVEL] is defined? session[UserConstants.BUDDYBEE_ADMIN_LEVEL]:0 %}
  21. {% include '@Application/modals/input_forms/verify_otp_modal.html.twig' %}
  22. <script>
  23.     var notificationDetailBaseUrl = '{{ url('buddybee_notification_view', {'id': 0}) }}';
  24. </script>
  25. {% if system_type=='_BUDDYBEE_' %}
  26. <footer class="footer">
  27.     <a class="nav-link cta book_now_cta" href="{{ url('consultant_search_page') }}" style="text-transform: none;"
  28.     ><span class="trn" data-trn-key="_BOOK_NOW_CTA_" style="vertical-align: middle;padding: 2px 6px;
  29.     display: inline-block;"></span> <i class="fa fa-arrow-right"></i></a>
  30.     {#    <a class="nav-link cta twus" style=" #}
  31.     {#    border: 2px solid #22b14c; #}
  32.     {#    text-transform: capitalize; #}
  33.     {#    color: #22b14c !important; #}
  34.     {#    z-index: 9999999; #}
  35.     {#    /*display: flex;*/ #}
  36.     {#    flex-direction: row; #}
  37.     {#    vertical-align: middle;" href="{{ url('live_support_page_applicant') }}" #}
  38.     {#    ><span style="background: url('{{ absolute_url(path('dashboard')) }}buddybee_assets/images/video_call_icon.png'); #}
  39.     {#                width: 30px; #}
  40.     {#                height: 30px; #}
  41.     {#                display: inline-block; #}
  42.     {#                background-size: contain; #}
  43.     {#                background-repeat: no-repeat; #}
  44.     {#                background-position: center; #}
  45.     {#                "></span> <span class="trn" data-trn-key="_TALK_WITH_US_CTA_" style="vertical-align: middle;padding: 2px 6px; #}
  46.     {#    display: block; #}
  47.     {#    "></span></a> #}
  48.     <div class="modal  fade" style="z-index: 99999;" id="bookNowModal" tabindex="-1" aria-labelledby="exampleModalLabel"
  49.          aria-hidden="true">
  50.         <div class="modal-dialog modal-dialog-centered">
  51.             <div class="modal-content">
  52.                 <div class="modal-header" style="text-align: center;display: block;">
  53.                     <h5 class="modal-title" id="exampleModalLabel" style="text-align: center;">Select your
  54.                         Preference</h5>
  55.                     {# <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> #}
  56.                 </div>
  57.                 <style>
  58.                     .consTypeSelectorBtn {
  59.                         display: block;
  60.                         width: 100%;
  61.                         padding: 0.25rem 1rem;
  62.                         clear: both;
  63.                         font-weight: 400;
  64.                         color: #212529;
  65.                         text-align: inherit;
  66.                         text-decoration: none;
  67.                         white-space: nowrap;
  68.                         background-color: transparent;
  69.                         border: 0;
  70.                     }
  71.                     .consTypeSelectorBtn:focus, .consTypeSelectorBtn:hover {
  72.                         color: #1e2125;
  73.                         /*background-color: #e9ecef;*/
  74.                     }
  75.                     .consTypeSelectorBtn p {
  76.                         font-family: Inter;
  77.                         font-style: normal;
  78.                         /* font-weight: bold; */
  79.                         line-height: 29px;
  80.                         padding: 7px;
  81.                         align-items: center;
  82.                         text-align: center;
  83.                         color: #4B4B4B;
  84.                         /* background: #1d5b9e; */
  85.                         background: white;
  86.                         border-radius: 0px;
  87.                         border: 1px solid #1B6CB4;
  88.                         width: 69%;
  89.                         font-size: 16px;
  90.                         font-weight: 600;
  91.                         text-transform: uppercase;
  92.                         margin: auto !important;
  93.                     }
  94.                 </style>
  95.                 <div class="modal-body">
  96.                     <div class="row">
  97.                         <div class="col-md-12" style="text-align: left;">
  98.                             <a class="consTypeSelectorBtn " id=""
  99.                                href="{{ url('admin_consultant_search_page') }}">
  100.                                 <div class="">
  101.                                     <p style="margin: 0px;text-transform: none;">
  102.                                         {#                                                <span class="" src="" #}
  103.                                         {#                                                      style="font-weight: normal; background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/bkash_logo.png); #}
  104.                                         {#                                                              background-size: contain; #}
  105.                                         {#                                                              background-repeat: no-repeat; #}
  106.                                         {#                                                              background-position: left; #}
  107.                                         {#                                                              width:3rem; #}
  108.                                         {#                                                              height: 1rem; #}
  109.                                         {#                                                              display: inline-block; #}
  110.                                         {#                                                              margin: auto; #}
  111.                                         {#                                                              vertical-align: middle;"></span> #}
  112.                                         Primary Consultancy</p>
  113.                                 </div>
  114.                             </a>
  115.                             <a class="consTypeSelectorBtn " id=""
  116.                                href="{{ url('consultant_search_page') }}">
  117.                                 <div class="">
  118.                                     <p style="margin: 0px;text-transform: none;">
  119.                                         {#                                                <span class="" src="" #}
  120.                                         {#                                                      style="font-weight: normal; background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/bkash_logo.png); #}
  121.                                         {#                                                              background-size: contain; #}
  122.                                         {#                                                              background-repeat: no-repeat; #}
  123.                                         {#                                                              background-position: left; #}
  124.                                         {#                                                              width:3rem; #}
  125.                                         {#                                                              height: 1rem; #}
  126.                                         {#                                                              display: inline-block; #}
  127.                                         {#                                                              margin: auto; #}
  128.                                         {#                                                              vertical-align: middle;"></span> #}
  129.                                         Expert Consultancy</p>
  130.                                 </div>
  131.                             </a>
  132.                         </div>
  133.                     </div>
  134.                 </div>
  135.             </div>
  136.         </div>
  137.     </div>
  138.     <form action="{{ path('recharge_account') }}" method="post" id="rechargeForm">
  139.         {# <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#reviewModal"> #}
  140.         {# Rate your Consultant #}
  141.         {# </button> #}
  142.         <!-- Modal -->
  143.         <div class="modal fade" id="rechargeAccountOwnModal" tabindex="-1" aria-labelledby="exampleModalLabel"
  144.              aria-hidden="true">
  145.             <div class="modal-dialog modal-dialog-centered">
  146.                 <div class="modal-content">
  147.                     <div class="modal-header" style="text-align: center;display: block;">
  148.                         <h5 class="modal-title" id="exampleModalLabel" style="text-align: center;">Add Fund to Your
  149.                             Account</h5>
  150.                         {# <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> #}
  151.                     </div>
  152.                     <div class="modal-body">
  153.                         <div class="row">
  154.                             <div class="col-md-12" style="text-align: left;">
  155.                                 <div class="form-group">
  156.                                     <label for="">Recharge Amount (Euro)</label>
  157.                                     <input type="number" class="form-control" name="rechargeAmount" id="rechargeAmount">
  158.                                 </div>
  159.                                 <div class="form-group">
  160.                                     <label for="">Bee Code</label>
  161.                                     <input type="text" class="form-control" name="rechargeBeeCode" id="rechargeBeeCode"
  162.                                            placeholder="if you have" value="">
  163.                                     <input type="hidden" class="form-control" name="rechargeApplicantId"
  164.                                            id="rechargeApplicantId" placeholder="if you have"
  165.                                            value="{{ session[UserConstants.USER_ID] is defined ?session[UserConstants.USER_ID]:0 }}">
  166.                                 </div>
  167.                                 <br>
  168.                                 <button type="button" style="width: 48%;height: 3rem;"
  169.                                         class="btn btn-secondary" data-bs-dismiss="modal">Close
  170.                                 </button>
  171.                                 <button type="button" style="width: 48%;height: 3rem;"
  172.                                         class="btn btn-primary recharge_submit">Proceed
  173.                                 </button>
  174.                             </div>
  175.                         </div>
  176.                     </div>
  177.                     <div class="modal-footer">
  178.                     </div>
  179.                 </div>
  180.             </div>
  181.         </div>
  182.     </form>
  183.     <div class="modal fade " style="z-index:9999999999999999999" id="deepLinkModal" tabindex="-1"
  184.          aria-labelledby="exampleModalLabel"
  185.          aria-hidden="true" data-bs-backdrop="false">
  186.         <div class="modal-dialog modal-dialog-centered modal-xl" style="
  187.    /*position:fixed;*/
  188.    align-items: end;
  189.    margin-bottom: 0px;
  190.    margin-left: 0px;
  191.    margin-right: 0px;
  192.    width: 100%;
  193.    top:auto;
  194.    right:auto;
  195.    left:auto;
  196.    bottom:0;">
  197.             <div class="modal-content" style="    text-align: center;
  198.     border-radius: 15px 15px 0 0;
  199.     ">
  200.                 <div class="modal-body">
  201.                     <h5 class="modal-title" id="exampleModalLabel" style="    text-align: center;
  202.     font-size: 1rem;
  203.     color: #616467;
  204.     margin-bottom: 1rem;
  205.     margin-top: .5rem;
  206.     ">Explore BuddyBee with...</h5>
  207.                     <div class="row deep_link_choice _AND_" style="margin-bottom:10px;">
  208.                         <div class="col-md-8 col-sm-8"
  209.                              style="text-align: left; display: flex; justify-content: space-evenly;">
  210.                             <div style="background:url({{ absolute_url(path('dashboard')) }}buddybee_assets/android-icon-192x192.png);
  211.                                     height: 40px;
  212.                                     width: 40px;
  213.                                     background-size: 100%;
  214.                                     background-repeat: no-repeat;
  215.                                     background-position: center;
  216.                                     border-radius: 29%;
  217.                                     display: inline-block;
  218.                                     border: 1px solid #d7dbe1;" class="cons_image_view">
  219.                             </div>
  220.                             <div style="
  221.                                         height: 40px;
  222.                                         width: 200px;
  223.                                         padding-top: 10px;;
  224.                                         padding-left: 10px;;
  225.                                         border-radius: 50%;display: inline-block" class="">
  226.                                 <p>BuddyBee App</p>
  227.                             </div>
  228.                         </div>
  229.                         <div class="col-md-4 col-sm-4" style="text-align: left; padding-top: 5px;">
  230.                             <button type="button" style="width: 100%;
  231.     height: 33px;
  232.         font-size: 12px;
  233.     /*margin-top: 10px;    */
  234. color: #ffffff;
  235.     background-color: #1d5b9e;
  236.                                     font-weight: bold;
  237.                                     border: none;"
  238.                                     class="btn btn_deep_link_selector btn-primary" data-deeplink-choice="_AND_"
  239.                                     data-bs-dismiss="modal">Open
  240.                             </button>
  241.                         </div>
  242.                     </div>
  243.                     <div class="row deep_link_choice _IPHONE_" style="margin-bottom:10px;">
  244.                         <div class="col-md-8 col-sm-8"
  245.                              style="text-align: left; display: flex; justify-content: space-evenly;">
  246.                             <div style="background:url({{ absolute_url(path('dashboard')) }}buddybee_assets/android-icon-192x192.png);
  247.                                     height: 40px;
  248.                                     width: 40px;
  249.                                     background-size: 100%;
  250.                                     background-repeat: no-repeat;
  251.                                     background-position: center;
  252.                                     border-radius: 29%;
  253.                                     display: inline-block;
  254.                                     border: 1px solid #d7dbe1;" class="cons_image_view">
  255.                             </div>
  256.                             <div style="
  257.                                         height: 40px;
  258.                                         width: 200px;
  259.                                         padding-top: 10px;;
  260.                                         padding-left: 10px;;
  261.                                         border-radius: 50%;display: inline-block" class="">
  262.                                 <p>BuddyBee App</p>
  263.                             </div>
  264.                         </div>
  265.                         <div class="col-md-4 col-sm-4" style="text-align: left; padding-top: 5px;">
  266.                             <button type="button" style="width: 100%;
  267.     height: 33px;
  268.         font-size: 12px;
  269.     /*margin-top: 10px;    */
  270.     /*color: #261a0c;*/
  271.                                     /*background-color: #fac53a;*/
  272.                                     color: #ffffff;
  273.     background-color: #1d5b9e;
  274.                                     font-weight: bold;
  275.                                     border: none;"
  276.                                     class="btn btn_deep_link_selector  btn-primary" data-deeplink-choice="_IPHONE_"
  277.                                     data-bs-dismiss="modal">Open
  278.                             </button>
  279.                         </div>
  280.                     </div>
  281.                     <div class="row deep_link_choice _BROWSER_" style="margin-bottom:10px;">
  282.                         <div class="col-md-8 col-sm-8"
  283.                              style="text-align: left; display: flex; justify-content: space-evenly;">
  284.                             <div style="background:url({{ absolute_url(path('dashboard')) }}buddybee_assets/chrome_logo.png);
  285.                                     height: 40px;
  286.                                     width: 40px;
  287.                                     background-size: 100%;
  288.                                     background-repeat: no-repeat;
  289.                                     background-position: center;
  290.                                     border-radius: 29%;
  291.                                     display: inline-block;
  292.                                     border: none;" class="cons_image_view">
  293.                             </div>
  294.                             <div style="
  295.                                         height: 40px;
  296.                                         width: 200px;
  297.                                         padding-top: 10px;;
  298.                                         padding-left: 10px;;
  299.                                         border-radius: 50%;display: inline-block" class="">
  300.                                 <p>Browser</p>
  301.                             </div>
  302.                         </div>
  303.                         <div class="col-md-4 col-sm-4" style="text-align: left; padding-top: 5px;">
  304.                             <button type="button" style="width: 100%;
  305.     height: 33px;
  306.     font-size: 12px;
  307.     /*margin-top: 10px;*/
  308.     color: #1d5b9e;
  309.     /*color: #261a0c;*/
  310.                                     background-color: #dddad3;
  311.                                     font-weight: bold;
  312.                                     border: none;"
  313.                                     class="btn btn_deep_link_selector btn-primary" data-deeplink-choice="_BROWSER_"
  314.                                     data-bs-dismiss="modal">Continue
  315.                             </button>
  316.                         </div>
  317.                     </div>
  318.                 </div>
  319.             </div>
  320.         </div>
  321.     </div>
  322.     <div class="download-app">
  323.         <div class="container">
  324.             <div class="row">
  325.                 <div class="col-md-8 my-auto">
  326.                     <div class="download-app-content">
  327.                         <span>BuddyBee on the go</span>
  328.                         <p>Start or schedule consultants anytime, anywhere with Android and iPhone apps</p>
  329.                         <div class="download-store">
  330.                             {# <a href="#" target="_blank"><img #}
  331.                             {# src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/app-store.png" #}
  332.                             {# alt="app-store"></a> #}
  333.                             <a href="https://play.google.com/store/apps/details?id=eu.buddybee.consultancy"
  334.                                target="_blank"><img
  335.                                         src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/google-play.png"
  336.                                         alt="google-play"></a>
  337.                         </div>
  338.                     </div>
  339.                 </div>
  340.                 <div class="col-md-4">
  341.                     <div class="download-app-img">
  342.                         <img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/video-call.png"
  343.                              alt="video-call">
  344.                     </div>
  345.                 </div>
  346.             </div>
  347.         </div>
  348.     </div>
  349.     <div class="container">
  350.         <div class="image" style="text-align: center;">
  351.             <img src="https://buddybee.eu/buddybee_assets/images/aamarpay-footer.png" alt="" style="max-width: 50%;">
  352.         </div>
  353.     </div>
  354.     <div class="footer-menu">
  355.         <div class="container">
  356.             <div class="row">
  357.                 <div class="col-md-12">
  358.                     <ul class="d-flex justify-content-between m-0">
  359.                         <li><a href="#">Copyright &copy;{{ 'now'|date('Y') }} BuddyBee</a></li>
  360.                         <li><a href="#">Powered by &copy;{{ 'now'|date('Y') }} HoneyBee IoT Ltd. </a></li>
  361.                         {# <li><a href="#">&copy;2021 Buddybee</a></li> #}
  362.                         <li><a href="{{ url('contact_page') }}">Contact</a></li>
  363.                         <li><a href="{{ url('buddybee_terms_of_service') }}">Terms of Service</a></li>
  364.                         <li><a href="{{ url('buddybee_privacy_policy') }}">Privacy Policy</a></li>
  365.                         <li><a href="{{ url('buddybee_refund_policy') }}">Refund Policy</a></li>
  366.                         <li><a href="{{ url('buddybee_cancellation_policy') }}">Cancellation Policy</a></li>
  367.                         <li><a href="{{ url('help_page') }}">Help</a></li>
  368.                         {#                        <li><a href="{{ url('under_construction') }}">Mission Statement</a></li> #}
  369.                     </ul>
  370.                 </div>
  371.             </div>
  372.         </div>
  373.     </div>
  374. </footer>
  375. <style>
  376.     .stepIndicator {
  377.         cursor: pointer;
  378.     }
  379. </style>
  380. <style>
  381.     #promptForInfoModal {
  382.         /*box-shadow: 0px 6px 18px rgb(0 0 0 / 9%);*/
  383.         /*border-radius: 12px;*/
  384.     }
  385.     #promptForInfoModal .modal-body {
  386.         padding: 0 1rem;
  387.     }
  388.     #promptForInfoModal p {
  389.         margin-bottom: .5rem !important;
  390.     }
  391.     #promptForInfoModal .selectize-control {
  392.         min-width: 100%;
  393.     }
  394.     #promptForInfoModal .selectize-input.items {
  395.         border: 1px solid #d0d0d0;
  396.         padding: 8px 8px;
  397.         display: inline-block;
  398.         width: 100%;
  399.         overflow: hidden;
  400.         position: relative;
  401.         z-index: 1;
  402.         box-sizing: border-box;
  403.         box-shadow: inset 0 1px 1px rgba(0, 0, 0, .1);
  404.         border-radius: 3px;
  405.     }
  406.     #promptForInfoModalForm {
  407.         max-width: 500px;
  408.         background-color: #ffffff;
  409.         /*margin: 40px auto;*/
  410.         padding: 40px;
  411.         box-shadow: 0px 6px 18px rgb(0 0 0 / 9%);
  412.         /*border-radius: 12px;*/
  413.     }
  414.     #promptForInfoModalForm .form-header {
  415.         gap: 5px;
  416.         text-align: center;
  417.         font-size: .9em;
  418.     }
  419.     #promptForInfoModalForm .form-header .stepIndicator {
  420.         position: relative;
  421.         flex: 1;
  422.         padding-bottom: 30px;
  423.     }
  424.     #promptForInfoModalForm .form-header .stepIndicator.active {
  425.         font-weight: 600;
  426.     }
  427.     #promptForInfoModalForm .form-header .stepIndicator.finish {
  428.         font-weight: 600;
  429.         color: #009688;
  430.     }
  431.     #promptForInfoModalForm .form-header .stepIndicator::before {
  432.         content: "";
  433.         position: absolute;
  434.         left: 50%;
  435.         bottom: 0;
  436.         transform: translateX(-50%);
  437.         z-index: 9;
  438.         width: 20px;
  439.         height: 20px;
  440.         background-color: #d5efed;
  441.         border-radius: 50%;
  442.         border: 3px solid #ecf5f4;
  443.     }
  444.     #promptForInfoModalForm .form-header .stepIndicator.active::before {
  445.         background-color: #a7ede8;
  446.         border: 3px solid #d5f9f6;
  447.     }
  448.     #promptForInfoModalForm .form-header .stepIndicator.finish::before {
  449.         background-color: #009688;
  450.         border: 3px solid #b7e1dd;
  451.     }
  452.     #promptForInfoModalForm .form-header .stepIndicator::after {
  453.         content: "";
  454.         position: absolute;
  455.         left: 50%;
  456.         bottom: 8px;
  457.         width: 100%;
  458.         height: 3px;
  459.         background-color: #f3f3f3;
  460.     }
  461.     #promptForInfoModalForm .form-header .stepIndicator.active::after {
  462.         background-color: #a7ede8;
  463.     }
  464.     #promptForInfoModalForm .form-header .stepIndicator.finish::after {
  465.         background-color: #009688;
  466.     }
  467.     #promptForInfoModalForm .form-header .stepIndicator:last-child:after {
  468.         display: none;
  469.     }
  470.     #promptForInfoModalForm input {
  471.         padding: 15px 20px;
  472.         width: 100%;
  473.         font-size: 1em;
  474.         border: 1px solid #e3e3e3;
  475.         border-radius: 5px;
  476.     }
  477.     #promptForInfoModalForm input:focus {
  478.         border: 1px solid #009688;
  479.         outline: 0;
  480.     }
  481.     #promptForInfoModalForm input.invalid {
  482.         border: 1px solid #ffaba5;
  483.     }
  484.     #promptForInfoModalForm .step {
  485.         display: none;
  486.     }
  487.     #promptForInfoModalForm .form-footer {
  488.         overflow: auto;
  489.         gap: 20px;
  490.     }
  491.     #promptForInfoModalForm .form-footer button {
  492.         background-color: #1d5b9e;
  493.         border: 1px solid #1d5b9e;
  494.         color: #ffffff;
  495.         border: none;
  496.         padding: 13px 30px;
  497.         font-size: 1em;
  498.         cursor: pointer;
  499.         border-radius: 5px;
  500.         flex: 1;
  501.         margin-top: 5px;
  502.     }
  503.     #promptForInfoModalForm .form-footer button:hover {
  504.         opacity: 0.8;
  505.     }
  506.     #promptForInfoModalForm .form-footer #promptInfo_prevBtn {
  507.         background-color: #fff;
  508.         color: #009688;
  509.     }
  510. </style>
  511. <style>
  512.     #selectPurchaseModal {
  513.         /*box-shadow: 0px 6px 18px rgb(0 0 0 / 9%);*/
  514.         /*border-radius: 12px;*/
  515.     }
  516.     #selectPurchaseModal .modal-body {
  517.         padding: 0 1rem;
  518.     }
  519.     #selectPurchaseModal p {
  520.         margin-bottom: .5rem;
  521.     }
  522.     #selectPurchaseModal .selectize-control {
  523.         min-width: 100%;
  524.     }
  525.     #selectPurchaseModal .selectize-input.items {
  526.         border: 1px solid #d0d0d0;
  527.         padding: 8px 8px;
  528.         display: inline-block;
  529.         width: 100%;
  530.         overflow: hidden;
  531.         position: relative;
  532.         z-index: 1;
  533.         box-sizing: border-box;
  534.         box-shadow: inset 0 1px 1px rgba(0, 0, 0, .1);
  535.         border-radius: 3px;
  536.     }
  537.     #selectPurchaseModalForm {
  538.         max-width: 500px;
  539.         background-color: #ffffff;
  540.         /*margin: 40px auto;*/
  541.         padding: 40px;
  542.         box-shadow: 0px 6px 18px rgb(0 0 0 / 9%);
  543.         /*border-radius: 12px;*/
  544.     }
  545.     #selectPurchaseModalForm .form-header {
  546.         gap: 5px;
  547.         text-align: center;
  548.         font-size: .9em;
  549.     }
  550.     #selectPurchaseModalForm .form-header .stepIndicator {
  551.         position: relative;
  552.         flex: 1;
  553.         padding-bottom: 30px;
  554.     }
  555.     #selectPurchaseModalForm .form-header .stepIndicator.active {
  556.         font-weight: 600;
  557.     }
  558.     #selectPurchaseModalForm .form-header .stepIndicator.finish {
  559.         font-weight: 600;
  560.         color: #009688;
  561.     }
  562.     #selectPurchaseModalForm .form-header .stepIndicator::before {
  563.         content: "";
  564.         position: absolute;
  565.         left: 50%;
  566.         bottom: 0;
  567.         transform: translateX(-50%);
  568.         z-index: 9;
  569.         width: 20px;
  570.         height: 20px;
  571.         background-color: #d5efed;
  572.         border-radius: 50%;
  573.         border: 3px solid #ecf5f4;
  574.     }
  575.     #selectPurchaseModalForm .form-header .stepIndicator.active::before {
  576.         background-color: #a7ede8;
  577.         border: 3px solid #d5f9f6;
  578.     }
  579.     #selectPurchaseModalForm .form-header .stepIndicator.finish::before {
  580.         background-color: #009688;
  581.         border: 3px solid #b7e1dd;
  582.     }
  583.     #selectPurchaseModalForm .form-header .stepIndicator::after {
  584.         content: "";
  585.         position: absolute;
  586.         left: 50%;
  587.         bottom: 8px;
  588.         width: 100%;
  589.         height: 3px;
  590.         background-color: #f3f3f3;
  591.     }
  592.     #selectPurchaseModalForm .form-header .stepIndicator.active::after {
  593.         background-color: #a7ede8;
  594.     }
  595.     #selectPurchaseModalForm .form-header .stepIndicator.finish::after {
  596.         background-color: #009688;
  597.     }
  598.     #selectPurchaseModalForm .form-header .stepIndicator:last-child:after {
  599.         display: none;
  600.     }
  601.     #selectPurchaseModalForm input {
  602.         padding: 15px 20px;
  603.         width: 100%;
  604.         font-size: 1em;
  605.         border: 1px solid #e3e3e3;
  606.         border-radius: 5px;
  607.     }
  608.     #selectPurchaseModalForm input:focus {
  609.         border: 1px solid #009688;
  610.         outline: 0;
  611.     }
  612.     #selectPurchaseModalForm input.invalid {
  613.         border: 1px solid #ffaba5;
  614.     }
  615.     #selectPurchaseModalForm .step {
  616.         display: none;
  617.     }
  618.     #selectPurchaseModalForm .form-footer {
  619.         overflow: auto;
  620.         gap: 20px;
  621.     }
  622.     #selectPurchaseModalForm .form-footer button {
  623.         background-color: #1d5b9e;
  624.         border: 1px solid #1d5b9e;
  625.         color: #ffffff;
  626.         border: none;
  627.         padding: 13px 30px;
  628.         font-size: 1em;
  629.         cursor: pointer;
  630.         border-radius: 5px;
  631.         flex: 1;
  632.         margin-top: 5px;
  633.     }
  634.     #selectPurchaseModalForm .form-footer button:hover {
  635.         opacity: 0.8;
  636.     }
  637.     #selectPurchaseModalForm .form-footer #promptInfo_prevBtn {
  638.         background-color: #fff;
  639.         color: #009688;
  640.     }
  641. </style>
  642. <div class="modal fade" id="promptForInfoModal" tabindex="-1" aria-labelledby="exampleModalLabel"
  643.      aria-hidden="true">
  644.     <div class="modal-dialog modal-dialog-centered">
  645.         <div class="modal-content">
  646.             <div class="modal-header" style="">
  647.                 <h6 class="modal-title" id="exampleModalLabel" style="text-align: left;">
  648.                     Please Fill up Your Info for Better Communication</h6>
  649.                 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
  650.                     {# <span aria-hidden="true">&times;</span> #}
  651.                 </button>
  652.             </div>
  653.             <div class="modal-body">
  654.                 <div class="row">
  655.                     {% if session['triggerPromptInfoModalFlag'] is defined %}
  656.                         {% if session['triggerPromptInfoModalFlag'] == 1 %}
  657.                             {% if session['relevantRequiredPromptFields'] is defined %}
  658.                                 {% set relevantRequiredPromptFields =session['relevantRequiredPromptFields']|jsonDecode() %}
  659.                                 {% if not relevantRequiredPromptFields is empty %}
  660.                                     <form id="promptForInfoModalForm" action="#!">
  661.                                         <!-- start step indicators -->
  662.                                         <div class="form-header d-flex mb-4">
  663.                                             {% if 'email' in relevantRequiredPromptFields  or 'phone' in relevantRequiredPromptFields or 'currentCountryId' in relevantRequiredPromptFields %}
  664.                                                 <span class="stepIndicator">Contact Info</span>
  665.                                             {% endif %}
  666.                                             {% if 'preferredTopicIdsAsConsultant' in relevantRequiredPromptFields
  667.                                                 or 'preferredTopicIdsAsStudent' in relevantRequiredPromptFields
  668.                                                 or 'preferredConsultancyTopicCountryIds' in relevantRequiredPromptFields %}
  669.                                                 <span class="stepIndicator">Preferences</span>
  670.                                             {% endif %}
  671.                                             {# <span class="stepIndicator">Relevant Info</span> #}
  672.                                             {# <span class="stepIndicator">Preferences</span> #}
  673.                                         </div>
  674.                                         <!-- end step indicators -->
  675.                                         <!-- step one -->
  676.                                         {% if 'email' in relevantRequiredPromptFields  or 'phone' in relevantRequiredPromptFields or 'currentCountryId' in relevantRequiredPromptFields %}
  677.                                             {# <span class="stepIndicator">Contact Info</span> #}
  678.                                             <div class="step">
  679.                                                 {# <p class="text-center mb-4">Your Email Address</p> #}
  680.                                                 {% if 'email' in relevantRequiredPromptFields %}
  681.                                                     <div class="mb-3">
  682.                                                         <input type="email" class="promptForInfoAutoUpdateData required"
  683.                                                                data-set-method="setOAuthEmail"
  684.                                                                data-field-type="_TEXT_"
  685.                                                                data-relevant-prompt-field="email"
  686.                                                                data-modify-trans-date="0"
  687.                                                                placeholder="Your Email">
  688.                                                     </div>
  689.                                                 {% endif %}
  690.                                                 {% if 'phone' in relevantRequiredPromptFields %}
  691.                                                     <div class="mb-3">
  692.                                                         <input type="phone" class="promptForInfoAutoUpdateData required"
  693.                                                                data-set-method="setPhone"
  694.                                                                data-field-type="_TEXT_"
  695.                                                                data-relevant-prompt-field="phone"
  696.                                                                data-modify-trans-date="0"
  697.                                                                placeholder="Your Phone No.">
  698.                                                     </div>
  699.                                                 {% endif %}
  700.                                                 {% if 'currentCountryId' in relevantRequiredPromptFields %}
  701.                                                     <p class=" mb-4">Your Current Country</p>
  702.                                                     <div class="mb-3">
  703.                                                         <select class="promptForInfoAutoUpdateData required"
  704.                                                                 data-set-method="setCurrentCountryId,setCountry"
  705.                                                                 data-field-type="_VALUE_"
  706.                                                                 data-relevant-prompt-field="currentCountryId"
  707.                                                                 data-modify-trans-date="0"
  708.                                                                 id="currentCountryIdPromptForInfo"
  709.                                                                 name="currentCountryIdPromptForInfo[]">
  710.                                                         </select>
  711.                                                     </div>
  712.                                                 {% endif %}
  713.                                             </div>
  714.                                         {% endif %}
  715.                                         <!-- step two -->
  716.                                         {% if 'preferredTopicIdsAsConsultant' in relevantRequiredPromptFields
  717.                                             or 'preferredTopicIdsAsStudent' in relevantRequiredPromptFields
  718.                                             or 'preferredConsultancyTopicCountryIds' in relevantRequiredPromptFields %}
  719.                                             <div class="step">
  720.                                                 {% if  'preferredTopicIdsAsStudent' in relevantRequiredPromptFields %}
  721.                                                     <p class=" mb-4">Your Preferred topics as Student</p>
  722.                                                     <div class="mb-3">
  723.                                                         <select class=" promptForInfoAutoUpdateData"
  724.                                                                 data-set-method="setPreferredTopicIdsAsStudent"
  725.                                                                 data-field-type="_JSON_"
  726.                                                                 data-relevant-prompt-field="preferredTopicIdsAsStudent"
  727.                                                                 data-modify-trans-date="0"
  728.                                                                 id="preferredTopicIdsAsStudentPromptForInfo"
  729.                                                                 name="preferredTopicIdsAsStudentPromptForInfo[]"
  730.                                                                 multiple>
  731.                                                         </select>
  732.                                                     </div>
  733.                                                 {% endif %}
  734.                                                 {% if 'preferredTopicIdsAsConsultant' in relevantRequiredPromptFields %}
  735.                                                     <p class=" mb-4">Your Preferred topics as Consultant</p>
  736.                                                     <div class="mb-3">
  737.                                                         <select class=" promptForInfoAutoUpdateData"
  738.                                                                 data-set-method="setPreferredTopicIdsAsConsultant"
  739.                                                                 data-field-type="_JSON_"
  740.                                                                 data-relevant-prompt-field="preferredTopicIdsAsConsultant"
  741.                                                                 data-modify-trans-date="0"
  742.                                                                 id="preferredTopicIdsAsConsultantPromptForInfo"
  743.                                                                 name="preferredTopicIdsAsConsultantPromptForInfo[]"
  744.                                                                 multiple>
  745.                                                         </select>
  746.                                                     </div>
  747.                                                 {% endif %}
  748.                                                 {% if 'preferredConsultancyTopicCountryIds' in relevantRequiredPromptFields %}
  749.                                                     <p class=" mb-4">Countries you wish to go</p>
  750.                                                     <div class="mb-3">
  751.                                                         <select class=" promptForInfoAutoUpdateData"
  752.                                                                 data-set-method="setPreferredConsultancyTopicCountryIds"
  753.                                                                 data-field-type="_JSON_"
  754.                                                                 data-relevant-prompt-field="preferredConsultancyTopicCountryIds"
  755.                                                                 data-modify-trans-date="0"
  756.                                                                 id="preferredConsultancyTopicCountryIdsPromptForInfo"
  757.                                                                 name="preferredConsultancyTopicCountryIdsPromptForInfo[]"
  758.                                                                 multiple>
  759.                                                         </select>
  760.                                                     </div>
  761.                                                 {% endif %}
  762.                                             </div>
  763.                                         {% endif %}
  764.                                         <!-- step three -->
  765.                                         <!-- start previous / next buttons -->
  766.                                         <div class="form-footer d-flex">
  767.                                             <button type="button" class="prevBtn" id="promptForInfo_prevBtn"
  768.                                                     onclick="promptInfo_nextPrev(-1)">
  769.                                                 Previous
  770.                                             </button>
  771.                                             <button type="button" class="nextBtn" id="promptForInfo_nextBtn"
  772.                                                     onclick="promptInfo_nextPrev(1)">
  773.                                                 Next
  774.                                             </button>
  775.                                         </div>
  776.                                         <!-- end previous / next buttons -->
  777.                                     </form>
  778.                                 {% endif %}
  779.                             {% endif %}
  780.                         {% endif %}
  781.                     {% endif %}
  782.                 </div>
  783.             </div>
  784.             {# <div class="modal-footer"> #}
  785.             {# </div> #}
  786.         </div>
  787.     </div>
  788. </div>
  789. <div class="modal fade" id="selectPurchaseModal" tabindex="-1" aria-labelledby="exampleModalLabel"
  790.      aria-hidden="true">
  791.     <div class="modal-dialog modal-dialog-centered">
  792.         <div class="modal-content">
  793.             <div class="modal-header" style="">
  794.                 <h6 class="modal-title" id="exampleModalLabel" style="text-align: left;">
  795.                     Get Consultation</h6>
  796.                 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
  797.                     {# <span aria-hidden="true">&times;</span> #}
  798.                 </button>
  799.             </div>
  800.             <div class="modal-body">
  801.                 <div class="row">
  802.                     <style>
  803.                         .box-selector {
  804.                             padding: 10px 4px;
  805.                             cursor: pointer;
  806.                         }
  807.                         .box-selector .inside {
  808.                             padding: 5px;
  809.                             border-radius: 5px;
  810.                             -webkit-box-shadow: 10px 10px 48px -24px rgba(14, 26, 87, 1);
  811.                             -moz-box-shadow: 10px 10px 48px -24px rgba(14, 26, 87, 1);
  812.                             box-shadow: 10px 10px 48px -24px rgba(14, 26, 87, 1);
  813.                         }
  814.                         .box-selector .inside input {
  815.                             cursor: pointer
  816.                         }
  817.                         .box-selector .inside textarea {
  818.                             text-align: center;
  819.                             cursor: pointer;
  820.                             width: 100%;
  821.                             border: none;
  822.                             resize: none;
  823.                             font-size: 14px;
  824.                             color: #1d5b9e;
  825.                             font-weight: bold;
  826.                         }
  827.                         .box-selector.sch_selector_mon .inside,
  828.                         .box-selector.sch_selector_day .inside
  829.                             /*.box-selector.sch_selector_time .inside*/
  830.                         {
  831.                             padding: 10px 5px;
  832.                         }
  833.                         .box-selector.sch_selector_time .inside {
  834.                             padding: 4px 5px;
  835.                         }
  836.                         .step .view_if_has_schedules {
  837.                             display: none;
  838.                         }
  839.                         .box-selector.active:not(.man_sch_selector) .inside {
  840.                             border: 2px solid #1d5b9e;
  841.                             -webkit-box-shadow: 10px 10px 24px -3px rgba(29, 91, 158, 1);
  842.                             -moz-box-shadow: 10px 10px 24px -3px rgba(29, 91, 158, 1);
  843.                             box-shadow: 10px 10px 24px -3px rgba(29, 91, 158, 1);
  844.                         }
  845.                         .box-selector.active.man_sch_selector .inside {
  846.                             border: 2px solid #1d5b9e;
  847.                             -webkit-box-shadow: none;
  848.                             -moz-box-shadow: none;
  849.                             box-shadow: none;
  850.                         }
  851.                         .box-selector.sch_selector_mon.active .inside,
  852.                         .box-selector.sch_selector_day.active .inside,
  853.                         .box-selector.sch_selector_time.active .inside {
  854.                             border: 2px solid #1d5b9e;
  855.                             -webkit-box-shadow: 4px 7px 24px -3px rgba(29, 91, 158, 1);
  856.                             -moz-box-shadow: 10px 10px 24px -3px rgba(29, 91, 158, 1);
  857.                             box-shadow: 4px 7px 24px -3px rgba(29, 91, 158, 1);
  858.                         }
  859.                         .box-selector .img {
  860.                             margin-bottom: 5px;
  861.                         }
  862.                         .box-selector .title {
  863.                             text-align: center;
  864.                             margin-bottom: 1px;
  865.                             font-size: 13px;
  866.                         }
  867.                         .box-selector.paymentMethodSelectorBtn .title {
  868.                             text-align: center;
  869.                             margin-bottom: 1px;
  870.                             font-size: 14px;
  871.                         }
  872.                         .box-selector .sub-title {
  873.                             font-size: 12px;
  874.                             color: grey;
  875.                         }
  876.                         #selectPurchaseModal .routineTable {
  877.                             text-align: left;
  878.                             vertical-align: middle;
  879.                         }
  880.                         #selectPurchaseModal .routineTable .icon-delete {
  881.                             color: darkred;
  882.                             font-weight: bold;
  883.                         }
  884.                         #selectPurchaseModal .routineTable .icon-delete .fa {
  885.                             padding: 10px;
  886.                             border-radius: 39px;
  887.                             border: 1px solid #eddcdc;
  888.                             width: 34px;
  889.                             height: 34px;
  890.                             text-align: center;
  891.                         }
  892.                         #selectPurchaseModal .routineTable .icon-check {
  893.                             color: green;
  894.                             font-weight: bold;
  895.                         }
  896.                         #selectPurchaseModal .routineTable .icon-check .fa {
  897.                             opacity: 0.1;
  898.                         }
  899.                         #selectPurchaseModal .routineTable .icon-check.isChecked .fa {
  900.                             opacity: 1;
  901.                         }
  902.                         #selectPurchaseModal .routineTable .icon-check .fa {
  903.                             padding: 10px;
  904.                             border-radius: 39px;
  905.                             border: 1px solid #eddcdc;
  906.                             width: 34px;
  907.                             height: 34px;
  908.                             text-align: center;
  909.                         }
  910.                     </style>
  911.                     <form id="selectPurchaseModalForm" action="#">
  912.                         <!-- start step indicators -->
  913.                         <div class="form-header d-flex mb-4">
  914.                             <span class="stepIndicator seq_0" data-seq-id="0">Select Country</span>
  915.                             <span class="stepIndicator seq_1" data-seq-id="1">Select Topic</span>
  916.                             <span class="stepIndicator seq_2" data-seq-id="2">Select Consultant</span>
  917.                             <span class="stepIndicator seq_3" data-seq-id="3">Select Schedule</span>
  918.                             <span class="stepIndicator seq_4" data-seq-id="4">Confirm</span>
  919.                             <span class="stepIndicator seq_5" data-seq-id="5">Payment</span>
  920.                         </div>
  921.                         <div class="step seq_0 ">
  922.                             <h5 class=" ">Select a Country</h5>
  923.                             <div class="row clearfix cn_holder">
  924.                                 {% if not countries_data is defined %}
  925.                                     {% set countries_data=''|getCountriesBuddyBee %}
  926.                                 {% endif %}
  927.                                 {% for ind,cntry in countries_data %}
  928.                                     <div class="box-selector cn_selector cn_{{ cntry.id }}  col-md-3 col-sm-6"
  929.                                          data-id="{{ cntry.id }}"
  930.                                          data-gen-class="cn_selector"
  931.                                     >
  932.                                         <div class="inside">
  933.                                             <div class="img" href="{{ url('dashboard') }}" style="
  934.                                                     background:url(' {{ absolute_url(path('dashboard')) }}{{ cntry.flagImage }}');
  935.                                                     height: 50px !important;
  936.                                                     width: 100%;
  937.                                                     /* max-width: 30% !important; */
  938.                                                     background-position: center;
  939.                                                     background-size: contain;
  940.                                                     background-repeat: no-repeat;
  941.                                                     ">
  942.                                             </div>
  943.                                             <h6 class="title" style="height: 2rem;">{{ cntry.name }}</h6>
  944.                                             {#                                            <p class="sub-title">&nbsp;</p> #}
  945.                                         </div>
  946.                                     </div>
  947.                                 {% endfor %}
  948.                             </div>
  949.                         </div>
  950.                         <div class="step seq_1 ">
  951.                             <h5 class=" ">Select a Topic</h5>
  952.                             <div class="row clearfix topic_holder">
  953.                             </div>
  954.                         </div>
  955.                         <div class="step seq_2">
  956.                             <h5 class=" ">Select a Consultant</h5>
  957.                             <div class="row clearfix cons_holder">
  958.                             </div>
  959.                         </div>
  960.                         <div class="step seq_3">
  961.                             <h5 class="view_if_has_schedules">Select Month</h5>
  962.                             <div class="row clearfix sch_holder_month view_if_has_schedules"></div>
  963.                             <h5 class="view_if_has_schedules">Select Day</h5>
  964.                             <div class="row clearfix sch_holder_day view_if_has_schedules"></div>
  965.                             <h5 class="view_if_has_schedules">Select Time</h5>
  966.                             <div class="row clearfix sch_holder_time view_if_has_schedules"></div>
  967.                             <p class="view_if_has_schedules"> -------or------- </p>
  968.                             <h5 class=" ">Select Preferred Schedule (Upto 3)</h5>
  969.                             <div class="row clearfix sch_holder">
  970.                                 {% for hh in 1..3 %}
  971.                                     <div class="box-selector man_sch_selector man_sch_{{ hh }}  col-md-4 col-sm-6"
  972.                                          data-id="{{ hh }}"
  973.                                          data-gen-class="man_sch_selector"
  974.                                     >
  975.                                         <div class="inside">
  976.                                         <textarea
  977.                                                 class="add_basic_day_picker man_sch_selector_dp man_sch_selector_dp{{ hh }}  "
  978.                                                 data-id="{{ hh }}" placeholder="Click to set Schedule"
  979.                                                 data-gen-class="man_sch_selector_dp"></textarea>
  980.                                         </div>
  981.                                     </div>
  982.                                 {% endfor %}
  983.                             </div>
  984.                         </div>
  985.                         <div class="step seq_4">
  986.                             <h5 class=" ">Your Purchase Summary</h5>
  987.                             <div class="row clearfix summary_holder">
  988.                                 <p class="cntry_p">Country : <span>Germany</span></p>
  989.                                 <p class="topic_p"> Name & Type: <span>Single Consultation</span></p>
  990.                                 <p class="cons_p">Consultant : <span>Ahmed Zahid Omar</span></p>
  991.                                 <p class="coins_p">Coins : <span class="routineCoinNeededTotalSpan"></span></p>
  992.                             </div>
  993.                             <style>
  994.                                 #selectPurchaseModal .routineTable {
  995.                                     text-align: left;
  996.                                     vertical-align: middle;
  997.                                 }
  998.                                 #selectPurchaseModal .routineTable .icon-delete {
  999.                                     color: darkred;
  1000.                                     font-weight: bold;
  1001.                                 }
  1002.                                 #selectPurchaseModal .routineTable .icon-delete .fa {
  1003.                                     padding: 10px;
  1004.                                     border-radius: 39px;
  1005.                                     border: 1px solid #eddcdc;
  1006.                                     width: 34px;
  1007.                                     height: 34px;
  1008.                                     text-align: center;
  1009.                                 }
  1010.                                 #selectPurchaseModal .routineTable .icon-check {
  1011.                                     color: green;
  1012.                                     font-weight: bold;
  1013.                                 }
  1014.                                 #selectPurchaseModal .routineTable .icon-check .fa {
  1015.                                     opacity: 0.1;
  1016.                                 }
  1017.                                 #selectPurchaseModal .routineTable .icon-check.isChecked .fa {
  1018.                                     opacity: 1;
  1019.                                 }
  1020.                                 #selectPurchaseModal .routineTable .icon-check .fa {
  1021.                                     padding: 10px;
  1022.                                     border-radius: 39px;
  1023.                                     border: 1px solid #eddcdc;
  1024.                                     width: 34px;
  1025.                                     height: 34px;
  1026.                                     text-align: center;
  1027.                                 }
  1028.                             </style>
  1029.                             <table class="table table-condensed table-striped routineTable">
  1030.                                 <tbody></tbody>
  1031.                                 <tfoot>
  1032.                                 <tr>
  1033.                                     <td>Total Bee Coins Needed</td>
  1034.                                     <td style="text-align: left;"><b class="routineCoinNeededTotalSpan">0</b><br>
  1035.                                     </td>
  1036.                                     <td></td>
  1037.                                 </tr>
  1038.                                 </tfoot>
  1039.                             </table>
  1040.                         </div>
  1041.                         <div class="step seq_5">
  1042.                             <h5 class=" ">Direct Payment</h5>
  1043.                             <div class="row">
  1044.                                 <div class="box-selector pm_selector pm_1  col-md-4 col-sm-6 paymentMethodSelectorBtn"
  1045.                                      data-id="1"
  1046.                                      data-gen-class="pm_selector"
  1047.                                 >
  1048.                                     <div class="inside">
  1049.                                         <div class="img" href="{{ url('dashboard') }}" style="
  1050.                                                 background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/stripe_logo.png);
  1051.                                                 height: 50px !important;
  1052.                                                 width: 100%;
  1053.                                                 /* max-width: 30% !important; */
  1054.                                                 background-position: center;
  1055.                                                 background-size: contain;
  1056.                                                 background-repeat: no-repeat;
  1057.                                                 ">
  1058.                                         </div>
  1059.                                         <h6 class="title" style="height: 2rem;">Stripe</h6>
  1060.                                         {#                                            <p class="sub-title">&nbsp;</p> #}
  1061.                                     </div>
  1062.                                 </div>
  1063.                                 <div class="box-selector pm_selector pm_2  col-md-4 col-sm-6 paymentMethodSelectorBtn"
  1064.                                      data-id="2"
  1065.                                      data-gen-class="pm_selector"
  1066.                                 >
  1067.                                     <div class="inside">
  1068.                                         <div class="img" href="{{ url('dashboard') }}" style="
  1069.                                                 background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/bkash_logo.png);
  1070.                                                 height: 50px !important;
  1071.                                                 width: 100%;
  1072.                                                 /* max-width: 30% !important; */
  1073.                                                 background-position: center;
  1074.                                                 background-size: contain;
  1075.                                                 background-repeat: no-repeat;
  1076.                                                 ">
  1077.                                         </div>
  1078.                                         <h6 class="title" style="height: 2rem;">Bkash</h6>
  1079.                                         {#                                            <p class="sub-title">&nbsp;</p> #}
  1080.                                     </div>
  1081.                                 </div>
  1082.                                 <div class="box-selector pm_selector pm_3  col-md-4 col-sm-6 paymentMethodSelectorBtn"
  1083.                                      data-id="3"
  1084.                                      data-gen-class="pm_selector"
  1085.                                 >
  1086.                                     <div class="inside">
  1087.                                         <div class="img" href="{{ url('dashboard') }}" style="
  1088.                                                 background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/aamarpay_logo.png);
  1089.                                                 height: 50px !important;
  1090.                                                 width: 100%;
  1091.                                                 /* max-width: 30% !important; */
  1092.                                                 background-position: center;
  1093.                                                 background-size: contain;
  1094.                                                 background-repeat: no-repeat;
  1095.                                                 ">
  1096.                                         </div>
  1097.                                         <h6 class="title" style="height: 2rem;">Card</h6>
  1098.                                         {#                                            <p class="sub-title">&nbsp;</p> #}
  1099.                                     </div>
  1100.                                 </div>
  1101.                             </div>
  1102.                             <h5 class=" ">Purchase Bee Card</h5>
  1103.                             <div class="row">
  1104.                                 {% set encData={
  1105.                                 } %}
  1106.                                 {#                                {% set encData={ #}
  1107.                                 {#                                    "rtlId": retailerId is defined?retailerId:0 , #}
  1108.                                 {#                                    "schTs": scheduleId is defined?scheduleId:0 , #}
  1109.                                 {#                                    "cnsId":consultantDetails is defined and not consultantDetails is null ?consultantDetails.applicantId:0, #}
  1110.                                 {#                                    "stdntId": session[UserConstants.USER_ID] is defined ?session[UserConstants.USER_ID]:0 , #}
  1111.                                 {#                                    "aams": autoAssignMeetingSession is defined ?autoAssignMeetingSession:0  , #}
  1112.                                 {#                                    "rpsc": requiredPurchaseSessionCount is defined ?requiredPurchaseSessionCount:0, #}
  1113.                                 {#                                    "scc":sessionConsumeCount is defined?sessionConsumeCount:0, #}
  1114.                                 {#                                    "tId":topic is defined and not topic is null? topic.id:0, #}
  1115.                                 {#                                    "dur":sessionDuration is defined?sessionDuration:0, #}
  1116.                                 {#                                    "sem":topicSessionValue is defined? topicSessionValue:0 , #}
  1117.                                 {#                                } %} #}
  1118.                                 {% set link_data=url('purchase_bee_card_page',{ 'encData':(encData|json_encode) | nzo_encrypt  } ) %}
  1119.                                 <div class="box-selector pm_selector pm_4  col-md-4 col-sm-6 paymentMethodSelectorBtn"
  1120.                                      data-id="4"
  1121.                                      data-gen-class="pm_selector"
  1122.                                 >
  1123.                                     <div class="inside">
  1124.                                         <div class="img" href="{{ url('dashboard') }}" style="
  1125.                                                 background: url({{ absolute_url(path('dashboard')) }}buddybee_assets/ms-icon-310x310.png);
  1126.                                                 height: 50px !important;
  1127.                                                 width: 100%;
  1128.                                                 /* max-width: 30% !important; */
  1129.                                                 background-position: center;
  1130.                                                 background-size: contain;
  1131.                                                 background-repeat: no-repeat;
  1132.                                                 ">
  1133.                                         </div>
  1134.                                         <h6 class="title" style="height: 2rem;">Claim Bee Card</h6>
  1135.                                         {#                                            <p class="sub-title">&nbsp;</p> #}
  1136.                                     </div>
  1137.                                 </div>
  1138.                                 {#                                <div class="box-selector pm_selector pm_5  col-md-4 col-sm-6 paymentMethodSelectorBtn" #}
  1139.                                 {#                                     data-id="5" #}
  1140.                                 {#                                     data-gen-class="pm_selector" #}
  1141.                                 {#                                > #}
  1142.                                 {#                                    <div class="inside"> #}
  1143.                                 {#                                        <div class="img" href="{{ url('dashboard') }}" style=" #}
  1144.                                 {#                                                background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/bkash_logo.png); #}
  1145.                                 {#                                                height: 50px !important; #}
  1146.                                 {#                                                width: 100%; #}
  1147.                                 {#                                                /* max-width: 30% !important; */ #}
  1148.                                 {#                                                background-position: center; #}
  1149.                                 {#                                                background-size: contain; #}
  1150.                                 {#                                                background-repeat: no-repeat; #}
  1151.                                 {#                                                "> #}
  1152.                                 {#                                        </div> #}
  1153.                                 {#                                        <h6 class="title" style="height: 2rem;">Bkash</h6> #}
  1154.                                 {#                                        #}{#                                            <p class="sub-title">&nbsp;</p> #}
  1155.                                 {#                                    </div> #}
  1156.                                 {#                                </div> #}
  1157.                                 {#                                <div class="box-selector pm_selector pm_6  col-md-4 col-sm-6 paymentMethodSelectorBtn" #}
  1158.                                 {#                                     data-id="6" #}
  1159.                                 {#                                     data-gen-class="pm_selector" #}
  1160.                                 {#                                > #}
  1161.                                 {#                                    <div class="inside"> #}
  1162.                                 {#                                        <div class="img" href="{{ url('dashboard') }}" style=" #}
  1163.                                 {#                                                background:url({{ absolute_url(path('dashboard')) }}condensed_assets/images/aamarpay_logo.png); #}
  1164.                                 {#                                                height: 50px !important; #}
  1165.                                 {#                                                width: 100%; #}
  1166.                                 {#                                                /* max-width: 30% !important; */ #}
  1167.                                 {#                                                background-position: center; #}
  1168.                                 {#                                                background-size: contain; #}
  1169.                                 {#                                                background-repeat: no-repeat; #}
  1170.                                 {#                                                "> #}
  1171.                                 {#                                        </div> #}
  1172.                                 {#                                        <h6 class="title" style="height: 2rem;">Card</h6> #}
  1173.                                 {#                                        #}{#                                            <p class="sub-title">&nbsp;</p> #}
  1174.                                 {#                                    </div> #}
  1175.                                 {#                                </div> #}
  1176.                             </div>
  1177. {#                            <h5 class=" ">Others</h5>#}
  1178.                             <div class="row clearfix ">
  1179.                                 <div class="box-selector  col-md-12 col-sm-6"
  1180.                                      data-id="promo"
  1181.                                      data-gen-class="">
  1182.                                     <div class="inside">
  1183.                                         <h6 class="title" style="height: 2rem;font-size: 14px;">Promo Code</h6>
  1184.                                         <input class="form-control    "
  1185.                                                data-id="promo" placeholder="Promo Code"
  1186.                                                data-gen-class="">
  1187.                                         <h6 class="title" style="height: 2rem;font-size: 14px;">&nbsp;</h6>
  1188.                                     </div>
  1189.                                 </div>
  1190.                             </div>
  1191.                         </div>
  1192.                         <div class="form-footer d-flex">
  1193.                             <button type="button" class="prevBtn" id="selectPurchaseModal_prevBtn">
  1194.                                 Previous
  1195.                             </button>
  1196.                             <button type="button" class="nextBtn" id="selectPurchaseModal_nextBtn">
  1197.                                 Next
  1198.                             </button>
  1199.                         </div>
  1200.                     </form>
  1201.                 </div>
  1202.             </div>
  1203.             {# <div class="modal-footer"> #}
  1204.             {# </div> #}
  1205.         </div>
  1206.     </div>
  1207. </div>
  1208. {% endif %}
  1209. {# some over riding css for buttons and stuffs #}
  1210. <!-- back to top btn -->
  1211. <a id="back-top"><i class="fas fa-chevron-up"></i></a>
  1212. <!-- back to top btn -->
  1213. <!-- Option 1: Bootstrap Bundle with Popper -->
  1214. {# <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" #}
  1215.         {#        integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" #}
  1216.         {#        crossorigin="anonymous"> #}
  1217.         {# </script> #}
  1218. {# temp start #}
  1219. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"
  1220.         integrity=""
  1221.         crossorigin="anonymous"></script>
  1222. {# temp end #}
  1223. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  1224. {# <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script> #}
  1225. <!-- jquery cdn -->
  1226. <script type="text/javascript"
  1227.         src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.13.3/js/standalone/selectize.min.js"></script>
  1228. <script type="text/javascript" src="{{ absolute_url(path('dashboard')) }}jqueryui/jquery.form.js"></script>
  1229. <!-- calender js -->
  1230. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/mini-event-calendar.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1231. <!-- countdown js -->
  1232. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/jquery.countdown.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1233. <!-- process circle js -->
  1234. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/progresscircle.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1235. <!-- custom js-->
  1236. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/main.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1237. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/imgProgress.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1238. <!-- owl carousel -->
  1239. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/owl.carousel.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1240. <!-- wow js -->
  1241. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/wow.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1242. {# <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/AppOffcanvas.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script> #}
  1243. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/moment.min.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1244. <script type="text/javascript" src="{{ absolute_url(path('dashboard')) }}alertify/lib/alertify.min.js"></script>
  1245. <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>
  1246. <script src="{{ absolute_url(path('dashboard')) }}js/jquery.translate.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1247. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/bindWithDelay.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1248. <script src="{{ absolute_url(path('dashboard')) }}buddybee_assets/js/generic.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1249. {% include '@Application/footer/activity_tracker_script.html.twig' %}
  1250. <script src="{{ absolute_url(path('dashboard')) }}js/language_pack.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1251. <script src="{{ absolute_url(path('dashboard')) }}condensed_assets/ifvisible.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  1252. <link rel="stylesheet" href="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/sweetalert/sweetalert.css">
  1253. <script src="{{ absolute_url(path('dashboard')) }}js/adminbsb/plugins/sweetalert/sweetalert.min.js"></script>
  1254. <link rel="stylesheet" href="{{ asset('css/cal_print.css') }}" media="print">
  1255. <script type="text/javascript"
  1256.         src="{{ absolute_url(path('dashboard')) }}buddybee_assets/plugin/fullcalendar3/fullcalendar.min.js"></script>
  1257. <script type="text/javascript"
  1258.         src="{{ absolute_url(path('dashboard')) }}buddybee_assets/plugin/fullcalendar3/scheduler/scheduler.min.js"></script>
  1259. <script type="text/javascript"
  1260.         src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js"></script>
  1261. <style>
  1262.     .btn {
  1263.         border-radius: 15rem;
  1264.     }
  1265.     .withdraw p,
  1266.     .sweet-alert button,
  1267.     .paymentMethodSelectorBtn p {
  1268.         border-radius: 42px;
  1269.     }
  1270. </style>
  1271. </body>
  1272. <script>
  1273.     var socketInitiated = 0;
  1274.     var offcanvasCalendarInitiated = 0;
  1275.     var offCalendarLastRefreshedTs = 0;
  1276.     var tb_pathToImage = "{{ absolute_url(path('dashboard'))~'buddybee_assets/images/circle-pending-image.png' }}";
  1277.     var buddybee_socket = '';
  1278.     var buddybee_socket_user_name = '{{ session[UserConstants.USER_NAME] is defined? session[UserConstants.USER_NAME]:'' }}';
  1279.     var buddybee_socket_user_id = 'BBEE_{{ session[UserConstants.USER_ID] is defined? session[UserConstants.USER_ID]:0 }}';
  1280.     var current_user_user_id = {{ session[UserConstants.USER_ID] is defined? session[UserConstants.USER_ID]:0 }};
  1281.     var buddybee_socket_user_session_token = '{{ session['token'] is defined? session['token']:'_GEN_' }}';
  1282.     {% set curr_route=app.request.attributes.get('_route') %}
  1283.     var CURRENT_ROUTE = '{{ curr_route }}';
  1284.     var deepLinkModalLastShown = window.localStorage.getItem('deepLinkModalLastShown');
  1285.     //    var deepLinkModalLastShown = 0;
  1286.     var currTsForDlM = {{ ''|date('U') }};
  1287.     if (deepLinkModalLastShown == 'null' || deepLinkModalLastShown == null) {
  1288.         deepLinkModalLastShown = 0
  1289.     }
  1290.     var upcomingMeetingDataForRedirect = window.localStorage.getItem('UNMData');
  1291.     var upcomingNextMeetingIdForRedirect = window.localStorage.getItem('UNMId');
  1292.     var upcomingNextMeetingTsForRedirect = window.localStorage.getItem('UNMTs');
  1293.     if (upcomingMeetingDataForRedirect == 'null' || upcomingMeetingDataForRedirect == null) {
  1294.         upcomingMeetingDataForRedirect = "[]"
  1295.     }
  1296.     if (upcomingNextMeetingIdForRedirect == 'null' || upcomingNextMeetingIdForRedirect == null) {
  1297.         upcomingNextMeetingIdForRedirect = 0
  1298.     }
  1299.     if (upcomingNextMeetingTsForRedirect == 'null' || upcomingNextMeetingTsForRedirect == null) {
  1300.         upcomingNextMeetingTsForRedirect = 0
  1301.     }
  1302.     upcomingMeetingDataForRedirect = JSON.parse(upcomingMeetingDataForRedirect);
  1303.     var deepLinkModal = new bootstrap.Modal(document.getElementById('deepLinkModal'), {
  1304.         keyboard: false
  1305.     });
  1306.     var bookNowModal = new bootstrap.Modal(document.getElementById('bookNowModal'), {
  1307.         keyboard: false
  1308.     });
  1309.     var promptForInfoModal = new bootstrap.Modal(document.getElementById('promptForInfoModal'), {
  1310.         keyboard: false
  1311.     });
  1312.     var selectPurchaseModal = new bootstrap.Modal(document.getElementById('selectPurchaseModal'), {
  1313.         keyboard: false
  1314.     });
  1315.     {% if not countries_data is defined %}
  1316.     {% set countries_data=''|getCountriesBuddyBee %}
  1317.     {% endif %}
  1318.     var countries_data ={{ countries_data|json_encode()|raw() }}
  1319.     var topic_data_by_id = {}
  1320.     var perSessionMinute = 20; // Current tab is set to be the first tab (0)
  1321.     var COIN_GENERAL_MULT = 100; // Current tab is set to be the first tab (0)
  1322.     var currentTab = 0; // Current tab is set to be the first tab (0)
  1323.     var currentTabSelectPurchaseModal = 0; // Current tab is set to be the first tab (0)
  1324.     var triggerRefreshUpcomingSession = 0; // Current tab is set to be the first tab (0)
  1325.     // promptInfo_showTab(currentTab); // Display the current tab
  1326.     {% if (session[UserConstants.USER_ID] is defined ) %}
  1327.     function refreshOffCanvasCalendar(force) {
  1328.         force = force || 0
  1329.         if (offcanvasCalendarInitiated == 0) {
  1330. //            alert('here')
  1331.             $('#calendarHere').fullCalendar({
  1332. //            $('#scheduleCalendar').fullCalendar({
  1333.                 schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
  1334.                 height: 554,
  1335. //            header: false,
  1336.                 header: {
  1337.                     left: 'today prev,next',
  1338.                     center: 'title',
  1339.                     right: 'timelineDay,timelineWeek,timelineMonth,timelineYear,month',
  1340.                 },
  1341.                 buttonText: {
  1342.                     month: 'calendar',
  1343.                     timelineMonth: 'month',
  1344.                 },
  1345.                 eventClick: function (calEvent, jsEvent, view) {
  1346.                     //    console.log(calEvent)
  1347.                     swal({
  1348.                         title: calEvent.title,
  1349.                         text: 'Meeting On ' + calEvent.topic_name + ' on ' + moment.unix(calEvent.scheduled_time_ts).format('MMM DD, YYYY HH:mm'),
  1350.                         type: "info",
  1351.                         showCancelButton: true,
  1352. //            confirmButtonColor: "#DD6B55",
  1353.                         confirmButtonText: "View!",
  1354.                         cancelButtonText: "Exit",
  1355.                         closeOnConfirm: false,
  1356.                         closeOnCancel: true,
  1357.                         timer: 10000,
  1358.                     }, function (isConfirm) {
  1359.                         if (isConfirm) {
  1360.                             {% if BUDDYBEE_ADMIN_LEVEL >=1 %}
  1361.                             window.location.href = '{{ path('consultancy_session') }}/' + calEvent.id + '?adminView=1'
  1362.                             {% else %}
  1363.                             window.location.href = '{{ path('consultancy_session') }}/' + calEvent.id + ''
  1364.                             {% endif %}
  1365.                             swal("Sweet!", "Taking you there. Please Wait", "success");
  1366.                         } else {
  1367. //                        swal("Oops", "You cannot do that!", "error");
  1368.                         }
  1369.                     });
  1370. //                alert('Event: ' + calEvent.title);
  1371. //                alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
  1372. //                alert('View: ' + view.name);
  1373. //
  1374. //                // change the border color just for fun
  1375. //                $(this).css('border-color', 'red');
  1376.                 },
  1377. //            themeSystem:'jquery-ui',
  1378.                 editable: true,
  1379.                 eventStartEditable: true,
  1380.                 eventDurationEditable: true,
  1381.                 droppable: true,
  1382.                 slotDuration: '00:30:00',
  1383.                 defaultView: 'month',
  1384.                 eventRender: function (eventObj, $el) {
  1385. //                $('#example').popover(options)
  1386.                     $el.popover({
  1387.                         title: eventObj.topic_name,
  1388.                         content: 'Meeting Between ' + eventObj.title + ' on ' + moment.unix(eventObj.scheduled_time_ts).format('MMM DD, YYYY HH:mm'),
  1389.                         trigger: 'hover',
  1390.                         placement: 'top',
  1391.                         container: 'body',
  1392.                         html: true,
  1393.                         template: '<div class="popover" role="tooltip">' +
  1394.                             '<div class="arrow">' +
  1395.                             '</div' +
  1396.                             '><h3 class="popover-header">' +
  1397.                             '</h3>' +
  1398.                             '<div class="popover-body">' +
  1399.                             '</div>' +
  1400.                             '<button class="btn btn-success">PIKA</button>' +
  1401.                             '</div>'
  1402.                     });
  1403.                 },
  1404. //            resourceAreaHeaderContent: 'Rooms',
  1405.                 resourceColumns: [
  1406.                     {
  1407.                         labelText: 'Schedule',
  1408.                         field: 'title'
  1409.                     }
  1410. //                {
  1411. //                    labelText: 'Occupancy',
  1412. //                    field: 'occupancy'
  1413. //                }
  1414.                 ],
  1415.                 resources: [],
  1416.                 views: {
  1417.                     basic: {
  1418.                         // options apply to basicWeek and basicDay views
  1419.                     },
  1420.                     agenda: {
  1421.                         slotDuration: '00:30:00',
  1422.                         // options apply to agendaWeek and agendaDay views
  1423.                     },
  1424.                     week: {
  1425.                         // options apply to basicWeek and agendaWeek views
  1426.                     },
  1427.                     day: {
  1428.                         // options apply to basicDay and agendaDay views
  1429.                     },
  1430.                     timelineWeek: {
  1431.                         groupByResource: true,
  1432.                         slotDuration: '00:30:00',
  1433.                         // options apply to basicDay and agendaDay views
  1434.                     }
  1435.                 },
  1436.                 drop: function (date, allDay) {
  1437.                     // this function is called when something is dropped
  1438.                     // retrieve the dropped element's stored Event Object
  1439.                     var originalEventObject = $(this).data('eventObject');
  1440.                     // we need to copy it, so that multiple events don't have a reference to the same object
  1441.                     var copiedEventObject = $.extend({}, originalEventObject);
  1442.                     // assign it the date that was reported
  1443.                     copiedEventObject.start = date;
  1444.                     copiedEventObject.allDay = allDay;
  1445.                     copiedEventObject.className = originalEventObject.className;
  1446.                     // render the event on the calendar
  1447.                     // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
  1448.                     $('#scheduleCalendar').fullCalendar('renderEvent', copiedEventObject, true);
  1449.                     // is the "remove after drop" checkbox checked?
  1450.                     if ($('#drop-remove').is(':checked')) {
  1451.                         // if so, remove the element from the "Draggable Events" list
  1452.                         $(this).remove();
  1453.                     }
  1454.                 },
  1455.                 events: [],
  1456.             });
  1457.             offcanvasCalendarInitiated = 1;
  1458.         }
  1459.         var currOpTs = moment().unix();
  1460.         if ((offCalendarLastRefreshedTs + 120) < currOpTs || force == 1) {
  1461.             var pika_ind_id = 'NNNAI';
  1462.             $.ajax({
  1463.                 url: BaseURL + "select_data_ajax_public",
  1464.                 type: 'POST',
  1465.                 dataType: 'json',
  1466.                 data: {
  1467.                     //returnJson: 1,     //required for CORS
  1468.                     //sessionData: sessionData   //required only if using cordova for CORS
  1469.                     query: '_EMPTY_',
  1470.                     tableName: "entity_meeting_session",
  1471.                     entity_group: 1,
  1472.                     valueField: "session_id",
  1473.                     textField: "meeting_room_id",
  1474. //                selectFieldList:[   ///skip this property for all fields
  1475. //                    'client_name','client_id','address'
  1476. //
  1477. //                ],
  1478.                     selectorId: 7,
  1479.                     isMultiple: 1,
  1480.                     itemLimit: '_ALL_',  // for all : '_ALL_'
  1481.                     offset: 0,  // default value:0 (from start)
  1482.                     orderByConditions: [  //sequential
  1483. //                    {
  1484. //                        field: 'rating',
  1485. //                        fieldValues: [5,1,9],
  1486. //                        sortType:'ASC'
  1487. //                    },
  1488. //                    {
  1489. //                        field: 'is_featured',
  1490. //                        sortType:'DESC'
  1491. //                    },
  1492.                         {
  1493.                             field: 'scheduled_time_ts',
  1494.                             sortType: 'ASC'
  1495.                         }
  1496.                     ],
  1497.                     dataId: pika_ind_id,
  1498. //                        textField: "rendered_text",
  1499. //
  1500. //                        renderTextFormat: "#__id__ __name__",
  1501. //                        andConditions: [
  1502. //                            //{type: "like", field: "name", value: query},
  1503. //                            {type: "=", field: "delivery_receipt_id", value: $('.dr_id' + pika_ind_id).val()},
  1504. //                            {type: "=", field: "product_id", value: $('.selectize_me_ssp' + pika_ind_id).val()},
  1505. //                            {type: "=", field: "position", value: 3}
  1506. //                        ],
  1507.                     mustConditions: [
  1508.                         //{type: "like", field: "name", value: query},
  1509.                         //{type: "=", field: "delivery_rceipt_id", value: $('.dr_id' + pika_ind_id).val()},
  1510.                         //{type: "in", field: "alottment_tagged", value: [0,'null','']},
  1511. //                            {type: "<=", field: "scheduled_time_ts", value: moment().add('60', 'days').unix()},
  1512.                         {type: ">=", field: "scheduled_time_ts", value: moment().subtract('45', 'days').unix()},
  1513. //                    {type: "=", field: "product_id", value: $('.ssp' + pika_ind_id).val()},
  1514. //                    {type: "=", field: "warehouse_id", value: $('#warehouseId').val()},
  1515. //                    {type: "=", field: "warehouse_action_id", value: $('.wa' + pika_ind_id).val()},
  1516. //                    {type: "=", field: "position", value: 1}
  1517.                     ],
  1518.                     andOrConditions: [
  1519.                         {% if BUDDYBEE_ADMIN_LEVEL>=5 %}
  1520.                         {% elseif BUDDYBEE_ADMIN_LEVEL >=1 %}
  1521.                         {# { #}
  1522.                         {# type: "in", #}
  1523.                         {# field: "is_admin", #}
  1524.                         {# value: [0, 'null'] #}
  1525.                         {# }, #}
  1526.                         {# { #}
  1527.                         {# type: "in", #}
  1528.                         {# field: "assigned_sales_representative_id", #}
  1529.                         {# value: [0, 'null',{{ session[UserConstants.USER_ID] }}] #}
  1530.                         {# }, #}
  1531.                         {% else %}
  1532.                         {type: "=", field: "student_id", value: {{ session[UserConstants.USER_ID] }}},
  1533.                         {type: "=", field: "consultant_id", value: {{ session[UserConstants.USER_ID] }}},
  1534.                         {% endif %}
  1535. //                    {type: "like", field: "client_numerical_code", value: query},
  1536. //                    {type: "like", field: "client_name", value: query},
  1537. //                    {type: "like", field: "client_id", value: query},
  1538. //                    {type: "like", field: "contact_number", value: query},
  1539. //                    {type: "like", field: "email", value: query},
  1540.                     ],
  1541.                     joinTableData: [
  1542.                         {
  1543.                             tableName: "entity_applicant_details",
  1544.                             joinFieldPrimary: "student_id",
  1545.                             joinOn: 'applicant_id',
  1546.                             selectPrefix: 'student_',
  1547.                             selectFieldList: [
  1548.                                 'firstname', 'lastname', 'image', 'professional_title'
  1549.                             ]
  1550.                         },
  1551.                         {
  1552.                             tableName: "entity_create_topic",
  1553.                             joinFieldPrimary: "topic_id",
  1554.                             joinOn: 'id',
  1555.                             selectPrefix: 'topic_',
  1556.                             selectFieldList: [
  1557.                                 'topic_name',
  1558.                             ]
  1559.                         },
  1560.                         {
  1561.                             tableName: "entity_applicant_details",
  1562.                             joinFieldPrimary: "consultant_id",
  1563.                             joinOn: 'applicant_id',
  1564.                             selectPrefix: 'consultant_',
  1565.                             selectFieldList: [
  1566.                                 'firstname', 'lastname', 'image', 'professional_title', 'current_country_id'
  1567.                             ]
  1568.                         },
  1569.                     ],
  1570.                     convertDateToStringFieldList: [
  1571.                         {field: 'created_at', format: 'U'}
  1572.                     ],
  1573.                     convertToObject: [
  1574. //                    'carton_product_by_code_ids','another'
  1575.                     ],
  1576.                     // setDataForSingle: 1,
  1577.                 },
  1578.                 error: function () {
  1579.                     // callback();
  1580.                 },
  1581.                 success: function (res) {
  1582.                     offCalendarLastRefreshedTs = moment().unix()
  1583. //                callback(res.data);
  1584.                     var str = '';
  1585.                     var currUnix = moment().unix();
  1586.                     var added_cntry_id = [];
  1587.                     var added_event_id = [];
  1588.                     $('#calendarHere').fullCalendar('addResource', {
  1589.                         id: 'cntry__OTHER_COUNTRIES_',
  1590. //                    parentId: 'a',
  1591.                         title: 'Others'
  1592.                     });
  1593.                     for (var t = 0; t < res.data.length; t++) {
  1594.                         var c_data = res.data[t];
  1595.                         if (c_data.consultant_current_country_id == '' || c_data.consultant_current_country_id == 0 || c_data.consultant_current_country_id == null)
  1596.                             c_data.consultant_current_country_id = '_OTHER_COUNTRIES_';
  1597. //                        //    console.log('added_cntry_id')
  1598. //                        //    console.log(added_cntry_id)
  1599.                         if (added_cntry_id.indexOf(c_data.consultant_current_country_id) != -1) {
  1600.                         } else {
  1601.                             $('#calendarHere').fullCalendar('addResource', {
  1602.                                 id: 'cntry_' + c_data.consultant_current_country_id,
  1603. //                            parentId: 'a',
  1604.                                 title: typeof countries_data[c_data.consultant_current_country_id] !== 'undefined' ? countries_data[c_data.consultant_current_country_id]['name'] : ''
  1605.                             });
  1606.                             added_cntry_id.push(c_data.consultant_current_country_id)
  1607.                         }
  1608.                         if (added_event_id.indexOf(c_data.consultant_id + '_' + c_data.student_id) != -1) {
  1609.                         } else {
  1610.                             $('#calendarHere').fullCalendar('addResource', {
  1611.                                 id: 'r_' + c_data.consultant_id + '_' + c_data.student_id,
  1612.                                 parentId: 'cntry_' + c_data.consultant_current_country_id,
  1613.                                 title: c_data.consultant_firstname + ' -- ' + c_data.student_firstname
  1614.                             });
  1615.                             added_event_id.push(c_data.consultant_id + '_' + c_data.student_id)
  1616.                         }
  1617.                         var eventColor = 'darkgreen';
  1618.                         var textColor = '#fff';
  1619.                         var endTimeMoment = moment.unix(c_data.scheduled_time_ts).add(c_data.duration_left_min, 'minutes');
  1620.                         if (currUnix < c_data.scheduled_time_ts) {
  1621.                             //upcoming
  1622.                             if (c_data.is_paid_full == 1)
  1623.                                 eventColor = '#fb7400';
  1624.                             else
  1625.                                 eventColor = '#d586a3';
  1626. //                        textColor='#212529';
  1627.                         } else if (currUnix < endTimeMoment.unix())
  1628.                             eventColor = '#1d5b9e';  //ongoing
  1629.                         else
  1630.                             eventColor = 'darkgreen';  //completed
  1631.                         var eventObj2 = {
  1632.                             id: c_data.session_id,
  1633.                             color: eventColor,
  1634.                             textColor: textColor,
  1635.                             resourceId: 'r_' + c_data.consultant_id + '_' + c_data.student_id,
  1636.                             title: c_data.consultant_firstname + ' -- ' + c_data.student_firstname,
  1637.                             consultant_id: c_data.consultant_id,
  1638.                             student_id: c_data.student_id,
  1639.                             meeting_room_id: c_data.meeting_room_id,
  1640.                             scheduled_time_ts: c_data.scheduled_time_ts,
  1641.                             topic_id: c_data.topic_id,
  1642.                             topic_name: c_data.topic_topic_name,
  1643.                             session_value: c_data.session_value,
  1644.                             consultant_firstname: c_data.consultant_firstname,
  1645.                             consultant_lastname: c_data.consultant_lastname,
  1646.                             student_firstname: c_data.student_firstname,
  1647.                             student_lastname: c_data.student_lastname,
  1648.                             start: moment.unix(c_data.scheduled_time_ts).add(0, 'days'),
  1649.                             end: endTimeMoment,
  1650.                             allDay: false
  1651.                         };
  1652. //                    eventArray.push(eventObj2)
  1653.                         $('#calendarHere').fullCalendar('renderEvent', eventObj2, true);
  1654.                     }
  1655.                 }
  1656.             });
  1657.         }
  1658.     }
  1659.     {% endif %}
  1660.     function stepShowTab(n, parentSelector) {
  1661.         // alert('here')
  1662.         // This function will display the specified tab of the form...
  1663.         parentSelector = parentSelector || '#selectPurchaseModal'
  1664.         var prevN = -1;
  1665.         $(parentSelector + ' .stepIndicator.active').each(function (gg, elem) {
  1666.             prevN = 1 * $(elem).data('seqId');
  1667.         });
  1668.         var newN = 0;
  1669.         if (n === '+1') {
  1670.             newN = (1 * prevN) + 1;
  1671.         } else if (n === '-1') {
  1672.             newN = (1 * prevN) - 1;
  1673.         } else
  1674.             newN = n;
  1675.         if (!$(parentSelector + ' .stepIndicator.seq_' + newN).length)
  1676.             newN = (1 * prevN);
  1677.         if (!$(parentSelector + ' .stepIndicator.seq_' + (newN + 1)).length)
  1678.             $(parentSelector + " .nextBtn").text('Confirm');
  1679.         else
  1680.             $(parentSelector + " .nextBtn").text('Next');
  1681.         if (!$(parentSelector + ' .stepIndicator.seq_' + (newN - 1)).length)
  1682.             $(parentSelector + " .prevBtn").hide();
  1683.         else
  1684.             $(parentSelector + " .prevBtn").show();
  1685.         // alert(prevN)
  1686.         // alert(newN)
  1687.         // alert($(parentSelector+' .stepIndicator.seq_'+(newN+1)).length)
  1688.         if (prevN == newN) {
  1689.             $(parentSelector).modal('hide')
  1690.             return false;
  1691.         }
  1692.         $(parentSelector + ' .stepIndicator').removeClass('active')
  1693.         $(parentSelector + ' .step').hide()
  1694.         $(parentSelector + '  .step.seq_' + newN).show()
  1695.         for (var gg = 0; gg <= newN; gg++)
  1696.             $(parentSelector + '  .stepIndicator.seq_' + gg).addClass('active')
  1697.         var triggerFunc = $(parentSelector + '  .step.seq_' + newN).attr('data-trigger-function');
  1698.         if (typeof triggerFunc !== 'undefined' && triggerFunc !== false) {
  1699.             window[triggerFunc]();
  1700.         }
  1701.     }
  1702.     function selectDataOnPurchaseModal(cntry_id, t_id, cons_id, sch_ids, additional_coins) {
  1703.         options = {
  1704.             countryId: 0,
  1705.             topicId: 0,
  1706.             consultantId: 0,
  1707.             scheduleIds: [],
  1708.         }
  1709.     }
  1710.     function submitPurchaseModalData() {
  1711.         var data = {}
  1712.     }
  1713.     function populateTopicListOnPurchaseModal(countryId, query) {
  1714.         var pika_ind_id = "_NA_";
  1715.         $('#selectPurchaseModal .topic_holder').empty();
  1716.         $.ajax({
  1717.             url: BaseURL + "select_data_ajax_public",
  1718.             type: 'POST',
  1719.             dataType: 'json',
  1720.             data: {
  1721.                 //returnJson: 1,
  1722.                 //sessionData: sessionData
  1723.                 query: query,
  1724.                 tableName: "entity_create_topic",
  1725.                 valueField: "id",
  1726.                 textField: "topic_name",
  1727.                 entity_group: 1,
  1728.                 selectorId: '_NA_',
  1729.                 isMultiple: 0,
  1730.                 dataId: pika_ind_id,
  1731. //                        isMultiple: 0,
  1732.                 //textField: "rendered_text",
  1733. //
  1734.                 //renderTextFormat: "#__id__ __name__",
  1735.                 andConditions: [],
  1736.                 andOrConditions: [],
  1737.                 mustConditions: [
  1738.                     {type: "=", field: "consultancy_enabled", value: 1},
  1739.                     {type: "=", field: "country_id", value: countryId},
  1740.                     {#                    {% if not curr_data is empty %} #}
  1741.                     {#                    {type: "in", field: "id", value: {{ curr_data|json_encode|raw() }} }, #}
  1742.                     {#                    {% else %} #}
  1743.                     {#                    {% if consultantDetails.isAdmin>0 %} #}
  1744.                     {#                    {type: "like", field: "topic_marker", value: '_support_ _report_to_admin_'}, #}
  1745.                     {#                    {% else %} #}
  1746.                     {#                    {type: "!=", field: "only_bookable_by_admin", value: '1'}, #}
  1747.                     {#                    {type: "not like", field: "topic_marker", value: '_support_'}, #}
  1748.                     {#                    {type: "not like", field: "topic_marker", value: '_report_to_admin_'}, #}
  1749.                     {#                    {% endif %} #}
  1750.                     {#                    {% endif %} #}
  1751.                 ],
  1752.                 convertToObject: [
  1753.                     'routine_data'
  1754.                 ],
  1755.                 skipDefaultCompanyId: 1
  1756.                 // setDataForSingle: 1,
  1757.             },
  1758.             error: function () {
  1759.                 // callback();
  1760.             },
  1761.             success: function (res) {
  1762.                 topic_data_by_id = res.dataById
  1763.                 for (var jj = 0; jj < res.data.length; jj++) {
  1764.                     var dt = res.data[jj];
  1765.                     var is_package = 0;
  1766.                     if (dt['topic_marker'] != null)
  1767.                         if (dt['topic_marker'].indexOf('_package_') !== -1)
  1768.                             is_package = 1;
  1769.                     var ggStr = ' <div class="box-selector tp_selector tp_' + dt['id'] + '  col-md-3 col-sm-6"' +
  1770.                         ' data-id="' + dt['id'] + '" ' +
  1771.                         ' data-gen-class="tp_selector" ' +
  1772.                         '>' +
  1773.                         '<div class="inside">' +
  1774.                         ' <div class="img"  style="' +
  1775.                         "background:url(' {{ absolute_url(path('dashboard')) }}" + dt['topic_image'] + "');" +
  1776.                         ' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' +
  1777.                         '<h6 class="title" style="height: 3rem; font-size:12px">' + dt['topic_name'] + '</h6> ' +
  1778.                         // '<p class="sub-title">'+dt['topic_summary']+'</p>' +
  1779.                         '<p class="sub-title" style="text-align:center;">' + (is_package == 1 ? 'Package' : (dt['meeting_type'] == 2 ? 'Offline Process' : 'Online Session')) + '</p>' +
  1780.                         // '<p class="sub-title">'+dt['topic_summary']+'</p>' +
  1781.                         '</div></div>';
  1782.                     $('#selectPurchaseModal .topic_holder').append(ggStr);
  1783.                 }
  1784.             }
  1785.         });
  1786.     }
  1787.     function populateConsultantListOnPurchaseModal(tpId, query) {
  1788.         var pika_ind_id = "_NA_";
  1789.         $('#selectPurchaseModal .cons_holder').empty();
  1790.         $.ajax({
  1791.             url: BaseURL + "select_data_ajax_public",
  1792.             type: 'POST',
  1793.             dataType: 'json',
  1794.             data: {
  1795.                 //returnJson: 1,
  1796.                 //sessionData: sessionData
  1797.                 query: query,
  1798.                 tableName: "entity_applicant_details",
  1799.                 valueField: "applicant_id",
  1800.                 textField: "firstname",
  1801.                 entity_group: 1,
  1802.                 selectorId: '_NA_',
  1803.                 isMultiple: 0,
  1804.                 dataId: pika_ind_id,
  1805. //                        isMultiple: 0,
  1806.                 //textField: "rendered_text",
  1807. //
  1808.                 //renderTextFormat: "#__id__ __name__",
  1809.                 andConditions: [],
  1810.                 andOrConditions: [
  1811.                     {type: "like", field: "preferred_topic_ids_as_consultant", value: '"' + tpId + '"'},
  1812.                     {type: "like", field: "preferred_topic_ids_as_consultant", value: '[]'},
  1813.                     // {type: "like", field: "preferred_topic_ids_as_consultant", value: ''},
  1814.                     // {type: "like", field: "preferred_topic_ids_as_consultant", value: 'null'},
  1815.                     {type: "=", field: "preferred_topic_ids_as_consultant", value: 'null'},
  1816.                 ],
  1817.                 mustConditions: [
  1818.                     {type: "=", field: "is_consultant", value: 1},
  1819.                     {#                    {% if not curr_data is empty %} #}
  1820.                     {#                    {type: "in", field: "id", value: {{ curr_data|json_encode|raw() }} }, #}
  1821.                     {#                    {% else %} #}
  1822.                     {#                    {% if consultantDetails.isAdmin>0 %} #}
  1823.                     {#                    {type: "like", field: "topic_marker", value: '_support_ _report_to_admin_'}, #}
  1824.                     {#                    {% else %} #}
  1825.                     {#                    {type: "!=", field: "only_bookable_by_admin", value: '1'}, #}
  1826.                     {#                    {type: "not like", field: "topic_marker", value: '_support_'}, #}
  1827.                     {#                    {type: "not like", field: "topic_marker", value: '_report_to_admin_'}, #}
  1828.                     {#                    {% endif %} #}
  1829.                     {#                    {% endif %} #}
  1830.                 ],
  1831.                 convertToObject: [
  1832.                     'routine_data'
  1833.                 ],
  1834.                 skipDefaultCompanyId: 1
  1835.                 // setDataForSingle: 1,
  1836.             },
  1837.             error: function () {
  1838.                 // callback();
  1839.             },
  1840.             success: function (res) {
  1841.                 // topic_data_by_id = res.dataById
  1842.                 for (var jj = 0; jj < res.data.length; jj++) {
  1843.                     var dt = res.data[jj];
  1844.                     var ggStr = ' <div class="box-selector cons_selector cons_' + dt['id'] + '  col-md-3 col-sm-6"' +
  1845.                         ' data-id="' + dt['applicant_id'] + '" ' +
  1846.                         ' data-gen-class="cons_selector" ' +
  1847.                         '>' +
  1848.                         '<div class="inside">' +
  1849.                         ' <div class="img"  style="' +
  1850.                         "background:url(' {{ absolute_url(path('dashboard')) }}" + dt['image'] + "');" +
  1851.                         ' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' +
  1852.                         '<h6 class="title" style="height: 2rem; font-size:12px">' + dt['firstname'] + ' ' + dt['lastname'] + '</h6> ' +
  1853.                         // '<p class="sub-title">'+dt['topic_summary']+'</p>' +
  1854.                         '</div></div>';
  1855.                     $('#selectPurchaseModal .cons_holder').append(ggStr);
  1856.                 }
  1857. //                        alert('pika master')
  1858.             }
  1859.         });
  1860.     }
  1861.     function populateScheduleListOnPurchaseModal(consId, durValue, query) {
  1862.         var pika_ind_id = "_NA_";
  1863.         // $('#selectPurchaseModal .sch_holder').empty();
  1864.         $('#selectPurchaseModal .sch_holder_month').empty();
  1865.         $('#selectPurchaseModal .sch_holder_day').empty();
  1866.         $('#selectPurchaseModal .sch_holder_time').empty();
  1867.         durValue = durValue || 30;
  1868.         var options = {
  1869.             '_NEXT_60_DAYS_': 1,
  1870. //                        '_THIS_DAY_':1,
  1871. //                        '_NEXT_DAYS_':20,
  1872.         }
  1873.         $.ajax({
  1874.             url: BaseURL + 'get_consultant_schedules',
  1875.             type: 'POST',
  1876.             dataType: 'json',
  1877.             data: {
  1878.                 consultantId: consId,
  1879.                 startDateStr: '@' + moment().unix(),
  1880. //                    endDateStr: $('#preferredScheduleDate').val() + ' 23:59:59 ' + moment().format("ZZ"),
  1881.                 endDateStr: '',
  1882.                 durationMin: durValue,
  1883.                 // durationMin: sessionDurationSelector.getValue() != '' ? perSessionMinute * sessionDurationSelector.getValue() : 90,
  1884.                 options: options,
  1885.                 returnJson: 1
  1886.             },
  1887.             error: function () {
  1888.                 // callback();
  1889.             },
  1890.             success: function (res) {
  1891.                 ;
  1892.                 // $('#').val(res.);
  1893.                 $('#selectPurchaseModal .view_if_has_schedules').hide();
  1894.                 if (res.success == true) {
  1895. ////                            for (var l = 0; l < res.sessionsArray.length; l++) {
  1896. ////                                $('#rescheduledSemesterSelector').append($("<option></option>").attr("value", res.sessionsArray[l].id).text(res.sessionsArray[l].name));
  1897. ////                            }
  1898.                     for (var jj = 0; jj < res.data.scheduleList.length; jj++) {
  1899.                         var sch_dt = res.data.scheduleList[jj];
  1900.                         var ggStr = ' <div class="box-selector sch_selector_time ' +
  1901.                             'sch_mon_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM') + ' ' +
  1902.                             'sch_day_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM_DD') + ' ' +
  1903.                             'sch_' + sch_dt['timeUnix'] + ' ' +
  1904.                             'sch_' + sch_dt['timeUnix'] + '  col-md-3 col-sm-6"' +
  1905.                             ' data-id="' + sch_dt['timeUnix'] + '" ' +
  1906.                             ' data-gen-class="sch_selector_time" ' +
  1907.                             '>' +
  1908.                             '<div class="inside">' +
  1909.                                 {# ' <div class="img"  style="' + #}
  1910.                                 {# "background:url(' {{ absolute_url(path('dashboard')) }}"+dt['image']+"');"+ #}
  1911.                                 {# ' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' + #}
  1912.                             '<h6 class="title" style="">' + (moment.unix(sch_dt['timeUnix']).format('HH:mm')) + '</h6> ' +
  1913.                             // '<p class="sub-title">'+dt['topic_summary']+'</p>' +
  1914.                             '</div></div>';
  1915.                         var ggStrday = ' <div class="box-selector sch_selector_day ' +
  1916.                             'sch_mon_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM') + ' ' +
  1917.                             'sch_day_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM_DD') + '  col-md-3 col-sm-6"' +
  1918.                             ' data-id="' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM_DD') + '" ' +
  1919.                             ' data-gen-class="sch_selector_day" ' +
  1920.                             '>' +
  1921.                             '<div class="inside">' +
  1922.                                 {# ' <div class="img"  style="' + #}
  1923.                                 {# "background:url(' {{ absolute_url(path('dashboard')) }}"+dt['image']+"');"+ #}
  1924.                                 {# ' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' + #}
  1925.                             '<h6 class="title" style="">' + (moment.unix(sch_dt['timeUnix']).format('DD')) + '</h6> ' +
  1926.                             // '<p class="sub-title">'+dt['topic_summary']+'</p>' +
  1927.                             '</div></div>';
  1928.                         var ggStrmon = ' <div class="box-selector sch_selector_mon ' +
  1929.                             'sch_mon_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM') + ' ' +
  1930.                             // 'sch_day'+moment.unix(sch_dt['timeUnix']).format('YYYY_MM')+' ' +
  1931.                             ' col-md-3 col-sm-6"' +
  1932.                             ' data-id="' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM') + '" ' +
  1933.                             ' data-gen-class="sch_selector_mon" ' +
  1934.                             '>' +
  1935.                             '<div class="inside">' +
  1936.                                 {# ' <div class="img"  style="' + #}
  1937.                                 {#    #}{# "background:url(' {{ absolute_url(path('dashboard')) }}"+dt['image']+"');"+ #}
  1938.                                 {# ' height: 50px !important;width: 100%;background-position: center;background-size: contain;background-repeat: no-repeat;"></div>' + #}
  1939.                             '<h6 class="title" style="">' + (moment.unix(sch_dt['timeUnix']).format('MMM')) + '</h6> ' +
  1940.                             // '<p class="sub-title">'+dt['topic_summary']+'</p>' +
  1941.                             '</div></div>';
  1942.                         if (!$('.sch_selector_mon.sch_mon_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM')).length)
  1943.                             $('#selectPurchaseModal .sch_holder_month').append(ggStrmon);
  1944.                         if (!$('.sch_selector_day.sch_day_' + moment.unix(sch_dt['timeUnix']).format('YYYY_MM_DD')).length)
  1945.                             $('#selectPurchaseModal .sch_holder_day').append(ggStrday);
  1946.                         $('#selectPurchaseModal .sch_holder_time').append(ggStr);
  1947.                     }
  1948.                     if (res.data.scheduleList.length > 0) {
  1949.                         $('#selectPurchaseModal h5.view_if_has_schedules').css('display', 'block');
  1950.                         $('#selectPurchaseModal p.view_if_has_schedules').css('display', 'block');
  1951.                         $('#selectPurchaseModal div.row.view_if_has_schedules').css('display', 'flex');
  1952.                     }
  1953.                     $('.sch_' + res.data.closestDateTs).trigger('click');
  1954. //                     rescheduledconsultancyScheduleSelector.clear();
  1955. //                     rescheduledconsultancyScheduleSelector.disable();
  1956. //                     rescheduledconsultancyScheduleSelector.clearOptions();
  1957. //                     rescheduledconsultancyScheduleSelector.load(function (callback) {
  1958. //
  1959. //                         rescheduledconsultancyScheduleSelector.enable();
  1960. //                         var modifiedList = [];
  1961. //                         for (var l = 0; l < res.data.scheduleList.length; l++) {
  1962. //                             var sch_dt = res.data.scheduleList[l];
  1963. //                             sch_dt['time_user_zone'] = moment.unix(sch_dt['timeUnix']).format('MMM DD, YYYY HH:mm');
  1964. // //                                sch_dt['time_user_zone']=sch_dt['time'];
  1965. //                             modifiedList.push(sch_dt);
  1966. //                         }
  1967. //
  1968. //
  1969. //                         callback(modifiedList);
  1970. //
  1971. //
  1972. //                     });
  1973. //                     rescheduledconsultancyScheduleSelector.setValue(res.data.closestDateTs)
  1974.                 } else {
  1975.                 }
  1976.             }
  1977.         });
  1978.     }
  1979.     function refreshRoutinePackageListOnPurchaseModal(t_id) {
  1980.         var dt = [];
  1981.         $('#selectPurchaseModal .routineTable tbody').empty();
  1982.         var topicIdForRoutine = t_id;
  1983.         // var sessionDurationSelectorValue=sessionDurationSelector.getValue();
  1984.         var sessionDurationSelectorValue = 100;
  1985.         // var scheduledTimeTsValue=consultancyScheduleSeletor.getValue();
  1986.         var scheduledTimeTsValue = moment().unix();
  1987.         if (typeof topic_data_by_id[topicIdForRoutine] !== 'undefined') {
  1988.             if (topic_data_by_id[topicIdForRoutine]['routine_data'].length) {
  1989.                 dt = topic_data_by_id[topicIdForRoutine]['routine_data'];
  1990.             } else {
  1991.                 dt = [
  1992.                     {
  1993.                         sequence: 1,
  1994.                         topicId: topicIdForRoutine,
  1995.                         topicName: topic_data_by_id[topicIdForRoutine]['topic_name'],
  1996.                         meetingType: topic_data_by_id[topicIdForRoutine]['meeting_type'],
  1997.                         duration: sessionDurationSelectorValue != '' ? (perSessionMinute * sessionDurationSelectorValue) / (COIN_GENERAL_MULT * 1) : 0,
  1998.                         offset: 0,
  1999.                         coins: sessionDurationSelectorValue != '' ? (1 * sessionDurationSelectorValue) : 0,
  2000.                         scheduledTimeTs: scheduledTimeTsValue != '' ? (1 * scheduledTimeTsValue) : 0,
  2001.                         nextSequenceStart: 0,
  2002.                         modifiable: 0,
  2003.                     }
  2004.                 ];
  2005.             }
  2006.         }
  2007.         for (var poi = 0; poi < dt.length; poi++) {
  2008.             var cc_pika = dt[poi];
  2009.             if (cc_pika['meetingType'] == 2) //offline
  2010.             {
  2011.                 $('#selectPurchaseModal .routineTable tbody').append(
  2012.                     '<tr>' +
  2013.                     '<td>' + cc_pika.topicName + '</td>' +
  2014.                     '<td style="text-align: left;"><b>Deliverable</b><br>' +
  2015.                     'Bee Coins: ' + cc_pika.coins + '<br>' +
  2016.                     (typeof cc_pika.scheduledDateTs !== 'undefined' ?
  2017.                             ('Lead Dt.<br>' + (cc_pika.scheduledTimeTs == 0 ? '' : moment.unix(cc_pika.scheduledDateTs).format('MMMM DD, YYYY HH:mm ZZ'))) :
  2018.                             ('')
  2019.                     ) +
  2020.                     '</td>' +
  2021.                     '<td>' +
  2022.                     '<input class="routineCoinNeeded" name="routine_coins[]" type="hidden" value="' + cc_pika.coins + '">' +
  2023.                     '<input class="routineTopicId" name="routine_topic_id[]" type="hidden" value="' + cc_pika.topicId + '">' +
  2024.                     (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>') +
  2025.                     // '<a class="icon-delete" href="javascript:void(0);"><i class="fa fa-times"></i></a>' +
  2026.                     '</td>' +
  2027.                     '</tr>'
  2028.                 )
  2029.             } else {
  2030.                 {
  2031.                     $('#selectPurchaseModal .routineTable tbody').append(
  2032.                         '<tr>' +
  2033.                         '<td>' + cc_pika.topicName + '</td>' +
  2034.                         '<td style="text-align: left;"><b>Online</b><br>' +
  2035.                         'Bee Coins: ' + cc_pika.coins + '<br>' +
  2036.                         'Duration: ' + cc_pika.duration + '<br>' +
  2037.                         (typeof cc_pika.scheduledTimeTs !== 'undefined' ?
  2038.                                 ('Scheduled Time: <br>' + (cc_pika.scheduledTimeTs == 0 ? '' : moment.unix(cc_pika.scheduledTimeTs).format('MMMM DD, YYYY HH:mm ZZ'))) :
  2039.                                 ('')
  2040.                         ) +
  2041.                         '</td>' +
  2042.                         '<td>' +
  2043.                         '<input class="routineCoinNeeded" name="routine_coins[]" type="hidden" value="' + cc_pika.coins + '">' +
  2044.                         '<input class="routineTopicId" name="routine_topic_id[]" type="hidden" value="' + cc_pika.topicId + '">' +
  2045.                         (typeof cc_pika.modifiable == 1 ? '<a class="icon-check isChecked modifiable" href="javascript:void(0);"><i class="fa fa-check"></i></a>' :
  2046.                             '<a class="icon-check isChecked " href="javascript:void(0);"><i class="fa fa-check"></i></a>') +
  2047.                         // '<a class="icon-delete"  href="javascript:void(0);"><i class="fa fa-check"></i></a>' +
  2048.                         // '<a class="icon-delete" href="javascript:void(0);"><i class="fa fa-times"></i></a>' +
  2049.                         '</td>' +
  2050.                         '</tr>'
  2051.                     )
  2052.                 }
  2053.             }
  2054.         }
  2055.         recalculateRoutinePackageOnPurchaseModal();
  2056.     }
  2057.     function recalculateRoutinePackageOnPurchaseModal() {
  2058.         var tot_coin = 0;
  2059.         $('#selectPurchaseModal .routineTable .icon-check').each(function (indy, elem) {
  2060.             if ($(elem).hasClass('isChecked'))
  2061.                 tot_coin += (1 * $('#selectPurchaseModal .routineTable .routineCoinNeeded').eq(indy).val())
  2062.         })
  2063.         $('#selectPurchaseModal .routineCoinNeededTotalInput').val(tot_coin)
  2064.         $('#selectPurchaseModal .routineCoinNeededTotalSpan').text(tot_coin)
  2065.     }
  2066.     function initiate_prompt_info_modal() {
  2067.         if ($('#promptForInfoModal #currentCountryIdPromptForInfo').length)
  2068.             $('#promptForInfoModal #currentCountryIdPromptForInfo').selectize({
  2069.                 placeholder: 'Select Your Current Country',
  2070. //            options: APTL.productListArray,
  2071.                 options: [],
  2072.                 valueField: 'value',
  2073.                 labelField: 'text',
  2074.                 preload: 'focus',
  2075.                 searchField: ['text', 'value'],
  2076. //            render: {
  2077. //                option: function (item, escape) {
  2078. //                    return '<div class="p-l-10 p-r-10">'
  2079. //                            + '<h6>' + escape(item[label_for_product]) + '</h6> '
  2080. //                            + '<span>Code:' + escape(item.productCode) + '</span> '
  2081. //                                //+ '<span>Name:'+item.name+'</span> '
  2082. //                                //+ '<span>DEBUG:'+item.score+'</span>'
  2083. //                            + '</div>';
  2084. //                }
  2085. //            },
  2086.                 onChange: function (value) {
  2087.                     if (!value) return;
  2088. //                productId = preliminary_reg_data_by_id[value]['product_id']
  2089. //                getbomData();
  2090. //
  2091.                 },
  2092.                 load: function (query, callback) {
  2093. //                        if (!query.length) return // callback();
  2094.                     if (!query.length) query = '_EMPTY_';
  2095.                     var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
  2096.                     $.ajax({
  2097.                         url: BaseURL + "select_data_ajax",
  2098.                         type: 'POST',
  2099.                         dataType: 'json',
  2100.                         data: {
  2101.                             //returnJson: 1,
  2102.                             //sessionData: sessionData
  2103.                             query: query,
  2104.                             tableName: "entity_countries",
  2105.                             valueField: "country_id",
  2106.                             textField: "name_en",
  2107.                             entity_group: 1,
  2108.                             selectorId: $($(this)[0].$input["0"]).attr('id'),
  2109.                             isMultiple: 0,
  2110.                             dataId: pika_ind_id,
  2111. //                        isMultiple: 0,
  2112.                             //textField: "rendered_text",
  2113. //
  2114.                             //renderTextFormat: "#__id__ __name__",
  2115.                             andConditions: [
  2116.                                 {type: "like", field: "name_en", value: query}
  2117.                             ],
  2118.                             mustConditions: [
  2119. //                            {type: "=", field: "approved", value: 1}
  2120.                             ],
  2121.                             convertToObject: [
  2122. //                            'accessories', 'issues'
  2123.                             ],
  2124.                             skipDefaultCompanyId: 1
  2125.                             // setDataForSingle: 1,
  2126.                         },
  2127.                         error: function () {
  2128.                             // callback();
  2129.                         },
  2130.                         success: function (res) {
  2131. //                        preliminary_reg_data_by_id = res.dataById
  2132.                             callback(res.data);
  2133.                             if (res.setValueArray.length != 0 && res.selectorId != '') {
  2134.                                 if (res.isMultiple == 1)
  2135.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
  2136.                                 else
  2137.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
  2138.                             }
  2139. //                        alert('pika master')
  2140.                         }
  2141.                     });
  2142.                 },
  2143.                 onLoad: function (data) {
  2144. //                //    console.log(data)
  2145. //                alert('here')
  2146.                     if (!data.length) return;
  2147. //                pbcs.open()
  2148.                     if (data.length == 1) {
  2149. //                    alert('hi')
  2150. //                    productionScheduleSelector.setValue(data[0].value)
  2151.                     }
  2152.                 }
  2153.             });
  2154.         if ($('#promptForInfoModal #preferredConsultancyTopicCountryIdsPromptForInfo').length)
  2155.             $('#promptForInfoModal #preferredConsultancyTopicCountryIdsPromptForInfo').selectize({
  2156.                 placeholder: 'Select Your Preferred Country',
  2157. //            options: APTL.productListArray,
  2158.                 options: [],
  2159.                 valueField: 'value',
  2160.                 labelField: 'text',
  2161.                 preload: 'focus',
  2162.                 searchField: ['text', 'value'],
  2163. //            render: {
  2164. //                option: function (item, escape) {
  2165. //                    return '<div class="p-l-10 p-r-10">'
  2166. //                            + '<h6>' + escape(item[label_for_product]) + '</h6> '
  2167. //                            + '<span>Code:' + escape(item.productCode) + '</span> '
  2168. //                                //+ '<span>Name:'+item.name+'</span> '
  2169. //                                //+ '<span>DEBUG:'+item.score+'</span>'
  2170. //                            + '</div>';
  2171. //                }
  2172. //            },
  2173.                 onChange: function (value) {
  2174.                     if (!value) return;
  2175. //                productId = preliminary_reg_data_by_id[value]['product_id']
  2176. //                getbomData();
  2177. //
  2178.                 },
  2179.                 load: function (query, callback) {
  2180. //                        if (!query.length) return // callback();
  2181.                     if (!query.length) query = '_EMPTY_';
  2182.                     var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
  2183.                     $.ajax({
  2184.                         url: BaseURL + "select_data_ajax",
  2185.                         type: 'POST',
  2186.                         dataType: 'json',
  2187.                         data: {
  2188.                             //returnJson: 1,
  2189.                             //sessionData: sessionData
  2190.                             query: query,
  2191.                             tableName: "entity_countries",
  2192.                             valueField: "country_id",
  2193.                             textField: "name_en",
  2194.                             entity_group: 1,
  2195.                             selectorId: $($(this)[0].$input["0"]).attr('id'),
  2196.                             isMultiple: 1,
  2197.                             dataId: pika_ind_id,
  2198. //                        isMultiple: 0,
  2199.                             //textField: "rendered_text",
  2200. //
  2201.                             //renderTextFormat: "#__id__ __name__",
  2202.                             andConditions: [
  2203.                                 {type: "like", field: "name_en", value: query}
  2204.                             ],
  2205.                             mustConditions: [
  2206. //                            {type: "=", field: "approved", value: 1}
  2207.                             ],
  2208.                             convertToObject: [
  2209. //                            'accessories', 'issues'
  2210.                             ],
  2211.                             skipDefaultCompanyId: 1
  2212.                             // setDataForSingle: 1,
  2213.                         },
  2214.                         error: function () {
  2215.                             // callback();
  2216.                         },
  2217.                         success: function (res) {
  2218. //                        preliminary_reg_data_by_id = res.dataById
  2219.                             callback(res.data);
  2220.                             if (res.setValueArray.length != 0 && res.selectorId != '') {
  2221.                                 if (res.isMultiple == 1)
  2222.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
  2223.                                 else
  2224.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
  2225.                             }
  2226. //                        alert('pika master')
  2227.                         }
  2228.                     });
  2229.                 },
  2230.                 onLoad: function (data) {
  2231. //                //    console.log(data)
  2232. //                alert('here')
  2233.                     if (!data.length) return;
  2234. //                pbcs.open()
  2235.                     if (data.length == 1) {
  2236. //                    alert('hi')
  2237. //                    productionScheduleSelector.setValue(data[0].value)
  2238.                     }
  2239.                 }
  2240.             });
  2241.         if ($('#promptForInfoModal #preferredTopicIdsAsStudentPromptForInfo').length)
  2242.             $('#promptForInfoModal #preferredTopicIdsAsStudentPromptForInfo').selectize({
  2243.                 placeholder: 'Preferred Topic Ids as Student',
  2244.                 multiple: true,
  2245. //            options: APTL.productListArray,
  2246.                 options: [],
  2247.                 valueField: 'value',
  2248.                 labelField: 'text',
  2249.                 preload: 'focus',
  2250.                 searchField: ['text', 'value'],
  2251. //            render: {
  2252. //                option: function (item, escape) {
  2253. //                    return '<div class="p-l-10 p-r-10">'
  2254. //                            + '<h6>' + escape(item[label_for_product]) + '</h6> '
  2255. //                            + '<span>Code:' + escape(item.productCode) + '</span> '
  2256. //                                //+ '<span>Name:'+item.name+'</span> '
  2257. //                                //+ '<span>DEBUG:'+item.score+'</span>'
  2258. //                            + '</div>';
  2259. //                }
  2260. //            },
  2261.                 onChange: function (value) {
  2262.                     if (!value) return;
  2263. //                productId = preliminary_reg_data_by_id[value]['product_id']
  2264. //                getbomData();
  2265. //
  2266.                 },
  2267.                 load: function (query, callback) {
  2268. //                        if (!query.length) return // callback();
  2269.                     if (!query.length) query = '_EMPTY_';
  2270.                     var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
  2271.                     $.ajax({
  2272.                         url: BaseURL + "select_data_ajax",
  2273.                         type: 'POST',
  2274.                         dataType: 'json',
  2275.                         data: {
  2276.                             //returnJson: 1,
  2277.                             //sessionData: sessionData
  2278.                             query: query,
  2279.                             tableName: "entity_create_topic",
  2280.                             valueField: "id",
  2281.                             textField: "topic_name",
  2282.                             entity_group: 1,
  2283.                             selectorId: $($(this)[0].$input["0"]).attr('id'),
  2284.                             isMultiple: 1,
  2285.                             dataId: pika_ind_id,
  2286. //                        isMultiple: 0,
  2287.                             //textField: "rendered_text",
  2288. //
  2289.                             //renderTextFormat: "#__id__ __name__",
  2290.                             andConditions: [
  2291.                                 {type: "like", field: "topic_name", value: query}
  2292.                             ],
  2293.                             mustConditions: [
  2294.                                 {type: "=", field: "consultancy_enabled", value: 1}
  2295.                             ],
  2296.                             convertToObject: [
  2297. //                            'accessories', 'issues'
  2298.                             ],
  2299.                             skipDefaultCompanyId: 1
  2300.                             // setDataForSingle: 1,
  2301.                         },
  2302.                         error: function () {
  2303.                             // callback();
  2304.                         },
  2305.                         success: function (res) {
  2306. //                        preliminary_reg_data_by_id = res.dataById
  2307.                             callback(res.data);
  2308.                             if (res.setValueArray.length != 0 && res.selectorId != '') {
  2309.                                 if (res.isMultiple == 1)
  2310.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
  2311.                                 else
  2312.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
  2313.                             }
  2314. //                        alert('pika master')
  2315.                         }
  2316.                     });
  2317.                 },
  2318.                 onLoad: function (data) {
  2319.                     //    console.log(data)
  2320. //                alert('here')
  2321.                     if (!data.length) return;
  2322. //                pbcs.open()
  2323.                     if (data.length == 1) {
  2324. //                    alert('hi')
  2325. //                    productionScheduleSelector.setValue(data[0].value)
  2326.                     }
  2327.                 }
  2328.             });
  2329.         if ($('#promptForInfoModal #preferredTopicIdsAsConsultantPromptForInfo').length)
  2330.             $('#promptForInfoModal #preferredTopicIdsAsConsultantPromptForInfo').selectize({
  2331.                 placeholder: 'Preferred Topic Ids as Consultant',
  2332.                 multiple: true,
  2333. //            options: APTL.productListArray,
  2334.                 options: [],
  2335.                 valueField: 'value',
  2336.                 labelField: 'text',
  2337.                 preload: 'focus',
  2338.                 searchField: ['text', 'value'],
  2339. //            render: {
  2340. //                option: function (item, escape) {
  2341. //                    return '<div class="p-l-10 p-r-10">'
  2342. //                            + '<h6>' + escape(item[label_for_product]) + '</h6> '
  2343. //                            + '<span>Code:' + escape(item.productCode) + '</span> '
  2344. //                                //+ '<span>Name:'+item.name+'</span> '
  2345. //                                //+ '<span>DEBUG:'+item.score+'</span>'
  2346. //                            + '</div>';
  2347. //                }
  2348. //            },
  2349.                 onChange: function (value) {
  2350.                     if (!value) return;
  2351. //                productId = preliminary_reg_data_by_id[value]['product_id']
  2352. //                getbomData();
  2353. //
  2354.                 },
  2355.                 load: function (query, callback) {
  2356. //                        if (!query.length) return // callback();
  2357.                     if (!query.length) query = '_EMPTY_';
  2358.                     var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
  2359.                     $.ajax({
  2360.                         url: BaseURL + "select_data_ajax",
  2361.                         type: 'POST',
  2362.                         dataType: 'json',
  2363.                         data: {
  2364.                             //returnJson: 1,
  2365.                             //sessionData: sessionData
  2366.                             query: query,
  2367.                             tableName: "entity_create_topic",
  2368.                             valueField: "id",
  2369.                             textField: "topic_name",
  2370.                             entity_group: 1,
  2371.                             selectorId: $($(this)[0].$input["0"]).attr('id'),
  2372.                             isMultiple: 1,
  2373.                             dataId: pika_ind_id,
  2374. //                        isMultiple: 0,
  2375.                             //textField: "rendered_text",
  2376. //
  2377.                             //renderTextFormat: "#__id__ __name__",
  2378.                             andConditions: [
  2379.                                 {type: "like", field: "topic_name", value: query}
  2380.                             ],
  2381.                             mustConditions: [
  2382.                                 {type: "=", field: "consultancy_enabled", value: 1}
  2383.                             ],
  2384.                             convertToObject: [
  2385. //                            'accessories', 'issues'
  2386.                             ],
  2387.                             skipDefaultCompanyId: 1
  2388.                             // setDataForSingle: 1,
  2389.                         },
  2390.                         error: function () {
  2391.                             // callback();
  2392.                         },
  2393.                         success: function (res) {
  2394. //                        preliminary_reg_data_by_id = res.dataById
  2395.                             callback(res.data);
  2396.                             if (res.setValueArray.length != 0 && res.selectorId != '') {
  2397.                                 if (res.isMultiple == 1)
  2398.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
  2399.                                 else
  2400.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
  2401.                             }
  2402. //                        alert('pika master')
  2403.                         }
  2404.                     });
  2405.                 },
  2406.                 onLoad: function (data) {
  2407.                     //    console.log(data)
  2408. //                alert('here')
  2409.                     if (!data.length) return;
  2410. //                pbcs.open()
  2411.                     if (data.length == 1) {
  2412. //                    alert('hi')
  2413. //                    productionScheduleSelector.setValue(data[0].value)
  2414.                     }
  2415.                 }
  2416.             });
  2417.         $('.promptForInfoAutoUpdateData').not('.selectize-control').change(function () {
  2418. //            //    console.log('* The text was changed');
  2419.             $.post('{{ url('update_inline_value') }}', {
  2420. //                        returnJson: 1,
  2421. //                        sessionData: sessionData
  2422.                 entityName: typeof $(this).data('entityName') !== 'undefined' ? $(this).data('entityName') : 'EntityApplicantDetails',
  2423.                 entityBundle: typeof $(this).data('entityBundle') !== 'undefined' ? $(this).data('entityBundle') : 'CompanyGroup',
  2424.                 setValue: $(this).val(),
  2425.                 relevantRequiredPromptField: $(this).data('relevantPromptField'),
  2426.                 clearRequiredPromptFlag: 1,
  2427.                 setMethod: $(this).data('setMethod'),
  2428.                 findField: typeof $(this).data('findField') !== 'undefined' ? $(this).data('findField') : 'applicantId',
  2429.                 findValue: typeof $(this).data('findValue') !== 'undefined' ? $(this).data('findValue') : '{{ session[UserConstants.USER_ID] is defined? session[UserConstants.USER_ID]:0 }}',
  2430.                 fieldType: typeof $(this).data('fieldType') !== 'undefined' ? $(this).data('fieldType') : '_TEXT_',
  2431.                 modifyTransDateFlag: typeof $(this).data('modifyTransDate') !== 'undefined' ? $(this).data('modifyTransDate') : 0,
  2432.                 {# findValue: {{ consultantDetails.applicantId }}, #}
  2433.             })
  2434.                 .done(function (data) {
  2435.                     //    console.log(data);
  2436. //                                if (data.success == true) {
  2437. //                                    swal({
  2438. //                                        title: "Sweet!",
  2439. //                                        text: "Updated",
  2440. //                                        imageUrl: BaseURL + "images/thumbs-up.png"
  2441. //                                    });
  2442. ////                                    alertify.success("Order Confirmation Done");
  2443. //
  2444. //
  2445. //                                } else {
  2446. //                                    swal({
  2447. //                                        title: "Sorry!",
  2448. //                                        text: "Your Action failed !",
  2449. //                                        imageUrl: BaseURL + "images/Bee_Sad_Emote.png"
  2450. //                                    });
  2451. ////                                    alertify.success("Order Confirmation Failed");
  2452. //
  2453. ////                            $('#barcode_selector_cont').waitMe('hide');
  2454. //
  2455. //                                }
  2456.                 })
  2457.                 .fail(function () {
  2458.                 });
  2459.         });
  2460.         document.getElementById('promptForInfoModal').addEventListener('hidden.bs.modal', function (event) {
  2461.             $('.promptForInfoAutoUpdateData').not('.selectize-control').trigger('change');
  2462.         })
  2463.         promptForInfoModal.show();
  2464.         promptInfo_showTab(currentTab); // Display the current tab
  2465.     }
  2466.     function promptInfo_showTab(n) {
  2467.         // This function will display the specified tab of the form...
  2468. //         stepShowTab(n,'#promptForInfoModal')
  2469. // retrunb false;
  2470.         $('#promptForInfoModal .step').eq(n).show();
  2471.         //... and fix the Previous/Next buttons:
  2472.         if (n == 0) {
  2473.             document.getElementById("promptForInfo_prevBtn").style.display = "none";
  2474.         } else {
  2475.             document.getElementById("promptForInfo_prevBtn").style.display = "inline";
  2476.         }
  2477.         if (n == ($('#promptForInfoModal .step').length - 1)) {
  2478.             document.getElementById("promptForInfo_nextBtn").innerHTML = "Finish";
  2479.         } else {
  2480.             document.getElementById("promptForInfo_nextBtn").innerHTML = "Next";
  2481.         }
  2482.         //... and run a function that will display the correct step indicator:
  2483.         $('#promptForInfoModal .stepIndicator').removeClass('active')
  2484.         for (var gg = 0; gg <= n; gg++)
  2485.             $('#promptForInfoModal .stepIndicator').eq(gg).addClass('active')
  2486.     }
  2487.     function promptInfo_nextPrev(n) {
  2488.         // Exit the function if any field in the current tab is invalid:
  2489.         if (n == 1 && !promptInfo_validateForm()) return false;
  2490.         $('#promptForInfoModal  .step').eq(currentTab).hide();
  2491.         // Increase or decrease the current tab by 1:
  2492.         currentTab = currentTab + n;
  2493.         // if you have reached the end of the form...
  2494.         if (currentTab >= $('#promptForInfoModal .step').length) {
  2495.             // ... the form gets submitted:
  2496.             // //    console.log($('#selectPurchaseModal .step'))
  2497.             // alert($('#selectPurchaseModal .step').length)
  2498. //            document.getElementById("signUpForm").submit();
  2499.             promptForInfoModal.hide();
  2500.             return false;
  2501.         }
  2502.         // Otherwise, display the correct tab:
  2503.         promptInfo_showTab(currentTab);
  2504.     }
  2505.     function promptInfo_validateForm() {
  2506.         // This function deals with validation of the form fields
  2507.         var x, y, i, valid = true;
  2508. //        x = document.getElementsByClassName("step");
  2509. //        y = x[currentTab].getElementsByTagName("input");
  2510. //
  2511. //
  2512. //
  2513. //
  2514. //        // A loop that checks every input field in the current tab:
  2515. //        for (i = 0; i < y.length; i++) {
  2516. //            // If a field is empty...
  2517. //            if (y[i].value == "") {
  2518. //                // add an "invalid" class to the field:
  2519. //                y[i].className += " invalid";
  2520. //                // and set the current valid status to false
  2521. //                valid = false;
  2522. //            }
  2523. //        }
  2524. //        // If the valid status is true, mark the step as finished and valid:
  2525. //        if (valid) {
  2526. //            document.getElementsByClassName("stepIndicator")[currentTab].className += " finish";
  2527. //        }
  2528.         $('#promptForInfoModal .step input').each(function (indumia, elemele) {
  2529.             if ($(elemele).hasClass('required') && $(elemele).val() == '') {
  2530.                 $(elemele).addClass('invalid')
  2531.                 valid = false;
  2532.             } else {
  2533.             }
  2534.         })
  2535.         if (valid) {
  2536.             $('#promptForInfoModal .stepIndicator').eq(currentTab).addClass('finish')
  2537. //            document.getElementsByClassName("stepIndicator")[currentTab].className += " finish";
  2538.         }
  2539.         return valid; // return the valid status
  2540.     }
  2541.     function promptInfo_fixStepIndicator(n) {
  2542.         // This function removes the "active" class of all steps...
  2543.         var i, x = document.getElementsByClassName("stepIndicator");
  2544.         for (i = 0; i < x.length; i++) {
  2545.             x[i].className = x[i].className.replace(" active", "");
  2546.         }
  2547.         //... and adds the "active" class on the current step:
  2548.         x[n].className += " active";
  2549.     }
  2550.     function addScript(src) {
  2551.         var s = document.createElement('script');
  2552.         s.type = 'text/javascript';
  2553.         s.src = src;
  2554.         document.getElementsByTagName('head')[0].appendChild(s);
  2555.         return s;  // to remove it later
  2556.     }
  2557.     {% if system_type=='_BUDDYBEE_' %}
  2558.     function checkAndRedirectToMeeting(force) {
  2559.         var curr_ts_now = moment().unix();
  2560. //        if(CURRENT_ROUTE=='consultancy_session' && force==0)
  2561. //        {
  2562. //            if(typeof currentMeetingSessionId !== 'undefined')
  2563. //            {
  2564. //                if(upcomingNextMeetingIdForRedirect==currentMeetingSessionId)
  2565. //                {
  2566. //                  return;
  2567. //                }
  2568. //
  2569. //            }
  2570. //
  2571. //        }
  2572.         if (upcomingNextMeetingTsForRedirect != 0) {
  2573.             if (curr_ts_now >= (upcomingNextMeetingTsForRedirect - 120))   //redirect before 2 min
  2574.             {
  2575.                 window.localStorage.setItem('UNMId', 0);
  2576.                 window.localStorage.setItem('UNMTs', 0);
  2577.                 window.location.href = "{{ url('consultancy_session') }}/" + upcomingNextMeetingIdForRedirect;
  2578.             }
  2579.         }
  2580.     }
  2581.     function refreshUpcomingMeetingList() {
  2582. //        //    console.log('_______________________TRIGGERED_______________________')
  2583.         if (current_user_user_id != 0) {
  2584.             $.ajax({
  2585.                 url: BaseURL + "select_data_ajax_public",
  2586.                 type: 'POST',
  2587.                 dataType: 'json',
  2588.                 data: {
  2589.                     //returnJson: 1,
  2590.                     //sessionData: sessionData
  2591.                     query: '',
  2592.                     tableName: "entity_meeting_session",
  2593.                     valueField: "session_id",
  2594. //                        textField: "topic_name",
  2595.                     entity_group: 1,
  2596.                     selectorId: '_NO_NEED_',
  2597.                     isMultiple: 0,
  2598.                     dataId: 0,
  2599. //                        isMultiple: 0,
  2600.                     textField: "session_id",
  2601. //
  2602.                     andOrConditions: [
  2603.                         {type: "=", field: "consultant_id", value: current_user_user_id},
  2604.                         {type: "=", field: "student_id", value: current_user_user_id}
  2605.                     ],
  2606.                     mustConditions: [
  2607. //                        {type: "=", field: "is_paid_full", value: 1},
  2608.                         {type: ">=", field: "scheduled_time_ts", value: moment().unix()},
  2609.                         {# {% if not curr_data is empty %} #}
  2610. //                            {type: "!=", field: "applicant_id", value: $('#rescheduledStudentId').val()}
  2611.                         {# {% endif %} #}
  2612.                     ],
  2613.                     orderByConditions: [
  2614.                         {
  2615.                             field: 'scheduled_time_ts',
  2616.                             sortType: 'ASC'
  2617.                         }
  2618.                         {# {% if not curr_data is empty %} #}
  2619. //                            {type: "!=", field: "applicant_id", value: $('#rescheduledStudentId').val()}
  2620.                         {# {% endif %} #}
  2621.                     ],
  2622.                     convertToObject: [
  2623. //                            'accessories', 'issues'
  2624.                     ],
  2625.                     skipDefaultCompanyId: 1
  2626.                     // setDataForSingle: 1,
  2627.                 },
  2628.                 error: function () {
  2629.                     // callback();
  2630.                 },
  2631.                 success: function (res) {
  2632. //                        preliminary_reg_data_by_id = res.dataById
  2633.                     upcomingNextMeetingIdForRedirect = 0;
  2634.                     upcomingNextMeetingTsForRedirect = 0;
  2635.                     upcomingMeetingDataForRedirect = [];
  2636.                     for (var bogu = 0; bogu < res.data.length; bogu++) {
  2637.                         if (res.data[bogu].is_paid_full == 1) {
  2638.                             upcomingMeetingDataForRedirect.push({
  2639.                                 id: res.data[bogu].session_id,
  2640.                                 ts: res.data[bogu].scheduled_time_ts,
  2641.                             })
  2642.                         }
  2643.                     }
  2644.                     if (upcomingMeetingDataForRedirect.length != 0) {
  2645.                         upcomingNextMeetingIdForRedirect = upcomingMeetingDataForRedirect[0]['id'];
  2646.                         upcomingNextMeetingTsForRedirect = upcomingMeetingDataForRedirect[0]['ts'];
  2647.                     }
  2648.                     if (typeof refresh_upcoming_meeting_on_dashboard !== 'undefined')
  2649.                         refresh_upcoming_meeting_on_dashboard(res.data);
  2650. //                    if(CURRENT_ROUTE=='consultancy_session')
  2651. //                    {
  2652. //                        if(typeof currentMeetingSessionId !== 'undefined')
  2653. //                        {
  2654. //                            if(upcomingNextMeetingIdForRedirect==currentMeetingSessionId)
  2655. //                            {
  2656. //                                clearInterval(triggerRefreshUpcomingSession);
  2657. //                            }
  2658. //                            else
  2659. //                                checkAndRedirectToMeeting(0);
  2660. //
  2661. //                        }
  2662. //                        else
  2663. //                            checkAndRedirectToMeeting(0);
  2664. //
  2665. ////                        clearInterval(triggerRefreshUpcomingSession);
  2666. //
  2667. //                    }
  2668. //                    else
  2669.                     checkAndRedirectToMeeting(0);
  2670.                 }
  2671.             });
  2672.         }
  2673.     }
  2674.     function triggerRefreshUpcomingMeetingList(intervalHere) {
  2675.         if (current_user_user_id != 0) {
  2676.             triggerRefreshUpcomingSession = setInterval(function () {
  2677.                 refreshUpcomingMeetingList();
  2678.                 //seconds
  2679.             }, intervalHere)
  2680.         }
  2681.     }
  2682.     {% endif %}
  2683. </script>
  2684. {% if constant('ApplicationBundle\\Constants\\GeneralConstant::BUDDYBEE_SOCKET_ENABLED')==1 %}
  2685.     {# now check softone #}
  2686.     {# {% if notification_enabled==1 %} #}
  2687.     {% if session[UserConstants.USER_ID] is defined %}
  2688.         {% set buddybee_socket_server=constant('ApplicationBundle\\Constants\\GeneralConstant::BUDDYBEE_SOCKET_SERVER') %}
  2689.         {% set buddybee_socket_server_full = 'https://'~buddybee_socket_server %}
  2690.         {% if 'localhost:' in buddybee_socket_server %}
  2691.             {% set buddybee_socket_server_full = url_wo_port ~':'~ buddybee_socket_server|split('localhost:')[1] %}
  2692.         {% else %}
  2693.             {% set buddybee_socket_server_full = 'https://'~buddybee_socket_server %}
  2694.         {% endif %}
  2695.         {# <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> #}
  2696.         {# <script type="text/javascript" src="{{ buddybee_socket_server_full }}/socket.io/socket.io.js"></script> #}
  2697.         <script type="text/javascript">
  2698.             var buddybeeKeepAliveCall = {};
  2699.             var lastActivityTs = 0;
  2700.             function refreshKeepAliveCall() {
  2701.                 buddybeeKeepAliveCall = setInterval(function () {
  2702.                     var nowTs = moment().unix(),
  2703.                         differenceFromStartTime = meetingStartTime.diff(now), // 86400000;
  2704.                         differenceFromEndTime = meetingEndTime.diff(now); // 86400000;
  2705.                     if (nowTs - lastActivityTs > 60) {
  2706.                         clearInterval(buddybeeKeepAliveCall);
  2707.                     } else {
  2708.                         buddybee_socket.emit('update_my_socket', {
  2709.                             userId: buddybee_socket_user_id,
  2710.                             token: buddybee_socket_user_session_token,
  2711.                         });
  2712.                     }
  2713.                     //seconds
  2714.                 }, 30000)
  2715.             }
  2716.             // //    console.log(io)
  2717.             function initiateBuddybeeSocket() {
  2718.                 lastActivityTs = moment().unix();
  2719.                 $.getScript('{{ buddybee_socket_server_full }}/socket.io/socket.io.js', function () {
  2720.                     {# $.getScript('{{ absolute_url(path('dashboard')) }}buddybee_assets/js/socket-io.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}', function () { #}
  2721.                     if (io) {
  2722.                         {# socket=io.connect( '{{ constant('ApplicationBundle\\Constants\\GeneralConstant::NOTIFICATION_SERVER') }}' ); #}
  2723.                         buddybee_socket = io.connect('{{ buddybee_socket_server_full }}');
  2724.                         buddybee_socket.emit('update_my_socket', {
  2725.                             userId: buddybee_socket_user_id,
  2726.                             token: buddybee_socket_user_session_token,
  2727.                             user_status: '_ON_',
  2728.                             force_broadcast: 1,
  2729.                         });
  2730. //                        buddybee_socket.on('_SEND_TEXT_TO_MOBILE_', function (dataObj) {
  2731. //                            //    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_')
  2732. //                            //    console.log(dataObj)
  2733. //
  2734. //
  2735. //                        });
  2736.                         addScript("{{ absolute_url(path('dashboard')) }}buddybee_assets/js/generic_buddybee_sockets.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}")
  2737.                         {% if curr_route =='consultancy_session' or  curr_route =='_nothing_new_' %}
  2738.                         {% else %}
  2739.                         ifvisible.setIdleDuration(120);
  2740.                         ifvisible.onEvery(30, function () {
  2741. //                            //    console.log('not idle')
  2742.                             buddybee_socket.emit('update_my_socket', {
  2743.                                 userId: buddybee_socket_user_id,
  2744.                                 token: buddybee_socket_user_session_token,
  2745.                             });
  2746.                         });
  2747. //                        ifvisible.onEvery(300, function () {
  2748. ////                            //    console.log('not idle')
  2749. //                            buddybee_socket.emit('update_my_socket', {
  2750. //                                userId: buddybee_socket_user_id,
  2751. //                                token: buddybee_socket_user_session_token,
  2752. //                            });
  2753. //                        });
  2754.                         ifvisible.idle(function () {
  2755.                             document.body.style.opacity = 0.5;
  2756.                             buddybee_socket.emit('update_my_socket', {
  2757.                                 userId: buddybee_socket_user_id,
  2758.                                 token: buddybee_socket_user_session_token,
  2759.                                 user_status: '_AWAY_',
  2760.                                 force_broadcast: 1,
  2761.                             });
  2762.                         });
  2763.                         ifvisible.wakeup(function () {
  2764.                             document.body.style.opacity = 1;
  2765.                             buddybee_socket.emit('update_my_socket', {
  2766.                                 userId: buddybee_socket_user_id,
  2767.                                 token: buddybee_socket_user_session_token,
  2768.                                 user_status: '_ON_',
  2769.                                 force_broadcast: 1,
  2770.                             });
  2771.                         });
  2772.                         {% endif %}
  2773.                         // buddybee_socket.emit('update_my_socket', {
  2774.                         //     userId: buddybee_socket_user_id,
  2775.                         //     token: buddybee_socket_user_session_token,
  2776.                         // });
  2777.                         if (typeof pageSocketInit !== 'undefined')
  2778.                             pageSocketInit();
  2779.                         buddybee_socket.on('user_status_update', function (dataObj) {
  2780.                             //    console.log(dataObj)
  2781.                         });
  2782.                         buddybee_socket.on('_SOCKET_NOTIFICATION_HERE_', function (dataObj) {
  2783.                             if (typeof dataObj.targetRoute !== 'undefined') {
  2784.                                 if (dataObj.targetRoute == 'consultancy_session')
  2785.                                     refreshUpcomingMeetingList();
  2786.                             }
  2787.                             //    console.log(dataObj)
  2788.                         });
  2789.                         buddybee_socket.on('refresh_upcoming_meeting_list', function (dataObj) {
  2790.                             refreshUpcomingMeetingList();
  2791.                             //    console.log(dataObj)
  2792.                         });
  2793.                         //    console.log(buddybee_socket);
  2794.                     }
  2795.                 });
  2796.             }
  2797.         </script>
  2798.         {# <script src="{{ absolute_url(path('dashboard')) }}js/inno_notify.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script> #}
  2799.     {% endif %}
  2800.     {# {% endif %} #}
  2801. {% endif %}
  2802. <script>
  2803.     var honeybeeLocale = 'en';
  2804.     jQuery.browser = {
  2805.         msie: false,
  2806. //        version: 0
  2807.     };
  2808.     function check_filters_default() {
  2809. //                    alert("here")
  2810.         $('.filter_this').hide()
  2811.         $('.filter_with_this').each(function () {
  2812. //            alert($(this).attr('id'))
  2813. //            alert($(this).val())
  2814.             if ($(this).attr('type') == 'checkbox' && $(this).prop('checked') == false)
  2815.                 return;
  2816.             if ($(this).attr('type') == 'radio' && $(this).is(':checked') == false)
  2817.                 return;
  2818.             var selector_name = '.filter_' + ($(this).attr('id')) + '_' + $(this).val();
  2819. //                        alert(selector_name)
  2820.             $(selector_name).show()
  2821.         })
  2822.     }
  2823.     var userAgent = navigator.userAgent || navigator.vendor || window.opera;
  2824.     $(document).ready(function () {
  2825.         {% if session['triggerPromptInfoModalFlag'] is defined %}
  2826.         {% if session['triggerPromptInfoModalFlag'] == 1 %}
  2827.         initiate_prompt_info_modal();
  2828.         {% endif %}
  2829.         {% endif %}
  2830.         {% if app.session.get('devAdminMode') ==1 %}
  2831.         {% endif %}
  2832.         $('.book_now_cta').click(function (ev) {
  2833.             ev.preventDefault();
  2834.             selectPurchaseModal.show();
  2835.         })
  2836.         stepShowTab(currentTabSelectPurchaseModal, '#selectPurchaseModal')
  2837.         $(document).on('click', '#selectPurchaseModal .routineTable tbody .icon-check.modifiable', function () {
  2838.             if ($(this).hasClass('isChecked'))
  2839.                 $(this).removeClass('isChecked');
  2840.             else
  2841.                 $(this).addClass('isChecked')
  2842.             recalculateRoutinePackageOnPurchaseModal();
  2843.         })
  2844.         $(document).on('click', '.offCanvasCalendarTrigger', function () {
  2845.             refreshOffCanvasCalendar()
  2846.         })
  2847.         $(document).on('click', '.box-selector', function () {
  2848.             $('.' + $(this).data('genClass')).removeClass('active')
  2849.             $(this).addClass('active')
  2850.         })
  2851.         $(document).on('click', '#selectPurchaseModal .prevBtn', function () {
  2852.             //validate action here
  2853.             // if (!validateForm()) return false;
  2854.             stepShowTab('-1', '#selectPurchaseModal')
  2855.         })
  2856.         $(document).on('click', '#selectPurchaseModal .stepIndicator', function () {
  2857.             //validate action here
  2858.             // if (!validateForm()) return false;
  2859.             stepShowTab($(this).data('seqId'), '#selectPurchaseModal')
  2860.         })
  2861.         $(document).on('click', '#selectPurchaseModal .nextBtn', function () {
  2862.             //validate action here
  2863.             // if (!validateForm()) return false;
  2864.             stepShowTab('+1', '#selectPurchaseModal')
  2865.         })
  2866.         $(document).on('click', '#selectPurchaseModal .cn_selector', function () {
  2867.             populateTopicListOnPurchaseModal($(this).data('id'));
  2868.             stepShowTab('+1', '#selectPurchaseModal')
  2869.             if ($('.box-selector.cn_selector.active').length)
  2870.                 $('.cntry_p span').text($('.box-selector.cn_selector.active .title').text())
  2871.         })
  2872.         $(document).on('click', '#selectPurchaseModal .tp_selector', function () {
  2873.             refreshRoutinePackageListOnPurchaseModal($(this).data('id'));
  2874.             populateConsultantListOnPurchaseModal($(this).data('id'));
  2875.             stepShowTab('+1', '#selectPurchaseModal');
  2876.             if ($('.box-selector.tp_selector.active').length)
  2877.                 $('.topic_p span').text($('.box-selector.tp_selector.active .title').text() + ' ( ' + $('.box-selector.tp_selector.active .sub-title').text() + ' )')
  2878.         })
  2879.         $(document).on('click', '#selectPurchaseModal .cons_selector', function () {
  2880.             populateScheduleListOnPurchaseModal($(this).data('id'));
  2881.             stepShowTab('+1', '#selectPurchaseModal')
  2882.             if ($('.box-selector.cons_selector.active').length)
  2883.                 $('.cons_p span').text($('.box-selector.cons_selector.active .title').text())
  2884.         })
  2885.         $(document).on('click', '#selectPurchaseModal .sch_selector_mon', function () {
  2886.             $('#selectPurchaseModal .sch_selector_day').hide();
  2887.             // alert($(this).data('id'))
  2888.             $('#selectPurchaseModal .sch_selector_day.sch_mon_' + $(this).data('id')).show();
  2889.             // populateScheduleListOnPurchaseModal($(this).data('id'));
  2890.             // stepShowTab('+1','#selectPurchaseModal')
  2891.         })
  2892.         $(document).on('click', '#selectPurchaseModal .sch_selector_day', function () {
  2893.             $('#selectPurchaseModal .sch_selector_time').hide();
  2894.             $('#selectPurchaseModal .sch_selector_time.sch_day_' + $(this).data('id')).show();
  2895.             // populateScheduleListOnPurchaseModal($(this).data('id'));
  2896.             // stepShowTab('+1','#selectPurchaseModal')
  2897.         })
  2898.         $(document).on('click', '#selectPurchaseModal .sch_selector_time', function () {
  2899.             // alert('here')
  2900.             $('#selectPurchaseModal .sch_selector_mon.sch_mon_' + moment.unix($(this).data('id')).format('YYYY_MM')).trigger('click');
  2901.             $('#selectPurchaseModal .sch_selector_day.sch_day_' + moment.unix($(this).data('id')).format('YYYY_MM_DD')).trigger('click');
  2902.         })
  2903.         if (CURRENT_ROUTE == 'consultancy_session') {
  2904. //            if (typeof currentMeetingSessionId !== 'undefined') {
  2905. //                if (upcomingNextMeetingIdForRedirect == currentMeetingSessionId) {
  2906. //                    clearInterval(triggerRefreshUpcomingSession);
  2907. //                }
  2908. //                else
  2909. //                    checkAndRedirectToMeeting(0);
  2910. //
  2911. //            }
  2912. //            else
  2913. //                checkAndRedirectToMeeting(0);
  2914. //                        clearInterval(triggerRefreshUpcomingSession);
  2915.         } else
  2916.             setTimeout(function () {
  2917.                 refreshUpcomingMeetingList();
  2918.                 triggerRefreshUpcomingMeetingList(60000);
  2919.             }, 20000);
  2920.         // Windows Phone must come first because its UA also contains "Android"
  2921.         // alert(userAgent);
  2922.         if ((currTsForDlM - deepLinkModalLastShown) > (3600 * 24)) {
  2923.             // alert('in DLM');
  2924.             if (/windows phone/i.test(userAgent)) {
  2925. //                alert("Android");
  2926.                 $('.deep_link_choice').hide();
  2927.                 $('.deep_link_choice._AND_').show();
  2928.                 // $('.deep_link_choice._IPHONE_').show();
  2929.                 $('.deep_link_choice._BROWSER_').show();
  2930.                 deepLinkModal.show()
  2931.             }
  2932.             if (/Android/i.test(userAgent)) {
  2933. //                alert("Android");
  2934.                 $('.deep_link_choice').hide();
  2935.                 $('.deep_link_choice._AND_').show();
  2936.                 // $('.deep_link_choice._IPHONE_').show();
  2937.                 $('.deep_link_choice._BROWSER_').show();
  2938.                 deepLinkModal.show()
  2939.             }
  2940.             // iOS detection from: http://stackoverflow.com/a/9039885/177710
  2941.             if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
  2942. //                alert("iOS");
  2943.                 $('.deep_link_choice').hide();
  2944.                 // $('.deep_link_choice._AND_').show();
  2945.                 $('.deep_link_choice._IPHONE_').show();
  2946.                 $('.deep_link_choice._BROWSER_').show();
  2947.                 deepLinkModal.show()
  2948.             }
  2949.             window.localStorage.setItem('deepLinkModalLastShown', currTsForDlM)
  2950.         }
  2951.         // deepLinkModal.show()
  2952.         $('#buddybee_preloader').fadeOut('slow', function () {
  2953.             $(this).remove();
  2954.         });
  2955.         if (typeof initiateOtpModal !== 'undefined') {
  2956. //            initiateOtpModal()
  2957.         }
  2958.         {% if system_type=='_BUDDYBEE_' %}
  2959.         $(document).on('click', 'a', function (e) {
  2960.             if ($(this).attr('href') == '{{ url('under_construction') }}') {
  2961.                 e.preventDefault();
  2962.                 swal({
  2963.                     title: "Oh Snap!",
  2964.                     type: 'warning',
  2965.                     text: "This page is Under Construction.",
  2966.                     timer: 3000,
  2967.                     showConfirmButton: false
  2968.                 });
  2969.             }
  2970.             if ($(this).attr('href') == '{{ url('user_logout') }}') {
  2971. //                e.preventDefault();
  2972.                 if (buddybee_socket != '') {
  2973.                     buddybee_socket.emit('update_my_socket', {
  2974.                         userId: buddybee_socket_user_id,
  2975.                         user_status: '_OFF_',
  2976.                         force_broadcast: 1,
  2977.                     });
  2978.                 }
  2979.             }
  2980.         });
  2981.         {% endif %}
  2982.         $(document).on('click', '.admin-menu-toggler', function (e) {
  2983.             $('.buddybee_admin_sidebar').toggle()
  2984.         })
  2985.         $(document).on('click', 'a.book_now_cta', function (e) {
  2986. //            e.preventDefault();
  2987. //            bookNowModal.show()
  2988.         })
  2989.         $(document).on('change', '.filter_with_this', function () {
  2990.             check_filters_default()
  2991.         })
  2992.         $(document).on('click', '.btn_deep_link_selector', function () {
  2993.             if ($(this).attr('data-deeplink-choice') == '_AND_')
  2994.                 window.location.href = "https://play.google.com/store/apps/details?id=eu.buddybee.consultancy";
  2995.             // deepLinkModal.hide()
  2996.         })
  2997.         check_filters_default();
  2998.         $('#currentClientTime').val(moment().format('YYYY-MM-DD HH:mm:ss'))
  2999.         {% if constant('ApplicationBundle\\Constants\\GeneralConstant::BUDDYBEE_SOCKET_ENABLED')==1 %}
  3000.         {# now check softone #}
  3001.         {# {% if notification_enabled==1 %} #}
  3002.         {% if session[UserConstants.USER_ID] is defined %}
  3003.         initiateBuddybeeSocket();
  3004.         {% endif %}
  3005.         {% endif %}
  3006.         $('.schedule_date_picker').not('.datepicker').bootstrapMaterialDatePicker({
  3007.             format: 'MMMM DD, YYYY',
  3008.             clearButton: true,
  3009.             weekStart: 6,
  3010.             time: false,
  3011.             switchOnClick: true,
  3012.             monthPicker: true
  3013.             // format: 'HH:mm',
  3014.             // clearButton: true,
  3015.             // date: false,
  3016.             // switchOnClick:true
  3017.         });
  3018.         $('.schedule_date_time_picker').not('.datepicker').bootstrapMaterialDatePicker({
  3019.             //format: 'dddd DD MMMM YYYY',
  3020.             // format: ' HH:mm',
  3021.             // clearButton: true,
  3022.             // weekStart: 6,
  3023.             // time: true,
  3024.             // switchOnClick: true,
  3025.             // monthPicker: false
  3026.             format: 'HH:mm',
  3027.             clearButton: true,
  3028.             date: false,
  3029.             switchOnClick: true
  3030.         });
  3031.         {# alert('{{ curr_route }}') #}
  3032.         {% if curr_route=='applicant_dashboard' or  curr_route=='dashboard' or curr_route=='consultant_dashboard' or curr_route=='buddybee_admin_dashboard' %}
  3033.         {% if session[UserConstants.USER_ID] is defined %}
  3034.         {% if session[UserConstants.USER_ID]!=0 %}
  3035.         var globLsDataStr = window.localStorage.getItem('lsData');
  3036.         var globLsData = {};
  3037.         if (globLsDataStr != 'null' && globLsDataStr != null)
  3038.             globLsData = JSON.parse(globLsDataStr);
  3039.         //    console.log(globLsData)
  3040.         if (typeof globLsData['checkoutPending'] !== 'undefined') {
  3041.             if (globLsData['checkoutPending'] == 1)
  3042.                 window.location.href = "{{ url('pricing_plan_page') }}?autoRedirected=1";
  3043.         }
  3044.         {% endif %}
  3045.         {% endif %}
  3046.         {% endif %}
  3047. //        //    console.log(globLsData)
  3048.         $('#small_search_button').click(function () {
  3049. //            $( '.small_search_content .selectize-control.searchbox.small_search' ).animate({
  3050. //                opacity: 0.25,
  3051. //                left: "+=50",
  3052. //                width: "0"
  3053. //            }, 5000, function() {
  3054. //                // Animation complete.
  3055. //            });
  3056.             if ($('.small_search_content .selectize-control.searchbox.small_search').hasClass('search_shown')) {
  3057. //                $('.small_search_content .selectize-control.searchbox.small_search').hide();
  3058.                 $('.small_search_content .selectize-control.searchbox.small_search').removeClass('search_shown');
  3059. //                $('.searchbar-content.small_search_content').css('border','1px solid #1d5b9e33;');
  3060.                 $('.small_search_content .selectize-control.searchbox.small_search').animate({
  3061. //                opacity: 0.25,
  3062. //                left: "+=50",
  3063.                     width: "0"
  3064.                 }, 500, function () {
  3065.                     // Animation complete.
  3066.                     $('.small_search_content .selectize-control.searchbox.small_search').hide();
  3067.                     $('.small_search_content .selectize-control.searchbox.small_search').removeClass('search_shown');
  3068.                     $('.searchbar-content.small_search_content').removeClass('search_shown');
  3069.                 });
  3070.             } else {
  3071. //                $('.small_search_content .selectize-control.searchbox.small_search').show();
  3072. //                $('.searchbar-content.small_search_content').css('border','1px solid #1d5b9e33;');
  3073.                 $('.small_search_content .selectize-control.searchbox.small_search').css('display', 'inline-flex')
  3074.                 $('.small_search_content .selectize-control.searchbox.small_search').addClass('search_shown');
  3075.                 $('.searchbar-content.small_search_content').addClass('search_shown');
  3076.                 $('.small_search_content .selectize-control.searchbox.small_search').animate({
  3077. //                opacity: 0.25,
  3078. //                left: "+=50",
  3079.                     width: "224"
  3080.                 }, 500, function () {
  3081.                     // Animation complete.
  3082. //                    $('.searchbar-content.small_search_content').css('border','1px solid #1d5b9e33;');
  3083.                 });
  3084.             }
  3085.         })
  3086.         {# var small_search_box=$(".searchbox").selectize({ #}
  3087.         {# valueField: "url", #}
  3088.         {# labelField: "name", #}
  3089.         {# searchField: "name", #}
  3090.         {# create: false, #}
  3091.         {# preload:true, #}
  3092.         {# score: function (search) { #}
  3093.         {# var score = this.getScoreFunction(search); #}
  3094.         {# return function (item) { #}
  3095.         {# return score(item) * (1 + Math.min(item.watchers / 100, 1)); #}
  3096.         {# }; #}
  3097.         {# }, #}
  3098.         {# onChange: function (value) { #}
  3099.         {# if (!value.length) return; #}
  3100.         {# window.location.href=value; #}
  3101.         {# //addProductToListById(value); #}
  3102.         {# // alert(value) #}
  3103.         {# // small_search_box.clear() #}
  3104.         {# // small_search_box.focus() #}
  3105.         {# }, #}
  3106.         {# load: function (query, callback) { #}
  3107.         {# if (!query.length) return callback(); #}
  3108.         {# $.ajax({ #}
  3109.         {# url: "{{ url('search_buddybee') }}/" + encodeURIComponent(query), #}
  3110.         {# type: "GET", #}
  3111.         {# error: function () { #}
  3112.         {# callback(); #}
  3113.         {# }, #}
  3114.         {# success: function (res) { #}
  3115.         {# //    console.log(res.data) #}
  3116.         {# callback(res.data.slice(0, 10)); #}
  3117.         {# }, #}
  3118.         {# }); #}
  3119.         {# }, #}
  3120.         {# })[0].selectize; #}
  3121.         {% if system_type=='_BUDDYBEE_' %}
  3122.         var small_search_box = $(".searchbox").selectize({
  3123.             valueField: "url",
  3124.             labelField: "name",
  3125.             searchField: "name",
  3126.             create: false,
  3127.             maxItems: 1,
  3128.             preload: 'focus',
  3129.             render: {
  3130.                 option: function (item, escape) {
  3131.                     return (
  3132.                         '<div style="padding: 10px;">' +
  3133.                         '<span class="title">' +
  3134.                         '<span class="name" style="display:block;font-size: 18px;">' +
  3135.                         //                        '<i class="icon ' +
  3136.                         //                        (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
  3137.                         //                        '"></i>' +
  3138.                         //                        "<div class='form-control mainDiv'>" +
  3139.                         //                        '<span class="name">' +
  3140.                         escape(item.name) +
  3141.                         "</span>" +
  3142.                         '<span class="description" style="padding-top:2px; display: block">' +
  3143.                         escape(item.description) +
  3144.                         "</span>" +
  3145.                         // '<span class="description">' +
  3146.                         // escape(item.description) +
  3147.                         "</span>" +
  3148.                         "</div>"
  3149.                     );
  3150.                     // return (
  3151.                     //     "<div>" +
  3152.                     //     '<span class="title">' +
  3153.                     //     '<span class="name"><i class="icon ' +
  3154.                     //     (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
  3155.                     //     '"></i>' +
  3156.                     //     escape(item.name) +
  3157.                     //     "</span>" +
  3158.                     //
  3159.                     //     "</span>" +
  3160.                     //     '<span class="description">' +
  3161.                     //     escape(item.description) +
  3162.                     //     "</span>" +
  3163.                     //
  3164.                     //     "</div>"
  3165.                     // );
  3166.                 },
  3167.             },
  3168.             onChange: function (value) {
  3169.                 if (!value.length) return;
  3170.                 var sval = value
  3171.                 small_search_box.setValue([])
  3172.                 window.location.href = sval;
  3173.                 //addProductToListById(value);
  3174.                 // alert(value)
  3175.                 // small_search_box.clear()
  3176.                 // small_search_box.focus()
  3177.             },
  3178.             load: function (query, callback) {
  3179. //                if (!query.length) return callback();
  3180.                 $.ajax({
  3181.                     url: "{{ url('search_buddybee') }}/" + encodeURIComponent(query),
  3182.                     type: "GET",
  3183.                     error: function () {
  3184.                         callback();
  3185.                     },
  3186.                     success: function (res) {
  3187.                         //    console.log(res.data)
  3188.                         callback(res.data);
  3189.                     },
  3190.                 });
  3191.             },
  3192.         })[0].selectize;
  3193.         {% endif %}
  3194.         $('.selectize-control.searchbox .selectize-input.items input').addClass('trn')
  3195.         $('.selectize-control.searchbox .selectize-input.items input').attr('data-trn-key', '_SMALL_SEARCH_PH_');
  3196.         _t = $('body').translate({
  3197.             lang: "en",
  3198.             t: lang_pack
  3199.         });
  3200.         if (typeof (window.localStorage) !== "undefined")
  3201.             honeybeeLocale = window.localStorage.getItem('honeybeeLocale');
  3202. //    alert(honeybeeLocale)
  3203.         if (honeybeeLocale !== "undefined" && honeybeeLocale != 'null' && honeybeeLocale != null) {
  3204.             _t.lang(honeybeeLocale);
  3205.         } else {
  3206.             honeybeeLocale = 'en'
  3207.         }
  3208.         $(".locale_changer").click(function (ev) {
  3209.             var lang = $(this).attr("data-locale");
  3210.             _t.lang(lang);
  3211.             honeybeeLocale = lang;
  3212.             $(".locale_changer").removeClass('activeLocale')
  3213.             $(this).addClass('activeLocale');
  3214.             $(".curr_locale_text").text($(this).text());
  3215.             if (typeof (window.localStorage) !== "undefined")
  3216.                 honeybeeLocale = window.localStorage.setItem('honeybeeLocale', honeybeeLocale);
  3217. //            //    console.log(lang);
  3218.             ev.preventDefault();
  3219.         });
  3220.         {% if system_type=='_BUDDYBEE_' %}
  3221.         if ($('#viewAsId').length) {
  3222.             $('#viewAsId').selectize({
  3223.                 placeholder: 'Choose User',
  3224.                 multiple: false,
  3225. //            options: APTL.productListArray,
  3226.                 options: [],
  3227.                 valueField: 'value',
  3228.                 labelField: 'text',
  3229.                 searchField: ['text', 'value', 'phone', 'email', 'o_auth_email', 'firstname', 'lastname'],
  3230.                 preload: 'focus',
  3231.                 render: {
  3232.                     option: function (item, escape) {
  3233.                         return (
  3234.                             '<div style="padding: 2px; display:flex;">' +
  3235.                             '<span class="title" style="    min-width: 2rem;display: inline-block;">' +
  3236.                             ((item.image != null && item.image != '') ? '<img style="border-radius: 50%;height: 2rem;width: 2rem;" src="' + item.image + '" alt="" class="img-fluid" >' :
  3237.                                 '<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" >') +
  3238.                             "</span>" +
  3239.                             '<span class="name" style="padding-left:0.5rem;font-size: 12px; display:inline-block;">' +
  3240.                             //                        '<i class="icon ' +
  3241.                             //                        (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
  3242.                             //                        '"></i>' +
  3243.                             //                        "<div class='form-control mainDiv'>" +
  3244.                             //                        '<span class="name">' +
  3245.                             '#' + escape(item.applicant_id) + ' ' + escape(item.firstname) + ' ' + escape(item.lastname) + '<br> ' + escape(item.phone) + ' - ' + escape(item.o_auth_email) +
  3246.                             "</span>" +
  3247.                             // '<span class="description">' +
  3248.                             // escape(item.description) +
  3249.                             //                    "</span>" +
  3250.                             "</div>"
  3251.                         );
  3252.                         // return (
  3253.                         //     "<div>" +
  3254.                         //     '<span class="title">' +
  3255.                         //     '<span class="name"><i class="icon ' +
  3256.                         //     (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
  3257.                         //     '"></i>' +
  3258.                         //     escape(item.name) +
  3259.                         //     "</span>" +
  3260.                         //
  3261.                         //     "</span>" +
  3262.                         //     '<span class="description">' +
  3263.                         //     escape(item.description) +
  3264.                         //     "</span>" +
  3265.                         //
  3266.                         //     "</div>"
  3267.                         // );
  3268.                     },
  3269.                 },
  3270.                 onChange: function (value) {
  3271.                     if (!value.length) return;
  3272.                     window.location.href = '{{ absolute_url(path('view_as_user_buddybee')) }}/' + value;
  3273.                     //addProductToListById(value);
  3274.                     // alert(value)
  3275.                     // small_search_box.clear()
  3276.                     // small_search_box.focus()
  3277.                 },
  3278.                 load: function (query, callback) {
  3279. //                        if (!query.length) return // callback();
  3280.                     if (!query.length) query = '_EMPTY_';
  3281.                     var pika_ind_id = $($(this)[0].$input["0"]).attr('data-id')
  3282.                     $.ajax({
  3283.                         url: BaseURL + "select_data_ajax_public",
  3284.                         type: 'POST',
  3285.                         dataType: 'json',
  3286.                         data: {
  3287.                             //returnJson: 1,
  3288.                             //sessionData: sessionData
  3289.                             query: query,
  3290.                             tableName: "entity_applicant_details",
  3291.                             valueField: "applicant_id",
  3292. //                        textField: "topic_name",
  3293.                             entity_group: 1,
  3294.                             selectorId: $($(this)[0].$input["0"]).attr('id'),
  3295.                             isMultiple: 0,
  3296.                             dataId: pika_ind_id,
  3297. //                        isMultiple: 0,
  3298.                             textField: "rendered_text",
  3299. //
  3300.                             renderTextFormat: " __firstname__  __lastname__",
  3301.                             andOrConditions: [
  3302.                                 {type: "like", field: "firstname", value: query},
  3303.                                 {type: "like", field: "lastname", value: query},
  3304.                                 {type: "like", field: "phone", value: query},
  3305.                                 {type: "like", field: "email", value: query},
  3306.                                 {type: "=", field: "applicant_id", value: isNaN(query) ? '' : query}
  3307.                             ],
  3308.                             mustConditions: [
  3309.                                 {% if BUDDYBEE_ADMIN_LEVEL>=5 %}
  3310.                                 {% elseif BUDDYBEE_ADMIN_LEVEL >=1 %}
  3311.                                 {
  3312.                                     type: "in",
  3313.                                     field: "is_admin",
  3314.                                     value: [0, 'null']
  3315.                                 },
  3316.                                 {
  3317.                                     type: "in",
  3318.                                     field: "assigned_sales_representative_id",
  3319.                                     value: [0, 'null',{{ session[UserConstants.USER_ID] }}]
  3320.                                 },
  3321.                                 {% else %}
  3322.                                 {% endif %}
  3323.                                 // {type: "=", field: "is_consultant", value: 1},
  3324.                                 {# {% if not curr_data is empty %} #}
  3325. //                            {type: "!=", field: "applicant_id", value: $('#rescheduledStudentId').val()}
  3326.                                 {# {% endif %} #}
  3327.                             ],
  3328.                             convertToObject: [
  3329. //                            'accessories', 'issues'
  3330.                             ],
  3331.                             skipDefaultCompanyId: 1
  3332.                             // setDataForSingle: 1,
  3333.                         },
  3334.                         error: function () {
  3335.                             // callback();
  3336.                         },
  3337.                         success: function (res) {
  3338. //                        preliminary_reg_data_by_id = res.dataById
  3339.                             callback(res.data);
  3340.                             if (res.setValueArray.length != 0 && res.selectorId != '') {
  3341.                                 if (res.isMultiple == 1)
  3342.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValueArray)
  3343.                                 else
  3344.                                     $('#' + res.selectorId).selectize()[0].selectize.setValue(res.setValue)
  3345.                             }
  3346. //                        alert('pika master')
  3347.                         }
  3348.                     });
  3349.                 },
  3350.             })[0].selectize;
  3351.         }
  3352.         $('.recharge_submit').click(function (e) {
  3353.             e.preventDefault();
  3354.             $('#rechargeForm').submit();
  3355.         });
  3356. //        alert('.locale_changer.'+honeybeeLocale)
  3357. //        alert($('.locale_changer.'+honeybeeLocale).text())
  3358.         $(".curr_locale_text").text($('.locale_changer.' + honeybeeLocale).text());
  3359.         {% endif %}
  3360.         $('.add_basic_day_picker').not('.datepicker').bootstrapMaterialDatePicker({
  3361.             //format: 'dddd DD MMMM YYYY',
  3362.             format: 'MMMM DD, YYYY HH:mm',
  3363.             clearButton: true,
  3364.             weekStart: 6,
  3365.             time: true,
  3366.             switchOnClick: true,
  3367.             monthPicker: true
  3368.         });
  3369.     });
  3370. </script>
  3371. </html>