Skip to content

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 ⭐️

Cancelling order is not updating capacity assignments

Dave Earleye0392c679396
diff --git a/backend/app/Services/Domain/Order/OrderCancelService.php b/backend/app/Services/Domain/Order/OrderCancelService.php
index b9e1125d8..e439f26df 100644
--- a/backend/app/Services/Domain/Order/OrderCancelService.php
+++ b/backend/app/Services/Domain/Order/OrderCancelService.php
@@ -35,8 +35,8 @@ readonly class OrderCancelService
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 4d974dfd7..6645dbf54 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<CapacityAssignmentRequest>;
tickets: Ticket[],
}
-export const CapaciyAssigmentForm = ({form, tickets}: CapaciyAssigmentFormProps) => {
+export const CapacityAssigmentForm = ({form, tickets}: CapacityAssigmentFormProps) => {
const statusOptions: ItemProps[] = [
{
icon: <IconCheck/>,
@@ -23,7 +23,7 @@ export const CapaciyAssigmentForm = ({form, tickets}: CapaciyAssigmentFormProps)
icon: <IconX/>,
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 04c1ebfab..7e15235d5 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 && <NoTickets/>}
{eventHasTickets && (
<form onSubmit={form.onSubmit(handleSubmit)}>
- {event && <CapaciyAssigmentForm form={form} tickets={event.tickets as Ticket[]}/>}
+ {event && <CapacityAssigmentForm form={form} tickets={event.tickets as Ticket[]}/>}
<Button
type={'submit'}
fullWidth
diff --git a/frontend/src/components/modals/EditCapacityAssignmentModal/index.tsx b/frontend/src/components/modals/EditCapacityAssignmentModal/index.tsx
index c0dbb90e9..a5a4a412f 100644
--- a/frontend/src/components/modals/EditCapacityAssignmentModal/index.tsx
+++ b/frontend/src/components/modals/EditCapacityAssignmentModal/index.tsx
@@ -1,7 +1,7 @@
import {CapacityAssignmentRequest, GenericModalProps, IdParam, 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 {showSuccess} from "../../../utilites/notifications.tsx";
@@ -65,7 +65,7 @@ export const EditCapacityAssignmentModal = ({
return (
<Modal opened onClose={onClose} heading={t`Edit Capacity Assignment`}>
<form onSubmit={form.onSubmit(handleSubmit)}>
- {event && <CapaciyAssigmentForm form={form} tickets={event.tickets as Ticket[]}/>}
+ {event && <CapacityAssigmentForm form={form} tickets={event.tickets as Ticket[]}/>}
<Button
type={'submit'}
fullWidth