Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
Don't allow cancelled attendees to check in
Dave Earleycaa88a25447c
diff --git a/backend/app/Repository/Eloquent/AttendeeRepository.php b/backend/app/Repository/Eloquent/AttendeeRepository.phpindex b9f8159c7..a60f3439f 100644--- a/backend/app/Repository/Eloquent/AttendeeRepository.php+++ b/backend/app/Repository/Eloquent/AttendeeRepository.php@@ -5,6 +5,7 @@ namespace HiEvents\Repository\Eloquent;use HiEvents\DomainObjects\AttendeeCheckInDomainObject;use HiEvents\DomainObjects\AttendeeDomainObject;use HiEvents\DomainObjects\Generated\AttendeeDomainObjectAbstract;+use HiEvents\DomainObjects\Status\AttendeeStatus;use HiEvents\DomainObjects\Status\OrderStatus;use HiEvents\Http\DTO\QueryParamsDTO;use HiEvents\Models\Attendee;@@ -69,19 +70,6 @@ class AttendeeRepository extends BaseRepository implements AttendeeRepositoryInt};}- if ($params->filter_fields) {- foreach ($params->filter_fields as $field => $value) {- if (in_array($field, AttendeeDomainObject::getAllowedFilterFields(), true) === false) {- continue;- }- if ($value === null || $value === '' || $value === []) {- continue;- }- $this->model- ->whereIn('attendees.' . $field, array_map('trim', explode(',', $value)));- }- }-$this->model = $this->model->select('attendees.*')->join('orders', 'orders.id', '=', 'attendees.order_id')->whereIn('orders.status', [OrderStatus::COMPLETED->name, OrderStatus::CANCELLED->name])@@ -123,6 +111,7 @@ class AttendeeRepository extends BaseRepository implements AttendeeRepositoryInt->join('ticket_check_in_lists', 'ticket_check_in_lists.ticket_id', '=', 'attendees.ticket_id')->join('check_in_lists', 'check_in_lists.id', '=', 'ticket_check_in_lists.check_in_list_id')->where('check_in_lists.short_id', $shortId)+ ->where('attendees.status', AttendeeStatus::ACTIVE->name)->whereIn('orders.status', [OrderStatus::COMPLETED->name]);$this->loadRelation(new Relationship(AttendeeCheckInDomainObject::class, name: 'check_in'));diff --git a/backend/app/Services/Domain/CheckInList/CreateAttendeeCheckInService.php b/backend/app/Services/Domain/CheckInList/CreateAttendeeCheckInService.phpindex 3b3c2191a..737619b5b 100644--- a/backend/app/Services/Domain/CheckInList/CreateAttendeeCheckInService.php+++ b/backend/app/Services/Domain/CheckInList/CreateAttendeeCheckInService.php@@ -7,6 +7,7 @@ use HiEvents\DataTransferObjects\ErrorBagDTO;use HiEvents\DomainObjects\AttendeeDomainObject;use HiEvents\DomainObjects\CheckInListDomainObject;use HiEvents\DomainObjects\Generated\AttendeeCheckInDomainObjectAbstract;+use HiEvents\DomainObjects\Status\AttendeeStatus;use HiEvents\Exceptions\CannotCheckInException;use HiEvents\Helper\DateHelper;use HiEvents\Helper\IdHelper;@@ -60,6 +61,16 @@ class CreateAttendeeCheckInServicefn($checkIn) => $checkIn->getAttendeeId() === $attendee->getId());+ if ($attendee->getStatus() === AttendeeStatus::CANCELLED->name) {+ $errors->addError(+ key: $attendee->getPublicId(),+ message: __('Attendee :attendee_name\'s ticket is cancelled', [+ 'attendee_name' => $attendee->getFullName(),+ ])+ );+ continue;+ }+if ($existingCheckIn) {$checkIns->push($existingCheckIn);$errors->addError(diff --git a/backend/lang/de.json b/backend/lang/de.jsonindex 82b9ffed8..a068cdcfc 100644--- a/backend/lang/de.json+++ b/backend/lang/de.json@@ -280,5 +280,7 @@"Check-in list has expired": "Die Eincheckliste ist abgelaufen","Check-in list is not active yes": "Eincheckliste ist noch nicht aktiv","This attendee is not checked in": "Dieser Teilnehmer ist nicht eingecheckt",- "Attendee does not belong to this check-in list": "Teilnehmer gehört nicht zu dieser Eincheckliste"+ "Attendee does not belong to this check-in list": "Teilnehmer gehört nicht zu dieser Eincheckliste",+ "Attendee :attendee_name\\'s ticket is cancelled": "Das Ticket von Teilnehmer :attendee_name wurde storniert",+ "Check-in list is not active yet": "Die Check-in-Liste ist noch nicht aktiv"}diff --git a/backend/lang/es.json b/backend/lang/es.jsonindex eb8f353f4..2feb5b60a 100644--- a/backend/lang/es.json+++ b/backend/lang/es.json@@ -280,5 +280,7 @@"Check-in list has expired": "La lista de registro ha expirado","Check-in list is not active yes": "La lista de registro aún no está activa","This attendee is not checked in": "Este asistente no está registrado",- "Attendee does not belong to this check-in list": "El asistente no pertenece a esta lista de registro"+ "Attendee does not belong to this check-in list": "El asistente no pertenece a esta lista de registro",+ "Attendee :attendee_name\\'s ticket is cancelled": "La entrada del asistente :attendee_name ha sido cancelada",+ "Check-in list is not active yet": "La lista de registro aún no está activa"}diff --git a/backend/lang/fr.json b/backend/lang/fr.jsonindex 719d422b5..dfe3aba72 100644--- a/backend/lang/fr.json+++ b/backend/lang/fr.json@@ -280,5 +280,7 @@"Check-in list has expired": "La liste de pointage a expiré","Check-in list is not active yes": "La liste de pointage n'est pas encore active","This attendee is not checked in": "Ce participant n'est pas enregistré",- "Attendee does not belong to this check-in list": "Le participant n'appartient pas à cette liste de pointage"+ "Attendee does not belong to this check-in list": "Le participant n'appartient pas à cette liste de pointage",+ "Attendee :attendee_name\\'s ticket is cancelled": "Le billet de l'participant :attendee_name a été annulé",+ "Check-in list is not active yet": "La liste d'enregistrement n'est pas encore active"}diff --git a/backend/lang/pt-br.json b/backend/lang/pt-br.jsonindex c518b7157..4c9af2a5e 100644--- a/backend/lang/pt-br.json+++ b/backend/lang/pt-br.json@@ -280,5 +280,7 @@"Check-in list has expired": "A lista de check-in expirou","Check-in list is not active yes": "A lista de check-in ainda não está ativa","This attendee is not checked in": "Este participante não fez check-in",- "Attendee does not belong to this check-in list": "O participante não pertence a esta lista de check-in"+ "Attendee does not belong to this check-in list": "O participante não pertence a esta lista de check-in",+ "Attendee :attendee_name\\'s ticket is cancelled": "O ingresso do participante :attendee_name foi cancelado",+ "Check-in list is not active yet": "A lista de check-in ainda não está ativa"}diff --git a/backend/lang/pt.json b/backend/lang/pt.jsonindex 7056ca566..6aec7bb4c 100644--- a/backend/lang/pt.json+++ b/backend/lang/pt.json@@ -280,5 +280,7 @@"Check-in list has expired": "A lista de check-in expirou","Check-in list is not active yes": "A lista de check-in ainda não está ativa","This attendee is not checked in": "Este participante não fez check-in",- "Attendee does not belong to this check-in list": "O participante não pertence a esta lista de check-in"+ "Attendee does not belong to this check-in list": "O participante não pertence a esta lista de check-in",+ "Attendee :attendee_name\\'s ticket is cancelled": "O ingresso do participante :attendee_name foi cancelado",+ "Check-in list is not active yet": "A lista de check-in ainda não está ativa"}diff --git a/backend/lang/ru.json b/backend/lang/ru.jsonindex 063fe79c9..a8be393c9 100644--- a/backend/lang/ru.json+++ b/backend/lang/ru.json@@ -295,5 +295,7 @@"Check-in list has expired": "","Check-in list is not active yes": "","This attendee is not checked in": "",- "Attendee does not belong to this check-in list": ""+ "Attendee does not belong to this check-in list": "",+ "Attendee :attendee_name\\'s ticket is cancelled": "",+ "Check-in list is not active yet": ""}\ No newline at end of filediff --git a/backend/lang/zh-cn.json b/backend/lang/zh-cn.jsonindex 13c723c06..5e4af8e7e 100644--- a/backend/lang/zh-cn.json+++ b/backend/lang/zh-cn.json@@ -280,5 +280,7 @@"Check-in list has expired": "签到列表已过期","Check-in list is not active yes": "签到列表尚未激活","This attendee is not checked in": "该参与者尚未签到",- "Attendee does not belong to this check-in list": "该参与者不属于此签到列表"+ "Attendee does not belong to this check-in list": "该参与者不属于此签到列表",+ "Attendee :attendee_name\\'s ticket is cancelled": "参与者 :attendee_name 的票已被取消",+ "Check-in list is not active yet": "签到列表尚未激活"}