Skip to content

Commit

Permalink
Feature: Added "My Team Read" and Redemption quick-select button.
Browse files Browse the repository at this point in the history
  • Loading branch information
ok200paul committed Dec 12, 2024
1 parent 20f06e4 commit c63b0c3
Show file tree
Hide file tree
Showing 6 changed files with 1,185 additions and 825 deletions.
1 change: 1 addition & 0 deletions app/Enums/PersonalAccessTokenAbility.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public static function redemptionAppTokenAbilities(): array
return [
self::VOUCHER_REDEMPTIONS_CREATE->value => self::abilityLabels()[self::VOUCHER_REDEMPTIONS_CREATE->value],
self::VOUCHER_REDEMPTIONS_READ->value => self::abilityLabels()[self::VOUCHER_REDEMPTIONS_READ->value],
self::MY_TEAM_READ->value => self::abilityLabels()[self::MY_TEAM_READ->value],
];
}

Expand Down
3 changes: 2 additions & 1 deletion app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ public function share(Request $request): array

return [
...parent::share($request),
'auth' => [
'auth' => [
'user' => $request->user(),
'currentTeam' => $team,
'availableTeams' => TeamUser::with('team')->where('user_id', Auth::id())->get(),
'teamCountry' => Country::find($team?->country_id),
],
'personalAccessTokenAbilities' => PersonalAccessTokenAbility::groupsAbilityCasesWithDefinitions(),
'platformAppTokenAbilities' => PersonalAccessTokenAbility::platformAppTokenAbilities(),
'redemptionAppTokenAbilities' => PersonalAccessTokenAbility::redemptionAppTokenAbilities(),
'isImpersonating' => session('vine:impersonator'),
'voucherSetTypes' => VoucherSetType::values(),
];
Expand Down
Loading

0 comments on commit c63b0c3

Please sign in to comment.