Subversion Repositories SmartDukaan

Rev

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


<style>
        .table-striped > tbody > tr:nth-child(odd) > td{
                background: white;
                background-color: white;
        }
        .table-striped > tbody > tr:nth-child(even) > td{
                background: white;
                background-color:white;
        }
        .table-striped > tbody > tr:hover > td,
        .table-striped > tbody > tr:hover {
                background-color: #e98c8f;
                color:white;
        }
        .btn:hover{
                color: grey;
                text-decoration: none;
        }
        .btn-primary:hover{
                color: grey;
                text-decoration: none;
        }
        .sale-details{
                cursor:pointer;
        }
        
</style>

<script>

 $(".refferal-reject").click(function(){
        $("#add-rejection-reason").modal({backdrop: false});
        
    });
    


</script>


<section class="wrapper">
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header"><i class="icon_document_alt"></i>Referral</h3>
                        <ol class="breadcrumb">
                                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
                                <li><i class="icon_document_alt"></i>Referral</li>                                                      
                        </ol>
                </div>
        </div>
        <input id="url" name="url" type="hidden" value="$url"/>
        <div id="refferal-table">
                <div class="row">
                <div class="col-lg-12">
                        <table class="table table-border table-condensed table-bordered" id="referalTable" style="width:100%">
                        
                                 <thead>
                                        <tr>
                                                <th>Referee Id</th>
                                                <th>Referee Name</th>
                                                <th>Referee Email</th>
                                                <th>Business Name</th>
                                                <th>Referee Mobile</th>
                                                <th>Referal Name</th>
                                                <th>Mobile</th>
                                                <th>city</th>
                                                <th>state</th>
                                                <th>Created On</th>
                                                <th>Updated On</th>
                                                <th>Approved Timestamp</th>
                                                <th>Action</th>
                                                <th></th>
                                                
                                        </tr>
                                         </thead>
                                         
                                                <tbody>
                                                #if(!$refferals.isEmpty())
                                                                #foreach( $refferalsModel in $refferals )
                                                                <tr class="refferal-table" data="$refferalsModel.getId()">
                                                                        <td>$refferalsModel.getId()</td>
                                                                        <td>$refferalsModel.getRefereeName()</td>
                                                                        <td>$refferalsModel.getRefereeEmail()</td>

                                                                        #if($customerRetailerMap.get($refferalsModel.getRefereeEmail()).getBusinessName())
                                                                                <td>$customerRetailerMap.get($refferalsModel.getRefereeEmail()).getBusinessName()</td>
                                                                #else
                                                                <td></td>
                                                             #end
                                                                        <td>$refferalsModel.getRefereeMobile()</td>
                                                                        <td>$refferalsModel.getFirstName() $refferalsModel.getLastName()</td>
                                                                        <td>$refferalsModel.getMobile()</td>
                                                                        <td>$refferalsModel.getCity()</td>
                                                                        <td>$refferalsModel.getState()</td>
                                                                        <td>$refferalsModel.getCreatedTimestamp().format($dateTimeFormatter)</td>
                                                                        <td>$refferalsModel.getUpdatedTimestamp().format($dateTimeFormatter)</td>
                                                                        #if($refferalsModel.getApprovedTimestamp())
                                                                                <td>$refferalsModel.getApprovedTimestamp().format($dateTimeFormatter)</td>
                                                                #else
                                                                <td> </td>
                                                                #end
                                                                        #if($refferalsModel.getStatus()=="pending")

                                                                                <td>
                                                                                        <button class="btn btn-primary reffral-validate"
                                                                                                        data-requestid="$refferalsModel.getId()" type="button">Validate
                                                                                        </button>
                                                                     </td>

                                                                                <td>
                                                                                        <button class="btn btn-primary refferal-reject-modal"
                                                                                                        data-requestid="$refferalsModel.getId()" data-toggle="modal"
                                                                                                        data-target="#add-rejection-reason" type="button">Reject
                                                                                        </button>
                                                                     </td>
                                                                        #elseif($refferalsModel.getStatus()=="validate")
                                                                                <td>
                                                                                        <button class="btn btn-primary reffral-approve"
                                                                                                        data-requestid="$refferalsModel.getId()" type="button">Approve
                                                                                        </button>
                                                                     </td>

                                                                                <td>
                                                                                        <button class="btn btn-primary refferal-reject-modal"
                                                                                                        data-requestid="$refferalsModel.getId()" data-toggle="modal"
                                                                                                        data-target="#add-rejection-reason" type="button">Reject
                                                                                        </button>
                                                                     </td>
                                                                     #else
                                                                                 <td>$refferalsModel.getStatus()</td>
                                                                       <td></td>
                                                                     #end
                                                        </tr>   
                                   #end
                                        #else
                                                <tr>
                                                        <td colspan="12" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
                                                </tr>
                                        #end
                                </tbody>
                        </table>
                </div>
            </div>
    </div>
    

        </section>
        
        <div id="refferal-container" style="background:white;background-color:white;">
</div>





 <div id="add-rejection-reason" class="modal" role="dialog">
          <div class="modal-dialog">
        
            <!-- Modal content-->
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Add Reason</h4>
              </div>
           <div class="modal-body">
            <div class = "row">
       <div class="col-lg-12">
          <div>
          
            <textarea class='form-control' rows='1' id='rejectionReason'></textarea>
                        
          </div>
          
          </div>
          </div>
   
      </div>
      
     
       <div class="modal-footer">
                        <button type="button" data-dismiss="modal" class="btn btn-default request-cancel">Cancel</button>
                        <button type="button"   class="btn btn-default refferal-reject">Submit</button>
                   
           </div>
    </div>
   </div>
 </div>
 
 
 <script>

 $(document).ready(function() {

          var table = $('#referalTable').DataTable( {
           
            });
 });
</script>