- API client: switch from /api/v3/document-types to /api/document-types,
replace group_ids with ruleSetIds, add getEntryModules/getRuleSets
- List page: simplified to code/name/entry_module/rule_sets/status columns
- New/Edit page: code + name + description + entry_module dropdown +
rule_set multi-select checklist
- Fix DocumentType type import collision in documents.ts
Replace the old nested upload_info JSON approach with flat
multipart fields (typeId, region, fileRole, createdBy, autoRun,
speed) matching the new leaudit-platform backend.
- uploadDocumentToServer: POST ${API_BASE_URL}/api/upload
- handleFileUpload: pass region from userInfo.area, derive speed
from priority enum, pass createdBy from JWT user_id
- UploadResult replaces FileUploadResponse with documentId/fileId
replacing the old nested result.id/result.file_name pattern
The axios response interceptor was discarding the server's
permission-denied message (e.g. "缺少「用户列表」权限") and
replacing it with a generic "无权限". Now it reads the server
response body and surfaces the exact permission that's missing.
Previously only provincial_admin could edit roles/permissions in
the UI. Now admin (city-level admin) role can also edit. The
backend already enforces fine-grained permission checks, so the
UI gate just needs to match can_manage semantics.
If the API returns a non-string error (e.g. numeric HTTP status code),
calling .includes() directly on it throws "N.includes is not a function".
Convert to string via JSON.stringify first.
Fixes save button crash on rules/new page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Vite tree-shakes pointCode from intermediate data objects. Fix by
querying evaluation_points.code directly in the route loader with
postgrestGet, then patching pointCode onto reviewPoints before
returning to the client. Works for both legacy and GraphRAG paths.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Vite's SSR build strips pointCode from ReviewPointResult return objects.
Workaround: pass a separate pointCodeMap from reviews.ts and apply it
in the route loader (reviews.tsx) which Vite preserves.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add pointCode field to ReviewPoint interface and data pipeline
- Show code badge (e.g., JZ-DJ-001) before evaluation point name
- Search bar now matches against point code in addition to name
- Updated placeholder to indicate code search support
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When documents are processed through GraphRAG pipeline, coordinate
enrichment produces text_bbox (paragraph-level coordinates) instead of
char_positions (character-level OCR coordinates). Added resolveCharPositions()
helper that converts text_bbox to CharPosition[] format, enabling PDF
highlight rendering for GraphRAG-processed documents.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Create placeholder reviewPoints from not_applicable unified results
- Merge with existing reviewPoints for display
- Count notApplicable from reviewPoints for accurate statistics
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- failed_count should be 'warning' not 'error' for scored eval
- Show '未涉及' badge always, not only when count > 0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- getReviewPoints_fromApi returns {data, stats, ...} not {reviewPoints, ...}
- Fixed key check from 'reviewPoints' to 'data'
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- reviewPoints from unified API lacks 'content' field expected by ReviewPointsList
- Use reviewData.reviewPoints (from /api/v3/review-points) which has proper content structure
- Scored data still available via scoredResults prop
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add notApplicable field to Statistics interface
- Show blue "未涉及" badge when count > 0 (display only, no filter)
- Map backend not_applicable_count to frontend statistics
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add missing closing brace for unified API error check
- Properly wrap catch block around error handling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add getUnifiedEvaluationResults API function
- Extend ReviewPointsListProps with flowType, scoredResults, scoredSummary
- Add ScoredResultCard rendering for graphrag flow_type
- Modify reviews.tsx loader to call unified API
- Add scored evaluation component imports
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>