[34588f42] Performance: Massive Beschleunigung der Analyse durch SQLite-Synchronisierung
- Neue Tabelle JobParticipant speichert detaillierte CSV-Daten von Fotograf.de. - process_reminder_analysis und process_statistics nutzen nun die lokale Datenbank statt Selenium-Crawling. - Neuer 'Daten abgleichen' Button im Vorbereitungs-Tab integriert. - Automatischer Quick-Login Link-Generator basierend auf Zugangscodes.
This commit is contained in:
@@ -45,6 +45,24 @@ function App() {
|
||||
const [isReminderRunning, setIsReminderRunning] = useState(false);
|
||||
const [latestFile, setLatestFile] = useState<any>(null);
|
||||
const [isGmailAuthenticated, setIsGmailAuthenticated] = useState(false);
|
||||
const [isSyncing, setIsSyncing] = useState(false);
|
||||
|
||||
const handleSyncParticipants = async (job: Job) => {
|
||||
setIsSyncing(true);
|
||||
try {
|
||||
const response = await fetch(`${API_BASE_URL}/api/jobs/${job.id}/sync-participants?account_type=${activeTab}`, {
|
||||
method: 'POST'
|
||||
});
|
||||
if (response.ok) {
|
||||
alert("Daten erfolgreich mit Fotograf.de synchronisiert!");
|
||||
} else {
|
||||
alert("Synchronisierung fehlgeschlagen.");
|
||||
}
|
||||
} catch (e) {
|
||||
alert("Netzwerkfehler.");
|
||||
}
|
||||
setIsSyncing(false);
|
||||
};
|
||||
|
||||
// Email States
|
||||
const [reminderResult, setReminderResult] = useState<any[] | null>(null);
|
||||
@@ -958,7 +976,25 @@ function App() {
|
||||
<option key={et.uri} value={et.name}>{et.name}</option>
|
||||
))}
|
||||
</select>
|
||||
<p className="text-xs text-gray-500 mt-2">Wird für QR-Karten und die Terminübersicht benötigt.</p>
|
||||
<p className="text-xs text-gray-500 mt-2 mb-4">Wird für QR-Karten und die Terminübersicht benötigt.</p>
|
||||
|
||||
<div className="pt-4 border-t border-gray-100">
|
||||
<button
|
||||
onClick={() => handleSyncParticipants(selectedJob)}
|
||||
disabled={isSyncing}
|
||||
className="w-full px-3 py-2 bg-white border border-indigo-200 text-indigo-600 text-xs font-bold rounded-lg hover:bg-indigo-50 transition-colors flex items-center justify-center gap-2"
|
||||
>
|
||||
{isSyncing ? (
|
||||
<>
|
||||
<svg className="animate-spin h-3 w-3" viewBox="0 0 24 24" fill="none"><circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" /><path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" /></svg>
|
||||
Sync läuft...
|
||||
</>
|
||||
) : (
|
||||
<>🔄 Daten von Fotograf.de abgleichen</>
|
||||
)}
|
||||
</button>
|
||||
<p className="text-[10px] text-gray-400 mt-2">Aktualisiert E-Mails, Logins & Bestellstatus.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Actions */}
|
||||
|
||||
Reference in New Issue
Block a user