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

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