Commit Graph
43 Commits
Author SHA1 Message Date
efrilmandClaude Opus 5 1505a83dd3 feat: dukung penjualan produk per timbangan
Produk kini punya cara jual `unit` (cacah) atau `weight` (timbangan),
mengikuti kontrak backend di docs/integration-weight-based-products.md.

- tipe SellBy, domain/infrastructure unit baru, dan endpoint /api/v1/units
- dialog input berat saat produk timbangan ditambahkan ke keranjang
- tiap penimbangan jadi baris keranjang sendiri; total baris dihitung
  berat x harga satuan, sedangkan produk cacah tetap digabung
- request ke backend mengirim quantity 1 dan membawa berat
- migrasi DB v3: kolom sell_by, unit_id, unit_name, unit_abbreviation
  di tabel products supaya satuan tetap tampil saat offline
- tampilan keranjang, struk, split bill, void, dan refund memakai berat
- test/weight_based_products_test.dart menutup perilaku di atas (9 test)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-06 23:03:31 +07:00
efrilmandClaude Opus 5 1b4caf45d5 fix: cetak semua station tanpa saling membatalkan
printStruckOrder berhenti di kegagalan pertama, jadi satu station gagal membuat semua station sesudahnya tidak pernah dicoba. Karena checker (Bluetooth) berada sebelum kitchen dan bar (Network) dalam rantai, satu kegagalan koneksi Bluetooth menghilangkan tiga tiket sekaligus, dua di antaranya di jaringan yang sehat.

Jalur printer Network juga mengembalikan right(false) saat gagal, yang lolos sebagai sukses ke pemanggil, sehingga kasir melihat 'berhasil dicetak' padahal tidak ada kertas keluar.

Perubahan: repository kini mengembalikan Stream<List<PrintStationResult>> dan tetap mencoba semua station; kegagalan Network jadi left; station Network berjalan paralel dengan rantai Bluetooth; station Bluetooth dikelompokkan per alamat agar perpindahan koneksi seminimal mungkin; CapabilityProfile di-cache.

Bluetooth: retry connect dengan backoff dan disconnect di tiap percobaan ulang (socket RFCOMM setengah terbuka membuat connect berulang gagal identik), jeda settle dikembalikan setelah dipangkas ke 300ms, satu lock untuk seluruh radio (bukan per MAC), izin runtime dipastikan di jalur cetak, dan repository jadi LazySingleton agar state koneksi benar-benar dibagi.

UI: dialog progres per-station menggantikan toast tunggal, lengkap dengan durasi tiap station dan tombol cetak ulang khusus yang gagal. Enam listener duplikat di halaman diganti satu listener terpusat di AppWidget. Menu Print di detail transaksi dapat item Print All.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 20:44:14 +07:00
Efril a0610459bf update login with device info 2026-05-10 22:51:04 +07:00
Efril dc09aabbe8 setup fcm 2026-05-07 17:44:03 +07:00
Efril 4481d24375 update 2026-03-03 19:35:11 +07:00
efrilm b2b2e2b111 logout 2025-11-10 17:23:26 +07:00
efrilm 0a8f8d93bb Sync Page 2025-11-10 16:56:12 +07:00
efrilm 93560b85cb print order 2025-11-07 16:29:26 +07:00
efrilm bf7a5708f5 print receipt 2025-11-06 18:15:54 +07:00
efrilm 1b24bae23a printer receipt 2025-11-04 22:13:15 +07:00
efrilm a87b62ca9f printer form, bluetooth 2025-11-04 14:58:51 +07:00
efrilm dca0f546f9 report inventory 2025-11-04 00:21:15 +07:00
efrilm 2a44ce023e report category 2025-11-03 23:24:16 +07:00
efrilm 07932d688f report profit loss 2025-11-03 21:28:36 +07:00
efrilm 5a7892aa99 report payment method 2025-11-03 20:32:46 +07:00
efrilm 14c3c69ad6 report product 2025-11-03 19:34:46 +07:00
efrilm 3bb6bd653e report sales 2025-11-03 17:18:29 +07:00
efrilm b4a9cf31fc report dashboard 2025-11-03 16:24:11 +07:00
efrilm 069c2296de refund 2025-11-01 16:17:45 +07:00
efrilm 2f155a2f8d report page 2025-11-01 04:11:29 +07:00
efrilm 6b42cd86ff split bill 2025-10-31 19:24:15 +07:00
efrilm 8d9e622121 void 2025-10-31 14:33:02 +07:00
efrilm b335102677 payment 2025-10-30 16:35:47 +07:00
efrilm 37f0008ec8 create order 2025-10-28 00:08:12 +07:00
efrilm 8bd61eb58e order page 2025-10-27 21:55:19 +07:00
efrilm b8eefcbac0 checkout page 2025-10-27 15:27:21 +07:00
efrilm 9e5a6cc7ae payment method 2025-10-27 14:24:29 +07:00
efrilm 0bffd92a08 customer page 2025-10-26 22:57:22 +07:00
efrilm 5c683eda8d transfer table 2025-10-26 19:36:59 +07:00
efrilm d5ed3f62ff create table 2025-10-26 18:47:51 +07:00
efrilm 634b331716 update position table, set selected table 2025-10-26 18:06:09 +07:00
efrilm 655902a659 update 2025-10-26 16:09:56 +07:00
efrilm 013f313e35 checkout form 2025-10-25 02:09:47 +07:00
efrilm 754048b565 product and category loader 2025-10-25 00:13:43 +07:00
efrilm 6892895021 sync bloc 2025-10-24 22:25:01 +07:00
efrilm 4fdd1e44f8 product repo 2025-10-24 22:03:35 +07:00
efrilm 71fa4823fc category repo 2025-10-24 20:06:42 +07:00
efrilm 683fff6eeb outlet dialog 2025-10-24 14:28:04 +07:00
efrilm 4dbdcadeaf current outlet 2025-10-24 13:55:00 +07:00
efrilm 97c03bcf96 change name login form 2025-10-24 02:04:28 +07:00
efrilm 05609d592d main page 2025-10-24 02:02:21 +07:00
efrilm ca5d2a58e7 login 2025-10-24 01:16:50 +07:00
efrilm 4fee7c4bb7 base project 2025-10-23 22:16:53 +07:00