

<!-- Modal start -->
<div class="modal fade" id="exampleModalCenteredTarget" tabindex="-1" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalCenterTitle">TARGET AND SALES PROGRESS</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form action="<?php echo e(route('TargetAnalysis')); ?>" method="GET">
                <!-- Field wrapper start -->
                <div class="field-wrapper">
                   
                    <select class="select-single js-states" title="Select Term" data-live-search="true" id="switch">
                        <option value="1" selected>Date Filter</option>
                        <option value="2">Month FIlter</option>
                    </select>
                    
                    <div class="field-placeholder">Switch Filter<span class="text-danger">*</span></div>
                </div>
                <!-- Field wrapper end -->


                 <!-- Field wrapper start -->
                 <div class="field-wrapper">
                   
                   <select class="select-single js-states" title="Select Term" data-live-search="true" name="branch">
                   <option selected>ALL BRANCHES</option>
                       <?php $__currentLoopData = $all_branch; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $all_branches): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                           <option><?php echo e($all_branches); ?></option>
                       <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                   </select>
                   
                   <div class="field-placeholder">Branch<span class="text-danger">*</span></div>
               </div>
               <!-- Field wrapper end -->
                
                <!-- Field wrapper start -->
                <div class="field-wrapper" id="datersingle">
                    <div class="input-group">  
                    <input type="date" class="form-control" name="date">      
                        <span class="input-group-text">
                            <i class="icon-calendar1"></i>
                        </span>    
                    </div>
                    <div class="field-placeholder">Datepicker</div>
                </div>
                <!-- Field wrapper end -->


               <!-- Field wrapper start -->
               <div class="field-wrapper"  id="monthpicker">
                <select name="target_month" class="form-control">
                    <option disabled selected value="">Choose Month</option>
                    <option value="1 - <?php echo date("Y");?>">January <?php echo date("Y");?></option>
                    <option value="2 - <?php echo date("Y");?>">February <?php echo date("Y");?></option>
                    <option value="3 - <?php echo date("Y");?>">March <?php echo date("Y");?></option>
                    <option value="4 - <?php echo date("Y");?>">April <?php echo date("Y");?></option>
                    <option value="5 - <?php echo date("Y");?>">May <?php echo date("Y");?></option>
                    <option value="6 - <?php echo date("Y");?>">June <?php echo date("Y");?></option>
                    <option value="7 - <?php echo date("Y");?>">July <?php echo date("Y");?></option>
                    <option value="8 - <?php echo date("Y");?>">August <?php echo date("Y");?></option>
                    <option value="9 - <?php echo date("Y");?>">September <?php echo date("Y");?></option>
                    <option value="10 - <?php echo date("Y");?>">October <?php echo date("Y");?></option>
                    <option value="11 - <?php echo date("Y");?>">November <?php echo date("Y");?></option>
                    <option value="12 - <?php echo date("Y");?>">December <?php echo date("Y");?></option>
                </select>
                    <div class="field-placeholder">Target Month <span class="text-danger">*</span></div>
                </div>
                <!-- Field wrapper end -->

                <hr>
                <div class="field-wrapper">
                    <button type="submit" class="btn btn-primary">Submit</button>
                    </div>
                </form>
               
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
<!-- Modal end -->


<script>

document.getElementById("monthpicker").style.display = "none"; 

    $(document).ready(function(){
    $('#switch').on('change', function() {
      if ( this.value == '1')
      //.....................^.......
      {
        $("#datersingle").show();
        $("#monthpicker").hide();
      }
      else
      {
        $("#datersingle").hide();
        $("#monthpicker").show();
      }
    });
});
</script>
<?php /**PATH /home/morttsons/public_html/morttsonsposfiles/resources/views/modal/target-report.blade.php ENDPATH**/ ?>