Skip to content

Commit 963c0cb

Browse files
authored
Merge pull request #2536 from codeeu/login-register-page-redesign
Login register page redesign
2 parents befa9b1 + cc92945 commit 963c0cb

File tree

84 files changed

+1996
-8347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1996
-8347
lines changed

app/Event.php

+1-7
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,9 @@ class Event extends Model
5151
'report_notifications_count',
5252
'reported_at',
5353
'name_for_certificate',
54-
'average_participant_age',
5554
'participants_count',
55+
'average_participant_age',
5656
'percentage_of_females',
57-
'percentage_of_males',
58-
'percentage_of_other',
59-
'age_group',
6057
'codeweek_for_all_participation_code',
6158
'name_for_certificate',
6259
'organizer_type',
@@ -70,9 +67,6 @@ class Event extends Model
7067
'location_id',
7168
'leading_teacher_tag',
7269
'mass_added_for',
73-
'extracurricular_activity',
74-
'recurring_event',
75-
'frequency',
7670
];
7771

7872
// protected $policies = [

app/Http/Controllers/EventController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function edit(Event $event): View
186186
->pluck('id')
187187
->toArray();
188188
$selected_audiences = implode(',', $selected_audiences);
189-
$selected_country = $event->country()->first()?->iso ?? '';
189+
$selected_country = $event->country()->first()->iso;
190190
$selected_language = is_null($event->language)
191191
? 'en'
192192
: $event->language;

app/Http/Requests/EventRequest.php

+1-20
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,7 @@ public function rules(): array
4343
'organizer_type' => 'required',
4444
'privacy' => 'required',
4545
'leading_teacher_tag' => 'nullable',
46-
'participants_count' => 'required|integer|min:1',
47-
'percentage_of_females' => 'nullable|integer|min:0',
48-
'percentage_of_males' => 'nullable|integer|min:0',
49-
'percentage_of_other' => 'nullable|integer|min:0',
50-
'age_group' => 'nullable|string|in:0-5,6-18,19-25,Over 25',
51-
'extracurricular_activity' => 'required|string|in:yes,no',
52-
'recurring_event' => 'required|string|in:yes,no',
53-
'frequency' => 'nullable|string|in:daily,weekly,monthly',
46+
5447
];
5548
}
5649

@@ -69,21 +62,9 @@ public function messages(): array
6962
'event_url.url' => 'The activity\'s web page address should be a valid URL.',
7063
'event_url.required' => 'The activity\'s web page is required for online activities.',
7164
'user_email.required' => 'Please enter a valid email address.',
72-
'participants_count.required' => 'Please enter the total number of participants.',
73-
'participants_count.integer' => 'The number of participants must be a valid integer.',
74-
'percentage_of_females.integer' => 'The number of female participants must be a valid integer.',
75-
'percentage_of_males.integer' => 'The number of male participants must be a valid integer.',
76-
'percentage_of_other.integer' => 'The number of participants with other genders must be a valid integer.',
77-
'age_group.in' => 'Please select a valid age group.',
78-
'extracurricular_activity.required' => 'Please specify if this is an extracurricular activity.',
79-
'extracurricular_activity.in' => 'Please select a valid option for extracurricular activity.',
80-
'recurring_event.required' => 'Please specify if the event is recurring.',
81-
'recurring_event.in' => 'Please select a valid option for recurring event.',
82-
'frequency.in' => 'Please select a valid frequency.',
8365
];
8466
}
8567

86-
8768
private function in($array): string
8869
{
8970
return 'in:'.implode(',', $array);

app/Queries/EventsQuery.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@ public static function store(Request $request)
7474
}
7575
}
7676

77-
foreach ($request['theme'] as $themeId) {
78-
$theme = Theme::where('id', $themeId)->first();
79-
if ($theme) {
80-
$event->themes()->save($theme);
81-
}
77+
foreach ($request['theme'] as $theme) {
78+
79+
$theme = Theme::where('id', $theme)->first();
80+
$event->themes()->save($theme);
8281
}
8382

8483
foreach ($request['audience'] as $audience) {

config/geoip.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
|
104104
*/
105105

106-
'cache_tags' => null,
106+
'cache_tags' => ['torann-geoip-location'],
107107

108108
/*
109109
|--------------------------------------------------------------------------

database/migrations/2017_07_07_122759_create_countries_tables.php

+13-14
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@
1111
*/
1212
public function up(): void
1313
{
14-
if (!Schema::hasTable('countries')) {
15-
Schema::create('countries', function (Blueprint $table) {
16-
$table->string('iso')->primary();
17-
$table->string('name');
18-
$table->integer('population')->nullable();
19-
$table->string('continent');
20-
$table->string('facebook');
21-
$table->string('website');
22-
$table->string('longitude');
23-
$table->string('latitude');
24-
$table->string('parent')->nullable();
25-
$table->timestamps();
26-
});
27-
}
14+
Schema::create('countries', function (Blueprint $table) {
15+
16+
$table->string('iso');
17+
$table->string('name');
18+
$table->integer('population')->nullable();
19+
$table->string('continent');
20+
$table->string('facebook');
21+
$table->string('website');
22+
$table->string('longitude');
23+
$table->string('latitude');
24+
$table->string('parent')->nullable();
25+
$table->timestamps();
26+
});
2827
}
2928

3029
/**

database/migrations/2022_09_13_090000_create_bayern_r_s_s_items_table.php

+24-26
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,30 @@
1111
*/
1212
public function up(): void
1313
{
14-
if (!Schema::hasTable('bayern_r_s_s_items')) {
15-
Schema::create('bayern_r_s_s_items', function (Blueprint $table) {
16-
$table->id();
17-
$table->integer('uid');
18-
$table->string('title');
19-
$table->longText('description');
20-
$table->string('organizer');
21-
$table->string('photo')->nullable();
22-
$table->dateTime('eventEndDate');
23-
$table->dateTime('eventStartDate');
24-
$table->float('latitude', 12, 8);
25-
$table->float('longitude', 12, 8);
26-
$table->string('location');
27-
$table->string('user_company');
28-
$table->string('user_email');
29-
$table->string('user_publicEmail');
30-
$table->string('user_type');
31-
$table->string('user_website');
32-
$table->string('activity_type');
33-
$table->dateTime('imported_at')->nullable();
34-
$table->string('audience')->nullable();
35-
$table->string('themes')->nullable();
36-
$table->string('tags')->nullable();
37-
$table->timestamps();
38-
});
39-
}
14+
Schema::create('bayern_r_s_s_items', function (Blueprint $table) {
15+
$table->id();
16+
$table->integer('uid')->unique();
17+
$table->string('title');
18+
$table->longText('description');
19+
$table->string('organizer');
20+
$table->string('photo')->nullable();
21+
$table->dateTime('eventEndDate');
22+
$table->dateTime('eventStartDate');
23+
$table->float('latitude', 12, 6);
24+
$table->float('longitude', 12, 6);
25+
$table->string('location');
26+
$table->string('user_company');
27+
$table->string('user_email');
28+
$table->string('user_publicEmail');
29+
$table->string('user_type');
30+
$table->string('user_website');
31+
$table->string('activity_type');
32+
$table->dateTime('imported_at')->nullable();
33+
$table->string('audience')->nullable();
34+
$table->string('themes')->nullable();
35+
$table->string('tags')->nullable();
36+
$table->timestamps();
37+
});
4038

4139
}
4240

database/migrations/2024_08_05_093711_add_uuid_failed_jobs.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
/**
1010
* Run the migrations.
1111
*/
12-
public function up()
12+
public function up(): void
1313
{
14-
Schema::table('failed_jobs', function (Blueprint $table) {
15-
if (!Schema::hasColumn('failed_jobs', 'uuid')) {
16-
$table->uuid('uuid')->after('id')->nullable(false)->unique();
17-
}
18-
});
14+
if (Schema::hasTable('failed_jobs')) {
15+
Schema::table('failed_jobs', function (Blueprint $table) {
16+
$table->string('uuid')->after('id')->nullable()->unique();
17+
});
18+
}
1919
}
2020

2121
/**
2222
* Reverse the migrations.
2323
*/
2424
public function down(): void
2525
{
26-
if (Schema::hasTable('failed_jobs') && Schema::hasColumn('failed_jobs', 'uuid')) {
26+
if (Schema::hasTable('failed_jobs')) {
2727
Schema::table('failed_jobs', function (Blueprint $table) {
2828
$table->dropColumn('uuid');
2929
});

database/migrations/2024_12_13_125436_add_gender_counts_to_events_table.php

-34
This file was deleted.

database/migrations/2024_12_13_143045_add_age_group_to_events_table.php

-28
This file was deleted.

database/migrations/2024_12_13_144738_add_extracurricular_activity_to_events_table.php

-25
This file was deleted.

database/migrations/2024_12_13_160830_add_recurring_event_to_events_table.php

-23
This file was deleted.

database/migrations/2024_12_18_113729_add_consent_columns_to_users_table.php_disable

-26
This file was deleted.

0 commit comments

Comments
 (0)