Skip to content

Commit

Permalink
fix problems for user
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghelupu17 committed Sep 30, 2024
1 parent 07eea20 commit da28d5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/Filament/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public static function table(Table $table): Table
->counts('points')
->sortable(),

TextColumn::make('issues_count')
TextColumn::make('problems_count')
->label(__('users.issues_count'))
->counts('issues')
->counts('problems')
->sortable(),

TextColumn::make('last_login_date')->date('Y-m-d H:i:s')
Expand Down
5 changes: 3 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Models;

// use Illuminate\Contracts\Auth\MustVerifyEmail;
use App\Models\Problem\Problem;
use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasAvatar;
use Filament\Models\Contracts\HasName;
Expand Down Expand Up @@ -106,9 +107,9 @@ public function canAccessPanel(Panel $panel): bool
return auth()->user()->can('admin_login');
}

public function issues(): HasMany
public function problems(): HasMany
{
return $this->hasMany(Issue::class);
return $this->hasMany(Problem::class);
}

public function points(): HasMany
Expand Down
2 changes: 1 addition & 1 deletion lang/ro/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'password' => 'Parola',
'roles' => 'Roluri',
'points_count' => 'Numar puncte adǎugate',
'issues_count' => 'Numar probleme adǎugate',
'problems_count' => 'Numar probleme adǎugate',
'last_login_date' => 'Ultima datǎ de conectare',

];

0 comments on commit da28d5c

Please sign in to comment.