Files
portal-api/todo.md
T
2026-02-05 11:10:19 +07:00

1.4 KiB

TODO LIST

🔴 Critical

  • Refactor routes/api.php: Move all business logic from closures to Controllers/Services (ID: I001)
  • Refactor OrderController@store: Move massive business logic to OrderService (ID: I002)
  • Implement Enums for Product Types and Invoice/Order Statuses (ID: I003)
  • Fix logic leakage in ProductController@store and update: Use FormRequests and Services (ID: I004)
  • Remove hardcoded HTML from Invoice.php model; move to a Presenter or Blade component (ID: I005)

🟠 High

  • Replace $guarded = [] with specific $fillable in Order, Invoice, and other core models (ID: I006)
  • Extract caching logic from ProductController to a Service or Repository (ID: I007)
  • Add FormRequest validation for all Order and Product actions (ID: I008)
  • Remove hardcoded IDs (1, 2, 3, 4) from logic and replace with Enums/Constants (ID: I009)

🟡 Medium

  • Refactor calculateBillingDetails in OrderController to a Service or Helper (ID: I010)
  • Consolidate hosting/vps logic into the new Product table and model (ID: I011)
  • Improve Job dispatching: remove hardcoded delay(now()->addSeconds(10)) (ID: I012)

🟢 Low

  • Clean up unused comments and commented-out code in Order.php and ProductController.php (ID: I013)
  • Standardize currency formatting using a specialized Utility/Helper (ID: I014)