Explorar el Código

fix(report): gate edit by report state

Developer hace 1 mes
padre
commit
53cc7aec62
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      utils/reportEvaluationEdit.js

+ 2 - 1
utils/reportEvaluationEdit.js

@@ -1,7 +1,8 @@
 const EVALUATION_PROCESSING_PROMPT = '评估分析正在进行中,你需要等待1小时左右,我们会在报告生成完成后提示你,你可以去“我的PERILL报告”查阅报告结果。'
 
 function canEditEvaluation(item = {}) {
-	return String(item.reportType || '') === '1' && String(item.state) === '1'
+	const reportState = item.reportState === undefined || item.reportState === null ? item.state : item.reportState
+	return String(item.reportType || '') === '1' && String(reportState) === '1'
 		&& ['RUNNING', 'PENDING'].indexOf(String(item.status || '')) === -1
 }