- wip dashboard

This commit is contained in:
2023-07-28 00:47:36 +02:00
parent 992326ebf0
commit f5977c1b5d
8 changed files with 291 additions and 10 deletions

View File

@@ -0,0 +1,28 @@
<script setup>
import ProjectsList from '../../Share/ProjectsList.vue';
import CategoriesList from '../../Share/CategoriesList.vue';
defineProps({
categories: {
type: Array,
required: true,
},
projects: {
type: Array,
required: true,
},
});
</script>
<template>
<InertiaHead title="Dashboard" />
<div class="p-4">
<header class="pb-4">
<h1 class="text-3xl font-roboto font-light">Dashboard</h1>
</header>
<div class="grid md:grid-cols-3 lg:grid-cols-4 gap-3">
<ProjectsList class="md:col-span-2 lg:col-span-3" :projects="projects" />
<CategoriesList class="col-span-1" :categories="categories" />
</div>
</div>
</template>

View File

@@ -0,0 +1,122 @@
<script setup>
import { useForm } from '@inertiajs/inertia-vue3';
import Input from '../../Share/Components/Input.vue';
const form = useForm({
title: null,
author: null,
categories: null,
release_date: null,
update_date: null,
image_small: null,
image_medium: null,
image_large: null,
project_url: null,
project_version: null,
description: null,
visible: false,
});
</script>
<template>
<InertiaHead title="Nowy projekt" />
<div class="p-4">
<header class="pb-4">
<h1 class="text-3xl font-roboto font-light">Nowy projekt</h1>
</header>
<div>
<form class="flex flex-col gap-4" @submit.prevent>
<Input
id="title"
label="Tytuł"
placeholder="Nazwa projektu"
v-model="form.title"
:error="form.errors.title"
/>
<Input
id="author"
label="Autor"
placeholder="Imię i nazwisko"
v-model="form.author"
:error="form.errors.author"
/>
<Input
id="categories"
label="Kategorie"
placeholder="Kategorie projektu"
v-model="form.categories"
:error="form.errors.categories"
/>
<Input
id="release_date"
label="Data pierwszego wydania"
type="date"
v-model="form.release_date"
:error="form.errors.release_date"
/>
<Input
id="update_date"
label="Data aktualizacji"
type="date"
v-model="form.update_date"
:error="form.errors.update_date"
/>
<Input
id="image_small"
label="Zdjęcie projekty - małe"
v-model="form.image_small"
:error="form.errors.image_small"
/>
<Input
id="image_medium"
label="Zdjęcie projekty - średnie"
v-model="form.image_medium"
:error="form.errors.image_medium"
/>
<Input
id="image_large"
label="Zdjęcie projekty - duże"
v-model="form.image_large"
:error="form.errors.image_large"
/>
<Input
id="project_url"
label="Adres projektu"
placeholder="Adres www strony projektu"
v-model="form.project_url"
:error="form.errors.project_url"
/>
<Input
id="project_url"
label="Adres projektu"
placeholder="Adres www strony projektu"
v-model="form.project_url"
:error="form.errors.project_url"
/>
<Input
id="project_version"
label="Wersja projektu"
placeholder="v1.0.0"
v-model="form.project_version"
:error="form.errors.project_version"
/>
<Input
id="description"
label="Opis"
type="textarea"
placeholder="Ładny opis"
v-model="form.description"
:error="form.errors.description"
textareaHeight="200px"
/>
<Input
id="visible"
label="Widoczny"
type="checkbox"
v-model="form.visible"
/>
<button class="px-0.5 py-1 rounded-lg bg-[#436da7] border-4 border-[#436da7] text-white text-lg hover:bg-transparent hover:text-[#436da7]">Dodaj projekt</button>
</form>
</div>
</div>
</template>