improve customer api & gui
This commit is contained in:
@@ -161,7 +161,8 @@ class Event extends ActiveRecord
|
||||
* @return EventRegistration[]|ActiveQuery
|
||||
*/
|
||||
public function getActiveEventRegistrations(){
|
||||
return $this->hasMany(EventRegistration::class,['id_event' => 'id'])->andWhere(
|
||||
return $this->hasMany(EventRegistration::class,['id_event' => 'id'])
|
||||
->andWhere(
|
||||
[
|
||||
'event_registration.canceled_at' => null,
|
||||
'event_registration.deleted_at' => null,
|
||||
@@ -169,19 +170,6 @@ class Event extends ActiveRecord
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EventRegistration[]|ActiveQuery
|
||||
*/
|
||||
public function getActiveEventRegistrationsForCustomer(){
|
||||
return $this->hasMany(EventRegistration::class,['id_event' => 'id'])->andWhere(
|
||||
[
|
||||
'event_registration.canceled_at' => null,
|
||||
'event_registration.deleted_at' => null,
|
||||
'event_registration.id_customer' => \Yii::$app->user->id
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return integer
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user