Skip to content

Commit

Permalink
Cancelling order is not updating capacity assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
daveearley committed Dec 19, 2024
1 parent e3f8773 commit e0392c6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/app/Services/Domain/Order/OrderCancelService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/forms/CapaciyAssigmentForm/index.tsx
Original file line number Diff line number Diff line change
@@ -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/>,
Expand All @@ -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`,
},
];

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e0392c6

Please sign in to comment.