Subversion Repositories SmartDukaan

Rev

Rev 37045 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<div class="row">
                <div class="col-lg-12">
                        <table class="table table-border table-condensed table-bordered" id="lead-table-paginated">
                        <thead>
                                        <tr>
                                            <th>Source</th>
                                                <th>First Name </th>
                                                <th>Last Name</th>
                                                <th>Outlet Name</th>
                                                <th>Mobile</th>
                                                <th>Address</th>
                                                <th>City</th>
                                                <th>State</th>
                                                <th>Created By</th>
                                                <th>Status</th>
                                                <th>Created On</th>
                                                <th>Updated On </th>
                                                <th>Assign To </th>
                                                        <th>Geo Status</th>
                                                <th>view</th>
                                                        <th>Action</th>
                                        </tr>
                        </thead>
                        <tbody>         
                                                #if(!$leads.isEmpty())
                                                                #foreach( $leadsModel in $leads )
                                                                <tr class="close-lead" data="$leadsModel.getId()">
                                                                        #if($leadsModel.getSource())
                                                                                <td>$leadsModel.getSource()</td>
                                                        #else
                                                        <td></td>
                                                        #end
                                                                        <td>$leadsModel.getFirstName()</td>
                                                                        <td>$leadsModel.getLastName()</td>
                                                                        <td>$leadsModel.getOutLetName()</td>
                                                                        <td>$leadsModel.getLeadMobile()</td>
                                                                        <td>$leadsModel.getAddress()</td>
                                                                        <td>$leadsModel.getCity()</td>
                                                                        <td>$leadsModel.getState()</td>
                                                                        <td>$leadsModel.getCreatedBy()</td>
                                                                        <td>$leadsModel.getStatus()</td>
                                                                        <td>$leadsModel.getCreatedTimestamp().format($dateTimeFormatter)</td>
                                                                        <td>$leadsModel.getUpdatedTimestamp().format($dateTimeFormatter)</td>
                                                                        #if($authIdAndAuthUserMap.get($leadsModel.getAssignTo()))
                                                                                <td>$authIdAndAuthUserMap.get($leadsModel.getAssignTo()).getFirstName()</td>
                                                        #else
                                                        <td></td>
                                                        #end
                                                                        <td>
                                                                                #set($geoLoc = $geoLocationMap.get($leadsModel.getId()))
                                                                                #if($geoLoc && $geoLoc.getStatus().toString() == "APPROVED")
                                                                                        <div class="btn-group-vertical" style="width:100%">
                                                                                                <span class="label label-success"
                                                                                                          style="margin-bottom:4px;">Verified</span>
                                                                                                <a href="https://www.google.com/maps?q=$geoLoc.getLatitude(),$geoLoc.getLongitude()"
                                                                                                   target="_blank"
                                                                                                   class="btn btn-xs btn-default" style="margin-bottom:2px;"
                                                                                                   title="$geoLoc.getLatitude(), $geoLoc.getLongitude()">View Map</a>
                                                                                                #if($geoLoc.getImageDocumentId() > 0)
                                                                                                        <a href="${rc.contextPath}/open-attachment?documentId=$geoLoc.getImageDocumentId()"
                                                                                                           target="_blank"
                                                                                                           class="btn btn-xs btn-default" style="margin-bottom:2px;">View
                                                                                                                Photo</a>
                                                                                                #end
                                                                                                <button class="btn btn-xs btn-danger reject-geo"
                                                                                                                data-leadid="$leadsModel.getId()">Revoke
                                                                                                </button>
                                                                                        </div>
                                                                                #elseif($geoLoc && $geoLoc.getStatus().toString() == "PENDING")
                                                                                        <div class="btn-group-vertical" style="width:100%">
                                                                                                <span class="label label-warning" style="margin-bottom:4px;">Pending Review</span>
                                                                                                <a href="https://www.google.com/maps?q=$geoLoc.getLatitude(),$geoLoc.getLongitude()"
                                                                                                   target="_blank"
                                                                                                   class="btn btn-xs btn-default" style="margin-bottom:2px;"
                                                                                                   title="$geoLoc.getLatitude(), $geoLoc.getLongitude()">View Map</a>
                                                                                                #if($geoLoc.getImageDocumentId() > 0)
                                                                                                        <a href="${rc.contextPath}/open-attachment?documentId=$geoLoc.getImageDocumentId()"
                                                                                                           target="_blank"
                                                                                                           class="btn btn-xs btn-default" style="margin-bottom:2px;">View
                                                                                                                Photo</a>
                                                                                                #end
                                                                                                <button class="btn btn-xs btn-success approve-geo"
                                                                                                                data-leadid="$leadsModel.getId()">Approve
                                                                                                </button>
                                                                                                <button class="btn btn-xs btn-danger reject-geo"
                                                                                                                data-leadid="$leadsModel.getId()">Reject
                                                                                                </button>
                                                                                        </div>
                                                                                #elseif($geoLoc && $geoLoc.getStatus().toString() == "REJECTED")
                                                                                        <div class="btn-group-vertical" style="width:100%">
                                                                                                <button class="btn btn-xs btn-warning generateGeoLink"
                                                                                                                data-leadid="$leadsModel.getId()"
                                                                                                                style="margin-bottom:2px;">Rejected - Resend
                                                                                                </button>
                                                                                                <button class="btn btn-xs btn-success verifyGeoManual"
                                                                                                                data-leadid="$leadsModel.getId()">Verify Manually
                                                                                                </button>
                                                                                        </div>
                                                                                #else
                                                                                        <div class="btn-group-vertical" style="width:100%">
                                                                                                <button class="btn btn-xs btn-info generateGeoLink"
                                                                                                                data-leadid="$leadsModel.getId()" style="margin-bottom:2px;">
                                                                                                        Generate Link
                                                                                                </button>
                                                                                                <button class="btn btn-xs btn-success verifyGeoManual"
                                                                                                                data-leadid="$leadsModel.getId()">Verify Manually
                                                                                                </button>
                                                                                        </div>
                                                                                #end
                                                                        </td>
                                                                        <td>
                                                                                <button class="btn btn-primary view" data-requestid="$leadsModel.getId()"
                                                                                                data-toggle="modal" data-target="#fetchLeadActivityData" type="button">
                                                                                        View
                                                                                </button>
                                                                                #if($leadsModel.getRecordingUrl())
                                                                                        <a class="btn btn-success btn-xs" href="$leadsModel.getRecordingUrl()" target="_blank"
                                                                                           title="Play AI call recording">
                                                                                                <i class="fa fa-play"></i> Recording
                                                                                        </a>
                                                                                #end
                                                                        </td>
                                                                        <td>
                                                                                <button class="btn btn-primary editLead" data-leadid="$leadsModel.getId()"
                                                                                                data-toggle="modal" data-target="#editLeadData" type="button">
                                                                                        Edit
                                                                                </button>
                                                                        </td>

                                                                </tr>
                                   #end
                                        #else
                                                <tr>
                                                                <td colspan="16" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
                                                </tr>
                                        #end
                                </tbody>
                        </table>
                </div>
            </div>