

<?php $__env->startSection('title', 'Goals & KPIs'); ?>
<?php $__env->startSection('heading', 'Goals & KPIs'); ?>

<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('performance.top-submenu', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
    <?php if (isset($component)) { $__componentOriginal53747ceb358d30c0105769f8471417f6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal53747ceb358d30c0105769f8471417f6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.card','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('card'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>

        <div class="mb-4 flex items-center justify-between">
            <p class="text-sm text-slate-500">Track organizational goals and key performance indicators</p>
            <a href="<?php echo e(route('goals.create')); ?>" class="inline-flex rounded-lg bg-teal-700 px-4 py-2 text-sm font-medium text-white hover:bg-teal-600"><i class="bi bi-plus-lg me-1"></i>Add Goal</a>
        </div>

        <div class="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $goals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $goal): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <div class="rounded-xl border border-slate-200 p-4">
                    <div class="mb-2 flex items-center justify-between gap-2">
                        <p class="text-sm font-semibold text-slate-900"><i class="bi bi-bullseye me-1 text-teal-700"></i><?php echo e($goal->title); ?></p>
                        <span class="rounded-full px-2 py-0.5 text-xs whitespace-nowrap
                            <?php if($goal->status === 'on_track'): ?> bg-emerald-100 text-emerald-700
                            <?php elseif($goal->status === 'at_risk'): ?> bg-amber-100 text-amber-700
                            <?php elseif($goal->status === 'behind'): ?> bg-red-100 text-red-700
                            <?php else: ?> bg-blue-100 text-blue-700 <?php endif; ?>">
                            <?php echo e(ucwords(str_replace('_', ' ', $goal->status))); ?>

                        </span>
                    </div>
                    <p class="mb-3 text-xs text-slate-500"><?php echo e($goal->team ?: ($goal->department?->name ?: 'General')); ?></p>

                    <p class="mb-1 text-xs text-slate-500">Progress</p>
                    <progress class="mb-1 h-2 w-full overflow-hidden rounded-full [&::-webkit-progress-bar]:bg-slate-200 [&::-webkit-progress-value]:bg-teal-700" max="100" value="<?php echo e(min(100, max(0, (int) $goal->progress))); ?>"></progress>
                    <p class="mb-3 text-right text-xs text text-slate-500"><?php echo e($goal->progress); ?>%</p>

                    <div class="grid gap-1 text-xs text-slate-500">
                        <p>Target: <?php echo e($goal->target ?: '—'); ?></p>
                        <p>Due: <?php echo e($goal->due_date?->format('n/j/Y') ?? '—'); ?></p>
                    </div>

                    <div class="mt-4 flex items-center gap-3 text-sm">
                        <a href="<?php echo e(route('goals.edit', $goal)); ?>" class="btn-icon-action btn-icon-action--edit" title="Edit" aria-label="Edit"><i class="bi bi-pencil-square"></i></a>
                        <form action="<?php echo e(route('goals.destroy', $goal)); ?>" method="POST" class="inline" onsubmit="return confirm('Delete this goal?');">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button type="submit" class="btn-icon-action btn-icon-action--delete" title="Delete" aria-label="Delete"><i class="bi bi-trash3"></i></button>
                        </form>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <p class="col-span-full rounded-lg border border-dashed border-slate-300 p-6 text-center text-sm text-slate-500">No goals added yet.</p>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>

        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($goals->hasPages()): ?><div class="mt-4"><?php echo e($goals->links()); ?></div><?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal53747ceb358d30c0105769f8471417f6)): ?>
<?php $attributes = $__attributesOriginal53747ceb358d30c0105769f8471417f6; ?>
<?php unset($__attributesOriginal53747ceb358d30c0105769f8471417f6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal53747ceb358d30c0105769f8471417f6)): ?>
<?php $component = $__componentOriginal53747ceb358d30c0105769f8471417f6; ?>
<?php unset($__componentOriginal53747ceb358d30c0105769f8471417f6); ?>
<?php endif; ?>
<?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/kiyohr/v2_version/resources/views/performance/goals/index.blade.php ENDPATH**/ ?>