Commit Graph

15 Commits

Author SHA1 Message Date
bfa297fc61 fix: unique key warning v DashAttendanceToday
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:49:26 +01:00
5529219234 refactor: sjednoceni zdroje casu na MySQL NOW() + audit log cleanup a UI
- attendance handlery pouzivaji getDbNow() misto PHP date()
- nova helper funkce getDbNow() v AttendanceHelpers.php
- audit log: cleanup endpoint (POST) s volbou stari zaznamu
- audit log: filtry na jednom radku
- dashboard: aktivita prejmenovana na Audit log s odkazem

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:48:05 +01:00
36a864c852 refactor: sjednoceni skeleton loading a animaci napric vsemi moduly
- AttendanceAdmin: full-page skeleton misto castecneho (header+filtry+karty+tabulka)
- AttendanceHistory: fond karta vzdy v DOM se skeleton behem loading (fix pozdni animace)
- Trips: skeleton odpovida realne strukture (stat cards + tabulka misto circle rows)
- ReceivedInvoices: 3 skeleton radky zvyseny na 5 (konzistence)
- ProjectDetail: notes spinner nahrazen skeleton bloky
- Settings: 2FA text "Nacitani..." nahrazen skeleton line
- Sjednoceny animation delays: 0.05/0.12 opraveny na standardni 0.1/0.15
- OffersTemplates: pridany chybejici stagger delays
- Invoices: opraveny duplicitni delays na spravny stagger
- Attendance sidebar: delay snizen na 0.1 (soucasne s hlavnim obsahem)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:26:34 +01:00
b2c2ab6e7a refactor: redesign AuditLog stranky + pagination styling
- AuditLog: admin-page-header/title pattern, FormField filtry, AdminDatePicker,
  skeleton loading, empty state, admin-badge-danger pro destructivni akce
- Pagination CSS: border-top oddeleni, padding sjednocen
- Novy admin-badge-danger styl (cerveny)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:11:31 +01:00
adf202d421 feat: drag & drop razeni polozek pri vytvareni faktury
Nahrazeny tlacitka nahoru/dolu za @dnd-kit drag & drop (SortableRow + DragHandle),
stejny pattern jako v nabidkach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:51:00 +01:00
86d292f763 fix: mobilni header odseknuty - padding-top prepsany !important
padding: 12px !important v @media max-width 480px prepisoval padding-top
pro fixed header offset. Pridan explicitni padding-top s header vyskou.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:42:15 +01:00
2328ba2840 refactor: migrace vsech formularu na FormField komponentu + JWT upgrade
- FormField.jsx: pridana podpora style prop
- 23 stranek migrovano na FormField (166 vyskytu, -246 radku)
- firebase/php-jwt upgrade v6.11 -> v7.0.3 (security advisory fix)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:33:36 +01:00
21f08593e4 feat: P7 FormField komponenta + migrace Vehicles
- FormField.jsx: wrapper pro label + input + error pattern (aria-invalid podpora)
- Vehicles.jsx: migrovano na FormField (demonstrace patternu)
- Postupna migrace dalsich formularovych stranek v budoucnu

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:02:54 +01:00
f88ae25057 feat: P6 operacni viditelnost - audit log prohlizec, cleanup script
- audit-log.php: API endpoint s filtrovanim (akce, entita, datum, hledani) a stranovanim
- AuditLog.jsx: stranka s tabulkou, filtry, pagination, skeleton loading
- Sidebar: polozka "Audit log" pod Systemem (settings.audit permission)
- cleanup.php: CLI script - maze rate limit soubory >24h a audit log >90 dni
- Migrace: settings.audit permission

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:01:33 +01:00
ec44895f3d feat: P5 UX polish - 404 stranka, ErrorBoundary, focus trap, ARIA
- NotFound.jsx: 404 stranka misto redirectu na / (lazy-loaded)
- ErrorBoundary: CSS tridy misto inline stylu, DEV error stack, odkaz na Dashboard
- useFocusTrap hook: Tab/Shift+Tab cycling, auto-focus, restore focus on close
- ConfirmModal: focus trap integrovan
- admin-error-stack CSS pro DEV chybovy vypis

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:46:22 +01:00
df506dfea4 refactor: P3 dekompozice velkych komponent
Dashboard.jsx (1346 -> 378 LOC):
- DashKpiCards, DashQuickActions, DashActivityFeed, DashAttendanceToday, DashProfile, DashSessions
- dashboardHelpers.js (konstanty + helper funkce)

OfferDetail.jsx (1061 -> ~530 LOC):
- useOfferForm hook (form state, draft, items/sections, submit)
- OfferCustomerPicker (customer search/select dropdown)

AttendanceAdmin.jsx (1036 -> ~275 LOC):
- useAttendanceAdmin hook (data fetching, filters, CRUD, print)
- AttendanceShiftTable (shift records table)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:22:38 +01:00
6863c7c557 feat: P2 strankovani - PaginationHelper, Pagination komponenta, integrace do 4 modulu
- PaginationHelper.php: parseParams() + paginate() - DRY backend pagination logika
- Pagination.jsx: frontend strankovaci komponenta (prev/next/cisla/info)
- CSS: .admin-pagination styly v admin.css
- Refaktor handleru: offers, orders, invoices, projects pouzivaji PaginationHelper
- Default 25 zaznamu na stranku (misto 500), max 500
- Frontend: page state + reset na search/filter zmenu
- useListData: pagination data v response

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:07:29 +01:00
6ad20ea04e feat: P1 quick wins - useDebounce hook, DB indexy, odstraneni TCPDF
- useDebounce hook (300ms) integrovan do useListData pro debounce hledani
- useListData rozsiren o page/perPage/pagination parametry (priprava pro P2)
- Migracni SQL s indexy na attendance, invoices, quotations, refresh_tokens, audit_log
- Odstranen nepouzivany TCPDF z composer.json
- Vite build plugin: graceful handling kdyz composer neni v PATH

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:57:02 +01:00
bb2bbb8ff6 feat: mobilni responsivita, testy, klavesove zkratky, drag & drop, univerzalizace
- Mobile responsive CSS (touch targets 44px, iOS anti-zoom, reduced motion)
- Vitest setup s 39 testy (formatters, attendanceHelpers, useTableSort)
- Klavesove zkratky (Shift+? napoveda, Ctrl+S ulozit, navigace)
- Drag & drop pro polozky nabidek (@dnd-kit, SortableRow, useSortableList)
- Univerzalizace: odstraneni BOHA brandingu z UI, emailu, PDF
- Smazany nepotrebne soubory (deploy.sh, AUTH_SYSTEM.md, example_design, .htaccess)
- CORS konfigurovatelny pres env promennou

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:33:37 +01:00
f733dee856 Initial commit 2026-03-12 12:43:56 +01:00