This commit is contained in:
Neerholt 2020-06-30 08:50:14 +02:00
commit fd87e133e9
27 changed files with 198 additions and 55 deletions

View File

@ -1,11 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true"> <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="laravel.sqlite" uuid="2ea08053-eec3-43f2-8f7e-59e448f603dd"> <data-source source="LOCAL" name="laravel" uuid="666d3dad-499f-4d99-8988-fd376e6db9e6">
<driver-ref>sqlite.xerial</driver-ref> <driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize> <synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver> <jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/skolehjem/database/laravel.sqlite</jdbc-url> <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> </data-source>
</component> </component>
</project> </project>

10
skolehjem/app/Album.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Album extends Model
{
//
}

View File

@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class Feedbacks extends Model class Feedbacks extends Model
{ {
// protected $fillable = [
'message', "suggestion_form"
];
} }

View File

@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AlbumController extends Controller
{
//
}

View File

@ -41,14 +41,14 @@ class FeedbackController extends Controller
public function store(Request $request) public function store(Request $request)
{ {
$requestBody = $request->validate([ $requestBody = $request->validate([
"name" => "required|max:255", "message" => "required",
"link" => "required|max:255" "suggestion_form" => "required|max:255"
]); ]);
$feedback = new Feedbacks($requestBody); $feedbacks = new Feedbacks($requestBody);
$feedback->save(); $feedbacks->save();
return Response::detect("feedback.store"); return Response::detect("root.index");
} }
/** /**

View File

@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ImageController extends Controller
{
//
}

View File

@ -44,10 +44,7 @@ class MenuPlanController extends Controller
"monday" => "required|max:255", "monday" => "required|max:255",
"tuesday" => "required|max:255", "tuesday" => "required|max:255",
"wednesday" => "required|max:255", "wednesday" => "required|max:255",
"thursday" => "required|max:255", "thursday" => "required|max:255"
"friday" => "required|max:255",
"saturday" => "required|max:255",
"sunday" => "required|max:255"
]); ]);
$menuPlans = new MenuPlan($requestMenuPlanCreate); $menuPlans = new MenuPlan($requestMenuPlanCreate);

View File

@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class VideoController extends Controller
{
//
}

10
skolehjem/app/Image.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Image extends Model
{
//
}

10
skolehjem/app/Video.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Video extends Model
{
//
}

View File

@ -19,9 +19,6 @@ class CreateMenuPlans extends Migration
$table->string('tuesday', 255); $table->string('tuesday', 255);
$table->string('wednesday', 255); $table->string('wednesday', 255);
$table->string('thursday', 255); $table->string('thursday', 255);
$table->string('friday', 255);
$table->string('saturday', 255);
$table->string('sunday', 255);
$table->timestamps(); $table->timestamps();
//$table->text('description'); //$table->text('description');
}); });

View File

@ -57,7 +57,8 @@ form {
display: inline-flex; display: inline-flex;
} }
input { input,
select {
border: grey solid 2px; border: grey solid 2px;
border-radius: 4px; border-radius: 4px;
background-color: transparent; background-color: transparent;
@ -473,6 +474,16 @@ a {
display: block !important; display: block !important;
} }
.nostyle {
margin: 0 !important;
padding: 0 !important;
border: 0 !important;
outline: 0 !important;
font-size: 100% !important;
vertical-align: baseline !important;
background: transparent !important;
}
/*! /*!
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com * Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)

View File

@ -57,7 +57,8 @@ form {
display: inline-flex; display: inline-flex;
} }
input { input,
select {
border: grey solid 2px; border: grey solid 2px;
border-radius: 4px; border-radius: 4px;
background-color: transparent; background-color: transparent;
@ -473,6 +474,16 @@ a {
display: block !important; display: block !important;
} }
.nostyle {
margin: 0 !important;
padding: 0 !important;
border: 0 !important;
outline: 0 !important;
font-size: 100% !important;
vertical-align: baseline !important;
background: transparent !important;
}
/*! /*!
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com * Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
@ -6752,7 +6763,7 @@ main {
@media (min-width: 410px) { @media (min-width: 410px) {
.calendar-table__header .calendar-table__col { .calendar-table__header .calendar-table__col {
width: 54px; width: 47.5px;
} }
} }

View File

@ -37,7 +37,7 @@ form {
display: inline-flex; display: inline-flex;
} }
input{ input, select{
border: grey solid 2px; border: grey solid 2px;
border-radius: 4px; border-radius: 4px;
background-color: transparent; background-color: transparent;

View File

@ -1,3 +1,13 @@
.hide { .hide {
display: block !important; display: block !important;
} }
.nostyle {
margin: 0 !important;
padding: 0 !important;
border: 0 !important;
outline: 0 !important;
font-size: 100% !important;
vertical-align: baseline !important;
background: transparent !important;
}

View File

@ -296,7 +296,7 @@ $primary-color: $blue;
} }
@include mq(410) { @include mq(410) {
width: 54px; width: 47.5px;
} }
} }
} }

View File

@ -26,7 +26,13 @@
<td>{{ $contact->email }}</td> <td>{{ $contact->email }}</td>
<td>{{ $contact->phone }}</td> <td>{{ $contact->phone }}</td>
<td><a href="{{ route("contacts.edit", [ "contact" => $contact ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td> <td><a href="{{ route("contacts.edit", [ "contact" => $contact ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td><a href="{{ route("contacts.destroy", [ "contact" => $contact ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td> <td><form method="post" action="{{ route("contacts.destroy", [ "contact" => $contact ]) }}" class="w-100 nostyle">
@csrf
@method("delete")
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>

View File

@ -24,12 +24,13 @@
<td>{{ $event->description }}</td> <td>{{ $event->description }}</td>
<td>{{ $event->date }}</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><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"> <td><form method="post" action="{{ route("events.destroy", [ "event" => $event ]) }}" class="w-100 nostyle">
@csrf @csrf
@method("delete") @method("delete")
<button class="w-100" type="submit"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button> <button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form></td> </form>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>

View File

@ -22,12 +22,13 @@
<th>{{$link->name}}</th> <th>{{$link->name}}</th>
<th><a href="{{$link->link}}">{{$link->link}}</th> <th><a href="{{$link->link}}">{{$link->link}}</th>
<td><a href="{{ route("external-links.edit", [ "external_link" => $link ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td> <td><a href="{{ route("external-links.edit", [ "external_link" => $link ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td> <form method="post" action="{{ route("external-links.destroy", [ "external_link" => $link ]) }}" class="w-100"> <td><form method="post" action="{{ route("external-links.destroy", [ "external_link" => $link ]) }}" class="w-100 nostyle">
@csrf @csrf
@method("delete") @method("delete")
<button class="w-100" type="submit"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button> <button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form></td> </form>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>

View File

@ -26,7 +26,13 @@
<td>{{$menuplan->wednesday}}</td> <td>{{$menuplan->wednesday}}</td>
<td>{{$menuplan->thursday}}</td> <td>{{$menuplan->thursday}}</td>
<td><a href="{{ route("menu-plans.edit", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td> <td><a href="{{ route("menu-plans.edit", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td><a href="{{ route("menu-plans.destroy", [ "menu_plan" => $menuplan ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td> <td><form method="post" action="{{ route("menu-plans.destroy", [ "menu_plan" => $menuplan ]) }}" class="w-100 nostyle">
@csrf
@method("delete")
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>

View File

@ -2,13 +2,13 @@
@extends("admin.layout.header") @extends("admin.layout.header")
@section("title") @section("title")
Vaskemaskiner - Opret Menuplan - Opret
@endsection @endsection
@section("path") @section("path")
<a href="{{ route('menu-plans.create') }}" class="text-white">Opret Vaskemaskiner</a> / <a href="{{ route('menu-plans.create') }}" class="text-white">Opret Menuplan</a> /
@endsection @endsection
@section("content") @section("content")
Vaskemaskinen blev (ikke) oprettet. Menuplanen blev (ikke) oprettet.
@endsection @endsection

View File

@ -26,7 +26,13 @@
<td>{{ $staff->email }}</td> <td>{{ $staff->email }}</td>
<td>{{ $staff->phone }}</td> <td>{{ $staff->phone }}</td>
<td><a href="{{ route("staff.edit", [ "staff" => $staff->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td> <td><a href="{{ route("staff.edit", [ "staff" => $staff->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td><a href="{{ route("staff.destroy", [ "staff" => $staff->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td> <td><form method="post" action="{{ route("staff.destroy", [ "staff" => $staff->id ]) }}" class="w-100 nostyle">
@csrf
@method("delete")
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>

View File

@ -25,6 +25,12 @@
<input type="password" id="password2" placeholder="Bekræft Password" required> <input type="password" id="password2" placeholder="Bekræft Password" required>
<label for="tel">Telefon nr:</label> <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> <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"> <input type="submit" class="btn btn-dark text-white" value="Opret">
</form> </form>
@endsection @endsection

View File

@ -26,6 +26,12 @@
<input type="password" id="password2" value="" required> <input type="password" id="password2" value="" required>
<label for="tel">Telefon nr:</label> <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"> <input type="submit" class="btn btn-dark text-white" value="Rediger">
</form> </form>
@endsection @endsection

View File

@ -16,6 +16,7 @@
<th>Efternavn</th> <th>Efternavn</th>
<th>Email</th> <th>Email</th>
<th>Tlf nr</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/pencil.svg') }}" alt="Update"></th>
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th> <th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
</tr> </tr>
@ -25,8 +26,15 @@
<td>{{ $user->name_last }}</td> <td>{{ $user->name_last }}</td>
<td>{{ $user->email }}</td> <td>{{ $user->email }}</td>
<td>{{ $user->phone }}</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.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> <td><form method="post" action="{{ route("users.destroy", [ "user" => $user ]) }}" class="w-100 nostyle">
@csrf
@method("delete")
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>

View File

@ -26,7 +26,13 @@
<td>{Tlf Nr}</td> <td>{Tlf Nr}</td>
<td>{Vaskemaskine Nr.}</td> <td>{Vaskemaskine Nr.}</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/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><form method="post" action="" class="w-100 nostyle">
@csrf
@method("delete")
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>

View File

@ -6,14 +6,15 @@
@section("content") @section("content")
<main class="h-100 text-center"> <main class="h-100 text-center">
<form action="" method="post" required> <form action="{{ action('FeedbackController@store') }}" method="post">
@csrf
<span>Ris el. Ros?</span> <span>Ris el. Ros?</span>
<select name="choose_suggestion" class="mb-2"> <select name="suggestion_form" class="mb-2" required>
<option>Ros</option> <option>Ros</option>
<option>Ris</option> <option>Ris</option>
</select> </select>
<textarea name="feedback_message" placeholder="Skriv Ris/Ros besked her" required></textarea> <textarea name="message" placeholder="Skriv Ris/Ros besked her" required></textarea>
<button class="btn btn-sde-blue mt-2" onclick="window.location = '';">Send Ris/Ros</button> <button type="submit" class="btn btn-sde-blue mt-2">Send Ris/Ros</button>
</form> </form>
</main> </main>
@endsection @endsection