Memberikan Keterangan
This commit is contained in:
parent
547058b069
commit
18ef3de34c
|
|
@ -11,7 +11,7 @@ # Salin env
|
|||
|
||||
# Database (MySQL)
|
||||
# Set di .env: DB_CONNECTION=mysql, DB_DATABASE=..., DB_USERNAME=..., DB_PASSWORD=...
|
||||
php artisan migrate
|
||||
# php artisan migrate
|
||||
php artisan db:seed
|
||||
|
||||
# Storage link (untuk gambar produk)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
class CriteriaController extends Controller
|
||||
{
|
||||
#mengelola data kriteria
|
||||
public function index()
|
||||
{
|
||||
$criterias = Criteria::orderBy('weight_order')->get();
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public function index(Request $request)
|
|||
if ($availableYears->isEmpty()) {
|
||||
$availableYears = collect([$currentYear]);
|
||||
}
|
||||
|
||||
#untuk menampilkan data di dashboard admin
|
||||
return view('admin.dashboard', compact(
|
||||
'totalProducts',
|
||||
'totalTransactions',
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
class ProductController extends Controller
|
||||
{
|
||||
#mengelola data produk dan menampilkan data produk di dashboard admin
|
||||
public function index(Request $request)
|
||||
{
|
||||
$products = Product::with('criterias')
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
class TransactionController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
{ #untuk menampilkan data transaksi di dashboard admin
|
||||
Transaction::cancelOverduePendingPickup();
|
||||
|
||||
$query = Transaction::with('user', 'details.product');
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
{ #untuk mengelola proses lupa password, termasuk menampilkan form lupa password dan mengirim kode verifikasi ke email pengguna
|
||||
public function create()
|
||||
{
|
||||
return view('auth.forgot-password');
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public function showLoginForm()
|
|||
{
|
||||
return view('auth.login');
|
||||
}
|
||||
|
||||
#untuk mengelola proses login, termasuk menampilkan form login dan memproses data login yang dikirimkan oleh pengguna
|
||||
public function login(Request $request)
|
||||
{
|
||||
$credentials = $request->validate([
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
{ #untuk mengelola proses registrasi, termasuk menampilkan form registrasi dan memproses data registrasi yang dikirimkan oleh pengguna
|
||||
public function showRegistrationForm()
|
||||
{
|
||||
return view('auth.register');
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
use Illuminate\Validation\Rules\Password as PasswordRule;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
{ #untuk mengelola proses reset password, termasuk menampilkan form verifikasi kode reset password dan memproses data reset password yang dikirimkan oleh pengguna
|
||||
public function create(Request $request)
|
||||
{
|
||||
return view('auth.verify-reset-password', [
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
use Illuminate\Http\Request;
|
||||
|
||||
class CartController extends Controller
|
||||
{
|
||||
{ #mengelola data keranjang belanja pengguna, termasuk menampilkan isi keranjang, menambahkan produk ke keranjang, memperbarui jumlah produk dalam keranjang, dan menghapus produk dari keranjang
|
||||
public function index()
|
||||
{
|
||||
$items = auth()->user()->carts()->with('product')->get();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
class CheckoutController extends Controller
|
||||
{
|
||||
public function show()
|
||||
{
|
||||
{ #untuk menampilkan halaman checkout, termasuk menampilkan isi keranjang, total harga, dan jam pengambilan yang tersedia
|
||||
$items = auth()->user()->carts()->with('product')->get();
|
||||
if ($items->isEmpty()) {
|
||||
return redirect()->route('cart.index')->with('error', 'Keranjang kosong.');
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
class HomeController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
{ #untuk menampilkan halaman utama aplikasi, termasuk menampilkan produk unggulan dan mengarahkan pengguna ke dashboard yang sesuai berdasarkan peran mereka (admin atau pengguna biasa)
|
||||
if (auth()->check()) {
|
||||
if (auth()->user()->isAdmin()) {
|
||||
return redirect()->route('admin.dashboard');
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
use Illuminate\Http\Request;
|
||||
|
||||
class RecommendationController extends Controller
|
||||
{
|
||||
{ #untuk mengelola proses rekomendasi mainan, termasuk menampilkan form rekomendasi dan menampilkan hasil rekomendasi berdasarkan input pengguna
|
||||
public function __construct(
|
||||
protected ToyRecommendationService $sawService
|
||||
) {}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
class ShopController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
{ #untuk menampilkan halaman toko, termasuk menampilkan daftar produk yang tersedia dan memungkinkan pengguna untuk mencari dan menyaring produk
|
||||
$query = Product::query()->where('stock', '>', 0);
|
||||
|
||||
if ($request->filled('search')) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
class TransactionController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
{ #untuk menampilkan daftar transaksi yang dilakukan oleh pengguna yang sedang login, termasuk menampilkan detail transaksi dan statusnya
|
||||
Transaction::cancelOverduePendingPickup();
|
||||
|
||||
$transactions = auth()->user()
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
@section('title', 'Manajemen Produk')
|
||||
|
||||
<!-- Halaman Manajemen Produk Admin -->
|
||||
@section('content')
|
||||
<div class="space-y-6">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Manajemen Transaksi')
|
||||
|
||||
<!-- Halaman Manajemen Transaksi Admin -->
|
||||
@section('content')
|
||||
<div class="space-y-6">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
@endforeach
|
||||
</select>
|
||||
<x-button type="submit" variant="outline" size="sm">Filter</x-button>
|
||||
<x-button href="{{ route('admin.transactions.export', request()->query()) }}" variant="outline" size="sm" class="!border-secondary-200 !text-secondary-700 hover:!bg-secondary-50">Export CSV</x-button>
|
||||
<!-- <x-button href="{{ route('admin.transactions.export', request()->query()) }}" variant="outline" size="sm" class="!border-secondary-200 !text-secondary-700 hover:!bg-secondary-50">Export CSV</x-button> -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<div class="min-h-screen flex">
|
||||
@auth
|
||||
<div id="sidebar-overlay" class="sidebar-overlay md:hidden" aria-hidden="true" role="button" tabindex="-1" aria-label="Tutup menu"></div>
|
||||
|
||||
<!-- Sidebar User -->
|
||||
{{-- Sidebar: light for user, dark for admin --}}
|
||||
@php $isAdmin = auth()->user()->isAdmin(); @endphp
|
||||
<aside id="sidebar" class="sidebar fixed md:static inset-y-0 left-0 z-50 flex flex-col w-72 flex-shrink-0 transform md:transform-none transition-all duration-300 ease-out -translate-x-full md:translate-x-0 {{ $isAdmin ? 'bg-gray-900 text-white' : 'bg-white border-r border-gray-100 shadow-sm' }}" data-collapsed="false">
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex h-16 items-center justify-between gap-4">
|
||||
{{-- Logo --}}
|
||||
<!-- Halaman Awal -->
|
||||
<a href="{{ url('/') }}" class="flex items-center gap-2.5 shrink-0">
|
||||
<span class="flex h-9 w-9 items-center justify-center rounded-xl bg-primary-500 text-white">
|
||||
<i class="fa-solid fa-puzzle-piece text-lg"></i>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Keranjang')
|
||||
|
||||
<!-- Halaman Keranjang User -->
|
||||
@section('content')
|
||||
@if($items->isEmpty())
|
||||
<x-card class="max-w-lg mx-auto text-center py-16">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Checkout')
|
||||
|
||||
<!-- Halaman Checkout -->
|
||||
@section('content')
|
||||
<div class="max-w-5xl mx-auto">
|
||||
<h2 class="text-2xl font-bold text-gray-900 tracking-tight mb-6">Checkout</h2>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Dashboard')
|
||||
|
||||
<!-- Halaman Dashboard User -->
|
||||
@section('content')
|
||||
<div class="space-y-8">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Hasil Rekomendasi SAW')
|
||||
|
||||
<!-- Halaman Hasil Rekomendasi -->
|
||||
@section('content')
|
||||
<div class="max-w-6xl mx-auto space-y-8">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Konsultasi Rekomendasi SAW')
|
||||
|
||||
<!-- Halaman Konsultasi -->
|
||||
@section('content')
|
||||
<div class="max-w-3xl mx-auto space-y-8">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
@section('title', 'Belanja Mainan')
|
||||
|
||||
<!-- Halaman Belanja User -->
|
||||
@section('content')
|
||||
<div class="flex flex-col lg:flex-row gap-6">
|
||||
{{-- Sidebar filter (desktop) / Collapse (mobile) --}}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Detail Transaksi')
|
||||
|
||||
<!-- Halaman Detail Transaksi -->
|
||||
@section('content')
|
||||
<div class="max-w-2xl space-y-6">
|
||||
<a href="{{ route('transactions.index') }}" class="inline-flex items-center gap-2 text-sm font-medium text-primary-600 hover:text-primary-700">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Riwayat Transaksi')
|
||||
|
||||
<!-- Halaman Riwayat Transaksi -->
|
||||
@section('content')
|
||||
<div class="space-y-6">
|
||||
<x-card :padding="false">
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
@extends('layouts.guest')
|
||||
|
||||
<!-- halman awal -->
|
||||
@section('title', 'Rekomendasi Mainan Anak - SAW')
|
||||
|
||||
@section('content')
|
||||
{{-- Hero --}}
|
||||
<section id="beranda" class="relative overflow-hidden">
|
||||
<div class="absolute inset-0 bg-gradient-to-br from-primary-50 via-white to-secondary-50" aria-hidden="true"></div>
|
||||
<div class="absolute inset-0 bg-gradient-to-br from-primary-50 via-white " aria-hidden="true"></div>
|
||||
<div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 lg:py-28">
|
||||
<div class="grid lg:grid-cols-2 gap-12 lg:gap-16 items-center">
|
||||
<div class="space-y-6">
|
||||
|
|
|
|||
Loading…
Reference in New Issue