First commit

This commit is contained in:
PovilasKorop
2021-10-17 10:07:19 +03:00
commit 4a3afbafd3
142 changed files with 230700 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Add new task') }}
</h2>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200">
<x-auth-validation-errors class="mb-4" :errors="$errors"/>
<form action="{{ route('tasks.store') }}" method="POST">
@csrf
<div>
<x-label for="name" :value="__('Name')"/>
<x-input id="name" class="block mt-1 w-full" type="text" name="name"
:value="old('name')" required/>
</div>
<x-button class="mt-4">
{{ __('Submit') }}
</x-button>
</form>
</div>
</div>
</div>
</div>
</x-app-layout>
+34
View File
@@ -0,0 +1,34 @@
<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Edit task') }}
</h2>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200">
<x-auth-validation-errors class="mb-4" :errors="$errors"/>
<form action="{{ route('tasks.update', $task) }}" method="POST">
@csrf
@method('PUT')
<div>
<x-label for="name" :value="__('Name')"/>
<x-input id="name" class="block mt-1 w-full" type="text" name="name"
value="{{ $task->name }}" required/>
</div>
<x-button class="mt-4">
{{ __('Submit') }}
</x-button>
</form>
</div>
</div>
</div>
</div>
</x-app-layout>
+49
View File
@@ -0,0 +1,49 @@
<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Tasks') }}
</h2>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200">
<div class="overflow-hidden overflow-x-auto min-w-full align-middle sm:rounded-md">
<a href="{{ route('tasks.create') }}" class="underline">Add new task</a>
<br /><br />
<table class="min-w-full divide-y divide-gray-200 border">
<thead>
<tr>
<th class="px-6 py-3 bg-gray-50">
<span class="text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider">Name</span>
</th>
<th class="px-6 py-3 bg-gray-50">
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200 divide-solid">
@foreach($tasks as $task)
<tr class="bg-white">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-900">
{{ $task->name }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-900">
<a href="{{ route('tasks.edit', $task) }}" class="underline">Edit</a>
<form action="{{ route('tasks.destroy', $task) }}" method="POST" class="inline-block">
@csrf
@method('DELETE')
<button type="submit" class="underline" onclick="return confirm('Are you sure?')">Delete</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</x-app-layout>