File manager - Edit - /var/www/html/portalHomolog/storage/framework/views/5a6c358df106b32d072685910198cc5b.php
Back
<?php $__env->startSection("title", env("APP_NAME") . " :: " . __("Lista de Usuário")); ?> <?php $__env->startSection('content'); ?> <div class="card shadow-sm"> <?php $headLine = "<i class='fa-solid fa-user-gear'></i> Lista de Usuário"; ?> <?php echo $__env->make('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($headLine), // 'routeBack' => 'admin.turismoNautico.index', // 'routeBackParams' => [], // 'nameBack' => __("Voltar"), 'routeAdd' => 'admin.contas.create', 'routeAddParams' => [], 'nameAdd' => __('Novo usuário'), "permission" => "SYSADMIN", ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> <div class="card-body"> <div class="mb-3"> <span class="badge bg-primary fs-6"> <i class="fa-solid fa-users me-1"></i> <?php echo e(__('Total de usuários')); ?>: <strong><?php echo e(number_format($totalUsuarios, 0, ',', '.')); ?></strong> </span> </div> <?php echo $__env->make("errors.messageFlash", array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> <?php $hasActiveFilters = request()->filled('q') || request()->filled('structure_id') || request()->filled('status'); ?> <div class="card border-0 shadow-sm mb-4"> <div class="card-header bg-light border-bottom"> <h5 class="mb-0"> <i class="fa-solid fa-filter me-2 text-primary"></i> <?php echo e(__('Filtros de Busca')); ?> </h5> </div> <div class="card-body"> <form id="cadastroDeUsuario" method="get"> <input type="hidden" name="page" value="1"> <input type="hidden" name="sort_by" value="<?php echo e(request()->input('sort_by', 'created_at')); ?>"> <input type="hidden" name="sort_dir" value="<?php echo e(request()->input('sort_dir', 'desc')); ?>"> <div class="row g-2 align-items-end"> <div class="col-12 col-lg-4"> <label for="filtro_q" class="form-label fw-semibold"> <i class="fa-solid fa-magnifying-glass me-1 text-muted"></i> <?php echo e(__('Pesquisar')); ?> </label> <div class="input-group"> <span class="input-group-text bg-light"> <i class="fa-solid fa-user text-muted"></i> </span> <input type="text" id="filtro_q" class="form-control" name="q" placeholder="<?php echo e(__('Nome, matrícula, e-mail ou CPF...')); ?>" value="<?php echo e(request()->input('q')); ?>" > </div> </div> <div class="col-12 col-lg-3"> <label for="filtro_structure_id" class="form-label fw-semibold"> <i class="fa-solid fa-building me-1 text-muted"></i> <?php echo e(__('Pertence a')); ?> </label> <div class="input-group"> <span class="input-group-text bg-light"> <i class="fa-solid fa-sitemap text-muted"></i> </span> <select id="filtro_structure_id" name="structure_id" class="form-select" > <option value=""><?php echo e(__('Todas as secretarias')); ?></option> <?php $__currentLoopData = $secretarias; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $secretaria): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($secretaria->id); ?>" <?php if(request()->input('structure_id') === $secretaria->id): echo 'selected'; endif; ?>> <?php echo e($secretaria->name); ?> (<?php echo e($secretaria->abbreviation); ?>) </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="col-12 col-lg-2"> <label for="filtro_status" class="form-label fw-semibold"> <i class="fa-solid fa-toggle-on me-1 text-muted"></i> <?php echo e(__('Status')); ?> </label> <div class="input-group"> <span class="input-group-text bg-light"> <i class="fa-solid fa-circle-check text-muted"></i> </span> <select id="filtro_status" name="status" class="form-select" > <option value=""><?php echo e(__('Todos')); ?></option> <option value="ATIVADO" <?php if(request()->input('status') === 'ATIVADO'): echo 'selected'; endif; ?>><?php echo e(__('Ativos')); ?></option> <option value="DESATIVADO" <?php if(request()->input('status') === 'DESATIVADO'): echo 'selected'; endif; ?>><?php echo e(__('Inativos')); ?></option> </select> </div> </div> <div class="col-12 col-lg-3"> <div class="d-flex gap-2"> <button class="btn btn-primary flex-fill" type="submit"> <i class="fa-solid fa-magnifying-glass me-1"></i> <?php echo e(__('Filtrar')); ?> </button> <a href="<?php echo e(route('admin.contas.index')); ?>" class="btn btn-outline-secondary"> <i class="fa-solid fa-rotate-left me-1"></i> <?php echo e(__('Limpar')); ?> </a> </div> </div> </div> <?php if($hasActiveFilters): ?> <div class="row mt-3"> <div class="col-12"> <div class="d-flex flex-wrap gap-2 align-items-center"> <small class="text-muted fw-semibold me-2"> <i class="fa-solid fa-info-circle me-1"></i> <?php echo e(__('Filtros ativos:')); ?> </small> <?php if(request()->filled('q')): ?> <span class="badge bg-secondary"> <i class="fa-solid fa-magnifying-glass me-1"></i> <?php echo e(__('Busca')); ?>: "<?php echo e(request()->input('q')); ?>" <button type="button" class="btn-close btn-close-white ms-2" style="font-size: 0.7em;" onclick="document.getElementById('filtro_q').value=''; this.closest('form').submit();"></button> </span> <?php endif; ?> <?php if(request()->filled('structure_id')): ?> <?php $selectedSecretaria = $secretarias->firstWhere('id', request()->input('structure_id')); ?> <?php if($selectedSecretaria): ?> <span class="badge bg-primary"> <i class="fa-solid fa-building me-1"></i> <?php echo e($selectedSecretaria->name); ?> <button type="button" class="btn-close btn-close-white ms-2" style="font-size: 0.7em;" onclick="document.getElementById('filtro_structure_id').value=''; this.closest('form').submit();"></button> </span> <?php endif; ?> <?php endif; ?> <?php if(request()->filled('status')): ?> <span class="badge bg-<?php echo e(request()->input('status') === 'ATIVADO' ? 'success' : 'secondary'); ?>"> <i class="fa-solid fa-toggle-<?php echo e(request()->input('status') === 'ATIVADO' ? 'on' : 'off'); ?> me-1"></i> <?php echo e(request()->input('status') === 'ATIVADO' ? __('Ativos') : __('Inativos')); ?> <button type="button" class="btn-close btn-close-white ms-2" style="font-size: 0.7em;" onclick="document.getElementById('filtro_status').value=''; this.closest('form').submit();"></button> </span> <?php endif; ?> </div> </div> </div> <?php endif; ?> </form> </div> </div> <div class="row"> <div class="col-12"> <div class="table-responsive"> <table class="table table-bordered table-hover table-striped align-middle text-center"> <thead class="table-light"> <tr> <th style="width:150px">#</th> <th class="text-center"> <a href="?<?php echo e(http_build_query(array_merge(request()->except(['sort_by', 'sort_dir', 'page']), ['sort_by' => 'created_at', 'sort_dir' => request('sort_by') == 'created_at' && request('sort_dir') == 'asc' ? 'desc' : 'asc']))); ?>" class="text-decoration-none text-dark"> <?php echo e(__('Criado em')); ?> <?php if(request('sort_by') == 'created_at' || (!request()->has('sort_by') && !request()->has('sort_dir'))): ?> <i class="fa fa-sort-<?php echo e((request('sort_dir', 'desc') == 'asc') ? 'up' : 'down'); ?>"></i> <?php else: ?> <i class="fa fa-sort text-muted"></i> <?php endif; ?> </a> </th> <th><?php echo e(__('Usuário')); ?></th> <th><?php echo e(__('CPF')); ?></th> <th><?php echo e(__('E-mail')); ?></th> <th><?php echo e(__('Status')); ?></th> <th><?php echo e(__('Ações')); ?></th> </tr> </thead> <tbody> <?php $index = 0; ?> <?php $__empty_1 = true; $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td style="width:150px"> <?php echo $__env->make('components.tables._openPhoto', [ 'asset' => $user->photo, 'alt' => $user->name, 'title' => $user->name, 'text' => 'Visualizar foto', ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> </td> <td><?php echo e(date("d/m/Y H:i", strtotime($user->created_at))); ?></td> <td> <strong>Nome: </strong><?php echo e($user->name); ?><br> <?php if($user->matriculation): ?> <strong>Matrícula: </strong><?php echo e($user->matriculation); ?><br> <?php endif; ?> <strong>Pertence a: </strong><?php echo e($user->pertence->name ?? '-'); ?><br> </td> <td><?php echo e($user->cpf); ?></td> <td><?php echo e($user->email); ?></td> <td class="text-center align-middle"> <?php $filterParams = request()->only(['q', 'structure_id', 'status', 'sort_by', 'sort_dir', 'page']); ?> <?php if(auth()->user()->getPermissaoDetalhes("SYSADMIN")['editar']): ?> <form id="<?php echo e("checkStatus_" . $index); ?>" class="fix" action="<?php echo e(route("admin.contas.status", $user->id)); ?>" method="post"> <?php echo csrf_field(); ?> <?php $__currentLoopData = $filterParams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($value): ?> <input type="hidden" name="<?php echo e($key); ?>" value="<?php echo e($value); ?>"> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php if($user->status == "ATIVADO" || $user->status == 1 ): ?> <div class="form-check form-switch d-flex justify-content-center"> <input type="hidden" name="checkStatus" value="DESATIVADO"> <input class="form-check-input" type="checkbox" checked onclick="javascript:document.getElementById('checkStatus_<?php echo e($index); ?>').submit()"> </div> <?php else: ?> <div class="form-check form-switch d-flex justify-content-center"> <input type="hidden" name="checkStatus" value="ATIVADO"> <input class="form-check-input" type="checkbox" onclick="javascript:document.getElementById('checkStatus_<?php echo e($index); ?>').submit()"> </div> <?php endif; ?> </form> <?php endif; ?> </td> <td> <div class="d-flex gap-2 justify-content-center"> <?php $filterParams = request()->only(['q', 'structure_id', 'status', 'sort_by', 'sort_dir', 'page']); $filterQueryString = http_build_query(array_filter($filterParams)); $editUrl = route("admin.contas.edit", $user->id) . ($filterQueryString ? '?' . $filterQueryString : ''); ?> <?php echo $__env->make('components.buttons._navButton', [ "route" => "admin.contas.enderecos.index", "id" => $user->id, "fontawesome" => '<i class="fa-solid fa-location-dot" data-bs-toggle="tooltip" title="Gerenciar Endereços"></i>', "title" => "Endereços", ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> <?php if(auth()->user()->getPermissaoDetalhes("SYSADMIN")['editar']): ?> <a href="<?php echo e($editUrl); ?>" class="btn btn-sm btn-warning" title="<?php echo e(__('Editar')); ?>"> <i class="fa-solid fa-pen-to-square"></i> </a> <?php endif; ?> <?php if(auth()->user()->getPermissaoDetalhes("SYSADMIN")['excluir']): ?> <form class="d-inline" action="<?php echo e(route("admin.contas.destroy", $user->id)); ?>" method="post" onsubmit="return confirmDelete(this)"> <?php echo csrf_field(); ?> <?php echo method_field('delete'); ?> <?php $__currentLoopData = $filterParams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($value): ?> <input type="hidden" name="<?php echo e($key); ?>" value="<?php echo e($value); ?>"> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <input type="hidden" name="confirm" value="<?php echo e(__('* Este usuário será excluído e esta ação não poderá ser desfeita, deseja continuar?')); ?>"> <button type="submit" class="btn btn-sm btn-danger" title="<?php echo e(__('Excluir')); ?>"> <i class="fa-solid fa-trash"></i> </button> </form> <?php endif; ?> </div> </td> </tr> <?php $index++; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <tr> <td colspan="7"><?php echo e(__('* Nenhum registro encontrado')); ?></td> </tr> <?php endif; ?> </tbody> </table> </div> </div> <?php if($users->hasPages()): ?> <div class="col-12 my-3"> <div class="d-flex justify-content-center"> <?php echo e($users->links()); ?> </div> </div> <?php endif; ?> </div> </div> </div> <style> /* Melhorias visuais para os filtros */ .card-header.bg-light { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important; } .input-group-text { border-right: none; transition: all 0.3s ease; } .form-control:focus, .form-select:focus { border-left: none; box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15); } .input-group:focus-within .input-group-text { background-color: #e7f1ff; border-color: #86b7fe; } .badge { font-size: 0.85rem; padding: 0.5rem 0.75rem; display: inline-flex; align-items: center; gap: 0.25rem; } .badge .btn-close { opacity: 0.8; transition: opacity 0.2s ease; } .badge .btn-close:hover { opacity: 1; } .btn-primary { box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2); transition: all 0.3s ease; } .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3); } .btn-outline-secondary { transition: all 0.3s ease; min-width: 100px; } .btn-outline-secondary:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2); } .d-flex.gap-2 { align-items: stretch; } @media (max-width: 991px) { .d-flex.gap-2 { flex-direction: column; } .d-flex.gap-2 .btn { width: 100%; } } .form-label { font-size: 0.875rem; margin-bottom: 0.5rem; } @media (max-width: 768px) { .card-header .d-flex { flex-direction: column; gap: 0.5rem; align-items: flex-start !important; } .badge { font-size: 0.75rem; padding: 0.4rem 0.6rem; } } /* Animação suave para os badges de filtros ativos */ .badge { animation: fadeIn 0.3s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } } </style> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.admin.theme', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/portalHomolog/resources/views/admin/contas/index.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings