Add OpenAI API integration and document processing features
- Added OpenAI API key configuration to .env.example. - Integrated OpenAI for document processing, including markdown conversion and data extraction. - Implemented new API routes for fetching document processing status and handling various processing tasks. - Enhanced the App component to manage document status and processing states with user feedback via Snackbar. - Updated CSVImportPanel and TableManagement components to support navigation to specific tabs based on processing results. - Introduced transaction handling in the database configuration for improved error management during document processing.
This commit is contained in:
@@ -56,6 +56,20 @@ class CSVImportPanel extends Component {
|
||||
this.datevFileInputRef = React.createRef();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// Check if we should navigate to a specific tab
|
||||
if (this.props.targetTab) {
|
||||
this.setState({ activeTab: this.props.targetTab });
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
// Handle targetTab changes
|
||||
if (this.props.targetTab !== prevProps.targetTab && this.props.targetTab) {
|
||||
this.setState({ activeTab: this.props.targetTab });
|
||||
}
|
||||
}
|
||||
|
||||
// Tab switch resets type-specific state but keeps success state as-is
|
||||
handleTabChange = (_e, value) => {
|
||||
this.setState({
|
||||
@@ -344,6 +358,7 @@ class CSVImportPanel extends Component {
|
||||
)}
|
||||
|
||||
{currentHeaders && (
|
||||
|
||||
<Box sx={{ mb: 2 }}>
|
||||
<Typography variant="subtitle2" gutterBottom>
|
||||
Erkannte Spalten ({currentHeaders.length}):
|
||||
|
||||
Reference in New Issue
Block a user