feat: sync rule management and review ui fixes
This commit is contained in:
+14
-10
@@ -219,10 +219,12 @@ function getFileExtension(filename: string): string {
|
||||
|
||||
function mapProcessingStatusToFileStatus(status?: string | null): string {
|
||||
const normalized = (status || '').toLowerCase();
|
||||
if (normalized === 'completed') return 'Processed';
|
||||
if (normalized === 'completed' || normalized === 'processed') return 'Processed';
|
||||
if (normalized === 'failed') return 'Failed';
|
||||
if (normalized === 'running' || normalized === 'queued' || normalized === 'dispatch') return 'Evaluationing';
|
||||
if (normalized === 'waiting' || normalized === 'pending') return 'Waiting';
|
||||
if (normalized === 'cutting') return 'Cutting';
|
||||
if (normalized === 'extractioning') return 'Extractioning';
|
||||
if (normalized === 'evaluationing' || normalized === 'running' || normalized === 'dispatch') return 'Evaluationing';
|
||||
if (normalized === 'waiting' || normalized === 'pending' || normalized === 'queued') return 'Waiting';
|
||||
return 'Waiting';
|
||||
}
|
||||
|
||||
@@ -827,13 +829,15 @@ export async function getDocumentsListFromAPI(searchParams: {
|
||||
if (name) params.keyword = name;
|
||||
if (fileStatus) {
|
||||
const normalizedFileStatus = fileStatus.toLowerCase();
|
||||
if (normalizedFileStatus === 'processed') {
|
||||
params.processingStatus = 'completed';
|
||||
} else if (normalizedFileStatus === 'failed') {
|
||||
params.processingStatus = 'failed';
|
||||
} else {
|
||||
params.processingStatus = 'running';
|
||||
}
|
||||
const processingStatusMap: Record<string, string> = {
|
||||
waiting: 'waiting',
|
||||
cutting: 'Cutting',
|
||||
extractioning: 'Extractioning',
|
||||
evaluationing: 'Evaluationing',
|
||||
processed: 'completed',
|
||||
failed: 'failed',
|
||||
};
|
||||
params.processingStatus = processingStatusMap[normalizedFileStatus] || fileStatus;
|
||||
}
|
||||
|
||||
if (documentTypeIds && documentTypeIds.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user