Commit Graph

4 Commits

Author SHA1 Message Date
root b78bdc48bb feat: drag-n-drop status sections + localStorage filters/collapsed + pickup date in logistics board
- Drag-n-drop reordering of status sections (desktop + touch)
- Section order saved in localStorage (logistics-section-order)
- Collapsed/expanded state saved in localStorage (logistics-collapsed)
- Filters (city, status, search) saved in localStorage (logistics-filters)
- Pickup date shown in delivery date column for self-pickup orders
- SMS campaign scripts (manual, second, paid_storage, timer manager)
- SmsCampaignStats + SmsStatusCard components
- DashboardPage: unified LogisticsReadinessBoard for all roles
- OrdersTable cleanup, StatusActionPanel updates
- SW v42
2026-07-01 16:16:22 +00:00
root b74add32ef fix: skip Sunday in delivery date selection (client flow + backend validation)
- buildDefaultDatedAvailableSlots(): skip Sunday via getNextWorkday()
- ClientDeliveryPage.jsx: getAllowedDeliveryDateKeys() + fallback slots skip Sunday
- confirm-delivery-choice edge function: reject Sunday for delivery
- confirm_delivery_choice_by_token SQL RPC: extract(dow) = 0 → RAISE EXCEPTION
- Tests: Friday→Sat+Mon, Saturday→Mon+Tue (skip Sunday)
- Skill updated with pitfall
2026-06-23 04:56:49 +00:00
root d04901d296 security: fix 9 vulnerabilities + OrdersTable 14px font + colored status badges
Security fixes:
- Remove VITE_SUPABASE_SERVICE_ROLE_KEY from Docker build args
- Add missing security.ts functions (verifyInternalRequest, requireSameOrigin, etc)
- Store only OTP hash, remove plaintext otp_code
- Fix CORS origin check: startsWith → exact match
- Use atomic SQL check_rate_limit RPC instead of JS rate limiter
- Mask PII in get_delivery_invitation_by_token single-order path
- Add RequireAuth wrapper for protected routes
- Revoke anon execute on confirm_delivery_choice_by_token
- Add HSTS header to Caddyfile

UI:
- OrdersTable desktop: all cells text-sm (14px)
- Status column: use colored Badge with tone from getOrderGroupStatusTone
- Header row: text-sm (14px)
2026-06-19 12:14:19 +00:00
root e05613ac1d feat: add pickup (самовывоз) delivery type
- New status pickup in delivery workflow
- DB: delivery_type, pickup_date, pickup_time_slot columns
- Client page: tabs Доставка/Самовывоз with PickupSlotsPicker
- PickupSlotsPicker: today/tomorrow/day-after with half-day slots
- Storage notice: free 2 workdays, then 300₽/day
- OrderDetailPanel: delivery type tabs, pickup date/time, status button
- Edge function: delivery_type/pickup fields in confirm-delivery-choice
- RPC: confirm_delivery_choice_by_token updated for pickup
- orderGroupRepository: full pickup field mapping
2026-06-10 12:02:46 +00:00