Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024 Badges #2212

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion app/Achievements/AchievementsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ class AchievementsServiceProvider extends ServiceProvider
Types\InfluencerActive2023::class,
Types\InfluencerExpert2023::class,
Types\InfluencerChampion2023::class,
Types\InfluencerLegendary2023::class
Types\InfluencerLegendary2023::class,
Types\OrganiserActive2024::class,
Types\OrganiserExpert2024::class,
Types\OrganiserChampion2024::class,
Types\OrganiserLegendary2024::class,
Types\OrganiserMaster2024::class,
Types\Influencer2024::class,
Types\InfluencerActive2024::class,
Types\InfluencerExpert2024::class,
Types\InfluencerChampion2024::class,
Types\InfluencerLegendary2024::class

];

Expand Down
24 changes: 24 additions & 0 deletions app/Achievements/Types/Influencer2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Achievements\Types;

use Illuminate\Support\Facades\Log;

class Influencer2024 extends AchievementType
{
public $icon = 'influencer/influencer_normal_2024.png';
public $edition = 2024;
public $name = 'Influencer 2024';

public function description()
{
return 'Spread your influence more to get 10 bits';
}

public function qualifier($user)
{
return $user->influence($this->edition) >= 10;
}


}
24 changes: 24 additions & 0 deletions app/Achievements/Types/InfluencerActive2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Achievements\Types;

use Illuminate\Support\Facades\Log;

class InfluencerActive2024 extends AchievementType
{
public $icon = 'influencer/influencer_active_2024.png';
public $edition = 2024;
public $name = 'Active Influencer 2024';

public function description()
{
return 'Spread your influence more to get 20 bits';
}

public function qualifier($user)
{
return $user->influence($this->edition) >= 20;
}


}
24 changes: 24 additions & 0 deletions app/Achievements/Types/InfluencerChampion2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Achievements\Types;

use Illuminate\Support\Facades\Log;

class InfluencerChampion2024 extends AchievementType
{
public $icon = 'influencer/influencer_champion_2024.png';
public $edition = 2024;
public $name = 'Champion Influencer 2024';

public function description()
{
return 'Spread your influence more to get 40 bits';
}

public function qualifier($user)
{
return $user->influence($this->edition) >= 40;
}


}
24 changes: 24 additions & 0 deletions app/Achievements/Types/InfluencerExpert2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Achievements\Types;

use Illuminate\Support\Facades\Log;

class InfluencerExpert2024 extends AchievementType
{
public $icon = 'influencer/influencer_expert_2024.png';
public $edition = 2024;
public $name = 'Expert Influencer 2024';

public function description()
{
return 'Spread your influence more to get 30 bits';
}

public function qualifier($user)
{
return $user->influence($this->edition) >= 30;
}


}
24 changes: 24 additions & 0 deletions app/Achievements/Types/InfluencerLegendary2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Achievements\Types;

use Illuminate\Support\Facades\Log;

class InfluencerLegendary2024 extends AchievementType
{
public $icon = 'influencer/influencer_legendary_2024.png';
public $edition = 2024;
public $name = 'Legendary Influencer 2024';

public function description()
{
return 'Spread your influence more to get 60 bits';
}

public function qualifier($user)
{
return $user->influence($this->edition) >= 60;
}


}
24 changes: 24 additions & 0 deletions app/Achievements/Types/OrganiserActive2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Achievements\Types;

use Illuminate\Support\Facades\Log;

class OrganiserActive2024 extends AchievementType
{
public $icon = 'organiser/organiser_active_2024.png';
public $edition = 2024;
public $name = 'Active Organiser 2024';

public function description()
{
return 'Report 5 activities to unlock';
}

public function qualifier($user)
{
return $user->reported($this->edition) >= 5;
}


}
22 changes: 22 additions & 0 deletions app/Achievements/Types/OrganiserChampion2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Achievements\Types;

class OrganiserChampion2024 extends AchievementType
{
public $icon = 'organiser/organiser_champion_2024.png';
public $edition = 2024;
public $name = 'Champion Organiser 2024';

public function description()
{
return 'Report 15 activities to unlock';
}

public function qualifier($user)
{
return $user->reported($this->edition) >= 15;
}


}
22 changes: 22 additions & 0 deletions app/Achievements/Types/OrganiserExpert2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Achievements\Types;

class OrganiserExpert2024 extends AchievementType
{
public $icon = 'organiser/organiser_expert_2024.png';
public $edition = 2024;
public $name = 'Expert Organiser 2024';

public function description()
{
return 'Report 10 activities to unlock';
}

public function qualifier($user)
{
return $user->reported($this->edition) >= 10;
}


}
22 changes: 22 additions & 0 deletions app/Achievements/Types/OrganiserLegendary2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Achievements\Types;

class OrganiserLegendary2024 extends AchievementType
{
public $icon = 'organiser/organiser_legendary_2024.png';
public $edition = 2024;
public $name = 'Legendary Organiser 2024';

public function description()
{
return 'Report 20 activities to unlock';
}

public function qualifier($user)
{
return $user->reported($this->edition) >= 20;
}


}
22 changes: 22 additions & 0 deletions app/Achievements/Types/OrganiserMaster2024.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Achievements\Types;

class OrganiserMaster2024 extends AchievementType
{
public $icon = 'organiser/organiser_master_2024.png';
public $edition = 2024;
public $name = 'Master Organiser 2024';

public function description()
{
return 'Report 30 activities to unlock';
}

public function qualifier($user)
{
return $user->reported($this->edition) >= 30;
}


}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/badges/organiser/organiser_active_2024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/badges/organiser/organiser_expert_2024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/badges/organiser/organiser_master_2024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/Feature/UserProfileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function it_should_display_user_name()
public function it_should_display_achievements()
{

$this->withoutExceptionHandling();
$response = $this->get('/badges/user/222');
$response->assertSee('Active Organiser ' . Carbon::now()->year);

Expand Down
Loading