mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
login as lecturer
This commit is contained in:
20
.blueprint
20
.blueprint
@@ -8,16 +8,16 @@ created:
|
|||||||
- database/factories/VenueFactory.php
|
- database/factories/VenueFactory.php
|
||||||
- database/factories/EventFactory.php
|
- database/factories/EventFactory.php
|
||||||
- database/factories/RegistrationFactory.php
|
- database/factories/RegistrationFactory.php
|
||||||
- database/migrations/2022_11_30_170514_create_countries_table.php
|
- database/migrations/2022_12_01_100450_create_countries_table.php
|
||||||
- database/migrations/2022_11_30_170515_create_cities_table.php
|
- database/migrations/2022_12_01_100451_create_cities_table.php
|
||||||
- database/migrations/2022_11_30_170516_create_lecturers_table.php
|
- database/migrations/2022_12_01_100452_create_lecturers_table.php
|
||||||
- database/migrations/2022_11_30_170517_create_participants_table.php
|
- database/migrations/2022_12_01_100453_create_participants_table.php
|
||||||
- database/migrations/2022_11_30_170518_create_categories_table.php
|
- database/migrations/2022_12_01_100454_create_categories_table.php
|
||||||
- database/migrations/2022_11_30_170519_create_courses_table.php
|
- database/migrations/2022_12_01_100455_create_courses_table.php
|
||||||
- database/migrations/2022_11_30_170520_create_venues_table.php
|
- database/migrations/2022_12_01_100456_create_venues_table.php
|
||||||
- database/migrations/2022_11_30_170521_create_events_table.php
|
- database/migrations/2022_12_01_100457_create_events_table.php
|
||||||
- database/migrations/2022_11_30_170522_create_registrations_table.php
|
- database/migrations/2022_12_01_100458_create_registrations_table.php
|
||||||
- database/migrations/2022_11_30_170523_create_category_course_table.php
|
- database/migrations/2022_12_01_100459_create_category_course_table.php
|
||||||
- app/Models/Country.php
|
- app/Models/Country.php
|
||||||
- app/Models/City.php
|
- app/Models/City.php
|
||||||
- app/Models/Lecturer.php
|
- app/Models/Lecturer.php
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class CreateNewUser implements CreatesNewUsers
|
|||||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||||
'password' => app()->environment('local') ? 'required' : $this->passwordRules(),
|
'password' => app()->environment('local') ? 'required' : $this->passwordRules(),
|
||||||
'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '',
|
'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '',
|
||||||
|
'is_lecturer' => ['required'],
|
||||||
])
|
])
|
||||||
->validate();
|
->validate();
|
||||||
|
|
||||||
@@ -36,6 +37,7 @@ class CreateNewUser implements CreatesNewUsers
|
|||||||
'name' => $input['name'],
|
'name' => $input['name'],
|
||||||
'email' => $input['email'],
|
'email' => $input['email'],
|
||||||
'password' => Hash::make($input['password']),
|
'password' => Hash::make($input['password']),
|
||||||
|
'is_lecturer' => $input['is_lecturer'] === 'on',
|
||||||
]), function (User $user) {
|
]), function (User $user) {
|
||||||
$this->createTeam($user);
|
$this->createTeam($user);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name', 'email', 'password',
|
'name',
|
||||||
|
'email',
|
||||||
|
'password',
|
||||||
|
'is_lecturer',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Venue extends Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
@@ -22,6 +23,7 @@ class Venue extends Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be cast to native types.
|
* The attributes that should be cast to native types.
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
|||||||
@@ -4,11 +4,9 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
@@ -16,19 +14,24 @@ return new class extends Migration
|
|||||||
Schema::create('users', function (Blueprint $table) {
|
Schema::create('users', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('email')->unique();
|
$table->string('email')
|
||||||
$table->timestamp('email_verified_at')->nullable();
|
->unique();
|
||||||
|
$table->timestamp('email_verified_at')
|
||||||
|
->nullable();
|
||||||
$table->string('password');
|
$table->string('password');
|
||||||
$table->rememberToken();
|
$table->rememberToken();
|
||||||
$table->foreignId('current_team_id')->nullable();
|
$table->foreignId('current_team_id')
|
||||||
$table->string('profile_photo_path', 2048)->nullable();
|
->nullable();
|
||||||
|
$table->string('profile_photo_path', 2048)
|
||||||
|
->nullable();
|
||||||
|
$table->boolean('is_lecturer')
|
||||||
|
->default(false);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the migrations.
|
* Reverse the migrations.
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
|
|||||||
@@ -37,11 +37,13 @@ class DatabaseSeeder extends Seeder
|
|||||||
'password' => bcrypt('1234'),
|
'password' => bcrypt('1234'),
|
||||||
'remember_token' => Str::random(10),
|
'remember_token' => Str::random(10),
|
||||||
]);
|
]);
|
||||||
Team::create([
|
$team = Team::create([
|
||||||
'name' => 'Admin Team',
|
'name' => 'Admin Team',
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'personal_team' => true,
|
'personal_team' => true,
|
||||||
]);
|
]);
|
||||||
|
$user->current_team_id = $team->id;
|
||||||
|
$user->save();
|
||||||
Country::create([
|
Country::create([
|
||||||
'name' => 'Deutschland',
|
'name' => 'Deutschland',
|
||||||
'code' => 'de',
|
'code' => 'de',
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"I want to submit new courses on this platform": "Ich bin Dozent und möchte neue Kurse auf dieser Plattform einstellen",
|
||||||
"(and :count more error)": "(und :count weiterer Fehler)",
|
"(and :count more error)": "(und :count weiterer Fehler)",
|
||||||
"(and :count more errors)": "(und :count weitere Fehler)",
|
"(and :count more errors)": "(und :count weitere Fehler)",
|
||||||
"A fresh verification link has been sent to your email address.": "Ein neuer Bestätigungslink wurde an Ihre E-Mail-Adresse gesendet.",
|
"A fresh verification link has been sent to your email address.": "Ein neuer Bestätigungslink wurde an Ihre E-Mail-Adresse gesendet.",
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center justify-end mt-4">
|
<div class="flex items-center justify-end mt-4">
|
||||||
|
|
||||||
@if (Route::has('password.request'))
|
@if (Route::has('password.request'))
|
||||||
<a class="underline text-sm text-gray-600 hover:text-gray-900"
|
<a class="underline text-sm text-gray-600 hover:text-gray-900"
|
||||||
href="{{ route('password.request') }}">
|
href="{{ route('password.request') }}">
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
<x-jet-button class="ml-4">
|
<x-jet-button class="ml-4">
|
||||||
{{ __('Log in') }}
|
{{ __('Log in') }}
|
||||||
</x-jet-button>
|
</x-jet-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</x-jet-authentication-card>
|
</x-jet-authentication-card>
|
||||||
|
|||||||
@@ -11,22 +11,38 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<x-jet-label for="name" value="{{ __('Name') }}"/>
|
<x-jet-label for="name" value="{{ __('Name') }}"/>
|
||||||
<x-jet-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name')" required autofocus autocomplete="name" />
|
<x-jet-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name')" required
|
||||||
|
autofocus autocomplete="name"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<x-jet-label for="email" value="{{ __('Email') }}"/>
|
<x-jet-label for="email" value="{{ __('Email') }}"/>
|
||||||
<x-jet-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required />
|
<x-jet-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')"
|
||||||
|
required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<x-jet-label for="password" value="{{ __('Password') }}"/>
|
<x-jet-label for="password" value="{{ __('Password') }}"/>
|
||||||
<x-jet-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="new-password" />
|
<x-jet-input id="password" class="block mt-1 w-full" type="password" name="password" required
|
||||||
|
autocomplete="new-password"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<x-jet-label for="password_confirmation" value="{{ __('Confirm Password') }}"/>
|
<x-jet-label for="password_confirmation" value="{{ __('Confirm Password') }}"/>
|
||||||
<x-jet-input id="password_confirmation" class="block mt-1 w-full" type="password" name="password_confirmation" required autocomplete="new-password" />
|
<x-jet-input id="password_confirmation" class="block mt-1 w-full" type="password"
|
||||||
|
name="password_confirmation" required autocomplete="new-password"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-4">
|
||||||
|
<x-jet-label for="is_lecturer">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<x-jet-checkbox name="is_lecturer" id="is_lecturer" required/>
|
||||||
|
|
||||||
|
<div class="ml-2">
|
||||||
|
{{ __('I want to submit new courses on this platform') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-jet-label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (Laravel\Jetstream\Jetstream::hasTermsAndPrivacyPolicyFeature())
|
@if (Laravel\Jetstream\Jetstream::hasTermsAndPrivacyPolicyFeature())
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{{ $logo }}
|
{{ $logo }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white shadow-md overflow-hidden sm:rounded-lg">
|
<div class="w-full sm:max-w-xl mt-6 px-6 py-4 bg-white shadow-md overflow-hidden sm:rounded-lg">
|
||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user