feat: update backend OCR parser, web app, mobile app camera/preview UI, tests, and documentation with sample images

This commit is contained in:
Rafhan Mazaya Fathurrahman committed 2026-07-02 13:33:57 +07:00
1 parent aa3233e411
commit bdb3a49742
71 files changed
+3360 -764

No files matched your search

+5 -2
View File
@@ -45,7 +45,8 @@ class _DocumentsScreenState extends ConsumerState<DocumentsScreen> {
.map((json) => DocumentModel.fromJson(Map<String, dynamic>.from(json)))
.toList();
await localStorage.documentBox.clear();
// Merge server docs into Hive without clearing first,
// so any locally-saved doc (e.g. just confirmed offline) is preserved
for (var doc in serverDocs) {
await localStorage.saveDocument(doc);
}
@@ -184,7 +185,9 @@ class _DocumentsScreenState extends ConsumerState<DocumentsScreen> {
onTap: () {
if (doc.status == PendingDocumentStatus.success) {
context.push('/editor', extra: doc.id).then((_) {
_loadDocuments();
// Always reload when returning from editor,
// whether confirmed or just pressed back
if (mounted) _loadDocuments();
});
} else if (doc.status == PendingDocumentStatus.error) {
// Show error options