Support oft parent groups
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Repositories\GlobalSettingRepository;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@@ -12,7 +13,8 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
// Eine Instanz je Request, damit die Einstellungen nur einmal gelesen werden.
|
||||
$this->app->scoped(GlobalSettingRepository::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Providers;
|
||||
|
||||
use App\Enumerations\EatingHabit;
|
||||
use App\Enumerations\InvoiceType;
|
||||
use App\Enumerations\ParticipantGroupType;
|
||||
use App\Enumerations\RefundReason;
|
||||
use App\Enumerations\RetentionReason;
|
||||
use App\Enumerations\TravelReason;
|
||||
@@ -45,6 +46,8 @@ class GlobalDataProvider {
|
||||
'currentEvent' => $this->getCurrentEventData(),
|
||||
'canAccessAdmin' => $canAccessAdmin,
|
||||
'isMainAdmin' => $isMainAdmin,
|
||||
// Bezeichnungen der Gruppen-Ebenen (z. B. Stamm/Stämme, Bund/Bünde) aus den globalen Einstellungen.
|
||||
'groupLabels' => ParticipantGroupType::labels(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -222,6 +225,8 @@ class GlobalDataProvider {
|
||||
[
|
||||
'localGroups' => Tenant::where(['is_active_local_group' => true])->get(),
|
||||
'eatingHabits' => EatingHabit::all(),
|
||||
'participantGroupTypes' => ParticipantGroupType::options(),
|
||||
'localGroupLabelPlural' => ParticipantGroupType::LocalGroup->pluralLabel(),
|
||||
'paymentMethods' => AvailablePaymentMethod::where('active', true)->get()
|
||||
->map(fn (AvailablePaymentMethod $method) => new AvailablePaymentMethodResource($method)->toArray($request)),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user