improve event deletion and event registration cancelation
This commit is contained in:
@@ -230,7 +230,7 @@ class EventController extends Controller
|
||||
$tx = $db->beginTransaction();
|
||||
try {
|
||||
$registration = $eventRegistrationManager->loadRegistration($id,null);
|
||||
$eventRegistrationManager->cancelRegistration($registration,null,EventRegistration::CANCEL_REASON_CUSTOMER);
|
||||
$eventRegistrationManager->cancelRegistrationTX($registration,null,EventRegistration::CANCEL_REASON_CUSTOMER);
|
||||
$tx->commit();
|
||||
return $this->redirect(['view', 'id' => $registration->id_event]);
|
||||
} catch (Exception $ex) {
|
||||
|
||||
@@ -153,6 +153,9 @@ $indexTableTemplateButtons[] = '{reserve-card}';
|
||||
'aria-label' => Yii::t('yii', 'Register'),
|
||||
'data-pjax' => '0',
|
||||
];
|
||||
if ( isset($model['event_deleted_at']) ){
|
||||
return "";
|
||||
}
|
||||
return Html::a('<span class="glyphicon glyphicon-user"></span>', $url, $options);
|
||||
},
|
||||
// 'equipment-types-assignment' => function ($url, $model, $key) {
|
||||
|
||||
Reference in New Issue
Block a user