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 ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
Enable react query for offline node + Update blank slate question page notice
Dave Earley468fa6be017e
diff --git a/backend/app/Services/Handlers/Order/CreateOrderHandler.php b/backend/app/Services/Handlers/Order/CreateOrderHandler.phpindex b03810100..13e9b3fc5 100644--- a/backend/app/Services/Handlers/Order/CreateOrderHandler.php+++ b/backend/app/Services/Handlers/Order/CreateOrderHandler.php@@ -65,7 +65,12 @@ readonly class CreateOrderHandlersessionId: $sessionId);- $orderItems = $this->orderItemProcessingService->process($order, $createOrderPublicDTO->tickets, $event, $promoCode);+ $orderItems = $this->orderItemProcessingService->process(+ order: $order,+ ticketsOrderDetails: $createOrderPublicDTO->tickets,+ event: $event,+ promoCode: $promoCode,+ );return $this->orderManagementService->updateOrderTotals($order, $orderItems);});diff --git a/frontend/src/components/common/QuestionsTable/QuestionsTable.module.scss b/frontend/src/components/common/QuestionsTable/QuestionsTable.module.scssindex 191d91b5c..8fa2e154e 100644--- a/frontend/src/components/common/QuestionsTable/QuestionsTable.module.scss+++ b/frontend/src/components/common/QuestionsTable/QuestionsTable.module.scss@@ -77,8 +77,17 @@.questions {margin-bottom: 20px;+ h3 {+ margin-bottom: 8px;+ }+.noQuestionsAlert {+ display: flex;+ align-items: center;+ svg {+ margin-right: 5px;+ }}.questionCard {diff --git a/frontend/src/components/common/QuestionsTable/index.tsx b/frontend/src/components/common/QuestionsTable/index.tsxindex 7966202c1..0e426b43c 100644--- a/frontend/src/components/common/QuestionsTable/index.tsx+++ b/frontend/src/components/common/QuestionsTable/index.tsx@@ -1,4 +1,4 @@-import {Alert, Button, Group, Menu, Switch, TextInput, Tooltip} from '@mantine/core';+import {Button, Group, Menu, Switch, TextInput, Tooltip} from '@mantine/core';import {IdParam, Question} from "../../../types.ts";import {IconDotsVertical,@@ -297,9 +297,9 @@ export const QuestionsTable = ({questions}: QuestionsTableProp) => {{orderQuestions.filter(question => showHiddenQuestions || !question.is_hidden).length === 0 && (- <Alert icon={<IconInfoCircle/>} color={'gray'} className={classes.noQuestionsAlert}>- {t`You have no order questions.`}- </Alert>+ <Card className={classes.noQuestionsAlert}>+ <IconInfoCircle/> {t`You have no order questions.`}+ </Card>)}</div><div className={classes.questions}>@@ -312,9 +312,9 @@ export const QuestionsTable = ({questions}: QuestionsTableProp) => {{ticketQuestions.filter(question => showHiddenQuestions || !question.is_hidden).length === 0 && (- <Alert icon={<IconInfoCircle/>} color={'gray'} className={classes.noQuestionsAlert}>- {t`You have no attendee questions.`}- </Alert>+ <Card className={classes.noQuestionsAlert}>+ <IconInfoCircle/> {t`You have no attendee questions.`}+ </Card>)}</div></div>diff --git a/frontend/src/mutations/useCreatePromoCode.ts b/frontend/src/mutations/useCreatePromoCode.tsindex 2b0ae1a21..f614b16bc 100644--- a/frontend/src/mutations/useCreatePromoCode.ts+++ b/frontend/src/mutations/useCreatePromoCode.ts@@ -3,6 +3,7 @@ import {IdParam, PromoCode} from "../types.ts";import {promoCodeClient} from "../api/promo-code.client.ts";import {GET_EVENT_PROMO_CODES_QUERY_KEY} from "../queries/useGetEventPromoCodes.ts";import {useQueryClient} from "@tanstack/react-query";+import {GET_EVENT_QUERY_KEY} from "../queries/useGetEvent.ts";export const useCreatePromoCode = () => {const queryClient = useQueryClient();@@ -13,7 +14,10 @@ export const useCreatePromoCode = () => {promoCodeData: PromoCode}) => promoCodeClient.create(eventId, promoCodeData),{- onSuccess: () => queryClient.invalidateQueries({queryKey: [GET_EVENT_PROMO_CODES_QUERY_KEY]}),+ onSuccess: (_, variables) => {+ queryClient.invalidateQueries({queryKey: [GET_EVENT_QUERY_KEY, variables.eventId]})+ return queryClient.invalidateQueries({queryKey: [GET_EVENT_PROMO_CODES_QUERY_KEY]});+ },})}\ No newline at end of filediff --git a/frontend/src/queries/useGetEvent.ts b/frontend/src/queries/useGetEvent.tsindex aa6f29ae7..bdbe18bc9 100644--- a/frontend/src/queries/useGetEvent.ts+++ b/frontend/src/queries/useGetEvent.ts@@ -10,6 +10,9 @@ export const useGetEvent = (eventId: IdParam) => {async () => {const {data} = await eventsClient.findByID(eventId);return data;+ },+ {+ staleTime: 5,});};\ No newline at end of filediff --git a/frontend/src/utilites/queryClient.ts b/frontend/src/utilites/queryClient.tsindex ef112f3de..3d095d9dd 100644--- a/frontend/src/utilites/queryClient.ts+++ b/frontend/src/utilites/queryClient.ts@@ -7,5 +7,8 @@ export const queryClient = new QueryClient({refetchOnWindowFocus: false,networkMode: "always",},+ mutations: {+ networkMode: 'always',+ }},});