Commit Graph

113 Commits

Author SHA1 Message Date
poduck
83815fcb34 feat: Implement staff invitation system with role-based permissions
- Add StaffInvitation model with token-based 7-day expiration
- Create invitation API endpoints (create, cancel, resend, accept, decline)
- Add permissions JSONField to User model for granular access control
- Implement frontend invite modal with role-specific permissions:
  - Manager: can_invite_staff, can_manage_resources, can_manage_services,
    can_view_reports, can_access_settings, can_refund_payments
  - Staff: can_view_all_schedules, can_manage_own_appointments
- Add edit staff modal with permissions management and deactivate option
- Create AcceptInvitePage for invitation acceptance flow
- Add active/inactive staff separation with collapsible section
- Auto-create bookable resource when configured at invite time
- Remove Quick Add Appointment from dashboard

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 02:03:48 -05:00
poduck
b10426fbdb feat: Add photo galleries to services, resource types management, and UI improvements
Major features:
- Add drag-and-drop photo gallery to Service create/edit modals
- Add Resource Types management section to Settings (CRUD for custom types)
- Add edit icon consistency to Resources table (pencil icon in actions)
- Improve Services page with drag-to-reorder and customer preview mockup

Backend changes:
- Add photos JSONField to Service model with migration
- Add ResourceType model with category (STAFF/OTHER), description fields
- Add ResourceTypeViewSet with CRUD operations
- Add service reorder endpoint for display order

Frontend changes:
- Services page: two-column layout, drag-reorder, photo upload
- Settings page: Resource Types tab with full CRUD modal
- Resources page: Edit icon in actions column instead of row click
- Sidebar: Payments link visibility based on role and paymentsEnabled
- Update types.ts with Service.photos and ResourceTypeDefinition

Note: Removed photos from ResourceType (kept only for Service)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 01:11:53 -05:00
poduck
a7c756a8ec feat: Implement staff selection for STAFF resource type in resource modal 2025-11-27 22:08:15 -05:00
poduck
86a4e87ed6 Enhance month view overlay with preview, auto-scroll, and 1s delay
- Fix backend type comparison in AvailabilityService (int vs string)
- Add durationMinutes to month overlay drop to fix end_time calculation
- Add live preview of dragged appointment in overlay with lane splitting
- Implement horizontal auto-scroll when dragging to overlay edges
- Add 1-second delay before overlay appears for easier date navigation
- Remove redundant drop zone highlight (preview shows position)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 21:48:34 -05:00
poduck
2a95b007e2 feat: Implement overlapping lane layout for Month View drop overlay 2025-11-27 20:22:57 -05:00
poduck
d54d9eee6b feat: Refine month view: fade non-current month days and add auto-scroll to drop overlay 2025-11-27 20:21:22 -05:00
poduck
d7cc83ebdd feat: Implement drag-and-drop in Month View with 'Day Snap' time slot overlay 2025-11-27 20:14:48 -05:00
poduck
373257469b Add scheduler improvements, API endpoints, and month calendar view
Backend:
- Add /api/customers/ endpoint (CustomerViewSet, CustomerSerializer)
- Add /api/services/ endpoint with Service model and migrations
- Add Resource.type field (STAFF, ROOM, EQUIPMENT) with migration
- Fix EventSerializer to return resource_id, customer_id, service_id
- Add date range filtering to EventViewSet (start_date, end_date params)
- Add create_demo_appointments management command
- Set default brand colors in business API

Frontend:
- Add calendar grid view for month mode in OwnerScheduler
- Fix sidebar navigation active link contrast (bg-white/10)
- Add default primaryColor/secondaryColor fallbacks in useBusiness
- Disable WebSocket (backend not implemented) to stop reconnect loop
- Fix Resource.type.toLowerCase() error by adding type to backend

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 20:09:04 -05:00
poduck
38c43d3f27 Relax CSP settings in local.py to fix Stripe Connect issues
- Convert CSP settings to lists
- Add 'unsafe-eval' and 'unsafe-inline' to script-src
- Add 'blob:' to default-src as fallback
- Update connect-src to include Stripe domains
2025-11-27 12:39:17 -05:00
poduck
4ca3144658 Add embedded Dev Quick Login to Login Page 2025-11-27 12:36:23 -05:00
poduck
06ed9e6f69 Fix Frontend Issues: CSP, Chart Height, and Logout
- Add CSP settings explicitly to local.py to ensure they are active
- Implement logout API endpoint (view and url) to fix 404
- Add min-height to chart container in PlatformDashboard to fix recharts error
2025-11-27 12:33:12 -05:00
poduck
249a9040d2 Implement Platform Superuser UI and Fix API Role Casing
- Update API to return lowercase roles for frontend compatibility
- Fix Tenant owner lookup in platform admin serializer
- Update frontend App.tsx to match tarball implementation
- Prioritize vite.config.js for HMR support
- Include pending CSP and CORS configuration updates
2025-11-27 02:16:05 -05:00
poduck
2e111364a2 Initial commit: SmoothSchedule multi-tenant scheduling platform
This commit includes:
- Django backend with multi-tenancy (django-tenants)
- React + TypeScript frontend with Vite
- Platform administration API with role-based access control
- Authentication system with token-based auth
- Quick login dev tools for testing different user roles
- CORS and CSRF configuration for local development
- Docker development environment setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 01:43:20 -05:00