Skip to content

Commit 0b8ea8a

Browse files
committed
Merge fixes
1 parent 960d9c4 commit 0b8ea8a

File tree

20 files changed

+259
-205
lines changed

20 files changed

+259
-205
lines changed

backend/app/Resources/CheckInList/AttendeeCheckInResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function toArray($request): array
1616
'id' => $this->getId(),
1717
'attendee_id' => $this->getAttendeeId(),
1818
'check_in_list_id' => $this->getCheckInListId(),
19-
'ticket_id' => $this->getTicketId(),
19+
'product_id' => $this->getProductId(),
2020
'event_id' => $this->getEventId(),
2121
'short_id' => $this->getShortId(),
2222
'created_at' => $this->getCreatedAt(),

backend/app/Services/Application/Handlers/Attendee/EditAttendeeHandler.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function handle(EditAttendeeDTO $editAttendeeDTO): AttendeeDomainObject
4848
private function adjustProductQuantities(AttendeeDomainObject $attendee, EditAttendeeDTO $editAttendeeDTO): void
4949
{
5050
if ($attendee->getProductPriceId() !== $editAttendeeDTO->product_price_id) {
51-
$this->productQuantityService->decreaseQuantitySold($editAttendeeDTO->product_price_id);
52-
$this->productQuantityService->increaseQuantitySold($attendee->getProductPriceId());
51+
$this->productQuantityService->decreaseQuantitySold($attendee->getProductPriceId());
52+
$this->productQuantityService->increaseQuantitySold($editAttendeeDTO->product_price_id);
5353
}
5454
}
5555

@@ -60,6 +60,7 @@ private function updateAttendee(EditAttendeeDTO $editAttendeeDTO): AttendeeDomai
6060
'last_name' => $editAttendeeDTO->last_name,
6161
'email' => $editAttendeeDTO->email,
6262
'product_id' => $editAttendeeDTO->product_id,
63+
'product_price_id' => $editAttendeeDTO->product_price_id,
6364
'notes' => $editAttendeeDTO->notes,
6465
], [
6566
'event_id' => $editAttendeeDTO->event_id,
@@ -85,6 +86,13 @@ private function validateProductId(EditAttendeeDTO $editAttendeeDTO): void
8586
]);
8687
}
8788

89+
$productPriceIds = $product->getProductPrices()->map(fn($productPrice) => $productPrice->getId())->toArray();
90+
if (!in_array($editAttendeeDTO->product_price_id, $productPriceIds, true)) {
91+
throw ValidationException::withMessages([
92+
'product_price_id' => __('Product price ID is not valid'),
93+
]);
94+
}
95+
8896
$availableQuantity = $this->productRepository->getQuantityRemainingForProductPrice(
8997
productId: $editAttendeeDTO->product_id,
9098
productPriceId: $product->getType() === ProductPriceType::TIERED->name

frontend/src/components/modals/ManageAttendeeModal/index.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@ export const ManageAttendeeModal = ({onClose, attendeeId}: ManageAttendeeModalPr
6565
}
6666
}, [attendee]);
6767

68+
useEffect(() => {
69+
if (!form.values.product_id) {
70+
return;
71+
}
72+
let productPriceId = event?.product_categories
73+
?.flatMap(category => category.products)
74+
.find(product => product.id == form.values.product_id)?.prices?.[0]?.id;
75+
76+
form.setValues({
77+
...form.values,
78+
product_price_id: String(productPriceId),
79+
});
80+
}, [form.values.product_id]);
81+
6882
if (!attendee || !order || !event) {
6983
return <LoadingMask/>;
7084
}

frontend/src/locales/de.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/locales/de.po

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ msgstr "Aktiv"
293293
msgid "Add a description for this check-in list"
294294
msgstr "Fügen Sie eine Beschreibung für diese Eincheckliste hinzu"
295295

296-
#: src/components/modals/ManageAttendeeModal/index.tsx:116
296+
#: src/components/modals/ManageAttendeeModal/index.tsx:127
297297
msgid "Add any notes about the attendee. These will not be visible to the attendee."
298298
msgstr "Fügen Sie Anmerkungen über den Teilnehmer hinzu. Diese sind für den Teilnehmer nicht sichtbar."
299299

300-
#: src/components/modals/ManageAttendeeModal/index.tsx:118
300+
#: src/components/modals/ManageAttendeeModal/index.tsx:129
301301
msgid "Add any notes about the attendee..."
302302
msgstr "Fügen Sie Anmerkungen über den Teilnehmer hinzu..."
303303

@@ -588,19 +588,19 @@ msgstr "Einmal pro Produkt fragen"
588588
msgid "Attendee"
589589
msgstr "Teilnehmer"
590590

591-
#: src/components/modals/ManageAttendeeModal/index.tsx:132
591+
#: src/components/modals/ManageAttendeeModal/index.tsx:143
592592
msgid "Attendee Details"
593593
msgstr "Teilnehmerdetails"
594594

595-
#: src/components/modals/ManageAttendeeModal/index.tsx:138
595+
#: src/components/modals/ManageAttendeeModal/index.tsx:149
596596
msgid "Attendee Notes"
597597
msgstr "Teilnehmernotizen"
598598

599599
#: src/components/common/QuestionsTable/index.tsx:348
600600
msgid "Attendee questions"
601601
msgstr "Fragen der Teilnehmer"
602602

603-
#: src/components/modals/ManageAttendeeModal/index.tsx:157
603+
#: src/components/modals/ManageAttendeeModal/index.tsx:168
604604
msgid "Attendee Ticket"
605605
msgstr "Teilnehmer-Ticket"
606606

@@ -1356,13 +1356,17 @@ msgid "Details"
13561356
msgstr "Einzelheiten"
13571357

13581358
#: src/components/forms/CapaciyAssigmentForm/index.tsx:27
1359-
msgid "Disable this capacity track capacity without stopping product sales"
1360-
msgstr "Deaktivieren Sie diese Kapazität, um Kapazitäten zu verfolgen, ohne den Produktverkauf zu stoppen"
1359+
#~ msgid "Disable this capacity track capacity without stopping product sales"
1360+
#~ msgstr "Deaktivieren Sie diese Kapazität, um Kapazitäten zu verfolgen, ohne den Produktverkauf zu stoppen"
13611361

13621362
#: src/components/forms/CapaciyAssigmentForm/index.tsx:26
13631363
#~ msgid "Disable this capacity track capacity without stopping ticket sales"
13641364
#~ msgstr "Deaktivieren Sie diese Kapazitätsverfolgung ohne den Ticketverkauf zu stoppen"
13651365

1366+
#: src/components/forms/CapaciyAssigmentForm/index.tsx:27
1367+
msgid "Disabling this capacity will track sales but not stop them when the limit is reached"
1368+
msgstr "Das Deaktivieren dieser Kapazität wird Verkäufe verfolgen, aber nicht stoppen, wenn das Limit erreicht ist"
1369+
13661370
#: src/components/common/PromoCodeTable/index.tsx:70
13671371
msgid "Discount"
13681372
msgstr "Rabatt"
@@ -1469,7 +1473,7 @@ msgid "Early bird"
14691473
msgstr "Früher Vogel"
14701474

14711475
#: src/components/common/TaxAndFeeList/index.tsx:65
1472-
#: src/components/modals/ManageAttendeeModal/index.tsx:205
1476+
#: src/components/modals/ManageAttendeeModal/index.tsx:216
14731477
msgid "Edit"
14741478
msgstr "Bearbeiten"
14751479

@@ -1583,7 +1587,7 @@ msgid "Email & Notification Settings"
15831587
msgstr "E-Mail- und Benachrichtigungseinstellungen"
15841588

15851589
#: src/components/modals/CreateAttendeeModal/index.tsx:132
1586-
#: src/components/modals/ManageAttendeeModal/index.tsx:99
1590+
#: src/components/modals/ManageAttendeeModal/index.tsx:110
15871591
msgid "Email address"
15881592
msgstr "E-Mail-Adresse"
15891593

@@ -1816,7 +1820,7 @@ msgstr "Gebühren"
18161820

18171821
#: src/components/common/QuestionsTable/index.tsx:206
18181822
#: src/components/modals/CreateAttendeeModal/index.tsx:118
1819-
#: src/components/modals/ManageAttendeeModal/index.tsx:95
1823+
#: src/components/modals/ManageAttendeeModal/index.tsx:106
18201824
#: src/components/routes/product-widget/CollectInformation/index.tsx:269
18211825
#: src/components/routes/product-widget/CollectInformation/index.tsx:328
18221826
msgid "First name"
@@ -2071,7 +2075,7 @@ msgstr "Homepage Designer"
20712075
msgid "Homepage Preview"
20722076
msgstr "Homepage-Vorschau"
20732077

2074-
#: src/components/modals/ManageAttendeeModal/index.tsx:95
2078+
#: src/components/modals/ManageAttendeeModal/index.tsx:106
20752079
msgid "Homer"
20762080
msgstr "Homer"
20772081

@@ -2263,7 +2267,7 @@ msgid "Last login"
22632267
msgstr "Letzte Anmeldung"
22642268

22652269
#: src/components/modals/CreateAttendeeModal/index.tsx:125
2266-
#: src/components/modals/ManageAttendeeModal/index.tsx:96
2270+
#: src/components/modals/ManageAttendeeModal/index.tsx:107
22672271
msgid "Last name"
22682272
msgstr "Familienname, Nachname"
22692273

@@ -2592,7 +2596,7 @@ msgstr "Keine Bestellungen anzuzeigen"
25922596
msgid "No Payment Required"
25932597
msgstr "Keine Zahlung erforderlich"
25942598

2595-
#: src/components/modals/ManageAttendeeModal/index.tsx:162
2599+
#: src/components/modals/ManageAttendeeModal/index.tsx:173
25962600
msgid "No product associated with this attendee."
25972601
msgstr "Kein Produkt mit diesem Teilnehmer verknüpft."
25982602

@@ -2608,7 +2612,7 @@ msgstr "Noch keine Produkte"
26082612
msgid "No Promo Codes to show"
26092613
msgstr "Keine Promo-Codes anzuzeigen"
26102614

2611-
#: src/components/modals/ManageAttendeeModal/index.tsx:175
2615+
#: src/components/modals/ManageAttendeeModal/index.tsx:186
26122616
msgid "No questions answered by this attendee."
26132617
msgstr "Dieser Teilnehmer hat keine Fragen beantwortet."
26142618

@@ -2658,7 +2662,7 @@ msgstr "Nicht verfügbar"
26582662
msgid "Not On Sale"
26592663
msgstr "Nicht im Angebot"
26602664

2661-
#: src/components/modals/ManageAttendeeModal/index.tsx:115
2665+
#: src/components/modals/ManageAttendeeModal/index.tsx:126
26622666
msgid "Notes"
26632667
msgstr "Notizen"
26642668

@@ -2767,7 +2771,7 @@ msgstr "Bestellung abgeschlossen"
27672771
msgid "Order Date"
27682772
msgstr "Auftragsdatum"
27692773

2770-
#: src/components/modals/ManageAttendeeModal/index.tsx:151
2774+
#: src/components/modals/ManageAttendeeModal/index.tsx:162
27712775
#: src/components/modals/ViewOrderModal/index.tsx:42
27722776
#: src/components/routes/product-widget/OrderSummaryAndProducts/index.tsx:241
27732777
msgid "Order Details"
@@ -3094,7 +3098,7 @@ msgstr "Tickets drucken"
30943098
#~ msgstr "Produkt"
30953099

30963100
#: src/components/common/AttendeeDetails/index.tsx:45
3097-
#: src/components/modals/ManageAttendeeModal/index.tsx:104
3101+
#: src/components/modals/ManageAttendeeModal/index.tsx:115
30983102
#: src/components/routes/event/products.tsx:86
30993103
msgid "Product"
31003104
msgstr "Produkt"
@@ -3240,7 +3244,7 @@ msgstr "Fragentitel"
32403244
msgid "Questions"
32413245
msgstr "Fragen"
32423246

3243-
#: src/components/modals/ManageAttendeeModal/index.tsx:169
3247+
#: src/components/modals/ManageAttendeeModal/index.tsx:180
32443248
#: src/components/modals/ViewOrderModal/index.tsx:54
32453249
msgid "Questions & Answers"
32463250
msgstr "Fragen & Antworten"
@@ -3415,7 +3419,7 @@ msgstr "San Francisco"
34153419
msgid "Save"
34163420
msgstr "Speichern"
34173421

3418-
#: src/components/modals/ManageAttendeeModal/index.tsx:215
3422+
#: src/components/modals/ManageAttendeeModal/index.tsx:226
34193423
#: src/components/routes/event/HomepageDesigner/index.tsx:143
34203424
msgid "Save Changes"
34213425
msgstr "Änderungen speichern"
@@ -3514,7 +3518,7 @@ msgstr "Kategorie auswählen..."
35143518
msgid "Select organizer"
35153519
msgstr "Veranstalter auswählen"
35163520

3517-
#: src/components/modals/ManageAttendeeModal/index.tsx:103
3521+
#: src/components/modals/ManageAttendeeModal/index.tsx:114
35183522
msgid "Select Product"
35193523
msgstr "Produkt auswählen"
35203524

@@ -3708,7 +3712,7 @@ msgstr "Wird dem Kunden vor dem Bezahlvorgang angezeigt"
37083712
msgid "Shows common address fields, including country"
37093713
msgstr "Zeigt allgemeine Adressfelder an, einschließlich Land"
37103714

3711-
#: src/components/modals/ManageAttendeeModal/index.tsx:96
3715+
#: src/components/modals/ManageAttendeeModal/index.tsx:107
37123716
msgid "Simpson"
37133717
msgstr "Simpson"
37143718

@@ -3867,7 +3871,7 @@ msgstr "Frage erfolgreich erstellt"
38673871
#~ msgid "Successfully Created Ticket"
38683872
#~ msgstr "Ticket erfolgreich erstellt"
38693873

3870-
#: src/components/modals/ManageAttendeeModal/index.tsx:81
3874+
#: src/components/modals/ManageAttendeeModal/index.tsx:92
38713875
msgid "Successfully updated attendee"
38723876
msgstr "Teilnehmer erfolgreich aktualisiert"
38733877

@@ -4519,7 +4523,7 @@ msgstr "Umsatzsteuer"
45194523
msgid "Venue Name"
45204524
msgstr "Veranstaltungsort Namen"
45214525

4522-
#: src/components/modals/ManageAttendeeModal/index.tsx:204
4526+
#: src/components/modals/ManageAttendeeModal/index.tsx:215
45234527
msgid "View"
45244528
msgstr "Ansehen"
45254529

@@ -4711,7 +4715,7 @@ msgstr "Arbeiten"
47114715
#: src/components/modals/EditProductModal/index.tsx:108
47124716
#: src/components/modals/EditPromoCodeModal/index.tsx:84
47134717
#: src/components/modals/EditQuestionModal/index.tsx:99
4714-
#: src/components/modals/ManageAttendeeModal/index.tsx:215
4718+
#: src/components/modals/ManageAttendeeModal/index.tsx:226
47154719
#: src/components/routes/auth/Register/index.tsx:99
47164720
#: src/components/routes/auth/ResetPassword/index.tsx:62
47174721
msgid "Working..."

frontend/src/locales/en.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)