Fix: Data inconsistency pada transisi tahun/bulan dan setup API lokal

- Implementasi fallback mechanism untuk daily_summary (threshold 5%)
- Auto-detect base path untuk subdirectory installation
- Perbaikan query dengan CAST(? AS DATE) untuk semua tanggal
- Script utilities: check_daily_summary.php dan check_and_fix_hourly_summary.php
- Setup .htaccess untuk routing Slim Framework
- Test script untuk verifikasi API lokal
- Dokumentasi SETUP_LOCAL_API.md
This commit is contained in:
BTekno Dev
2026-01-01 23:38:13 +07:00
parent d05fa2f4cd
commit 19926b30e3
8 changed files with 704 additions and 43 deletions

22
public/.htaccess Normal file
View File

@@ -0,0 +1,22 @@
# Slim Framework 4 .htaccess
# Pastikan semua request diarahkan ke index.php
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect to index.php if file doesn't exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
</IfModule>
# Security headers
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-XSS-Protection "1; mode=block"
</IfModule>
# Disable directory browsing
Options -Indexes