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