


<?php $__env->startSection('content'); ?>

<div class="container mt-4">

    <div class="card shadow-lg p-4">

        
        <div class="d-flex justify-content-between align-items-center mb-3">
            <h3>Application Details</h3>

            <span class="badge bg-<?php echo e($application->status=='approved' ? 'success' : 
($application->status=='rejected' ? 'danger' : 
($application->status=='review' ? 'warning' : 'secondary'))); ?> fs-6">
                <?php echo e(strtoupper($application->status)); ?>

            </span>

        </div>

        
        <?php if(session('success')): ?>
        <div class="alert alert-success">
            <?php echo e(session('success')); ?>

        </div>
        <?php endif; ?>

        <hr>

        
        <h5 class="text-primary">Personal Information</h5>

        <div class="row">
            <div class="col-md-6"><strong>Name:</strong> <?php echo e($application->full_name); ?></div>
            <div class="col-md-6"><strong>Father:</strong> <?php echo e($application->father_name); ?></div>
            <div class="col-md-6"><strong>Mother:</strong> <?php echo e($application->mother_name); ?></div>
            <div class="col-md-6"><strong>DOB:</strong> <?php echo e($application->dob); ?></div>
            <div class="col-md-6"><strong>Gender:</strong> <?php echo e($application->gender); ?></div>
            <div class="col-md-6"><strong>NID:</strong> <?php echo e($application->nid); ?></div>
            <div class="col-md-6"><strong>Mobile:</strong> <?php echo e($application->mobile); ?></div>
            <div class="col-md-6"><strong>Email:</strong> <?php echo e($application->email); ?></div>
        </div>

        <hr>

        
        <h5 class="text-primary">Address</h5>

        <div class="row">
            <div class="col-md-6"><strong>Present:</strong> <?php echo e($application->present_address); ?></div>
            <div class="col-md-6"><strong>Permanent:</strong> <?php echo e($application->permanent_address); ?></div>
            <div class="col-md-6"><strong>District:</strong> <?php echo e($application->district); ?></div>
            <div class="col-md-6"><strong>Division:</strong> <?php echo e($application->division); ?></div>
        </div>

        <hr>

        
        <h5 class="text-primary">Professional Information</h5>

        <div class="row">
            <div class="col-md-6"><strong>Education:</strong> <?php echo e($application->education); ?></div>
            <div class="col-md-6"><strong>University:</strong> <?php echo e($application->university); ?></div>
            <div class="col-md-6"><strong>Graduation Year:</strong> <?php echo e($application->graduation_year); ?></div>
            <div class="col-md-6"><strong>Experience:</strong> <?php echo e($application->experience); ?></div>
            <div class="col-md-6"><strong>Current Profession:</strong> <?php echo e($application->current_profession); ?></div>
            <div class="col-md-6"><strong>Previous Media:</strong> <?php echo e($application->previous_media); ?></div>
            <div class="col-md-6"><strong>Category:</strong> <?php echo e($application->reporting_category); ?></div>
            <div class="col-md-6"><strong>Working Area:</strong> <?php echo e($application->working_area); ?></div>
        </div>

        <hr>

        
        <h5 class="text-primary">Online Presence</h5>

        <div class="row">
            <div class="col-md-12">
                <strong>Portfolio:</strong>
                <a href="<?php echo e($application->portfolio_link); ?>" target="_blank">
                    <?php echo e($application->portfolio_link); ?>

                </a>
            </div>

            <div class="col-md-12">
                <strong>Facebook:</strong>
                <a href="<?php echo e($application->facebook_link); ?>" target="_blank">
                    <?php echo e($application->facebook_link); ?>

                </a>
            </div>

            <div class="col-md-12">
                <strong>YouTube:</strong>
                <a href="<?php echo e($application->youtube_link); ?>" target="_blank">
                    <?php echo e($application->youtube_link); ?>

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

        <hr>

       
<h5 class="text-primary">Files</h5>
<div class="row">


<?php if($application->photo): ?>
<div class="col-md-4 mb-3">
    <strong>Photo</strong><br>

    <?php
        $extension = strtolower(pathinfo($application->photo, PATHINFO_EXTENSION));
        $imageExtensions = ['jpg','jpeg','png','webp'];
        $photoUrl = 'https://bdcrimewatch.com/storage/app/public/' . ltrim($application->photo, '/');
    ?>

    <?php if(in_array($extension, $imageExtensions)): ?>

        <img src="<?php echo e($photoUrl); ?>"
             width="180"
             class="img-thumbnail">

    <?php else: ?>

        <a href="<?php echo e($photoUrl); ?>"
           target="_blank"
           class="btn btn-primary btn-sm">
           Open File
        </a>

    <?php endif; ?>

</div>
<?php endif; ?>



<?php if($application->cv_file): ?>
<div class="col-md-4 mb-3">
    <strong>CV</strong><br>

    <?php
        $cvUrl = 'https://bdcrimewatch.com/storage/app/public/' . ltrim($application->cv_file, '/');
    ?>

    <?php if(str_contains($application->cv_file,'.pdf')): ?>

        <a href="<?php echo e($cvUrl); ?>"
           target="_blank"
           class="btn btn-danger btn-sm">
           📄 View PDF
        </a>

    <?php else: ?>

        <a href="<?php echo e($cvUrl); ?>"
           target="_blank"
           class="btn btn-dark btn-sm">
           Download File
        </a>

    <?php endif; ?>

</div>
<?php endif; ?>



<?php if($application->nid_copy): ?>
<div class="col-md-4 mb-3">
    <strong>NID Copy</strong><br>

    <?php
        $nidUrl = 'https://bdcrimewatch.com/storage/app/public/' . ltrim($application->nid_copy, '/');
    ?>

    <?php if(str_contains($application->nid_copy,'.pdf')): ?>

        <a href="<?php echo e($nidUrl); ?>"
           target="_blank"
           class="btn btn-danger btn-sm">
           📄 View PDF
        </a>

    <?php else: ?>

        <img src="<?php echo e($nidUrl); ?>"
             width="180"
             class="img-thumbnail">

    <?php endif; ?>

</div>
<?php endif; ?>

</div>

</div>

        <hr>

        
        <h5 class="text-primary">Admin Update</h5>

        <form method="POST"
            action="<?php echo e(route('application.statusupdate',$application->id)); ?>">

            <?php echo csrf_field(); ?>


            <div class="row">

                <div class="col-md-6 mb-3">
                    <label>Status</label>
                    <select name="status" class="form-select">
                        <option value="pending" <?php echo e($application->status=='pending'?'selected':''); ?>>Pending</option>
                        <option value="review" <?php echo e($application->status=='review'?'selected':''); ?>>Review</option>
                        <option value="approved" <?php echo e($application->status=='approved'?'selected':''); ?>>Approved</option>
                        <option value="rejected" <?php echo e($application->status=='rejected'?'selected':''); ?>>Rejected</option>
                    </select>
                </div>

                <div class="col-md-6 mb-3">
                    <label>Admin Note</label>
                    <textarea name="admin_note"
                        class="form-control"
                        rows="3"><?php echo e($application->admin_note); ?></textarea>
                </div>

            </div>

            <button type="submit" class="btn btn-success">
                Update Application
            </button>

        </form>

        <hr>

        <a href="<?php echo e(route('application.index')); ?>"
            class="btn btn-outline-dark">
            ⬅ Back To List
        </a>

    </div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/dhakasupplier/bdcrimewatch.com/resources/views/application/show.blade.php ENDPATH**/ ?>