mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
apply new-link codemod
This commit is contained in:
@@ -27,8 +27,8 @@ export default function BookingTable({
|
|||||||
{
|
{
|
||||||
name: 'Email',
|
name: 'Email',
|
||||||
value: (
|
value: (
|
||||||
<Link href={`mailto:${booking.email}`}>
|
<Link href={`mailto:${booking.email}`} className="link">
|
||||||
<a className="link">{booking.email}</a>
|
{booking.email}
|
||||||
</Link>
|
</Link>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -42,8 +42,8 @@ export default function BookingTable({
|
|||||||
>
|
>
|
||||||
<div className="px-4 py-5 sm:px-6">
|
<div className="px-4 py-5 sm:px-6">
|
||||||
<h3 className="text-lg leading-6 font-medium text-gray-900">
|
<h3 className="text-lg leading-6 font-medium text-gray-900">
|
||||||
<Link href={`/admin/bookings/${booking.uuid}`}>
|
<Link href={`/admin/bookings/${booking.uuid}`} className="link">
|
||||||
<a className="link">Booking {booking.uuid}</a>
|
Booking{booking.uuid}
|
||||||
</Link>
|
</Link>
|
||||||
</h3>
|
</h3>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-gray-500">
|
<p className="mt-1 max-w-2xl text-sm text-gray-500">
|
||||||
@@ -71,5 +71,5 @@ export default function BookingTable({
|
|||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,25 +7,25 @@ export default function Footer() {
|
|||||||
<footer>
|
<footer>
|
||||||
<div className="flex flex-col sm:flex-row max-w-7xl mx-auto px-4 sm:px-6 my-5">
|
<div className="flex flex-col sm:flex-row max-w-7xl mx-auto px-4 sm:px-6 my-5">
|
||||||
<div className="flex-grow">
|
<div className="flex-grow">
|
||||||
<Link href="/">
|
<Link href="/" className="underline">
|
||||||
<a className="underline">
|
|
||||||
<Logo className="h-12 w-auto sm:h-14" />
|
<Logo className="h-12 w-auto sm:h-14" />
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<ul className="flex flex-col gap-2 sm:flex-row sm:items-end ">
|
<ul className="flex flex-col gap-2 sm:flex-row sm:items-end ">
|
||||||
<li>
|
<li>
|
||||||
<Link href="/privacy">
|
<Link href="/privacy" className="underline">
|
||||||
<a className="underline">Datenschutzerklärung</a>
|
Datenschutzerklärung
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Link href="/impressum">
|
<Link href="/impressum" className="underline">
|
||||||
<a className="underline">Impressum</a>
|
Impressum
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,81 +33,81 @@ export default function Header() {
|
|||||||
router.push(event.currentTarget.href)
|
router.push(event.currentTarget.href)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <>
|
||||||
<>
|
<Head>
|
||||||
<Head>
|
<title>Pfadi-Bussle</title>
|
||||||
<title>Pfadi-Bussle</title>
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
</Head>
|
||||||
</Head>
|
<div className="">
|
||||||
<div className="">
|
<div className="max-w-7xl mx-auto px-4 sm:px-6">
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6">
|
<div className="relative flex justify-between items-center border-b-2 border-gray-100 py-6 md:justify-start md:space-x-10">
|
||||||
<div className="relative flex justify-between items-center border-b-2 border-gray-100 py-6 md:justify-start md:space-x-10">
|
<div className="flex justify-start lg:w-0 flex-1">
|
||||||
<div className="flex justify-start lg:w-0 flex-1">
|
<Link
|
||||||
<Link href="/">
|
href="/"
|
||||||
<a className="text-lg tracking-tight font-extrabold text-blue-800 sm:text-xl md:text-2xl">
|
className="text-lg tracking-tight font-extrabold text-blue-800 sm:text-xl md:text-2xl">
|
||||||
Pfadi-Bussle
|
|
||||||
|
Pfadi-Bussle
|
||||||
|
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
<nav className="hidden space-x-10 sm:flex">
|
||||||
|
{NAV_ENTRIES.map(({ label, href }) => {
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
key={href}
|
||||||
|
href={href}
|
||||||
|
onClick={changeRoute}
|
||||||
|
className="text-base font-medium text-gray-500 hover:text-gray-900"
|
||||||
|
>
|
||||||
|
{label}
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
)
|
||||||
</div>
|
})}
|
||||||
<nav className="hidden space-x-10 sm:flex">
|
</nav>
|
||||||
{NAV_ENTRIES.map(({ label, href }) => {
|
<nav
|
||||||
return (
|
onClick={() => setHamburgerOpen(!hamburgerOpen)}
|
||||||
<a
|
className="flex flex-col sm:hidden text-gray-500 hover:text-gray-900 cursor-pointer"
|
||||||
key={href}
|
>
|
||||||
href={href}
|
<svg
|
||||||
onClick={changeRoute}
|
className="w-5"
|
||||||
className="text-base font-medium text-gray-500 hover:text-gray-900"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
fill="none"
|
||||||
{label}
|
viewBox="0 0 24 24"
|
||||||
</a>
|
stroke="currentColor"
|
||||||
)
|
|
||||||
})}
|
|
||||||
</nav>
|
|
||||||
<nav
|
|
||||||
onClick={() => setHamburgerOpen(!hamburgerOpen)}
|
|
||||||
className="flex flex-col sm:hidden text-gray-500 hover:text-gray-900 cursor-pointer"
|
|
||||||
>
|
>
|
||||||
<svg
|
<path
|
||||||
className="w-5"
|
strokeLinecap="round"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
strokeLinejoin="round"
|
||||||
fill="none"
|
strokeWidth={2}
|
||||||
viewBox="0 0 24 24"
|
d="M4 6h16M4 12h16M4 18h16"
|
||||||
stroke="currentColor"
|
/>
|
||||||
>
|
</svg>
|
||||||
<path
|
<div
|
||||||
strokeLinecap="round"
|
className={`${
|
||||||
strokeLinejoin="round"
|
hamburgerOpen || 'hidden'
|
||||||
strokeWidth={2}
|
} absolute z-10 mt-5 transform right-0`}
|
||||||
d="M4 6h16M4 12h16M4 18h16"
|
>
|
||||||
/>
|
<div className="rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 overflow-hidden">
|
||||||
</svg>
|
<div className="relative grid gap-2 bg-white px-4 py-2">
|
||||||
<div
|
{NAV_ENTRIES.map(({ label, href }) => {
|
||||||
className={`${
|
return (
|
||||||
hamburgerOpen || 'hidden'
|
<a
|
||||||
} absolute z-10 mt-5 transform right-0`}
|
key={href}
|
||||||
>
|
href={href}
|
||||||
<div className="rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 overflow-hidden">
|
onClick={changeRoute}
|
||||||
<div className="relative grid gap-2 bg-white px-4 py-2">
|
className="text-base font-medium text-gray-500 hover:text-gray-900"
|
||||||
{NAV_ENTRIES.map(({ label, href }) => {
|
>
|
||||||
return (
|
{label}
|
||||||
<a
|
</a>
|
||||||
key={href}
|
)
|
||||||
href={href}
|
})}
|
||||||
onClick={changeRoute}
|
|
||||||
className="text-base font-medium text-gray-500 hover:text-gray-900"
|
|
||||||
>
|
|
||||||
{label}
|
|
||||||
</a>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</div>
|
||||||
<User />
|
</nav>
|
||||||
</div>
|
<User />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
)
|
</>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,15 +37,17 @@ export default function Navigation() {
|
|||||||
<span className="font-extrabold">{pathLabel}</span>
|
<span className="font-extrabold">{pathLabel}</span>
|
||||||
</h2>
|
</h2>
|
||||||
{status === 'authenticated' && data.user.email && (
|
{status === 'authenticated' && data.user.email && (
|
||||||
<Link href="/admin">
|
<Link
|
||||||
<a className="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">
|
href="/admin"
|
||||||
|
className="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">
|
||||||
|
|
||||||
Buchungen
|
Buchungen
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
<div className="flex-grow" />
|
<div className="flex-grow" />
|
||||||
<User />
|
<User />
|
||||||
</>
|
</>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,43 +35,41 @@ function ShowBookingAdmin({ booking: bookingProp }: { booking: Booking }) {
|
|||||||
setStoringBooking(false)
|
setStoringBooking(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <>
|
||||||
<>
|
<h2 className="text-3xl">Buchung {booking.uuid}</h2>
|
||||||
<h2 className="text-3xl">Buchung {booking.uuid}</h2>
|
<Calendar start={booking.startDate} end={booking.endDate} />
|
||||||
<Calendar start={booking.startDate} end={booking.endDate} />
|
<div>
|
||||||
<div>
|
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
|
||||||
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
|
</div>
|
||||||
</div>
|
<div>
|
||||||
<div>
|
<strong>Bucher:</strong> {booking.name}
|
||||||
<strong>Bucher:</strong> {booking.name}
|
</div>
|
||||||
</div>
|
<div>
|
||||||
<div>
|
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
||||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
</div>
|
||||||
</div>
|
{storingBookingError && (
|
||||||
{storingBookingError && (
|
<div className="error-message flex-grow">{storingBookingError}</div>
|
||||||
<div className="error-message flex-grow">{storingBookingError}</div>
|
)}
|
||||||
)}
|
<div className="my-6">
|
||||||
<div className="my-6">
|
<button
|
||||||
<button
|
onClick={() => onStoreBooking(true)}
|
||||||
onClick={() => onStoreBooking(true)}
|
className="btn btn-blue"
|
||||||
className="btn btn-blue"
|
disabled={storingBooking}
|
||||||
disabled={storingBooking}
|
>
|
||||||
>
|
Buchung Bestätigen
|
||||||
Buchung Bestätigen
|
</button>
|
||||||
</button>
|
<button
|
||||||
<button
|
onClick={() => onStoreBooking(false)}
|
||||||
onClick={() => onStoreBooking(false)}
|
className="btn btn-red"
|
||||||
className="btn btn-red"
|
disabled={storingBooking}
|
||||||
disabled={storingBooking}
|
>
|
||||||
>
|
Buchung Abweisen
|
||||||
Buchung Abweisen
|
</button>
|
||||||
</button>
|
<Link href={`${router.asPath}/bill`} className="btn btn-gray">
|
||||||
<Link href={`${router.asPath}/bill`}>
|
Rechnung
|
||||||
<a className="btn btn-gray">Rechnung</a>
|
</Link>
|
||||||
</Link>
|
</div>
|
||||||
</div>
|
</>;
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowBookingAdmin.authenticationRequired = true
|
ShowBookingAdmin.authenticationRequired = true
|
||||||
|
|||||||
@@ -17,40 +17,38 @@ export default function ShowBookingStored({ booking }: { booking: Booking }) {
|
|||||||
setBookingDataStored(true)
|
setBookingDataStored(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <>
|
||||||
<>
|
<h3 className="thanks mb-3 mt-6 text-lg">
|
||||||
<h3 className="thanks mb-3 mt-6 text-lg">
|
Vielen Dank für die Buchungsanfrage
|
||||||
Vielen Dank für die Buchungsanfrage
|
</h3>
|
||||||
</h3>
|
<p className="mb-6">
|
||||||
<p className="mb-6">
|
Nach Prüfung bestätigen wir die Buchung zeitnah per E-Mail.
|
||||||
Nach Prüfung bestätigen wir die Buchung zeitnah per E-Mail.
|
</p>
|
||||||
</p>
|
<p>
|
||||||
<p>
|
Den{' '}
|
||||||
Den{' '}
|
<Link href={`/bookings/${booking.uuid}`} className="link underline">
|
||||||
<Link href={`/bookings/${booking.uuid}`}>
|
Link
|
||||||
<a className="link underline">Link</a>
|
</Link>{' '}
|
||||||
</Link>{' '}
|
zur Buchung schicken wir Dir auch per E-Mail. Dort kann die Buchung auch
|
||||||
zur Buchung schicken wir Dir auch per E-Mail. Dort kann die Buchung auch
|
jederzeit storniert werden.
|
||||||
jederzeit storniert werden.
|
</p>
|
||||||
</p>
|
{!storedBookingData && !bookingDataStored && (
|
||||||
{!storedBookingData && !bookingDataStored && (
|
<div className="mt-6">
|
||||||
<div className="mt-6">
|
<p>
|
||||||
<p>
|
Sollen deine Buchungsdaten für die nächste Buchung in{' '}
|
||||||
Sollen deine Buchungsdaten für die nächste Buchung in{' '}
|
<strong>deinem Browser</strong> gespeichert werden?
|
||||||
<strong>deinem Browser</strong> gespeichert werden?
|
</p>
|
||||||
</p>
|
<button onClick={store} className="mt-3 ml-0 btn btn-blue">
|
||||||
<button onClick={store} className="mt-3 ml-0 btn btn-blue">
|
Ja, bitte speichern
|
||||||
Ja, bitte speichern
|
</button>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
{bookingDataStored === true && (
|
||||||
{bookingDataStored === true && (
|
<div className="mt-6">
|
||||||
<div className="mt-6">
|
<p className="info-message">
|
||||||
<p className="info-message">
|
Ok, deine Buchungsdaten wurden für die nächste Buchung gespeichert.
|
||||||
Ok, deine Buchungsdaten wurden für die nächste Buchung gespeichert.
|
</p>
|
||||||
</p>
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
</>;
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,20 +19,22 @@ export default function Home() {
|
|||||||
dritte Sitzreihe können ausgebaut werden.
|
dritte Sitzreihe können ausgebaut werden.
|
||||||
</p>
|
</p>
|
||||||
<p className="mt-3 text-gray-500 sm:mt-5 sm:text-lg md:text-xl">
|
<p className="mt-3 text-gray-500 sm:mt-5 sm:text-lg md:text-xl">
|
||||||
<Link href="/prices">
|
<Link href="/prices" className="underline hover:text-blue-700">
|
||||||
<a className="underline hover:text-blue-700">Preise</a>
|
Preise
|
||||||
</Link>{' '}
|
</Link>{' '}
|
||||||
und{' '}
|
und{' '}
|
||||||
<Link href="/terms">
|
<Link href="/terms" className="underline hover:text-blue-700">
|
||||||
<a className="underline hover:text-blue-700">Mietbedingungen</a>
|
Mietbedingungen
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-5 sm:mt-8 sm:flex sm:justify-center">
|
<div className="mt-5 sm:mt-8 sm:flex sm:justify-center">
|
||||||
<div className="rounded-md shadow">
|
<div className="rounded-md shadow">
|
||||||
<Link href="/book">
|
<Link
|
||||||
<a className="w-full flex items-center justify-center px-6 py-2 border border-transparent text-base font-medium rounded-md text-white bg-blue-800 hover:bg-blue-900 md:py-2 md:text-lg md:px-5">
|
href="/book"
|
||||||
|
className="w-full flex items-center justify-center px-6 py-2 border border-transparent text-base font-medium rounded-md text-white bg-blue-800 hover:bg-blue-900 md:py-2 md:text-lg md:px-5">
|
||||||
|
|
||||||
Zur Buchungsanfrage
|
Zur Buchungsanfrage
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -53,19 +55,21 @@ export default function Home() {
|
|||||||
0151 / 21225302
|
0151 / 21225302
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
oder{' '}
|
oder{' '}
|
||||||
<Link href="https://wa.me/4915121225362">
|
<Link
|
||||||
<a className="underline inline-flex flex-row items-baseline hover:text-blue-700">
|
href="https://wa.me/4915121225362"
|
||||||
<svg
|
className="underline inline-flex flex-row items-baseline hover:text-blue-700">
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
className="fill-current h-4 inline"
|
<svg
|
||||||
viewBox="0 0 738 741"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
className="fill-current h-4 inline"
|
||||||
<title>Whatsapp</title>
|
viewBox="0 0 738 741"
|
||||||
<path d="M630 108A368 368 0 0052 551L0 741l195-51a368 368 0 00435-582M370 672c-55 0-108-14-155-42l-11-7-116 31 31-113-7-12A304 304 0 01370 62a303 303 0 01306 305c-1 169-137 305-306 305m168-228l-63-30c-8-3-15-4-21 5l-29 36c-5 6-10 7-20 2-9-5-38-14-73-46-28-24-46-54-51-63-6-9-1-14 4-19l13-16c5-5 7-9 10-15s1-12-1-16l-28-68c-8-18-15-16-21-16h-18c-6 0-16 2-24 11-9 9-32 31-32 77s33 88 37 94c5 7 65 99 157 139l52 19c22 7 42 6 58 4 18-3 54-22 62-44 8-21 8-40 5-43-2-4-8-6-17-11" />
|
>
|
||||||
</svg>
|
<title>Whatsapp</title>
|
||||||
</a>
|
<path d="M630 108A368 368 0 0052 551L0 741l195-51a368 368 0 00435-582M370 672c-55 0-108-14-155-42l-11-7-116 31 31-113-7-12A304 304 0 01370 62a303 303 0 01306 305c-1 169-137 305-306 305m168-228l-63-30c-8-3-15-4-21 5l-29 36c-5 6-10 7-20 2-9-5-38-14-73-46-28-24-46-54-51-63-6-9-1-14 4-19l13-16c5-5 7-9 10-15s1-12-1-16l-28-68c-8-18-15-16-21-16h-18c-6 0-16 2-24 11-9 9-32 31-32 77s33 88 37 94c5 7 65 99 157 139l52 19c22 7 42 6 58 4 18-3 54-22 62-44 8-21 8-40 5-43-2-4-8-6-17-11" />
|
||||||
|
</svg>
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user