feat(member): membuat layouting member
-membuat halaman overview -membuat routes sendiri
This commit is contained in:
parent
7fa46c0e9b
commit
c1702df327
17
app/Livewire/Customer/Dashboard/Overview.php
Normal file
17
app/Livewire/Customer/Dashboard/Overview.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Customer\Dashboard;
|
||||
|
||||
use Livewire\Attributes\Layout;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Component;
|
||||
|
||||
#[Title('Ringkasan')]
|
||||
#[Layout('components.layouts.customer')]
|
||||
class Overview extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.customer.dashboard.overview');
|
||||
}
|
||||
}
|
||||
27
resources/views/components/layouts/customer.blade.php
Normal file
27
resources/views/components/layouts/customer.blade.php
Normal file
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ $title }} | {{ config('app.name') }}</title>
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
@fluxAppearance
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=inter:400,500,600&display=swap" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body class="min-h-screen bg-white dark:bg-zinc-800">
|
||||
@include('components.partials.customer._sidebar')
|
||||
@include('components.partials.customer._header')
|
||||
|
||||
@persist('toast')
|
||||
<flux:toast position="bottom end" class="ps-6" />
|
||||
@endpersist
|
||||
|
||||
{{ $slot }}
|
||||
|
||||
@fluxScripts
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -0,0 +1,33 @@
|
||||
<flux:header class="bg-zinc-50 dark:bg-zinc-900 border-b border-zinc-200 dark:border-zinc-700">
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="bars-2" />
|
||||
<flux:brand logo="{{ asset('assets/images/logo.png') }}" name="Yadi Parfum" class="max-lg:hidden dark:hidden" />
|
||||
<flux:brand logo="{{ asset('assets/images/dark-logo.png') }}" name="Yadi Parfum"
|
||||
class="max-lg:hidden! hidden dark:flex" />
|
||||
<flux:spacer />
|
||||
<flux:navbar class="me-4">
|
||||
<flux:navbar.item icon="bell" label="Notifikasi" />
|
||||
<flux:navbar.item x-data x-on:click="$flux.dark = ! $flux.dark">
|
||||
<template x-if="$flux.dark">
|
||||
<div class="flex items-center gap-2">
|
||||
<flux:icon name="sun" class="w-5 h-5" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template x-if="!$flux.dark">
|
||||
<div class="flex items-center gap-2">
|
||||
<flux:icon name="moon" class="w-5 h-5" />
|
||||
</div>
|
||||
</template>
|
||||
</flux:navbar.item>
|
||||
</flux:navbar>
|
||||
<flux:dropdown position="top" align="end">
|
||||
<flux:avatar circle size="sm" src="https://unavatar.io/x/calebporzio" as="button" />
|
||||
<flux:navmenu>
|
||||
<flux:navmenu.item href="#" icon="cog">Pengaturan</flux:navmenu.item>
|
||||
<flux:navmenu.item href="#" icon="paint-brush">Tema</flux:navmenu.item>
|
||||
<flux:navmenu.item href="#" icon="chart-bar">Statistik</flux:navmenu.item>
|
||||
<flux:menu.separator />
|
||||
@livewire('auth.logout')
|
||||
</flux:navmenu>
|
||||
</flux:dropdown>
|
||||
</flux:header>
|
||||
@ -0,0 +1,11 @@
|
||||
<flux:sidebar sticky stashable
|
||||
class="bg-zinc-50 dark:bg-zinc-900 border-r rtl:border-r-0 rtl:border-l border-zinc-200 dark:border-zinc-700">
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="x-mark" />
|
||||
<flux:brand logo="{{ asset('assets/images/logo.png') }}" name="Yadi Parfum" class="px-2 dark:hidden" />
|
||||
<flux:brand logo="{{ asset('assets/images/dark-logo.png') }}" name="Yadi Parfum" class="px-2 hidden dark:flex" />
|
||||
<flux:navlist variant="outline">
|
||||
<flux:navlist.item icon="squares-plus" href="{{ route('customer.dashboard.overview') }}"
|
||||
:current="request()->routeIs('customer.dashboard.overview')" wire:navigate.hover>
|
||||
Ringkasan</flux:navlist.item>
|
||||
</flux:navlist>
|
||||
</flux:sidebar>
|
||||
@ -0,0 +1,55 @@
|
||||
<flux:main>
|
||||
<flux:heading size="xl" level="1">Haloo, {{ auth()->user()?->customer?->name }}</flux:heading>
|
||||
<flux:text class="mb-6 mt-2 text-base">Selamat datang di Studio Yadi Parfum.</flux:text>
|
||||
<flux:separator variant="subtle" />
|
||||
|
||||
<div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<flux:callout icon="envelope" color="rose" inline>
|
||||
<flux:callout.heading> Silakan verifikasi email Anda agar bisa menikmati seluruh fitur kami.
|
||||
</flux:callout.heading>
|
||||
|
||||
<x-slot name="actions">
|
||||
<flux:button>Verifikasi -></flux:button>
|
||||
</x-slot>
|
||||
</flux:callout>
|
||||
|
||||
<flux:callout icon="star" color="purple" inline>
|
||||
<flux:callout.heading> Temukan keuntungan eksklusif dan manfaat spesial sebagai member.
|
||||
</flux:callout.heading>
|
||||
|
||||
<x-slot name="actions">
|
||||
<flux:button>Lihat</flux:button>
|
||||
</x-slot>
|
||||
</flux:callout>
|
||||
|
||||
<flux:callout icon="user-group" color="blue">
|
||||
<flux:callout.heading>
|
||||
{{ auth()->user()?->membership?->tier?->name }}
|
||||
<flux:badge color="emerald" size="sm" inset="top bottom">
|
||||
{{ auth()->user()?->membership?->total_points }} Poin</flux:badge>
|
||||
</flux:callout.heading>
|
||||
|
||||
<flux:callout.text>
|
||||
<p>Undang teman dan dapatkan hadiah menarik!</p>
|
||||
</flux:callout.text>
|
||||
|
||||
<x-slot name="actions">
|
||||
<flux:button>Undang teman</flux:button>
|
||||
<flux:button>Ambil Hadiah</flux:button>
|
||||
</x-slot>
|
||||
</flux:callout>
|
||||
|
||||
<flux:callout icon="magnifying-glass" color="emerald">
|
||||
<flux:callout.heading>Jelajahi Produk Kami</flux:callout.heading>
|
||||
|
||||
<flux:callout.text>
|
||||
Coba dan rasakan manfaat menggunakanan yadi parfum.
|
||||
</flux:callout.text>
|
||||
|
||||
<x-slot name="actions">
|
||||
<flux:button>Jelajadi</flux:button>
|
||||
<flux:button>Tanya Ahli</flux:button>
|
||||
</x-slot>
|
||||
</flux:callout>
|
||||
</div>
|
||||
</flux:main>
|
||||
14
routes/customer.php
Normal file
14
routes/customer.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
use App\Livewire\Customer\Dashboard\Overview;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::middleware('auth')
|
||||
->prefix('customer')
|
||||
->group(function () {
|
||||
Route::prefix('dashboard')
|
||||
->as('customer.dashboard.')
|
||||
->group(function () {
|
||||
Route::get('overview', Overview::class)->name('overview');
|
||||
});
|
||||
});
|
||||
@ -18,6 +18,8 @@
|
||||
use App\Livewire\Studio\Master\User\Index as UserIndex;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
require __DIR__.'/customer.php';
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
})->name('homepage');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user