v0.11.2a - Fixed pagination, made a create user
This commit is contained in:
parent
ca855f3349
commit
ed51bb99fa
|
@ -24,8 +24,8 @@ class UserController extends Controller
|
|||
{
|
||||
$this->middleware([ "auth" ])->only("logout");
|
||||
|
||||
$this->middleware([ "guest" ])->only("login");
|
||||
$this->middleware([ "lang" ])->except(["login", "showLogin", "showForgot", "forgot"]);
|
||||
$this->middleware([ "guest" ])->only(["login", "signup"]);
|
||||
$this->middleware([ "lang" ])->except(["login", "showLogin", "showForgot", "forgot","signup"]);
|
||||
|
||||
$this->middleware([ "check.auth:user.show" ])->only("show", "index");
|
||||
$this->middleware([ "check.auth:user.create" ])->only("create");
|
||||
|
@ -74,6 +74,8 @@ class UserController extends Controller
|
|||
"email" => "required",
|
||||
"password" => "required|max:60",
|
||||
"phone" => "required|max:8|min:8",
|
||||
//"eduenddate" => "",
|
||||
//"education" => "required"
|
||||
]);
|
||||
|
||||
|
||||
|
@ -618,4 +620,11 @@ class UserController extends Controller
|
|||
return 'phone';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function signup(){
|
||||
//return redirect()->route("users.signup");
|
||||
return Response::detect("users.signup");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ class WashingReservationController extends Controller
|
|||
{
|
||||
WashingReservation::query()->where('time', '<', date('Y-m-d H:i:s', strtotime('-1 hour')))->delete();
|
||||
|
||||
$reservations = WashingReservation::query()->orderBY('time' , 'asc')->paginate($request->query("limit", 20));
|
||||
$reservations = WashingReservation::query()->orderBy('time', 'asc')->paginate(20);
|
||||
|
||||
|
||||
return Response::detect("washing-reservations.index", [ "reservations" => $reservations]);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@ class CreateUsersTable extends Migration
|
|||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
//$table->date('eduenddate')->nullable();
|
||||
//$table->string('education');
|
||||
$table->string("phone", 8)->unique();
|
||||
$table->rememberToken();
|
||||
$table->foreignId("resource_id")->nullable()->constrained("resources", "id");
|
||||
|
|
|
@ -24,6 +24,8 @@ class UserSeeder extends Seeder
|
|||
$user->email = "admin@admin.local";
|
||||
$user->setPasswordAttribute("1234");
|
||||
$user->phone = "12345678";
|
||||
//$user->eduenddate = "2024-01-03";
|
||||
//$user->education = "Datatekniker med programmering";
|
||||
|
||||
//Gives Administrator role to the Admin
|
||||
$user->assignRole("Administrator");
|
||||
|
@ -41,6 +43,8 @@ class UserSeeder extends Seeder
|
|||
$user->email = "x@x.x";
|
||||
$user->setPasswordAttribute("1");
|
||||
$user->phone = "12345679";
|
||||
//$user->eduenddate = "2024-02-03";
|
||||
//$user->education = "Datatekniker med programmering";
|
||||
|
||||
//Gives Administrator role to the Admin
|
||||
$user->assignRole("Administrator");
|
||||
|
|
|
@ -59,7 +59,8 @@
|
|||
|
||||
.information{
|
||||
text-align: center;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
background-color: rgba(240,240,240,0.8);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
||||
width: 100%;
|
||||
height: 25px;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
@extends("user.layout.base")
|
||||
|
||||
@section("title")
|
||||
Sign up
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<style>
|
||||
img{
|
||||
margin-top: 30%;
|
||||
}
|
||||
</style>
|
||||
<main style="background-color: #00788a; height: 100%;">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<div class="brand">
|
||||
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
|
||||
</div>
|
||||
<form action="{{ route("users.store") }}" method="post">
|
||||
@csrf
|
||||
<input class="appinput" type="text" name="name_first" placeholder="Firstname" required>
|
||||
<input class="appinput" type="text" name="name_last" placeholder="Lastname" required>
|
||||
<input class="appinput" type="email" name="email" placeholder="E-mail" required>
|
||||
<input class="appinput" type="password" name="password" id="password1" placeholder="Password" required>
|
||||
<label hidden id="errornotsamepass" for="errormesseages">Password dosen't match</label>
|
||||
<input class="appinput" type="password" name="password2" id="password2" placeholder="Confirm password" required>
|
||||
<input class="appinput" type="tel" name="phone" placeholder="Phone number" required>
|
||||
<label style="color: white">Education end date:</label>
|
||||
<input class="appinput" type="date" name="eduenddate" placeholder="Education end date" required>
|
||||
<!--Koncept-->
|
||||
<label style="color: white" for="edu">Education:</label>
|
||||
<select style="color: white" name="edu" id="edu">
|
||||
<option value="datapro">Datatekniker med programmering</option>
|
||||
<option value="datainf">Datatekniker med infrastruktur</option>
|
||||
<option value="dataits">Datatekniker med IT-Support</option>
|
||||
<!--<option value="saab">Murer</option>
|
||||
<option value="opel">Tømmer</option>
|
||||
<option value="audi">Maler</option>-->
|
||||
</select>
|
||||
<!--Koncept-->
|
||||
<input class="btn btn-dark" type="submit" id="disable" value="Sign up">
|
||||
</form>
|
||||
<button onclick="window.history.back()" class="btn btn-dark" >Back</button>
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
if ($('#password1').val() != $('#password2').val()) {
|
||||
$("#errornotsamepass").show(100);
|
||||
$("#errornotsamepass").css('color', 'red');
|
||||
$("#disable").prop('disabled', true);
|
||||
} else
|
||||
$("#errornotsamepass").hide();
|
||||
</script>
|
||||
@endsection
|
|
@ -40,6 +40,7 @@ Route::get("/about", "AboutController@index")->name("about.index");
|
|||
Route::post("/events/cancelsignup", "UserEventController@createajaxcancel")->name("userevents.createajaxcancel");
|
||||
Route::post("/account/cancelmailwants", "UserController@createajaxcancel")->name("users.createajaxcancel");
|
||||
Route::delete("/notifications/delete", "EventController@deleteNotifications")->name("notifications.delete");
|
||||
//Route::get("/signup", "UserController@signup")->name("users.signup");
|
||||
|
||||
//Search/Filter
|
||||
Route::get("/contactsapi", "ContactController@search")->name("contacts.search");
|
||||
|
|
Loading…
Reference in New Issue