Modul Pesan Follow Up mengonfigurasi template pesan otomatis sebelum dan sesudah penjualan. Setting global per store, dipakai oleh semua agent.
File kunci
| File | Baris | Peran |
|---|---|---|
app/Http/Controllers/SettingController.php:46-310 | — | Render & update followup (versi baru) |
app/Http/Controllers/SettingController.php:365-411 | — | update_followup() & update_product_followup() (versi lama) |
app/Helpers/FollowUpFileHelper.php | — | Konversi file followup |
Model
Tidak ada model Followup — tersimpan sebagai field embed di Setting document:
followup_before_sales(baru) — array keyed by type (call_to_order,upselling, dll)followup_after_sales(baru) — array keyed by type (complete_order,cancel_order,delivery, dll)followUp(lama) — struktur beda, di-update lewatupdate_followup&update_product_followup
Controller method utama
| Method | Fungsi |
|---|---|
followup() | Render Setting/FollowUp/Index + konversi via FollowUpFileHelper |
updateFollowUp() | Update satu type followup + handle image S3 |
update_followup() | Versi lama — update field followUp di setting |
update_product_followup() | Update followUp di Product (bisa batch productId='all') |
Route
| Method | Path | Fungsi |
|---|---|---|
| GET | /setting/followup-text | Halaman followup |
| PATCH | /api/setting/update-followup/{id} | Update (baru) |
| POST | /api/setting/update_followup | Update (lama) |
| POST | /api/setting/update_product_followup | Update product followup |
Frontend
| File | Catatan |
|---|---|
Setting/FollowUp/Index.vue | Wrapper |
Setting/FollowUp/BeforeSales.vue | Sebelum penjualan |
Setting/FollowUp/AfterSales.vue | Setelah penjualan |
Setting/FollowUp/Before/{7 file}.vue | Stub per kategori (11 baris each) |
Setting/FollowUp/After/{7 file}.vue | Stub per kategori |
Setting/FollowUpText.vue (1.687 baris) | Orphan — versi lama |
Temuan
- Dua sistem followup paralel — baru (
followup_before_sales/_after_sales) vs lama (followUp). Keduanya masih aktif update_product_followupbisa batch update semua produk (productId='all') — bahaya bila salah kirimupdate_followupmass-assign dari request tanpa validasi — bisa simpan struktur arbitraryFollowUpText.vue(1.687 baris) orphan — controller renderFollowUp/Index