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()
{
return inertia('Home/Auth/Login');
return inertia('Auth/Login');
}
public function update(Request $request)
@ -85,7 +85,7 @@ class AuthController extends Controller
public function register()
{
return inertia('Home/Auth/Register');
return inertia('Auth/Register');
}
public function store(Request $request)

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

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

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

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

@ -9,12 +9,12 @@ class ProfileController extends Controller
{
public function index()
{
return inertia('Home/Profile/Index');
return inertia('Profile/Index');
}
public function show()
{
return inertia('Home/Profile/Form');
return inertia('Profile/Form');
}
public function update(Request $request)
@ -26,7 +26,7 @@ class ProfileController extends Controller
'name' => 'string|required',
'address' => 'string|required',
'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',
'image' => 'nullable|image',
]);

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

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

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

Loading…
Cancel
Save