Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d6a9aa0c4f
|
@ -1,11 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="Laravel.sqlite" uuid="428bc9e4-1a43-4d98-aec6-555a9cf65fb5">
|
||||
<data-source source="LOCAL" name="laravel" uuid="666d3dad-499f-4d99-8988-fd376e6db9e6">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/skolehjem/database/laravel.sqlite</jdbc-url>
|
||||
<libraries>
|
||||
<library>
|
||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.31.1/license.txt</url>
|
||||
</library>
|
||||
<library>
|
||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.31.1/sqlite-jdbc-3.31.1.jar</url>
|
||||
</library>
|
||||
</libraries>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
|
@ -12,6 +12,6 @@ class Event extends Model
|
|||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
"name", "description"
|
||||
"name", "description", "date"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -42,7 +42,8 @@ class EventController extends Controller
|
|||
{
|
||||
$requestBody = $request->validate([
|
||||
"name" => "required|unique:events|max:255",
|
||||
"description" => "required|max:255"
|
||||
"description" => "required|max:255",
|
||||
"date" => "required"
|
||||
]);
|
||||
|
||||
$event = new Event($requestBody);
|
||||
|
@ -101,10 +102,10 @@ class EventController extends Controller
|
|||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function destroy(Event $id)
|
||||
public function destroy($id)
|
||||
{
|
||||
$id->delete();
|
||||
|
||||
return Response::detect("events.destroy");
|
||||
$link = Event::find($id);
|
||||
$link->delete();
|
||||
return redirect()->route("events.index");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ class CreateEvents extends Migration
|
|||
$table->id();
|
||||
$table->string("name");
|
||||
$table->string("description");
|
||||
$table->dateTime("date");
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
|
@ -57,7 +57,8 @@ form {
|
|||
display: inline-flex;
|
||||
}
|
||||
|
||||
input {
|
||||
input,
|
||||
select {
|
||||
border: grey solid 2px;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
|
|
|
@ -57,7 +57,8 @@ form {
|
|||
display: inline-flex;
|
||||
}
|
||||
|
||||
input {
|
||||
input,
|
||||
select {
|
||||
border: grey solid 2px;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
|
@ -6752,7 +6753,7 @@ main {
|
|||
|
||||
@media (min-width: 410px) {
|
||||
.calendar-table__header .calendar-table__col {
|
||||
width: 54px;
|
||||
width: 47.5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ form {
|
|||
display: inline-flex;
|
||||
}
|
||||
|
||||
input{
|
||||
input, select{
|
||||
border: grey solid 2px;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
|
|
|
@ -296,7 +296,7 @@ $primary-color: $blue;
|
|||
}
|
||||
|
||||
@include mq(410) {
|
||||
width: 54px;
|
||||
width: 47.5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,19 +2,23 @@
|
|||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Vaskemaskiner - Vis
|
||||
Aktivitet - Vis
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Opret Vaskemaskine</a> /
|
||||
<a href="{{ route('events.create') }}" class="text-white">Opret Aktivitet</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Opret Bruger:</h1>
|
||||
<form method="post" action="{{ route("washing-machines.store") }}">
|
||||
<h1>Opret Aktivitet:</h1>
|
||||
<form method="post" action="{{ route("events.store") }}">
|
||||
@csrf
|
||||
<label for="name_first">Navn:</label>
|
||||
<label for="name">Navn:</label>
|
||||
<input type="text" name="name" id="name" max="60" required>
|
||||
<label for="description">Beskrivelse:</label>
|
||||
<input type="text" name="description" id="description" max="500" required>
|
||||
<label for="date">Aktivitet dato:</label>
|
||||
<input type="date" name="date" id="date" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
|
||||
|
|
|
@ -2,30 +2,12 @@
|
|||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Vaskemaskiner - Vis
|
||||
Aktivitet - Fjern
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Vis Vaskemaskiner</a> /
|
||||
<a href="{{ route('events.destroy') }}" class="text-white"> fjern aktivitet</a>
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Fornavn</th>
|
||||
<th>Efternavn</th>
|
||||
<th>Email</th>
|
||||
<th>Tlf nr</th>
|
||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{Fornavn}</td>
|
||||
<td>{Efternavn}</td>
|
||||
<td>{Email}</td>
|
||||
<td>{TLF}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
@endsection
|
||||
|
|
|
@ -6,26 +6,18 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route("events.index") }}" class="text-white">Vis Events</a> /
|
||||
<a href="" class="text-white">Vis Events</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Fornavn</th>
|
||||
<th>Efternavn</th>
|
||||
<th>Email</th>
|
||||
<th>Tlf nr</th>
|
||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{Fornavn}</td>
|
||||
<td>{Efternavn}</td>
|
||||
<td>{Email}</td>
|
||||
<td>{TLF}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1>Rediger Link:</h1>
|
||||
<form method="post" action="{{route("events.update", ["event" => $event])}}">
|
||||
@csrf
|
||||
@method("PUT")
|
||||
<label for="title">Titel:</label>
|
||||
<input value="{{$event->name}}" type="text" name="title" id="title" required>
|
||||
<label for="link">Linket:</label>
|
||||
<input value="{{$event->description}}" type="text" name="link" id="link" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<tr>
|
||||
<th>Event Navn</th>
|
||||
<th>Event Beskrivelse</th>
|
||||
<th>Event Dato</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
|
@ -21,8 +22,14 @@
|
|||
<tr>
|
||||
<td>{{ $event->name }}</td>
|
||||
<td>{{ $event->description }}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
<td>{{ $event->date }}</td>
|
||||
<td><a href="{{ route("events.edit", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("events.destroy", [ "event" => $event ]) }}" class="w-100">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100" type="submit"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
|
|
@ -6,26 +6,9 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Vis Vaskemaskiner</a> /
|
||||
<a href="{{ route('events.create') }}" class="text-white">Opret External Link</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Fornavn</th>
|
||||
<th>Efternavn</th>
|
||||
<th>Email</th>
|
||||
<th>Tlf nr</th>
|
||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{Fornavn}</td>
|
||||
<td>{Efternavn}</td>
|
||||
<td>{Email}</td>
|
||||
<td>{TLF}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
Link blev (ikke) oprettet.
|
||||
@endsection
|
||||
|
|
|
@ -6,26 +6,9 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Vis Vaskemaskiner</a> /
|
||||
<a href="{{ route('events.edit', ["event" => $event]) }}" class="text-white">External link</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Fornavn</th>
|
||||
<th>Efternavn</th>
|
||||
<th>Email</th>
|
||||
<th>Tlf nr</th>
|
||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{Fornavn}</td>
|
||||
<td>{Efternavn}</td>
|
||||
<td>{Email}</td>
|
||||
<td>{TLF}</td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
Din link blev (ikke) redigeret.
|
||||
@endsection
|
||||
|
|
|
@ -25,6 +25,12 @@
|
|||
<input type="password" id="password2" placeholder="Bekræft Password" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="role" id="role" class="mb-2" required>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="staff">Personale</option>
|
||||
<option value="resident">Beboer</option>
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
@endsection
|
||||
|
|
|
@ -15,17 +15,23 @@
|
|||
@csrf
|
||||
@method("put")
|
||||
<label for="name_first">Fornavn:</label>
|
||||
<input type="text" name="name_first" id="name_first" value="{{ $user->name_first }}" required>
|
||||
<input type="text" name="name_first" id="name_first" value="{{ $user->name_first }}" required>
|
||||
<label for="name_last">Efternavn:</label>
|
||||
<input type="text" name="name_last" id="name_last" value="{{ $user->name_last }}" required>
|
||||
<input type="text" name="name_last" id="name_last" value="{{ $user->name_last }}" required>
|
||||
<label for="email">Email:</label>
|
||||
<input type="email" name="email" id="email" value="{{ $user->name_email }}" required>
|
||||
<input type="email" name="email" id="email" value="{{ $user->name_email }}" required>
|
||||
<label for="password1">Password:</label>
|
||||
<input type="password" name="password" id="password1" value="" required>
|
||||
<input type="password" name="password" id="password1" value="" required>
|
||||
<label for="password2">Confirm Password:</label>
|
||||
<input type="password" id="password2" value="" required>
|
||||
<input type="password" id="password2" value="" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
||||
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="role" id="role" class="mb-2" required>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="staff">Personale</option>
|
||||
<option value="resident">Beboer</option>
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
|
|
|
@ -16,18 +16,20 @@
|
|||
<th>Efternavn</th>
|
||||
<th>Email</th>
|
||||
<th>Tlf nr</th>
|
||||
<th>Rolle</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
<tr>
|
||||
<td>{{ $user->name_first }}</td>
|
||||
<td>{{ $user->name_last }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>{{ $user->phone }}</td>
|
||||
<td>{{ $user->roles }}</td>
|
||||
<td><a href="{{ route("users.edit", [ "user" => $user->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href="{{ route("users.destroy", [ "user" => $user ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
</tr>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
@section("content")
|
||||
<main>
|
||||
<h1 class="text-center sde-blue mb-0">Aktiviteter</h1>
|
||||
|
||||
<h3 class="sde-blue bold text-center mb-0">{Aktivitet}</h3>
|
||||
<p class="text-center mt-0">{Dato}</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sodales pulvinar congue aenean suspendisse.</p>
|
||||
<a class="btn text-center btn-sde-blue btn-disabled" id="tilmeld">Tilmeld</a>
|
||||
|
||||
<h3 class="sde-blue bold text-center mb-0">{Aktivitet2}</h3>
|
||||
<p class="text-center mt-0">{Dato}</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sodales pulvinar congue aenean suspendisse.</p>
|
||||
<a class="btn text-center btn-sde-blue btn-disabled" id="tilmeld">Tilmeld</a>
|
||||
@foreach($events as $event)
|
||||
<h3 class="sde-blue bold text-center mb-0">{{$event->name}}</h3>
|
||||
<p class="text-center mt-0">{{$event->date}}</p>
|
||||
<p>{{$event->description}}</p>
|
||||
<a class="btn text-center btn-sde-blue btn-disabled" id="tilmeld">Tilmeld</a>
|
||||
@endforeach
|
||||
</main>
|
||||
@endsection
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue