Add mobile reliability fixes, Bahasa Indonesia UI, and continue OCR accuracy tuning
Reliability/PoC hardening: dedupe uploads by file_hash, surface editor sync failures instead of a false success SnackBar with a retry-without-re-OCR path, bound the OCR pipeline fetches with timeouts, share a single ApiClient/Dio instance app-wide, tune capture JPEG quality, and add an opt-in docker-compose.demo.yml for a production-mode run ahead of client demos. Translate all Flutter-side user-facing text (screens, validators, SnackBars, the printed delivery receipt, and shared API error messages) to Bahasa Indonesia. Also includes in-progress OCR parser/accuracy-tuning work from the same session: table column/unit normalization fixes, store/customer master data, accuracy history log, and test-image renaming/cleanup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017eRAsLqN9Sg1b9YPz22Lxz
This commit is contained in:
1 parent
095dd4cb8b
commit
4808a798fb
78 files changed
+8069
-584
No files matched your search
@@ -53,11 +53,36 @@ class DocumentModel {
|
||||
latitude: json['latitude'] != null ? double.tryParse(json['latitude'].toString()) : null,
|
||||
longitude: json['longitude'] != null ? double.tryParse(json['longitude'].toString()) : null,
|
||||
items: itemsList.map((e) => DocumentItem.fromJson(Map<String, dynamic>.from(e))).toList(),
|
||||
createdAt: json['created_at'] != null
|
||||
? DateTime.parse(json['created_at'].toString())
|
||||
createdAt: json['created_at'] != null
|
||||
? DateTime.parse(json['created_at'].toString())
|
||||
: (json['createdAt'] != null ? DateTime.parse(json['createdAt'].toString()) : DateTime.now()),
|
||||
);
|
||||
}
|
||||
|
||||
/// Body for `PUT /api/v1/documents/:id`. Shared by the editor's initial save and
|
||||
/// the pending-queue's sync retry so both send an identical payload shape.
|
||||
Map<String, dynamic> toPutPayload() {
|
||||
return {
|
||||
'tanggal': tanggal,
|
||||
'noPo': noPo,
|
||||
'noSo': noSo,
|
||||
'noDo': noDo,
|
||||
'kepadaYth': kepadaYth,
|
||||
'orderUntuk': orderUntuk,
|
||||
'alamat': alamat,
|
||||
'platTruk': platTruk,
|
||||
'namaDriver': namaDriver,
|
||||
'namaPenerima': namaPenerima,
|
||||
'latitude': latitude,
|
||||
'longitude': longitude,
|
||||
'items': items.map((e) => {
|
||||
'nomor_sku': e.nomorSku,
|
||||
'nama_barang': e.namaBarang,
|
||||
'banyak': e.banyak,
|
||||
'jumlah': e.jumlah,
|
||||
}).toList(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class DocumentItem {
|
||||
|
||||
Reference in new issue
Block a user