06696727dd
══════ Activity log (Spatie) ══════ - spatie/laravel-activitylog v5 instalat - Migration cu company_id pentru tenant scoping - Trait Auditable (App\Models\Concerns\Auditable): - LogOptions cu logFillable + logOnlyDirty + dontSubmitEmptyLogs - tapActivity auto-fill company_id + causer - Descrieri RO (creat/modificat/șters/restaurat) - Aplicat pe: Client, Vehicle, Lead, Deal, WorkOrder, Payment, Expense - ActivityResource (group Admin → Jurnal activitate) - Listă read-only, scope pe tenant, filtre by description/today ══════ Kanban Work Orders ══════ - Custom Filament page la /app/kanban (group Service) - 6 coloane (new → diagnosis → agreement → in_work → awaiting_parts → ready) - Drag-drop nativ HTML5 cu wire:click moveCard() - Cards arată: număr fișă, client, auto, plate, master, total - Link 'Deschide' direct la editare WO ══════ Payroll (Salarii) ══════ Schema: - employee_profiles: user_id, position, base_salary, works_pct, parts_pct - payroll_runs: period (YYYY-MM), base, works_revenue/pct, parts_margin/pct, bonus, fines, advance, total auto-calculat - payroll_adjustments: bonus/fine/advance per period PayrollCalculator service: - compute($userId, $period) — calculează auto: - Manopere finalizate de mecanic în luna respectivă (sum total) - Marja pieselor montate de el (sell-buy * qty) - Bonus + fines + advance from adjustments - Total = base + works% + parts% + bonus - fines - advance Resources Filament (group Finanțe): - EmployeeProfileResource: profil cu % comisioane - PayrollRunResource: salarii cu action 'Calculează luna curentă' (toți userii) + per-row 'Recalculează'; Sum summary pe total - PayrollAdjustmentResource: gestionare bonus/penalizări/avansuri ══════ Cleanup ══════ - Șterse toate /__debug, /__seed, /__try-login, /__force-login, /__whoami, /__coolify-check (security) - Routes/web.php conține doar / redirect, /manifest.json, /sw.js Total Filament tenant routes: 92.
52 lines
3.3 KiB
PHP
52 lines
3.3 KiB
PHP
<x-filament-panels::page>
|
|
@php $columns = $this->getColumns(); @endphp
|
|
|
|
<div class="overflow-x-auto pb-4">
|
|
<div class="flex gap-3 min-w-max" id="kanban-board">
|
|
@foreach ($columns as $status => $col)
|
|
<div class="w-72 flex-shrink-0 bg-gray-50 dark:bg-gray-800 rounded-lg p-3"
|
|
data-status="{{ $status }}"
|
|
ondragover="event.preventDefault(); this.classList.add('ring-2','ring-primary-500')"
|
|
ondragleave="this.classList.remove('ring-2','ring-primary-500')"
|
|
ondrop="event.preventDefault(); this.classList.remove('ring-2','ring-primary-500');
|
|
const id = event.dataTransfer.getData('cardId');
|
|
$wire.moveCard(parseInt(id), '{{ $status }}')">
|
|
<div class="flex items-center justify-between mb-3">
|
|
<h3 class="font-semibold text-sm">{{ $col['label'] }}</h3>
|
|
<span class="text-xs px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded-full">{{ $col['count'] }}</span>
|
|
</div>
|
|
<div class="space-y-2 min-h-[100px]">
|
|
@forelse ($col['cards'] as $wo)
|
|
<div class="bg-white dark:bg-gray-900 rounded-md p-3 border border-gray-200 dark:border-gray-700 cursor-move hover:shadow-md transition"
|
|
draggable="true"
|
|
ondragstart="event.dataTransfer.setData('cardId', '{{ $wo->id }}'); this.classList.add('opacity-50')"
|
|
ondragend="this.classList.remove('opacity-50')">
|
|
<div class="text-xs font-mono text-gray-500">{{ $wo->number }}</div>
|
|
<div class="text-sm font-semibold mt-1 truncate">{{ $wo->client?->name ?? '—' }}</div>
|
|
<div class="text-xs text-gray-600 dark:text-gray-400 mt-1 truncate">
|
|
{{ $wo->vehicle?->make }} {{ $wo->vehicle?->model }}
|
|
@if ($wo->vehicle?->plate)
|
|
<span class="font-mono">[{{ $wo->vehicle->plate }}]</span>
|
|
@endif
|
|
</div>
|
|
<div class="flex items-center justify-between mt-2 text-xs">
|
|
<span class="text-gray-500">{{ $wo->master?->name ?? '—' }}</span>
|
|
<span class="font-semibold">{{ number_format((float)$wo->total, 0, '.', ' ') }} MDL</span>
|
|
</div>
|
|
<a href="{{ route('filament.tenant.resources.work-orders.edit', ['record' => $wo->id]) }}"
|
|
class="block mt-2 text-xs text-primary-600 hover:underline">Deschide →</a>
|
|
</div>
|
|
@empty
|
|
<div class="text-xs text-gray-400 text-center py-4">Gol</div>
|
|
@endforelse
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
<div class="text-xs text-gray-500 mt-4">
|
|
💡 Drag-drop carduri între coloane pentru a schimba statusul.
|
|
</div>
|
|
</x-filament-panels::page>
|