Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/Http/Controllers/CRUDController.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function index(Request $request)

$with = $this->with();

return Inertia::render("CRUD/{$this->view}/Index", [
return Inertia::render("Admin/CRUD/{$this->view}/Index", [
'items' => $items,
'with' => $with,
'isSearchable' => $isSearchable,
Expand All @@ -97,7 +97,7 @@ public function show($id)

$with = $this->with();

return Inertia::render("CRUD/$this->view/Show", [
return Inertia::render("Admin/CRUD/$this->view/Show", [
'item' => $item,
'with' => $with,
]);
Expand All @@ -107,7 +107,7 @@ public function create()
{
$with = $this->with();

return Inertia::render("CRUD/$this->view/Create", [
return Inertia::render("Admin/CRUD/$this->view/Create", [
'with' => $with,
]);
}
Expand All @@ -118,7 +118,7 @@ public function edit($id)

$with = $this->with();

return Inertia::render("CRUD/$this->view/Edit", [
return Inertia::render("Admin/CRUD/$this->view/Edit", [
'item' => $item->load($this->load),
'with' => $with,
]);
Expand Down
18 changes: 18 additions & 0 deletions app/Http/Controllers/GalleryController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Inertia\Inertia;

class GalleryController extends Controller
{
public function index(Request $request)
{
return Inertia::render('Admin/Gallery/Index');
}

public function store(Request $request)
{
}
}
4 changes: 2 additions & 2 deletions resources/js/Layouts/AdminLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ defineProps<Props>();
<div>
<Head :title="title" />
<Banner />
<div>
<div class="min-h-screen flex flex-col">
<AdminNavbar />
<main class="min-h-screen bg-2023-bg">
<main class="flex-1 bg-2023-bg">
<slot />
</main>
<Footer />
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Layouts/AppLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ defineProps<Props>();
</script>

<template>
<div>
<div class="min-h-screen flex flex-col">
<Head :title="title" />
<div class="sticky top-0 z-30">
<Navbar />
<Banner />
</div>
<main class="min-h-screen bg-2023-bg">
<main class="flex-1 bg-2023-bg">
<slot />
</main>
<Footer />
Expand Down
1 change: 1 addition & 0 deletions resources/js/Pages/Admin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const pageRoutes = {
"admin.eventTypes.index": "models.eventType",
"admin.enrollments.index": "models.enrollment",
"admin.sponsorTiers.index": "models.sponsorTier",
"admin.gallery": "admin.gallery"
} satisfies Record<string, string>;
</script>

Expand Down
10 changes: 10 additions & 0 deletions resources/js/Pages/Admin/Gallery/Index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup lang="ts">
import AdminLayout from "@/Layouts/AdminLayout.vue";

</script>

<template>
<AdminLayout title="Administrador">

</AdminLayout>
</template>
13 changes: 13 additions & 0 deletions resources/js/Pages/Admin/Gallery/Upload.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script setup lang="ts">
import AdminLayout from "@/Layouts/AdminLayout.vue";

</script>

<template>
<AdminLayout title="Administrador">
<div
class="grid grid-cols-1 items-center gap-10 p-10 sm:grid-cols-[repeat(auto-fill,minmax(theme(spacing.60),1fr))]"
>
</div>
</AdminLayout>
</template>
6 changes: 6 additions & 0 deletions resources/js/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const messages = {
eventType: "Event Type | Event Types",
sponsorTier: "Sponsor Tier | Sponsor Tiers",
},
admin: {
gallery: "Photo Galery",
},
},
pt: {
homePage: {
Expand Down Expand Up @@ -64,6 +67,9 @@ const messages = {
eventType: "Tipo de Evento | Tipos de Evento",
sponsorTier: "Nível de Patrocínio | Níveis de Patrocínio",
},
admin: {
gallery: "Galeria de fotos",
},
},
};

Expand Down
6 changes: 6 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use App\Http\Controllers\EventDayCRUDController;
use App\Http\Controllers\EventTypeCRUDController;
use App\Http\Controllers\FileController;
use App\Http\Controllers\GalleryController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\ProductCRUDController;
use App\Http\Controllers\ProgramController;
Expand Down Expand Up @@ -101,6 +102,11 @@ function () {
'/sponsorTiers' => SponsorTierCRUDController::class,
]);

Route::name('gallery')->prefix('/gallery')->controller(GalleryController::class)->group(function () {
Route::get('/', 'index');
Route::post('/', 'store')->name('.upload');
});

Route::name('index')->get('/', function () {
return Inertia::render('Admin');
});
Expand Down