
<?php $__env->startSection('title'); ?>
<?php echo e(__("message.Save Package")); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="page-header">
   <h3 class="page-title"><?php echo e(__("message.Save Package")); ?> </h3>
   <div class="col-sm-6">
      <?php if(__("message.Is_rtl")=='1'): ?>
      <ol class="breadcrumb float-sm-left">
      <?php else: ?>
      <ol class="breadcrumb float-sm-right">
         <?php endif; ?>
         <li class="breadcrumb-item"><a href="<?php echo e(route('admin-dashboard')); ?>"><?php echo e(__("message.Home")); ?></a></li>
         <li class="breadcrumb-item"><a href="<?php echo e(route('show-package')); ?>"><?php echo e(__("message.Package")); ?></a></li>
         <li class="breadcrumb-item active"><?php echo e(__("message.Save Package")); ?></li>
      </ol>
   </div>
</div>
<div class="row" style="display: flex;justify-content: center;">
   <div class="col-md-9">
      <div class="card">
         <div class="card-header">
            <h3 class="card-title"><?php echo e(__("message.Save Package")); ?></h3>
         </div>
         <div class="card-body p-6">
            <div class="panel panel-primary">
               <div class=" tab-menu-heading p-0 bg-light">
                  <div class="tabs-menu1 ">
                     <!-- Tabs --> 
                     <ul class="nav panel-tabs">
                        <li class=""><a href="#tab5" class="<?=isset($tab)&&$tab==1?'active':''?>"  data-bs-toggle="tab"><?php echo e(__("message.General Information")); ?></a></li>
                        <li><a href="#tab6" data-bs-toggle="tab" class="<?=isset($tab)&&$tab==2?'active':''?>" ><?php echo e(__("message.Lab Test Information")); ?></a></li>
                        <li><a href="#tab8" data-bs-toggle="tab" class="<?=isset($tab)&&$tab==3?'active':''?>" ><?php echo e(__("message.Test Information")); ?></a></li>
                     </ul>
                  </div>
               </div>
               <div class="panel-body tabs-menu-body">
                  <div class="tab-content">
                     <div class="tab-pane <?=isset($tab)&&$tab==1?'active':''?>" id="tab5">
                        <form action="<?php echo e(route('save-package-basic-info')); ?>" method="post" enctype="multipart/form-data">
                           <?php echo e(csrf_field()); ?>

                           <input type="hidden" name="id" id="id" value="<?php echo e($id); ?>">
                           <div class="form-group">
                              <label for="name"><?php echo e(__("message.Name")); ?><span class="reqfield">*</span></label>
                              <input type="text" id="name" name="name" class="form-control" placeholder='<?php echo e(__("message.Enter Package Name")); ?>' required="" value="<?php echo e(isset($data->name)?$data->name:''); ?>">
                           </div>
                           <div class="form-group">
                              <label for="short_desc"><?php echo e(__("message.Short Description")); ?><span class="reqfield">*</span></label>
                              <input type="text" id="short_desc" name="short_desc" class="form-control" placeholder='<?php echo e(__("message.Enter Short Description")); ?>' required="" value="<?php echo e(isset($data->short_desc)?$data->short_desc:''); ?>">
                           </div>
                           <div class="row">
                              <div class="form-group col-md-6">
                                 <label for="inputStatus"><?php echo e(__("message.Category")); ?><span class="reqfield">*</span></label>
                                 <select id="category" name="category" required="" class="form-control custom-select" >
                                    <option value=""><?php echo e(__("message.Select Category")); ?></option>
                                    <?php $__currentLoopData = $category; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($c->id); ?>" <?= isset($data->category_id)&&$c->id==$data->category_id?'selected="selected"':''?> ><?php echo e($c->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                 </select>
                              </div>
                           </div>
                           <div class="row">
                              <div class="form-group col-md-6">
                                 <label for="mrp"><?php echo e(__("message.MRP")); ?><span class="reqfield">*</span></label>
                                 <input type="number" step="0.00" id="mrp" name="mrp" class="form-control" placeholder='<?php echo e(__("message.Enter MRP")); ?>' required="" value="<?php echo e(isset($data->mrp)?$data->mrp:''); ?>">
                              </div>
                              <div class="form-group col-md-6">
                                 <label for="price"><?php echo e(__("message.Price")); ?><span class="reqfield">*</span></label>
                                 <input type="number" step="0.00" id="price" name="price" class="form-control" placeholder='<?php echo e(__("message.Enter Selling Price")); ?>' required="" value="<?php echo e(isset($data->price)?$data->price:''); ?>">
                              </div>
                           </div>
                           <div class="form-group">
                              <label for="name"><?php echo e(__("message.Description")); ?><span class="reqfield">*</span></label>
                              <textarea id="description" name="description" required class="ckeditor form-control">
                              <?php echo e(isset($data->description)?$data->description:''); ?>

                              </textarea>                           
                           </div>
                           <div class="row">
                              <div class="col-12">
                                  <?php if(Session::get("is_demo")==1): ?>
                      <button type="button" class="btn btn-success" onclick="disablebtn()"><?php echo e(__('message.Save')); ?></button>
                      <?php else: ?>
                     <button type="submit" class="btn btn-success"><?php echo e(__('message.Save')); ?></button>
                       <?php endif; ?>
                                 
                              </div>
                           </div>
                        </form>
                     </div>
                     <div class="tab-pane <?=isset($tab)&&$tab==2?'active':''?>" id="tab6">
                        <form action="<?php echo e(route('save-package-lab-info')); ?>" method="post" enctype="multipart/form-data">
                           <?php echo e(csrf_field()); ?>

                           <input type="hidden" name="id" id="id" value="<?php echo e($id); ?>">
                          
                           <div class="row">                              
                              <div class="form-group col-md-6">
                                 <label for="report_time"><?php echo e(__("message.Report Time")); ?><span class="reqfield">*</span></label>
                                 <input type="text" id="report_time" name="report_time" class="form-control" placeholder='<?php echo e(__("message.Enter Report Time")); ?>' required="" value="<?php echo e(isset($data->report_time)?$data->report_time:''); ?>">
                              </div>
                           </div>

                           <div class="row">
                              <div class="form-group col-md-6">
                                 <label for="sample_collection"><?php echo e(__("message.Sample Collection")); ?><span class="reqfield">*</span></label>
                                 <select id="sample_collection" name="sample_collection" class="form-control" required="" onchange="samplecollectionchange(this.value)">
                                      <option value="1" <?=isset($data->sample_collection)&&$data->sample_collection=='1'?'selected="selected"':''?> ><?php echo e(__("message.Free")); ?></option>
                                      <option value="2" <?=isset($data->sample_collection)&&$data->sample_collection=='2'?'selected="selected"':''?>><?php echo e(__("message.Paid")); ?></option>
                                 </select>
                                 
                              </div>
                               <?php if(isset($data->sample_collection_fee)): ?>
                              <div class="form-group col-md-6" id="sample_collection_fee_div">
                              <?php else: ?>
                              <div class="form-group col-md-6" id="sample_collection_fee_div" style="display:none;">
                              <?php endif; ?>                                 
                              <label for="sample_collection_fee"><?php echo e(__("message.Sample Collection Fee")); ?><span class="reqfield">*</span></label>
                                <input type="text" id="sample_collection_fee" name="sample_collection_fee" class="form-control" placeholder='<?php echo e(__("message.Enter Sample Collection Fee")); ?>'  value="<?php echo e(isset($data->sample_collection_fee)?$data->sample_collection_fee:''); ?>">
                              </div>
                           </div>

                           <div class="row">
                              <div class="form-group col-md-6">
                                 <label for="fasting_time"><?php echo e(__("message.Is Fast Required")); ?><span class="reqfield">*</span></label>
                                 <select id="fasting_time" name="fasting_time" class="form-control" required="" onchange="fasttimedivhcnage(this.value)">
                                      <option value="1" <?=isset($data->fasting_time)&&$data->fasting_time=='0'?'selected="selected"':''?> ><?php echo e(__("message.No")); ?></option>
                                      <option value="2" <?=isset($data->fasting_time)&&$data->fasting_time=='1'?'selected="selected"':''?> ><?php echo e(__("message.Yes")); ?></option>
                                 </select>
                                 
                              </div>
                               <?php if(isset($data->fast_time)): ?>
                              <div class="form-group col-md-6" id="fast_time_div">
                              <?php else: ?>
                              <div class="form-group col-md-6" id="fast_time_div" style="display:none;">
                              <?php endif; ?>
                                 <label for="fast_time"><?php echo e(__("message.Fast Time")); ?><span class="reqfield">*</span></label>
                                <input type="text" id="fast_time" name="fast_time" class="form-control" placeholder='<?php echo e(__("message.Enter Fast Time")); ?>'  value="<?php echo e(isset($data->fast_time)?$data->fast_time:''); ?>">
                              </div>
                           </div>

                           <div class="row">
                             <div class="form-group col-md-6">
                                 <label for="test_recommended_for"><?php echo e(__("message.Test Recommended For")); ?><span class="reqfield">*</span></label>
                                 <?php $arr = array(); isset($data->test_recommended_for)?$arr = explode(",",$data->test_recommended_for):''; ?>
                                 <select id="test_recommended_for" name="test_recommended_for[]" class="form-control" required="" multiple>
                                      <option value="Male" <?=isset($data->test_recommended_for)&&in_array("Male", $arr)?'selected="selected"':''?> ><?php echo e(__("message.Male")); ?></option>
                                      <option value="Female" <?=isset($data->test_recommended_for)&&in_array("Female", $arr)=='Female'?'selected="selected"':''?> ><?php echo e(__("message.Female")); ?></option>

                                 </select>
                                
                              </div>

                              <div class="form-group col-md-6">
                                 <label for="test_recommended_for_age"><?php echo e(__("message.Recommended For Age")); ?><span class="reqfield">*</span></label>
                                 <input type="text" id="test_recommended_for_age" name="test_recommended_for_age" class="form-control" placeholder='<?php echo e(__("message.Enter Age Recommended For Report")); ?>' required="" value="<?php echo e(isset($data->test_recommended_for_age)?$data->test_recommended_for_age:''); ?>">
                              </div>
                           </div>

                          <div class="form-group ">
                              <label class="realted_package"><?php echo e(__("message.Realted Package")); ?></label>
                                 <select class="form-control select2" name="realted_package[]"  data-placeholder="Choose Browser" multiple>
                                    <?php $__currentLoopData = $packages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($p->id); ?>">
                                       <?php echo e($p->name); ?>

                                    </option>
                                   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                 </select>
                              </div>
                           <div class="form-group">
                                <label for="lab_report"><?php echo e(__("message.Sample Lab Report")); ?><span class="reqfield">*</span></label>
                                 <input type="file" id="lab_report" name="lab_report" class="form-control"  required="">
                           </div>
                           <div class="row">
                              <div class="col-12">
                                 <?php if(Session::get("is_demo")==1): ?>
                      <button type="button" class="btn btn-success" onclick="disablebtn()"><?php echo e(__('message.Save')); ?></button>
                      <?php else: ?>
                     <button type="submit" class="btn btn-success"><?php echo e(__('message.Save')); ?></button>
                       <?php endif; ?>
                                 
                              </div>
                           </div>
                        </form>
                     </div>
                     
                     <div class="tab-pane <?=isset($tab)&&$tab==3?'active':''?>" id="tab8">
                        <form action="<?php echo e(route('save-package-test-info')); ?>" method="post" enctype="multipart/form-data">
                           <?php echo e(csrf_field()); ?>

                           <input type="hidden" name="id" id="id" value="<?php echo e($id); ?>">
                           
                           <input id='add-row' class='btn btn-primary' type='button' value='<?php echo e(__("message.Add Profile")); ?>' />
                             
                              <div class="row" style="margin-left: -15px">
                                <div class="table-responsive">
                                  <table id="test-table" class="table table-condensed">
                                    <thead>
                                      <tr>
                                        <th><?php echo e(__("message.Test Type")); ?></th>
                                        <th><?php echo e(__("message.Test Id")); ?></th>
                                      </tr>
                                    </thead>
                                   
                                    <tbody id="test-body">
                                       <?php $i=0;?>
                                    <?php if(count($test_details)>0): ?>
                                        <?php $__currentLoopData = $test_details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $td): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr id="row<?php echo e($i); ?>">                                       
                                        <td>
                                          <select class="form-control" name="testdetail[<?php echo e($i); ?>][type]" required onchange="selecttesttype(this.value,'<?php echo e($i); ?>')">
                                             <option value=""><?php echo e(__("message.Select Type")); ?></option>
                                             <option value="1" <?=$td->type==1?'selected="selected"':''?> >Parameter</option>
                                             <option value="2" <?=$td->type==2?'selected="selected"':''?>>Profile</option>
                                          </select>
                                        </td>
                                        <td>
                                            <select class="form-control" name="testdetail[<?php echo e($i); ?>][type_id]" id="type_id_<?php echo e($i); ?>"  required >
                                              <option value=""><?php echo e(__("message.Select Test")); ?></option>
                                              <?php if($td->type==1): ?>
                                                   <?php $__currentLoopData = $get_all_paramter; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $a): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                     <option value="<?php echo e($a->id); ?>" <?=$td->type_id==$a->id?'selected="selected"':''?>><?php echo e($a->name); ?></option>
                                                   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                              <?php else: ?>
                                                  <?php $__currentLoopData = $get_profiles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $a): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                     <option value="<?php echo e($a->id); ?>" <?=$td->type_id==$a->id?'selected="selected"':''?>><?php echo e($a->profile_name); ?></option>
                                                   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                              <?php endif; ?>
                                            </select>
                                        </td>
                                        <td>
                                          <input class='delete-row btn btn-primary' type='button' value='<?php echo e(__("message.Delete")); ?>' />
                                        </td>
                                      </tr>
                                          <?php $i++;?>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php else: ?>
                                      <tr id="row0">                                       
                                        <td>
                                          <select class="form-control" name="testdetail[0][type]" required onchange="selecttesttype(this.value,'0')">
                                             <option value=""><?php echo e(__("message.Select Type")); ?></option>
                                             <option value="1"><?php echo e(__("message.Parameter")); ?></option>
                                             <option value="2"><?php echo e(__("message.Profile")); ?></option>
                                          </select>
                                        </td>
                                        <td>
                                            <select class="form-control" name="testdetail[0][type_id]" id="type_id_0"  required >
                                              <option value=""><?php echo e(__("message.Select Test")); ?></option>
                                                <?php $__currentLoopData = $get_all_paramter; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $a): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                  <option value="<?php echo e($a->id); ?>"><?php echo e($a->name); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </td>
                                        <td>
                                          <input class='delete-row btn btn-primary' type='button' value='<?php echo e(__("message.Delete")); ?>' />
                                        </td>
                                      </tr>
                                    <?php endif; ?>
                                    <input type="hidden" name="total_test_no" id="total_test_no" value="<?php echo e($i); ?>">
                                    </tbody>
                                  </table>
                                  
                                </div>
                              </div>
                         
                           <div class="row">
                              <div class="col-12">
                                  <?php if(Session::get("is_demo")==1): ?>
                      <button type="button" class="btn btn-success" onclick="disablebtn()"><?php echo e(__('message.Save')); ?></button>
                      <?php else: ?>
                     <button type="submit" class="btn btn-success"><?php echo e(__('message.Save')); ?></button>
                       <?php endif; ?>
                              </div>
                           </div>
                        </form>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layout.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/freakd1c/public_html/demo/laboratory/resources/views/admin/package/save_package.blade.php ENDPATH**/ ?>