- Added 'Enabled Status' dropdown filter to db_admin.html for filtering permits by visibility (visible/hidden/all)
- Updated admin_permits_advanced_filter API to accept and process visibility parameter
- Modified filter_permits_advanced in licensing_repo.py to filter by is_v2_visible column
- Fixed role-based access control to allow department_admin to toggle permit visibility
- Improved parameter parsing in API endpoints for more robust handling
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
1. Bind 'City-level' permits to 'SYSADMIN' department to ensure they are managed by admin.
2. Ensure Foshan 5 regions exist and Service Departments (FSSJSS etc.) are correctly bound to their regions.
3. Update specific permit binding logic to prevent leakage of 'City-level' data to district admins.
4. UI: Restrict region filter in Admin Console for non-admin users to their own region only.
- Added contact_info to permit details view and database schema
- Renamed display labels: 'Responsible Department' -> 'Contact Info (Internal)', 'Contact Info' -> 'Contact Info (External)', 'Jurisdiction Scope' -> 'Implementation Level'
- Implemented risk sorting by serial number and display of serial numbers
- Updated .gitignore to exclude temporary debug/fix/verify scripts
- Cleaned up the project directory by removing temporary files from tracking
- Remove "用户与系统管理" tab and its content from db_admin page
- Delete admin-only CSS styles and role-based logic
- Set "许可事项管理" as the default active tab
- Simplify setupTabsByRole function to remove role checks
- Update DOMContentLoaded handler to use simplified logic
Now users accessing /db_admin will directly see the permits management interface by default.
- Add .claude/ to .gitignore (Claude-specific configuration)
- Add AGENTS.md to .gitignore (development guidelines)
- Add CLAUDE.md to .gitignore (Claude Code guidance)
- These files should not be tracked in version control
- Remove existing tracked instances from repository
- AGENTS.md: Development guidelines and coding standards
- CLAUDE.md: Detailed Claude Code development guide
- Both files are important project documentation that should be in root
- Files also exist in docs/guides/ for documentation organization
- AGENTS.md has been moved to docs/guides/ for consistent structure
- This cleans up the root directory
- All documentation is now properly organized under docs/
- Remove AGENTS.md and CLAUDE.md from .gitignore
- These are important project documentation files that should be tracked
- Updated to reflect the clean directory structure with docs/ organization
## Major Changes
### Authentication System
- Added passlib dependency for password hashing and security
- Integrated auth_service module with automatic admin seeding
- Added authentication blueprint and middleware
- Updated app initialization to ensure auth schema and default accounts
### Service Department Management
- Added build_service_department_tree() function for hierarchical data structure
- Supports nested parent-child relationships for department hierarchy
- Recursive sorting for consistent tree visualization
- Enables advanced admin interface features
### Dependencies
- Added passlib>=1.7.4 for secure password hashing
- Added openpyxl>=3.1.2 for Excel file processing
### UI Improvements
- Enhanced db_admin.html with tabbed interface styling
- Improved spacing and visual layout
- Better organization for multiple admin functions
## Technical Details
- Refactored app.py to use auth_service instead of deprecated ensure_database
- Maintains backward compatibility with existing v2 API
- Clean separation of authentication and business logic
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>