Conflicts:
	skolehjem/database/migrations/2020_06_23_070657_create_menu_plans.php
	skolehjem/resources/views/admin/users/index.blade.php
This commit is contained in:
Sebastian Davaris 2020-06-30 08:25:18 +02:00
commit f638777878
18 changed files with 120 additions and 47 deletions

View File

@ -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="2ea08053-eec3-43f2-8f7e-59e448f603dd">
<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>

View File

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

View File

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

View File

@ -57,7 +57,8 @@ form {
display: inline-flex;
}
input {
input,
select {
border: grey solid 2px;
border-radius: 4px;
background-color: transparent;
@ -473,6 +474,16 @@ a {
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
* 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;
}
input {
input,
select {
border: grey solid 2px;
border-radius: 4px;
background-color: transparent;
@ -473,6 +474,16 @@ a {
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
* 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) {
.calendar-table__header .calendar-table__col {
width: 54px;
width: 47.5px;
}
}

View File

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

View File

@ -1,3 +1,13 @@
.hide {
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) {
width: 54px;
width: 47.5px;
}
}
}

View File

@ -26,7 +26,13 @@
<td>{{ $contact->email }}</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.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>
@endforeach
</table>

View File

@ -24,12 +24,13 @@
<td>{{ $event->description }}</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">
<td><form method="post" action="{{ route("events.destroy", [ "event" => $event ]) }}" class="w-100 nostyle">
@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>
<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>
@endforeach
</table>

View File

@ -22,12 +22,13 @@
<td>{{$link->name}}</td>
<td><a href="{{$link->link}}">{{$link->link}}</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
@method("delete")
<button class="w-100" type="submit"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form></td>
<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>
@endforeach
</table>

View File

@ -26,7 +26,13 @@
<td>{{$menuplan->wednesday}}</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.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>
@endforeach
</table>

View File

@ -2,13 +2,13 @@
@extends("admin.layout.header")
@section("title")
Vaskemaskiner - Opret
Menuplan - Opret
@endsection
@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
@section("content")
Vaskemaskinen blev (ikke) oprettet.
Menuplanen blev (ikke) oprettet.
@endsection

View File

@ -26,7 +26,13 @@
<td>{{ $staff->email }}</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.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>
@endforeach
</table>

View File

@ -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

View File

@ -26,6 +26,12 @@
<input type="password" id="password2" value="" required>
<label for="tel">Telefon nr:</label>
<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

View File

@ -16,6 +16,7 @@
<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>
@ -25,13 +26,13 @@
<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>
<form method="post" action="{{ route("users.destroy", [ "user" => $user ]) }}" class="w-100">
<td><form method="post" action="{{ route("users.destroy", [ "user" => $user ]) }}" class="w-100 nostyle">
@csrf
@method("delete")
<button class="w-100"><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>
</tr>

View File

@ -26,7 +26,13 @@
<td>{Tlf 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/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>
@endforeach
</table>