HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/owlcrm/storage/framework/views/b7abbcce724032d1607bd281d194079a.php
<?php $__env->startSection('title', 'Dashboard'); ?>

<?php $__env->startSection('content_header'); ?>
    <h1>Reminder</h1>
    <small>Manage Reminder</small>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="card card-dark">
        <div class="card-header">
            <h3 class="card-title"> Edit Reminder</h3>
        </div>
        <?php if(session('error')): ?>
            <h6 class="alert alert-danger">
                <?php echo e(session('error')); ?>

            </h6>
        <?php endif; ?>
        <?php if($errors->any()): ?>
            <div class="alert alert-danger">
                <ul>
                    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li><?php echo e($error); ?></li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            </div>
        <?php endif; ?>
        <form method="POST" id="edit_reminder" role="form" action="<?php echo e(route('reminder.update', $reminder->id)); ?>"
            class="jqueryValidation">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PATCH'); ?>
            <div class="card-body">

                <div class=" form-group">
                    <label for="reminder_to">Reminder To</label>
                    <select class="form-control" name="reminder_to" id="">
                        <option value="">--Select--</option>
                        <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($user->id); ?>"<?php echo e($reminder->reminder_to == $user->id ? 'selected' : ''); ?>>
                                <?php echo e($user->first_name . $user->last_name); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>

                

                <div class="form-group">
                    <label for="entity_type"> Entity Type </label>
                    <select name="entity_type" id="entity_type" class="form-control">
                        <option value="">--Select--</option>
                        <?php $__currentLoopData = App\Models\Reminder::Entity; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $entity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($key); ?>"<?php echo e($reminder->entity_type == $key ? 'selected' : ''); ?>>
                                <?php echo e($entity); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>
                <div class="form-group">
                    <label for="entity_id">Entity Id</label>
                    <select name="entity_id" id="entity_id" class="form-control">
                        <option value="<?php echo e($reminder->entity_id); ?>" selected>
                            <?php echo e($reminder->entity_id); ?>

                        </option>
                    </select>
                </div>                

                <div class="form-group">
                    <input type="checkbox" id="is_notified" name="is_notified" value="1"
                        <?php echo e($reminder->is_notified == 1 ? 'checked' : ''); ?>>
                    <label for="is_notified">Is Notified</label>
                </div>
                <div class=" form-group">
                    <label for="reminder_date">Reminder Date</label>
                    <?php if (isset($component)) { $__componentOriginale5d826ae10df3aa87f8449f474c11664 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale5d826ae10df3aa87f8449f474c11664 = $attributes; } ?>
<?php $component = JeroenNoten\LaravelAdminLte\View\Components\Form\Input::resolve(['id' => 'reminder_date ','name' => 'reminder_date'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('adminlte-input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(JeroenNoten\LaravelAdminLte\View\Components\Form\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'datetime-local','class' => 'form-control','placeholder' => 'Enter  Reminder Date','value' => ''.e(old('reminder_date', $reminder->reminder_date ? \Carbon\Carbon::parse($reminder->due_date)->format('Y-m-d\TH:i') : '')).'','required' => true]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale5d826ae10df3aa87f8449f474c11664)): ?>
<?php $attributes = $__attributesOriginale5d826ae10df3aa87f8449f474c11664; ?>
<?php unset($__attributesOriginale5d826ae10df3aa87f8449f474c11664); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale5d826ae10df3aa87f8449f474c11664)): ?>
<?php $component = $__componentOriginale5d826ae10df3aa87f8449f474c11664; ?>
<?php unset($__componentOriginale5d826ae10df3aa87f8449f474c11664); ?>
<?php endif; ?>
                </div>

                
                <div class="form-group">
                    <input type="checkbox" id="email_notification" name="email_notification" value="1"
                        <?php echo e($reminder->email_notification == 1 ? 'checked' : ''); ?>>
                    <label for="email_notification">Email Notification</label>
                </div>

                <div class="form-group">

                    <input type="checkbox" id="is_active" name="is_active" value="1"
                        <?php echo e($reminder->status == 1 ? 'checked' : ''); ?>>
                    <label for="is_active">Is Active</label>
                </div>

                <div class=" form-group">
                    <label for="description">Description</label>
                    <textarea class="form-control" id="description" name="description" rows="4" placeholder="Enter Description"
                        required><?php echo e(old('description', $reminder->description)); ?></textarea>
                </div>

                <div class="card-footer d-flex justify-content-end">
                    <a href="<?php echo e(route('reminder.index')); ?>" class="btn btn-danger mx-1">Cancel</a>
                    <button type="submit" class="btn btn-dark mx-1">Submit</button>
                </div>
        </form>
    </div>

    <?php $__env->startPush('js'); ?>
        <script>
            // for Entity_type and entity_id
            $(document).ready(function() {
                $('#entity_type').on('change', function() {
                    let entityType = $(this).val();
                    console.log('Selected entity type:', entityType);
                    if (entityType) {
                        $.ajax({
                            url: '/reminder/create',
                            type: 'GET',
                            data: {
                                entity_type: entityType
                            },
                            dataType: 'json',
                            success: function(response) {
                                console.log('Response:', response);
                                let entityIdSelect = $('#entity_id');
                                entityIdSelect.empty();
                                entityIdSelect.append('<option value="">Select</option>');
                                if (response.success) {
                                    $.each(response.entities, function(index, entity) {
                                        entityIdSelect.append('<option value="' + entity
                                            .id + '">' + entity.first_name + entity
                                            .last_name + '</option>');
                                    });


                                } else {
                                    alert(response.message);
                                }
                            },
                            error: function(xhr, status, error) {
                                console.error('Error fetching entity IDs:', error);
                            }
                        });
                    } else {
                        $('#entity_id').empty().append('<option value="">Select Entity Id</option>');
                    }
                });
            });

            //    End Entity_type and entity_id
        </script>
    <?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('adminlte::page', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/owlcrm/resources/views/users/reminder/edit.blade.php ENDPATH**/ ?>