fix: add pointCode to ReviewPointResult interface to survive build
Vite/Remix tree-shaking was stripping pointCode from the return object because it wasn't declared in the ReviewPointResult interface. Also removed debug console.logs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,7 @@ interface EvaluationPointGroup {
|
|||||||
interface ReviewPointResult {
|
interface ReviewPointResult {
|
||||||
id: string | number;
|
id: string | number;
|
||||||
title: string;
|
title: string;
|
||||||
|
pointCode?: string;
|
||||||
groupName: string;
|
groupName: string;
|
||||||
status: string;
|
status: string;
|
||||||
content: string;
|
content: string;
|
||||||
@@ -364,12 +365,7 @@ export async function getReviewPoints(fileId: string, request: Request) {
|
|||||||
pointsMap.set(point.id, point);
|
pointsMap.set(point.id, point);
|
||||||
});
|
});
|
||||||
|
|
||||||
// DEBUG: check if code field exists in point data
|
// console.log('pointsMap-------', pointsMap);
|
||||||
if (evaluationPointsData.length > 0) {
|
|
||||||
const sample = evaluationPointsData[0];
|
|
||||||
console.log('[DEBUG] point sample keys:', Object.keys(sample));
|
|
||||||
console.log('[DEBUG] point sample code:', sample.code, 'name:', sample.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
const groupsMap = new Map<string | number, EvaluationPointGroup>();
|
const groupsMap = new Map<string | number, EvaluationPointGroup>();
|
||||||
groupsData.forEach(group => {
|
groupsData.forEach(group => {
|
||||||
|
|||||||
@@ -781,13 +781,6 @@ export function ReviewPointsList({
|
|||||||
* 过滤评查点
|
* 过滤评查点
|
||||||
* 根据搜索文本和状态过滤条件筛选评查点
|
* 根据搜索文本和状态过滤条件筛选评查点
|
||||||
*/
|
*/
|
||||||
// DEBUG: check all keys on first reviewPoint
|
|
||||||
if (reviewPoints.length > 0) {
|
|
||||||
console.log('[DEBUG] ALL KEYS:', Object.keys(reviewPoints[0]));
|
|
||||||
console.log('[DEBUG] pointCode:', reviewPoints[0].pointCode);
|
|
||||||
console.log('[DEBUG] full object sample:', JSON.stringify(reviewPoints[0]).substring(0, 500));
|
|
||||||
}
|
|
||||||
|
|
||||||
const filteredReviewPoints = reviewPoints.filter(point => {
|
const filteredReviewPoints = reviewPoints.filter(point => {
|
||||||
// 匹配搜索文本
|
// 匹配搜索文本
|
||||||
const matchesSearch = searchText === '' ||
|
const matchesSearch = searchText === '' ||
|
||||||
|
|||||||
Reference in New Issue
Block a user