src/ApplicationBundle/Modules/Buddybee/Resources/views/pages/consultancySearchPage.html.twig line 600

Open in your IDE?
  1. {% include '@Application/inc/buddybee_new_header.html.twig' %}
  2. <style>
  3.     .consultant-bio-img img {
  4.         height: 154px;
  5.         border-radius: 10%;
  6.     }
  7.     .small_language_img {
  8.     }
  9.     .consultant-bio-img .cons_image_view {
  10.         height: 154px;
  11.         width: 154px;
  12.         border-radius: 10%;
  13.         background-size: cover !important;
  14.         background-position: center !important;
  15.     }
  16.     .consultant_search_bar.searchbar-content {
  17.         position: relative;
  18.     }
  19.     .consultant_search_bar.searchbar-content a {
  20.         position: absolute;
  21.         right: 9px;
  22.         top: 7px;
  23.     }
  24.     .filter_div img {
  25.         /*display: block;*/
  26.         color: #fff;
  27.         /*padding: 10px 0;*/
  28.         font-size: 14px;
  29.         background: #1D5B9E;
  30.         width: 40px;
  31.         height: 40px;
  32.         padding: 6px;
  33.         text-align: center;
  34.         line-height: 51px;
  35.         border-radius: 50%;
  36.     }
  37.     .filter_div_btn {
  38.     }
  39.     .filter_div {
  40.         display: inline-block;
  41.         width: 70px;
  42.         padding: 10px 0;
  43.         position: relative;
  44.     }
  45.     .consultant-title .searchbar {
  46.         width: 290px;
  47.         display: inline-block;
  48.         position: relative;
  49.     }
  50.     .filter_div_content {
  51.         padding: 20px;
  52.         width: 300px;
  53.         min-height: 400px;
  54.         height: auto;
  55.         left: -115px;
  56.         position: absolute;
  57.         z-index: 99999;
  58.         background: white;
  59.         display: none;;
  60.         /*border:1px solid darkblue;*/
  61.         box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  62.     }
  63.     .filter_div_content .head {
  64.         display: flex;
  65.         justify-content: space-between;
  66.         border-bottom: 1px solid #f1e4e4;
  67.     }
  68.     .filter_div_content .head .title {
  69.         font-size: 13px;
  70.         display: inline-block;
  71.         float: left;
  72.         margin-bottom: 0.5rem;
  73.     }
  74.     .filter_div_content .head .title.right {
  75.         float: right;
  76.         color: #1D5B9E;
  77.         font-weight: bold;
  78.         text-decoration: none;
  79.     }
  80.     .filter_div_content .body {
  81.         text-align: left;
  82.         /*padding-top: 15px;*/
  83.     }
  84.     .filter_div_content .body .title {
  85.         margin-top: 15px;
  86.         margin-bottom: 2px;
  87.         font-size: 11px;
  88.         text-align: left;
  89.         text-transform: uppercase;
  90.         color: #6c757d;
  91.     }
  92.     .filter_div_content .body .option {
  93.     }
  94.     .filter_div_content .body .form-check {
  95.         text-align: left;
  96.         width: 49%;
  97.         display: inline-block;
  98.     }
  99.     .filter_div_content .body .form-check .form-check-label span {
  100.         font-size: 13px;;
  101.     }
  102.     .filter_div_content .body .form-check .form-check-input:checked {
  103.         background-color: #1D5B9E;
  104.         border-color: #1D5B9E;
  105.     }
  106.     @media (min-width: 320px) and (max-width: 480px) {
  107.         .consultant-title .searchbar {
  108.             width: 250px;
  109.         }
  110.         .filter_div_content {
  111.             left: unset;
  112.             right: 0;
  113.         }
  114.     }
  115.     @media (min-width: 481px) and (max-width: 540px) {
  116.         .consultant-title .searchbar {
  117.             width: 250px;
  118.         }
  119.         .filter_div_content {
  120.             left: unset;
  121.             right: 0;
  122.         }
  123.     }
  124.     @media (min-width: 320px) and (max-width: 480px) {
  125.         .consultant-bio-img .cons_image_view {
  126.             height: 60px !important;
  127.             width: 60px !important;
  128.             margin: auto;
  129.         }
  130.         .consultant-bio-img  {
  131.            text-align: center;
  132.         }
  133.         .book_btn_span {
  134.             /*display: none;*/
  135.         }
  136.         .rating_value_span {
  137.             display: block;
  138.             padding: 0 21px;;
  139.         }
  140.     }
  141. </style>
  142. <section class="consultant-section">
  143.     {% set countries_data='_HAS_CONSULTANT_'|getCountriesBuddyBee('object') %}
  144.     {% set language_list='_ALL_'|getLanguagesBuddyBee('object') %}
  145.     <div class="consultant-title">
  146.         <div class="container">
  147.             <div class="row mb-5">
  148.                 <div class="col-md-3"></div>
  149.                 <div class="col-md-6" style="position: relative;text-align: center">
  150.                     {% if ref=='_ADMIN_' %}
  151.                     <h2>Meet the BuddyBee Admins</h2>
  152.                     {% else %}
  153.                     <h2>Meet the BuddyBee Consultant</h2>
  154.                     {% endif %}
  155.                     <div class="searchbar" style="">
  156.                         <div class="searchbar-content consultant_search_bar">
  157.                             <input type="text" placeholder="Search Consultant" class="consultantSearch small_search">
  158.                             <a href="#"><i class="fas fa-search"></i></a>
  159.                         </div>
  160.                     </div>
  161.                     <div class="filter_div" style="width: 70px;">
  162.                         <a href="#" class="filter_div_btn">
  163.                             {#<img style="width: 20px; height: 20px;" src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/filter_image.png"  alt="">#}
  164.                             {#<i class="fas fa-filter">#}
  165.                             <i class="">
  166.                                 <img style=""
  167.                                      src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/filter_image.png"
  168.                                      alt="">
  169.                             </i>
  170.                         </a>
  171.                         <div class="filter_div_content" style="">
  172.                             <div class="head">
  173.                                 <h1 class="title">Filter By</h1>
  174.                                 <a class="title right">Reset Filters</a>
  175.                             </div>
  176.                             <div class="body">
  177.                                 <h1 class="title">Language</h1>
  178.                                 {% for entry in language_list %}
  179.                                     <div class="form-check">
  180.                                         <input class="form-check-input consFilter langFilter" type="checkbox"
  181.                                                value="{{ entry.id }}" id="langFilter{{ entry.id }}" >
  182.                                         <label class="form-check-label" for="langFilter{{ entry.id }}">
  183.                                             <span>{{ entry.name }}</span>
  184.                                         </label>
  185.                                     </div>
  186.                                 {% endfor %}
  187.                                 <h1 class="title">Country</h1>
  188.                                 {% for entry in countries_data %}
  189.                                     <div class="form-check">
  190.                                         <input class="form-check-input consFilter countryFilter" type="checkbox"
  191.                                                value="{{ entry.id }}" id="countryFilter{{ entry.id }}" >
  192.                                         <label class="form-check-label" for="countryFilter{{ entry.id }}">
  193.                                             <span>{{ entry.name }}</span>
  194.                                         </label>
  195.                                     </div>
  196.                                 {% endfor %}
  197.                                 <h1 class="title">Topics</h1>
  198.                                 {% for entry in topic %}
  199.                                     <div class="form-check" style="width: 100%;">
  200.                                         <input class="form-check-input consFilter topicFilter" type="checkbox"
  201.                                                value="{{ entry.id }}" id="topicFilter{{ entry.id }}"
  202.                                                {% if topicId !=0 %}{% if topicId ==entry.id %}checked{% endif %} {% else %}{% endif %}>
  203.                                         <label class="form-check-label" for="topicFilter{{ entry.id }}">
  204.                                             <span>{{ entry.topicName }}</span>
  205.                                         </label>
  206.                                     </div>
  207.                                 {% endfor %}
  208.                             </div>
  209.                         </div>
  210.                     </div>
  211.                 </div>
  212.                 <div class="col-md-3"></div>
  213.             </div>
  214.         </div>
  215.     </div>
  216.     <div class="consultant-list">
  217.         <div class="container">
  218.             <div class="row">
  219.                 <div class="col-md-3">
  220.                     <div class="viewed-consultant">
  221.                         <div class="viewed-consultant-title">
  222.                             <h6>Last Viewed</h6>
  223.                         </div>
  224.                         <div id="lvcl">
  225.                             {##}
  226.                             {#<div class="viewed-consultant-content my-2">#}
  227.                             {#<div class="consultant-card d-flex">#}
  228.                             {#<div class="consultant-card-left">#}
  229.                             {#<div class="consultant-img">#}
  230.                             {#<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/consultant-3.png" alt="consultant-3">#}
  231.                             {#<div class="cosultant-country">#}
  232.                             {#<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/flag-2.png" alt="flag-2">#}
  233.                             {#</div>#}
  234.                             {#</div>#}
  235.                             {#</div>#}
  236.                             {#<div class="consultant-card-right">#}
  237.                             {#<div class="consultant-title">#}
  238.                             {#<h4>Philip Ericsson</h4>#}
  239.                             {#<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Magnis fames fames fames fames</p>#}
  240.                             {#</div>#}
  241.                             {#</div>#}
  242.                             {#</div>#}
  243.                             {#</div>#}
  244.                             {#<div class="viewed-consultant-content">#}
  245.                             {#<div class="consultant-card d-flex">#}
  246.                             {#<div class="consultant-card-left">#}
  247.                             {#<div class="consultant-img">#}
  248.                             {#<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/consultant-3.png" alt="consultant-3">#}
  249.                             {#<div class="cosultant-country">#}
  250.                             {#<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/flag-2.png" alt="flag-2">#}
  251.                             {#</div>#}
  252.                             {#</div>#}
  253.                             {#</div>#}
  254.                             {#<div class="consultant-card-right">#}
  255.                             {#<div class="consultant-title">#}
  256.                             {#<h4>Philip Ericsson</h4>#}
  257.                             {#<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Magnis fames fames fames fames</p>#}
  258.                             {#</div>#}
  259.                             {#</div>#}
  260.                             {#</div>#}
  261.                             {#</div>#}
  262.                             {#<div class="viewed-consultant-content my-2">#}
  263.                             {#<div class="consultant-card d-flex">#}
  264.                             {#<div class="consultant-card-left">#}
  265.                             {#<div class="consultant-img">#}
  266.                             {#<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/consultant-3.png" alt="consultant-3">#}
  267.                             {#<div class="cosultant-country">#}
  268.                             {#<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/flag-2.png" alt="flag-2">#}
  269.                             {#</div>#}
  270.                             {#</div>#}
  271.                             {#</div>#}
  272.                             {#<div class="consultant-card-right">#}
  273.                             {#<div class="consultant-title">#}
  274.                             {#<h4>Philip Ericsson</h4>#}
  275.                             {#<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Magnis fames fames fames fames</p>#}
  276.                             {#</div>#}
  277.                             {#</div>#}
  278.                             {#</div>#}
  279.                             {#</div>#}
  280.                             {#<div class="viewed-consultant-content">#}
  281.                             {#<div class="consultant-card d-flex">#}
  282.                             {#<div class="consultant-card-left">#}
  283.                             {#<div class="consultant-img">#}
  284.                             {#<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/consultant-3.png" alt="consultant-3">#}
  285.                             {#<div class="cosultant-country">#}
  286.                             {#<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/flag-2.png" alt="flag-2">#}
  287.                             {#</div>#}
  288.                             {#</div>#}
  289.                             {#</div>#}
  290.                             {#<div class="consultant-card-right">#}
  291.                             {#<div class="consultant-title">#}
  292.                             {#<h4>Philip Ericsson</h4>#}
  293.                             {#<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Magnis fames fames fames fames</p>#}
  294.                             {#</div>#}
  295.                             {#</div>#}
  296.                             {#</div>#}
  297.                             {#</div>#}
  298.                         </div>
  299.                         <div class="more-consultant">
  300.                             {#<p style="text-align: center;"><a href="#">View More</a></p>#}
  301.                         </div>
  302.                     </div>
  303.                 </div>
  304.                 <div class="col-md-6 ">
  305.                     <div class="pList"></div>
  306.                     <div class="page-pagination  mt-5" id="consultant_pagination">
  307.                     </div>
  308.                 </div>
  309.                 <div class="col-md-3">
  310.                     <div class="consultancy-topic">
  311.                         <div class="consultancy-topic-title">
  312.                             <h6>Consultancy Topic</h6>
  313.                         </div>
  314.                         {% for data in topic %}
  315.                             {% if countries_data[data.countryId] is defined %}
  316.                             <div class="consultancy-topic-content" style="cursor: pointer;"
  317.                                  onclick="window.location.href='{{ path('topic_list') }}/{{ data.id }}'">
  318.                                 <div class="consultant-card d-flex">
  319.                                     <div class="consultant-card-left">
  320.                                         <div class="consultant-img">
  321.                                             <img class="bordered-flag" style="height: 68px; width:68px;"
  322.                                                  src="{{ absolute_url(path('dashboard')) }}{{ countries_data[data.countryId] is defined?countries_data[data.countryId].flagImageSquare:'buddybee_assets/images/country-1.png' }}"
  323.                                                  alt="country-1">
  324.                                         </div>
  325.                                     </div>
  326.                                     <div class="consultant-card-right">
  327.                                         <div class="consultant-title">
  328.                                             <h4>{{ data.topicName }}</h4>
  329.                                             <p>{{ data.topicSummary }}</p>
  330.                                         </div>
  331.                                     </div>
  332.                                 </div>
  333.                             </div>
  334.                             {% endif %}
  335.                         {% endfor %}
  336.                         {#                        <div class="more-consultant">#}
  337.                         {#                            <center><a href="#">View More</a></center>#}
  338.                         {#                        </div>#}
  339.                     </div>
  340.                 </div>
  341.             </div>
  342.         </div>
  343.     </div>
  344. </section>
  345. {% include '@Application/footer/buddybee_new_footer.html.twig' %}
  346. <script type="text/javascript"
  347.         src="{{ absolute_url(path('dashboard')) }}condensed_assets/pagination/pagination.js?version={{ constant('ApplicationBundle\\Constants\\GeneralConstant::ENTITY_APP_VERSION') }}"></script>
  348. <script>
  349.     var countries_data ={{ countries_data|json_encode()|raw() }}
  350.     var language_list ={{ language_list|json_encode()|raw() }}
  351.     var topic_conditional_string = "preferredTopicIdsAsConsultant like '%\"{{ topicId }}\"%'"
  352.     var config = {
  353.         'mainTableAlias': "mainTable",
  354.         'mainTableClass': "CompanyGroupBundle\\Entity\\EntityApplicantDetails",
  355.         'mainTableIdField': "Id",
  356. //                'otherConditions': " (mainTable.CompanyId=1 and mainTable.status=1) ",
  357. //        'otherConditions': " ( mainTable.isConsultant=1 and mainTable.accountStatus=1  ) ",
  358.         {% set THIS_USER_ID= 0 %}
  359.         {% if (session[UserConstants.USER_ID] is defined ) %}
  360.         {% set THIS_USER_ID =session[UserConstants.USER_ID] %}
  361.         {% endif %}
  362.     {% if ref=='_ADMIN_' %}
  363.         {% if topicId !=0 %}
  364.         'otherConditions': " ( mainTable.isAdmin >=1 and mainTable.applicantId != {{ THIS_USER_ID }}  and mainTable.preferredTopicIdsAsConsultant like '%\"{{ topicId }}\"%'   ) ",
  365.         {% else %}
  366.         'otherConditions': " ( mainTable.isAdmin >=1 and mainTable.applicantId != {{ THIS_USER_ID }}    ) ",
  367.         {% endif %}
  368.     {% else %}
  369.         {% if topicId !=0 %}
  370.         'otherConditions': " ( mainTable.isConsultant=1 and mainTable.applicantId != {{ THIS_USER_ID }}  and mainTable.preferredTopicIdsAsConsultant like '%\"{{ topicId }}\"%'   ) ",
  371.         {% else %}
  372.         'otherConditions': " ( mainTable.isConsultant=1 and mainTable.applicantId != {{ THIS_USER_ID }}    ) ",
  373.         {% endif %}
  374.     {% endif %}
  375.         'dateFieldsToStr': ['createdAt'],
  376.         'dateFieldsToStrFormat': ['m-d-Y h:i'],
  377.         'convertToObjectFields': ['languagesData'],
  378.         'skipColumnNames': [],
  379.         'flagColNames': [],
  380.         'flagConversionByCols': {},
  381.         'joinTableList': [
  382. //            {
  383. //                'tableClass': "CompanyGroupBundle\\Entity\\EntityApplicantDetails",
  384. //                'tableAlias': "consultantTable",
  385. //                'onField': 'applicantId',
  386. //                "onMainTableField": "applicantId",
  387. //                "fields": {
  388. //                    //'alisaFiled':'actiual field Name'
  389. //                    'consultantFirstName': 'firstname',
  390. //                    'consultantLastName': 'lastname',
  391. //                    'consultantImage': 'image',
  392. //
  393. //                }
  394. //            },
  395. //                    {
  396. //                        'tableClass': "CompanyGroupBundle\\Entity\\EntityApplicantDetails",
  397. //                        'tableAlias': "studentTable",
  398. //                        'onField': 'applicantId',
  399. //                        "onMainTableField": "studentId",
  400. //                        "fields": {
  401. //                            //'alisaFiled':'actiual field Name'
  402. //                            'studentFirstName': 'firstname',
  403. //                            'studentLastName': 'lastname',
  404. //                            'studentImage': 'image',
  405. //
  406. //                        }
  407. //                    },
  408.         ],
  409.         'returnJson': 1,
  410.         'getUnitListFlag': 1
  411.     }
  412.     var pika = null;
  413.     function refresh_filter() {
  414.         {% if ref=='_ADMIN_' %}
  415.         var new_other_cond = "( mainTable.isAdmin >= 1 and mainTable.applicantId != {{ THIS_USER_ID }}  and (1=0 ";
  416.         {% else %}
  417.         var new_other_cond = "( mainTable.isConsultant=1 and mainTable.applicantId != {{ THIS_USER_ID }}  and (1=0 ";
  418.         {% endif %}
  419.         if ($(".langFilter:checked").length)
  420.             $(".langFilter:checked").each(function (indu, elem) {
  421.                 new_other_cond += "or mainTable.languagesData like '%\"" + $(elem).val() + "\"%' ";
  422.             })
  423.         else
  424.             new_other_cond += "or 1=1 ";
  425.         new_other_cond += ") and (1=0 "
  426.         if ($(".countryFilter:checked").length)
  427.             $(".countryFilter:checked").each(function (indu, elem) {
  428.                 new_other_cond += "or mainTable.currentCountryId = " + $(elem).val() + " ";
  429.             })
  430.         else
  431.             new_other_cond += "or 1=1 ";
  432.         new_other_cond += ") and (mainTable.preferredTopicIdsAsConsultant is null or mainTable.preferredTopicIdsAsConsultant='[]' or mainTable.preferredTopicIdsAsConsultant=''  "
  433.         if ($(".topicFilter:checked").length)
  434.             $(".topicFilter:checked").each(function (indu, elem) {
  435.                 new_other_cond += "or mainTable.preferredTopicIdsAsConsultant like '%\"" + $(elem).val() + "\"%' ";
  436.             })
  437.         else
  438.             new_other_cond += "or 1=1 ";
  439.         {#{% if topicId !=0 %}#}
  440.         {#new_other_cond+=" ) and mainTable.preferredTopicIdsAsConsultant like '%\"{{ topicId }}\"%'   ) ";#}
  441.         {#{% else %}#}
  442.         new_other_cond += " ) ) "
  443.         {#{% endif %}#}
  444.         config.otherConditions = new_other_cond;
  445.         if (pika != null)
  446.             pika.pagination(1)
  447.         else
  448.             pika = $('#consultant_pagination').pagination({
  449.                 dataSource: "{{ url('generic_datatable_ajax_company_group') }}?dataTableQry=1",
  450.                 locator: 'data',
  451.                 //    totalNumberLocator: function(response) {
  452.                 //        // you can return totalNumber by analyzing response content
  453.                 //        return Math.floor(Math.random() * (1000 - 100)) + 100;
  454.                 //    },
  455.                 pageSize: 10,
  456.                 classPrefix: "pico",
  457.                 ulClassName: "pagination justify-content-center",
  458. //            totalNumber: 6,
  459.                 totalNumberLocator: function (response) {
  460.                     // you can return totalNumber by analyzing response content
  461.                     return response.totalObjectsCount != 0 ? (response.totalObjectsCount) : 0;
  462.                 },
  463.                 className: "pagination-div",
  464. //                pageRange: null,
  465. //            prevText :'<i class="material-icons">chevron_left</i>',
  466. //            nextText :'<i class="material-icons">chevron_right</i>',
  467.                 ajax: {
  468.                     beforeSend: function () {
  469.                         //            dataContainer.html('Loading data from flickr.com ...');
  470.                     },
  471.                     "type": 'POST',
  472.                     "data": {
  473.                         returnJson: 1,
  474.                         config: config
  475. //                           sessionData: sessionData,
  476. //                           getUnitListFlag:getUnitListFlag
  477.                     }
  478.                 },
  479.                 callback: function (data, pagination) {
  480.                     // template method of yourself
  481.                     var html = "";
  482.                     // alert('working')
  483.                     //    console.log(data)
  484.                     $('html,body').stop().animate({scrollTop: 0}, 500, 'swing', function () {
  485. //                    alert("Finished animating");
  486.                     });
  487.                     for (var k = 0; k < data.length; k++) {
  488.                         var row_here = data[k]
  489.                         {% if ref=='_ADMIN_' %}
  490.                                 if (data[k].isAdmin <= 0)
  491.                                     continue;
  492.                         {% else %}
  493.                             if (data[k].isConsultant = 0)
  494.                                 continue;
  495.                         {% endif %}
  496.                         var speaks_content = "";
  497.                         var languages_data = row_here.mainTable.languagesData;
  498.                         for (var lol = 0; lol < languages_data.length; lol++) {
  499.                             speaks_content += '<span> &nbsp;' +
  500.                                     '<img class="small_language_img" style="width: 20px; " src="{{ absolute_url(path('dashboard')) }}' + (typeof language_list[languages_data[lol]] === 'undefined' ? 'buddybee_assets/images/flag-2.png' : language_list[languages_data[lol]].image) + '"  alt="flag-2">' +
  501.                                     '&nbsp;' + language_list[languages_data[lol]].name + '</span>'
  502.                         }
  503.                         html += ' <div style="cursor:pointer;" class="consultant-bio d-flex justify-content-between ' + (k != 0 ? ' mt-5' : '') + '"  onclick="window.location.href=\'{{ path('consultant_profile') }}/' + data[k].applicantId + '{{ topicId!=0?('?topicId='~topicId):'' }}\'">' +
  504.                                 '<div class="consultant-bio-left">' +
  505.                                 '<div class="consultant-bio-img">' +
  506.                                 {#((row_here.mainTable.image!=null && row_here.mainTable.image!='')? '<img src="'+row_here.mainTable.image +'" alt="" class="img-fluid" style="154px">':#}
  507.                                 {#'<img src="{{ absolute_url(path('dashboard')) }}buddybee_assets/images/consultant_image_ph_male.png" alt="" class="img-fluid" style="154px">') +#}
  508.                                 {#'<div class="consultant-review">' +                           #}
  509.                                 ((row_here.mainTable.image != null && row_here.mainTable.image != '') ? '<div style="background:url(' + row_here.mainTable.image + ')"  class="cons_image_view" ></div>' :
  510.                                         '<div style="background:url({{ absolute_url(path('dashboard')) }}buddybee_assets/images/consultant_image_ph_male.png)"  class="cons_image_view" ></div>') +
  511.                                 '<div class="consultant-review">' +
  512.                                 (row_here.mainTable.rating >0?
  513.                                 ((row_here.mainTable.rating >= 1 ? '<i class="fas fa-star"></i>' : '<i class="fa fa-star"></i>') +
  514.                                 (row_here.mainTable.rating >= 2 ? '<i class="fas fa-star"></i>' : '<i class="fa fa-star"></i>') +
  515.                                 (row_here.mainTable.rating >= 3 ? '<i class="fas fa-star"></i>' : '<i class="fa fa-star"></i>') +
  516.                                 (row_here.mainTable.rating >= 4 ? '<i class="fas fa-star"></i>' : '<i class="fa fa-star"></i>') +
  517.                                 (row_here.mainTable.rating >= 4.5 ? '<i class="fas fa-star"></i>' : '<i class="fa fa-star"></i>') +
  518.                                 '<span class="rating_value_span" style="font-weight:bold;">&nbsp;' + ((1 * row_here.mainTable.rating).toFixed(1)) + '</span>'):
  519.                                 ('<span class="rating_value_span" style="font-weight:bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>'))
  520.                                 +
  521.                             (row_here.mainTable.scheduleAvailableFlag==1?('<span class="book_btn_span"><a href="{{ path('consultant_profile') }}/' + row_here.mainTable.applicantId + '" >Book</a></span>'):('<span class="book_btn_span"><a style="background:orange;" href="{{ path('consultant_profile') }}/' + row_here.mainTable.applicantId + '" >Unavailable</a></span>')) +
  522.                                 '</div>' +
  523.                                 '</div>' +
  524.                                 '</div>' +
  525.                                 '<div class="consultant-bio-right" style="min-height:8rem;">' +
  526.                                 '<h3>' + row_here.mainTable.firstname + ' ' + row_here.mainTable.lastname + '</h3>' +
  527.                                 '<p><b>Profession: </b>' + ((row_here.mainTable.professionText != '' && row_here.mainTable.professionText != null) ? row_here.mainTable.professionText : 'Buddybee Consultant') + '</p>' +
  528.                                 '<p><b>University: </b>' + ((row_here.mainTable.universityText != '' && row_here.mainTable.universityText != null) ? row_here.mainTable.universityText : '') + '</p>' +
  529. //                       '<p><b>University: </b>Canadian English University College</p>' +
  530.                                 '<p><b>Country: </b>' + (typeof countries_data[row_here.mainTable.currentCountryId] === 'undefined' ? '' : countries_data[row_here.mainTable.currentCountryId].name) + '</p>' +
  531.                                 '<p><b>Speaks: </b>' + speaks_content + '</p>' +
  532. //                           '<p><b>Interests: </b>'+((row_here.mainTable.interest != '' && row_here.mainTable.interest != null) ?row_here.mainTable.interest:'Learning new Things') +'</p>' +
  533.                                 '<p><b>Education: </b>' + ((row_here.mainTable.educationText != '' && row_here.mainTable.educationText != null) ? row_here.mainTable.educationText : '') + '</p>' +
  534.                                 '<p><b>Speciality: </b>' + ((row_here.mainTable.speciality != '' && row_here.mainTable.speciality != null) ? row_here.mainTable.speciality : '') + '</p>' +
  535. //                           '<p><b>Speciality: </b>Badminton,Music,Culture & Heritage, Median & Arts</p>' +
  536. //                       '<p><b>Education: </b>Canadian University International College</p>' +
  537. //                       '<p><b>Speciality: </b>English (Native US/Canada)</p>' +
  538.                                 '</div>' +
  539.                                 '</div>'
  540.                     }
  541.                     //    console.log(data)
  542.                     $('.pList').html(html);
  543.                 }
  544.             })
  545.     }
  546.     $(document).ready(function () {
  547.         var lastViewedConsultantListStr = window.localStorage.getItem('lvcl');
  548.         var lastViewedConsultantList = [];
  549.         if (lastViewedConsultantListStr != 'null' && lastViewedConsultantListStr != null)
  550.             lastViewedConsultantList = JSON.parse(lastViewedConsultantListStr);
  551.         for (var p = 0; p < lastViewedConsultantList.length; p++) {
  552.             var currConsDataForLastview = lastViewedConsultantList[p];
  553.             var toappendStr = '<div class="viewed-consultant-content" onclick="window.location.href=\'' + currConsDataForLastview.prfUrl + '\'">' +
  554.                     '<div class="consultant-card d-flex">' +
  555.                     '<div class="consultant-card-left">' +
  556.                     '<div class="consultant-img" style="background: url(' + currConsDataForLastview.imageUrl + ');' +
  557.                     'height: 68px;' +
  558.                     'width: 68px;' +
  559.                     'border-radius: 50%;' +
  560.                     'background-size: cover;' +
  561.                     'background-position: center;">' +
  562. //                    '<img src="'+currConsDataForLastview.imageUrl+'" style="width:68px;" alt="consultant-3">'+
  563.                     '<div class="cosultant-country">' +
  564.                     '<img style="width: 20px; height: 20px;" src="{{ absolute_url(path('dashboard')) }}' + (typeof countries_data[currConsDataForLastview.currentCountryId] === 'undefined' ? 'buddybee_assets/images/flag-2.png' : countries_data[currConsDataForLastview.currentCountryId].flagImageSquare) + '"  alt="">' +
  565.                     '</div>' +
  566.                     '</div>' +
  567.                     '</div>' +
  568.                     '<div class="consultant-card-right">' +
  569.                     '<div class="consultant-title">' +
  570.                     '<h4>' + currConsDataForLastview.name + '</h4>' +
  571.                     '<p>' + (typeof currConsDataForLastview.professionalTitle !== 'undefined' ? currConsDataForLastview.professionalTitle : 'Professional Consultant') + '</p>' +
  572.                     '</div>' +
  573.                     '</div>' +
  574.                     '</div>' +
  575.                     '</div>';
  576.             $('#lvcl').append(toappendStr);
  577.             {#var currConsDataForLastview={#}
  578.             {#imageUrl:'{{ consultantDetails.image }}',#}
  579.             {#name:'{{ consultantDetails.firstname }} {{ consultantDetails.lastName }}',#}
  580.             {#consSummary:'{{ consSummary }}',#}
  581.             {#prfUrl:'{{ url('consultant_profile') }}/{{ consultantDetails.applicantId }}'#}
  582.             {#};#}
  583.         }
  584.         $('.consFilter').change(function () {
  585.             refresh_filter()
  586. //            op
  587.         })
  588.         refresh_filter()
  589.         $(document).mouseup(function (e) {
  590.             var container = $(".filter_div_content");
  591.             // if the target of the click isn't the container nor a descendant of the container
  592.             if (!container.is(e.target) && container.has(e.target).length === 0) {
  593.                 container.hide();
  594.             }
  595.         });
  596.         $('.filter_div_btn').click(function (e) {
  597.             e.preventDefault();
  598.             $('.filter_div_content').toggle()
  599.         })
  600.         var consultantSearch = $(".consultantSearch").selectize({
  601.             valueField: "url",
  602.             labelField: "name",
  603.             searchField: "name",
  604.             create: false,
  605.             preload: true,
  606.             render: {
  607.                 option: function (item, escape) {
  608.                     return (
  609.                             '<div style="padding: 2px;">' +
  610.                             '<span class="title" style="    min-width: 2rem;display: inline-block;">' +
  611.                             ((item.image != null && item.image != '') ? '<img style="border-radius: 50%;height: 2rem;width: 2rem;" src="' + item.image + '" alt="" class="img-fluid" >' :
  612.                                     '<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" >') +
  613.                             "</span>" +
  614.                             '<span class="name" style="padding-left:0.5rem;font-size: 14px;">' +
  615. //                        '<i class="icon ' +
  616. //                        (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
  617. //                        '"></i>' +
  618. //                        "<div class='form-control mainDiv'>" +
  619. //                        '<span class="name">' +
  620.                             escape(item.name) +
  621.                             "</span>" +
  622.                                 // '<span class="description">' +
  623.                                 // escape(item.description) +
  624. //                    "</span>" +
  625.                             "</div>"
  626.                     );
  627.                     // return (
  628.                     //     "<div>" +
  629.                     //     '<span class="title">' +
  630.                     //     '<span class="name"><i class="icon ' +
  631.                     //     (item.type == 1 ? "fa fa-list" : "fa fa-clock") +
  632.                     //     '"></i>' +
  633.                     //     escape(item.name) +
  634.                     //     "</span>" +
  635.                     //
  636.                     //     "</span>" +
  637.                     //     '<span class="description">' +
  638.                     //     escape(item.description) +
  639.                     //     "</span>" +
  640.                     //
  641.                     //     "</div>"
  642.                     // );
  643.                 },
  644.             },
  645.             onChange: function (value) {
  646.                 if (!value.length) return;
  647.                 var sval = value
  648.                 consultantSearch.setValue([])
  649.                 window.location.href = sval;
  650.                 //addProductToListById(value);
  651.                 // alert(value)
  652.                 // small_search_box.clear()
  653.                 // small_search_box.focus()
  654.             },
  655.             load: function (query, callback) {
  656.                 if (!query.length) return callback();
  657.                 $.ajax({
  658.                     url: "{{ url('consultant_search_from_list') }}/" + encodeURIComponent(query),
  659.                     type: "GET",
  660.                     error: function () {
  661.                         callback();
  662.                     },
  663.                     success: function (res) {
  664.                         //    console.log(res.data)
  665.                         callback(res.data);
  666.                     },
  667.                 });
  668.             },
  669.         })[0].selectize;
  670.     });
  671. </script>
  672. <style type="text/css">
  673.     body {
  674.         /*-moz-transform: scale(0.5, 0.5); !* Moz-browsers *!*/
  675.         zoom: 1; /* Other non-webkit browsers */
  676.         zoom: 100%; /* Webkit browsers */
  677.     }
  678.     /*.modal-dialog {*/
  679.     /*width: 75%;*/
  680.     /*}*/
  681.     .trans_amount {
  682.         text-align: right;
  683.     }
  684. </style>