feat(client): update grid import and dependency
This commit is contained in:
parent
cf6ca2daed
commit
ed9d467c9f
|
|
@ -30,6 +30,7 @@ import {
|
|||
CardContent,
|
||||
Collapse,
|
||||
Badge,
|
||||
Grid,
|
||||
} from '@mui/material';
|
||||
import {
|
||||
ExpandMore as ExpandMoreIcon,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Box,
|
||||
Grid,
|
||||
Card,
|
||||
CardContent,
|
||||
Typography,
|
||||
|
|
@ -19,6 +18,7 @@ import {
|
|||
useTheme,
|
||||
alpha,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
CloudUpload as UploadIcon,
|
||||
Article as DocumentIcon,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import {
|
|||
Chip,
|
||||
IconButton,
|
||||
Collapse,
|
||||
Grid,
|
||||
Button,
|
||||
Tabs,
|
||||
Tab,
|
||||
|
|
@ -20,6 +19,7 @@ import {
|
|||
Divider,
|
||||
Alert,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
ExpandMore as ExpandMoreIcon,
|
||||
ContentCopy as CopyIcon,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import {
|
|||
Button,
|
||||
Chip,
|
||||
Stack,
|
||||
Grid,
|
||||
Divider,
|
||||
IconButton,
|
||||
Paper,
|
||||
|
|
@ -20,6 +19,7 @@ import {
|
|||
DialogTitle,
|
||||
DialogActions,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
ArrowBack as BackIcon,
|
||||
Download as DownloadIcon,
|
||||
|
|
@ -111,10 +111,10 @@ const DocumentDetailsPage: React.FC = () => {
|
|||
try {
|
||||
const response = await documentService.download(document.id);
|
||||
const url = window.URL.createObjectURL(new Blob([response.data]));
|
||||
const link = document.createElement('a');
|
||||
const link = window.document.createElement('a');
|
||||
link.href = url;
|
||||
link.setAttribute('download', document.original_filename);
|
||||
document.body.appendChild(link);
|
||||
window.document.body.appendChild(link);
|
||||
link.click();
|
||||
link.remove();
|
||||
window.URL.revokeObjectURL(url);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { useNavigate } from 'react-router-dom';
|
|||
import {
|
||||
Box,
|
||||
Typography,
|
||||
Grid,
|
||||
Card,
|
||||
CardContent,
|
||||
CardActions,
|
||||
|
|
@ -27,6 +26,7 @@ import {
|
|||
InputLabel,
|
||||
Select,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
GridView as GridViewIcon,
|
||||
ViewList as ListViewIcon,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import {
|
|||
Typography,
|
||||
Card,
|
||||
CardContent,
|
||||
Grid,
|
||||
Button,
|
||||
Chip,
|
||||
Alert,
|
||||
|
|
@ -31,6 +30,7 @@ import {
|
|||
Tab,
|
||||
useTheme,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
Refresh as RefreshIcon,
|
||||
Error as ErrorIcon,
|
||||
|
|
@ -142,7 +142,7 @@ const FailedOcrPage: React.FC = () => {
|
|||
const [detailsOpen, setDetailsOpen] = useState(false);
|
||||
const [expandedRows, setExpandedRows] = useState<Set<string>>(new Set());
|
||||
const [expandedDuplicateGroups, setExpandedDuplicateGroups] = useState<Set<string>>(new Set());
|
||||
const [snackbar, setSnackbar] = useState<{ open: boolean; message: string; severity: 'success' | 'error' }>({
|
||||
const [snackbar, setSnackbar] = useState<{ open: boolean; message: string; severity: 'success' | 'error' | 'info' | 'warning' }>({
|
||||
open: false,
|
||||
message: '',
|
||||
severity: 'success'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { useNavigate, useSearchParams } from 'react-router-dom';
|
|||
import {
|
||||
Box,
|
||||
Typography,
|
||||
Grid,
|
||||
Card,
|
||||
CardContent,
|
||||
TextField,
|
||||
|
|
@ -37,6 +36,7 @@ import {
|
|||
Skeleton,
|
||||
SelectChangeEvent,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
Search as SearchIcon,
|
||||
FilterList as FilterIcon,
|
||||
|
|
@ -295,14 +295,13 @@ const SearchPage: React.FC = () => {
|
|||
setSuggestions(response.data.suggestions || []);
|
||||
|
||||
// Extract unique tags for filter options
|
||||
const tags = [...new Set(results.flatMap(doc => doc.tags))];
|
||||
const tags = [...new Set(results.flatMap(doc => doc.tags || []))].filter(tag => typeof tag === 'string');
|
||||
setAvailableTags(tags);
|
||||
|
||||
// Clear progress after a brief delay
|
||||
setTimeout(() => setSearchProgress(0), 500);
|
||||
|
||||
} catch (err) {
|
||||
clearInterval(progressInterval);
|
||||
setSearchProgress(0);
|
||||
setError('Search failed. Please try again.');
|
||||
console.error(err);
|
||||
|
|
@ -382,10 +381,10 @@ const SearchPage: React.FC = () => {
|
|||
try {
|
||||
const response = await documentService.download(doc.id);
|
||||
const url = window.URL.createObjectURL(new Blob([response.data]));
|
||||
const link = document.createElement('a');
|
||||
const link = window.document.createElement('a');
|
||||
link.href = url;
|
||||
link.setAttribute('download', doc.original_filename);
|
||||
document.body.appendChild(link);
|
||||
window.document.body.appendChild(link);
|
||||
link.click();
|
||||
link.remove();
|
||||
window.URL.revokeObjectURL(url);
|
||||
|
|
@ -456,7 +455,7 @@ const SearchPage: React.FC = () => {
|
|||
|
||||
const handleSearchModeChange = (event: React.MouseEvent<HTMLElement>, newMode: SearchMode | null): void => {
|
||||
if (newMode) {
|
||||
setSearchMode(newMode);
|
||||
setAdvancedSettings(prev => ({ ...prev, searchMode: newMode }));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -616,7 +615,7 @@ const SearchPage: React.FC = () => {
|
|||
size="small"
|
||||
variant="outlined"
|
||||
/>
|
||||
{useEnhancedSearch && (
|
||||
{advancedSettings.useEnhancedSearch && (
|
||||
<Chip
|
||||
icon={<SpeedIcon />}
|
||||
label="Enhanced"
|
||||
|
|
@ -629,7 +628,7 @@ const SearchPage: React.FC = () => {
|
|||
|
||||
{/* Simplified Search Mode Selector */}
|
||||
<ToggleButtonGroup
|
||||
value={searchMode}
|
||||
value={advancedSettings.searchMode}
|
||||
exclusive
|
||||
onChange={handleSearchModeChange}
|
||||
size="small"
|
||||
|
|
@ -766,7 +765,7 @@ const SearchPage: React.FC = () => {
|
|||
<AccordionDetails>
|
||||
<FormControl fullWidth size="small">
|
||||
<InputLabel>Select Tags</InputLabel>
|
||||
<Select
|
||||
<Select<string[]>
|
||||
multiple
|
||||
value={selectedTags}
|
||||
onChange={handleTagsChange}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import {
|
|||
DialogTitle,
|
||||
DialogContent,
|
||||
DialogActions,
|
||||
Grid,
|
||||
Card,
|
||||
CardContent,
|
||||
Divider,
|
||||
|
|
@ -36,6 +35,7 @@ import {
|
|||
LinearProgress,
|
||||
CircularProgress,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import { Edit as EditIcon, Delete as DeleteIcon, Add as AddIcon,
|
||||
CloudSync as CloudSyncIcon, Folder as FolderIcon,
|
||||
Assessment as AssessmentIcon, PlayArrow as PlayArrowIcon,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import {
|
|||
Typography,
|
||||
Paper,
|
||||
Button,
|
||||
Grid,
|
||||
Card,
|
||||
CardContent,
|
||||
Chip,
|
||||
|
|
@ -40,6 +39,7 @@ import {
|
|||
TableHead,
|
||||
TableRow,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
Add as AddIcon,
|
||||
CloudSync as CloudSyncIcon,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import {
|
|||
Typography,
|
||||
Container,
|
||||
Paper,
|
||||
Grid,
|
||||
Card,
|
||||
CardContent,
|
||||
List,
|
||||
|
|
@ -12,6 +11,7 @@ import {
|
|||
ListItemIcon,
|
||||
ListItemText,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
CloudUpload as UploadIcon,
|
||||
AutoAwesome as AutoIcon,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import {
|
|||
Paper,
|
||||
Card,
|
||||
CardContent,
|
||||
Grid,
|
||||
Chip,
|
||||
LinearProgress,
|
||||
Table,
|
||||
|
|
@ -20,6 +19,7 @@ import {
|
|||
IconButton,
|
||||
CircularProgress,
|
||||
} from '@mui/material';
|
||||
import Grid from '@mui/material/GridLegacy';
|
||||
import {
|
||||
Refresh as RefreshIcon,
|
||||
Folder as FolderIcon,
|
||||
|
|
@ -84,7 +84,7 @@ const WatchFolderPage: React.FC = () => {
|
|||
const requeueFailedJobs = async (): Promise<void> => {
|
||||
try {
|
||||
setRequeuingFailed(true);
|
||||
const response = await queueService.requeueFailedItems();
|
||||
const response = await queueService.requeueFailed();
|
||||
const requeued = response.data.requeued_count || 0;
|
||||
|
||||
if (requeued > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue