Releases: karaOdin/filament-opening-hours
Releases · karaOdin/filament-opening-hours
v2.2.1
v2.2.0
Bug Fixes
v2.1.5
Fix Alpine.js errors and business hours detection
🔧 Fixed Issues
- JavaScript Crashes: Resolved "segment is not defined" Alpine.js template errors
- Status Accuracy: Fixed business hours showing closed when should be open
- Template Errors: Improved Alpine.js binding syntax for production compatibility
- Data Processing: Enhanced validation and error handling for edge cases
🛠️ Technical Improvements
- Added explicit
x-bind:syntax throughout Alpine.js templates - Enhanced spatie/opening-hours data validation and conversion
- Improved error handling with descriptive status messages
- Added debugging capabilities for troubleshooting
🎯 Impact
- Eliminates JavaScript console errors in production
- More accurate business hours status detection
- Better user experience with reliable tooltips
- Robust handling of malformed data
Bug Fixed!
🔧 Fix spatie/opening-hours integration errors Fixed critical "Call to undefined method toArray()" error and improved error handling: • Fixed getOpeningHoursForDay() - replaced toArray() with proper iteration • Fixed getOpeningHoursForDate() - replaced toArray() with proper iteration • Added comprehensive try-catch blocks to all spatie method calls • Enhanced error handling in isOpen(), nextOpen(), nextClose(), etc. • Graceful fallbacks: return false/null/empty array on errors instead of crashing Technical Details: - OpeningHoursForDay objects are iterable but don't have toArray() method - Now properly iterate through time ranges and convert to string array - All spatie integration points now have error protection This prevents crashes when spatie library encounters edge cases or invalid data, ensuring the package remains stable even with malformed business hours data. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
v2.1.1
v2.1.0
✨ What Was Added:
- 📅 Three Date Modes:
- Single Date - Specific holidays (e.g., December 25, 2024)
- 📆 Date Range - Vacation periods (e.g., July 1-15, 2024)
- 🔄 Recurring Annual - Annual holidays (e.g., Every December 25) - 🎯 Enhanced Form Interface:
- Date mode selector with live switching
- Range date picker with validation (end date after start date)
- Smart processing that works with spatie/opening-hours library - 💫 Better Exception Display:
- Range badges showing type (📆 Range, 🔄 Annual, 📅 Single)
- Proper date formatting for ranges ("Jul 1 - Jul 15, 2024")
- Improved sorting and filtering logic
📊 Technical Implementation:
- Dual storage system: UI display + spatie compatibility
- Range processing: Creates individual dates while maintaining range metadata
- Backward compatible: Existing exceptions continue working unchanged
- Comprehensive validation: End date after start date, proper error handling
v2.0.0
🌟 What's New in v2.0.0
✨ Enhanced Form Component
- 🌍 Searchable timezone selector with 500+ timezones
- 🔄 Global enable/disable toggle for entire system
- 📁 Collapsible sections with persistence
- ⏱️ Duration calculator for time slots
- 🎨 Professional styling with gradients
🎯 Advanced Exception Management
- 📝 Modal-based interface (no messy inline forms)
- 🔁 Recurring annual exceptions (e.g., every Dec 25th)
- 🏷️ Custom labels & descriptions
- 🎭 5 exception types with emojis
📊 Premium Table Column
- ⭕ Circular SVG charts with day segments
- 💬 Interactive hover tooltips
- 🎛️ 3 display modes (Circular, Status, Weekly)
- ✨ Animated status indicators
📋 Rich Infolist Entry
- 🌈 Gradient status sections with progress bars
- 📍 Today highlighting with pulse effects
- 🎨 4 display modes (Full, Status, Weekly, Compact)
- 🎯 Exception cards with type badges
🚀 Installation & Upgrade
# New installation
composer require karaodin/filament-opening-hours
# Upgrade existing
composer update karaodin/filament-opening-hours
📖 Documentation
Complete documentation with examples: https://github.com/karaOdin/filament-opening-hours/blob/main/README.md
🎯 Perfect For
- 🏪 E-commerce stores with operating hours
- 🍕 Restaurants & cafes with complex schedules
- 🏥 Service businesses with appointments
- 🏢 Multi-location businesses with different timezones
- 🏗️ SaaS platforms needing business hours functionality
Experience the difference - upgrade today! 🚀
6. **Click "Publish release"**
### **🎊 After Publishing:**
- Packagist will automatically detect the new tag
- Users can install with: `composer require karaodin/filament-opening-hours`
- The new version will be available worldwide within 5-10 minutes
### **📢 Marketing Opportunities:**
1. **Post on social media** about the free alternative to paid plugins
2. **Submit to Filament community** showcasing the premium features
3. **Create demo videos** showing the circular charts and animations
4. **Write blog post** about building a premium plugin for free
**Your v2.0.0 release is ready to dominate the market!** 🌟Bug Fixed!
🔧 Fix form component compatibility ✅ Fixed the Component/array type error: - Renamed make() to schema() for array return - Added OpeningHoursField as proper Field component alternative - Updated documentation with both usage options 💡 Two ways to use: 1. ...OpeningHoursForm::schema() (spread array - recommended) 2. OpeningHoursField::make() (single component) Resolves: ComponentContainer closure argument type error