diff --git a/app/Models/User.php b/app/Models/User.php index 5e46173b..ec648303 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -476,7 +476,7 @@ class User extends Authenticatable implements FilamentUser, HasName public function medals(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Medal::class, 'user_medals', 'uid', 'medal_id') - ->withPivot(['id', 'expire_at', 'status', 'priority']) + ->withPivot(['id', 'expire_at', 'status', 'priority', 'bonus_addition_expire_at']) ->withTimestamps() ->orderByPivot('priority', 'desc') ; diff --git a/include/functions.php b/include/functions.php index 1623b36f..eaf81329 100644 --- a/include/functions.php +++ b/include/functions.php @@ -5904,11 +5904,13 @@ function build_medal_image(\Illuminate\Support\Collection $medals, $maxHeight = $html = sprintf('
', $medal->image_large, $medal->name, $maxHeight, $maxHeight); if ($withActions) { $html .= sprintf( - '
%s: %s%s: %s', + '
%s: %s%s: %s%s: %s', nexus_trans('label.expire_at'), $medal->pivot->expire_at ? format_datetime($medal->pivot->expire_at) : nexus_trans('label.permanent'), nexus_trans('medal.fields.bonus_addition_factor'), $medal->bonus_addition_factor ?? 0, + nexus_trans('medal.bonus_addition_expire_at'), + $medal->pivot->bonus_addition_expire_at ? format_datetime($medal->pivot->bonus_addition_expire_at) : nexus_trans('label.permanent'), nexus_trans('label.priority'), $medal->pivot->id, $medal->pivot->priority ?? 0,