<?php $__env->startSection('title', 'Departamentos'); ?>
<?php $__env->startSection('content'); ?>
    <div class="page-heading"><div><span class="eyebrow">ADMINISTRAÇÃO · ESTRUTURA</span><h1>Departamentos</h1><p>Unidades funcionais e organizacionais da NESTAB.</p></div><a class="primary-link" href="<?php echo e(route('admin.departments.create')); ?>">+ Novo departamento</a></div>
    <section class="panel"><div class="table-wrap"><table class="management-table"><thead><tr><th>Departamento</th><th>Código</th><th>Organização</th><th>Estado</th><th></th></tr></thead><tbody>
        <?php $__currentLoopData = $departments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $department): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><tr class="<?php echo e($department->trashed() ? 'archived-row' : ''); ?>"><td><strong><?php echo e($department->name); ?></strong><small><?php echo e($department->description ?: 'Sem descrição adicional'); ?></small></td><td><code><?php echo e($department->code); ?></code></td><td><?php echo e($department->organization->name); ?></td><td><span class="status-badge <?php echo e(!$department->trashed() && $department->is_active ? 'active' : ''); ?>"><?php echo e($department->trashed() ? 'Arquivado' : ($department->is_active ? 'Activo' : 'Inactivo')); ?></span></td><td class="row-actions"><?php if (! ($department->trashed())): ?><a href="<?php echo e(route('admin.departments.edit', $department)); ?>">Editar</a><form method="POST" action="<?php echo e(route('admin.departments.destroy', $department)); ?>" data-confirm="Arquivar este departamento?"><?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?><button type="submit">Arquivar</button></form><?php endif; ?></td></tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody></table></div></section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Joe B\.codex\.chatgpt-projects\g-p-6a6ce038586481919be04257dc687fef\nestab-ops\resources\views/admin/departments/index.blade.php ENDPATH**/ ?>