diff --git a/app/Http/Controllers/CheckoutController.php b/app/Http/Controllers/CheckoutController.php index bb955f9..c7fbdc4 100644 --- a/app/Http/Controllers/CheckoutController.php +++ b/app/Http/Controllers/CheckoutController.php @@ -190,7 +190,11 @@ class CheckoutController extends Controller ->first(); $invoice_url = $payment ? @$payment->method->invoice_url: ""; - return redirect()->to($invoice_url); + return redirect()->to($invoice_url)->withHeaders([ + 'Cache-Control' => 'no-cache, no-store, must-revalidate', + 'Pragma' => 'no-cache', + 'Expires' => '0' + ]); diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php new file mode 100644 index 0000000..724ed12 --- /dev/null +++ b/app/Http/Controllers/OrderController.php @@ -0,0 +1,19 @@ +user()->id) + ->orderBy('id','desc') + ->paginate(); + + return view('account.orders', compact('orders')); + } +} diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index 2563e98..db55da9 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -98,4 +98,10 @@ class Transaction extends Model return $this->belongsTo(PosInvoice::class, 'invoice_id', 'id'); } + + public function getStatusTitleAttribute() + { + return __('order.status.'.strtolower($this->attributes['status'])); + } + } diff --git a/lang/en/order.php b/lang/en/order.php new file mode 100644 index 0000000..9297d87 --- /dev/null +++ b/lang/en/order.php @@ -0,0 +1,9 @@ + [ + 'status' => [ + 'wait_payment' => 'Wait Payment', + ], + ], +]; \ No newline at end of file diff --git a/lang/id/order.php b/lang/id/order.php new file mode 100644 index 0000000..8a3670d --- /dev/null +++ b/lang/id/order.php @@ -0,0 +1,9 @@ + [ + 'status' => [ + 'wait_payment' => 'Menunggu Pembayaran', + ], + ], +]; \ No newline at end of file diff --git a/resources/views/account/orders.blade.php b/resources/views/account/orders.blade.php index 4eee6f3..8604fdf 100644 --- a/resources/views/account/orders.blade.php +++ b/resources/views/account/orders.blade.php @@ -78,283 +78,60 @@
- -