- Achievement input at user card form.
- Achievement at user view with img
This commit is contained in:
@ -38,6 +38,7 @@ use yii\helpers\ArrayHelper;
|
||||
* @property ProjectUser[] $projectUsers
|
||||
* @property Position $position
|
||||
* @property Status $status0
|
||||
* @property Achievement[] $achievements
|
||||
*/
|
||||
class UserCard extends \yii\db\ActiveRecord
|
||||
{
|
||||
@ -171,6 +172,14 @@ class UserCard extends \yii\db\ActiveRecord
|
||||
return $this->hasOne(Status::class, ['id' => 'status']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \yii\db\ActiveQuery
|
||||
*/
|
||||
public function getAchievements(): \yii\db\ActiveQuery
|
||||
{
|
||||
return $this->hasMany(AchievementUserCard::class, ['user_card_id' => 'id'])->with('achievement');
|
||||
}
|
||||
|
||||
public function getGenders()
|
||||
{
|
||||
return [
|
||||
|
Reference in New Issue
Block a user