<?php $__env->startSection('content'); ?>
<div class="container">
  <div class="row">
    <div class="col-lg-12 d-flex flex-column">
      <div class="row flex-grow">
        <?php if($proposal->isEmpty()): ?>
        <div class="col-7 grid-margin stretch-card">
          <?php else: ?>
          <div class="col-12 grid-margin stretch-card">
            <?php endif; ?>
            <div class="card">
              <div class="card-body">
                <div class="d-sm-flex justify-content-between align-items-start">
                  <div>
                    <h4 class="card-title card-title-dash">Data Proposal</h4>

                  </div>
                </div>
                <br>
                <div class="d-sm-flex align-items-center mt-1 justify-content-between">
                </div>
                <?php if(Session::has('pesan')): ?>
                <div class="alert alert-info alert-dismissible">
                  <a href="#" class="close" data-dismiss="alert">&times;</a>
                  <?php echo e(Session::get('pesan')); ?>

                </div>
                <?php endif; ?>

                <?php if($proposal->isEmpty()): ?>
                <h4>Anda Belum Mengupload Berkas</h4>
                <?php else: ?>
                <table class="table table-light">
                  <thead class="thead-light">
                    <tr>
                      <th>No</th>
                      <th>Judul</th>
                      <th>File</th>
                      <th>Tipe Pendanaan</th>
                      <th>Reviewer</th>
                      <th>Status</th>
                      <th>Aksi</th>
                    </tr>
                  </thead>
                  <tbody>
                    <?php $__currentLoopData = $proposal; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                      <td><?php echo e($loop ->iteration); ?></td>
                      <td><?php echo e($row ->judul); ?></td>
                      <td>
                        <a href="<?php echo e(\Storage::url($row->file)); ?>">Download File</a>
                      </td>
                      <td><?php echo e($row ->pendanaan->jenis); ?></td>
                      <td>Reviewer</td>
                      <td>
                        <?php if($row->status == 'Process'): ?>
                        <small style="color: red;"><?php echo e($row ->status); ?></small>
                        <?php else: ?>
                        <small style="color: rgb(10, 252, 1);"><?php echo e($row ->status); ?></small>
                        <?php endif; ?>

                      </td>
                      <td>
                        
                        <a href="<?php echo e(url('dosen/edit-proposal/'.$row->id, [])); ?>" class="btn btn-sm btn-primary"><i
                            class="mdi mdi-pencil"></i></a>
                        <a href="<?php echo e(url('dosen/hapus-proposal/'.$row->id, [])); ?>" class="btn btn-sm btn-primary"
                          onclick="return confirm('Anda yakin?')"><i class="mdi mdi-delete"></i></a>
                      </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </tbody>
                </table>
                <?php endif; ?>

              </div>
            </div>
          </div>

          <?php if($proposal->isEmpty()): ?>
          <div class="col-md-5 grid-margin stretch-card">
            <div class="card">
              <div class="card-body">
                <h4 class="card-title">Kirim Proposal</h4>

                <?php echo Form::model($objek, ['action' => $action, 'method' => $method, 'files' => true]); ?>


                

                <div class="form-group">
                  <label for="narasi">Jenis Kegiatan Penelitian</label>
                  <?php echo Form::textarea('narasi', null, ['class' =>'form-control']); ?>

                  
                </div>

                

              <div class="form-group">
                <label for="file">Waktu Penelitian (Jam/Minggu)</label>
                
                <span class="text-danger"><?php echo e($errors->first('file')); ?></span>
              </div>

              <div class="form-group">
                <label for="file">File (Format: pdf, word)</label>
                <?php echo e(Form::file('file',['class' =>'form-control'])); ?>

                <span class="text-danger"><?php echo e($errors->first('file')); ?></span>
              </div>

              <?php echo Form::submit('Simpan',['class' => 'btn btn-primary']); ?>

              <?php echo Form::close(); ?>

            </div>
          </div>
        </div>
        <?php else: ?>

        <?php endif; ?>
      </div>
    </div>


  </div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('dosen.layouts.DS', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Choctea\Videos\Data Web UIN\Penelitian\resources\views/dosen/beranda/proposal.blade.php ENDPATH**/ ?>