moved frontend page folder to customer folder

dev
Aji Kamaludin 1 year ago
parent 295a3d1e45
commit 77d76ee4f8
No known key found for this signature in database
GPG Key ID: 19058F67F0083AD3

@ -27,7 +27,7 @@ class AuthController extends Controller
public function login() public function login()
{ {
return inertia('Home/Auth/Login'); return inertia('Auth/Login');
} }
public function update(Request $request) public function update(Request $request)
@ -85,7 +85,7 @@ class AuthController extends Controller
public function register() public function register()
{ {
return inertia('Home/Auth/Register'); return inertia('Auth/Register');
} }
public function store(Request $request) public function store(Request $request)

@ -26,7 +26,7 @@ class CartController extends Controller
return $item['quantity'] * $item['voucher']->price; return $item['quantity'] * $item['voucher']->price;
}); });
return inertia('Home/Cart/Index', [ return inertia('Cart/Index', [
'carts' => $carts, 'carts' => $carts,
'total' => $total, 'total' => $total,
]); ]);

@ -13,14 +13,14 @@ class CoinController extends Controller
$coins = CoinHistory::where('customer_id', auth()->id()) $coins = CoinHistory::where('customer_id', auth()->id())
->orderBy('updated_at', 'desc'); ->orderBy('updated_at', 'desc');
return inertia('Home/Coin/Index', [ return inertia('Coin/Index', [
'coins' => $coins->paginate(20), 'coins' => $coins->paginate(20),
]); ]);
} }
public function show(CoinHistory $coin) public function show(CoinHistory $coin)
{ {
return inertia('Home/Coin/Detail', [ return inertia('Coin/Detail', [
'coin' => $coin, 'coin' => $coin,
]); ]);
} }

@ -21,14 +21,14 @@ class DepositController extends Controller
->orderBy('updated_at', 'desc') ->orderBy('updated_at', 'desc')
->orderBy('is_valid', 'desc'); ->orderBy('is_valid', 'desc');
return inertia('Home/Deposit/Index', [ return inertia('Deposit/Index', [
'histories' => $histories->paginate(20), 'histories' => $histories->paginate(20),
]); ]);
} }
public function create() public function create()
{ {
return inertia('Home/Deposit/Topup', [ return inertia('Deposit/Topup', [
'payments' => GeneralService::getEnablePayment(), 'payments' => GeneralService::getEnablePayment(),
]); ]);
} }
@ -47,7 +47,7 @@ class DepositController extends Controller
$deposit = DepositHistory::make([ $deposit = DepositHistory::make([
'customer_id' => auth()->id(), 'customer_id' => auth()->id(),
'debit' => $request->amount, 'debit' => $request->amount,
'description' => 'Top Up #'.Str::random(5), 'description' => 'Top Up #' . Str::random(5),
'payment_channel' => $request->payment, 'payment_channel' => $request->payment,
]); ]);
@ -72,7 +72,7 @@ class DepositController extends Controller
public function show(Request $request, DepositHistory $deposit) public function show(Request $request, DepositHistory $deposit)
{ {
return inertia('Home/Deposit/Detail', [ return inertia('Deposit/Detail', [
'deposit' => $deposit, 'deposit' => $deposit,
'accounts' => Account::get(), 'accounts' => Account::get(),
'midtrans_client_key' => Setting::getByKey('MIDTRANS_CLIENT_KEY'), 'midtrans_client_key' => Setting::getByKey('MIDTRANS_CLIENT_KEY'),

@ -25,7 +25,7 @@ class HomeController extends Controller
$vouchers->where('location_id', $request->location_id); $vouchers->where('location_id', $request->location_id);
} }
return inertia('Home/Index/Index', [ return inertia('Index/Index', [
'infos' => $infos, 'infos' => $infos,
'banners' => $banners, 'banners' => $banners,
'locations' => $locations, 'locations' => $locations,
@ -36,7 +36,7 @@ class HomeController extends Controller
public function banner(Banner $banner) public function banner(Banner $banner)
{ {
return inertia('Home/Index/Banner', [ return inertia('Index/Banner', [
'banner' => $banner, 'banner' => $banner,
]); ]);
} }

@ -9,12 +9,12 @@ class ProfileController extends Controller
{ {
public function index() public function index()
{ {
return inertia('Home/Profile/Index'); return inertia('Profile/Index');
} }
public function show() public function show()
{ {
return inertia('Home/Profile/Form'); return inertia('Profile/Form');
} }
public function update(Request $request) public function update(Request $request)
@ -26,7 +26,7 @@ class ProfileController extends Controller
'name' => 'string|required', 'name' => 'string|required',
'address' => 'string|required', 'address' => 'string|required',
'phone' => 'string|required|numeric', 'phone' => 'string|required|numeric',
'username' => 'string|required|min:5|alpha_dash|unique:customers,username,'.$customer->id, 'username' => 'string|required|min:5|alpha_dash|unique:customers,username,' . $customer->id,
'password' => 'nullable|string|min:8|confirmed', 'password' => 'nullable|string|min:8|confirmed',
'image' => 'nullable|image', 'image' => 'nullable|image',
]); ]);

@ -12,14 +12,14 @@ class TransactionController extends Controller
$query = Sale::where('customer_id', auth()->id()) $query = Sale::where('customer_id', auth()->id())
->orderBy('created_at', 'desc'); ->orderBy('created_at', 'desc');
return inertia('Home/Trx/Index', [ return inertia('Trx/Index', [
'query' => $query->paginate(), 'query' => $query->paginate(),
]); ]);
} }
public function show(Sale $sale) public function show(Sale $sale)
{ {
return inertia('Home/Trx/Detail', [ return inertia('Trx/Detail', [
'sale' => $sale->load(['items.voucher.location']) 'sale' => $sale->load(['items.voucher.location'])
]); ]);
} }

@ -16,8 +16,8 @@ createInertiaApp({
title: (title) => `${title} - ${appName}`, title: (title) => `${title} - ${appName}`,
resolve: (name) => resolve: (name) =>
resolvePageComponent( resolvePageComponent(
`./Pages/${name}.jsx`, `./Customer/${name}.jsx`,
import.meta.glob('./Pages/**/*.jsx') import.meta.glob('./Customer/**/*.jsx')
), ),
setup({ el, App, props }) { setup({ el, App, props }) {
const root = createRoot(el) const root = createRoot(el)

@ -15,7 +15,7 @@
<!-- Scripts --> <!-- Scripts -->
@routes @routes
@viteReactRefresh @viteReactRefresh
@vite(['resources/js/app.jsx', "resources/js/Pages/{$page['component']}.jsx"]) @vite(['resources/js/app.jsx', "resources/js/Customer/{$page['component']}.jsx"])
@inertiaHead @inertiaHead
</head> </head>
<body class="font-sans antialiased"> <body class="font-sans antialiased">

Loading…
Cancel
Save