From e0392c679396445f85aa210fefa1f9aa3622d83d Mon Sep 17 00:00:00 2001 From: Dave Earley Date: Thu, 19 Dec 2024 23:09:34 +0000 Subject: [PATCH 1/2] Cancelling order is not updating capacity assignments --- backend/app/Services/Domain/Order/OrderCancelService.php | 2 +- .../src/components/forms/CapaciyAssigmentForm/index.tsx | 8 ++++---- .../modals/CreateCapacityAssignmentModal/index.tsx | 4 ++-- .../modals/EditCapacityAssignmentModal/index.tsx | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/app/Services/Domain/Order/OrderCancelService.php b/backend/app/Services/Domain/Order/OrderCancelService.php index b9e1125d..e439f26d 100644 --- a/backend/app/Services/Domain/Order/OrderCancelService.php +++ b/backend/app/Services/Domain/Order/OrderCancelService.php @@ -35,8 +35,8 @@ public function __construct( public function cancelOrder(OrderDomainObject $order): void { $this->databaseManager->transaction(function () use ($order) { - $this->cancelAttendees($order); $this->adjustTicketQuantities($order); + $this->cancelAttendees($order); $this->updateOrderStatus($order); $event = $this->eventRepository diff --git a/frontend/src/components/forms/CapaciyAssigmentForm/index.tsx b/frontend/src/components/forms/CapaciyAssigmentForm/index.tsx index 4d974dfd..6645dbf5 100644 --- a/frontend/src/components/forms/CapaciyAssigmentForm/index.tsx +++ b/frontend/src/components/forms/CapaciyAssigmentForm/index.tsx @@ -1,17 +1,17 @@ import {InputGroup} from "../../common/InputGroup"; -import {MultiSelect, NumberInput, Switch, TextInput} from "@mantine/core"; +import {MultiSelect, NumberInput, TextInput} from "@mantine/core"; import {t} from "@lingui/macro"; import {UseFormReturnType} from "@mantine/form"; import {CapacityAssignmentRequest, Ticket} from "../../../types.ts"; import {CustomSelect, ItemProps} from "../../common/CustomSelect"; import {IconCheck, IconTicket, IconX} from "@tabler/icons-react"; -interface CapaciyAssigmentFormProps { +interface CapacityAssigmentFormProps { form: UseFormReturnType; tickets: Ticket[], } -export const CapaciyAssigmentForm = ({form, tickets}: CapaciyAssigmentFormProps) => { +export const CapacityAssigmentForm = ({form, tickets}: CapacityAssigmentFormProps) => { const statusOptions: ItemProps[] = [ { icon: , @@ -23,7 +23,7 @@ export const CapaciyAssigmentForm = ({form, tickets}: CapaciyAssigmentFormProps) icon: , label: t`Inactive`, value: 'INACTIVE', - description: t`Disable this capacity track capacity without stopping ticket sales`, + description: t`Disabling this capacity will track sales but not stop them when the limit is reached`, }, ]; diff --git a/frontend/src/components/modals/CreateCapacityAssignmentModal/index.tsx b/frontend/src/components/modals/CreateCapacityAssignmentModal/index.tsx index 04c1ebfa..7e15235d 100644 --- a/frontend/src/components/modals/CreateCapacityAssignmentModal/index.tsx +++ b/frontend/src/components/modals/CreateCapacityAssignmentModal/index.tsx @@ -1,7 +1,7 @@ import {CapacityAssignmentRequest, GenericModalProps, Ticket} from "../../../types.ts"; import {Modal} from "../../common/Modal"; import {t} from "@lingui/macro"; -import {CapaciyAssigmentForm} from "../../forms/CapaciyAssigmentForm"; +import {CapacityAssigmentForm} from "../../forms/CapaciyAssigmentForm"; import {useForm} from "@mantine/form"; import {Button} from "@mantine/core"; import {useCreateCapacityAssignment} from "../../../mutations/useCreateCapacityAssignment.ts"; @@ -69,7 +69,7 @@ export const CreateCapacityAssignmentModal = ({onClose}: GenericModalProps) => { {!eventHasTickets && } {eventHasTickets && (
- {event && } + {event && }