Subversion Repositories SmartDukaan

Rev

Rev 32457 | Blame | Last modification | View Log | RSS feed

<script>

 $(".approve").click(function(){
        $("#newAddwalletModal").modal({backdrop: false});
    });
    
    $(".confirm").click(function(){
        $("#newAddwalletModal").modal({backdrop: false});
    });
    
     $(".approved").click(function(){
        $("#newAddwalletModal").modal({backdrop: false});
    });
    
      $(".cancel").click(function(){
        $("#newAddwalletModal").modal({backdrop: false});
    });
</script>

<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 type="text/javascript">
        $(function () {
                getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
                        partnerId = selectedPartner.partnerId;

                        console.log(partnerId);
                });
        });

        $(function () {
                $('input[name="referenceTime"]').daterangepicker(getSingleDatePicker());
        });
</script>
<section class="wrapper">
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header"><i class="icon_document_alt"></i>WALLET ADDN-REQUEST/APPROVED/REJECTED</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>Wallet Addn-Request/Approved/Rejected</li>
                                <li><button class="btn btn-primary newEntry"  data-toggle="modal" data-target="#newEntrywalletModal"  type="button" >New</button>
                                </li>
                        </ol>
                </div>
        </div>
        
        <input id="url" name="url" type="hidden" value="$url"/>
        <div id="add-wallet-request-table">
                <div class="row">
                <div class="col-lg-12">
                        <table class="table table-striped table-advance table-hover">
                                <tbody>
                                        <tr>
                                                <th>Retailer Id</th>
                                                <th>Retailer Name</th>
                                                <th>Email</th>
                                                <th>City</th>
                                                <th>State</th>
                                                <th>Mobile</th>
                                                <th>Transaction Reference</th>
                                                <th>Bank Name</th>
                                                <th>Reference Date</th>
                                                <th>Amount</th>
                                                        <th>Requested By </th>
                                                <th>Created On</th>
                                                <th>Updated On </th>


                                                #if($rStatus == "pending")
                                                <th colspan = 2>Status</th>
                                                #end
                                        </tr>
                                                #if(!$walletRequest.isEmpty())
                                                #foreach( $request in $walletRequest )
                                                        <tr class="add-wallet" data="$request.getId()">
                                                                <td>$request.getRetailerId()</td>
                                                                <td>$fofoIdsAndRetailerName.get($request.getRetailerId()).getBusinessName()</td>
                                                                <td>$fofoIdsAndRetailerName.get($request.getRetailerId()).getEmail()</td>
                                                                <td>$fofoIdsAndRetailerName.get($request.getRetailerId()).getAddress().city</td>
                                                                <td>$fofoIdsAndRetailerName.get($request.getRetailerId()).getAddress().state</td>
                                                                <td>$fofoIdsAndRetailerName.get($request.getRetailerId()).getMobileNumber()</td>
                                                                <td>$request.getTransaction_reference()</td>
                                                                #if($request.getBank_name())
                                                                <td>$request.getBank_name()</td>
                                                                #else
                                                                <td> null</td>
                                                                #end
                                                                <td>$request.getReference_date()</td>

                                                                <td class="currency">$request.getAmount()</td>
                                                                #if(
                                                                        $request.getRequestedBy() > 0)
                                                                        <td>$authUsers.get($request.getRequestedBy()).getFullName()</td>
                                                                #else
                                                                        <td> Retailer </td>
                                                                #end
                                                                <td>$request.getCreateTimestamp().format($dateTimeFormatter)</td>
                                                                <td>$request.getUpdateTimestamp().format($dateTimeFormatter)</td>
                                                                #if($request.getStatus()=="pending")

                                                                <td><button class="btn btn-primary check"  data-requestid="$request.getId()" data-amount="$request.getAmount()" data-toggle="modal" data-target="#newAddwalletModal"  type="button" >Approve</button>
                                                                     </td>
                                                                
                                                                     <td><button class="btn btn-primary rejected" data-requestid="$request.getId()"  type="button" >Reject</button>
                                                                     </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>
    
   <div id="newAddwalletModal" 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">Unsettled Payments</h4>
              </div>
           <div class="modal-body">
           <div id="unsettle-payment-modal">
                
         </div>
      </div>
    </div>
   </div>
 </div>
 
 
 
                        
         <div id="newEntrywalletModal" 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 money to Wallet</h4>
              </div>
           <div class="modal-body">
        <div id="add-wallet-amount">
        <div class="row">
          <div class="col-lg-3">
                          <div class="input-group">
                        <input placeholder="Partner Name" type="text" class="typeahead form-control" id="typeaheadpartner" name="Item" data-provide="typeahead" autocomplete="off">
          </div>
          </div>
          
          <div class="col-lg-3 form-group">
                        <input placeholder="Amount" id="amount" name="amount" type="number" value="" class="form-control input-sm">
                  </div>
                  
                  <div class="col-lg-3 form-group">
                        <input placeholder="Transaction Reference" id="transactionReference" name="transactionReference" type="text" value="" class="form-control input-sm">
               </div>
               </div>
               <div class="row">
                  
                  <div class="col-lg-3 form-group">
                    <select id="bankName" name="bankName"  class="form-control input-sm">
                                  <option value="HDFC Bank Limited">HDFC Bank Limited</option>
                                  <option value="Indusind Bank Ltd">Indusind Bank Ltd</option>
                        </select>
                </div>
                
                 <div class="col-lg-3 form-group">
                 <input id="referenceTime" name="referenceTime" type="text" value="" class="form-control input-sm">
                  </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" data-dismiss="modal"  class="btn btn-default add-money-request">Submit</button>
                   
           </div>
    </div>
   </div>
 </div>
 
    
    #if(!$walletRequest.isEmpty())
        <div class="row" id="add-wallet-request-paginated">
                <div class="col-lg-9">
                        <p>Showing <span class="start">$start</span> to <span class="end">$end</span> of <span class="size">$size</span> items</p>
                </div>
                <div class="col-lg-3" style="text-align:right;">
                                <div class="btn-group" style="width:40%">
                                        <button class="btn btn-primary previous" disabled="disabled" style="width:100%">Previous</button>
                                </div>
                                <div class="btn-group" style="width:40%">
                                        #if($end >= $size)
                                                <button class="btn btn-primary next" style="width:100%" disabled="disabled">Next</button>
                                        #else
                                                <button class="btn btn-primary next" style="width:100%">Next</button>
                                        #end
                                </div>
                </div>
            </div>
    #end
</section>
<div id="add-wallet-request-container" style="background:white;background-color:white;">
</div>