Poprawki w wygladzie

This commit is contained in:
Tomasz Boruc 2026-08-29 21:22:38 +02:00
parent b45325aac1
commit 37da0cacd4
2 changed files with 44 additions and 18 deletions

View File

@ -11,19 +11,41 @@
</div>
</x-slot>
<style>
html.dark .employee-profile-card,
html.dark .employee-profile-info,
html.dark .employee-profile-finance {
background-color: #1f2b3d !important;
border-color: rgba(148, 163, 184, 0.18) !important;
color: #f8fafc !important;
}
html.dark .employee-profile-card .employee-balance-card {
background-color: rgba(255, 255, 255, 0.06) !important;
border-color: rgba(148, 163, 184, 0.18) !important;
}
html.dark .employee-profile-finance table,
html.dark .employee-profile-finance th,
html.dark .employee-profile-finance td {
color: #f8fafc !important;
border-color: rgba(148, 163, 184, 0.12) !important;
}
</style>
<div class="py-12">
<div class="max-w-6xl mx-auto sm:px-6 lg:px-8 space-y-6">
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg border border-gray-200 dark:border-gray-700/50">
<div class="employee-profile-card overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm dark:border-gray-700/50 dark:bg-gray-800">
<div class="p-6 text-gray-900 dark:text-white">
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
<div class="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
<div>
<p class="text-sm uppercase tracking-wide text-gray-500 dark:text-gray-400">Pracownik</p>
<h3 class="mt-1 text-3xl font-bold">{{ $user->name }} {{ $user->surname }}</h3>
<h3 class="mt-1 text-3xl font-bold text-slate-900 dark:text-white">{{ $user->name }} {{ $user->surname }}</h3>
</div>
<div class="rounded-xl border border-indigo-200 bg-indigo-50 dark:border-indigo-500/40 dark:bg-indigo-500/10 px-5 py-4 min-w-[220px]">
<p class="text-xs uppercase tracking-wide text-indigo-700 dark:text-indigo-300">Bilans zaliczek</p>
<p class="mt-2 text-3xl font-bold {{ $balance >= 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400' }}">
<div class="employee-balance-card min-w-[220px] rounded-xl border border-white/10 bg-white/5 px-5 py-4 shadow-sm dark:border-slate-600/40 dark:bg-white/5 dark:shadow-slate-950/20">
<p class="text-xs uppercase tracking-wide text-slate-300">Bilans zaliczek</p>
<p class="mt-2 text-3xl font-bold {{ $balance >= 0 ? 'text-emerald-400' : 'text-red-400' }}">
{{ number_format((float) $balance, 2, ',', ' ') }}
</p>
</div>
@ -32,7 +54,7 @@
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg border border-gray-200 dark:border-gray-700/50 p-6">
<div class="employee-profile-info bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg border border-gray-200 dark:border-gray-700/50 p-6">
<h4 class="text-lg font-semibold mb-4">Dane osobowe</h4>
<dl class="space-y-3 text-sm">
@ -52,7 +74,7 @@
<dt class="text-gray-500 dark:text-gray-400">Role</dt>
<dd class="font-medium text-gray-900 dark:text-white">
@forelse($user->roles as $role)
<span class="inline-flex items-center rounded-full bg-gray-100 dark:bg-gray-700 px-2.5 py-1 text-xs font-semibold text-gray-800 dark:text-gray-100 mr-2 mb-2">
<span class="inline-flex items-center rounded-md bg-white/5 px-2.5 py-1 text-xs font-medium text-slate-200 mr-2 mb-2">
{{ $role->name }}
</span>
@empty
@ -63,7 +85,7 @@
</dl>
</div>
<div class="lg:col-span-2 bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg border border-gray-200 dark:border-gray-700/50 p-6">
<div class="employee-profile-finance lg:col-span-2 bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg border border-gray-200 dark:border-gray-700/50 p-6">
<h4 class="text-lg font-semibold mb-4">Podsumowanie finansowe</h4>
@if($user->advances->isEmpty())
@ -72,18 +94,18 @@
<div class="overflow-x-auto">
<table class="min-w-full text-left text-sm">
<thead>
<tr class="border-b border-gray-200 dark:border-gray-700 text-gray-500 dark:text-gray-400">
<th class="pb-3 pr-4 font-semibold">Data</th>
<th class="pb-3 pr-4 font-semibold">Typ</th>
<th class="pb-3 pr-4 font-semibold text-right">Kwota</th>
<tr class="border-b border-gray-200 text-gray-500 dark:border-gray-700 dark:text-gray-400">
<th class="pb-4 pr-20 font-semibold">Data</th>
<th class="pb-4 pr-16 font-semibold">Typ</th>
<th class="pb-4 pr-2 text-right font-semibold">Kwota</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 dark:divide-gray-700/60">
<tbody>
@foreach($user->advances->sortByDesc('date') as $advance)
<tr>
<td class="py-3 pr-4 text-gray-700 dark:text-gray-200">{{ $advance->date->format('d.m.Y') }}</td>
<td class="py-3 pr-4 text-gray-700 dark:text-gray-200">{{ $advance->type?->name ?? '—' }}</td>
<td class="py-3 pr-4 text-right font-medium {{ $advance->amount >= 0 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400' }}">
<td class="py-4 pr-20 text-gray-700 dark:text-gray-200">{{ $advance->date->format('d.m.Y') }}</td>
<td class="py-4 pr-16 text-gray-700 dark:text-gray-200">{{ $advance->type?->name ?? '—' }}</td>
<td class="py-4 pr-2 text-right font-medium {{ $advance->amount >= 0 ? 'text-emerald-400' : 'text-red-400' }}">
{{ number_format((float) $advance->amount, 2, ',', ' ') }}
</td>
</tr>

View File

@ -69,7 +69,11 @@
@forelse($advances as $advance)
<tr class="advance-table-row hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
<td class="py-4 px-4">{{ $advance->date->format('d.m.Y') }}</td>
<td class="py-4 px-4 font-medium">{{ $advance->user->name }} {{ $advance->user->surname }}</td>
<td class="py-4 px-4 font-medium">
<a href="{{ route('users.show', $advance->user) }}" class="text-indigo-600 hover:text-indigo-800 dark:text-indigo-400 dark:hover:text-indigo-300 transition-colors">
{{ $advance->user->name }} {{ $advance->user->surname }}
</a>
</td>
<td class="py-4 px-4">{{ number_format((float) $advance->amount, 2, ',', ' ') }} </td>
<td class="py-4 px-4">{{ $advance->type->name }}</td>
<td class="py-4 px-4">