feat: User ticket close/reopen functionality + docs restructure#8
Merged
inventory69 merged 1 commit intomainfrom Dec 5, 2025
Merged
feat: User ticket close/reopen functionality + docs restructure#8inventory69 merged 1 commit intomainfrom
inventory69 merged 1 commit intomainfrom
Conversation
## Features - ✨ Users can now close and reopen their own tickets - 🔒 Close button (red lock icon) in AppBar for open tickets - 🔓 Reopen button (blue lock_open icon) in AppBar for closed tickets - 📝 Optional closing message dialog (max 500 chars) -⚠️ Reopen limit: 3x per ticket (enforced on backend) - 🎨 Visual feedback: reopen counter badge, limit warning badge - ⏳ Loading states during API operations ## Documentation - 📚 Reorganized all docs to docs/ subdirectory - 📄 Created docs/README.md as comprehensive index - 🔧 Fixed broken emoji characters in README.md - 🔗 Updated all cross-references between docs ## Project Structure - 📂 Moved scripts to scripts/ subdirectory - spa_server.py - generate_adaptive_icons.sh - create_notification_icon.sh - 🗑️ Removed placeholder test/ directory ## Code Changes - lib/models/ticket.dart: Added reopenCount field - lib/screens/user/tickets_screen.dart: Converted to StatefulWidget - Added _closeTicket() and _reopenTicket() methods - Implemented conditional AppBar action buttons - Added dialogs and visual feedback ## Backend - No backend changes required (endpoints already exist) - API: POST /api/tickets/{id}/close - API: POST /api/tickets/{id}/reopen - Permissions: Users can manage their own tickets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements user-facing ticket management capabilities and completely restructures the project documentation to match HazeBot standards.
🎯 What's New
1. User Ticket Actions ✨
Users can now manage their own tickets directly in the app:
2. Documentation Restructure 📚
Complete documentation overhaul for better maintainability:
docs/subdirectorydocs/README.mdindex3. Project Organization 🗂️
Improved project structure:
scripts/subdirectorytest/directory🚀 Features Implemented
Ticket Close/Reopen Flow
Close Ticket:
Reopen Ticket:
Visual Feedback:
📊 Files Changed
Core Changes
Documentation
Project Structure
Planning Documents (New)
🔒 Backend Integration
No backend changes required! ✅
This PR only implements the frontend. The backend API endpoints already exist:
POST /api/tickets/{id}/close- Close ticket with optional messagePOST /api/tickets/{id}/reopen- Reopen ticket (3x limit enforced on backend)Permissions are already correctly implemented:
🧪 Testing Checklist
Close Ticket
Reopen Ticket
Reopen Limit
UI/UX
Code Quality
📱 Deployment
Web Deployment: ✅ Deployed to
admin.haze.proMobile Apps: No changes required (uses direct API connection)
🔄 Migration Notes
No breaking changes! ✅
This PR is fully backward compatible:
📸 Screenshots
Before
After
docs/subdirectoryscripts/subdirectory🎯 Related Issues
Closes #XX (if applicable)
👥 Reviewers
@inventory69
📋 Merge Checklist
Before merging:
🔗 Related PRs/Commits
Previous related work:
📈 Statistics
🚀 Post-Merge Actions
After merging:
💡 Future Enhancements
Potential follow-up features:
Ready to merge! ✅