improve event deletion and event registration cancelation

This commit is contained in:
Roland Schneider
2021-10-08 23:15:49 +02:00
parent 09f329050f
commit f0bf8684e4
12 changed files with 96 additions and 68 deletions

View File

@@ -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) {

View File

@@ -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) {