<?php if (isset($component)) { $__componentOriginal2a2e454b2e62574a80c8110e5f128b60 = $component; } ?>
<?php $component = App\View\Components\Header::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('header'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Header::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal2a2e454b2e62574a80c8110e5f128b60)): ?>
<?php $component = $__componentOriginal2a2e454b2e62574a80c8110e5f128b60; ?>
<?php unset($__componentOriginal2a2e454b2e62574a80c8110e5f128b60); ?>
<?php endif; ?>

<div class="main">
    <div class="container">
        <section class="shadow" id="menu">
            <h3>Личный кабинет</h3>
            <li>
                <p>ФИО: <?php echo e($user->fio); ?></p>
                <p>Почта: <?php echo e($user->email); ?></p>
                <p>Номер телефона: <?php echo e($user->email); ?></p>
                <div>
                    <a href="<?php echo e(route('myapply')); ?>"><button class="but">Мои заявки</button></a>
                    <a href="<?php echo e(route('apply')); ?>"><button class="but">Отправить заявку</button></a>
                </div>
                <?php if(Auth::user()->role == 'admin'): ?>
            <li>
                <form action="<?php echo e(route('addcategory')); ?>" method="POST">
                    <?php echo csrf_field(); ?>
                    <input type="text" class="form-control" id="name" name="name" placeholder="Название категории">
                    <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <div class="alert alert-danger"><?php echo e($message); ?></div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    <input type="submit" class="but" value="Создать категорию"></input>
                </form>
            </li>
            <?php endif; ?>
            </li>
        </section>
        <?php if(Auth::user()->role == 'admin'): ?>
        <div class="applys">
            <li>
                <h3 class="ap">Заявки</h3>
            </li>
            <?php if($aps->count() > 0): ?>
            <?php $__currentLoopData = $aps; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ap): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <section class="apply shadow col-md-4 mb-4">
                <li>
                    <p>Вид услуги:
                        <?php if($ap->category_id): ?>
                        <?php echo e($ap->category->name); ?>

                        <?php elseif($ap->customcategory): ?>
                        <?php echo e($ap->customcategory); ?>

                        <?php else: ?>
                        Не указано
                        <?php endif; ?>
                    </p>
                    <p>Имя: <?php echo e($ap->name); ?></p>
                    <p>Номер: <?php echo e($ap->number); ?></p>
                    <p>Почта: <?php echo e($ap->email); ?></p>
                    <p>Адрес: <?php echo e($ap->address); ?></p>
                    <p>Дата: <?php echo e(date('d.m.Y', strtotime($ap->date))); ?></p>
                    <p>Время: <?php echo e(date('H:i', strtotime($ap->time))); ?></p>
                    <p>Способ оплаты: <?php echo e($ap->paymethod); ?></p>
                    <p>Статус заявки:
                        <?php if($ap->status == 'Новая заявка'): ?>
                        <span class="badge bg-warning">Новая заявка</span>
                        <?php elseif($ap->status == 'Услуга оказана'): ?>
                        <span class="badge bg-success">Услуга оказана</span>
                        <?php else: ?>
                        <span class="badge bg-danger">Услуга отменена</span>
                        <?php endif; ?>
                    </p>
                    <?php if($ap->status == 'Новая заявка'): ?>
                    <div class="trfed">
                        <a href="<?php echo e(Route('true', $ap->id)); ?>"><button class="buttrue">Принять</button></a>
                        <a href="<?php echo e(Route('false', $ap->id)); ?>"><button class="butfalse">Отклонить</button></a>
                    </div>
                    <?php endif; ?>
                </li>
            </section>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <?php else: ?>
            <div class="alert alert-info">
                На данный момент заявок нет
            </div>
            <?php endif; ?>
        </div>
        <?php endif; ?>
    </div>
</div>


<?php if (isset($component)) { $__componentOriginal99051027c5120c83a2f9a5ae7c4c3cfa = $component; } ?>
<?php $component = App\View\Components\Footer::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('footer'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Footer::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal99051027c5120c83a2f9a5ae7c4c3cfa)): ?>
<?php $component = $__componentOriginal99051027c5120c83a2f9a5ae7c4c3cfa; ?>
<?php unset($__componentOriginal99051027c5120c83a2f9a5ae7c4c3cfa); ?>
<?php endif; ?>
<?php if (isset($component)) { $__componentOriginal7ab197232c97c7955fb023ba2629a718 = $component; } ?>
<?php $component = App\View\Components\Scripts::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('scripts'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Scripts::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal7ab197232c97c7955fb023ba2629a718)): ?>
<?php $component = $__componentOriginal7ab197232c97c7955fb023ba2629a718; ?>
<?php unset($__componentOriginal7ab197232c97c7955fb023ba2629a718); ?>
<?php endif; ?><?php /**PATH C:\xampp\htdocs\clean\resources\views/account.blade.php ENDPATH**/ ?>