Skip to content

Commit 3f37dc7

Browse files
committed
Check-in UX improvements
1 parent 8691250 commit 3f37dc7

97 files changed

Lines changed: 10689 additions & 3394 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace HiEvents\DomainObjects;
4+
5+
class ContactAttributeDefinitionDomainObject extends Generated\ContactAttributeDefinitionDomainObjectAbstract
6+
{
7+
}

backend/app/DomainObjects/Generated/AttendeeDomainObjectAbstract.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ abstract class AttendeeDomainObjectAbstract extends \HiEvents\DomainObjects\Abst
1717
final public const CHECKED_IN_BY = 'checked_in_by';
1818
final public const CHECKED_OUT_BY = 'checked_out_by';
1919
final public const PRODUCT_PRICE_ID = 'product_price_id';
20+
final public const CONTACT_ID = 'contact_id';
2021
final public const SHORT_ID = 'short_id';
2122
final public const FIRST_NAME = 'first_name';
2223
final public const LAST_NAME = 'last_name';
@@ -29,6 +30,7 @@ abstract class AttendeeDomainObjectAbstract extends \HiEvents\DomainObjects\Abst
2930
final public const DELETED_AT = 'deleted_at';
3031
final public const LOCALE = 'locale';
3132
final public const NOTES = 'notes';
33+
final public const CONTACT_LINK_IGNORED_AT = 'contact_link_ignored_at';
3234

3335
protected int $id;
3436
protected int $order_id;
@@ -37,6 +39,7 @@ abstract class AttendeeDomainObjectAbstract extends \HiEvents\DomainObjects\Abst
3739
protected ?int $checked_in_by = null;
3840
protected ?int $checked_out_by = null;
3941
protected int $product_price_id;
42+
protected ?int $contact_id = null;
4043
protected string $short_id;
4144
protected string $first_name = '';
4245
protected string $last_name = '';
@@ -49,6 +52,7 @@ abstract class AttendeeDomainObjectAbstract extends \HiEvents\DomainObjects\Abst
4952
protected ?string $deleted_at = null;
5053
protected string $locale = 'en';
5154
protected ?string $notes = null;
55+
protected ?string $contact_link_ignored_at = null;
5256

5357
public function toArray(): array
5458
{
@@ -60,6 +64,7 @@ public function toArray(): array
6064
'checked_in_by' => $this->checked_in_by ?? null,
6165
'checked_out_by' => $this->checked_out_by ?? null,
6266
'product_price_id' => $this->product_price_id ?? null,
67+
'contact_id' => $this->contact_id ?? null,
6368
'short_id' => $this->short_id ?? null,
6469
'first_name' => $this->first_name ?? null,
6570
'last_name' => $this->last_name ?? null,
@@ -72,6 +77,7 @@ public function toArray(): array
7277
'deleted_at' => $this->deleted_at ?? null,
7378
'locale' => $this->locale ?? null,
7479
'notes' => $this->notes ?? null,
80+
'contact_link_ignored_at' => $this->contact_link_ignored_at ?? null,
7581
];
7682
}
7783

@@ -152,6 +158,17 @@ public function getProductPriceId(): int
152158
return $this->product_price_id;
153159
}
154160

161+
public function setContactId(?int $contact_id): self
162+
{
163+
$this->contact_id = $contact_id;
164+
return $this;
165+
}
166+
167+
public function getContactId(): ?int
168+
{
169+
return $this->contact_id;
170+
}
171+
155172
public function setShortId(string $short_id): self
156173
{
157174
$this->short_id = $short_id;
@@ -283,4 +300,15 @@ public function getNotes(): ?string
283300
{
284301
return $this->notes;
285302
}
303+
304+
public function setContactLinkIgnoredAt(?string $contact_link_ignored_at): self
305+
{
306+
$this->contact_link_ignored_at = $contact_link_ignored_at;
307+
return $this;
308+
}
309+
310+
public function getContactLinkIgnoredAt(): ?string
311+
{
312+
return $this->contact_link_ignored_at;
313+
}
286314
}

backend/app/DomainObjects/Generated/CheckInListDomainObjectAbstract.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ abstract class CheckInListDomainObjectAbstract extends \HiEvents\DomainObjects\A
2020
final public const DELETED_AT = 'deleted_at';
2121
final public const CREATED_AT = 'created_at';
2222
final public const UPDATED_AT = 'updated_at';
23+
final public const PUBLIC_SHOW_ATTENDEE_NOTES = 'public_show_attendee_notes';
24+
final public const PUBLIC_SHOW_QUESTION_ANSWERS = 'public_show_question_answers';
25+
final public const PUBLIC_SHOW_ORDER_DETAILS = 'public_show_order_details';
2326

2427
protected int $id;
2528
protected int $event_id;
@@ -31,6 +34,9 @@ abstract class CheckInListDomainObjectAbstract extends \HiEvents\DomainObjects\A
3134
protected ?string $deleted_at = null;
3235
protected ?string $created_at = null;
3336
protected ?string $updated_at = null;
37+
protected bool $public_show_attendee_notes = true;
38+
protected bool $public_show_question_answers = true;
39+
protected bool $public_show_order_details = true;
3440

3541
public function toArray(): array
3642
{
@@ -45,6 +51,9 @@ public function toArray(): array
4551
'deleted_at' => $this->deleted_at ?? null,
4652
'created_at' => $this->created_at ?? null,
4753
'updated_at' => $this->updated_at ?? null,
54+
'public_show_attendee_notes' => $this->public_show_attendee_notes ?? null,
55+
'public_show_question_answers' => $this->public_show_question_answers ?? null,
56+
'public_show_order_details' => $this->public_show_order_details ?? null,
4857
];
4958
}
5059

@@ -157,4 +166,37 @@ public function getUpdatedAt(): ?string
157166
{
158167
return $this->updated_at;
159168
}
169+
170+
public function setPublicShowAttendeeNotes(bool $public_show_attendee_notes): self
171+
{
172+
$this->public_show_attendee_notes = $public_show_attendee_notes;
173+
return $this;
174+
}
175+
176+
public function getPublicShowAttendeeNotes(): bool
177+
{
178+
return $this->public_show_attendee_notes;
179+
}
180+
181+
public function setPublicShowQuestionAnswers(bool $public_show_question_answers): self
182+
{
183+
$this->public_show_question_answers = $public_show_question_answers;
184+
return $this;
185+
}
186+
187+
public function getPublicShowQuestionAnswers(): bool
188+
{
189+
return $this->public_show_question_answers;
190+
}
191+
192+
public function setPublicShowOrderDetails(bool $public_show_order_details): self
193+
{
194+
$this->public_show_order_details = $public_show_order_details;
195+
return $this;
196+
}
197+
198+
public function getPublicShowOrderDetails(): bool
199+
{
200+
return $this->public_show_order_details;
201+
}
160202
}
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
<?php
2+
3+
namespace HiEvents\DomainObjects\Generated;
4+
5+
/**
6+
* THIS FILE IS AUTOGENERATED - DO NOT EDIT IT DIRECTLY.
7+
* @package HiEvents\DomainObjects\Generated
8+
*/
9+
abstract class ContactAttributeDefinitionDomainObjectAbstract extends \HiEvents\DomainObjects\AbstractDomainObject
10+
{
11+
final public const SINGULAR_NAME = 'contact_attribute_definition';
12+
final public const PLURAL_NAME = 'contact_attribute_definitions';
13+
final public const ID = 'id';
14+
final public const ACCOUNT_ID = 'account_id';
15+
final public const NAME = 'name';
16+
final public const LABEL = 'label';
17+
final public const TYPE = 'type';
18+
final public const OPTIONS = 'options';
19+
final public const SORT_ORDER = 'sort_order';
20+
final public const IS_ACTIVE = 'is_active';
21+
final public const CREATED_AT = 'created_at';
22+
final public const UPDATED_AT = 'updated_at';
23+
final public const DELETED_AT = 'deleted_at';
24+
25+
protected int $id;
26+
protected int $account_id;
27+
protected string $name;
28+
protected string $label;
29+
protected string $type;
30+
protected array|string|null $options = null;
31+
protected int $sort_order = 0;
32+
protected bool $is_active = true;
33+
protected ?string $created_at = null;
34+
protected ?string $updated_at = null;
35+
protected ?string $deleted_at = null;
36+
37+
public function toArray(): array
38+
{
39+
return [
40+
'id' => $this->id ?? null,
41+
'account_id' => $this->account_id ?? null,
42+
'name' => $this->name ?? null,
43+
'label' => $this->label ?? null,
44+
'type' => $this->type ?? null,
45+
'options' => $this->options ?? null,
46+
'sort_order' => $this->sort_order ?? null,
47+
'is_active' => $this->is_active ?? null,
48+
'created_at' => $this->created_at ?? null,
49+
'updated_at' => $this->updated_at ?? null,
50+
'deleted_at' => $this->deleted_at ?? null,
51+
];
52+
}
53+
54+
public function setId(int $id): self
55+
{
56+
$this->id = $id;
57+
return $this;
58+
}
59+
60+
public function getId(): int
61+
{
62+
return $this->id;
63+
}
64+
65+
public function setAccountId(int $account_id): self
66+
{
67+
$this->account_id = $account_id;
68+
return $this;
69+
}
70+
71+
public function getAccountId(): int
72+
{
73+
return $this->account_id;
74+
}
75+
76+
public function setName(string $name): self
77+
{
78+
$this->name = $name;
79+
return $this;
80+
}
81+
82+
public function getName(): string
83+
{
84+
return $this->name;
85+
}
86+
87+
public function setLabel(string $label): self
88+
{
89+
$this->label = $label;
90+
return $this;
91+
}
92+
93+
public function getLabel(): string
94+
{
95+
return $this->label;
96+
}
97+
98+
public function setType(string $type): self
99+
{
100+
$this->type = $type;
101+
return $this;
102+
}
103+
104+
public function getType(): string
105+
{
106+
return $this->type;
107+
}
108+
109+
public function setOptions(array|string|null $options): self
110+
{
111+
$this->options = $options;
112+
return $this;
113+
}
114+
115+
public function getOptions(): array|string|null
116+
{
117+
return $this->options;
118+
}
119+
120+
public function setSortOrder(int $sort_order): self
121+
{
122+
$this->sort_order = $sort_order;
123+
return $this;
124+
}
125+
126+
public function getSortOrder(): int
127+
{
128+
return $this->sort_order;
129+
}
130+
131+
public function setIsActive(bool $is_active): self
132+
{
133+
$this->is_active = $is_active;
134+
return $this;
135+
}
136+
137+
public function getIsActive(): bool
138+
{
139+
return $this->is_active;
140+
}
141+
142+
public function setCreatedAt(?string $created_at): self
143+
{
144+
$this->created_at = $created_at;
145+
return $this;
146+
}
147+
148+
public function getCreatedAt(): ?string
149+
{
150+
return $this->created_at;
151+
}
152+
153+
public function setUpdatedAt(?string $updated_at): self
154+
{
155+
$this->updated_at = $updated_at;
156+
return $this;
157+
}
158+
159+
public function getUpdatedAt(): ?string
160+
{
161+
return $this->updated_at;
162+
}
163+
164+
public function setDeletedAt(?string $deleted_at): self
165+
{
166+
$this->deleted_at = $deleted_at;
167+
return $this;
168+
}
169+
170+
public function getDeletedAt(): ?string
171+
{
172+
return $this->deleted_at;
173+
}
174+
}

backend/app/Http/Actions/CheckInLists/CreateCheckInListAction.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public function __invoke(UpsertCheckInListRequest $request, int $eventId): JsonR
3333
productIds: $request->validated('product_ids'),
3434
expiresAt: $request->validated('expires_at'),
3535
activatesAt: $request->validated('activates_at'),
36+
publicShowAttendeeNotes: $request->validated('public_show_attendee_notes') ?? true,
37+
publicShowQuestionAnswers: $request->validated('public_show_question_answers') ?? true,
38+
publicShowOrderDetails: $request->validated('public_show_order_details') ?? true,
3639
)
3740
);
3841
} catch (UnrecognizedProductIdException $exception) {
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
namespace HiEvents\Http\Actions\CheckInLists\Public;
4+
5+
use HiEvents\Http\Actions\BaseAction;
6+
use HiEvents\Resources\Attendee\AttendeeDetailPublicResource;
7+
use HiEvents\Services\Application\Handlers\CheckInList\Public\GetCheckInListAttendeeDetailPublicHandler;
8+
use HiEvents\Services\Domain\Auth\AuthUserService;
9+
use Illuminate\Http\JsonResponse;
10+
use Throwable;
11+
12+
class GetCheckInListAttendeeDetailPublicAction extends BaseAction
13+
{
14+
public function __construct(
15+
private readonly GetCheckInListAttendeeDetailPublicHandler $handler,
16+
private readonly AuthUserService $authUserService,
17+
)
18+
{
19+
}
20+
21+
public function __invoke(string $checkInListShortId, string $attendeePublicId): JsonResponse
22+
{
23+
$detail = $this->handler->handle(
24+
shortId: $checkInListShortId,
25+
attendeePublicId: $attendeePublicId,
26+
staffAccountId: $this->resolveStaffAccountId(),
27+
);
28+
29+
return $this->resourceResponse(
30+
resource: AttendeeDetailPublicResource::class,
31+
data: $detail,
32+
);
33+
}
34+
35+
/**
36+
* The detail endpoint is public but should reveal all attendee fields to authenticated staff
37+
* whose account matches the event's account. Returns null for anonymous / invalid tokens /
38+
* any auth resolution failure — those callers get data filtered by the list's visibility flags.
39+
*/
40+
private function resolveStaffAccountId(): ?int
41+
{
42+
try {
43+
return $this->authUserService->getAuthenticatedAccountId();
44+
} catch (Throwable) {
45+
return null;
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)