- Implemented the full order lifecycle, secure customer tracker, automatic acceptance emails, configurable status templates, and guest/account CRM management.
Key areas: [OrderStatusService.php](/Users/tyemeclifford/Documents/GH/fatbottomgrille/app/Services/OrderStatusService.php), [AdminController.php](/Users/tyemeclifford/Documents/GH/fatbottomgrille/app/Controllers/AdminController.php), and [Database.php](/Users/tyemeclifford/Documents/GH/fatbottomgrille/app/Core/Database.php). SQLite migration applied successfully. PHP/JS syntax, integration workflows, rendered pages, database integrity, and tracker authorization all passed. Invalid tracker tokens correctly return 403.
This commit is contained in:
+21
-4
@@ -9,8 +9,10 @@ use FatBottom\Core\Auth;
|
||||
use FatBottom\Core\Http;
|
||||
use FatBottom\Core\Router;
|
||||
use FatBottom\Services\CartService;
|
||||
use FatBottom\Services\CustomerService;
|
||||
use FatBottom\Services\Mailer;
|
||||
use FatBottom\Services\OrderService;
|
||||
use FatBottom\Services\OrderStatusService;
|
||||
use FatBottom\Services\PaymentGateway;
|
||||
use FatBottom\Services\StatsService;
|
||||
use FatBottom\Services\TwoFactorService;
|
||||
@@ -23,13 +25,24 @@ $auth = new Auth($db);
|
||||
$cart = new CartService($db);
|
||||
$mailer = new Mailer($config);
|
||||
$payments = new PaymentGateway($config);
|
||||
$orders = new OrderService($db, $payments);
|
||||
$customers = new CustomerService($db);
|
||||
$orderStatuses = new OrderStatusService($config, $db, $mailer);
|
||||
$orders = new OrderService($db, $payments, $customers);
|
||||
$stats = new StatsService($db);
|
||||
$twoFactor = new TwoFactorService($db, $mailer, $config);
|
||||
|
||||
$store = new StoreController($config, $auth, $cart, $db, $orders, $mailer);
|
||||
$store = new StoreController($config, $auth, $cart, $db, $orders, $orderStatuses);
|
||||
$authentication = new AuthController($config, $auth, $cart, $db, $twoFactor);
|
||||
$admin = new AdminController($config, $auth, $cart, $db, $stats, $payments, $mailer);
|
||||
$admin = new AdminController(
|
||||
$config,
|
||||
$auth,
|
||||
$cart,
|
||||
$db,
|
||||
$stats,
|
||||
$payments,
|
||||
$mailer,
|
||||
$orderStatuses
|
||||
);
|
||||
|
||||
$path = Http::path();
|
||||
$user = $auth->user();
|
||||
@@ -45,6 +58,7 @@ $router->post('/cart/remove', [$store, 'removeFromCart']);
|
||||
$router->get('/checkout', [$store, 'checkout']);
|
||||
$router->post('/checkout', [$store, 'placeOrder']);
|
||||
$router->get('/order/complete', [$store, 'orderComplete']);
|
||||
$router->get('/order/track', [$store, 'orderTracker']);
|
||||
|
||||
$router->get('/login', [$authentication, 'loginForm']);
|
||||
$router->post('/login', [$authentication, 'login']);
|
||||
@@ -62,6 +76,10 @@ $router->get('/admin/orders', [$admin, 'orders']);
|
||||
$router->get('/admin/order', [$admin, 'orderDetail']);
|
||||
$router->post('/admin/order', [$admin, 'updateOrder']);
|
||||
$router->post('/admin/order/refund', [$admin, 'refundOrder']);
|
||||
$router->get('/admin/customers', [$admin, 'customers']);
|
||||
$router->get('/admin/customer', [$admin, 'customerDetail']);
|
||||
$router->post('/admin/customer/save', [$admin, 'saveCustomer']);
|
||||
$router->post('/admin/customer/delete', [$admin, 'deleteCustomer']);
|
||||
$router->get('/admin/menu', [$admin, 'menu']);
|
||||
$router->post('/admin/category/save', [$admin, 'saveCategory']);
|
||||
$router->post('/admin/item/save', [$admin, 'saveItem']);
|
||||
@@ -79,4 +97,3 @@ $router->get('/admin/export/orders.csv', [$admin, 'exportOrdersCsv']);
|
||||
$router->post('/admin/migrate/mysql', [$admin, 'migrateMySql']);
|
||||
|
||||
$router->dispatch($_SERVER['REQUEST_METHOD'] ?? 'GET', $path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user