This commit is contained in:
Kamil Niemczycki 2023-08-03 12:26:42 +02:00
parent 9d7da548e3
commit a7e93681f3
Signed by: kamilniemczycki
GPG Key ID: 04D4E2012F969213
4 changed files with 59 additions and 5 deletions

View File

@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace App\Http\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use Inertia\Response as InertiaResponse;
class MessageController extends Controller
{
public function index() : InertiaResponse {
return inertia('Messages/Index');
}
}

View File

@ -0,0 +1,34 @@
<template>
<InertiaHead title="Wiadomości" />
<div class="p-4">
<header class="pb-4">
<h1 class="text-3xl font-roboto font-light">Wiadomości</h1>
</header>
<div class="overflow-x-auto">
<table v-if="cvs.data.length" class="w-full min-w-[600px] border-separate border-spacing-y-2 cursor-pointer">
<colgroup>
<col class="w-min" />
</colgroup>
<thead class="text-left bg-gray-100">
<th class="p-2 text-center">ID</th>
<th class="p-2">Wysyłający</th>
<th class="w-[100px] p-2 whitespace-nowrap">E-mail</th>
<th class="p-2"></th>
</thead>
<tbody>
<!-- <InertiaLink
as="tr"
v-for="(cv, key) in cvs.data"
:key="key"
class="px-3 py-2 bg-white hover:bg-neutral-200 rounded-md z-10"
:href="`/dashboard/message/${cv.token}`">
<td></td>
<td></td>
<td></td>
<td></td>
</InertiaLink> -->
</tbody>
</table>
</div>
</div>
</template>

View File

@ -29,6 +29,7 @@ defineProps({
<ul class="flex gap-3 items-center font-bold">
<li><InertiaLink class="text-white active:text-kamilcraft-green hover:text-black hover:underline" href="/dashboard">Dashboard</InertiaLink></li>
<li><InertiaLink class="text-white active:text-kamilcraft-green hover:text-black hover:underline" href="/dashboard/cv">CV</InertiaLink></li>
<li><InertiaLink class="text-white active:text-kamilcraft-green hover:text-black hover:underline" href="/dashboard/message">Wiadomości</InertiaLink></li>
</ul>
</nav>
</div>

View File

@ -5,9 +5,13 @@ declare(strict_types=1);
use Illuminate\Support\Facades\Route;
Route::name('admin.')->group(function () {
Route::namespace('Dashboard')->middleware('auth')->group(function () {
Route::namespace('Dashboard')->middleware('auth')->group(function (): void {
Route::get('', 'AdminPanelController')->name('home');
Route::name('cv.')->prefix('cv')->group(function () {
Route::name('message.')->prefix('message')->group(function (): void {
Route::get('', 'MessageController@index')
->name('index');
});
Route::name('cv.')->prefix('cv')->group(function (): void {
Route::get('', 'CVController@index')
->name('index');
Route::get('create', 'CVController@create')
@ -27,7 +31,7 @@ Route::name('admin.')->group(function () {
Route::delete('{cv}/delete', 'CVController@destroy')
->name('destroy');
});
Route::name('category.')->prefix('category')->group(function () {
Route::name('category.')->prefix('category')->group(function (): void {
Route::get('create', 'CategoryController@create')
->name('create');
Route::post('', 'CategoryController@store')
@ -44,7 +48,7 @@ Route::name('admin.')->group(function () {
->name('destroy');
});
Route::name('project.')->prefix('project')->group(function () {
Route::name('project.')->prefix('project')->group(function (): void {
Route::get('create', 'ProjectController@create')
->name('create');
Route::post('', 'ProjectController@store')
@ -62,7 +66,7 @@ Route::name('admin.')->group(function () {
});
});
Route::name('auth.')->namespace('Auth')->group(function () {
Route::name('auth.')->namespace('Auth')->group(function (): void {
Route::get('login', 'LoginController@login')
->name('login');
Route::post('login', 'LoginController@authenticate')