+
Payment
diff --git a/components/admin/lists/ticketRow.tsx b/components/admin/lists/ticketRow.tsx
index 54c37db6..f8db5548 100644
--- a/components/admin/lists/ticketRow.tsx
+++ b/components/admin/lists/ticketRow.tsx
@@ -3,6 +3,8 @@ import { BiCreditCard, BiLogoSketch, BiLeftArrowCircle, BiSolidRightArrowSquare
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/react'
import { EllipsisVerticalIcon, CurrencyPoundIcon, ClipboardIcon, ExclamationTriangleIcon } from '@heroicons/react/24/solid'
import { format,fromUnixTime } from 'date-fns';
+import { scanIn } from '@lib/fetchers';
+import { mutate } from 'swr';
const TicketStatusIcon = ({attendee}) => {
const PaymentIcon = attendee.status === 'paid_stripe' ?
@@ -37,7 +39,9 @@ export const TicketRow = ({attendee,setActiveTicket, setNameChangeModalActive, s
{attendee.email} |
{passString} |
- {attendee.checkin_at ? format(fromUnixTime(attendee.checkin_at),'EEE HH:mm') : }
+ {attendee.checkin_at
+ ?
+ : }
|
diff --git a/components/admin/modals/nameChangeModal.tsx b/components/admin/modals/nameChangeModal.tsx
index c72b6eb0..28c5b881 100644
--- a/components/admin/modals/nameChangeModal.tsx
+++ b/components/admin/modals/nameChangeModal.tsx
@@ -68,7 +68,7 @@ export default function NameChangeModal({ticket,open,onClose,refreshFunction}) {
diff --git a/components/admin/scan/ScanSuccessDialog.tsx b/components/admin/scan/ScanSuccessDialog.tsx
index a2feb034..a5a01ad8 100644
--- a/components/admin/scan/ScanSuccessDialog.tsx
+++ b/components/admin/scan/ScanSuccessDialog.tsx
@@ -1,16 +1,8 @@
import useSWR from "swr";
import { itemsFromPassCombination} from '@components/ticketing/pricingUtilities'
import { format } from "date-fns";
-
-const fetcher = (url: string) => fetch(url).then((res) => res.json());
-
-const scanIn = async (ticket_number,email,reset=false) => {
- const apiResponse = await fetch(`/api/admin/scan/${ticket_number}`,{
- method: "POST",
- body: JSON.stringify({email:email,reset: reset}),
- })
- return apiResponse.json()
-}
+import { fetcher, scanIn } from "@lib/fetchers";
+// const fetcher = (url: string) => fetch(url).then((res) => res.json());
const ScanSuccessDialog = ({scan,onClick}) => {
const {data, error, isLoading, isValidating} = useSWR(`/api/admin/scan/${scan}`, fetcher, { keepPreviousData: false });
diff --git a/components/admin/ticket.tsx b/components/admin/ticket.tsx
index a66c38d5..14c89b84 100644
--- a/components/admin/ticket.tsx
+++ b/components/admin/ticket.tsx
@@ -6,9 +6,7 @@ import { format, fromUnixTime } from "date-fns";
import Link from "next/link";
import NameChangeModal from './modals/nameChangeModal';
import TicketTransferModal from './modals/ticketTransferModal';
-
-
-const fetcher = (url: string) => fetch(url).then((res) => res.json());
+import { fetcher } from "@lib/fetchers";
const accessToThings = (access:number[],) => {
let products = []
diff --git a/components/admin/ticketList.tsx b/components/admin/ticketList.tsx
index c7147cd7..cdcc53e1 100644
--- a/components/admin/ticketList.tsx
+++ b/components/admin/ticketList.tsx
@@ -7,8 +7,7 @@ import NameChangeModal from './modals/nameChangeModal';
import TicketTransferModal from './modals/ticketTransferModal';
import { filterItems, filter, FilterSelector, FilterLabel } from './lists/filterable';
import { TicketRow } from './lists/ticketRow';
-
-const fetcher = (url: string) => fetch(url).then((res) => res.json());
+import { fetcher } from "@lib/fetchers";
export default function TicketList() {
diff --git a/components/admin/userList.tsx b/components/admin/userList.tsx
index 62ddaf48..f738ef93 100644
--- a/components/admin/userList.tsx
+++ b/components/admin/userList.tsx
@@ -2,8 +2,7 @@
import useSWR, {useSWRConfig} from "swr";
import { EnvelopeIcon, ClockIcon } from '@heroicons/react/20/solid'
import { format } from "date-fns";
-
-const fetcher = (url: string) => fetch(url).then((res) => res.json());
+import { fetcher } from "@lib/fetchers";
export default function UserList({loggedInUser}) {
const { mutate } = useSWRConfig()
diff --git a/components/nav/nav-items.tsx b/components/nav/nav-items.tsx
index 33ae6f45..ea4ffe27 100644
--- a/components/nav/nav-items.tsx
+++ b/components/nav/nav-items.tsx
@@ -42,7 +42,7 @@ export default function NavItems({ navs }: { navs: any }) {
const { theme } = useLayout();
const searchParams = useSearchParams()
const draft = searchParams.get('draft')
- const filteredNavs = draft || process.env.NODE_ENV == 'development' ? navs : navs.filter((item)=>{return item.visible})
+ const filteredNavs = draft ? navs : navs.filter((item)=>{return item.visible})
return (
<>
{draft ? (Currently showing Draft Content, Click to Hide) : null}
diff --git a/components/nav/nav-mobile.tsx b/components/nav/nav-mobile.tsx
index 1ea741b3..f0bf6369 100644
--- a/components/nav/nav-mobile.tsx
+++ b/components/nav/nav-mobile.tsx
@@ -4,7 +4,7 @@ import { useSearchParams } from 'next/navigation'
export default function NavMobile({ navs }: { navs: any }) {
const searchParams = useSearchParams()
const draft = searchParams.get('draft')
- const filteredNavs = draft || process.env.NODE_ENV == 'development' ? navs : navs.filter((item)=>{return item.visible})
+ const filteredNavs = draft ? navs : navs.filter((item)=>{return item.visible})
return (
diff --git a/components/preferences/MealPreferences.tsx b/components/preferences/MealPreferences.tsx
index ae86cc67..79e5798a 100644
--- a/components/preferences/MealPreferences.tsx
+++ b/components/preferences/MealPreferences.tsx
@@ -101,6 +101,7 @@ const MealPreferences = ({preferences,setPreferences}) =>{
{ preferences.dietary_requirements.selected.includes('other') ? (
+
|