Commit Graph

19 Commits

Author SHA1 Message Date
Alex Polo
fdbc422c95 feat: add image upload functionality to MenuForm and update image handling in database
- Implemented image upload feature in MenuForm with file size validation and preview.
- Updated the API response for blocked dates to include block_date and note.
- Enhanced booking page to handle URL parameters for date and guests.
- Improved date picker component with better styling and functionality.
- Added CSS styles for a more user-friendly calendar interface.
- Created scripts to alter the image column in the database and embed images as base64.
2025-11-05 10:43:03 +01:00
Alex Polo
baec54814d Implement booking cancellation feature and refactor booking fetching logic 2025-10-31 22:23:59 +01:00
Alex Polo
b2e326c309 Add filter/search to blocked dates list
- Add search input field to filter blocked dates
- Search works on both date and note fields
- Show count: 'Viser X af Y blokeringer'
- Max height with scroll for long lists (max-h-96)
- Hover effect on list items for better UX
- Empty state when no matches found
2025-10-31 21:08:01 +01:00
Alex Polo
02cef8d619 Simplify availability logic: all days open by default
Breaking change: Weekly schedule is now reference-only
- Remove nonWorking modifier and gray styling
- All calendar days show as green (available) by default
- Only manually blocked dates show as red
- Remove confirmation prompts about work schedule
- Update UI text to clarify: 'all days are open unless manually blocked'
- Weekly schedule section now explains it's reference information only

This aligns with the actual business logic: Christian sets his normal
work hours for 2-3 weeks at a time, and the calendar should be open
for bookings on all days unless he manually blocks specific dates
(vacation, sick days, etc.)
2025-10-31 21:05:14 +01:00
Alex Polo
7edcbbb1bf Fix Ctrl+click batch blocking: ensure calendar updates and shows red
- Clear pendingDates after successful blocking
- Add key props to DayPicker to force re-render on state change
- Improve error handling with revert on failure
- Call fetchAll() after batch operations to get real IDs
2025-10-31 20:54:21 +01:00
Alex Polo
c931aa5b98 Fix blocked dates red styling - add modifiersClassNames
- Add modifiersClassNames to both DayPicker modes (single and multiple)
- Blocked dates now show with rdp-day_blocked class (red background)
- NonWorking and pending modifiers also properly styled
- Improve layout: single column with centered calendar
- Better spacing and hover effects on buttons
2025-10-31 20:42:37 +01:00
Alex Polo
d9eb9cb314 Add advanced calendar features and toast notifications
Features:
- Toast notifications system (replaces alerts/confirms)
- Shift+click range selection for blocking dates
- Ctrl/Cmd+click for non-contiguous multi-date selection
- Progress indicators for all async operations
- Improved blocked dates list with formatted dates
- Red styling for blocked dates in calendar
- Blue styling for pending dates (Ctrl+click)
- Weekly schedule awareness (confirm before blocking work days)
- Non-working day styling (gray, dashed border)

Other improvements:
- Featured flag for menus (DB migration script included)
- Image handling fixes (renamed PNG files, updated references)
- Optimistic UI updates for better UX
- Multi-select bulk delete for blocked dates
- Show-only-blocked filter mode

Components:
- src/components/ui/toast.tsx (new)
- scripts/add-featured-column.mjs (new DB migration)
- scripts/README.md (migration documentation)
2025-10-31 20:06:41 +01:00
Alex Polo
b006314526 Fix image formats: rename public images to .png and update sample-data refs; make ImagePlaceholder sizing defer to parent 2025-10-30 19:40:24 +01:00
Alex Polo
2bb9237eef feat(booking): disable blocked and unavailable dates using weekly availability and blocked dates API 2025-10-29 11:17:55 +01:00
Alex Polo
8afd6a36f3 feat(admin): availability management - weekly schedule & blocked dates (DB + API + admin UI) 2025-10-29 10:52:31 +01:00
Alex Polo
5b9bbace8b fix(contact): send from authenticated mailbox and set Reply-To for Office365 SMTP; update env example and README with app-password notes 2025-10-29 10:40:50 +01:00
Alex Polo
19ea933927 feat(contact): add contact form and server-side email via SMTP (Office365); .env.example updated 2025-10-29 10:34:14 +01:00
Alex Polo
dda9b515e1 docs: add deployment, migration and image generation instructions to README; ignore dist/generated images 2025-10-29 10:31:25 +01:00
Alex Polo
b7d6729234 chore: stop tracking generated images + ignore dist and image-cache 2025-10-29 10:28:49 +01:00
Alex Polo
c982bafee4 feat: add MariaDB support, admin API + admin UI persistence, image generation caching and missing menu images; move credentials to .env and add .env.example 2025-10-29 10:26:00 +01:00
Alex Polo
cc2fb207eb Merge branch 'main' of https://github.com/alexpolo1/kokken 2025-10-28 23:27:56 +01:00
Alex
b4efc417b4 Initial commit 2025-10-28 23:23:02 +01:00
Alex Polo
4acfa6a213 Initial commit - Warme catering website 2025-10-28 23:22:33 +01:00
Alex Polo
a8b85b58be Initial commit from Create Next App 2025-10-28 21:59:06 +01:00