diff --git a/app/Http/Controllers/Dashboard/AdminPanelController.php b/app/Http/Controllers/Dashboard/AdminPanelController.php index bae51f8..4850e60 100644 --- a/app/Http/Controllers/Dashboard/AdminPanelController.php +++ b/app/Http/Controllers/Dashboard/AdminPanelController.php @@ -6,7 +6,7 @@ use App\Http\Controllers\Controller; use App\Repository\Interfaces\CategoryRepository; use App\Repository\Interfaces\ProjectRepository; use Illuminate\Http\Request; -use Illuminate\View\View; +use Inertia\Response as InertiaResponse; class AdminPanelController extends Controller { @@ -18,12 +18,12 @@ class AdminPanelController extends Controller $this->categoryRepository->auth = true; } - public function __invoke(Request $request): View + public function __invoke(Request $request): InertiaResponse { $categories = $this->categoryRepository->all(); $projects = $this->projectRepository->all(); - return view('dashboard.home', compact('categories', 'projects')); + return inertia('Dashboard/Index', compact('categories', 'projects')); } } diff --git a/app/Http/Controllers/Dashboard/ProjectController.php b/app/Http/Controllers/Dashboard/ProjectController.php index e119758..e3e57ea 100644 --- a/app/Http/Controllers/Dashboard/ProjectController.php +++ b/app/Http/Controllers/Dashboard/ProjectController.php @@ -5,9 +5,9 @@ namespace App\Http\Controllers\Dashboard; use App\Http\Requests\ProjectRequest; use App\Models\Project; use App\Repository\Interfaces\ProjectRepository; -use Carbon\Carbon; use Illuminate\Http\RedirectResponse; use Illuminate\View\View; +use Inertia\Response as InertiaResponse; class ProjectController { @@ -33,9 +33,9 @@ class ProjectController return back()->withError(['message_error', 'Wystąpił błąd podczas aktualizacji!']); } - public function create(): View + public function create(): InertiaResponse { - return view('dashboard.projects.create'); + return inertia('Projects/Create'); } public function store(ProjectRequest $request): RedirectResponse diff --git a/resources/js/Pages/Dashboard/Index.vue b/resources/js/Pages/Dashboard/Index.vue new file mode 100644 index 0000000..823afbf --- /dev/null +++ b/resources/js/Pages/Dashboard/Index.vue @@ -0,0 +1,28 @@ + + + + + + + Dashboard + + + + + + + diff --git a/resources/js/Pages/Projects/Create.vue b/resources/js/Pages/Projects/Create.vue new file mode 100644 index 0000000..5a76d7f --- /dev/null +++ b/resources/js/Pages/Projects/Create.vue @@ -0,0 +1,122 @@ + + + + + + + Nowy projekt + + + + + + + + + + + + + + + + + Dodaj projekt + + + + diff --git a/resources/js/Share/CategoriesList.vue b/resources/js/Share/CategoriesList.vue new file mode 100644 index 0000000..e5344c4 --- /dev/null +++ b/resources/js/Share/CategoriesList.vue @@ -0,0 +1,25 @@ + + + + + + Categories + + + + {{ category.name }} + + + + diff --git a/resources/js/Share/Components/Input.vue b/resources/js/Share/Components/Input.vue new file mode 100644 index 0000000..dd1c51d --- /dev/null +++ b/resources/js/Share/Components/Input.vue @@ -0,0 +1,47 @@ + + + + + {{ label }} + + + + {{ error }} + + \ No newline at end of file diff --git a/resources/js/Share/Layout/App.vue b/resources/js/Share/Layout/App.vue index e1344de..c2a6352 100644 --- a/resources/js/Share/Layout/App.vue +++ b/resources/js/Share/Layout/App.vue @@ -1,7 +1,34 @@ - - - - + + + + + + + + + KamilCraft + + + + + + + + + + + + + diff --git a/resources/js/Share/ProjectsList.vue b/resources/js/Share/ProjectsList.vue new file mode 100644 index 0000000..7f7621f --- /dev/null +++ b/resources/js/Share/ProjectsList.vue @@ -0,0 +1,32 @@ + + + + + + Projekty + Dodaj nowy + + + + + + {{ project.title }} + + + + + + Empty + + +