<?php $__env->startSection('title','Upload Document | '); ?>
<?php $__env->startSection('content'); ?>
<!-- Content Header (Page header) -->
<div class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6">
                <h1 class="m-0">Upload Document</h1>
            </div><!-- /.col -->
            <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                    <li class="breadcrumb-item"><a href="#">Home</a></li>
                    <li class="breadcrumb-item active">Upload Document</li>
                </ol>
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
    <div class="container-fluid">
        <div class="card card-default">
            <div class="card-header">
                <h3 class="card-title">Upload Document</h3>
            </div>
            <!-- /.card-header -->
            <div class="card-body">
                <?php if(session('success')): ?>
                <div class="alert alert-success alert-dismissible fade show" role="alert">
                    <strong><?php echo e(session('success')); ?></strong>
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <?php endif; ?>
                <?php if(session('error')): ?>
                <div class="alert alert-danger alert-dismissible fade show" role="alert">
                    <strong><?php echo e(session('error')); ?></strong>
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <?php endif; ?>
                <?php if(session('warning')): ?>
                <div class="alert alert-warning alert-dismissible fade show" role="alert">
                    <strong><?php echo e(session('warning')); ?></strong>
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <?php endif; ?>
                <?php if(!empty($data)): ?>
                <form action="<?php echo e(route('store.claim.document')); ?>" method="post" autocomplete="off" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                
                    <input type="hidden" name="applied_claim_id" value="<?php echo e($data->id); ?>"> 
                    <div class="row">
                        <div class="col-md-4">
                            <div class="form-group">
                                <label for="emp_id">Employee ID</label>
                                <input type="text" class="form-control" value="<?php echo e($data->emp_id); ?>" disabled>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <label for="emp_name">Employee Name</label>
                                <input type="text" class="form-control" value="<?php echo e($data->emp_name); ?>" disabled>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <label for="Claim">Claim</label>
                                <input type="text" class="form-control" value="<?php echo e($data->claim_category); ?>" disabled>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="upload_file">Upload File</label>
                                <input type="file" name="upload_file"
                                    class="form-control   <?php if( $errors->has('upload_file')): ?> is-invalid border-danger  <?php endif; ?>"
                                    value="<?php echo e(old('upload_file')); ?>" id="upload_file">
                                <small class="text-danger upload_file_error"></small>
                                <?php if($errors->has('upload_file')): ?>
                                <span id="upload_file-error"
                                    class="error text-danger invalid-feedback"><?php echo e($errors->first('upload_file')); ?></span>
                                <small></small>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <a class="btn btn-secondary m-1" href="<?php echo e(route('list.all.claims')); ?>">Back</a>
                                <input type="submit" name="save" value="Upload Document" class="btn btn-primary">
                                <?php if(!empty($data->claim_document)): ?>
                                    <a class="btn btn-info m-1" href='<?php echo e(asset("public/assets/claim_document/$data->claim_document")); ?>'>View Document</a>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </form>
                <?php else: ?> 
                    <div class="row">
                        <div class="col-md-12 col-lg-12 col-sm-12 mb-2">
                            <p class="p-0 m-0 text-secondary border-muted">
                                <strong>No Record Found</strong>
                            </p>
                        </div>
                    </div>
                <?php endif; ?>
            </div>
        </div>
        <!-- /.card -->
    </div>
    <!--/. container-fluid -->
</section>
<!-- /.content -->
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/legalclaim231/public_html/resources/views/pages/claims/uploadDocument.blade.php ENDPATH**/ ?>