Subversion Repositories SmartDukaan

Rev

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

<script>
   configureAllPartnerName();
   function partnerServiceDetailsforPartner()
   {
        fofoId=$("#partnerName").val();
        serviceId=$("#serviceName").val();
        console.log(fofoId);
        console.log(serviceId)
        if(!(fofoId==null || serviceId==null) )
        {
        doGetAjaxRequestHandler(context+"/getPartnerServicesDetails/"+serviceId+"/"+fofoId, function(response){
        response = JSON.parse(response);
        if(response)
        {
                console.log(response.applicableType);
                $("#applicableService").val(response.applicableType);
                if(response.active ==true){
                $("#activeService").val("true");
                }
                else{
                $("#activeService").val("false");
                }
                $("#na_comment_services").val(response.na_Comment);
        }
        else
        {
                $("#applicableService").val("");
                $("#activeService").val("");
                $("#na_comment_services").val("");
        }
        });
        }
        
   }
</script>
<section class="wrapper">
   <div class="row">
      <div class="col-lg-12">
         <h3 class="page-header"><i class="icon_document_alt"></i>Service</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>ADD PARTNER SERVICE DETAILS</li>
         </ol>
      </div>
   </div>
   <div class = "row">
      <div class="col-lg-2 form-group">
         <select class="form-control input-sm" id ="partnerName"  placeholder="partnerName" onchange="partnerServiceDetailsforPartner()">
            <option value="" selected disabled>Partner</option>
            #foreach($fofoId in $fofoIdsAndCustomRetailer.keySet())
            #if($selectedFofoId == $fofoId)
            <option value="$fofoId" selected>$fofoIdsAndCustomRetailer.get($fofoId).getBusinessName()</option>
            #else
            <option value="$fofoId">$fofoIdsAndCustomRetailer.get($fofoId).getBusinessName()</option>
            #end
            #end
         </select>
      </div>
      <div class="col-lg-2 form-group">
         <select class="form-control input-sm" id ="serviceName"  placeholder="serviceName" onchange="partnerServiceDetailsforPartner()">
            <option value="" selected disabled>ServiceName</option>
            #foreach($service in $services)
            <option value="$service.getId()">$service.getName()</option>
            #end
         </select>
      </div>
      <div class="col-lg-2 form-group">
         <select class="form-control input-sm" id ="applicableService"  placeholder="applicableService">
            <option value="" selected disabled>Applicable</option>
            #foreach($applicableType in $applicableTypes)
            <option value="$applicableType">$applicableType</option>
            #end
         </select>
      </div>
      <div class="col-lg-3 form-group">
                 <input type="text" class="form-control" id="code" value="" placeholder="enter code">
                </div>
      </div>
   <br>
   <div class="row">
      <div class="col-lg-3 form-group">
         <textarea rows="3" cols="35" placeholder="NA_COMMENT" id="na_comment_services"></textarea>
      </div>
      <div class="col-lg-2 form-group">
         <button class="btn btn-primary add-service-details-for-partner" type="button" style="width:100%;border-radius:0px;">Add</button>
      </div>
   </div>
</section>