<link rel="stylesheet" type="text/css" href="module/report/customer-experience-report/css/customer-experience-report.css"
/>
<section class="user_page container">
    <div class="sales_report">
        <div class="sales_report_in">
            <div class="sales_card">
                <div class="container-fluid table_area">
                    <div class="page-head">
                        <p>Customer Experience Report</p>
                    </div>
                    <div class="main_dropdown">
                        <div class="zmdropdown">
                            <label>Zonal Manager</label>
                            <select ng-model="formData.zm_email" ng-change='zmChange()'>
                                <option value="all">All</option>
                                <option ng-repeat="zm in zmuser_list" value="{{zm.email}}">{{zm.name}}</option>
                            </select>
                        </div>
                        <div class="rmdropdown" ng-if="!rmInactive">
                            <label>Regional Manager</label>
                            <select ng-model="formData.rm_email" ng-class="rmInactive ?'disabled':''" ng-change='rmChange()'>
                                <option value="all">All</option>
                                <option ng-repeat="rm in rmuser_list" value="{{rm.email}}">{{rm.name}}</option>
                            </select>
                        </div>
                        <div class="amdropdown" ng-if="!amInactive">
                            <label>Area Manager</label>
                            <select ng-model="formData.am_email" ng-class="amInactive ?'disabled':''" ng-change='amChange()'>
                                <option value="all">All</option>
                                <option ng-repeat="am in amuser_list" value="{{am.email}}">{{am.name}}</option>
                            </select>
                        </div>
                    </div>
                    <div class="date_align">
                        <!-- <div class="inner-tab pull-left">
                            <div class="btn-pref btn-group btn-group-justified btn-group-lg" role="group" aria-label="...">
                                <div class="btn-group" role="group">
                                    <button type="button" id="stars" class="btn" ng-class="tabActive==1 ?'btn-primary':'btn-default'" ng-click="selectTab('1')"
                                        href="#tab1" data-toggle="tab">
                                        <div class="hidden-xs">Enquiry</div>
                                    </button>
                                </div>
                                <div class="btn-group" role="group">
                                    <button type="button" id="stars1" class="btn" ng-class="tabActive==2 ?'btn-primary':'btn-default'" ng-click="selectTab('2')"
                                        href="#tab2" data-toggle="tab">
                                        <div class="hidden-xs">Customer Experience form</div>
                                    </button>
                                </div>
                                <div class="btn-group" role="group">
                                    <button type="button" id="stars2" class="btn" ng-class="tabActive==3 ?'btn-primary':'btn-default'" ng-click="selectTab('3')"
                                        href="#tab3" data-toggle="tab">
                                        <div class="hidden-xs">Feedback Report</div>
                                    </button>
                                </div>
                            </div>
                        </div> -->
                        <div class="data_class">
                                <!-- <input type="checkbox" class="check_cls" ng-model="formData.regtype" ng-true-value="0" ng-false-value="1" ng-checked='true' ng-click="selectStatus()">
                                <label class="lbl_font">Include Historical Data</label> -->
                                <label>From Date</label>
                                <input type="text" id="fromdate" class="datepicker" name="fromdate" ng-model="formData.from_date" autocomplete="off" placeholder="Start Date"
                                    data-isblockdate="true" ng-reportpickermin>
                                <label>To Date</label>
                                <input type="text" id="todate" class="datepicker" name="todate" ng-model="formData.to_date" autocomplete="off" placeholder="End Date"
                                    data-isblockdate="true" ng-reportpickermin>
                                    <button class="btn export_update" ng-click="experienceListData()" ng-if="formData.from_date!='' && formData.to_date!=''">
                                            <p>Go</p>
                                        </button>
                                        <button class="btn export_update opacity" ng-if="formData.from_date=='' || formData.to_date==''"  >
                                                <p>Go</p>
                                        </button>
    
                                <div class="download_export" ng-click="exportData()">
                                    <img src="images/excel.png" alt="Export" title=" Export">
                                    <span>Export Report</span>
                                </div>
                                <div class="download_export new" ng-click="feedback_exportData()">
                                    <img src="images/excel.png" alt="Export" title=" Export">
                                    <span>Feedback Export Report</span>
                                </div>
                            </div>
                    </div>
                    <div class="filter-area">
                        <!-- <div class="download_export" ng-click="exportData()">
                                <img src="images/excel.png" alt="Export" title=" Export">
                                <span>Export Report</span>
                            </div> -->

                        <div class="tab-content">
                            <div class="tab-pane fade in " id="tab1" ng-class="tabActive==1 ?'active':''">
                                <div class="bottom_box">
                                    <div class="col-sm-12 table_box">
                                        <div class="table-fixed table-responsive">
                                            <table class="table table-striped">
                                                <thead>
                                                    <tr class="row-name">
                                                        <th>S.no</th>
                                                        <th>Name</th>
                                                        <th>Email ID</th>
                                                        <th>Mobile</th>
                                                        <th>Age</th>
                                                        <th>Dealer</th>
                                                        <th>Model</th>
                                                        <th>Variant</th>
                                                        <th>Brochure</th>
                                                        <th>Source Type</th>
                                                        <th>ZM Name</th>
                                                        <th>RM Name</th>
                                                        <th>AM Name</th>
                                                        <th>Source Type</th>
                                                        <th>Zone</th>
                                                        <th>Feedback</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr ng-if="userEnquireReport.length>0" class="row-content" ng-repeat="userList in userEnquireReport track by $index">
                                                        <td>{{itemsPerPage *(currentPage-1)+$index+1}}</td>
                                                        <td>{{userList.name}}</td>
                                                        <td>{{userList.email}}</td>
                                                        <td>{{userList.mobile}}</td>
                                                        <td>{{userList.age}}</td>
                                                        <td>{{userList.dealer_name}} - ({{userList.dealer_code}})</td>
                                                        <td ng-if="userList.model_name!='' && userList.model_name!=undefined">{{userList.model_name}}</td>
                                                        <td ng-if="userList.model_name=='' || userList.model_name==undefined">-</td>
                                                        <td ng-if="userList.variant_name!='' && userList.variant_name!=undefined">{{userList.variant_name}}</td>
                                                        <td ng-if="userList.variant_name=='' || userList.variant_name==undefined">-</td>
                                                        <td>{{userList.is_brochure == 1 ? 'Shared' : 'Not Shared'}}</td>
                                                        <td>{{userList.source_type}}</td>
                                                        <td>{{userList.zm_name}}</td>
                                                        <td>{{userList.rm_name}}</td>
                                                        <td>{{userList.am_name}}</td>
                                                        <td>{{userList.source_type}}</td>
                                                        <td ng-if="userList.zone!='' && userList.zone!=undefined">{{userList.zone}}</td>
                                                        <td ng-if="userList.zone=='' || userList.zone==undefined">-</td>
                                                         <td>
                                                            <div data-backdrop='static' data-toggle="modal" data-target="#myModal" ng-if="userList.is_feedback==1" ng-click="viewdetails(userList)" class="editicon ion-eye ptr"
                                                            title="View"></div>
                                                            <div data-backdrop='static' data-toggle="modal" ng-if="userList.is_feedback==0" class="editicon ion-eye-disabled"
                                                            title="View"></div>
                                                            <div class="modal fade myViewModal" id="myModal">
                                                                <div class="modal-dialog">
                                                                      <div class="modal-content">
                                                                            <div class="modal-header">
                                                                                  <h4 class="modal-title">
                                                                                        <b class="font_14">Name: </b>{{particularData.salutation}}.{{particularData.firstname}} {{particularData.lastname}}</h4>
                                                                                  <button type="button" class="close" data-dismiss="modal">&times;</button>
                                                                            </div>
                                                                            <div class="modal-body model_left">
                                                                                <div class="table-content table-fixed">
                                                                                    <table class="table table-striped">
                                                                                        <thead>
                                                                                            <tr class="row-name" ng-if="userFeedbackDataReport.length>0">
                                                                                                <th>S.No</th>
                                                                                                <th>Question</th>
                                                                                                <th>Rating</th>
                                                                                            </tr>
                                                                                        </thead>
                                                                                        <tbody>
                                                                                            <tr ng-if="userFeedbackDataReport.length>0" class="row-content" ng-repeat="userFeedbackData in userFeedbackDataReport track by $index">
                                                                                                <td>{{itemsPerPage *(currentPage-1)+$index+1}}</td>
                                                                                                <td>{{userFeedbackData.questiontext}}</td>
                                                                                                <td>{{userFeedbackData.survey_rating}}</td> 
                                                                                            </tr>
                                                                                        </tbody>
                                                                                    </table>
                                                                                </div>
                                                                            </div>
                                                                            <div class="modal-footer">
                                                                                <nav aria-label="Page navigation" id="div" ng-if="contentViewValueReport.length>0">
                                                                                    <div class="download_export insidemodal" ng-click="exportTableData('0',contentValueReport[0].assettopicid)">
                                                                                        <img src="images/excel.png" alt="Export" title=" Export">
                                                                                        <span>Export Report</span>
                                                                                    </div>
                                                                                    <ul class="pagination-sm" uib-pagination total-items="totalItems" ng-model="currentPage" ng-change="pageChanged(currentPage)" max-size="maxSize" boundary-links="true" rotate="true" num-pages="numPages" items-per-page="itemsPerPage"></ul>
                                                                                </nav>
                                                                                <div ng-if="contentViewValueReport.length==0" class="no_report">
                                                                                    <p>No records Found</p>
                                                                                </div>
                                                                            </div>
                                                                      </div>
                                                                </div>
                                                          </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                                <div class="norecord" ng-if="userEnquireReport.length==0">
                                                    No Records Found
                                                </div>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane fade in " id="tab2" ng-class="tabActive==2 ?'active':''">
                                <div class="bottom_box">
                                    <div class="col-sm-12 table_box">
                                        <div class="table-fixed">
                                            <table class="table table-striped">
                                                <thead>
                                                    <tr class="row-name">
                                                        <th>S.no</th>
                                                        <th>User Name</th>
                                                        <th>Email ID</th>
                                                        <th>Mobile</th>
                                                        <th>Dealer</th>
                                                        <th>Zone</th>
                                                        <th>Region</th>
                                                        <th>Area</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr ng-if="userExperienceReport.length>0" class="row-content" ng-repeat="userList in userExperienceReport track by $index">
                                                        <td>{{itemsPerPage *(currentPage-1)+$index+1}}</td>
                                                        <td>{{userList.salutation}} {{userList.firstname}} {{userList.lastname}}</td>
                                                        <td>
                                                            <div ng-if="userList.email!=''">{{userList.email}}</div>
                                                            <div ng-if="userList.email==''"> - </div>
                                                        </td>
                                                        <td>{{userList.mobile}}</td>
                                                        <td>{{userList.dealer_name}} - ({{userList.dealer_code}})</td>
                                                        <td>{{userList.zm_name}}</td>
                                                        <td>{{userList.rm_name}}</td>
                                                        <td>{{userList.am_name}}</td>
                                                    </tr>
                                                </tbody>
                                                <div class="norecord" ng-if="userExperienceReport.length==0">
                                                    No Records Found
                                                </div>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane fade in " id="tab3" ng-class="tabActive==3 ?'active':''">
                                <div class="bottom_box">
                                    <div class="col-sm-12 table_box">
                                        <div class="table-fixed">
                                            <table class="table table-striped">
                                                <thead>
                                                    <tr class="row-name">
                                                        <th>S.no</th>
                                                        <th>User Name</th>
                                                        <th>Email ID</th>
                                                        <th>Mobile</th>
                                                        <th>Dealer</th>
                                                        <th>Zone</th>
                                                        <th>Region</th>
                                                        <th>Area</th>
                                                        <th>Action</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr ng-if="userFeedbackReport.length>0" class="row-content" ng-repeat="FeedbackList in userFeedbackReport track by $index">
                                                        <td>{{itemsPerPage *(currentPage-1)+$index+1}}</td>
                                                        <td>{{FeedbackList.salutation}}.{{FeedbackList.firstname}} {{FeedbackList.lastname}}</td>
                                                        <td>
                                                            <div ng-if="FeedbackList.email!=''">{{FeedbackList.email}}</div>
                                                            <div ng-if="FeedbackList.email==''"> - </div>
                                                        </td>
                                                        <td>{{FeedbackList.mobile}}</td>
                                                        <td>{{FeedbackList.dealer_name}} - ({{FeedbackList.dealer_code}})</td>
                                                        <td>{{FeedbackList.zm_name}}</td>
                                                        <td>{{FeedbackList.rm_name}}</td>
                                                        <td>{{FeedbackList.am_name}}</td>
                                                        <td>
                                                            <div data-backdrop='static' data-toggle="modal" data-target="#myModal1" ng-click="viewdetails(FeedbackList)" class="editicon ion-eye ptr"
                                                            title="View"></div>
                                                            <div class="modal fade myViewModal" id="myModal1">
                                                                <div class="modal-dialog">
                                                                      <div class="modal-content">
                                                                            <div class="modal-header">
                                                                                  <h4 class="modal-title">
                                                                                        <b class="font_14">Name: </b>{{particularData.salutation}}.{{particularData.firstname}} {{particularData.lastname}}</h4>
                                                                                  <button type="button" class="close" data-dismiss="modal">&times;</button>
                                                                            </div>
                                                                            <div class="modal-body model_left">
                                                                                <div class="table-content table-fixed">
                                                                                    <table class="table table-striped">
                                                                                        <thead>
                                                                                            <tr class="row-name" ng-if="userFeedbackDataReport.length>0">
                                                                                                <th>S.No</th>
                                                                                                <th>Question</th>
                                                                                                <th>Rating</th>
                                                                                            </tr>
                                                                                        </thead>
                                                                                        <tbody>
                                                                                            <tr ng-if="userFeedbackDataReport.length>0" class="row-content" ng-repeat="userFeedbackData in userFeedbackDataReport track by $index">
                                                                                                <td>{{itemsPerPage *(currentPage-1)+$index+1}}</td>
                                                                                                <td>{{userFeedbackData.questiontext}}</td>
                                                                                                <td>{{userFeedbackData.survey_rating}}</td> 
                                                                                            </tr>
                                                                                        </tbody>
                                                                                    </table>
                                                                                </div>
                                                                            </div>
                                                                            <div class="modal-footer">
                                                                                <nav aria-label="Page navigation" id="div" ng-if="contentViewValueReport.length>0">
                                                                                    <div class="download_export insidemodal" ng-click="exportTableData('0',contentValueReport[0].assettopicid)">
                                                                                        <img src="images/excel.png" alt="Export" title=" Export">
                                                                                        <span>Export Report</span>
                                                                                    </div>
                                                                                    <ul class="pagination-sm" uib-pagination total-items="totalItems" ng-model="currentPage" ng-change="pageChanged(currentPage)" max-size="maxSize" boundary-links="true" rotate="true" num-pages="numPages" items-per-page="itemsPerPage"></ul>
                                                                                </nav>
                                                                                <div ng-if="contentViewValueReport.length==0" class="no_report">
                                                                                    <p>No records Found</p>
                                                                                </div>
                                                                            </div>
                                                                      </div>
                                                                </div>
                                                          </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                                <div class="norecord" ng-if="userFeedbackReport.length==0">
                                                    No Records Found
                                                </div>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="container">
                    <div class="row">
                        <nav aria-label="Page navigation" id="div1">
                            <ul class="pagination pager" uib-pagination total-items="totalItems" ng-model="currentPage" ng-change="pageChanged()" max-size="maxSize"
                                boundary-links="true" rotate="false" num-pages="numPages" items-per-page="itemsPerPage"></ul>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>