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

Add copy check in URL option

Dave Earley43852296b3ec
diff --git a/backend/app/Services/Domain/CheckInList/DeleteAttendeeCheckInService.php b/backend/app/Services/Domain/CheckInList/DeleteAttendeeCheckInService.php
index fc5017df7..37c2148f2 100644
--- a/backend/app/Services/Domain/CheckInList/DeleteAttendeeCheckInService.php
+++ b/backend/app/Services/Domain/CheckInList/DeleteAttendeeCheckInService.php
@@ -40,7 +40,9 @@ class DeleteAttendeeCheckInService
$checkInList = $this->checkInListDataService->getCheckInList($checkInListShortId);
if ($checkInList->getId() !== $checkIn->getCheckInListId()) {
- throw new CannotCheckInException(__('Attendee does not belong to this check-in list'));
+ // For now, let's allow this, as someone could delete the check-in list and be unable to delete the check-in
+ // It should be safe as to check someone out you need to know the check-in list and check in short id
+ //throw new CannotCheckInException(__('Attendee does not belong to this check-in list'));
}
$this->attendeeCheckInRepository->deleteById($checkIn->getId());
diff --git a/frontend/src/components/common/CheckInListList/index.tsx b/frontend/src/components/common/CheckInListList/index.tsx
index 7bf9b20a6..713aec7ee 100644
--- a/frontend/src/components/common/CheckInListList/index.tsx
+++ b/frontend/src/components/common/CheckInListList/index.tsx
@@ -1,7 +1,7 @@
import {CheckInList, IdParam} from "../../../types";
import {Badge, Button, Progress} from "@mantine/core";
import {t, Trans} from "@lingui/macro";
-import {IconHelp, IconPencil, IconPlus, IconTrash} from "@tabler/icons-react";
+import {IconCopy, IconHelp, IconPencil, IconPlus, IconTrash} from "@tabler/icons-react";
import Truncate from "../Truncate";
import {NoResultsSplash} from "../NoResultsSplash";
import classes from './CheckInListList.module.scss';
@@ -14,6 +14,7 @@ import {EditCheckInListModal} from "../../modals/EditCheckInListModal";
import {useDeleteCheckInList} from "../../../mutations/useDeleteCheckInList";
import {showError, showSuccess} from "../../../utilites/notifications.tsx";
import {confirmationDialog} from "../../../utilites/confirmationDialog.tsx";
+import { useParams } from "react-router-dom";
interface CheckInListListProps {
checkInLists: CheckInList[];
@@ -24,6 +25,7 @@ export const CheckInListList = ({checkInLists, openCreateModal}: CheckInListList
const [editModalOpen, {open: openEditModal, close: closeEditModal}] = useDisclosure(false);
const [selectedCheckInListId, setSelectedCheckInListId] = useState<IdParam>();
const deleteMutation = useDeleteCheckInList();
+ const {eventId} = useParams();
const handleDeleteCheckInList = (checkInListId: IdParam, eventId: IdParam) => {
deleteMutation.mutate({checkInListId, eventId}, {
@@ -149,6 +151,17 @@ export const CheckInListList = ({checkInLists, openCreateModal}: CheckInListList
openEditModal();
}
},
+ {
+ label: t`Copy Check-In URL`,
+ icon: <IconCopy size={14}/>,
+ onClick: () => {
+ navigator.clipboard.writeText(
+ `${window.location.origin}/check-in/${list.short_id}`
+ ).then(() => {
+ showSuccess(t`Check-In URL copied to clipboard`);
+ });
+ }
+ }
],
},
{
@@ -163,7 +176,7 @@ export const CheckInListList = ({checkInLists, openCreateModal}: CheckInListList
() => {
handleDeleteCheckInList(
list.id as IdParam,
- list.event_id as IdParam,
+ eventId,
);
})
},
diff --git a/frontend/src/components/forms/CheckInListForm/index.tsx b/frontend/src/components/forms/CheckInListForm/index.tsx
index 28666a10e..212581556 100644
--- a/frontend/src/components/forms/CheckInListForm/index.tsx
+++ b/frontend/src/components/forms/CheckInListForm/index.tsx
@@ -18,7 +18,7 @@ export const CheckInListForm = ({form, tickets}: CheckInListFormProps) => {
{...form.getInputProps('name')}
required
label={t`Name`}
- placeholder={t`Day one check-in list`}
+ placeholder={t`VIP check-in list`}
/>
<MultiSelect
diff --git a/frontend/src/components/layouts/CheckIn/index.tsx b/frontend/src/components/layouts/CheckIn/index.tsx
index 2c16e82d7..659607288 100644
--- a/frontend/src/components/layouts/CheckIn/index.tsx
+++ b/frontend/src/components/layouts/CheckIn/index.tsx
@@ -190,6 +190,22 @@ const CheckIn = () => {
);
}
+ if (CheckInListQuery.error && CheckInListQuery.error.response?.status === 404) {
+ return (
+ <NoResultsSplash
+ heading={t`Check-in list not found`}
+ imageHref={'/blank-slate/check-in-lists.svg'}
+ subHeading={(
+ <>
+ <p>
+ {t`The check-in list you are looking for does not exist.`}
+ </p>
+ </>
+ )}
+ />)
+ }
+
+
if (checkInList?.is_expired) {
return (
<NoResultsSplash
diff --git a/frontend/src/components/layouts/Event/index.tsx b/frontend/src/components/layouts/Event/index.tsx
index 97e1ece0c..60703fe34 100644
--- a/frontend/src/components/layouts/Event/index.tsx
+++ b/frontend/src/components/layouts/Event/index.tsx
@@ -45,11 +45,11 @@ const EventLayout = () => {
{link: 'promo-codes', label: t`Promo Codes`, icon: IconDiscount2},
{link: 'messages', label: t`Messages`, icon: IconSend},
{link: 'capacity-assignments', label: t`Capacity`, icon: IconUsersGroup},
+ {link: 'check-in', label: t`Check-In Lists`, icon: IconQrcode},
{label: t`Tools`},
{link: 'homepage-designer', label: t`Homepage Designer`, icon: IconPaint},
{link: 'widget', label: t`Widget Embed`, icon: IconDeviceTabletCode},
- {link: 'check-in', label: t`Check-In`, icon: IconQrcode},
];
const [sidebarOpen, setSidebarOpen] = useState(false);
const {eventId} = useParams();
diff --git a/frontend/src/queries/useGetCheckInListPublic.ts b/frontend/src/queries/useGetCheckInListPublic.ts
index 79fa1b11a..cf88bd0fa 100644
--- a/frontend/src/queries/useGetCheckInListPublic.ts
+++ b/frontend/src/queries/useGetCheckInListPublic.ts
@@ -11,5 +11,8 @@ export const useGetCheckInListPublic = (checkInListShortId: IdParam) => {
const data = await publicCheckInClient.getCheckInList(checkInListShortId);
return data;
},
+ {
+ retry: false,
+ }
);
};