Skip to content

Commit 6fe0d24

Browse files
authored
Merge pull request #465 from HiEventsDev/develop
main <- develop
2 parents b6f7d58 + 7f5b802 commit 6fe0d24

File tree

4 files changed

+84
-44
lines changed

4 files changed

+84
-44
lines changed

README.md

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,33 +65,48 @@ Get started in minutes with our one-click deployment options:
6565

6666
<a href="https://hi.events">Hi.Events</a> offers comprehensive tools to streamline your event management:
6767

68-
### 🎟 Ticketing & Sales
69-
- **Multiple Ticket Types:** Create free, paid, donation-based, and tiered tickets
70-
- **Capacity Management:** Set limits per event or ticket type
71-
- **Promo Codes & Discounts:** Drive early sales with special offers
72-
- **Product Upsells:** Sell merchandise and add-ons alongside tickets
73-
- **Custom Pricing:** Apply taxes and fees per product or entire order
74-
75-
### 🏆 Event Management
76-
- **Real-time Dashboard:** Track sales, revenue, and attendee metrics
77-
- **Visual Page Editor:** Design beautiful event pages with live preview
78-
- **Website Integration:** Embed ticketing widgets on your existing site
79-
- **SEO Optimization:** Customize metadata for better search visibility
80-
- **Offline Event Support:** Provide location details and instructions
81-
82-
### 📱 Attendee Experience
83-
- **Custom Registration Forms:** Collect exactly the information you need
84-
- **QR Code Check-In:** Fast, mobile-friendly entry verification
85-
- **Multi-language Support:** Reach global audiences with localized interfaces
86-
- **Bulk Communication:** Send targeted messages to specific ticket holders
87-
- **Refund Management:** Process full or partial refunds when needed
88-
89-
### 🔧 For Organizers
90-
- **Team Collaboration:** Role-based access for staff members
91-
- **Webhook Integration:** Connect with Zapier, IFTTT, Make, or your CRM
92-
- **Stripe Connect:** Receive instant payouts for ticket sales
93-
- **Comprehensive API:** Build custom integrations with full API access
94-
- **Advanced Reporting:** Generate sales, tax, and usage reports
68+
### 🎟 Ticketing & Product Sales
69+
- **Multiple Ticket Types:** Free, Paid, Donation, and Tiered tickets.
70+
- **Capacity Management:** Set event-wide or ticket-specific limits.
71+
- **Capacity Assignments:** Manage shared capacity across multiple ticket types.
72+
- **Promo Codes:** Discount codes for pre-sale access and special offers.
73+
- **Product Sales:** Sell event-related products (e.g., t-shirts, add-ons).
74+
- **Taxes & Fees:** Apply custom taxes and fees per product or order.
75+
76+
### 🏆 Event Management & Customization
77+
- **Event Dashboard:** Real-time revenue, ticket sales, and attendee analytics.
78+
- **Homepage Designer:** Customize event pages with a live preview editor.
79+
- **Embeddable Ticket Widget:** Add a seamless ticketing experience to your website.
80+
- **SEO Tools:** Customize event metadata for better search visibility.
81+
- **Product Categories:** Organize products and tickets with category management.
82+
- **Offline Event Support:** Provide instructions for physical events.
83+
84+
### 📧 Attendee & Order Management
85+
- **Custom Checkout Forms:** Collect attendee details with tailored questions.
86+
- **Attendee Management:** Search, edit, cancel, and message attendees.
87+
- **Order Management:** Refund, cancel, and resend order details easily.
88+
- **Bulk Messaging:** Email or message specific ticket holders.
89+
- **Data Exports:** Export attendees and orders to CSV/XLSX.
90+
91+
### 📱 Mobile-Friendly & Check-In Tools
92+
- **QR Code Check-In:** Web-based and mobile-friendly check-in tool.
93+
- **Check-In Lists:** Generate and share access-controlled check-in lists.
94+
- **Multi-User Access:** Role-based access control for event staff.
95+
96+
### 🔧 Integrations & Automation
97+
- **Webhooks Support:** Automate tasks with Zapier, IFTTT, Make, or CRM integrations.
98+
- **Stripe Connect Integration:** Organizers get instant payouts.
99+
100+
### 📊 Advanced Features
101+
- **Multi-Language Support:** English, Deutsch, Español, Português, Français, 中文 (Zhōngwén), and more.
102+
- **Partial & Full Refunds:** Manage refunds with detailed order tracking.
103+
- **Role-Based Access Control:** Multiple user roles with permission management.
104+
- **REST API:** Full API access for custom integrations.
105+
- **Invoicing System:** Generate and send invoices with tax details, payment terms, and due dates.
106+
- **Offline Payment Support:** Enable bank transfers, cash payments, or custom payment methods.
107+
- **Event Archive:** Archive past events to keep the dashboard organized.
108+
- **Advanced Ticket Locking:** Lock tickets behind promo codes or access restrictions.
109+
- **Advanced Reporting:** Daily sales, tax breakdowns, product sales, and promo code usage reports.
95110

96111
## 🚀 Getting Started
97112

backend/app/Repository/Eloquent/BaseRepository.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ public function setMaxPerPage(int $maxPerPage): static
6262

6363
public function all(array $columns = self::DEFAULT_COLUMNS): Collection
6464
{
65-
return $this->handleResults($this->model->all($columns));
65+
$models = $this->model->all($columns);
66+
$this->resetModel();
67+
68+
return $this->handleResults($models);
6669
}
6770

6871
public function paginate(
@@ -121,7 +124,10 @@ public function paginateEloquentRelation(
121124
*/
122125
public function findById(int $id, array $columns = self::DEFAULT_COLUMNS): DomainObjectInterface
123126
{
124-
return $this->handleSingleResult($this->model->findOrFail($id, $columns));
127+
$model = $this->model->findOrFail($id, $columns);
128+
$this->resetModel();
129+
130+
return $this->handleSingleResult($model);
125131
}
126132

127133
public function findFirstByField(
@@ -138,7 +144,10 @@ public function findFirstByField(
138144

139145
public function findFirst(int $id, array $columns = self::DEFAULT_COLUMNS): ?DomainObjectInterface
140146
{
141-
return $this->handleSingleResult($this->model->findOrFail($id, $columns));
147+
$model = $this->model->findOrFail($id, $columns);
148+
$this->resetModel();
149+
150+
return $this->handleSingleResult($model);
142151
}
143152

144153
public function findWhere(

backend/app/Services/Application/Handlers/Order/CompleteOrderHandler.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(
6262
*/
6363
public function handle(string $orderShortId, CompleteOrderDTO $orderData): OrderDomainObject
6464
{
65-
return DB::transaction(function () use ($orderData, $orderShortId) {
65+
$updatedOrder = DB::transaction(function () use ($orderData, $orderShortId) {
6666
$orderDTO = $orderData->order;
6767

6868
$order = $this->getOrder($orderShortId);
@@ -85,19 +85,21 @@ public function handle(string $orderShortId, CompleteOrderDTO $orderData): Order
8585
$this->productQuantityUpdateService->updateQuantitiesFromOrder($updatedOrder);
8686
}
8787

88-
OrderStatusChangedEvent::dispatch($updatedOrder);
89-
90-
if ($updatedOrder->isOrderCompleted()) {
91-
$this->domainEventDispatcherService->dispatch(
92-
new OrderEvent(
93-
type: DomainEventType::ORDER_CREATED,
94-
orderId: $updatedOrder->getId(),
95-
)
96-
);
97-
}
98-
9988
return $updatedOrder;
10089
});
90+
91+
OrderStatusChangedEvent::dispatch($updatedOrder);
92+
93+
if ($updatedOrder->isOrderCompleted()) {
94+
$this->domainEventDispatcherService->dispatch(
95+
new OrderEvent(
96+
type: DomainEventType::ORDER_CREATED,
97+
orderId: $updatedOrder->getId(),
98+
)
99+
);
100+
}
101+
102+
return $updatedOrder;
101103
}
102104

103105
/**

backend/app/Services/Infrastructure/DomainEvents/DomainEventDispatcherService.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,29 @@
44

55
use HiEvents\Services\Infrastructure\DomainEvents\Events\BaseDomainEvent;
66
use Illuminate\Events\Dispatcher as EventDispatcher;
7+
use Psr\Log\LoggerInterface;
8+
use Throwable;
79

810
class DomainEventDispatcherService
911
{
10-
public function __construct(private readonly EventDispatcher $dispatcher)
12+
public function __construct(
13+
private readonly EventDispatcher $dispatcher,
14+
private readonly LoggerInterface $logger,
15+
)
1116
{
1217
}
1318

19+
/**
20+
* @throws Throwable
21+
*/
1422
public function dispatch(BaseDomainEvent $event): void
1523
{
16-
$this->dispatcher->dispatch($event);
24+
try {
25+
$this->dispatcher->dispatch($event);
26+
} catch (Throwable $e) {
27+
$this->logger->error('Failed to dispatch domain event', ['event' => $event, 'exception' => $e]);
28+
29+
throw $e;
30+
}
1731
}
1832
}

0 commit comments

Comments
 (0)