Commit Graph

9 Commits

Author SHA1 Message Date
micko samawa ca476cb8e6 feat: tampilkan jam_survei di admin list dan detail booking, tambah fillable jam_survei di model 2026-06-29 08:59:06 +07:00
micko samawa cf4435580d final update web and mobile 2026-06-12 22:46:44 +07:00
micko samawa 6bad1aa7b2 feat: Implement admin-scoped data visibility and comprehensive authorization
- Add admin_id FK to kontrakans table
- Add authorization checks to KontrakanController (edit, update, destroy, bulkDestroy)
- Add authorization checks to BookingController (store, bulkDestroy)
- Fix EnsureRole middleware to use auth:admin guard
- Fix booking index stats to filter by admin ownership
- Add model relationships: Admin.kontrakans(), Admin.isSuperAdmin(), Admin.isAdmin()
- Ensure admin biasa sees only their data, super_admin sees all data
- Secure bulk delete operations with per-item admin validation
2026-05-25 14:00:20 +07:00
micko samawa 605e92bbd9 Fix: Reset super admin, fix User model role attribute, remove rate limiting for development
- Added new super admin account (mikoadmin@gmail.com)
- Fixed User model getRoleLabelAttribute() to handle null role
- Fixed AuthController to refresh user after creation
- Removed rate limiting from register/login endpoints for development
- Added migration to ensure role and phone columns exist
- Updated app config with correct IP (10.192.233.99:8000)
- Fixed API response to include all required fields for Flutter
2026-05-19 08:01:07 +07:00
micko samawa 585d36fe09 feat: Separate admin and user tables for independent authentication
- Create new 'admins' table with role column (admin/super_admin)
- Create Admin model for admin authentication
- Add AdminSeeder with test data (super_admin, admin)
- Update config/auth.php with dual guards (web for users, admin for admins)
- Update AdminAuthController to use Admin model and 'admin' guard
- Remove role column from users table (users have no role)
- Update register validation messages in Indonesian
- Now same email can be used by user and admin (separate tables)
2026-05-18 20:50:22 +07:00
micko samawa c0fe039e91 Update mobile config, add admin reminder notifications, and apply migrations 2026-05-10 23:29:18 +07:00
micko samawa 864be692e8 feat: modernize mobile UI and normalize laundry service handling 2026-04-16 01:00:10 +07:00
micko samawa b192557bb8 Update user management, booking model, and mobile screens 2026-03-14 11:11:28 +07:00
micko samawa 786743231c fix: Laravel Backend Security & Stability Improvements
- Add rate limiting (api:60/min, login:5/min, register:3/hour, saw:30/min)
- Implement centralized JSON error handler for all API exceptions
- Create 6 Form Request classes for input validation
- Fix N+1 query problems with withCount and eager loading
- Add caching for kriteria queries (1 hour cache)
- Create /api/health and /api/docs documentation endpoints
- Fix export system: CSV export instead of Excel (package not installed)
- Restrict CORS to specific origins, set Sanctum token expiration (30 days)
- Add error_code fields to all API responses
- Update pagination views to remove large arrow icons, replace with text buttons
- Fix field name consistency: use correct database columns
- Add SQL injection prevention via sort column whitelist
- Optimize pagination UI for Activity Logs and other pages
2026-02-26 00:19:15 +07:00