Commit Graph

8 Commits

Author SHA1 Message Date
Codex Agent c55170208b feat: add visibility filter for permit management and fix V2 visibility logic
- 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
2025-12-29 15:54:53 +08:00
Codex Agent 199a97cceb Fix: Allow searching for unbound permits by name 2025-12-22 16:27:48 +08:00
Codex Agent 73cd32b50d Fix duplicate risk deletion logic and clean up project structure 2025-12-22 11:27:09 +08:00
Codex Agent de25932248 feat: enhance permit details display and cleanup project directory
- 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
2025-12-20 16:53:57 +08:00
Codex Agent b53fb872ed Refine login status bar UI in super_admin.html and db_admin.html 2025-12-18 11:51:43 +08:00
Codex Agent a3f6640b2d feat: V2接口使用预设问题推荐替代LLM生成
- 新增预设问题模板,基于数据库中有许可事项的主题生成问题
- 移除LLM调用,提升响应速度
- 只推荐有实际许可事项的主题相关问题
- 整理项目结构:test文件移至tests/,xlsx移至data/,md文档移至docs/
2025-12-15 13:35:57 +08:00
Codex Agent 1c010f4fdf feat: add authentication system and service department tree structure
## 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>
2025-11-17 15:07:14 +08:00
Codex Agent bfda66afc1 refactor: 重新规划项目结构为标准Python包
主要变更:
- 重组项目目录结构,采用标准Python包组织方式
  * 创建 lawrisk/ 主包
  * 分离 API 路由层 (api/v1.py, api/v2.py)
  * 封装业务逻辑层 (services/)
  * 抽取中间件 (middleware/)
  * 整理工具模块 (utils/)

- 重构应用入口
  * 使用 Flask Blueprint 注册路由
  * 简化 app.py 逻辑

- 添加项目文档
  * 创建 README.md 项目说明
  * 创建 requirements.txt 依赖管理
  * 统一文档到 docs/ 目录

- 文件组织优化
  * 数据文件移动到 data/
  * 测试目录 tests/ 准备就绪

- 修复导入路径
  * 更新所有模块导入为相对路径
  * 确保应用正常启动运行

验证:
 应用成功启动在端口 8000
 所有路由正确注册
 健康检查端点正常响应

Closes: #重构项目结构
2025-10-29 15:31:01 +08:00