diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 2f986cc..600272b 100644 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -46,4 +46,21 @@ class OrderController extends Controller } return true; } + + public function changeURL(Request $request) { + $validated = $request->validate([ + 'order' => 'required', + 'url' => 'required' + ]); + + $order = Order::find($request->order); + $user = Auth::user(); + + if (!in_array($order->status, ['processing', 'error'])) { + abort(422); + } + + $order->url = $request->url; + $order->save(); + } } diff --git a/resources/js/panel/order-item.vue b/resources/js/panel/order-item.vue index 474342f..171dad3 100644 --- a/resources/js/panel/order-item.vue +++ b/resources/js/panel/order-item.vue @@ -16,7 +16,8 @@
diff --git a/resources/js/panel/panel.vue b/resources/js/panel/panel.vue index 857c25d..3dcde3c 100644 --- a/resources/js/panel/panel.vue +++ b/resources/js/panel/panel.vue @@ -14,7 +14,7 @@

Recent Activity

- + diff --git a/resources/scss/main.scss b/resources/scss/main.scss index f636486..54ddd71 100644 --- a/resources/scss/main.scss +++ b/resources/scss/main.scss @@ -804,7 +804,6 @@ section.recent-pane, section.history-pane{ border-spacing: 4px; margin: auto; text-align: center; - min-width: 30em; width: 100%; } @@ -913,6 +912,10 @@ section.recent-pane, section.history-pane{ left: 50%; } + table { + min-width: 30em; + } + } .actions { diff --git a/routes/web.php b/routes/web.php index cb31f09..f315376 100644 --- a/routes/web.php +++ b/routes/web.php @@ -131,6 +131,9 @@ Route::post('/panel/pm-fail', [BillingController::class, Route::get('/panel/cards', [BillingController::class, 'getCards'])->middleware([ 'auth', 'verified' ]); +Route::post('/panel/save-url', [OrderController::class, + 'changeURL'])->middleware([ 'auth', 'verified' ]); + //Stripe webhooks Route::post('/hooks/charge', [BillingController::class, 'chargeEvent']);
DateNameStatus Quantity
DateNameStatus